@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 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../../../components/date-picker/date-picker.ts"],"names":[],"mappings":"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","sourcesContent":["import { html, nothing } from 'lit';\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport styles from './date-picker.styles';\nimport { Cre8Field } from '../field/field';\nimport './calendar/calendar';\n\n/**\n * The Date Picker component renders a form group with label, control, help text and validation styling much\n * like the Field component but exclusively for type=date.\n * Cre8DatePicker inherits the Cre8Field component.\n */\nexport class Cre8DatePicker extends Cre8Field {\n @query('input[type=\"date\"]')\n override field!: HTMLInputElement;\n\n /**\n * The type of the form field.\n * For Date Picker, this is always 'date'.\n */\n override type: 'text' | 'email' | 'number' | 'url' | 'tel' | 'password' | 'date' = 'date';\n static override styles = [styles];\n\n @state() showCalendar = false;\n\n /**\n * Quick Shortcuts Variant\n * @attr {boolean}\n *\n */\n @property({ type: Boolean, reflect: true })\n hasShortcuts?: boolean;\n /**\n * Handle Date On Input\n * 1) Set the input's value equal to the event.target.value when the input is changed.\n * 2) Set the internal form value of the input to the updated value\n */\n private handleDateOnInput(e: Event) {\n /* 1 */\n this.value = (e.target as HTMLInputElement).value;\n\n /* 2 */\n this._internals.setFormValue(this.value);\n }\n\n private handleCalendarSelect(e: CustomEvent) {\n this.value = e.detail.date;\n\n this._internals.setFormValue(this.value);\n this.showCalendar = false;\n }\n\n private handleOutsideClick(e: CustomEvent) {\n const calendarIcon = this.renderRoot.querySelector('.cre8-c-date-picker');\n\n if (this.showCalendar && !e.detail.composedPath.includes(calendarIcon)) {\n this.showCalendar = false;\n }\n }\n\n private toggleCalendar() {\n if (!this.disabled && !this.readonly) {\n this.showCalendar = !this.showCalendar;\n }\n }\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-date-picker', {\n 'cre8-is-error': this.isError,\n 'cre8-is-success': this.isSuccess,\n 'cre8-c-date-picker--disabled': this.disabled,\n 'cre8-c-date-picker--read-only': this.readonly,\n });\n\n this.type = 'date';\n\n return html`\n <div class=\"${componentClassNames}\">\n <label class=\"cre8-c-date-picker__label\" for=\"${this.fieldId}\"\n >${this.label}</label\n >\n <div class=\"cre8-c-date-picker__body\">\n <input\n class=\"cre8-c-date-picker__input\"\n autocomplete=${ifDefined(this.autocomplete)}\n type=\"${this.type}\"\n id=\"${this.fieldId}\"\n name=\"${ifDefined(this.name)}\"\n max=${ifDefined(this.max)}\n min=${ifDefined(this.min)}\n value=\"${ifDefined(this.value)}\"\n ?readonly=${this.readonly}\n ?required=${this.required}\n ?disabled=\"${this.disabled}\"\n aria-describedby=\"${ifDefined(this.fieldNoteAria())}\"\n placeholder=\"${ifDefined(this.placeholder)}\"\n @input=${this.handleDateOnInput}\n @click=${this.toggleCalendar}\n />\n <cre8-button\n class=\"cre8-c-date-picker__calendar-icon-button\"\n aria-expanded=\"${this.showCalendar}\"\n aria-label=\"Show Calendar\"\n ?disabled=\"${this.disabled || this.readonly}\"\n ?hideText=${true}\n iconName=\"calendar-datepicker\"\n variant=\"tertiary\"\n @click=\"${this.toggleCalendar}\"\n ></cre8-button>\n </div>\n ${this.showCalendar\n ? html`<cre8-calendar\n fieldDate=\"${ifDefined(this.value)}\"\n ?hasShortcuts=${this.hasShortcuts}\n @dateSelect=\"${this.handleCalendarSelect}\"\n @outsideClick=\"${this.handleOutsideClick}\"\n ></cre8-calendar>`\n : nothing}\n ${this.fieldNote || this.slotNotEmpty('fieldNote')\n ? html`<cre8-field-note\n id=${this.ariaDescribedBy}\n class=\"cre8-c-date-picker__field-note\"\n ><slot name=\"fieldNote\">${this.fieldNote}</slot></cre8-field-note\n >`\n : nothing}\n ${this.renderSuccessErrorFieldNote()}\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-date-picker') === undefined) {\n customElements.define('cre8-date-picker', Cre8DatePicker);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-date-picker': Cre8DatePicker;\n }\n}\n\nexport default Cre8DatePicker;\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}:host{display:block}.cre8-c-date-picker__label{font-family:var(--cre8-typography-label-small-font-family);font-size:var(--cre8-typography-label-small-font-size);font-weight:var(--cre8-typography-label-small-font-weight);line-height:var(--cre8-typography-label-small-line-height);text-decoration:var(--cre8-typography-label-small-text-decoration);text-transform:var(--cre8-typography-label-small-text-transform);display:block;margin-bottom:0.5rem}.cre8-c-date-picker__body{position:relative;display:flex;align-items:center}input::-webkit-calendar-picker-indicator{display:none}input[type=date]::-webkit-input-placeholder{visibility:hidden !important}.cre8-c-date-picker__calendar-icon-button{position:absolute;right:0.5rem;background:var(--cre8-color-bg-default);border:none;border-radius:0;--cre8-icon-height: size(3);--cre8-icon-width: size(3)}.cre8-c-date-picker--disabled .cre8-c-date-picker__calendar-icon-button,.cre8-c-date-picker--read-only .cre8-c-date-picker__calendar-icon-button{background:var(--cre8-color-bg-disabled)}.cre8-c-date-picker__input{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);outline:var(--cre8-border-width-focus) solid rgba(0,0,0,0);outline-offset:0.125rem;-webkit-appearance:none;width:100%;border-width:var(--cre8-border-width-default);border-style:solid;border-color:var(--cre8-color-border-strong);border-radius:var(--cre8-border-radius-default);padding:0.75rem 0.5rem;color:var(--cre8-color-content-default);background-color:var(--cre8-color-bg-default);transition:outline-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),border-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),background-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),color var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-date-picker__input:hover:not(:disabled),.cre8-c-date-picker__input:focus:not(:disabled),.cre8-c-date-picker__input:active:not(:disabled),.cre8-c-date-picker__input:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-is-error .cre8-c-date-picker__input:hover:not(:disabled),.cre8-is-error .cre8-c-date-picker__input:focus:not(:disabled),.cre8-is-error .cre8-c-date-picker__input:active:not(:disabled),.cre8-is-error .cre8-c-date-picker__input:focus-visible{outline-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-date-picker__input:hover:not(:disabled),.cre8-is-success .cre8-c-date-picker__input:focus:not(:disabled),.cre8-is-success .cre8-c-date-picker__input:active:not(:disabled),.cre8-is-success .cre8-c-date-picker__input:focus-visible{outline-color:var(--cre8-color-border-success)}.cre8-c-date-picker__input:disabled{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);color:var(--cre8-color-content-disabled);cursor:not-allowed}.cre8-c-date-picker__input:disabled::placeholder{color:var(--cre8-color-content-disabled)}.cre8-c-date-picker__input::placeholder{color:var(--cre8-color-content-subtle)}.cre8-is-error .cre8-c-date-picker__input{border-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-date-picker__input{border-color:var(--cre8-color-border-success)}.cre8-c-date-picker__input:read-only{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);cursor:default}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=date-picker.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.styles.js","sourceRoot":"","sources":["../../../components/date-picker/date-picker.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,o0KAAo0K,CAAC;AACv1K,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}:host{display:block}.cre8-c-date-picker__label{font-family:var(--cre8-typography-label-small-font-family);font-size:var(--cre8-typography-label-small-font-size);font-weight:var(--cre8-typography-label-small-font-weight);line-height:var(--cre8-typography-label-small-line-height);text-decoration:var(--cre8-typography-label-small-text-decoration);text-transform:var(--cre8-typography-label-small-text-transform);display:block;margin-bottom:0.5rem}.cre8-c-date-picker__body{position:relative;display:flex;align-items:center}input::-webkit-calendar-picker-indicator{display:none}input[type=date]::-webkit-input-placeholder{visibility:hidden !important}.cre8-c-date-picker__calendar-icon-button{position:absolute;right:0.5rem;background:var(--cre8-color-bg-default);border:none;border-radius:0;--cre8-icon-height: size(3);--cre8-icon-width: size(3)}.cre8-c-date-picker--disabled .cre8-c-date-picker__calendar-icon-button,.cre8-c-date-picker--read-only .cre8-c-date-picker__calendar-icon-button{background:var(--cre8-color-bg-disabled)}.cre8-c-date-picker__input{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);outline:var(--cre8-border-width-focus) solid rgba(0,0,0,0);outline-offset:0.125rem;-webkit-appearance:none;width:100%;border-width:var(--cre8-border-width-default);border-style:solid;border-color:var(--cre8-color-border-strong);border-radius:var(--cre8-border-radius-default);padding:0.75rem 0.5rem;color:var(--cre8-color-content-default);background-color:var(--cre8-color-bg-default);transition:outline-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),border-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),background-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),color var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-date-picker__input:hover:not(:disabled),.cre8-c-date-picker__input:focus:not(:disabled),.cre8-c-date-picker__input:active:not(:disabled),.cre8-c-date-picker__input:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-is-error .cre8-c-date-picker__input:hover:not(:disabled),.cre8-is-error .cre8-c-date-picker__input:focus:not(:disabled),.cre8-is-error .cre8-c-date-picker__input:active:not(:disabled),.cre8-is-error .cre8-c-date-picker__input:focus-visible{outline-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-date-picker__input:hover:not(:disabled),.cre8-is-success .cre8-c-date-picker__input:focus:not(:disabled),.cre8-is-success .cre8-c-date-picker__input:active:not(:disabled),.cre8-is-success .cre8-c-date-picker__input:focus-visible{outline-color:var(--cre8-color-border-success)}.cre8-c-date-picker__input:disabled{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);color:var(--cre8-color-content-disabled);cursor:not-allowed}.cre8-c-date-picker__input:disabled::placeholder{color:var(--cre8-color-content-disabled)}.cre8-c-date-picker__input::placeholder{color:var(--cre8-color-content-subtle)}.cre8-is-error .cre8-c-date-picker__input{border-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-date-picker__input{border-color:var(--cre8-color-border-success)}.cre8-c-date-picker__input:read-only{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);cursor:default}`;\nexport default styles;\n"]}
|
|
@@ -1,36 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var e = void 0, i = d.length - 1, o; i >= 0; i--)
|
|
7
|
-
(o = d[i]) && (e = o(t, s, e) || e);
|
|
8
|
-
return e && f(t, s, e), e;
|
|
9
|
-
};
|
|
10
|
-
const a = class a extends m {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments), this.variant = "horizontal";
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
const t = this.componentClassNames("cre8-c-divider", {
|
|
16
|
-
"cre8-c-divider--horizontal": this.variant === "horizontal",
|
|
17
|
-
"cre8-c-divider--vertical": this.variant === "vertical",
|
|
18
|
-
"cre8-c-divider--brand": this.status === "brand",
|
|
19
|
-
"cre8-c-divider--knockout": this.status === "knockout"
|
|
20
|
-
});
|
|
21
|
-
return h` <div class="${t}"><wbr></div> `;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
a.styles = [p];
|
|
25
|
-
let r = a;
|
|
26
|
-
c([
|
|
27
|
-
n()
|
|
28
|
-
], r.prototype, "variant");
|
|
29
|
-
c([
|
|
30
|
-
n()
|
|
31
|
-
], r.prototype, "status");
|
|
32
|
-
customElements.get("cre8-divider") === void 0 && customElements.define("cre8-divider", r);
|
|
33
|
-
export {
|
|
34
|
-
r as Cre8Divider,
|
|
35
|
-
r as default
|
|
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;
|
|
36
6
|
};
|
|
7
|
+
import { html, } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { Cre8Element } from '../cre8-element';
|
|
10
|
+
import styles from './divider.styles.js';
|
|
11
|
+
/**
|
|
12
|
+
* The divider component is a separator between sections of content or groups of items.
|
|
13
|
+
* It often contains a horizontal or vertical line.
|
|
14
|
+
*/
|
|
15
|
+
export class Cre8Divider extends Cre8Element {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
/**
|
|
19
|
+
* Divider variants
|
|
20
|
+
* - By default, the component renders the horizontal divider
|
|
21
|
+
* - **vertical** renders the vertical divider
|
|
22
|
+
*/
|
|
23
|
+
this.variant = 'horizontal';
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const componentClassNames = this.componentClassNames('cre8-c-divider', {
|
|
27
|
+
'cre8-c-divider--horizontal': this.variant === 'horizontal',
|
|
28
|
+
'cre8-c-divider--vertical': this.variant === 'vertical',
|
|
29
|
+
'cre8-c-divider--brand': this.status === 'brand',
|
|
30
|
+
'cre8-c-divider--knockout': this.status === 'knockout',
|
|
31
|
+
});
|
|
32
|
+
return html ` <div class="${componentClassNames}"><wbr></div> `;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
Cre8Divider.styles = [styles];
|
|
36
|
+
__decorate([
|
|
37
|
+
property()
|
|
38
|
+
], Cre8Divider.prototype, "variant", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
property()
|
|
41
|
+
], Cre8Divider.prototype, "status", void 0);
|
|
42
|
+
if (customElements.get('cre8-divider') === undefined) {
|
|
43
|
+
customElements.define('cre8-divider', Cre8Divider);
|
|
44
|
+
}
|
|
45
|
+
export default Cre8Divider;
|
|
46
|
+
//# sourceMappingURL=divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../components/divider/divider.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC;;;EAGE;AAEF,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QAGE;;;;UAIE;QAEE,YAAO,GAA8B,YAAY,CAAC;IAqBxD,CAAC;IAVC,MAAM;QACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,EAAE;YACnE,4BAA4B,EAAE,IAAI,CAAC,OAAO,KAAK,YAAY;YAC3D,0BAA0B,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;YACvD,uBAAuB,EAAE,IAAI,CAAC,MAAM,KAAK,OAAO;YAChD,0BAA0B,EAAE,IAAI,CAAC,MAAM,KAAK,UAAU;SACzD,CAAC,CAAC;QAEH,OAAO,IAAI,CAAA,gBAAgB,mBAAmB,gBAAgB,CAAC;IACnE,CAAC;;AA5BQ,kBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAQvB;IADH,QAAQ,EAAE;4CAC2C;AASlD;IADH,QAAQ,EAAE;2CACS;AActB,IAAI,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,SAAS,EAAE,CAAC;IACnD,cAAc,CAAC,MAAM,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;AACvD,CAAC;AAQD,eAAe,WAAW,CAAC","sourcesContent":["import { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './divider.styles.js';\n\n/**\n * The divider component is a separator between sections of content or groups of items.\n * It often contains a horizontal or vertical line.\n*/\n\nexport class Cre8Divider extends Cre8Element {\n static styles = [styles];\n\n /**\n * Divider variants\n * - By default, the component renders the horizontal divider\n * - **vertical** renders the vertical divider\n */\n @property()\n variant: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Status (a color variant prop)\n * - By default, the divider has gray color.\n * - **brand**, the divider has blue color.\n * - **knockout**, the divider has white color.\n */\n @property()\n status?: string;\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-divider', {\n 'cre8-c-divider--horizontal': this.variant === 'horizontal',\n 'cre8-c-divider--vertical': this.variant === 'vertical',\n 'cre8-c-divider--brand': this.status === 'brand',\n 'cre8-c-divider--knockout': this.status === 'knockout',\n });\n\n return html` <div class=\"${componentClassNames}\"><wbr></div> `;\n }\n}\n\nif (customElements.get('cre8-divider') === undefined) {\n customElements.define('cre8-divider', Cre8Divider);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-divider': Cre8Divider;\n }\n}\n\nexport default Cre8Divider;\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}:host{display:flex}.cre8-c-divider{background-color:var(--cre8-color-border-default);margin-top:0.5rem;margin-bottom:0.5rem}.cre8-c-divider--horizontal{width:100%;height:var(--cre8-border-width-default)}.cre8-c-divider--vertical{width:var(--cre8-border-width-default);height:100%;margin-top:0;margin-bottom:0;margin-left:0.5rem;margin-right:0.5rem}.cre8-c-divider--brand{background-color:var(--cre8-color-border-brand)}.cre8-c-divider--knockout{background-color:var(--cre8-color-border-knockout)}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=divider.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divider.styles.js","sourceRoot":"","sources":["../../../components/divider/divider.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,0vEAA0vE,CAAC;AAC7wE,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}:host{display:flex}.cre8-c-divider{background-color:var(--cre8-color-border-default);margin-top:0.5rem;margin-bottom:0.5rem}.cre8-c-divider--horizontal{width:100%;height:var(--cre8-border-width-default)}.cre8-c-divider--vertical{width:var(--cre8-border-width-default);height:100%;margin-top:0;margin-bottom:0;margin-left:0.5rem;margin-right:0.5rem}.cre8-c-divider--brand{background-color:var(--cre8-color-border-brand)}.cre8-c-divider--knockout{background-color:var(--cre8-color-border-knockout)}`;\nexport default styles;\n"]}
|
|
@@ -1,70 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var x = Object.defineProperty, n = (s, t, c, y) => {
|
|
7
|
-
for (var r = void 0, i = s.length - 1, l; i >= 0; i--)
|
|
8
|
-
(l = s[i]) && (r = l(t, c, r) || r);
|
|
9
|
-
return r && x(t, c, r), r;
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
6
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
7
|
+
import { html, nothing, } from 'lit';
|
|
8
|
+
import { property, query, state } from 'lit/decorators.js';
|
|
9
|
+
import svgCaretDown from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Caret_Down.svg?raw';
|
|
10
|
+
import { Cre8Element } from '../cre8-element';
|
|
11
|
+
import styles from './dropdown.styles.js';
|
|
12
|
+
/**
|
|
13
|
+
* The Dropdown menu itself is a container that can host multiple interactive items, commonly formatted as a list
|
|
14
|
+
*/
|
|
15
|
+
export class Cre8Dropdown extends Cre8Element {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.open = false;
|
|
19
|
+
/**
|
|
20
|
+
* Dropdown header
|
|
21
|
+
*/
|
|
22
|
+
this.buttonText = '';
|
|
23
|
+
/**
|
|
24
|
+
* button text represents as a link
|
|
25
|
+
*/
|
|
26
|
+
this.dropdownWithLink = false;
|
|
27
|
+
this._closeDropdown.bind(this);
|
|
28
|
+
}
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
super.connectedCallback();
|
|
31
|
+
document.addEventListener('click', this._closeDropdown);
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
super.disconnectedCallback();
|
|
35
|
+
document.removeEventListener('click', this._closeDropdown);
|
|
36
|
+
}
|
|
37
|
+
_toggleDropdown(e) {
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
e.stopPropagation();
|
|
40
|
+
this.open = !this.open;
|
|
41
|
+
if (this.open) {
|
|
42
|
+
this._updateDropdownPosition();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
_updateDropdownPosition() {
|
|
46
|
+
if (this.dropdownContent && this.open) {
|
|
47
|
+
if (this.maxHeight) {
|
|
48
|
+
this.dropdownContent.style.maxHeight = this.maxHeight;
|
|
49
|
+
this.dropdownContent.style.overflowY = 'auto';
|
|
50
|
+
}
|
|
51
|
+
if (this.dropdownWithLink) {
|
|
52
|
+
this.dropdownContent.style.top = '85%';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
_closeDropdown() {
|
|
57
|
+
this.open = false;
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
const componentClassNames = this.componentClassNames('cre8-c-dropdown', {
|
|
61
|
+
'cre8-c-dropdown--close': !this.open,
|
|
62
|
+
'cre8-c-dropdown--open': this.open,
|
|
63
|
+
});
|
|
64
|
+
return html `
|
|
36
65
|
<div class="cre8-c-dropdown-container">
|
|
37
|
-
${this.dropdownWithLink
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
66
|
+
${this.dropdownWithLink
|
|
67
|
+
? html `<a href="#" aria-haspopup="true" class="cre8-c-dropdown--toggle cre8-c-dropdown--link" aria-expanded="${this.open ? 'true' : 'false'}" @click="${this._toggleDropdown}">${this.buttonText}
|
|
68
|
+
${this.buttonText
|
|
69
|
+
? html `<cre8-icon svg='${svgCaretDown}' aria-hidden="true" class="cre8-c-dropdown--icon-link"></cre8-icon>`
|
|
70
|
+
: nothing}
|
|
71
|
+
</a>`
|
|
72
|
+
: html `<button aria-haspopup="true" class="cre8-c-dropdown--toggle cre8-c-dropdown--button" aria-expanded="${this.open ? 'true' : 'false'}" @click="${this._toggleDropdown}">${this.buttonText}
|
|
73
|
+
${this.buttonText
|
|
74
|
+
? html `<cre8-icon svg='${svgCaretDown}' aria-hidden="true" class="cre8-c-dropdown--icon-button"></cre8-icon>`
|
|
75
|
+
: nothing}
|
|
41
76
|
</button>`}
|
|
42
|
-
<ul role="list" class="${
|
|
77
|
+
<ul role="list" class="${componentClassNames}">
|
|
43
78
|
<slot></slot>
|
|
44
79
|
</ul>
|
|
45
80
|
</div>
|
|
46
81
|
`;
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
customElements.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
Cre8Dropdown.styles = [styles];
|
|
85
|
+
__decorate([
|
|
86
|
+
state()
|
|
87
|
+
], Cre8Dropdown.prototype, "open", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
property({ type: String })
|
|
90
|
+
], Cre8Dropdown.prototype, "buttonText", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
property()
|
|
93
|
+
], Cre8Dropdown.prototype, "maxHeight", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
query('.cre8-c-dropdown')
|
|
96
|
+
], Cre8Dropdown.prototype, "dropdownContent", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
property()
|
|
99
|
+
], Cre8Dropdown.prototype, "dropdownWithLink", void 0);
|
|
100
|
+
if (customElements.get('cre8-dropdown') === undefined) {
|
|
101
|
+
customElements.define('cre8-dropdown', Cre8Dropdown);
|
|
102
|
+
}
|
|
103
|
+
export default Cre8Dropdown;
|
|
104
|
+
//# sourceMappingURL=dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../components/dropdown/dropdown.ts"],"names":[],"mappings":"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","sourcesContent":["import { html, nothing, } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport svgCaretDown from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Caret_Down.svg?raw';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './dropdown.styles.js';\n\n/**\n * The Dropdown menu itself is a container that can host multiple interactive items, commonly formatted as a list\n */\n\nexport class Cre8Dropdown extends Cre8Element {\n static styles = [styles];\n\n @state() open = false;\n\n /**\n * Dropdown header\n */\n @property({ type: String })\n buttonText = '';\n\n /**\n * Enables scrolling once content reached to specified height, the height should mention in px units, ex: 100px\n */\n @property()\n maxHeight?: string;\n\n @query('.cre8-c-dropdown')\n dropdownContent!: HTMLElement;\n\n /**\n * button text represents as a link\n */\n @property()\n dropdownWithLink = false;\n\n constructor() {\n super();\n this._closeDropdown.bind(this);\n }\n\n connectedCallback() {\n super.connectedCallback();\n document.addEventListener('click', this._closeDropdown);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('click', this._closeDropdown);\n }\n\n private _toggleDropdown(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n this.open = !this.open;\n if (this.open) {\n this._updateDropdownPosition();\n }\n }\n\n\n private _updateDropdownPosition() {\n if (this.dropdownContent && this.open) {\n if (this.maxHeight) {\n this.dropdownContent.style.maxHeight = this.maxHeight;\n this.dropdownContent.style.overflowY = 'auto';\n }\n if (this.dropdownWithLink) {\n this.dropdownContent.style.top = '85%';\n }\n }\n }\n\n private _closeDropdown() {\n this.open = false;\n }\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-dropdown', {\n 'cre8-c-dropdown--close': !this.open,\n 'cre8-c-dropdown--open': this.open,\n });\n\n return html`\n <div class=\"cre8-c-dropdown-container\">\n ${this.dropdownWithLink\n ? html`<a href=\"#\" aria-haspopup=\"true\" class=\"cre8-c-dropdown--toggle cre8-c-dropdown--link\" aria-expanded=\"${this.open ? 'true' : 'false'}\" @click=\"${this._toggleDropdown}\">${this.buttonText}\n ${this.buttonText\n ? html`<cre8-icon svg='${svgCaretDown}' aria-hidden=\"true\" class=\"cre8-c-dropdown--icon-link\"></cre8-icon>`\n : nothing}\n </a>`\n : html`<button aria-haspopup=\"true\" class=\"cre8-c-dropdown--toggle cre8-c-dropdown--button\" aria-expanded=\"${this.open ? 'true' : 'false'}\" @click=\"${this._toggleDropdown}\">${this.buttonText}\n ${this.buttonText\n ? html`<cre8-icon svg='${svgCaretDown}' aria-hidden=\"true\" class=\"cre8-c-dropdown--icon-button\"></cre8-icon>`\n : nothing}\n </button>`\n}\n <ul role=\"list\" class=\"${componentClassNames}\">\n <slot></slot>\n </ul>\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-dropdown') === undefined) {\n customElements.define('cre8-dropdown', Cre8Dropdown);\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-dropdown': Cre8Dropdown;\n }\n}\n\nexport default Cre8Dropdown;\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-dropdown-container{display:inline-flex;position:relative}.cre8-c-dropdown{border:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);box-shadow:var(--cre8-shadow-default);border-radius:var(--cre8-border-radius-default);display:none;flex-direction:column;left:0;min-width:100%;padding:var(--cre8-spacing-8);position:absolute;top:100%;white-space:nowrap}.cre8-c-dropdown--open{display:flex}.cre8-c-dropdown--icon-button{color:var(--cre8-color-button-secondary-content);margin-top:0.5rem}.cre8-c-dropdown--icon-link{color:var(--cre8-color-content-link);margin-top:0.5rem}.cre8-c-dropdown--toggle{font-family:var(--cre8-typography-label-default-font-family);font-size:var(--cre8-typography-label-default-font-size);font-weight:var(--cre8-typography-label-default-font-weight);line-height:var(--cre8-typography-label-default-line-height);text-decoration:var(--cre8-typography-label-default-text-decoration);text-transform:var(--cre8-typography-label-default-text-transform);align-items:center;justify-content:space-between;display:flex;gap:var(--cre8-spacing-8);white-space:nowrap}.cre8-c-dropdown--button{background-color:var(--cre8-color-button-secondary-bg);border:var(--cre8-border-style-default) var(--cre8-border-width-default) var(--cre8-color-button-secondary-border);border-radius:var(--cre8-border-radius-button);color:var(--cre8-color-button-secondary-content);padding:var(--cre8-spacing-8) var(--cre8-spacing-16)}.cre8-c-dropdown--link{color:var(--cre8-color-content-link);background-color:var(--cre8-color-bg-transparent);text-decoration:underline}.cre8-c-dropdown--close{display:none}ul{list-style-type:none;padding:var(--cre8-spacing-0);margin:0}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=dropdown.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown.styles.js","sourceRoot":"","sources":["../../../components/dropdown/dropdown.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,w7GAAw7G,CAAC;AAC38G,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-dropdown-container{display:inline-flex;position:relative}.cre8-c-dropdown{border:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);box-shadow:var(--cre8-shadow-default);border-radius:var(--cre8-border-radius-default);display:none;flex-direction:column;left:0;min-width:100%;padding:var(--cre8-spacing-8);position:absolute;top:100%;white-space:nowrap}.cre8-c-dropdown--open{display:flex}.cre8-c-dropdown--icon-button{color:var(--cre8-color-button-secondary-content);margin-top:0.5rem}.cre8-c-dropdown--icon-link{color:var(--cre8-color-content-link);margin-top:0.5rem}.cre8-c-dropdown--toggle{font-family:var(--cre8-typography-label-default-font-family);font-size:var(--cre8-typography-label-default-font-size);font-weight:var(--cre8-typography-label-default-font-weight);line-height:var(--cre8-typography-label-default-line-height);text-decoration:var(--cre8-typography-label-default-text-decoration);text-transform:var(--cre8-typography-label-default-text-transform);align-items:center;justify-content:space-between;display:flex;gap:var(--cre8-spacing-8);white-space:nowrap}.cre8-c-dropdown--button{background-color:var(--cre8-color-button-secondary-bg);border:var(--cre8-border-style-default) var(--cre8-border-width-default) var(--cre8-color-button-secondary-border);border-radius:var(--cre8-border-radius-button);color:var(--cre8-color-button-secondary-content);padding:var(--cre8-spacing-8) var(--cre8-spacing-16)}.cre8-c-dropdown--link{color:var(--cre8-color-content-link);background-color:var(--cre8-color-bg-transparent);text-decoration:underline}.cre8-c-dropdown--close{display:none}ul{list-style-type:none;padding:var(--cre8-spacing-0);margin:0}`;\nexport default styles;\n"]}
|
|
@@ -1,33 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var t = void 0, i = d.length - 1, s; i >= 0; i--)
|
|
7
|
-
(s = d[i]) && (t = s(e, r, t) || t);
|
|
8
|
-
return t && m(e, r, t), t;
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
6
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
import { html, } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { Cre8Element } from '../cre8-element';
|
|
10
|
+
import styles from './dropdown-item.styles.js';
|
|
11
|
+
/**
|
|
12
|
+
* The Dropdown item component is designed to be used with Dropdown component, each item represents a
|
|
13
|
+
* selectable option or action within the dropdown menu. It can be configured to trigger actions, navigate
|
|
14
|
+
* to links, initiate commands when clicked.
|
|
15
|
+
*/
|
|
16
|
+
export class Cre8DropdownItem extends Cre8Element {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.ariaLabel = '';
|
|
20
|
+
}
|
|
21
|
+
_handleClick(e) {
|
|
22
|
+
this.dispatchEvent(new Event('dropdown-item-selected', e));
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
const componentClassNames = this.componentClassNames('cre8-dropdown-item', {});
|
|
26
|
+
const linkAriaLabel = this.ariaLabel || `Link to ${this.textContent}` || 'Drop down Item';
|
|
27
|
+
return html `<li class="${componentClassNames}" role="listitem">
|
|
28
|
+
<button aria-label="${linkAriaLabel}" @click=${this._handleClick}><slot></slot></button>
|
|
21
29
|
</li>`;
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
customElements.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
Cre8DropdownItem.styles = [styles];
|
|
33
|
+
__decorate([
|
|
34
|
+
property({ type: String })
|
|
35
|
+
], Cre8DropdownItem.prototype, "ariaLabel", void 0);
|
|
36
|
+
if (customElements.get('cre8-dropdown-item') === undefined) {
|
|
37
|
+
customElements.define('cre8-dropdown-item', Cre8DropdownItem);
|
|
38
|
+
}
|
|
39
|
+
export default Cre8DropdownItem;
|
|
40
|
+
//# sourceMappingURL=dropdown-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-item.js","sourceRoot":"","sources":["../../../components/dropdown-item/dropdown-item.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C;;;;GAIG;AACH,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAAjD;;QAIM,cAAS,GAAG,EAAE,CAAC;IAarB,CAAC;IAXS,YAAY,CAAC,CAAa;QAC9B,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,wBAAwB,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM;QACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;QAC/E,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,IAAI,WAAW,IAAI,CAAC,WAAW,EAAE,IAAI,gBAAgB,CAAC;QAC1F,OAAO,IAAI,CAAA,cAAc,mBAAmB;8BACpB,aAAa,YAAY,IAAI,CAAC,YAAY;YAC5D,CAAC;IACX,CAAC;;AAfQ,uBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAGvB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACR;AAerB,IAAI,cAAc,CAAC,GAAG,CAAC,oBAAoB,CAAC,KAAK,SAAS,EAAE,CAAC;IACzD,cAAc,CAAC,MAAM,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;AAClE,CAAC;AAQD,eAAe,gBAAgB,CAAC","sourcesContent":["import { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './dropdown-item.styles.js';\n\n/**\n * The Dropdown item component is designed to be used with Dropdown component, each item represents a\n * selectable option or action within the dropdown menu. It can be configured to trigger actions, navigate\n * to links, initiate commands when clicked.\n */\nexport class Cre8DropdownItem extends Cre8Element {\n static styles = [styles];\n\n @property({ type: String })\n ariaLabel = '';\n\n private _handleClick(e: MouseEvent) {\n this.dispatchEvent(new Event('dropdown-item-selected', e));\n }\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-dropdown-item', {});\n const linkAriaLabel = this.ariaLabel || `Link to ${this.textContent}` || 'Drop down Item';\n return html`<li class=\"${componentClassNames}\" role=\"listitem\">\n <button aria-label=\"${linkAriaLabel}\" @click=${this._handleClick}><slot></slot></button>\n </li>`;\n }\n}\n\nif (customElements.get('cre8-dropdown-item') === undefined) {\n customElements.define('cre8-dropdown-item', Cre8DropdownItem);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-dropdown-item': Cre8DropdownItem;\n }\n}\n\nexport default Cre8DropdownItem;\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-dropdown-item{list-style-type:none}.cre8-dropdown-item>button{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);background-color:var(--cre8-color-bg-default);border:var(--cre8-border-width-none);border-radius:var(--cre8-border-radius-default);color:var(--cre8-color-content-default);width:100%;cursor:pointer;margin:var(--cre8-spacing-0);padding:var(--cre8-spacing-8) var(--cre8-spacing-8);text-align:left}.cre8-dropdown-item>button:active,.cre8-dropdown-item>button:hover,.cre8-dropdown-item>button:focus{background-color:var(--cre8-color-bg-brand-hover);color:var(--cre8-color-content-default);outline:var(--cre8-border-width-none)}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=dropdown-item.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-item.styles.js","sourceRoot":"","sources":["../../../components/dropdown-item/dropdown-item.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,0sFAA0sF,CAAC;AAC7tF,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-dropdown-item{list-style-type:none}.cre8-dropdown-item>button{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);background-color:var(--cre8-color-bg-default);border:var(--cre8-border-width-none);border-radius:var(--cre8-border-radius-default);color:var(--cre8-color-content-default);width:100%;cursor:pointer;margin:var(--cre8-spacing-0);padding:var(--cre8-spacing-8) var(--cre8-spacing-8);text-align:left}.cre8-dropdown-item>button:active,.cre8-dropdown-item>button:hover,.cre8-dropdown-item>button:focus{background-color:var(--cre8-color-bg-brand-hover);color:var(--cre8-color-content-default);outline:var(--cre8-border-width-none)}`;\nexport default styles;\n"]}
|
|
@@ -1,42 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var e = void 0, i = l.length - 1, c; i >= 0; i--)
|
|
7
|
-
(c = l[i]) && (e = c(t, o, e) || e);
|
|
8
|
-
return e && f(t, o, e), e;
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
6
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import { html, } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { Cre8Element } from '../cre8-element';
|
|
10
|
+
import styles from './feature.styles.js';
|
|
11
|
+
/**
|
|
12
|
+
* @slot - The component content
|
|
13
|
+
*/
|
|
14
|
+
export class Cre8Feature extends Cre8Element {
|
|
15
|
+
render() {
|
|
16
|
+
const componentClassNames = this.componentClassNames('cre8-c-feature', {
|
|
17
|
+
'cre8-c-feature--inverted': this.inverted === true,
|
|
18
|
+
});
|
|
19
|
+
return html `
|
|
20
|
+
<div class="${componentClassNames}" part="feature">
|
|
17
21
|
<div class="cre8-c-feature__body" part="body">
|
|
18
22
|
<slot></slot>
|
|
19
23
|
</div>
|
|
20
|
-
${this.imgAlt
|
|
24
|
+
${this.imgAlt
|
|
25
|
+
? html `<div class="cre8-c-feature__media">
|
|
21
26
|
<img class="cre8-c-feature__image" src=${this.imgSrc} alt=${this.imgAlt} part="image" />
|
|
22
|
-
</div>`
|
|
27
|
+
</div>`
|
|
28
|
+
: ''}
|
|
23
29
|
</div>
|
|
24
30
|
`;
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
customElements.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
Cre8Feature.styles = [styles];
|
|
34
|
+
__decorate([
|
|
35
|
+
property()
|
|
36
|
+
], Cre8Feature.prototype, "imgSrc", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
property()
|
|
39
|
+
], Cre8Feature.prototype, "imgAlt", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
property({ type: Boolean, reflect: true })
|
|
42
|
+
], Cre8Feature.prototype, "inverted", void 0);
|
|
43
|
+
if (customElements.get('cre8-feature') === undefined) {
|
|
44
|
+
customElements.define('cre8-feature', Cre8Feature);
|
|
45
|
+
}
|
|
46
|
+
export default Cre8Feature;
|
|
47
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../components/feature/feature.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAsB1C,MAAM;QACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,EAAE;YACnE,0BAA0B,EAAE,IAAI,CAAC,QAAQ,KAAK,IAAI;SACrD,CAAC,CAAC;QAEH,OAAO,IAAI,CAAA;oBACG,mBAAmB;;;;UAI7B,IAAI,CAAC,MAAM;YACb,CAAC,CAAC,IAAI,CAAA;uDACyC,IAAI,CAAC,MAAM,QAAQ,IAAI,CAAC,MAAM;mBAClE;YACX,CAAC,CAAC,EAAE;;KAEP,CAAC;IACJ,CAAC;;AAtCQ,kBAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAMvB;IADH,QAAQ,EAAE;2CACS;AAMhB;IADH,QAAQ,EAAE;2CACS;AAOhB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACpB;AAsBzB,IAAI,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,SAAS,EAAE,CAAC;IACnD,cAAc,CAAC,MAAM,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;AACvD,CAAC;AAQD,eAAe,WAAW,CAAC","sourcesContent":["import { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './feature.styles.js';\n\n/**\n * @slot - The component content\n */\nexport class Cre8Feature extends Cre8Element {\n static styles = [styles];\n\n /**\n * Image source\n */\n @property()\n imgSrc?: string;\n\n /**\n * Image alt text\n */\n @property()\n imgAlt?: string;\n\n /**\n * Inverted variant\n * 1) Used for dark backgrounds\n */\n @property({ type: Boolean, reflect: true })\n inverted?: boolean;\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-feature', {\n 'cre8-c-feature--inverted': this.inverted === true,\n });\n\n return html`\n <div class=\"${componentClassNames}\" part=\"feature\">\n <div class=\"cre8-c-feature__body\" part=\"body\">\n <slot></slot>\n </div>\n ${this.imgAlt\n ? html`<div class=\"cre8-c-feature__media\">\n <img class=\"cre8-c-feature__image\" src=${this.imgSrc} alt=${this.imgAlt} part=\"image\" />\n </div>`\n : ''}\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-feature') === undefined) {\n customElements.define('cre8-feature', Cre8Feature);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-feature': Cre8Feature;\n }\n}\n\nexport default Cre8Feature;\n"]}
|