@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
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* eslint-disable lit/no-template-arrow */
|
|
2
|
+
/* eslint-disable indent */
|
|
3
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
4
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
6
|
+
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;
|
|
7
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8
|
+
};
|
|
9
|
+
/* TODO: remove eslint disable on no-template-arrow */
|
|
10
|
+
import { html, } from 'lit';
|
|
11
|
+
import { property, state } from 'lit/decorators.js';
|
|
12
|
+
import { Cre8Element } from '../../cre8-element';
|
|
13
|
+
import styles from './calendar-month-modal.styles.js';
|
|
14
|
+
import '../../button/button';
|
|
15
|
+
import '../../icon/icon';
|
|
16
|
+
export class Cre8CalendarMonthModal extends Cre8Element {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.monthNames = [
|
|
20
|
+
'January',
|
|
21
|
+
'February',
|
|
22
|
+
'March',
|
|
23
|
+
'April',
|
|
24
|
+
'May',
|
|
25
|
+
'June',
|
|
26
|
+
'July',
|
|
27
|
+
'August',
|
|
28
|
+
'September',
|
|
29
|
+
'October',
|
|
30
|
+
'November',
|
|
31
|
+
'December',
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
firstUpdated() {
|
|
35
|
+
this.focusOnCurrentMonth();
|
|
36
|
+
}
|
|
37
|
+
async focusOnCurrentMonth() {
|
|
38
|
+
await this.updateComplete;
|
|
39
|
+
const currentMonthButton = this.shadowRoot?.querySelector('li[data-current-month]').children[0].shadowRoot?.querySelector('button');
|
|
40
|
+
currentMonthButton.focus();
|
|
41
|
+
}
|
|
42
|
+
emitMonth(month) {
|
|
43
|
+
const event = new CustomEvent('changeMonth', {
|
|
44
|
+
detail: {
|
|
45
|
+
month,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
this.dispatchEvent(event);
|
|
49
|
+
}
|
|
50
|
+
getMonthListItems() {
|
|
51
|
+
return this.monthNames.map((month, index) => html ` <li ?data-current-month="${index === this.currentMonth}" >
|
|
52
|
+
<cre8-button text="${month}" variant="tertiary" size="sm"
|
|
53
|
+
@click="${() => this.emitMonth(index)}"></cre8-button>
|
|
54
|
+
</li>`);
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
const componentClassNames = this.componentClassNames('cre8-c-calendar-month-modal', {});
|
|
58
|
+
return html ` <div class="${componentClassNames}">
|
|
59
|
+
<ol aria-label="choose a month">
|
|
60
|
+
${this.getMonthListItems()}
|
|
61
|
+
</ol>
|
|
62
|
+
</div> `;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
Cre8CalendarMonthModal.styles = [styles];
|
|
66
|
+
__decorate([
|
|
67
|
+
state()
|
|
68
|
+
], Cre8CalendarMonthModal.prototype, "monthNames", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
property({ reflect: true, type: Number })
|
|
71
|
+
], Cre8CalendarMonthModal.prototype, "currentMonth", void 0);
|
|
72
|
+
if (customElements.get('cre8-calendar-month-modal') === undefined) {
|
|
73
|
+
customElements.define('cre8-calendar-month-modal', Cre8CalendarMonthModal);
|
|
74
|
+
}
|
|
75
|
+
export default Cre8CalendarMonthModal;
|
|
76
|
+
//# sourceMappingURL=calendar-month-modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-month-modal.js","sourceRoot":"","sources":["../../../../components/date-picker/calendar-month-modal/calendar-month-modal.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2BAA2B;;;;;;;AAE3B,sDAAsD;AACtD,OAAO,EAAkB,IAAI,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KAAK,CAAC;cACjC,CACP,CAAC;IACJ,CAAC;IAEH,MAAM;QACJ,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;QAExF,OAAO,IAAI,CAAA,gBAAgB,mBAAmB;;UAExC,IAAI,CAAC,iBAAiB,EAAE;;YAEtB,CAAC;IACX,CAAC;;AAjEM,6BAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAGhB;IAAR,KAAK,EAAE;0DAA2B;AAGjC;IADD,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4DACnB;AA8DzB,IAAI,cAAc,CAAC,GAAG,CAAC,2BAA2B,CAAC,KAAK,SAAS,EAAE,CAAC;IAClE,cAAc,CAAC,MAAM,CAAC,2BAA2B,EAAE,sBAAsB,CAAC,CAAC;AAC7E,CAAC;AAQD,eAAe,sBAAsB,CAAC","sourcesContent":["/* eslint-disable lit/no-template-arrow */\n/* eslint-disable indent */\n\n/* TODO: remove eslint disable on no-template-arrow */\nimport { TemplateResult, html, } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { Cre8Element } from '../../cre8-element';\nimport styles from './calendar-month-modal.styles.js';\nimport '../../button/button';\nimport '../../icon/icon';\n\nexport class Cre8CalendarMonthModal extends Cre8Element {\n static styles = [styles];\n\n\n @state() monthNames: Array<string>;\n\n @property({ reflect: true, type: Number })\n currentMonth: number;\n\n constructor() {\n super();\n this.monthNames = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ];\n }\n\n protected firstUpdated(): void {\n this.focusOnCurrentMonth();\n }\n\n private async focusOnCurrentMonth(): Promise<void> {\n await this.updateComplete;\n\n const currentMonthButton = this.shadowRoot?.querySelector<HTMLElement>(\n 'li[data-current-month]'\n ).children[0].shadowRoot?.querySelector<HTMLButtonElement>('button');\n currentMonthButton.focus();\n }\n\n private emitMonth(month: number): void {\n const event = new CustomEvent('changeMonth', {\n detail: {\n month,\n },\n });\n this.dispatchEvent(event);\n }\n\n getMonthListItems(): TemplateResult[] {\n return this.monthNames.map(\n (month, index) => html` <li ?data-current-month=\"${index === this.currentMonth}\" >\n <cre8-button text=\"${month}\" variant=\"tertiary\" size=\"sm\"\n @click=\"${() => this.emitMonth(index)}\"></cre8-button>\n </li>`\n );\n }\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-calendar-month-modal', {});\n\n return html` <div class=\"${componentClassNames}\">\n <ol aria-label=\"choose a month\">\n ${this.getMonthListItems()}\n </ol>\n </div> `;\n }\n}\n\nif (customElements.get('cre8-calendar-month-modal') === undefined) {\n customElements.define('cre8-calendar-month-modal', Cre8CalendarMonthModal);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-calendar-month-modal': Cre8CalendarMonthModal;\n }\n}\n\nexport default Cre8CalendarMonthModal;\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-calendar-month-modal{padding:0.5rem}ol{font-family:var(--cre8-typography-body-default-font-family);font-size:var(--cre8-typography-body-default-font-size);font-weight:var(--cre8-typography-body-default-font-weight);line-height:var(--cre8-typography-body-default-line-height);text-decoration:var(--cre8-typography-body-default-text-decoration);text-transform:var(--cre8-typography-body-default-text-transform);display:grid;grid-row-gap:.33em;grid-template-columns:repeat(3, 1fr);list-style:none;margin:unset;padding:unset}li{display:inline-flex;justify-content:center}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=calendar-month-modal.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-month-modal.styles.js","sourceRoot":"","sources":["../../../../components/date-picker/calendar-month-modal/calendar-month-modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,y0EAAy0E,CAAC;AAC51E,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-calendar-month-modal{padding:0.5rem}ol{font-family:var(--cre8-typography-body-default-font-family);font-size:var(--cre8-typography-body-default-font-size);font-weight:var(--cre8-typography-body-default-font-weight);line-height:var(--cre8-typography-body-default-line-height);text-decoration:var(--cre8-typography-body-default-text-decoration);text-transform:var(--cre8-typography-body-default-text-transform);display:grid;grid-row-gap:.33em;grid-template-columns:repeat(3, 1fr);list-style:none;margin:unset;padding:unset}li{display:inline-flex;justify-content:center}`;\nexport default styles;\n"]}
|
|
@@ -0,0 +1,110 @@
|
|
|
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;
|
|
6
|
+
};
|
|
7
|
+
/* eslint-disable lit/no-template-arrow */
|
|
8
|
+
/* TODO: remove eslint disable on no-template-arrow */
|
|
9
|
+
import { html, } from 'lit';
|
|
10
|
+
import { property } from 'lit/decorators.js';
|
|
11
|
+
import { Cre8Element } from '../../cre8-element';
|
|
12
|
+
import styles from './calendar-navigation.styles.js';
|
|
13
|
+
import '../../button/button';
|
|
14
|
+
import '../../icon/icon';
|
|
15
|
+
export class Cre8CalendarNavigation extends Cre8Element {
|
|
16
|
+
activateModal(modal) {
|
|
17
|
+
const event = new CustomEvent('activateModal', {
|
|
18
|
+
detail: {
|
|
19
|
+
modal,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
this.dispatchEvent(event);
|
|
23
|
+
}
|
|
24
|
+
changeMonth(addend) {
|
|
25
|
+
const event = new CustomEvent('changeMonth', {
|
|
26
|
+
detail: {
|
|
27
|
+
addend,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
this.dispatchEvent(event);
|
|
31
|
+
}
|
|
32
|
+
changeYear(addend) {
|
|
33
|
+
const event = new CustomEvent('changeYear', {
|
|
34
|
+
detail: {
|
|
35
|
+
addend,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
this.dispatchEvent(event);
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
const componentClassNames = this.componentClassNames('cre8-c-calendar-navigation', {});
|
|
42
|
+
return html `
|
|
43
|
+
<div class="${componentClassNames}">
|
|
44
|
+
<cre8-button
|
|
45
|
+
variant="tertiary"
|
|
46
|
+
text="Previous year"
|
|
47
|
+
?hideText=${true}
|
|
48
|
+
iconName="caret-double-left"
|
|
49
|
+
@click="${() => this.changeYear(-1)}"
|
|
50
|
+
></cre8-button>
|
|
51
|
+
|
|
52
|
+
<cre8-button
|
|
53
|
+
variant="tertiary"
|
|
54
|
+
text="Previous month"
|
|
55
|
+
?hideText=${true}
|
|
56
|
+
iconName="keyboard-arrow-left"
|
|
57
|
+
@click="${() => this.changeMonth(-1)}"
|
|
58
|
+
></cre8-button>
|
|
59
|
+
|
|
60
|
+
<div class="cre8-c-calendar-navigation__inner-buttons">
|
|
61
|
+
<cre8-button
|
|
62
|
+
class="cre8-c-calendar-navigation__month-modal-button"
|
|
63
|
+
variant="tertiary"
|
|
64
|
+
text="${this.monthName}"
|
|
65
|
+
aria-label="${this.monthName}, month picker modal"
|
|
66
|
+
size="sm"
|
|
67
|
+
@click="${() => this.activateModal('month')}"
|
|
68
|
+
></cre8-button>
|
|
69
|
+
|
|
70
|
+
<cre8-button
|
|
71
|
+
class="cre8-c-calendar-navigation__year-modal-button"
|
|
72
|
+
variant="tertiary"
|
|
73
|
+
text="${this.year}"
|
|
74
|
+
aria-label="${this.year}, year picker modal"
|
|
75
|
+
size="sm"
|
|
76
|
+
@click="${() => this.activateModal('year')}"
|
|
77
|
+
></cre8-button>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<cre8-button
|
|
81
|
+
variant="tertiary"
|
|
82
|
+
text="Next month"
|
|
83
|
+
?hideText=${true}
|
|
84
|
+
iconName="keyboard-arrow-right"
|
|
85
|
+
@click="${() => this.changeMonth(1)}"
|
|
86
|
+
></cre8-button>
|
|
87
|
+
|
|
88
|
+
<cre8-button
|
|
89
|
+
variant="tertiary"
|
|
90
|
+
text="Next year"
|
|
91
|
+
?hideText=${true}
|
|
92
|
+
iconName="caret-double-right"
|
|
93
|
+
@click="${() => this.changeYear(1)}"
|
|
94
|
+
></cre8-button>
|
|
95
|
+
</div>
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
Cre8CalendarNavigation.styles = [styles];
|
|
100
|
+
__decorate([
|
|
101
|
+
property({ type: String, reflect: true })
|
|
102
|
+
], Cre8CalendarNavigation.prototype, "monthName", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
property({ type: String, reflect: true })
|
|
105
|
+
], Cre8CalendarNavigation.prototype, "year", void 0);
|
|
106
|
+
if (customElements.get('cre8-calendar-navigation') === undefined) {
|
|
107
|
+
customElements.define('cre8-calendar-navigation', Cre8CalendarNavigation);
|
|
108
|
+
}
|
|
109
|
+
export default Cre8CalendarNavigation;
|
|
110
|
+
//# sourceMappingURL=calendar-navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-navigation.js","sourceRoot":"","sources":["../../../../components/date-picker/calendar-navigation/calendar-navigation.ts"],"names":[],"mappings":";;;;;;AAAA,0CAA0C;AAC1C,sDAAsD;AACtD,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,MAAM,MAAM,iCAAiC,CAAC;AACrD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,iBAAiB,CAAC;AAEzB,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IAS7C,aAAa,CAAC,KAAa;QAC/B,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,eAAe,EAAE;YAC3C,M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CAAC;;AAhGQ,6BAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAGvB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yDACpB;AAGlB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDACzB;AA6FnB,IAAI,cAAc,CAAC,GAAG,CAAC,0BAA0B,CAAC,KAAK,SAAS,EAAE,CAAC;IAC/D,cAAc,CAAC,MAAM,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAAC;AAC9E,CAAC;AAQD,eAAe,sBAAsB,CAAC","sourcesContent":["/* eslint-disable lit/no-template-arrow */\n/* TODO: remove eslint disable on no-template-arrow */\nimport { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../../cre8-element';\nimport styles from './calendar-navigation.styles.js';\nimport '../../button/button';\nimport '../../icon/icon';\n\nexport class Cre8CalendarNavigation extends Cre8Element {\n static styles = [styles];\n\n @property({ type: String, reflect: true })\n monthName: string;\n\n @property({ type: String, reflect: true })\n year: number;\n\n private activateModal(modal: string): void {\n const event = new CustomEvent('activateModal', {\n detail: {\n modal,\n },\n });\n this.dispatchEvent(event);\n }\n\n private changeMonth(addend: number): void {\n const event = new CustomEvent('changeMonth', {\n detail: {\n addend,\n },\n });\n this.dispatchEvent(event);\n }\n\n private changeYear(addend: number): void {\n const event = new CustomEvent('changeYear', {\n detail: {\n addend,\n },\n });\n this.dispatchEvent(event);\n }\n\n render() {\n const componentClassNames = this.componentClassNames(\n 'cre8-c-calendar-navigation',\n {}\n );\n\n return html`\n <div class=\"${componentClassNames}\">\n <cre8-button\n variant=\"tertiary\"\n text=\"Previous year\"\n ?hideText=${true}\n iconName=\"caret-double-left\"\n @click=\"${() => this.changeYear(-1)}\"\n ></cre8-button>\n\n <cre8-button\n variant=\"tertiary\"\n text=\"Previous month\"\n ?hideText=${true}\n iconName=\"keyboard-arrow-left\"\n @click=\"${() => this.changeMonth(-1)}\"\n ></cre8-button>\n\n <div class=\"cre8-c-calendar-navigation__inner-buttons\">\n <cre8-button\n class=\"cre8-c-calendar-navigation__month-modal-button\"\n variant=\"tertiary\"\n text=\"${this.monthName}\"\n aria-label=\"${this.monthName}, month picker modal\"\n size=\"sm\"\n @click=\"${() => this.activateModal('month')}\"\n ></cre8-button>\n\n <cre8-button\n class=\"cre8-c-calendar-navigation__year-modal-button\"\n variant=\"tertiary\"\n text=\"${this.year}\"\n aria-label=\"${this.year}, year picker modal\"\n size=\"sm\"\n @click=\"${() => this.activateModal('year')}\"\n ></cre8-button>\n </div>\n\n <cre8-button\n variant=\"tertiary\"\n text=\"Next month\"\n ?hideText=${true}\n iconName=\"keyboard-arrow-right\"\n @click=\"${() => this.changeMonth(1)}\"\n ></cre8-button>\n\n <cre8-button\n variant=\"tertiary\"\n text=\"Next year\"\n ?hideText=${true}\n iconName=\"caret-double-right\"\n @click=\"${() => this.changeYear(1)}\"\n ></cre8-button>\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-calendar-navigation') === undefined) {\n customElements.define('cre8-calendar-navigation', Cre8CalendarNavigation);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-calendar-navigation': Cre8CalendarNavigation;\n }\n}\n\nexport default Cre8CalendarNavigation;\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-calendar-navigation{align-items:center;display:flex;height:60px;justify-content:center}.cre8-c-calendar-navigation__inner-buttons{display:flex;min-width:188px;justify-content:space-around}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=calendar-navigation.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-navigation.styles.js","sourceRoot":"","sources":["../../../../components/date-picker/calendar-navigation/calendar-navigation.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,88DAA88D,CAAC;AACj+D,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-calendar-navigation{align-items:center;display:flex;height:60px;justify-content:center}.cre8-c-calendar-navigation__inner-buttons{display:flex;min-width:188px;justify-content:space-around}`;\nexport default styles;\n"]}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* eslint-disable lit/no-template-arrow */
|
|
2
|
+
/* eslint-disable indent */
|
|
3
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
4
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
6
|
+
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;
|
|
7
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8
|
+
};
|
|
9
|
+
/* TODO: remove eslint disable on no-template-arrow */
|
|
10
|
+
import { html, } from 'lit';
|
|
11
|
+
import { property, state } from 'lit/decorators.js';
|
|
12
|
+
import { Cre8Element } from '../../cre8-element';
|
|
13
|
+
import styles from './calendar-year-modal.styles.js';
|
|
14
|
+
import '../../button/button';
|
|
15
|
+
import '../../icon/icon';
|
|
16
|
+
export class Cre8CalendarYearModal extends Cre8Element {
|
|
17
|
+
get currentYear() {
|
|
18
|
+
return this._currentYear;
|
|
19
|
+
}
|
|
20
|
+
set currentYear(newYear) {
|
|
21
|
+
const oldYear = this._currentYear;
|
|
22
|
+
this._currentYear = newYear;
|
|
23
|
+
this.modalAnchorYear = newYear;
|
|
24
|
+
this.requestUpdate('currentDate', oldYear);
|
|
25
|
+
this.createYearArray(this.currentYear);
|
|
26
|
+
}
|
|
27
|
+
constructor() {
|
|
28
|
+
super();
|
|
29
|
+
this.yearNumbers = [];
|
|
30
|
+
}
|
|
31
|
+
emitYear(year) {
|
|
32
|
+
const event = new CustomEvent('changeYear', {
|
|
33
|
+
detail: {
|
|
34
|
+
year,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
this.dispatchEvent(event);
|
|
38
|
+
}
|
|
39
|
+
createYearArray(anchorYear) {
|
|
40
|
+
const gridIndices = Array.from(Array(12).keys());
|
|
41
|
+
/* Leaves current year in the center of the 3x4 grid */
|
|
42
|
+
this.yearNumbers = gridIndices.map((year) => year + (anchorYear - 7));
|
|
43
|
+
}
|
|
44
|
+
getYearListItems() {
|
|
45
|
+
return this.yearNumbers.map(((year) => html ` <li
|
|
46
|
+
?data-current-year="${year === this.currentYear}"
|
|
47
|
+
>
|
|
48
|
+
<cre8-button
|
|
49
|
+
text="${year}"
|
|
50
|
+
variant="tertiary"
|
|
51
|
+
size="sm"
|
|
52
|
+
@click="${() => this.emitYear(year)}"
|
|
53
|
+
></cre8-button>
|
|
54
|
+
</li>`));
|
|
55
|
+
}
|
|
56
|
+
firstUpdated() {
|
|
57
|
+
this.focusOnCurrentYear();
|
|
58
|
+
}
|
|
59
|
+
async focusOnCurrentYear() {
|
|
60
|
+
await this.updateComplete;
|
|
61
|
+
const currentYearButton = this.shadowRoot?.querySelector('li[data-current-year]').children[0].shadowRoot?.querySelector('button');
|
|
62
|
+
currentYearButton.focus();
|
|
63
|
+
}
|
|
64
|
+
previousYearArray() {
|
|
65
|
+
this.modalAnchorYear -= 12;
|
|
66
|
+
this.createYearArray(this.modalAnchorYear);
|
|
67
|
+
}
|
|
68
|
+
nextYearArray() {
|
|
69
|
+
this.modalAnchorYear += 12;
|
|
70
|
+
this.createYearArray(this.modalAnchorYear);
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
const componentClassNames = this.componentClassNames('cre8-c-calendar-year-modal', {});
|
|
74
|
+
return html `
|
|
75
|
+
<div class="${componentClassNames}">
|
|
76
|
+
<cre8-button
|
|
77
|
+
class="cre8-c-calendar-year-modal__nav-button"
|
|
78
|
+
@click="${this.previousYearArray}"
|
|
79
|
+
variant="tertiary"
|
|
80
|
+
text="Previous 12 years"
|
|
81
|
+
?hideText=${true}
|
|
82
|
+
iconName="keyboard-arrow-left"
|
|
83
|
+
></cre8-button>
|
|
84
|
+
<ol aria-label="choose a year">
|
|
85
|
+
${this.getYearListItems()}
|
|
86
|
+
</ol>
|
|
87
|
+
<cre8-button
|
|
88
|
+
class="cre8-c-calendar-year-modal__nav-button"
|
|
89
|
+
@click="${this.nextYearArray}"
|
|
90
|
+
variant="tertiary"
|
|
91
|
+
text="Next 12 years"
|
|
92
|
+
?hideText=${true}
|
|
93
|
+
iconName="keyboard-arrow-right"
|
|
94
|
+
></cre8-button>
|
|
95
|
+
</div>
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
Cre8CalendarYearModal.styles = [styles];
|
|
100
|
+
__decorate([
|
|
101
|
+
state()
|
|
102
|
+
], Cre8CalendarYearModal.prototype, "yearNumbers", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
state()
|
|
105
|
+
], Cre8CalendarYearModal.prototype, "_currentYear", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
state()
|
|
108
|
+
], Cre8CalendarYearModal.prototype, "modalAnchorYear", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
property({ reflect: true, type: Number })
|
|
111
|
+
], Cre8CalendarYearModal.prototype, "currentYear", null);
|
|
112
|
+
if (customElements.get('cre8-calendar-year-modal') === undefined) {
|
|
113
|
+
customElements.define('cre8-calendar-year-modal', Cre8CalendarYearModal);
|
|
114
|
+
}
|
|
115
|
+
export default Cre8CalendarYearModal;
|
|
116
|
+
//# sourceMappingURL=calendar-year-modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-year-modal.js","sourceRoot":"","sources":["../../../../components/date-picker/calendar-year-modal/calendar-year-modal.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2BAA2B;;;;;;;AAE3B,sDAAsD;AACtD,OAAO,EAAkB,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB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GzC;AAqGH,IAAI,cAAc,CAAC,GAAG,CAAC,0BAA0B,CAAC,KAAK,SAAS,EAAE,CAAC;IACjE,cAAc,CAAC,MAAM,CAAC,0BAA0B,EAAE,qBAAqB,CAAC,CAAC;AAC3E,CAAC;AAQD,eAAe,qBAAqB,CAAC","sourcesContent":["/* eslint-disable lit/no-template-arrow */\n/* eslint-disable indent */\n\n/* TODO: remove eslint disable on no-template-arrow */\nimport { TemplateResult, html, } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { Cre8Element } from '../../cre8-element';\nimport styles from './calendar-year-modal.styles.js';\nimport '../../button/button';\nimport '../../icon/icon';\n\nexport class Cre8CalendarYearModal extends Cre8Element {\n static styles = [styles];\n\n\n @state() yearNumbers: Array<number>;\n\n @state() _currentYear?: number;\n\n @state() modalAnchorYear?: number;\n\n @property({ reflect: true, type: Number })\n get currentYear() {\n return this._currentYear;\n }\n\n set currentYear(newYear: number) {\n const oldYear = this._currentYear;\n this._currentYear = newYear;\n this.modalAnchorYear = newYear;\n this.requestUpdate('currentDate', oldYear);\n this.createYearArray(this.currentYear);\n }\n\n constructor() {\n super();\n this.yearNumbers = [];\n }\n\n private emitYear(year: number) {\n const event = new CustomEvent('changeYear', {\n detail: {\n year,\n },\n });\n this.dispatchEvent(event);\n }\n\n private createYearArray(anchorYear: number) {\n const gridIndices = Array.from(Array(12).keys());\n /* Leaves current year in the center of the 3x4 grid */\n this.yearNumbers = gridIndices.map((year) => year + (anchorYear - 7));\n }\n\n private getYearListItems(): TemplateResult[] {\n return this.yearNumbers.map(\n ((year) => html` <li\n ?data-current-year=\"${year === this.currentYear}\"\n >\n <cre8-button\n text=\"${year}\"\n variant=\"tertiary\"\n size=\"sm\"\n @click=\"${() => this.emitYear(year)}\"\n ></cre8-button>\n </li>`\n )\n );\n }\n\n protected firstUpdated(): void {\n this.focusOnCurrentYear();\n }\n\n private async focusOnCurrentYear(): Promise<void> {\n await this.updateComplete;\n\n const currentYearButton = this.shadowRoot?.querySelector<HTMLElement>(\n 'li[data-current-year]'\n ).children[0].shadowRoot?.querySelector<HTMLButtonElement>('button');\n currentYearButton.focus();\n }\n\n private previousYearArray(): void {\n this.modalAnchorYear -= 12;\n this.createYearArray(this.modalAnchorYear);\n }\n\n private nextYearArray(): void {\n this.modalAnchorYear += 12;\n this.createYearArray(this.modalAnchorYear);\n }\n\n render() {\n const componentClassNames = this.componentClassNames(\n 'cre8-c-calendar-year-modal',\n {}\n );\n\n return html`\n <div class=\"${componentClassNames}\">\n <cre8-button\n class=\"cre8-c-calendar-year-modal__nav-button\"\n @click=\"${this.previousYearArray}\"\n variant=\"tertiary\"\n text=\"Previous 12 years\"\n ?hideText=${true}\n iconName=\"keyboard-arrow-left\"\n ></cre8-button>\n <ol aria-label=\"choose a year\">\n ${this.getYearListItems()}\n </ol>\n <cre8-button\n class=\"cre8-c-calendar-year-modal__nav-button\"\n @click=\"${this.nextYearArray}\"\n variant=\"tertiary\"\n text=\"Next 12 years\"\n ?hideText=${true}\n iconName=\"keyboard-arrow-right\"\n ></cre8-button>\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-calendar-year-modal') === undefined) {\n customElements.define('cre8-calendar-year-modal', Cre8CalendarYearModal);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-calendar-year-modal': Cre8CalendarYearModal;\n }\n}\n\nexport default Cre8CalendarYearModal;\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-calendar-year-modal{display:flex;justify-content:space-around;align-items:center;padding:0.5rem}ol{font-family:var(--cre8-typography-body-default-font-family);font-size:var(--cre8-typography-body-default-font-size);font-weight:var(--cre8-typography-body-default-font-weight);line-height:var(--cre8-typography-body-default-line-height);text-decoration:var(--cre8-typography-body-default-text-decoration);text-transform:var(--cre8-typography-body-default-text-transform);display:grid;grid-row-gap:.33em;grid-template-columns:repeat(3, 1fr);list-style:none;margin:unset;padding:unset}li{display:inline-flex;justify-content:center}cre8-button{height:fit-content}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=calendar-year-modal.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-year-modal.styles.js","sourceRoot":"","sources":["../../../../components/date-picker/calendar-year-modal/calendar-year-modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,o6EAAo6E,CAAC;AACv7E,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-calendar-year-modal{display:flex;justify-content:space-around;align-items:center;padding:0.5rem}ol{font-family:var(--cre8-typography-body-default-font-family);font-size:var(--cre8-typography-body-default-font-size);font-weight:var(--cre8-typography-body-default-font-weight);line-height:var(--cre8-typography-body-default-line-height);text-decoration:var(--cre8-typography-body-default-text-decoration);text-transform:var(--cre8-typography-body-default-text-transform);display:grid;grid-row-gap:.33em;grid-template-columns:repeat(3, 1fr);list-style:none;margin:unset;padding:unset}li{display:inline-flex;justify-content:center}cre8-button{height:fit-content}`;\nexport default styles;\n"]}
|