@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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C0C;AASjD;IADH,QAAQ,EAAE;wCACwC;AAM/C;IADH,QAAQ,EAAE;uCACM;AASb;IADH,QAAQ,EAAE;4CACW;AASlB;IADH,QAAQ,EAAE;uCACM;AAMb;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACO;AAM9B;IADH,QAAQ,EAAE;qDACoB;AAS3B;IADH,QAAQ,EAAE;gDACuC;AAS9C;IADH,QAAQ,EAAE;wCACyB;AAOhC;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACpB;AAQnB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACnB;AAYpB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACrB;AAUlB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDACb;AAQ1B;IADH,QAAQ,EAAE;4CACwC;AAM/C;IADH,QAAQ,EAAE;mDAC4B;AAMnC;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDACV;AAG7B;IADH,KAAK,CAAC,QAAQ,CAAC;yCACc;AA2IlC,IAAI,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,SAAS,EAAE,CAAC;IAClD,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;AACrD,CAAC;AAED,eAAe,UAAU,CAAC","sourcesContent":["import { html, nothing, } from 'lit';\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport { property, query } from 'lit/decorators.js';\nimport { Cre8FormElement } from '../cre8-form-element';\nimport '../icon/icon';\nimport '../loading-spinner/loading-spinner';\nimport styles from './button.styles.js';\n\n /**\n * The size and state of buttons on the screen serve as visual cues for the user\n * about what they can do and what they should do next.\n * They indicate the availability and priority of the action on the page.\n *\n * - Buttons are a single call-to-action where a single click performs that action\n * - Use buttons when you are performing an action which is almost always on the same page\n * - Use a link instead of a button when you're navigating to another place\n *\n * ## How to Use\n *\n * Buttons are distinguished by three key properties:\n *\n * - **Visual Priority**: Style and size: Primary, Secondary, or Tertiary styles;\n * each with large and small variations\n * - **State**: Interaction state: hover/click (press), focus, disabled,\n * and submitting/loading (only for large buttons)\n * - **Brand**: Styles determined by the site or component theme\n *\n * ### Usage Guidelines\n *\n * Primary, Secondary and Tertiary styles emphasize or de-emphasize an action. They also define\n * background, font style, and border colors. Large and small sizing assists with visual priority by defining button\n * heights, left and right internal padding, and font-size.\n *\n * #### System Feedback\n * Each button has a default and hover/click (press) state that give the user feedback\n * that they have successfully interacted with a button.\n * Button presses should always be combined with other types of timely system feedback.\n * Examples of system feedback may be a page refresh, exposing additional controls or content,\n * dialogs, alerts and notifications.\n * If there is perceived a delay in system response, generally due to technical constraints,\n * provide a progress or loading indicator.\n *\n * #### Button Text\n *\n * - Button text should be as short and simple as possible, ideally a maximum of 3 words.\n * - Use Title Case for readability.\n * - They should not include punctuation (exception: \"Loading...\").\n * - They should not be used as an indicator of what happens on the next page, or as a substitute\n * for a progress meter.\n *\n * #### Button With Icon\n *\n * For button with icon:\n * - **iconRotateDegree** & **iconFlipDirection** props are optional.\n * - They are used to set up the correct direction for icons, for example,\n * arrows, caret up or caret down.\n *\n * #### Button Styling\n *\n * - DO use only the styles of the brand you are working on.\n * - DO NOT combine styles, even if the page is co-branded.\n *\n * #### Button Sizes\n * - DO always pair like sizes together and maintain the hierarchy of Primary and Secondary/Tertiary.\n * - DO NOT mix sizes of buttons when they are used together as a group.\n *\n * #### Input Pairing\n *\n * Primary and Secondary buttons may be paired with input fields.\n * Only one Primary button may appear on each screen.\n * Use the Secondary button when there are multiple in-context buttons\n * and/or when there is an emphasized page level button.\n * When used in a form context, the button's `type` needs to be `submit` to pass along form data.\n *\n * - DO use only large buttons with input fields.\n * - DO NOT use small buttons with input fields.\n *\n */\n\nexport class Cre8Button extends Cre8FormElement {\n static styles = [styles];\n\n /**\n * The button text. Should be as short and simple as possible, ideally a maximum of 3 words.\n * - Use Title Case for readability.\n * - Should not include punctuation (exception: \"Loading...\").\n * - Should not be used as an indicator of what happens on the next page, or as a substitute for a progress meter.\n */\n @property()\n text? = 'Button';\n\n /**\n * Style variant\n * - **primary** renders the button used for primary actions. Presents highest visual priority.\n * When grouped with other buttons, only one primary is allowed\n * - **secondary** renders a secondary button. Presents a lower visual priority\n * - **tertiary** renders a tertiary button. Presents the lowest visual priority.\n * Should be used in limited amounts - consider if a link (`<a>`) would be more appropriate\n */\n @property({ type: String })\n variant?: 'primary' | 'secondary' | 'tertiary' = 'primary';\n\n /**\n * Disabled attribute\n * @attr {boolean}\n *\n * **NOTE**: Disabled states are used to indicate that an action is temporarily unavailable.\n * In general, using disabled states is NOT advised. It should be clear to the user what actions they must\n * take to activate the button. Real-time, field-level validation can help provide clarity.\n */\n @property({ type: Boolean, reflect: true })\n disabled?: boolean;\n\n /**\n * This property is for a neutral button propery mainly used for the secondary or tertiary button variant.\n * @attr {boolean)\n */\n @property({ type: Boolean, reflect: true })\n neutral?: boolean;\n\n /**\n * Inverse attribute\n * @attr {boolean}\n *\n * The inverse prop allows the button to work on either a light or dark surface.\n */\n @property({ type: Boolean, reflect: true })\n inverse?: boolean;\n\n /**\n *\n * Provide this property if you intend to use button styles for an anchor tag (`<a>`).\n * This changes the component markup from `<button>` usage to `<a>` instead.\n */\n @property()\n href?: string;\n\n /**\n * Target attribute for a link if providing `href` to style a link as a button\n * - **_blank** yields a link that opens in a new tab\n * - **_self** yields a link that loads the URL into the same browsing context as the current one.\n * This is the default behavior\n * - **_parent** yields a link that loads the URL into the parent browsing context of the current one.\n * If there is no parent, this behaves the same way as _self\n * - **_top** yields a link that loads the URL into the top-level browsing context.\n * If there is no parent, this behaves the same way as _self.\n */\n @property()\n target?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Type of button.\n * - **button** (default) button has no default behavior and does nothing unless provided some sort\n * of client-side trigger\n * - **submit** button for submitting form data to a server\n */\n @property()\n type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * Rel if this is an <a> element - this swaps <button> for <a>\n */\n @property()\n rel?: string;\n\n /**\n * Deprecated: iconName, use svg instead\n * Icon name if including an icon within a button.\n * Must include the icon's position with `iconPostion`. This prop is used for <cre8-icon-legacy>\n * @deprecated\n */\n @property()\n iconName?: string;\n\n /**\n * svg as a raw string\n * - For button with icon, the icon is defined by this prop.\n * - Pass in a raw svg as a String for using <cre8-icon>\n * - Must include the icon's position with `iconPostion`.\n */\n @property()\n svg?: string;\n\n /**\n * iconRotateDegree is used for <cre8-icon> to set the arrow in the correct direction\n */\n @property({ type: Number })\n iconRotateDegree?: number = 0;\n\n /**\n * iconFlipDirection is used for <cre8-icon> to set the icon in the correct direction\n */\n @property()\n iconFlipDirection?: string;\n\n /**\n * Icon position. Must include the name of the icon with `iconName`\n *\n * - **before** places the icon before the button text\n * - **after** places the icon after the button text\n */\n @property()\n iconPosition?: 'before' | 'after' = undefined;\n\n /**\n * Size variants add another way to increase or decrease visual priority of a button.\n * - **sm** Shrinks the button typography and overall size from the default. Use when vertical space is constrained.\n * - **md** This is the default value for the size.\n * - **lg** Increases the button typography and overall size from the default.\n */\n @property()\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Visually hide button text. Text is still accessible to assistive technology.\n * Use this for icon-only buttons for accessibility\n */\n @property({ type: Boolean, reflect: true })\n hideText?: boolean;\n\n /**\n * Full width button\n * @attr {boolean}\n *\n */\n @property({ type: Boolean, reflect: true })\n fullWidth?: boolean;\n\n /**\n * * Changes styling to an active state with a spinning icon.\n * * Adds accessibility treatment by:\n * * announcing via voiceover when the loading success/error state via a aria-live region\n * * setting `aria-disabled`\n * * Disables click events / form submitting while allowing focus (for accessibility)\n * @attr {boolean}\n *\n */\n @property({ type: Boolean, reflect: true })\n loading?: boolean;\n\n /**\n * * Variant of the loading button that:\n * * Removes loading spinner\n * * Informs the SR user that the loading status is now complete, with visually hidden text in the live area\n * @attr {boolean}\n *\n */\n @property({ type: Boolean, reflect: true })\n loadingComplete?: boolean;\n\n /**\n * Controls whether your loading status update to voiceover users will occur\n * immediately (used for more urgently needed updates) using `assertive` or at the next convenient\n * pause in their navigation using `polite`.\n */\n @property()\n ariaLive: 'polite' | 'assertive' = 'assertive';\n\n /**\n * These two subvariants of the split button style the two seperate buttons to style as a singular button\n */\n @property()\n splitButtonType?: 'text' | 'caret';\n\n /**\n * Button aria expanded attribute\n */\n @property({ type: Boolean, reflect: true })\n buttonAriaExpanded?: boolean;\n\n @query('button')\n field!: HTMLButtonElement;\n\n formSubmit() {\n const form = this._internals.form;\n if (form) {\n form.requestSubmit();\n }\n }\n\n formReset() {\n const form = this._internals.form;\n if (form) {\n form.reset();\n }\n }\n\n private generateIconBefore() {\n if (this.iconPosition === 'before') {\n if (this.iconName) {\n return html`<cre8-icon-legacy slot=\"before\" aria-hidden=\"true\" name=\"${ifDefined(this.iconName)}\">\n </cre8-icon-legacy>`;\n }\n if (this.svg) {\n return html`<cre8-icon slot=\"before\" aria-hidden=\"true\"\n svg='${this.svg}' rotate=\"${Number(this.iconRotateDegree)}\" flip=\"${this.iconFlipDirection}\">\n </cre8-icon>`;\n }\n }\n return nothing;\n }\n\n private generateIconAfter() {\n if (this.iconPosition === 'after') {\n if (this.iconName) {\n return html`<cre8-icon-legacy slot=\"after\" aria-hidden=\"true\" name=\"${ifDefined(this.iconName)}\">\n </cre8-icon-legacy>`;\n }\n if (this.svg) {\n return html`<cre8-icon slot=\"after\" aria-hidden=\"true\"\n svg='${this.svg}' rotate=\"${Number(this.iconRotateDegree)}\" flip=\"${this.iconFlipDirection}\">\n </cre8-icon>`;\n }\n }\n return nothing;\n }\n\n // TODO: Temporarily keep eslint complexity as warning. Update during specific story for this rule.\n /* eslint complexity: [\"warn\", 10] */\n render() {\n const componentClassName = this.componentClassNames('cre8-c-button', {\n 'cre8-c-button--primary': this.variant === 'primary',\n 'cre8-c-button--secondary': this.variant === 'secondary',\n 'cre8-c-button--tertiary': this.variant === 'tertiary',\n 'cre8-c-button--full-width': this.fullWidth === true,\n 'cre8-c-button--sm': this.size === 'sm',\n 'cre8-c-button--lg': this.size === 'lg',\n 'cre8-c-button--icon-only': this.hideText,\n 'cre8-c-button--split-button-text': this.splitButtonType === 'text',\n 'cre8-c-button--split-button-caret': this.splitButtonType === 'caret',\n 'cre8-c-button--neutral': this.neutral,\n 'cre8-c-button--inverse': this.inverse,\n 'cre8-c-button--loading': this.loading,\n });\n\n if (this.hideText) {\n this.iconPosition = 'after';\n }\n\n if (this.href) {\n return html`\n <a\n href=\"${ifDefined(this.href)}\"\n class=\"${componentClassName}\"\n rel=\"${ifDefined(this.rel)}\"\n target=\"${ifDefined(this.target)}\"\n >\n ${this.generateIconBefore()}\n <span\n class=\"${this.hideText ? 'cre8-u-is-vishidden cre8-c-button__text' : 'cre8-c-button__text'}\"\n >\n ${this.text}\n </span>\n ${this.generateIconAfter()}\n </a>\n `;\n }\n return html` <button\n class=\"${componentClassName}\"\n part=\"button\"\n aria-disabled=\"${ifDefined(this.loading)}\"\n ?disabled=${this.disabled}\n @click=\"${this._buttonClick}\"\n aria-expanded=\"${ifDefined(this.buttonAriaExpanded)}\"\n >\n <slot name=\"before\"></slot>\n ${this.generateIconBefore()}\n <span\n class=\"${this.hideText ? 'cre8-u-is-vishidden cre8-c-button__text' : 'cre8-c-button__text'}\"\n >\n ${this.text}\n </span>\n ${this.generateIconAfter()}\n <slot name=\"after\"></slot>\n ${this.loading || this.loadingComplete\n ? html`<span class=\"cre8-c-button__icon\" aria-live=\"${this.ariaLive}\" role=\"alert\">\n <span class=\"cre8-u-is-vishidden\">${this.loadingComplete ? 'Loading Complete' : 'Loading'}</span>\n ${!this.loadingComplete\n ? html`\n <cre8-loading-spinner\n class=\"cre8-c-button__loading-icon\"\n size=\"small\"\n ?neutral=${this.neutral}\n ?inverse=${this.inverse}\n buttonVariant=${this.variant}\n aria-hidden=\"true\"\n ></cre8-loading-spinner>`\n : nothing}\n </span>`\n : nothing}\n </button>`;\n }\n\n private _buttonClick(e: MouseEvent | KeyboardEvent) {\n if (this.loading) {\n e.stopPropagation();\n } else {\n switch (this.type) {\n case 'submit':\n this.formSubmit();\n break;\n case 'reset':\n this.formReset();\n break;\n // no default\n }\n }\n }\n}\n\nif (customElements.get('cre8-button') === undefined) {\n customElements.define('cre8-button', Cre8Button);\n}\n\nexport default Cre8Button;\n"]}
|