@tmorrow/cre8-wc 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/cre8-wc.esm.js +1 -1
- package/cdn/cre8-wc.esm.js.map +1 -1
- package/cdn/cre8-wc.min.js +1 -1
- package/cdn/cre8-wc.min.js.map +1 -1
- package/lib/cdn-entry.js +129 -0
- package/lib/cdn-entry.js.map +1 -0
- package/lib/components/accordion/accordion.js +58 -40
- package/lib/components/accordion/accordion.js.map +1 -0
- package/lib/components/accordion/accordion.styles.js +4 -0
- package/lib/components/accordion/accordion.styles.js.map +1 -0
- package/lib/components/accordion-item/accordion-item.js +187 -98
- package/lib/components/accordion-item/accordion-item.js.map +1 -0
- package/lib/components/accordion-item/accordion-item.styles.js +4 -0
- package/lib/components/accordion-item/accordion-item.styles.js.map +1 -0
- package/lib/components/alert/alert.js +146 -107
- package/lib/components/alert/alert.js.map +1 -0
- package/lib/components/alert/alert.styles.js +4 -0
- package/lib/components/alert/alert.styles.js.map +1 -0
- package/lib/components/badge/badge.js +73 -50
- package/lib/components/badge/badge.js.map +1 -0
- package/lib/components/badge/badge.styles.js +4 -0
- package/lib/components/badge/badge.styles.js.map +1 -0
- package/lib/components/band/band.js +34 -31
- package/lib/components/band/band.js.map +1 -0
- package/lib/components/band/band.styles.js +4 -0
- package/lib/components/band/band.styles.js.map +1 -0
- package/lib/components/breadcrumbs/breadcrumbs.js +52 -28
- package/lib/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/lib/components/breadcrumbs/breadcrumbs.styles.js +4 -0
- package/lib/components/breadcrumbs/breadcrumbs.styles.js.map +1 -0
- package/lib/components/breadcrumbs-item/breadcrumbs-item.js +28 -27
- package/lib/components/breadcrumbs-item/breadcrumbs-item.js.map +1 -0
- package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.js +4 -0
- package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.js.map +1 -0
- package/lib/components/button/button.js +297 -1040
- package/lib/components/button/button.js.map +1 -0
- package/lib/components/button/button.styles.js +885 -0
- package/lib/components/button/button.styles.js.map +1 -0
- package/lib/components/button-group/button-group.js +30 -27
- package/lib/components/button-group/button-group.js.map +1 -0
- package/lib/components/button-group/button-group.styles.js +4 -0
- package/lib/components/button-group/button-group.styles.js.map +1 -0
- package/lib/components/card/card.js +57 -35
- package/lib/components/card/card.js.map +1 -0
- package/lib/components/card/card.styles.js +4 -0
- package/lib/components/card/card.styles.js.map +1 -0
- package/lib/components/chart/chart.js +528 -354
- package/lib/components/chart/chart.js.map +1 -0
- package/lib/components/chart/chart.styles.js +4 -0
- package/lib/components/chart/chart.styles.js.map +1 -0
- package/lib/components/checkbox-field/checkbox-field.js +66 -53
- package/lib/components/checkbox-field/checkbox-field.js.map +1 -0
- package/lib/components/checkbox-field/checkbox-field.styles.js +4 -0
- package/lib/components/checkbox-field/checkbox-field.styles.js.map +1 -0
- package/lib/components/checkbox-field-item/checkbox-field-item.js +252 -183
- package/lib/components/checkbox-field-item/checkbox-field-item.js.map +1 -0
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.js +4 -0
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.js.map +1 -0
- package/lib/components/contexts/form-internals-context.js +9 -0
- package/lib/components/contexts/form-internals-context.js.map +1 -0
- package/lib/components/cre8-element.js +57 -56
- package/lib/components/cre8-element.js.map +1 -0
- package/lib/components/cre8-form-element.js +212 -244
- package/lib/components/cre8-form-element.js.map +1 -0
- package/lib/components/danger-button/danger-button.js +274 -147
- package/lib/components/danger-button/danger-button.js.map +1 -0
- package/lib/components/danger-button/danger-button.styles.js +4 -0
- package/lib/components/danger-button/danger-button.styles.js.map +1 -0
- package/lib/components/date-picker/calendar/calendar.js +465 -0
- package/lib/components/date-picker/calendar/calendar.js.map +1 -0
- package/lib/components/date-picker/calendar/calendar.styles.js +4 -0
- package/lib/components/date-picker/calendar/calendar.styles.js.map +1 -0
- package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.js +76 -0
- package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.js.map +1 -0
- package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.js +4 -0
- package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.js.map +1 -0
- package/lib/components/date-picker/calendar-navigation/calendar-navigation.js +110 -0
- package/lib/components/date-picker/calendar-navigation/calendar-navigation.js.map +1 -0
- package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.js +4 -0
- package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.js.map +1 -0
- package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.js +116 -0
- package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.js.map +1 -0
- package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.js +4 -0
- package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.js.map +1 -0
- package/lib/components/date-picker/date-picker.js +91 -784
- package/lib/components/date-picker/date-picker.js.map +1 -0
- package/lib/components/date-picker/date-picker.styles.js +4 -0
- package/lib/components/date-picker/date-picker.styles.js.map +1 -0
- package/lib/components/divider/divider.js +45 -35
- package/lib/components/divider/divider.js.map +1 -0
- package/lib/components/divider/divider.styles.js +4 -0
- package/lib/components/divider/divider.styles.js.map +1 -0
- package/lib/components/dropdown/dropdown.js +97 -63
- package/lib/components/dropdown/dropdown.js.map +1 -0
- package/lib/components/dropdown/dropdown.styles.js +4 -0
- package/lib/components/dropdown/dropdown.styles.js.map +1 -0
- package/lib/components/dropdown-item/dropdown-item.js +38 -31
- package/lib/components/dropdown-item/dropdown-item.js.map +1 -0
- package/lib/components/dropdown-item/dropdown-item.styles.js +4 -0
- package/lib/components/dropdown-item/dropdown-item.styles.js.map +1 -0
- package/lib/components/feature/feature.js +40 -35
- package/lib/components/feature/feature.js.map +1 -0
- package/lib/components/feature/feature.styles.js +4 -0
- package/lib/components/feature/feature.styles.js.map +1 -0
- package/lib/components/field/field.js +218 -153
- package/lib/components/field/field.js.map +1 -0
- package/lib/components/field/field.styles.js +4 -0
- package/lib/components/field/field.styles.js.map +1 -0
- package/lib/components/field-note/field-note.js +58 -45
- package/lib/components/field-note/field-note.js.map +1 -0
- package/lib/components/field-note/field-note.styles.js +4 -0
- package/lib/components/field-note/field-note.styles.js.map +1 -0
- package/lib/components/footer/footer.js +25 -18
- package/lib/components/footer/footer.js.map +1 -0
- package/lib/components/footer/footer.styles.js +4 -0
- package/lib/components/footer/footer.styles.js.map +1 -0
- package/lib/components/global-nav/global-nav.js +44 -37
- package/lib/components/global-nav/global-nav.js.map +1 -0
- package/lib/components/global-nav/global-nav.styles.js +4 -0
- package/lib/components/global-nav/global-nav.styles.js.map +1 -0
- package/lib/components/global-nav-item/global-nav-item.js +149 -112
- package/lib/components/global-nav-item/global-nav-item.js.map +1 -0
- package/lib/components/global-nav-item/global-nav-item.styles.js +4 -0
- package/lib/components/global-nav-item/global-nav-item.styles.js.map +1 -0
- package/lib/components/grid/grid.js +48 -45
- package/lib/components/grid/grid.js.map +1 -0
- package/lib/components/grid/grid.styles.js +4 -0
- package/lib/components/grid/grid.styles.js.map +1 -0
- package/lib/components/grid-item/grid-item.js +19 -16
- package/lib/components/grid-item/grid-item.js.map +1 -0
- package/lib/components/grid-item/grid-item.styles.js +4 -0
- package/lib/components/grid-item/grid-item.styles.js.map +1 -0
- package/lib/components/header/header.js +34 -29
- package/lib/components/header/header.js.map +1 -0
- package/lib/components/header/header.styles.js +4 -0
- package/lib/components/header/header.styles.js.map +1 -0
- package/lib/components/heading/heading.js +113 -76
- package/lib/components/heading/heading.js.map +1 -0
- package/lib/components/heading/heading.styles.js +4 -0
- package/lib/components/heading/heading.styles.js.map +1 -0
- package/lib/components/hero/hero.js +43 -40
- package/lib/components/hero/hero.js.map +1 -0
- package/lib/components/hero/hero.styles.js +4 -0
- package/lib/components/hero/hero.styles.js.map +1 -0
- package/lib/components/icon/icon.js +232 -9
- package/lib/components/icon/icon.js.map +1 -0
- package/lib/components/icon/icon.styles.js +4 -0
- package/lib/components/icon/icon.styles.js.map +1 -0
- package/lib/components/inline-alert/inline-alert.js +114 -87
- package/lib/components/inline-alert/inline-alert.js.map +1 -0
- package/lib/components/inline-alert/inline-alert.styles.js +4 -0
- package/lib/components/inline-alert/inline-alert.styles.js.map +1 -0
- package/lib/components/layout/layout.js +30 -27
- package/lib/components/layout/layout.js.map +1 -0
- package/lib/components/layout/layout.styles.js +4 -0
- package/lib/components/layout/layout.styles.js.map +1 -0
- package/lib/components/layout-container/layout-container.js +30 -27
- package/lib/components/layout-container/layout-container.js.map +1 -0
- package/lib/components/layout-container/layout-container.styles.js +4 -0
- package/lib/components/layout-container/layout-container.styles.js.map +1 -0
- package/lib/components/layout-section/layout-section.js +41 -33
- package/lib/components/layout-section/layout-section.js.map +1 -0
- package/lib/components/layout-section/layout-section.styles.js +4 -0
- package/lib/components/layout-section/layout-section.styles.js.map +1 -0
- package/lib/components/linelength-container/linelength-container.js +19 -16
- package/lib/components/linelength-container/linelength-container.js.map +1 -0
- package/lib/components/linelength-container/linelength-container.styles.js +4 -0
- package/lib/components/linelength-container/linelength-container.styles.js.map +1 -0
- package/lib/components/link/link.js +125 -87
- package/lib/components/link/link.js.map +1 -0
- package/lib/components/link/link.styles.js +4 -0
- package/lib/components/link/link.styles.js.map +1 -0
- package/lib/components/link-list/link-list.js +48 -45
- package/lib/components/link-list/link-list.js.map +1 -0
- package/lib/components/link-list/link-list.styles.js +4 -0
- package/lib/components/link-list/link-list.styles.js.map +1 -0
- package/lib/components/link-list-item/link-list-item.js +40 -37
- package/lib/components/link-list-item/link-list-item.js.map +1 -0
- package/lib/components/link-list-item/link-list-item.styles.js +4 -0
- package/lib/components/link-list-item/link-list-item.styles.js.map +1 -0
- package/lib/components/list/list.js +35 -32
- package/lib/components/list/list.js.map +1 -0
- package/lib/components/list/list.styles.js +4 -0
- package/lib/components/list/list.styles.js.map +1 -0
- package/lib/components/list-item/list-item.js +25 -21
- package/lib/components/list-item/list-item.js.map +1 -0
- package/lib/components/list-item/list-item.styles.js +4 -0
- package/lib/components/list-item/list-item.styles.js.map +1 -0
- package/lib/components/loading-spinner/loading-spinner.js +126 -71
- package/lib/components/loading-spinner/loading-spinner.js.map +1 -0
- package/lib/components/loading-spinner/loading-spinner.styles.js +4 -0
- package/lib/components/loading-spinner/loading-spinner.styles.js.map +1 -0
- package/lib/components/logo/logo.js +28 -25
- package/lib/components/logo/logo.js.map +1 -0
- package/lib/components/logo/logo.styles.js +4 -0
- package/lib/components/logo/logo.styles.js.map +1 -0
- package/lib/components/main/main.js +29 -26
- package/lib/components/main/main.js.map +1 -0
- package/lib/components/main/main.styles.js +4 -0
- package/lib/components/main/main.styles.js.map +1 -0
- package/lib/components/modal/modal.js +174 -125
- package/lib/components/modal/modal.js.map +1 -0
- package/lib/components/modal/modal.styles.js +4 -0
- package/lib/components/modal/modal.styles.js.map +1 -0
- package/lib/components/multi-select/multi-select.js +300 -211
- package/lib/components/multi-select/multi-select.js.map +1 -0
- package/lib/components/multi-select/multi-select.styles.js +4 -0
- package/lib/components/multi-select/multi-select.styles.js.map +1 -0
- package/lib/components/nav-container/nav-container.js +19 -16
- package/lib/components/nav-container/nav-container.js.map +1 -0
- package/lib/components/nav-container/nav-container.styles.js +4 -0
- package/lib/components/nav-container/nav-container.styles.js.map +1 -0
- package/lib/components/page-header/page-header.js +36 -29
- package/lib/components/page-header/page-header.js.map +1 -0
- package/lib/components/page-header/page-header.styles.js +4 -0
- package/lib/components/page-header/page-header.styles.js.map +1 -0
- package/lib/components/pagination/page-counter/page-counter.js +67 -0
- package/lib/components/pagination/page-counter/page-counter.js.map +1 -0
- package/lib/components/pagination/page-counter/page-counter.styles.js +4 -0
- package/lib/components/pagination/page-counter/page-counter.styles.js.map +1 -0
- package/lib/components/pagination/pagination.js +282 -237
- package/lib/components/pagination/pagination.js.map +1 -0
- package/lib/components/pagination/pagination.styles.js +4 -0
- package/lib/components/pagination/pagination.styles.js.map +1 -0
- package/lib/components/percent-bar/percent-bar.js +56 -48
- package/lib/components/percent-bar/percent-bar.js.map +1 -0
- package/lib/components/percent-bar/percent-bar.styles.js +4 -0
- package/lib/components/percent-bar/percent-bar.styles.js.map +1 -0
- package/lib/components/popover/popover.js +304 -179
- package/lib/components/popover/popover.js.map +1 -0
- package/lib/components/popover/popover.styles.js +4 -0
- package/lib/components/popover/popover.styles.js.map +1 -0
- package/lib/components/primary-nav/primary-nav.js +44 -37
- package/lib/components/primary-nav/primary-nav.js.map +1 -0
- package/lib/components/primary-nav/primary-nav.styles.js +4 -0
- package/lib/components/primary-nav/primary-nav.styles.js.map +1 -0
- package/lib/components/primary-nav-item/primary-nav-item.js +151 -113
- package/lib/components/primary-nav-item/primary-nav-item.js.map +1 -0
- package/lib/components/primary-nav-item/primary-nav-item.styles.js +4 -0
- package/lib/components/primary-nav-item/primary-nav-item.styles.js.map +1 -0
- package/lib/components/progress-meter/progress-meter.js +74 -57
- package/lib/components/progress-meter/progress-meter.js.map +1 -0
- package/lib/components/progress-meter/progress-meter.styles.js +4 -0
- package/lib/components/progress-meter/progress-meter.styles.js.map +1 -0
- package/lib/components/progress-steps/progress-steps.js +19 -0
- package/lib/components/progress-steps/progress-steps.js.map +1 -0
- package/lib/components/progress-steps/progress-steps.styles.js +4 -0
- package/lib/components/progress-steps/progress-steps.styles.js.map +1 -0
- package/lib/components/progress-steps-item/progress-steps-item.js +52 -40
- package/lib/components/progress-steps-item/progress-steps-item.js.map +1 -0
- package/lib/components/progress-steps-item/progress-steps-item.styles.js +4 -0
- package/lib/components/progress-steps-item/progress-steps-item.styles.js.map +1 -0
- package/lib/components/radio-field/radio-field.js +59 -49
- package/lib/components/radio-field/radio-field.js.map +1 -0
- package/lib/components/radio-field/radio-field.styles.js +4 -0
- package/lib/components/radio-field/radio-field.styles.js.map +1 -0
- package/lib/components/radio-field-item/radio-field-item.js +222 -179
- package/lib/components/radio-field-item/radio-field-item.js.map +1 -0
- package/lib/components/radio-field-item/radio-field-item.styles.js +4 -0
- package/lib/components/radio-field-item/radio-field-item.styles.js.map +1 -0
- package/lib/components/remove-tag/remove-tag.js +89 -60
- package/lib/components/remove-tag/remove-tag.js.map +1 -0
- package/lib/components/remove-tag/remove-tag.styles.js +4 -0
- package/lib/components/remove-tag/remove-tag.styles.js.map +1 -0
- package/lib/components/section/section.js +46 -27
- package/lib/components/section/section.js.map +1 -0
- package/lib/components/section/section.styles.js +4 -0
- package/lib/components/section/section.styles.js.map +1 -0
- package/lib/components/select/select.js +243 -158
- package/lib/components/select/select.js.map +1 -0
- package/lib/components/select/select.styles.js +4 -0
- package/lib/components/select/select.styles.js.map +1 -0
- package/lib/components/select-tile/select-tile-checkbox-controller.js +60 -0
- package/lib/components/select-tile/select-tile-checkbox-controller.js.map +1 -0
- package/lib/components/select-tile/select-tile-radio-controller.js +167 -0
- package/lib/components/select-tile/select-tile-radio-controller.js.map +1 -0
- package/lib/components/select-tile/select-tile.js +228 -223
- package/lib/components/select-tile/select-tile.js.map +1 -0
- package/lib/components/select-tile/select-tile.styles.js +4 -0
- package/lib/components/select-tile/select-tile.styles.js.map +1 -0
- package/lib/components/select-tile-list/select-tile-list.js +76 -62
- package/lib/components/select-tile-list/select-tile-list.js.map +1 -0
- package/lib/components/select-tile-list/select-tile-list.styles.js +4 -0
- package/lib/components/select-tile-list/select-tile-list.styles.js.map +1 -0
- package/lib/components/skeleton-loader/skeleton-loader.js +68 -39
- package/lib/components/skeleton-loader/skeleton-loader.js.map +1 -0
- package/lib/components/skeleton-loader/skeleton-loader.styles.js +4 -0
- package/lib/components/skeleton-loader/skeleton-loader.styles.js.map +1 -0
- package/lib/components/split-button/split-button.js +51 -46
- package/lib/components/split-button/split-button.js.map +1 -0
- package/lib/components/split-button/split-button.styles.js +4 -0
- package/lib/components/split-button/split-button.styles.js.map +1 -0
- package/lib/components/submenu/submenu.js +19 -16
- package/lib/components/submenu/submenu.js.map +1 -0
- package/lib/components/submenu/submenu.styles.js +4 -0
- package/lib/components/submenu/submenu.styles.js.map +1 -0
- package/lib/components/submenu-item/submenu-item.js +32 -26
- package/lib/components/submenu-item/submenu-item.js.map +1 -0
- package/lib/components/submenu-item/submenu-item.styles.js +4 -0
- package/lib/components/submenu-item/submenu-item.styles.js.map +1 -0
- package/lib/components/tab/tab.js +74 -63
- package/lib/components/tab/tab.js.map +1 -0
- package/lib/components/tab/tab.styles.js +4 -0
- package/lib/components/tab/tab.styles.js.map +1 -0
- package/lib/components/tab-panel/tab-panel.js +49 -43
- package/lib/components/tab-panel/tab-panel.js.map +1 -0
- package/lib/components/tab-panel/tab-panel.styles.js +4 -0
- package/lib/components/tab-panel/tab-panel.styles.js.map +1 -0
- package/lib/components/table/table.js +46 -41
- package/lib/components/table/table.js.map +1 -0
- package/lib/components/table/table.styles.js +4 -0
- package/lib/components/table/table.styles.js.map +1 -0
- package/lib/components/table-body/table-body.js +20 -17
- package/lib/components/table-body/table-body.js.map +1 -0
- package/lib/components/table-body/table-body.styles.js +4 -0
- package/lib/components/table-body/table-body.styles.js.map +1 -0
- package/lib/components/table-cell/table-cell.js +39 -36
- package/lib/components/table-cell/table-cell.js.map +1 -0
- package/lib/components/table-cell/table-cell.styles.js +4 -0
- package/lib/components/table-cell/table-cell.styles.js.map +1 -0
- package/lib/components/table-header/table-header.js +20 -17
- package/lib/components/table-header/table-header.js.map +1 -0
- package/lib/components/table-header/table-header.styles.js +4 -0
- package/lib/components/table-header/table-header.styles.js.map +1 -0
- package/lib/components/table-header-cell/table-header-cell.js +35 -32
- package/lib/components/table-header-cell/table-header-cell.js.map +1 -0
- package/lib/components/table-header-cell/table-header-cell.styles.js +4 -0
- package/lib/components/table-header-cell/table-header-cell.styles.js.map +1 -0
- package/lib/components/table-object/table-object.js +21 -18
- package/lib/components/table-object/table-object.js.map +1 -0
- package/lib/components/table-object/table-object.styles.js +4 -0
- package/lib/components/table-object/table-object.styles.js.map +1 -0
- package/lib/components/table-row/table-row.js +76 -55
- package/lib/components/table-row/table-row.js.map +1 -0
- package/lib/components/table-row/table-row.styles.js +4 -0
- package/lib/components/table-row/table-row.styles.js.map +1 -0
- package/lib/components/tabs/tabs.js +452 -303
- package/lib/components/tabs/tabs.js.map +1 -0
- package/lib/components/tabs/tabs.styles.js +4 -0
- package/lib/components/tabs/tabs.styles.js.map +1 -0
- package/lib/components/tag/tag.js +236 -167
- package/lib/components/tag/tag.js.map +1 -0
- package/lib/components/tag/tag.styles.js +4 -0
- package/lib/components/tag/tag.styles.js.map +1 -0
- package/lib/components/tag-list/tag-list.js +40 -35
- package/lib/components/tag-list/tag-list.js.map +1 -0
- package/lib/components/tag-list/tag-list.styles.js +4 -0
- package/lib/components/tag-list/tag-list.styles.js.map +1 -0
- package/lib/components/tertiary-nav/tertiary-nav.js +40 -33
- package/lib/components/tertiary-nav/tertiary-nav.js.map +1 -0
- package/lib/components/tertiary-nav/tertiary-nav.styles.js +4 -0
- package/lib/components/tertiary-nav/tertiary-nav.styles.js.map +1 -0
- package/lib/components/tertiary-nav-item/tertiary-nav-item.js +52 -43
- package/lib/components/tertiary-nav-item/tertiary-nav-item.js.map +1 -0
- package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.js +4 -0
- package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.js.map +1 -0
- package/lib/components/text-link/text-link.js +45 -41
- package/lib/components/text-link/text-link.js.map +1 -0
- package/lib/components/text-link/text-link.styles.js +4 -0
- package/lib/components/text-link/text-link.styles.js.map +1 -0
- package/lib/components/text-passage/text-passage-light-dom.js +145 -0
- package/lib/components/text-passage/text-passage-light-dom.js.map +1 -0
- package/lib/components/text-passage/text-passage-light-dom.styles.js +4 -0
- package/lib/components/text-passage/text-passage-light-dom.styles.js.map +1 -0
- package/lib/components/text-passage/text-passage.js +72 -44
- package/lib/components/text-passage/text-passage.js.map +1 -0
- package/lib/components/text-passage/text-passage.styles.js +4 -0
- package/lib/components/text-passage/text-passage.styles.js.map +1 -0
- package/lib/components/tooltip/tooltip.js +278 -173
- package/lib/components/tooltip/tooltip.js.map +1 -0
- package/lib/components/tooltip/tooltip.styles.js +4 -0
- package/lib/components/tooltip/tooltip.styles.js.map +1 -0
- package/lib/components/utility-nav/utility-nav.js +40 -33
- package/lib/components/utility-nav/utility-nav.js.map +1 -0
- package/lib/components/utility-nav/utility-nav.styles.js +4 -0
- package/lib/components/utility-nav/utility-nav.styles.js.map +1 -0
- package/lib/components/utility-nav-item/utility-nav-item.js +70 -49
- package/lib/components/utility-nav-item/utility-nav-item.js.map +1 -0
- package/lib/components/utility-nav-item/utility-nav-item.styles.js +4 -0
- package/lib/components/utility-nav-item/utility-nav-item.styles.js.map +1 -0
- package/lib/design-tokens/brands/blue/css/tokens_blue.module.js +737 -0
- package/lib/design-tokens/brands/blue/css/tokens_blue.module.js.map +1 -0
- package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js +756 -0
- package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js.map +1 -0
- package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js +771 -0
- package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js.map +1 -0
- package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js +772 -0
- package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js.map +1 -0
- package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js +737 -0
- package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js.map +1 -0
- package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js +983 -0
- package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js.map +1 -0
- package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js +737 -0
- package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js.map +1 -0
- package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js +736 -0
- package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js.map +1 -0
- package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js +737 -0
- package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js.map +1 -0
- package/lib/design-tokens/brands/prisma/tokens_prisma.module.js +771 -0
- package/lib/design-tokens/brands/prisma/tokens_prisma.module.js.map +1 -0
- package/lib/design-tokens/brands/starbucks/tokens.module.js +552 -0
- package/lib/design-tokens/brands/starbucks/tokens.module.js.map +1 -0
- package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js +776 -0
- package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js.map +1 -0
- package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.js +253 -0
- package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.js.map +1 -0
- package/lib/design-tokens/core/scss/theming/head.module.js +6 -0
- package/lib/design-tokens/core/scss/theming/head.module.js.map +1 -0
- package/lib/design-tokens/tokens_netflix.theme.js +806 -0
- package/lib/design-tokens/tokens_netflix.theme.js.map +1 -0
- package/lib/directives/if-truthy.js +24 -0
- package/lib/directives/if-truthy.js.map +1 -0
- package/lib/directives/spread.js +29 -0
- package/lib/directives/spread.js.map +1 -0
- package/lib/index.js +84 -168
- package/lib/index.js.map +1 -0
- package/lib/scripts/convert-scss-to-ts.js +25 -0
- package/lib/scripts/convert-scss-to-ts.js.map +1 -0
- package/lib/scripts/extract-tokens.js +120 -0
- package/lib/scripts/extract-tokens.js.map +1 -0
- package/lib/scripts/generate-react-wrappers.js +229 -0
- package/lib/scripts/generate-react-wrappers.js.map +1 -0
- package/lib/scripts/generateWesparkleThemes.js +52 -0
- package/lib/scripts/generateWesparkleThemes.js.map +1 -0
- package/lib/toBeAccessible.js +18 -0
- package/lib/toBeAccessible.js.map +1 -0
- package/lib/utilities/is-mobile.js +10 -0
- package/lib/utilities/is-mobile.js.map +1 -0
- package/lib/utilities/story-helpers.js +14 -0
- package/lib/utilities/story-helpers.js.map +1 -0
- package/lib/vite.config.cdn.js +85 -0
- package/lib/vite.config.cdn.js.map +1 -0
- package/lib/vite.config.js +156 -0
- package/lib/vite.config.js.map +1 -0
- package/package.json +8 -9
|
@@ -1,43 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var e = void 0, i = d.length - 1, o; i >= 0; i--)
|
|
7
|
-
(o = d[i]) && (e = o(t, l, e) || e);
|
|
8
|
-
return e && f(t, l, e), e;
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
6
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
import { html, } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { Cre8Element } from '../cre8-element';
|
|
10
|
+
import styles from './primary-nav.styles.js';
|
|
11
|
+
/**
|
|
12
|
+
* @slot - The primary navigation items
|
|
13
|
+
*/
|
|
14
|
+
export class Cre8PrimaryNav extends Cre8Element {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
* aria-label attribute to designate at name for the nav. Can be override by user
|
|
19
|
+
*/
|
|
20
|
+
this.navAriaLabel = 'main';
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
const componentClassNames = this.componentClassNames('cre8-c-primary-nav', {
|
|
24
|
+
'cre8-c-primary-nav--side-by-side': this.behavior === 'side-by-side',
|
|
25
|
+
'cre8-c-primary-nav--inverted': this.inverted === true,
|
|
26
|
+
});
|
|
27
|
+
return html `
|
|
28
|
+
<nav aria-label="${this.navAriaLabel}" class="${componentClassNames}">
|
|
21
29
|
<ul class="cre8-c-primary-nav__list">
|
|
22
30
|
<slot></slot>
|
|
23
31
|
</ul>
|
|
24
32
|
</nav>
|
|
25
33
|
`;
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
customElements.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
Cre8PrimaryNav.styles = [styles];
|
|
37
|
+
__decorate([
|
|
38
|
+
property({ type: Boolean, reflect: true })
|
|
39
|
+
], Cre8PrimaryNav.prototype, "inverted", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
property()
|
|
42
|
+
], Cre8PrimaryNav.prototype, "behavior", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
property()
|
|
45
|
+
], Cre8PrimaryNav.prototype, "navAriaLabel", void 0);
|
|
46
|
+
if (customElements.get('cre8-primary-nav') === undefined) {
|
|
47
|
+
customElements.define('cre8-primary-nav', Cre8PrimaryNav);
|
|
48
|
+
}
|
|
49
|
+
export default Cre8PrimaryNav;
|
|
50
|
+
//# sourceMappingURL=primary-nav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primary-nav.js","sourceRoot":"","sources":["../../../components/primary-nav/primary-nav.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAE7C;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAA/C;;QAqBE;;WAEG;QAEC,iBAAY,GAAW,MAAM,CAAC;IAgBpC,CAAC;IAdC,MAAM;QACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,EAAE;YACvE,kCAAkC,EAAE,IAAI,CAAC,QAAQ,KAAK,cAAc;YACpE,8BAA8B,EAAE,IAAI,CAAC,QAAQ,KAAK,IAAI;SACzD,CAAC,CAAC;QAEH,OAAO,IAAI,CAAA;yBACQ,IAAI,CAAC,YAAY,YAAY,mBAAmB;;;;;KAKpE,CAAC;IACJ,CAAC;;AAvCQ,qBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAOvB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDACpB;AAWnB;IADH,QAAQ,EAAE;gDACmB;AAM1B;IADH,QAAQ,EAAE;oDACuB;AAkBpC,IAAI,cAAc,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAK,SAAS,EAAE,CAAC;IACvD,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;AAC9D,CAAC;AAQD,eAAe,cAAc,CAAC","sourcesContent":["import { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './primary-nav.styles.js';\n\n/**\n * @slot - The primary navigation items\n */\nexport class Cre8PrimaryNav extends Cre8Element {\n static styles = [styles];\n\n /**\n * Inverted variant\n * 1) Used for dark backgrounds\n */\n @property({ type: Boolean, reflect: true })\n inverted?: boolean;\n\n /**\n * Behavior variant\n * <cre8-text-passage size=\"sm\">\n * <ul>\n * <li>**side-by-side** keeps the primary nav item always in a horizontal pattern</li>\n * </ul>\n * </cre8-text-passage>\n */\n @property()\n behavior?: 'side-by-side';\n\n /**\n * aria-label attribute to designate at name for the nav. Can be override by user\n */\n @property()\n navAriaLabel: string = 'main';\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-primary-nav', {\n 'cre8-c-primary-nav--side-by-side': this.behavior === 'side-by-side',\n 'cre8-c-primary-nav--inverted': this.inverted === true,\n });\n\n return html`\n <nav aria-label=\"${this.navAriaLabel}\" class=\"${componentClassNames}\">\n <ul class=\"cre8-c-primary-nav__list\">\n <slot></slot>\n </ul>\n </nav>\n `;\n }\n}\n\nif (customElements.get('cre8-primary-nav') === undefined) {\n customElements.define('cre8-primary-nav', Cre8PrimaryNav);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-primary-nav': Cre8PrimaryNav;\n }\n}\n\nexport default Cre8PrimaryNav;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-primary-nav--inverted{--cre8-primary-nav-link-color: var(--cre8-color-content-knockout)}.cre8-c-primary-nav__list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.cre8-c-primary-nav--side-by-side .cre8-c-primary-nav__list{flex-direction:row}@media all and (min-width: 960px){.cre8-c-primary-nav__list{flex-direction:row}}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=primary-nav.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primary-nav.styles.js","sourceRoot":"","sources":["../../../components/primary-nav/primary-nav.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,ymEAAymE,CAAC;AAC5nE,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-primary-nav--inverted{--cre8-primary-nav-link-color: var(--cre8-color-content-knockout)}.cre8-c-primary-nav__list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.cre8-c-primary-nav--side-by-side .cre8-c-primary-nav__list{flex-direction:row}@media all and (min-width: 960px){.cre8-c-primary-nav__list{flex-direction:row}}`;\nexport default styles;\n"]}
|
|
@@ -1,104 +1,141 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var u = Object.defineProperty, n = (d, e, r, c) => {
|
|
7
|
-
for (var i = void 0, s = d.length - 1, m; s >= 0; s--)
|
|
8
|
-
(m = d[s]) && (i = m(e, r, i) || i);
|
|
9
|
-
return i && u(e, r, i), i;
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
6
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* rendered .host) element here to appease the TypeScript compiler. This should never
|
|
40
|
-
* actually be shown or run for a human end user.
|
|
41
|
-
* 4) Check to see if we clicked inside the active navigation item
|
|
42
|
-
* 5) If the navigation is active and we've clicked outside of the nav then it should
|
|
43
|
-
* be closed.
|
|
44
|
-
*/
|
|
45
|
-
_handleOnClickOutside(e) {
|
|
46
|
-
if (!this.isActive)
|
|
47
|
-
return;
|
|
48
|
-
if (!this.shadowRoot?.host)
|
|
49
|
-
throw Error("Could not determine navigation context during click handler");
|
|
50
|
-
const r = e.composedPath().includes(this.shadowRoot.host);
|
|
51
|
-
this.isActive && !r && (this.isActive = !1);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Toggle active state of primary nav item
|
|
55
|
-
* 1) Remove isActive state from all sibling elements
|
|
56
|
-
* 2) Toggle active state of element selected
|
|
57
|
-
*/
|
|
58
|
-
_clickHandler(e) {
|
|
59
|
-
e.preventDefault(), this.parentNode && this.parentNode.querySelectorAll("cre8-primary-nav-item").forEach((c) => {
|
|
60
|
-
c !== this && (c.isActive = !1);
|
|
61
|
-
}), this.isActive = !this.isActive;
|
|
62
|
-
}
|
|
63
|
-
_closePanel() {
|
|
64
|
-
this.isActive = !1;
|
|
65
|
-
}
|
|
66
|
-
_handleOnKeyDown(e) {
|
|
67
|
-
if (e.key === "Escape" && this.isActive === !0) {
|
|
68
|
-
this._closePanel();
|
|
69
|
-
const r = this.shadowRoot?.querySelector(
|
|
70
|
-
".cre8-c-primary-nav__link"
|
|
71
|
-
);
|
|
72
|
-
r && setTimeout(() => {
|
|
73
|
-
r.focus();
|
|
74
|
-
}, 1);
|
|
7
|
+
import { html, } from 'lit';
|
|
8
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
9
|
+
import { property, state } from 'lit/decorators.js';
|
|
10
|
+
import { Cre8Element } from '../cre8-element';
|
|
11
|
+
import styles from './primary-nav-item.styles.js';
|
|
12
|
+
/**
|
|
13
|
+
* @slot - The label for the navigation item
|
|
14
|
+
*/
|
|
15
|
+
export class Cre8PrimaryNavItem extends Cre8Element {
|
|
16
|
+
/**
|
|
17
|
+
* Initialize functions
|
|
18
|
+
*/
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
/**
|
|
22
|
+
* Primary nav item text
|
|
23
|
+
*/
|
|
24
|
+
this.text = 'Nav item';
|
|
25
|
+
/**
|
|
26
|
+
* Primary nav item href
|
|
27
|
+
*/
|
|
28
|
+
this.href = '#';
|
|
29
|
+
/**
|
|
30
|
+
* Icon name
|
|
31
|
+
*/
|
|
32
|
+
this.iconName = 'caret-down';
|
|
33
|
+
this._handleOnClickOutside = this._handleOnClickOutside.bind(this);
|
|
34
|
+
this._clickHandler = this._clickHandler.bind(this);
|
|
75
35
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Connected Callback lifecycle
|
|
38
|
+
*/
|
|
39
|
+
connectedCallback() {
|
|
40
|
+
this.setAttribute('role', 'listitem');
|
|
41
|
+
super.connectedCallback();
|
|
42
|
+
document.addEventListener('mousedown', this._handleOnClickOutside, false);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Disconnected callback lifecycle
|
|
46
|
+
* 1) Remove window resize event listener
|
|
47
|
+
*/
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
document.removeEventListener('mousedown', this._handleOnClickOutside, false);
|
|
50
|
+
super.disconnectedCallback();
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Handle click outside the component
|
|
54
|
+
* 1) Close the show hide panel on click outside
|
|
55
|
+
* 2) If the nav is already closed then we don't care about outside clicks and we
|
|
56
|
+
* can bail early
|
|
57
|
+
* 3) By the time a user clicks on the page the shadowRoot will almost certainly be
|
|
58
|
+
* defined, but TypeScript isn't that trusting and sees this.shadowRoot as possibly
|
|
59
|
+
* undefined. To work around that we'll check that we have a shadowRoot (and a
|
|
60
|
+
* rendered .host) element here to appease the TypeScript compiler. This should never
|
|
61
|
+
* actually be shown or run for a human end user.
|
|
62
|
+
* 4) Check to see if we clicked inside the active navigation item
|
|
63
|
+
* 5) If the navigation is active and we've clicked outside of the nav then it should
|
|
64
|
+
* be closed.
|
|
65
|
+
*/
|
|
66
|
+
_handleOnClickOutside(event) {
|
|
67
|
+
/* 2 */
|
|
68
|
+
if (!this.isActive) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
/* 3 */
|
|
72
|
+
if (!this.shadowRoot?.host) {
|
|
73
|
+
throw Error('Could not determine navigation context during click handler');
|
|
74
|
+
}
|
|
75
|
+
/* 4 */
|
|
76
|
+
const didClickInside = event.composedPath().includes(this.shadowRoot.host);
|
|
77
|
+
/* 5 */
|
|
78
|
+
if (this.isActive && !didClickInside) {
|
|
79
|
+
this.isActive = false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Toggle active state of primary nav item
|
|
84
|
+
* 1) Remove isActive state from all sibling elements
|
|
85
|
+
* 2) Toggle active state of element selected
|
|
86
|
+
*/
|
|
87
|
+
_clickHandler(e) {
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
if (this.parentNode) {
|
|
90
|
+
const navItems = this.parentNode.querySelectorAll('cre8-primary-nav-item');
|
|
91
|
+
navItems.forEach((element) => {
|
|
92
|
+
if (element !== this) {
|
|
93
|
+
element.isActive = false; /* 1 */
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
this.isActive = !this.isActive; /* 2 */
|
|
98
|
+
}
|
|
99
|
+
_closePanel() {
|
|
100
|
+
this.isActive = false;
|
|
101
|
+
}
|
|
102
|
+
_handleOnKeyDown(e) {
|
|
103
|
+
if (e.key === 'Escape' && this.isActive === true) {
|
|
104
|
+
this._closePanel();
|
|
105
|
+
const navLink = this.shadowRoot?.querySelector('.cre8-c-primary-nav__link');
|
|
106
|
+
if (navLink) {
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
navLink.focus();
|
|
109
|
+
}, 1);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
render() {
|
|
114
|
+
const componentClassName = this.componentClassNames('cre8-c-primary-nav__item', {
|
|
115
|
+
'cre8-is-active': this.isActive === true,
|
|
116
|
+
'cre8-c-primary-nav__item--megamenu': this.megaMenu === true,
|
|
117
|
+
});
|
|
118
|
+
if (this.megaMenu) {
|
|
119
|
+
return html `
|
|
120
|
+
<div class="${componentClassName}" @keydown=${this._handleOnKeyDown}>
|
|
84
121
|
<div class="cre8-c-primary-nav__item-content">
|
|
85
122
|
<button
|
|
86
123
|
class="cre8-c-primary-nav__link"
|
|
87
124
|
@click=${this._clickHandler}
|
|
88
|
-
aria-expanded=${this.isActive ===
|
|
125
|
+
aria-expanded=${this.isActive === true}
|
|
89
126
|
>
|
|
90
|
-
${this.slotNotEmpty(
|
|
127
|
+
${this.slotNotEmpty('itemBefore') && html `
|
|
91
128
|
<div class="cre8-c-primary-nav__item-before">
|
|
92
129
|
<slot name="itemBefore"></slot>
|
|
93
130
|
</div>
|
|
94
131
|
`}
|
|
95
132
|
${this.text}
|
|
96
|
-
${this.slotNotEmpty(
|
|
133
|
+
${this.slotNotEmpty('itemAfter') && html `
|
|
97
134
|
<div class="cre8-c-primary-nav__item-after">
|
|
98
135
|
<slot name="itemAfter"></slot>
|
|
99
136
|
</div>
|
|
100
137
|
`}
|
|
101
|
-
<cre8-icon-legacy aria-hidden="true" name="${
|
|
138
|
+
<cre8-icon-legacy aria-hidden="true" name="${ifDefined(this.iconName)}"></cre8-icon-legacy>
|
|
102
139
|
</button>
|
|
103
140
|
</div>
|
|
104
141
|
<div class="cre8-c-primary-nav__item-panel">
|
|
@@ -107,17 +144,19 @@ const l = class l extends f {
|
|
|
107
144
|
</div>
|
|
108
145
|
</div>
|
|
109
146
|
</div>
|
|
110
|
-
|
|
111
|
-
|
|
147
|
+
`;
|
|
148
|
+
}
|
|
149
|
+
return html `
|
|
150
|
+
<div class="${componentClassName}">
|
|
112
151
|
<div class="cre8-c-primary-nav__item-content">
|
|
113
152
|
<a class="cre8-c-primary-nav__link" href="${this.href}">
|
|
114
|
-
${this.slotNotEmpty(
|
|
153
|
+
${this.slotNotEmpty('itemBefore') && html `
|
|
115
154
|
<div class="cre8-c-primary-nav__item-before">
|
|
116
155
|
<slot name="itemBefore"></slot>
|
|
117
156
|
</div>
|
|
118
157
|
`}
|
|
119
158
|
${this.text}
|
|
120
|
-
${this.slotNotEmpty(
|
|
159
|
+
${this.slotNotEmpty('itemAfter') && html `
|
|
121
160
|
<div class="cre8-c-primary-nav__item-after">
|
|
122
161
|
<slot name="itemAfter"></slot>
|
|
123
162
|
</div>
|
|
@@ -126,27 +165,26 @@ const l = class l extends f {
|
|
|
126
165
|
</div>
|
|
127
166
|
</div>
|
|
128
167
|
`;
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
customElements.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
};
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
Cre8PrimaryNavItem.styles = [styles];
|
|
171
|
+
__decorate([
|
|
172
|
+
property()
|
|
173
|
+
], Cre8PrimaryNavItem.prototype, "text", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
property()
|
|
176
|
+
], Cre8PrimaryNavItem.prototype, "href", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
property()
|
|
179
|
+
], Cre8PrimaryNavItem.prototype, "iconName", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
property({ type: Boolean, reflect: true })
|
|
182
|
+
], Cre8PrimaryNavItem.prototype, "megaMenu", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
state()
|
|
185
|
+
], Cre8PrimaryNavItem.prototype, "isActive", void 0);
|
|
186
|
+
if (customElements.get('cre8-primary-nav-item') === undefined) {
|
|
187
|
+
customElements.define('cre8-primary-nav-item', Cre8PrimaryNavItem);
|
|
188
|
+
}
|
|
189
|
+
export default Cre8PrimaryNavItem;
|
|
190
|
+
//# sourceMappingURL=primary-nav-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primary-nav-item.js","sourceRoot":"","sources":["../../../components/primary-nav-item/primary-nav-item.ts"],"names":[],"mappings":"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","sourcesContent":["import { html, } from 'lit';\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport { property, state } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './primary-nav-item.styles.js';\n\n /**\n * @slot - The label for the navigation item\n */\nexport class Cre8PrimaryNavItem extends Cre8Element {\n /**\n * Primary nav item text\n */\n @property()\n text = 'Nav item';\n\n /**\n * Primary nav item href\n */\n @property()\n href = '#';\n\n /**\n * Icon name\n */\n @property()\n iconName?: string = 'caret-down';\n\n /**\n * Append to the class name. Used for passing in utility classes\n */\n @property({ type: Boolean, reflect: true })\n megaMenu?: boolean;\n\n /**\n * Append to the class name. Used for passing in utility classes\n */\n @state()\n isActive?: boolean;\n\n static styles = [styles];\n\n /**\n * Initialize functions\n */\n constructor() {\n super();\n this._handleOnClickOutside = this._handleOnClickOutside.bind(this);\n this._clickHandler = this._clickHandler.bind(this);\n }\n\n /**\n * Connected Callback lifecycle\n */\n connectedCallback() {\n this.setAttribute('role', 'listitem');\n super.connectedCallback();\n\n document.addEventListener('mousedown', this._handleOnClickOutside, false);\n }\n\n /**\n * Disconnected callback lifecycle\n * 1) Remove window resize event listener\n */\n disconnectedCallback() {\n document.removeEventListener('mousedown', this._handleOnClickOutside, false);\n super.disconnectedCallback();\n }\n\n /**\n * Handle click outside the component\n * 1) Close the show hide panel on click outside\n * 2) If the nav is already closed then we don't care about outside clicks and we\n * can bail early\n * 3) By the time a user clicks on the page the shadowRoot will almost certainly be\n * defined, but TypeScript isn't that trusting and sees this.shadowRoot as possibly\n * undefined. To work around that we'll check that we have a shadowRoot (and a\n * rendered .host) element here to appease the TypeScript compiler. This should never\n * actually be shown or run for a human end user.\n * 4) Check to see if we clicked inside the active navigation item\n * 5) If the navigation is active and we've clicked outside of the nav then it should\n * be closed.\n */\n private _handleOnClickOutside(event: MouseEvent) {\n /* 2 */\n if (!this.isActive) {\n return;\n }\n\n /* 3 */\n if (!this.shadowRoot?.host) {\n throw Error('Could not determine navigation context during click handler');\n }\n\n /* 4 */\n const didClickInside = event.composedPath().includes(this.shadowRoot.host);\n\n /* 5 */\n if (this.isActive && !didClickInside) {\n this.isActive = false;\n }\n }\n\n /**\n * Toggle active state of primary nav item\n * 1) Remove isActive state from all sibling elements\n * 2) Toggle active state of element selected\n */\n private _clickHandler(e: MouseEvent) {\n e.preventDefault();\n if (this.parentNode) {\n const navItems = this.parentNode.querySelectorAll('cre8-primary-nav-item');\n navItems.forEach((element: Cre8PrimaryNavItem) => {\n if (element !== this) {\n element.isActive = false; /* 1 */\n }\n });\n }\n this.isActive = !this.isActive; /* 2 */\n }\n\n private _closePanel() {\n this.isActive = false;\n }\n\n private _handleOnKeyDown(e: KeyboardEvent) {\n if (e.key === 'Escape' && this.isActive === true) {\n this._closePanel();\n const navLink = this.shadowRoot?.querySelector<HTMLButtonElement | HTMLAnchorElement>(\n '.cre8-c-primary-nav__link'\n );\n if (navLink) {\n setTimeout(() => {\n navLink.focus();\n }, 1);\n }\n }\n }\n\n render() {\n const componentClassName = this.componentClassNames('cre8-c-primary-nav__item', {\n 'cre8-is-active': this.isActive === true,\n 'cre8-c-primary-nav__item--megamenu': this.megaMenu === true,\n });\n\n if (this.megaMenu) {\n return html`\n <div class=\"${componentClassName}\" @keydown=${this._handleOnKeyDown}>\n <div class=\"cre8-c-primary-nav__item-content\">\n <button\n class=\"cre8-c-primary-nav__link\"\n @click=${this._clickHandler}\n aria-expanded=${this.isActive === true}\n >\n ${this.slotNotEmpty('itemBefore') && html`\n <div class=\"cre8-c-primary-nav__item-before\">\n <slot name=\"itemBefore\"></slot>\n </div>\n `}\n ${this.text}\n ${this.slotNotEmpty('itemAfter') && html`\n <div class=\"cre8-c-primary-nav__item-after\">\n <slot name=\"itemAfter\"></slot>\n </div>\n `}\n <cre8-icon-legacy aria-hidden=\"true\" name=\"${ifDefined(this.iconName)}\"></cre8-icon-legacy>\n </button>\n </div>\n <div class=\"cre8-c-primary-nav__item-panel\">\n <div class=\"cre8-c-primary-nav__item-panel-inner\">\n <slot></slot>\n </div>\n </div>\n </div>\n `;\n }\n return html`\n <div class=\"${componentClassName}\">\n <div class=\"cre8-c-primary-nav__item-content\">\n <a class=\"cre8-c-primary-nav__link\" href=\"${this.href}\">\n ${this.slotNotEmpty('itemBefore') && html`\n <div class=\"cre8-c-primary-nav__item-before\">\n <slot name=\"itemBefore\"></slot>\n </div>\n `}\n ${this.text}\n ${this.slotNotEmpty('itemAfter') && html`\n <div class=\"cre8-c-primary-nav__item-after\">\n <slot name=\"itemAfter\"></slot>\n </div>\n `}\n </a>\n </div>\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-primary-nav-item') === undefined) {\n customElements.define('cre8-primary-nav-item', Cre8PrimaryNavItem);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-primary-nav-item': Cre8PrimaryNavItem;\n }\n}\n\nexport default Cre8PrimaryNavItem;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-primary-nav__item{border-bottom-width:var(--cre8-border-width-default);border-bottom-style:var(--cre8-border-style-default);border-bottom-color:var(--cre8-color-border-subtle)}@media all and (min-width: 960px){.cre8-c-primary-nav__item{border-bottom:none}}.cre8-c-primary-nav__item-content{display:flex;align-items:baseline}.cre8-c-primary-nav__link{font-family:var(--cre8-typography-label-default-font-family);font-size:var(--cre8-typography-label-default-font-size);font-weight:var(--cre8-typography-label-default-font-weight);line-height:var(--cre8-typography-label-default-line-height);text-decoration:var(--cre8-typography-label-default-text-decoration);text-transform:var(--cre8-typography-label-default-text-transform);display:flex;align-items:center;appearance:none;background:rgba(0,0,0,0);border:none;white-space:nowrap;width:100%;margin:0;padding:1rem 2rem;color:var(--cre8-primary-nav-link-color, var(--cre8-color-header-menu-content-default));text-decoration:none;transition:all var(--cre8-anim-fade-quick) var(--cre8-anim-ease);cursor:pointer}.cre8-c-primary-nav__link:hover,.cre8-c-primary-nav__link:focus-visible{background:var(--cre8-color-header-menu-bg-hover);color:var(--cre8-color-header-menu-content-hover)}.cre8-c-primary-nav__link:active{border-color:var(--cre8-color-header-menu-border-pressed);background:var(--cre8-color-header-menu-bg-pressed);color:var(--cre8-color-header-menu-content-pressed)}.cre8-c-primary-nav__item.cre8-is-active .cre8-c-primary-nav__link{background:var(--cre8-color-bg-brand);color:var(--cre8-color-header-menu-content-hover)}@media all and (min-width: 960px){.cre8-c-primary-nav__link{padding:1rem 0.5rem}}@media all and (min-width: 960px){.cre8-c-primary-nav__link{padding:1rem;border-bottom:none}}cre8-icon-legacy{--cre8-icon-height: 0.75rem;--cre8-icon-width: 0.75rem;margin-left:auto;transition:transform var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-primary-nav__item.cre8-is-active cre8-icon-legacy{transform:rotate(-180deg)}@media all and (min-width: 960px){cre8-icon-legacy{margin-left:0.5rem}}.cre8-c-primary-nav__item-panel{visibility:hidden;width:100%;height:0;overflow:hidden;background:rgba(0,0,0,0);opacity:0;transition:all 0s var(--cre8-anim-ease);z-index:-1}@media all and (min-width: 960px){.cre8-c-primary-nav__item-panel{position:absolute;top:100%;left:0;height:auto;box-shadow:var(--cre8-theme-box-shadow-md)}}.cre8-c-primary-nav__item.cre8-is-active .cre8-c-primary-nav__item-panel{display:block;visibility:visible;height:auto;padding-top:2rem;padding-bottom:2rem;background:var(--cre8-color-bg-default);opacity:1;z-index:1;transition:opacity var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-primary-nav__item--megamenu .cre8-c-primary-nav__item-panel-inner{max-width:70rem;padding-right:2rem;padding-left:2rem;margin:0 auto}.cre8-c-primary-nav__item-before{margin-right:0.5rem}.cre8-c-primary-nav__item-after{margin-left:0.5rem}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=primary-nav-item.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primary-nav-item.styles.js","sourceRoot":"","sources":["../../../components/primary-nav-item/primary-nav-item.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,+nJAA+nJ,CAAC;AAClpJ,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-primary-nav__item{border-bottom-width:var(--cre8-border-width-default);border-bottom-style:var(--cre8-border-style-default);border-bottom-color:var(--cre8-color-border-subtle)}@media all and (min-width: 960px){.cre8-c-primary-nav__item{border-bottom:none}}.cre8-c-primary-nav__item-content{display:flex;align-items:baseline}.cre8-c-primary-nav__link{font-family:var(--cre8-typography-label-default-font-family);font-size:var(--cre8-typography-label-default-font-size);font-weight:var(--cre8-typography-label-default-font-weight);line-height:var(--cre8-typography-label-default-line-height);text-decoration:var(--cre8-typography-label-default-text-decoration);text-transform:var(--cre8-typography-label-default-text-transform);display:flex;align-items:center;appearance:none;background:rgba(0,0,0,0);border:none;white-space:nowrap;width:100%;margin:0;padding:1rem 2rem;color:var(--cre8-primary-nav-link-color, var(--cre8-color-header-menu-content-default));text-decoration:none;transition:all var(--cre8-anim-fade-quick) var(--cre8-anim-ease);cursor:pointer}.cre8-c-primary-nav__link:hover,.cre8-c-primary-nav__link:focus-visible{background:var(--cre8-color-header-menu-bg-hover);color:var(--cre8-color-header-menu-content-hover)}.cre8-c-primary-nav__link:active{border-color:var(--cre8-color-header-menu-border-pressed);background:var(--cre8-color-header-menu-bg-pressed);color:var(--cre8-color-header-menu-content-pressed)}.cre8-c-primary-nav__item.cre8-is-active .cre8-c-primary-nav__link{background:var(--cre8-color-bg-brand);color:var(--cre8-color-header-menu-content-hover)}@media all and (min-width: 960px){.cre8-c-primary-nav__link{padding:1rem 0.5rem}}@media all and (min-width: 960px){.cre8-c-primary-nav__link{padding:1rem;border-bottom:none}}cre8-icon-legacy{--cre8-icon-height: 0.75rem;--cre8-icon-width: 0.75rem;margin-left:auto;transition:transform var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-primary-nav__item.cre8-is-active cre8-icon-legacy{transform:rotate(-180deg)}@media all and (min-width: 960px){cre8-icon-legacy{margin-left:0.5rem}}.cre8-c-primary-nav__item-panel{visibility:hidden;width:100%;height:0;overflow:hidden;background:rgba(0,0,0,0);opacity:0;transition:all 0s var(--cre8-anim-ease);z-index:-1}@media all and (min-width: 960px){.cre8-c-primary-nav__item-panel{position:absolute;top:100%;left:0;height:auto;box-shadow:var(--cre8-theme-box-shadow-md)}}.cre8-c-primary-nav__item.cre8-is-active .cre8-c-primary-nav__item-panel{display:block;visibility:visible;height:auto;padding-top:2rem;padding-bottom:2rem;background:var(--cre8-color-bg-default);opacity:1;z-index:1;transition:opacity var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-primary-nav__item--megamenu .cre8-c-primary-nav__item-panel-inner{max-width:70rem;padding-right:2rem;padding-left:2rem;margin:0 auto}.cre8-c-primary-nav__item-before{margin-right:0.5rem}.cre8-c-primary-nav__item-after{margin-left:0.5rem}`;\nexport default styles;\n"]}
|