From d43ce7ffc5e5370ea1e6ce530360d2aff5c12e00 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Wed, 19 Feb 2020 15:29:43 -0700 Subject: [PATCH 1/8] feat: reorganize components, make menu more granular Add skeleton layout and docs Fix menu alignment on large screens --- src/assets/styles/layouts/_header.scss | 1 + src/components/02-molecules/00-menu/menu.njk | 43 ------------------- src/components/_preview.njk | 4 +- .../_separator/separator.njk | 0 .../{01-atoms => atoms}/_svg/_svg.config.js | 0 .../{01-atoms => atoms}/_svg/_svg.njk | 0 src/components/atoms/atoms.config.js | 4 ++ .../08-badge => atoms/badge}/badge.config.js | 1 + .../08-badge => atoms/badge}/badge.njk | 0 .../button}/button--tag-button.njk | 0 .../button}/button.config.js | 1 + .../09-button => atoms/button}/button.njk | 0 .../call-to-action}/call-to-action.config.js | 1 + .../call-to-action}/call-to-action.njk | 0 .../colors}/colors.config.js | 1 + .../00-colors => atoms/colors}/colors.njk | 0 .../divider}/divider.config.js | 1 + .../03-divider => atoms/divider}/divider.njk | 0 .../_checkbox/_checkbox.config.js | 0 .../form-elements}/_checkbox/_checkbox.njk | 0 .../form-elements}/_input/_input.config.js | 0 .../form-elements}/_input/_input.njk | 0 .../_radio-button/_radio-button.config.js | 0 .../_radio-button/_radio-button.njk | 0 .../form-elements}/_select/_select.config.js | 0 .../form-elements}/_select/_select.njk | 0 .../_textarea/_textarea.config.js | 0 .../form-elements}/_textarea/_textarea.njk | 0 .../checkboxes}/checkboxes.config.js | 7 +-- .../form-elements/checkboxes}/checkboxes.njk | 0 .../form-elements/form-elements.config.js | 4 ++ .../form-elements/inputs}/inputs.config.js | 7 +-- .../form-elements/inputs}/inputs.njk | 0 .../radio-buttons}/radio-buttons.config.js | 7 +-- .../radio-buttons}/radio-buttons.njk | 0 .../form-elements/selects}/selects.config.js | 7 +-- .../form-elements/selects}/selects.njk | 0 .../form-elements/submit}/submit.config.js | 1 + .../form-elements/submit}/submit.njk | 0 .../textareas}/textareas.config.js | 7 +-- .../form-elements/textareas}/textareas.njk | 0 .../01-icons => atoms/icons}/icons.config.js | 1 + .../01-icons => atoms/icons}/icons.njk | 0 .../04-link => atoms/link}/link.config.js | 1 + .../{01-atoms/04-link => atoms/link}/link.njk | 0 .../07-tag => atoms/tag}/tag.config.js | 1 + .../{01-atoms/07-tag => atoms/tag}/tag.njk | 0 .../01-headings/headings.config.js | 0 .../typography}/01-headings/headings.njk | 0 .../02-paragraphs/paragraphs.config.js | 0 .../typography}/02-paragraphs/paragraphs.njk | 0 .../typography}/03-quotes/quotes.config.js | 0 .../typography}/03-quotes/quotes.njk | 0 .../typography}/04-lists/lists.config.js | 0 .../typography}/04-lists/lists.njk | 0 .../typography}/05-stack/stack.config.js | 0 .../typography}/05-stack/stack.njk | 0 .../06-repertoire/repertoire.config.js | 0 .../typography}/06-repertoire/repertoire.njk | 0 .../atoms/typography/typography.config.js | 5 +++ .../archive}/archive.config.js | 1 + .../archive}/archive.njk | 0 .../favorites}/favorites.config.js | 1 + .../favorites}/favorites.njk | 0 .../04-home => layouts/home}/home.config.js | 1 + .../04-home => layouts/home}/home.njk | 0 src/components/layouts/layouts.config.js | 4 ++ .../01-page => layouts/page}/page.config.js | 1 + .../01-page => layouts/page}/page.njk | 0 .../resource}/resource.config.js | 1 + .../resource}/resource.njk | 0 .../search-results}/search-results.config.js | 1 + .../search-results}/search-results.njk | 0 src/components/layouts/skeleton/README.md | 3 ++ src/components/layouts/skeleton/_preview.njk | 1 + .../layouts/skeleton/skeleton.config.js | 5 +++ src/components/layouts/skeleton/skeleton.njk | 35 +++++++++++++++ .../accordion}/accordion.config.js | 1 + .../accordion}/accordion.njk | 0 .../brand}/brand.config.js | 2 + .../_brand => molecules/brand}/brand.njk | 0 .../card}/card--resource.njk | 0 .../01-card => molecules/card}/card.config.js | 1 + .../01-card => molecules/card}/card.njk | 0 .../dialog}/dialog.config.js | 1 + .../06-dialog => molecules/dialog}/dialog.njk | 0 .../disclosure-button.config.js | 1 + .../disclosure-button}/disclosure-button.njk | 0 .../filter-list}/filter-list.config.js | 1 + .../filter-list}/filter-list.njk | 0 .../footer}/footer.config.js | 1 + .../11-footer => molecules/footer}/footer.njk | 0 .../info-card}/info-card.config.js | 1 + .../info-card}/info-card.njk | 0 .../link-list}/link-list.config.js | 1 + .../link-list}/link-list.njk | 0 .../menu-button}/menu-button.config.js | 1 + .../menu-button}/menu-button.njk | 0 src/components/molecules/menu/README.md | 15 +++++++ src/components/molecules/menu/menu.config.js | 17 ++++++++ src/components/molecules/menu/menu.njk | 8 ++++ src/components/molecules/molecules.config.js | 4 ++ .../nav/nav.config.js} | 14 ++---- src/components/molecules/nav/nav.njk | 36 ++++++++++++++++ .../notification}/notification.config.js | 1 + .../notification}/notification.njk | 0 .../pagination}/pagination.config.js | 1 + .../pagination}/pagination.njk | 0 .../saved-search}/saved-search.config.js | 1 + .../saved-search}/saved-search.njk | 0 .../search-button/search-button.config.js | 5 +++ .../molecules/search-button/search-button.njk | 1 + .../search-form/search-form.config.js} | 3 +- .../search-form/search-form.njk} | 0 114 files changed, 204 insertions(+), 72 deletions(-) delete mode 100644 src/components/02-molecules/00-menu/menu.njk rename src/components/{01-atoms => atoms}/_separator/separator.njk (100%) rename src/components/{01-atoms => atoms}/_svg/_svg.config.js (100%) rename src/components/{01-atoms => atoms}/_svg/_svg.njk (100%) create mode 100644 src/components/atoms/atoms.config.js rename src/components/{01-atoms/08-badge => atoms/badge}/badge.config.js (91%) rename src/components/{01-atoms/08-badge => atoms/badge}/badge.njk (100%) rename src/components/{01-atoms/09-button => atoms/button}/button--tag-button.njk (100%) rename src/components/{01-atoms/09-button => atoms/button}/button.config.js (99%) rename src/components/{01-atoms/09-button => atoms/button}/button.njk (100%) rename src/components/{01-atoms/06-call-to-action => atoms/call-to-action}/call-to-action.config.js (97%) rename src/components/{01-atoms/06-call-to-action => atoms/call-to-action}/call-to-action.njk (100%) rename src/components/{01-atoms/00-colors => atoms/colors}/colors.config.js (99%) rename src/components/{01-atoms/00-colors => atoms/colors}/colors.njk (100%) rename src/components/{01-atoms/03-divider => atoms/divider}/divider.config.js (98%) rename src/components/{01-atoms/03-divider => atoms/divider}/divider.njk (100%) rename src/components/{01-atoms/11-form-elements => atoms/form-elements}/_checkbox/_checkbox.config.js (100%) rename src/components/{01-atoms/11-form-elements => atoms/form-elements}/_checkbox/_checkbox.njk (100%) rename src/components/{01-atoms/11-form-elements => atoms/form-elements}/_input/_input.config.js (100%) rename src/components/{01-atoms/11-form-elements => atoms/form-elements}/_input/_input.njk (100%) rename src/components/{01-atoms/11-form-elements => atoms/form-elements}/_radio-button/_radio-button.config.js (100%) rename src/components/{01-atoms/11-form-elements => atoms/form-elements}/_radio-button/_radio-button.njk (100%) rename src/components/{01-atoms/11-form-elements => atoms/form-elements}/_select/_select.config.js (100%) rename src/components/{01-atoms/11-form-elements => atoms/form-elements}/_select/_select.njk (100%) rename src/components/{01-atoms/11-form-elements => atoms/form-elements}/_textarea/_textarea.config.js (100%) rename src/components/{01-atoms/11-form-elements => atoms/form-elements}/_textarea/_textarea.njk (100%) rename src/components/{01-atoms/11-form-elements/13-checkboxes => atoms/form-elements/checkboxes}/checkboxes.config.js (78%) rename src/components/{01-atoms/11-form-elements/13-checkboxes => atoms/form-elements/checkboxes}/checkboxes.njk (100%) create mode 100644 src/components/atoms/form-elements/form-elements.config.js rename src/components/{01-atoms/11-form-elements/10-inputs => atoms/form-elements/inputs}/inputs.config.js (73%) rename src/components/{01-atoms/11-form-elements/10-inputs => atoms/form-elements/inputs}/inputs.njk (100%) rename src/components/{01-atoms/11-form-elements/14-radio-buttons => atoms/form-elements/radio-buttons}/radio-buttons.config.js (71%) rename src/components/{01-atoms/11-form-elements/14-radio-buttons => atoms/form-elements/radio-buttons}/radio-buttons.njk (100%) rename src/components/{01-atoms/11-form-elements/12-selects => atoms/form-elements/selects}/selects.config.js (65%) rename src/components/{01-atoms/11-form-elements/12-selects => atoms/form-elements/selects}/selects.njk (100%) rename src/components/{01-atoms/11-form-elements/15-submit => atoms/form-elements/submit}/submit.config.js (97%) rename src/components/{01-atoms/11-form-elements/15-submit => atoms/form-elements/submit}/submit.njk (100%) rename src/components/{01-atoms/11-form-elements/11-textareas => atoms/form-elements/textareas}/textareas.config.js (79%) rename src/components/{01-atoms/11-form-elements/11-textareas => atoms/form-elements/textareas}/textareas.njk (100%) rename src/components/{01-atoms/01-icons => atoms/icons}/icons.config.js (99%) rename src/components/{01-atoms/01-icons => atoms/icons}/icons.njk (100%) rename src/components/{01-atoms/04-link => atoms/link}/link.config.js (98%) rename src/components/{01-atoms/04-link => atoms/link}/link.njk (100%) rename src/components/{01-atoms/07-tag => atoms/tag}/tag.config.js (91%) rename src/components/{01-atoms/07-tag => atoms/tag}/tag.njk (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/01-headings/headings.config.js (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/01-headings/headings.njk (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/02-paragraphs/paragraphs.config.js (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/02-paragraphs/paragraphs.njk (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/03-quotes/quotes.config.js (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/03-quotes/quotes.njk (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/04-lists/lists.config.js (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/04-lists/lists.njk (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/05-stack/stack.config.js (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/05-stack/stack.njk (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/06-repertoire/repertoire.config.js (100%) rename src/components/{01-atoms/02-typography => atoms/typography}/06-repertoire/repertoire.njk (100%) create mode 100644 src/components/atoms/typography/typography.config.js rename src/components/{03-layouts/02-archive => layouts/archive}/archive.config.js (99%) rename src/components/{03-layouts/02-archive => layouts/archive}/archive.njk (100%) rename src/components/{03-layouts/05-favorites => layouts/favorites}/favorites.config.js (99%) rename src/components/{03-layouts/05-favorites => layouts/favorites}/favorites.njk (100%) rename src/components/{03-layouts/04-home => layouts/home}/home.config.js (99%) rename src/components/{03-layouts/04-home => layouts/home}/home.njk (100%) create mode 100644 src/components/layouts/layouts.config.js rename src/components/{03-layouts/01-page => layouts/page}/page.config.js (91%) rename src/components/{03-layouts/01-page => layouts/page}/page.njk (100%) rename src/components/{03-layouts/03-resource => layouts/resource}/resource.config.js (97%) rename src/components/{03-layouts/03-resource => layouts/resource}/resource.njk (100%) rename src/components/{03-layouts/06-search-results => layouts/search-results}/search-results.config.js (99%) rename src/components/{03-layouts/06-search-results => layouts/search-results}/search-results.njk (100%) create mode 100644 src/components/layouts/skeleton/README.md create mode 100644 src/components/layouts/skeleton/_preview.njk create mode 100644 src/components/layouts/skeleton/skeleton.config.js create mode 100644 src/components/layouts/skeleton/skeleton.njk rename src/components/{02-molecules/02-accordion => molecules/accordion}/accordion.config.js (97%) rename src/components/{02-molecules/02-accordion => molecules/accordion}/accordion.njk (100%) rename src/components/{02-molecules/_brand => molecules/brand}/brand.config.js (83%) rename src/components/{02-molecules/_brand => molecules/brand}/brand.njk (100%) rename src/components/{02-molecules/01-card => molecules/card}/card--resource.njk (100%) rename src/components/{02-molecules/01-card => molecules/card}/card.config.js (99%) rename src/components/{02-molecules/01-card => molecules/card}/card.njk (100%) rename src/components/{02-molecules/06-dialog => molecules/dialog}/dialog.config.js (98%) rename src/components/{02-molecules/06-dialog => molecules/dialog}/dialog.njk (100%) rename src/components/{02-molecules/08-disclosure-button => molecules/disclosure-button}/disclosure-button.config.js (95%) rename src/components/{02-molecules/08-disclosure-button => molecules/disclosure-button}/disclosure-button.njk (100%) rename src/components/{02-molecules/05-filter-list => molecules/filter-list}/filter-list.config.js (99%) rename src/components/{02-molecules/05-filter-list => molecules/filter-list}/filter-list.njk (100%) rename src/components/{02-molecules/11-footer => molecules/footer}/footer.config.js (89%) rename src/components/{02-molecules/11-footer => molecules/footer}/footer.njk (100%) rename src/components/{02-molecules/10-info-card => molecules/info-card}/info-card.config.js (95%) rename src/components/{02-molecules/10-info-card => molecules/info-card}/info-card.njk (100%) rename src/components/{02-molecules/04-link-list => molecules/link-list}/link-list.config.js (97%) rename src/components/{02-molecules/04-link-list => molecules/link-list}/link-list.njk (100%) rename src/components/{02-molecules/00-menu-button => molecules/menu-button}/menu-button.config.js (97%) rename src/components/{02-molecules/00-menu-button => molecules/menu-button}/menu-button.njk (100%) create mode 100644 src/components/molecules/menu/README.md create mode 100644 src/components/molecules/menu/menu.config.js create mode 100644 src/components/molecules/menu/menu.njk create mode 100644 src/components/molecules/molecules.config.js rename src/components/{02-molecules/00-menu/menu.config.js => molecules/nav/nav.config.js} (89%) create mode 100644 src/components/molecules/nav/nav.njk rename src/components/{02-molecules/06-notification => molecules/notification}/notification.config.js (98%) rename src/components/{02-molecules/06-notification => molecules/notification}/notification.njk (100%) rename src/components/{02-molecules/03-pagination => molecules/pagination}/pagination.config.js (95%) rename src/components/{02-molecules/03-pagination => molecules/pagination}/pagination.njk (100%) rename src/components/{02-molecules/09-saved-search => molecules/saved-search}/saved-search.config.js (95%) rename src/components/{02-molecules/09-saved-search => molecules/saved-search}/saved-search.njk (100%) create mode 100644 src/components/molecules/search-button/search-button.config.js create mode 100644 src/components/molecules/search-button/search-button.njk rename src/components/{02-molecules/07-search/search.config.js => molecules/search-form/search-form.config.js} (93%) rename src/components/{02-molecules/07-search/search.njk => molecules/search-form/search-form.njk} (100%) diff --git a/src/assets/styles/layouts/_header.scss b/src/assets/styles/layouts/_header.scss index 59e5dced..3353dd4c 100644 --- a/src/assets/styles/layouts/_header.scss +++ b/src/assets/styles/layouts/_header.scss @@ -218,6 +218,7 @@ [role="banner"] { .inner { margin-left: 0; + width: 100%; } } diff --git a/src/components/02-molecules/00-menu/menu.njk b/src/components/02-molecules/00-menu/menu.njk deleted file mode 100644 index 56d0d753..00000000 --- a/src/components/02-molecules/00-menu/menu.njk +++ /dev/null @@ -1,43 +0,0 @@ -{% render '@brand' %} -
- {% if modifier !== 'home' %} - - {% render '@search', {standAlone: true}, true %} - {% endif %} - -
diff --git a/src/components/_preview.njk b/src/components/_preview.njk index f90b8a38..eaf72e34 100644 --- a/src/components/_preview.njk +++ b/src/components/_preview.njk @@ -5,7 +5,8 @@ - + + @@ -41,6 +42,5 @@
{% if _target.context.inFooter %}{{ yield | safe }}{% else %}{% render '@footer' %}{% endif %}
{% endif %} - diff --git a/src/components/01-atoms/_separator/separator.njk b/src/components/atoms/_separator/separator.njk similarity index 100% rename from src/components/01-atoms/_separator/separator.njk rename to src/components/atoms/_separator/separator.njk diff --git a/src/components/01-atoms/_svg/_svg.config.js b/src/components/atoms/_svg/_svg.config.js similarity index 100% rename from src/components/01-atoms/_svg/_svg.config.js rename to src/components/atoms/_svg/_svg.config.js diff --git a/src/components/01-atoms/_svg/_svg.njk b/src/components/atoms/_svg/_svg.njk similarity index 100% rename from src/components/01-atoms/_svg/_svg.njk rename to src/components/atoms/_svg/_svg.njk diff --git a/src/components/atoms/atoms.config.js b/src/components/atoms/atoms.config.js new file mode 100644 index 00000000..a5dce4c9 --- /dev/null +++ b/src/components/atoms/atoms.config.js @@ -0,0 +1,4 @@ +module.exports = { + title: 'Atoms', + order: 1, +}; diff --git a/src/components/01-atoms/08-badge/badge.config.js b/src/components/atoms/badge/badge.config.js similarity index 91% rename from src/components/01-atoms/08-badge/badge.config.js rename to src/components/atoms/badge/badge.config.js index c587d2d9..04423641 100644 --- a/src/components/01-atoms/08-badge/badge.config.js +++ b/src/components/atoms/badge/badge.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Badge', status: 'wip', + order: 8, context: { label: 'Platform Cooperativism', standAlone: false diff --git a/src/components/01-atoms/08-badge/badge.njk b/src/components/atoms/badge/badge.njk similarity index 100% rename from src/components/01-atoms/08-badge/badge.njk rename to src/components/atoms/badge/badge.njk diff --git a/src/components/01-atoms/09-button/button--tag-button.njk b/src/components/atoms/button/button--tag-button.njk similarity index 100% rename from src/components/01-atoms/09-button/button--tag-button.njk rename to src/components/atoms/button/button--tag-button.njk diff --git a/src/components/01-atoms/09-button/button.config.js b/src/components/atoms/button/button.config.js similarity index 99% rename from src/components/01-atoms/09-button/button.config.js rename to src/components/atoms/button/button.config.js index 14b2c150..f1eb82fc 100644 --- a/src/components/01-atoms/09-button/button.config.js +++ b/src/components/atoms/button/button.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Button', status: 'wip', + order: 9, context: { label: 'Filter', labelVisuallyHidden: false, diff --git a/src/components/01-atoms/09-button/button.njk b/src/components/atoms/button/button.njk similarity index 100% rename from src/components/01-atoms/09-button/button.njk rename to src/components/atoms/button/button.njk diff --git a/src/components/01-atoms/06-call-to-action/call-to-action.config.js b/src/components/atoms/call-to-action/call-to-action.config.js similarity index 97% rename from src/components/01-atoms/06-call-to-action/call-to-action.config.js rename to src/components/atoms/call-to-action/call-to-action.config.js index 9a05bdae..a9dcff62 100644 --- a/src/components/01-atoms/06-call-to-action/call-to-action.config.js +++ b/src/components/atoms/call-to-action/call-to-action.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Call to Action', status: 'wip', + order: 6, context: { href: 'https://example.com/call-to-action', label: 'Call to Action', diff --git a/src/components/01-atoms/06-call-to-action/call-to-action.njk b/src/components/atoms/call-to-action/call-to-action.njk similarity index 100% rename from src/components/01-atoms/06-call-to-action/call-to-action.njk rename to src/components/atoms/call-to-action/call-to-action.njk diff --git a/src/components/01-atoms/00-colors/colors.config.js b/src/components/atoms/colors/colors.config.js similarity index 99% rename from src/components/01-atoms/00-colors/colors.config.js rename to src/components/atoms/colors/colors.config.js index 2eb32706..b8d7eae1 100644 --- a/src/components/01-atoms/00-colors/colors.config.js +++ b/src/components/atoms/colors/colors.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Colors', status: 'wip', + order: 1, context: { colors: { brand: [ diff --git a/src/components/01-atoms/00-colors/colors.njk b/src/components/atoms/colors/colors.njk similarity index 100% rename from src/components/01-atoms/00-colors/colors.njk rename to src/components/atoms/colors/colors.njk diff --git a/src/components/01-atoms/03-divider/divider.config.js b/src/components/atoms/divider/divider.config.js similarity index 98% rename from src/components/01-atoms/03-divider/divider.config.js rename to src/components/atoms/divider/divider.config.js index 06f11427..fc5d3a0a 100644 --- a/src/components/01-atoms/03-divider/divider.config.js +++ b/src/components/atoms/divider/divider.config.js @@ -1,6 +1,7 @@ module.exports = { status: 'wip', title: 'Dividers', + order: 4, context: { dividers: [ { diff --git a/src/components/01-atoms/03-divider/divider.njk b/src/components/atoms/divider/divider.njk similarity index 100% rename from src/components/01-atoms/03-divider/divider.njk rename to src/components/atoms/divider/divider.njk diff --git a/src/components/01-atoms/11-form-elements/_checkbox/_checkbox.config.js b/src/components/atoms/form-elements/_checkbox/_checkbox.config.js similarity index 100% rename from src/components/01-atoms/11-form-elements/_checkbox/_checkbox.config.js rename to src/components/atoms/form-elements/_checkbox/_checkbox.config.js diff --git a/src/components/01-atoms/11-form-elements/_checkbox/_checkbox.njk b/src/components/atoms/form-elements/_checkbox/_checkbox.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/_checkbox/_checkbox.njk rename to src/components/atoms/form-elements/_checkbox/_checkbox.njk diff --git a/src/components/01-atoms/11-form-elements/_input/_input.config.js b/src/components/atoms/form-elements/_input/_input.config.js similarity index 100% rename from src/components/01-atoms/11-form-elements/_input/_input.config.js rename to src/components/atoms/form-elements/_input/_input.config.js diff --git a/src/components/01-atoms/11-form-elements/_input/_input.njk b/src/components/atoms/form-elements/_input/_input.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/_input/_input.njk rename to src/components/atoms/form-elements/_input/_input.njk diff --git a/src/components/01-atoms/11-form-elements/_radio-button/_radio-button.config.js b/src/components/atoms/form-elements/_radio-button/_radio-button.config.js similarity index 100% rename from src/components/01-atoms/11-form-elements/_radio-button/_radio-button.config.js rename to src/components/atoms/form-elements/_radio-button/_radio-button.config.js diff --git a/src/components/01-atoms/11-form-elements/_radio-button/_radio-button.njk b/src/components/atoms/form-elements/_radio-button/_radio-button.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/_radio-button/_radio-button.njk rename to src/components/atoms/form-elements/_radio-button/_radio-button.njk diff --git a/src/components/01-atoms/11-form-elements/_select/_select.config.js b/src/components/atoms/form-elements/_select/_select.config.js similarity index 100% rename from src/components/01-atoms/11-form-elements/_select/_select.config.js rename to src/components/atoms/form-elements/_select/_select.config.js diff --git a/src/components/01-atoms/11-form-elements/_select/_select.njk b/src/components/atoms/form-elements/_select/_select.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/_select/_select.njk rename to src/components/atoms/form-elements/_select/_select.njk diff --git a/src/components/01-atoms/11-form-elements/_textarea/_textarea.config.js b/src/components/atoms/form-elements/_textarea/_textarea.config.js similarity index 100% rename from src/components/01-atoms/11-form-elements/_textarea/_textarea.config.js rename to src/components/atoms/form-elements/_textarea/_textarea.config.js diff --git a/src/components/01-atoms/11-form-elements/_textarea/_textarea.njk b/src/components/atoms/form-elements/_textarea/_textarea.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/_textarea/_textarea.njk rename to src/components/atoms/form-elements/_textarea/_textarea.njk diff --git a/src/components/01-atoms/11-form-elements/13-checkboxes/checkboxes.config.js b/src/components/atoms/form-elements/checkboxes/checkboxes.config.js similarity index 78% rename from src/components/01-atoms/11-form-elements/13-checkboxes/checkboxes.config.js rename to src/components/atoms/form-elements/checkboxes/checkboxes.config.js index 5e629e5d..f1251561 100644 --- a/src/components/01-atoms/11-form-elements/13-checkboxes/checkboxes.config.js +++ b/src/components/atoms/form-elements/checkboxes/checkboxes.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Checkboxes', status: 'wip', + order: 4, context: { standAlone: false, checkboxes: [ @@ -27,10 +28,10 @@ module.exports = { }, variants: [ { - name: 'Default (Light on Dark)', - label: 'Default (Light on Dark)', + name: 'Default Inverse', + label: 'Default (Inverse)', context: { - bodyClass: 'has-dark-mint-500-background-color' + bodyClass: 'has-blue-500-background-color' } } ] diff --git a/src/components/01-atoms/11-form-elements/13-checkboxes/checkboxes.njk b/src/components/atoms/form-elements/checkboxes/checkboxes.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/13-checkboxes/checkboxes.njk rename to src/components/atoms/form-elements/checkboxes/checkboxes.njk diff --git a/src/components/atoms/form-elements/form-elements.config.js b/src/components/atoms/form-elements/form-elements.config.js new file mode 100644 index 00000000..c27ce591 --- /dev/null +++ b/src/components/atoms/form-elements/form-elements.config.js @@ -0,0 +1,4 @@ +module.exports = { + title: 'Form Elements', + order: 10, +}; diff --git a/src/components/01-atoms/11-form-elements/10-inputs/inputs.config.js b/src/components/atoms/form-elements/inputs/inputs.config.js similarity index 73% rename from src/components/01-atoms/11-form-elements/10-inputs/inputs.config.js rename to src/components/atoms/form-elements/inputs/inputs.config.js index 3592db54..1acfee46 100644 --- a/src/components/01-atoms/11-form-elements/10-inputs/inputs.config.js +++ b/src/components/atoms/form-elements/inputs/inputs.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Text Input', status: 'wip', + order: 1, context: { standAlone: false, inputs: [ @@ -20,10 +21,10 @@ module.exports = { }, variants: [ { - name: 'Default (Light on Dark)', - label: 'Default (Light on Dark)', + name: 'Default Invers', + label: 'Default (Inverse)', context: { - bodyClass: 'has-dark-mint-500-background-color' + bodyClass: 'has-blue-500-background-color' } } ] diff --git a/src/components/01-atoms/11-form-elements/10-inputs/inputs.njk b/src/components/atoms/form-elements/inputs/inputs.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/10-inputs/inputs.njk rename to src/components/atoms/form-elements/inputs/inputs.njk diff --git a/src/components/01-atoms/11-form-elements/14-radio-buttons/radio-buttons.config.js b/src/components/atoms/form-elements/radio-buttons/radio-buttons.config.js similarity index 71% rename from src/components/01-atoms/11-form-elements/14-radio-buttons/radio-buttons.config.js rename to src/components/atoms/form-elements/radio-buttons/radio-buttons.config.js index f62a80a1..91e3bc02 100644 --- a/src/components/01-atoms/11-form-elements/14-radio-buttons/radio-buttons.config.js +++ b/src/components/atoms/form-elements/radio-buttons/radio-buttons.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Radio Buttons', label: 'Radio Buttons', + order: 5, status: 'wip', context: { standAlone: false, @@ -20,10 +21,10 @@ module.exports = { }, variants: [ { - name: 'Default (Light on Dark)', - label: 'Default (Light on Dark)', + name: 'Default Inverse', + label: 'Default (Inverse)', context: { - bodyClass: 'has-dark-mint-500-background-color' + bodyClass: 'has-blue-500-background-color' } } ] diff --git a/src/components/01-atoms/11-form-elements/14-radio-buttons/radio-buttons.njk b/src/components/atoms/form-elements/radio-buttons/radio-buttons.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/14-radio-buttons/radio-buttons.njk rename to src/components/atoms/form-elements/radio-buttons/radio-buttons.njk diff --git a/src/components/01-atoms/11-form-elements/12-selects/selects.config.js b/src/components/atoms/form-elements/selects/selects.config.js similarity index 65% rename from src/components/01-atoms/11-form-elements/12-selects/selects.config.js rename to src/components/atoms/form-elements/selects/selects.config.js index 89f33838..e1c79fe2 100644 --- a/src/components/01-atoms/11-form-elements/12-selects/selects.config.js +++ b/src/components/atoms/form-elements/selects/selects.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Selects', status: 'wip', + order: 3, context: { standAlone: false, selects: [ @@ -15,10 +16,10 @@ module.exports = { }, variants: [ { - name: 'Default (Light on Dark)', - label: 'Default (Light on Dark)', + name: 'Default Inverse', + label: 'Default (Inverse)', context: { - bodyClass: 'has-dark-mint-500-background-color' + bodyClass: 'has-blue-500-background-color' } } ] diff --git a/src/components/01-atoms/11-form-elements/12-selects/selects.njk b/src/components/atoms/form-elements/selects/selects.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/12-selects/selects.njk rename to src/components/atoms/form-elements/selects/selects.njk diff --git a/src/components/01-atoms/11-form-elements/15-submit/submit.config.js b/src/components/atoms/form-elements/submit/submit.config.js similarity index 97% rename from src/components/01-atoms/11-form-elements/15-submit/submit.config.js rename to src/components/atoms/form-elements/submit/submit.config.js index 33d64ca6..c5d905f6 100644 --- a/src/components/01-atoms/11-form-elements/15-submit/submit.config.js +++ b/src/components/atoms/form-elements/submit/submit.config.js @@ -2,6 +2,7 @@ module.exports = { title: 'Submit Button', label: 'Submit Button', status: 'wip', + order: 6, context: { label: 'Submit', id: 'submit', diff --git a/src/components/01-atoms/11-form-elements/15-submit/submit.njk b/src/components/atoms/form-elements/submit/submit.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/15-submit/submit.njk rename to src/components/atoms/form-elements/submit/submit.njk diff --git a/src/components/01-atoms/11-form-elements/11-textareas/textareas.config.js b/src/components/atoms/form-elements/textareas/textareas.config.js similarity index 79% rename from src/components/01-atoms/11-form-elements/11-textareas/textareas.config.js rename to src/components/atoms/form-elements/textareas/textareas.config.js index 7a1c1cce..a5d5cf3b 100644 --- a/src/components/01-atoms/11-form-elements/11-textareas/textareas.config.js +++ b/src/components/atoms/form-elements/textareas/textareas.config.js @@ -2,6 +2,7 @@ module.exports = { title: 'Text Areas', label: 'Text Areas', status: 'wip', + order: 2, context: { label: 'Text Area', name: 'text', @@ -25,10 +26,10 @@ module.exports = { }, variants: [ { - name: 'Default (Light on Dark)', - label: 'Default (Light on Dark)', + name: 'Default Inverse', + label: 'Default (Inverse)', context: { - bodyClass: 'has-dark-mint-500-background-color' + bodyClass: 'has-blue-500-background-color' } } ] diff --git a/src/components/01-atoms/11-form-elements/11-textareas/textareas.njk b/src/components/atoms/form-elements/textareas/textareas.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/11-textareas/textareas.njk rename to src/components/atoms/form-elements/textareas/textareas.njk diff --git a/src/components/01-atoms/01-icons/icons.config.js b/src/components/atoms/icons/icons.config.js similarity index 99% rename from src/components/01-atoms/01-icons/icons.config.js rename to src/components/atoms/icons/icons.config.js index 27455253..894a597e 100644 --- a/src/components/01-atoms/01-icons/icons.config.js +++ b/src/components/atoms/icons/icons.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Icons', status: 'wip', + order: 2, context: { iconsTitle: 'Icons', icons: [ diff --git a/src/components/01-atoms/01-icons/icons.njk b/src/components/atoms/icons/icons.njk similarity index 100% rename from src/components/01-atoms/01-icons/icons.njk rename to src/components/atoms/icons/icons.njk diff --git a/src/components/01-atoms/04-link/link.config.js b/src/components/atoms/link/link.config.js similarity index 98% rename from src/components/01-atoms/04-link/link.config.js rename to src/components/atoms/link/link.config.js index 528ec291..4972450a 100644 --- a/src/components/01-atoms/04-link/link.config.js +++ b/src/components/atoms/link/link.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Link', status: 'wip', + order: 5, context: { href: '/internal-link', label: 'Link' diff --git a/src/components/01-atoms/04-link/link.njk b/src/components/atoms/link/link.njk similarity index 100% rename from src/components/01-atoms/04-link/link.njk rename to src/components/atoms/link/link.njk diff --git a/src/components/01-atoms/07-tag/tag.config.js b/src/components/atoms/tag/tag.config.js similarity index 91% rename from src/components/01-atoms/07-tag/tag.config.js rename to src/components/atoms/tag/tag.config.js index 447d1a4d..49b42bac 100644 --- a/src/components/01-atoms/07-tag/tag.config.js +++ b/src/components/atoms/tag/tag.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Tag', status: 'wip', + order: 7, context: { label: 'Platform Cooperativism', standAlone: false diff --git a/src/components/01-atoms/07-tag/tag.njk b/src/components/atoms/tag/tag.njk similarity index 100% rename from src/components/01-atoms/07-tag/tag.njk rename to src/components/atoms/tag/tag.njk diff --git a/src/components/01-atoms/02-typography/01-headings/headings.config.js b/src/components/atoms/typography/01-headings/headings.config.js similarity index 100% rename from src/components/01-atoms/02-typography/01-headings/headings.config.js rename to src/components/atoms/typography/01-headings/headings.config.js diff --git a/src/components/01-atoms/02-typography/01-headings/headings.njk b/src/components/atoms/typography/01-headings/headings.njk similarity index 100% rename from src/components/01-atoms/02-typography/01-headings/headings.njk rename to src/components/atoms/typography/01-headings/headings.njk diff --git a/src/components/01-atoms/02-typography/02-paragraphs/paragraphs.config.js b/src/components/atoms/typography/02-paragraphs/paragraphs.config.js similarity index 100% rename from src/components/01-atoms/02-typography/02-paragraphs/paragraphs.config.js rename to src/components/atoms/typography/02-paragraphs/paragraphs.config.js diff --git a/src/components/01-atoms/02-typography/02-paragraphs/paragraphs.njk b/src/components/atoms/typography/02-paragraphs/paragraphs.njk similarity index 100% rename from src/components/01-atoms/02-typography/02-paragraphs/paragraphs.njk rename to src/components/atoms/typography/02-paragraphs/paragraphs.njk diff --git a/src/components/01-atoms/02-typography/03-quotes/quotes.config.js b/src/components/atoms/typography/03-quotes/quotes.config.js similarity index 100% rename from src/components/01-atoms/02-typography/03-quotes/quotes.config.js rename to src/components/atoms/typography/03-quotes/quotes.config.js diff --git a/src/components/01-atoms/02-typography/03-quotes/quotes.njk b/src/components/atoms/typography/03-quotes/quotes.njk similarity index 100% rename from src/components/01-atoms/02-typography/03-quotes/quotes.njk rename to src/components/atoms/typography/03-quotes/quotes.njk diff --git a/src/components/01-atoms/02-typography/04-lists/lists.config.js b/src/components/atoms/typography/04-lists/lists.config.js similarity index 100% rename from src/components/01-atoms/02-typography/04-lists/lists.config.js rename to src/components/atoms/typography/04-lists/lists.config.js diff --git a/src/components/01-atoms/02-typography/04-lists/lists.njk b/src/components/atoms/typography/04-lists/lists.njk similarity index 100% rename from src/components/01-atoms/02-typography/04-lists/lists.njk rename to src/components/atoms/typography/04-lists/lists.njk diff --git a/src/components/01-atoms/02-typography/05-stack/stack.config.js b/src/components/atoms/typography/05-stack/stack.config.js similarity index 100% rename from src/components/01-atoms/02-typography/05-stack/stack.config.js rename to src/components/atoms/typography/05-stack/stack.config.js diff --git a/src/components/01-atoms/02-typography/05-stack/stack.njk b/src/components/atoms/typography/05-stack/stack.njk similarity index 100% rename from src/components/01-atoms/02-typography/05-stack/stack.njk rename to src/components/atoms/typography/05-stack/stack.njk diff --git a/src/components/01-atoms/02-typography/06-repertoire/repertoire.config.js b/src/components/atoms/typography/06-repertoire/repertoire.config.js similarity index 100% rename from src/components/01-atoms/02-typography/06-repertoire/repertoire.config.js rename to src/components/atoms/typography/06-repertoire/repertoire.config.js diff --git a/src/components/01-atoms/02-typography/06-repertoire/repertoire.njk b/src/components/atoms/typography/06-repertoire/repertoire.njk similarity index 100% rename from src/components/01-atoms/02-typography/06-repertoire/repertoire.njk rename to src/components/atoms/typography/06-repertoire/repertoire.njk diff --git a/src/components/atoms/typography/typography.config.js b/src/components/atoms/typography/typography.config.js new file mode 100644 index 00000000..5bf5d48b --- /dev/null +++ b/src/components/atoms/typography/typography.config.js @@ -0,0 +1,5 @@ +module.exports = { + title: 'Typography', + status: 'wip', + order: 3 +}; diff --git a/src/components/03-layouts/02-archive/archive.config.js b/src/components/layouts/archive/archive.config.js similarity index 99% rename from src/components/03-layouts/02-archive/archive.config.js rename to src/components/layouts/archive/archive.config.js index a4c9d016..530a19f3 100644 --- a/src/components/03-layouts/02-archive/archive.config.js +++ b/src/components/layouts/archive/archive.config.js @@ -85,6 +85,7 @@ for ( let i = 0; i < resourceCount; i++ ) { module.exports = { title: 'Archive', status: 'wip', + order: 4, context: { bodyClass: 'archive post-type-archive taxonomy', hasMenu: true, diff --git a/src/components/03-layouts/02-archive/archive.njk b/src/components/layouts/archive/archive.njk similarity index 100% rename from src/components/03-layouts/02-archive/archive.njk rename to src/components/layouts/archive/archive.njk diff --git a/src/components/03-layouts/05-favorites/favorites.config.js b/src/components/layouts/favorites/favorites.config.js similarity index 99% rename from src/components/03-layouts/05-favorites/favorites.config.js rename to src/components/layouts/favorites/favorites.config.js index 9cab981b..cab6dca6 100644 --- a/src/components/03-layouts/05-favorites/favorites.config.js +++ b/src/components/layouts/favorites/favorites.config.js @@ -74,6 +74,7 @@ for ( let i = 0; i < resourceCount; i++ ) { module.exports = { title: 'Favorites', status: 'wip', + order: 7, context: { bodyClass: 'page page-template-page-favorites', hasMenu: true, diff --git a/src/components/03-layouts/05-favorites/favorites.njk b/src/components/layouts/favorites/favorites.njk similarity index 100% rename from src/components/03-layouts/05-favorites/favorites.njk rename to src/components/layouts/favorites/favorites.njk diff --git a/src/components/03-layouts/04-home/home.config.js b/src/components/layouts/home/home.config.js similarity index 99% rename from src/components/03-layouts/04-home/home.config.js rename to src/components/layouts/home/home.config.js index 6c3a8cb3..833c0c64 100644 --- a/src/components/03-layouts/04-home/home.config.js +++ b/src/components/layouts/home/home.config.js @@ -73,6 +73,7 @@ for ( let i = 0; i < resourceCount; i++ ) { module.exports = { title: 'Home', status: 'wip', + order: 2, context: { bodyClass: 'page home', hasMenu: true, diff --git a/src/components/03-layouts/04-home/home.njk b/src/components/layouts/home/home.njk similarity index 100% rename from src/components/03-layouts/04-home/home.njk rename to src/components/layouts/home/home.njk diff --git a/src/components/layouts/layouts.config.js b/src/components/layouts/layouts.config.js new file mode 100644 index 00000000..0eb0ae42 --- /dev/null +++ b/src/components/layouts/layouts.config.js @@ -0,0 +1,4 @@ +module.exports = { + title: 'Layouts', + order: 3, +}; diff --git a/src/components/03-layouts/01-page/page.config.js b/src/components/layouts/page/page.config.js similarity index 91% rename from src/components/03-layouts/01-page/page.config.js rename to src/components/layouts/page/page.config.js index f9ccbc84..78207ba2 100644 --- a/src/components/03-layouts/01-page/page.config.js +++ b/src/components/layouts/page/page.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Page', status: 'wip', + order: 3, context: { bodyClass: 'page', hasMenu: true, diff --git a/src/components/03-layouts/01-page/page.njk b/src/components/layouts/page/page.njk similarity index 100% rename from src/components/03-layouts/01-page/page.njk rename to src/components/layouts/page/page.njk diff --git a/src/components/03-layouts/03-resource/resource.config.js b/src/components/layouts/resource/resource.config.js similarity index 97% rename from src/components/03-layouts/03-resource/resource.config.js rename to src/components/layouts/resource/resource.config.js index a4f2abc6..5568c10c 100644 --- a/src/components/03-layouts/03-resource/resource.config.js +++ b/src/components/layouts/resource/resource.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Resource', status: 'wip', + order: 5, context: { bodyClass: 'single-lc_resource', hasMenu: true, diff --git a/src/components/03-layouts/03-resource/resource.njk b/src/components/layouts/resource/resource.njk similarity index 100% rename from src/components/03-layouts/03-resource/resource.njk rename to src/components/layouts/resource/resource.njk diff --git a/src/components/03-layouts/06-search-results/search-results.config.js b/src/components/layouts/search-results/search-results.config.js similarity index 99% rename from src/components/03-layouts/06-search-results/search-results.config.js rename to src/components/layouts/search-results/search-results.config.js index 542c3636..0efc9773 100644 --- a/src/components/03-layouts/06-search-results/search-results.config.js +++ b/src/components/layouts/search-results/search-results.config.js @@ -85,6 +85,7 @@ for ( let i = 0; i < resourceCount; i++ ) { module.exports = { title: 'Search Results', status: 'wip', + order: 6, context: { bodyClass: 'search search-results', hasMenu: true, diff --git a/src/components/03-layouts/06-search-results/search-results.njk b/src/components/layouts/search-results/search-results.njk similarity index 100% rename from src/components/03-layouts/06-search-results/search-results.njk rename to src/components/layouts/search-results/search-results.njk diff --git a/src/components/layouts/skeleton/README.md b/src/components/layouts/skeleton/README.md new file mode 100644 index 00000000..dcd922af --- /dev/null +++ b/src/components/layouts/skeleton/README.md @@ -0,0 +1,3 @@ +# Skeleton + +This component demonstrates the basic skeleton of a page. Other components should be included as per the HTML comments. diff --git a/src/components/layouts/skeleton/_preview.njk b/src/components/layouts/skeleton/_preview.njk new file mode 100644 index 00000000..6b7aca03 --- /dev/null +++ b/src/components/layouts/skeleton/_preview.njk @@ -0,0 +1 @@ +{{ yield | safe }} diff --git a/src/components/layouts/skeleton/skeleton.config.js b/src/components/layouts/skeleton/skeleton.config.js new file mode 100644 index 00000000..678b22a9 --- /dev/null +++ b/src/components/layouts/skeleton/skeleton.config.js @@ -0,0 +1,5 @@ +module.exports = { + title: 'Skeleton', + status: 'wip', + order: 1, +}; diff --git a/src/components/layouts/skeleton/skeleton.njk b/src/components/layouts/skeleton/skeleton.njk new file mode 100644 index 00000000..775fee71 --- /dev/null +++ b/src/components/layouts/skeleton/skeleton.njk @@ -0,0 +1,35 @@ + + + + + + + + + + + + + Pinecone + + + +
+
+ +
+
+
+
+
+ +
+
+
+ + + diff --git a/src/components/02-molecules/02-accordion/accordion.config.js b/src/components/molecules/accordion/accordion.config.js similarity index 97% rename from src/components/02-molecules/02-accordion/accordion.config.js rename to src/components/molecules/accordion/accordion.config.js index c63af406..e63b159a 100644 --- a/src/components/02-molecules/02-accordion/accordion.config.js +++ b/src/components/molecules/accordion/accordion.config.js @@ -14,6 +14,7 @@ for ( let i = 0; i < paneCount; i++ ) { module.exports = { title: 'Accordion', status: 'wip', + order: 7, context: { panes: paneData, standAlone: false diff --git a/src/components/02-molecules/02-accordion/accordion.njk b/src/components/molecules/accordion/accordion.njk similarity index 100% rename from src/components/02-molecules/02-accordion/accordion.njk rename to src/components/molecules/accordion/accordion.njk diff --git a/src/components/02-molecules/_brand/brand.config.js b/src/components/molecules/brand/brand.config.js similarity index 83% rename from src/components/02-molecules/_brand/brand.config.js rename to src/components/molecules/brand/brand.config.js index 7d689c0b..3712b822 100644 --- a/src/components/02-molecules/_brand/brand.config.js +++ b/src/components/molecules/brand/brand.config.js @@ -1,7 +1,9 @@ module.exports = { title: 'Brand', status: 'wip', + order: 1, context: { + inBanner: true, title: 'Platform Cooperativism Consortium', visuallyHiddenTitle: true, } diff --git a/src/components/02-molecules/_brand/brand.njk b/src/components/molecules/brand/brand.njk similarity index 100% rename from src/components/02-molecules/_brand/brand.njk rename to src/components/molecules/brand/brand.njk diff --git a/src/components/02-molecules/01-card/card--resource.njk b/src/components/molecules/card/card--resource.njk similarity index 100% rename from src/components/02-molecules/01-card/card--resource.njk rename to src/components/molecules/card/card--resource.njk diff --git a/src/components/02-molecules/01-card/card.config.js b/src/components/molecules/card/card.config.js similarity index 99% rename from src/components/02-molecules/01-card/card.config.js rename to src/components/molecules/card/card.config.js index d82132c9..9375e697 100644 --- a/src/components/02-molecules/01-card/card.config.js +++ b/src/components/molecules/card/card.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Card', status: 'wip', + order: 6, context: { title: 'Card', format: 'Card', diff --git a/src/components/02-molecules/01-card/card.njk b/src/components/molecules/card/card.njk similarity index 100% rename from src/components/02-molecules/01-card/card.njk rename to src/components/molecules/card/card.njk diff --git a/src/components/02-molecules/06-dialog/dialog.config.js b/src/components/molecules/dialog/dialog.config.js similarity index 98% rename from src/components/02-molecules/06-dialog/dialog.config.js rename to src/components/molecules/dialog/dialog.config.js index 2fc08e8b..c079bd8c 100644 --- a/src/components/02-molecules/06-dialog/dialog.config.js +++ b/src/components/molecules/dialog/dialog.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Dialog', status: 'wip', + order: 9, context: { buttonIcon: 'delete', buttonLabel: 'Remove favorite', diff --git a/src/components/02-molecules/06-dialog/dialog.njk b/src/components/molecules/dialog/dialog.njk similarity index 100% rename from src/components/02-molecules/06-dialog/dialog.njk rename to src/components/molecules/dialog/dialog.njk diff --git a/src/components/02-molecules/08-disclosure-button/disclosure-button.config.js b/src/components/molecules/disclosure-button/disclosure-button.config.js similarity index 95% rename from src/components/02-molecules/08-disclosure-button/disclosure-button.config.js rename to src/components/molecules/disclosure-button/disclosure-button.config.js index 41ed0a08..17397b50 100644 --- a/src/components/02-molecules/08-disclosure-button/disclosure-button.config.js +++ b/src/components/molecules/disclosure-button/disclosure-button.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Details', status: 'wip', + order: 11, context: { label: 'Show details', content: 'Platform cooperatives are an alternative to venture capital-funded and centralized platforms, putting stakeholders before shareholders.' diff --git a/src/components/02-molecules/08-disclosure-button/disclosure-button.njk b/src/components/molecules/disclosure-button/disclosure-button.njk similarity index 100% rename from src/components/02-molecules/08-disclosure-button/disclosure-button.njk rename to src/components/molecules/disclosure-button/disclosure-button.njk diff --git a/src/components/02-molecules/05-filter-list/filter-list.config.js b/src/components/molecules/filter-list/filter-list.config.js similarity index 99% rename from src/components/02-molecules/05-filter-list/filter-list.config.js rename to src/components/molecules/filter-list/filter-list.config.js index 3885c908..bed0c5dd 100644 --- a/src/components/02-molecules/05-filter-list/filter-list.config.js +++ b/src/components/molecules/filter-list/filter-list.config.js @@ -1,6 +1,7 @@ module.exports = { name: 'Filter List', status: 'wip', + order: 7, context: { label: 'Topics', terms: [ diff --git a/src/components/02-molecules/05-filter-list/filter-list.njk b/src/components/molecules/filter-list/filter-list.njk similarity index 100% rename from src/components/02-molecules/05-filter-list/filter-list.njk rename to src/components/molecules/filter-list/filter-list.njk diff --git a/src/components/02-molecules/11-footer/footer.config.js b/src/components/molecules/footer/footer.config.js similarity index 89% rename from src/components/02-molecules/11-footer/footer.config.js rename to src/components/molecules/footer/footer.config.js index bb5afc6c..dde153c9 100644 --- a/src/components/02-molecules/11-footer/footer.config.js +++ b/src/components/molecules/footer/footer.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Footer', status: 'wip', + order: 14, context: { hasFooter: true, inFooter: true diff --git a/src/components/02-molecules/11-footer/footer.njk b/src/components/molecules/footer/footer.njk similarity index 100% rename from src/components/02-molecules/11-footer/footer.njk rename to src/components/molecules/footer/footer.njk diff --git a/src/components/02-molecules/10-info-card/info-card.config.js b/src/components/molecules/info-card/info-card.config.js similarity index 95% rename from src/components/02-molecules/10-info-card/info-card.config.js rename to src/components/molecules/info-card/info-card.config.js index a9107464..9198fe67 100644 --- a/src/components/02-molecules/10-info-card/info-card.config.js +++ b/src/components/molecules/info-card/info-card.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Info Card', status: 'wip', + order: 6, context: { title: 'Change language', icon: 'language', diff --git a/src/components/02-molecules/10-info-card/info-card.njk b/src/components/molecules/info-card/info-card.njk similarity index 100% rename from src/components/02-molecules/10-info-card/info-card.njk rename to src/components/molecules/info-card/info-card.njk diff --git a/src/components/02-molecules/04-link-list/link-list.config.js b/src/components/molecules/link-list/link-list.config.js similarity index 97% rename from src/components/02-molecules/04-link-list/link-list.config.js rename to src/components/molecules/link-list/link-list.config.js index 1af8d34d..a8052a18 100644 --- a/src/components/02-molecules/04-link-list/link-list.config.js +++ b/src/components/molecules/link-list/link-list.config.js @@ -12,6 +12,7 @@ for ( let i = 1; i <= linkCount; i++ ) { module.exports = { title: 'Link List', status: 'wip', + order: 8, context: { standAlone: false, items: items diff --git a/src/components/02-molecules/04-link-list/link-list.njk b/src/components/molecules/link-list/link-list.njk similarity index 100% rename from src/components/02-molecules/04-link-list/link-list.njk rename to src/components/molecules/link-list/link-list.njk diff --git a/src/components/02-molecules/00-menu-button/menu-button.config.js b/src/components/molecules/menu-button/menu-button.config.js similarity index 97% rename from src/components/02-molecules/00-menu-button/menu-button.config.js rename to src/components/molecules/menu-button/menu-button.config.js index ea7236df..dadc41a3 100644 --- a/src/components/02-molecules/00-menu-button/menu-button.config.js +++ b/src/components/molecules/menu-button/menu-button.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Menu Button', status: 'wip', + order: 5, context: { standAlone: false, label: 'Sort by', diff --git a/src/components/02-molecules/00-menu-button/menu-button.njk b/src/components/molecules/menu-button/menu-button.njk similarity index 100% rename from src/components/02-molecules/00-menu-button/menu-button.njk rename to src/components/molecules/menu-button/menu-button.njk diff --git a/src/components/molecules/menu/README.md b/src/components/molecules/menu/README.md new file mode 100644 index 00000000..f2047d7d --- /dev/null +++ b/src/components/molecules/menu/README.md @@ -0,0 +1,15 @@ +# Menu + +The Menu component belongs within the `.container` inside the page header: + +```html +
+
+ +
+ + + +
+
+``` diff --git a/src/components/molecules/menu/menu.config.js b/src/components/molecules/menu/menu.config.js new file mode 100644 index 00000000..50cca1cb --- /dev/null +++ b/src/components/molecules/menu/menu.config.js @@ -0,0 +1,17 @@ +module.exports = { + title: 'Menu', + status: 'wip', + order: 5, + context: { + inBanner: true, + }, + variants: [ + { + 'name': 'home', + 'context': { + bodyClass: 'home', + modifier: 'home' + } + } + ] +}; diff --git a/src/components/molecules/menu/menu.njk b/src/components/molecules/menu/menu.njk new file mode 100644 index 00000000..0884683a --- /dev/null +++ b/src/components/molecules/menu/menu.njk @@ -0,0 +1,8 @@ +{% render '@brand' %} +
+ {% if modifier !== 'home' %} + {% render '@search-button' %} + {% render '@search-form', {standAlone: true}, true %} + {% endif %} + {% render '@nav' %} +
diff --git a/src/components/molecules/molecules.config.js b/src/components/molecules/molecules.config.js new file mode 100644 index 00000000..9d81058c --- /dev/null +++ b/src/components/molecules/molecules.config.js @@ -0,0 +1,4 @@ +module.exports = { + title: 'Molecules', + order: 2, +}; diff --git a/src/components/02-molecules/00-menu/menu.config.js b/src/components/molecules/nav/nav.config.js similarity index 89% rename from src/components/02-molecules/00-menu/menu.config.js rename to src/components/molecules/nav/nav.config.js index e9643d78..5e7c931a 100644 --- a/src/components/02-molecules/00-menu/menu.config.js +++ b/src/components/molecules/nav/nav.config.js @@ -1,6 +1,7 @@ module.exports = { - title: 'Menus', + title: 'Nav', status: 'wip', + order: 4, context: { inBanner: true, menuTitle: 'Menu', @@ -64,14 +65,5 @@ module.exports = { } } }, - }, - variants: [ - { - 'name': 'home', - 'context': { - bodyClass: 'home', - modifier: 'home' - } - } - ] + } }; diff --git a/src/components/molecules/nav/nav.njk b/src/components/molecules/nav/nav.njk new file mode 100644 index 00000000..3d27a613 --- /dev/null +++ b/src/components/molecules/nav/nav.njk @@ -0,0 +1,36 @@ + diff --git a/src/components/02-molecules/06-notification/notification.config.js b/src/components/molecules/notification/notification.config.js similarity index 98% rename from src/components/02-molecules/06-notification/notification.config.js rename to src/components/molecules/notification/notification.config.js index fb426733..892e1688 100644 --- a/src/components/02-molecules/06-notification/notification.config.js +++ b/src/components/molecules/notification/notification.config.js @@ -3,6 +3,7 @@ const faker = require( 'faker' ); module.exports = { title: 'Notification', status: 'wip', + order: 10, context: { icon: 'info', title: 'Notification', diff --git a/src/components/02-molecules/06-notification/notification.njk b/src/components/molecules/notification/notification.njk similarity index 100% rename from src/components/02-molecules/06-notification/notification.njk rename to src/components/molecules/notification/notification.njk diff --git a/src/components/02-molecules/03-pagination/pagination.config.js b/src/components/molecules/pagination/pagination.config.js similarity index 95% rename from src/components/02-molecules/03-pagination/pagination.config.js rename to src/components/molecules/pagination/pagination.config.js index 6f9bfe4f..810d3505 100644 --- a/src/components/02-molecules/03-pagination/pagination.config.js +++ b/src/components/molecules/pagination/pagination.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Pagination', status: 'wip', + order: 13, context: { contentType: 'resources', perPage: 10 diff --git a/src/components/02-molecules/03-pagination/pagination.njk b/src/components/molecules/pagination/pagination.njk similarity index 100% rename from src/components/02-molecules/03-pagination/pagination.njk rename to src/components/molecules/pagination/pagination.njk diff --git a/src/components/02-molecules/09-saved-search/saved-search.config.js b/src/components/molecules/saved-search/saved-search.config.js similarity index 95% rename from src/components/02-molecules/09-saved-search/saved-search.config.js rename to src/components/molecules/saved-search/saved-search.config.js index 84bee070..7ff7854e 100644 --- a/src/components/02-molecules/09-saved-search/saved-search.config.js +++ b/src/components/molecules/saved-search/saved-search.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Saved Search', status: 'wip', + order: 12, context: { title: 'Cooperative economy paper', searchTerm: 'Cooperative Economy', diff --git a/src/components/02-molecules/09-saved-search/saved-search.njk b/src/components/molecules/saved-search/saved-search.njk similarity index 100% rename from src/components/02-molecules/09-saved-search/saved-search.njk rename to src/components/molecules/saved-search/saved-search.njk diff --git a/src/components/molecules/search-button/search-button.config.js b/src/components/molecules/search-button/search-button.config.js new file mode 100644 index 00000000..096738f6 --- /dev/null +++ b/src/components/molecules/search-button/search-button.config.js @@ -0,0 +1,5 @@ +module.exports = { + title: 'Search Button', + status: 'wip', + order: 2 +}; diff --git a/src/components/molecules/search-button/search-button.njk b/src/components/molecules/search-button/search-button.njk new file mode 100644 index 00000000..b34cc00f --- /dev/null +++ b/src/components/molecules/search-button/search-button.njk @@ -0,0 +1 @@ + diff --git a/src/components/02-molecules/07-search/search.config.js b/src/components/molecules/search-form/search-form.config.js similarity index 93% rename from src/components/02-molecules/07-search/search.config.js rename to src/components/molecules/search-form/search-form.config.js index 0e6a706e..08a12712 100644 --- a/src/components/02-molecules/07-search/search.config.js +++ b/src/components/molecules/search-form/search-form.config.js @@ -1,6 +1,7 @@ module.exports = { - title: 'Search', + title: 'Search Form', status: 'wip', + order: 3, context: { standAlone: false, name: 's', diff --git a/src/components/02-molecules/07-search/search.njk b/src/components/molecules/search-form/search-form.njk similarity index 100% rename from src/components/02-molecules/07-search/search.njk rename to src/components/molecules/search-form/search-form.njk From ece5c6e6004517b78bd7f05fd49bc5593572144f Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Wed, 19 Feb 2020 15:37:47 -0700 Subject: [PATCH 2/8] chore(docs): friendlier link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 29948fbb..7e506333 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ Pinecone is a pattern library for the Platform Cooperative Development Kit. -[Read the docs!](https://pinecone.platform.coop/) +[Read the docs →](https://pinecone.platform.coop/) From df9d69eee19b87a7678ca3af28b71c27778c6531 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Wed, 19 Feb 2020 16:00:12 -0700 Subject: [PATCH 3/8] chore(docs): add instructions for use with Sage 10 --- src/docs/usage/sage.md | 75 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/src/docs/usage/sage.md b/src/docs/usage/sage.md index fff2d89f..e2c00a7d 100644 --- a/src/docs/usage/sage.md +++ b/src/docs/usage/sage.md @@ -1,3 +1,76 @@ # Using Pinecone in a Sage Project -TODO. +This document assumes that you are using [Sage 10](https://github.com/roots/sage/tree/10.0.0-dev). + +## Prerequisites + +1. Install [Node.js and npm](https://nodejs.org/en/download/). + +2. [Create a package.json](https://docs.npmjs.com/creating-a-package-json-file) file in your project. + +## Installation + +Pinecone must be installed from [GitHub Packages](https://github.com/features/packages). In order to add Pinecone to your project, you'll need to complete the following steps: + +1. [Authenticate to GitHub Packages](https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#authenticating-to-github-packages). + +2. In your project directory, create a file named `.npmrc` with the following contents: + + ```bash + registry=https://npm.pkg.github.com/platform-coop-toolkit + ``` + +3. Install Pinecone: + + ```bash + npm install --save @platform-coop-toolkit/pinecone + ``` + +## Build Configuration + +[Sage 10](https://github.com/roots/sage/tree/10.0.0-dev) uses [Laravel Mix](https://laravel-mix.com). To use Pinecone, your `webpack.mix.js` file should look like this: + +```javascript +const mix = require('laravel-mix'); + +mix.setPublicPath('./dist') + .browserSync('pinecone.test'); // Replace this with your local development URL. + +mix.sass('resources/assets/styles/main.scss', 'styles', { + sassOptions: { + includePaths: [path.join(__dirname, 'node_modules')], + }, +}); + +mix.js('resources/assets/scripts/main.js', 'scripts') + .extract(); + +mix.copy('resources/assets/images', 'dist/images') + .copy('resources/assets/fonts', 'dist/fonts') + .copy('node_modules/@platform-coop-toolkit/pinecone/src/assets/images', 'dist/images') + .copy('node_modules/@platform-coop-toolkit/pinecone/src/assets/fonts', 'dist/fonts'); + +mix.options({ + processCssUrls: false, +}); +``` + +### Sass + +At the top of `resources/assets/styles/main.scss`, add the following line: + +```scss +@import "~@platform-coop-toolkit/pinecone"; +``` + +Pinecone's component styles, Sass functions and utility classes will now be available for use within your theme's Sass. + +### JavaScript + +At the top of `resources/assets/scripts/main.js`, add the following line: + +```javascript +import Pinecone from '@platform-coop-toolkit/pinecone'; +``` + +Pinecone's JavaScript classes will now be available for use within your theme's JavaScript. From 6d99dea3abebed78b974b6dd4e59dcdd50b7695f Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Wed, 19 Feb 2020 16:00:24 -0700 Subject: [PATCH 4/8] chore(docs): add instructions for use with Sage 10 --- src/docs/usage/sage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/usage/sage.md b/src/docs/usage/sage.md index e2c00a7d..0bcf979c 100644 --- a/src/docs/usage/sage.md +++ b/src/docs/usage/sage.md @@ -1,4 +1,4 @@ -# Using Pinecone in a Sage Project +# Using Pinecone in a Sage 10 Project This document assumes that you are using [Sage 10](https://github.com/roots/sage/tree/10.0.0-dev). From 2afc08d155b1f0ed849f0d364e6a313e6253059c Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Wed, 19 Feb 2020 16:00:40 -0700 Subject: [PATCH 5/8] chore(docs): add instructions for use with Sage 10 --- src/docs/01-index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/01-index.md b/src/docs/01-index.md index 1d0020da..978b1d61 100644 --- a/src/docs/01-index.md +++ b/src/docs/01-index.md @@ -37,4 +37,4 @@ Pinecone is built and deployed automatically to [Netlify](https://netlify.com/) ## Usage - [Django](/docs/usage/django.html) -- [Sage (WordPress)](docs/usage/wordpress.html) +- [Sage 10 (WordPress)](docs/usage/wordpress.html) From 9c30b8c62481f3d242e516c666bebe92fcaec110 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Thu, 20 Feb 2020 07:57:46 -0700 Subject: [PATCH 6/8] fix: resolve #253 --- src/assets/scripts/Pinecone/NestedCheckbox/index.js | 6 +++--- src/components/atoms/button/button.njk | 2 +- src/components/layouts/archive/archive.njk | 2 +- src/components/layouts/search-results/search-results.njk | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/assets/scripts/Pinecone/NestedCheckbox/index.js b/src/assets/scripts/Pinecone/NestedCheckbox/index.js index 563faf0e..84da196e 100644 --- a/src/assets/scripts/Pinecone/NestedCheckbox/index.js +++ b/src/assets/scripts/Pinecone/NestedCheckbox/index.js @@ -51,8 +51,8 @@ class NestedCheckbox { supplementaryLabel.classList.add( 'screen-reader-text' ); supplementaryLabel.hidden = false; this.input.parentNode.insertBefore( customCheckbox, this.input ); - this.input.setAttribute( 'type', 'hidden' ); - this.input.setAttribute( 'value', status ? this.value : '' ); + this.input.classList.add( 'screen-reader-text' ); + this.input.setAttribute( 'aria-hidden', 'true' ); this.label.hidden = true; this.customCheckbox = customCheckbox; } @@ -72,7 +72,7 @@ class NestedCheckbox { toggleMixedCheckbox( ctrl ) { const state = 'true' === ctrl.getAttribute( 'aria-checked' ) || false; ctrl.setAttribute( 'aria-checked', !state ); - this.input.setAttribute( 'value', !state ? this.value : '' ); + this.input.checked = !state; Array.prototype.forEach.call( this.subInputs, checkbox => { checkbox.checked = !state; } ); diff --git a/src/components/atoms/button/button.njk b/src/components/atoms/button/button.njk index e0b163c7..89daf7cd 100644 --- a/src/components/atoms/button/button.njk +++ b/src/components/atoms/button/button.njk @@ -1,4 +1,4 @@ {% if not standAlone %}
{% endif %} - diff --git a/src/components/layouts/archive/archive.njk b/src/components/layouts/archive/archive.njk index 0c5fa8dc..d148c287 100644 --- a/src/components/layouts/archive/archive.njk +++ b/src/components/layouts/archive/archive.njk @@ -12,7 +12,7 @@ {% render '@filter-list', {standAlone: true, label: filterList.label, terms: filterList.terms}, true %} {% endfor %} - {% render '@submit', {standAlone: true, value: 'Apply filters', id: 'apply-filters'} %} + {% render '@submit', {standAlone: true, label: 'Apply filters', id: 'apply-filters'}, true %}
diff --git a/src/components/layouts/search-results/search-results.njk b/src/components/layouts/search-results/search-results.njk index 0abe88a8..63c0522d 100644 --- a/src/components/layouts/search-results/search-results.njk +++ b/src/components/layouts/search-results/search-results.njk @@ -12,7 +12,7 @@ {% render '@filter-list', {standAlone: true, label: filterList.label, terms: filterList.terms}, true %} {% endfor %}
- {% render '@submit', {standAlone: true, value: 'Apply filters', id: 'apply-filters'} %} + {% render '@submit', {standAlone: true, label: 'Apply filters', id: 'apply-filters'}, true %}
From 7280ee429edfef075c2d91cddbd1814eb0452a6a Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Thu, 20 Feb 2020 08:31:37 -0700 Subject: [PATCH 7/8] chore: remove build from GitHub actions --- .github/workflows/main.yml | 5 ++--- .github/workflows/publish-package.yml | 18 ------------------ 2 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/publish-package.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 99ab2316..97bd027b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Test and build +name: Run tests on: [push] @@ -12,10 +12,9 @@ jobs: with: path: node_modules key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} - - name: npm install, build, and lint + - name: npm install and test run: | npm install - npm run build npm test env: CI: true diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml deleted file mode 100644 index c49c72bc..00000000 --- a/.github/workflows/publish-package.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Publish package -on: - release: - types: [created] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com - scope: '@platform-coop-toolkit' - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From dbe3012ad26e79ab656b357094b240fff499da48 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Thu, 20 Feb 2020 08:33:04 -0700 Subject: [PATCH 8/8] chore: update Node.js required version to LTS --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ed2483bc..47f1e6ec 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "src/assets/fonts" ], "engines": { - "node": ">=10.16.3" + "node": ">=12.16.1" }, "dependencies": { "popper.js": "^1.16.1",