kemet-ui 2.0.0 → 2.0.2
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/custom-elements.json +305 -305
- package/dist/components/kemet-alert/docs/stories.js.map +1 -1
- package/dist/components/kemet-avatar/docs/stories.d.ts +1 -0
- package/dist/components/kemet-avatar/docs/stories.js +5 -4
- package/dist/components/kemet-avatar/docs/stories.js.map +1 -1
- package/dist/components/kemet-card/docs/stories.js.map +1 -0
- package/dist/components/kemet-carousel/docs/stories.js.map +1 -0
- package/dist/components/kemet-carousel/kemet-carousel.d.ts +13 -0
- package/dist/components/kemet-carousel/kemet-carousel.js +2 -0
- package/dist/components/kemet-carousel/kemet-carousel.js.map +1 -1
- package/dist/components/kemet-checkbox/docs/stories.js.map +1 -0
- package/dist/components/kemet-combo/docs/stories.js.map +1 -0
- package/dist/components/kemet-count/docs/stories.js.map +1 -0
- package/dist/components/kemet-draggable/docs/stories.js.map +1 -0
- package/dist/components/kemet-draggable/kemet-draggable.d.ts +7 -0
- package/dist/components/kemet-draggable/kemet-draggable.js.map +1 -1
- package/dist/components/kemet-drawer/docs/stories.js.map +1 -0
- package/dist/components/kemet-fab/docs/stories.js.map +1 -0
- package/dist/components/kemet-field/docs/stories.js.map +1 -0
- package/dist/components/kemet-flipcard/docs/stories.js.map +1 -0
- package/dist/components/kemet-icon/docs/stories.js.map +1 -0
- package/dist/components/kemet-input/docs/stories.js.map +1 -0
- package/dist/components/kemet-modal/docs/stories.js.map +1 -0
- package/dist/components/kemet-password/docs/stories.js.map +1 -0
- package/dist/components/kemet-popper/docs/stories.js.map +1 -0
- package/dist/components/kemet-radio/docs/stories.js.map +1 -0
- package/dist/components/kemet-rotator/docs/stories.js.map +1 -0
- package/dist/components/kemet-scroll-link/docs/stories.js.map +1 -0
- package/dist/components/kemet-scroll-nav/docs/stories.js.map +1 -0
- package/dist/components/kemet-scroll-nav/styles.js +1 -0
- package/dist/components/kemet-scroll-nav/styles.js.map +1 -1
- package/dist/components/kemet-scroll-snap/docs/stories.js.map +1 -0
- package/dist/components/kemet-select/docs/stories.js.map +1 -0
- package/dist/components/kemet-sortable/docs/stories.js.map +1 -0
- package/dist/components/kemet-svgs/docs/stories.js.map +1 -0
- package/dist/components/kemet-tabs/docs/stories.js.map +1 -0
- package/dist/components/kemet-tabs/kemet-tab-panel.js.map +1 -1
- package/dist/components/kemet-tabs/kemet-tabs.d.ts +1 -5
- package/dist/components/kemet-tabs/kemet-tabs.js +8 -27
- package/dist/components/kemet-tabs/kemet-tabs.js.map +1 -1
- package/dist/components/kemet-tabs/styles.js +14 -0
- package/dist/components/kemet-tabs/styles.js.map +1 -1
- package/dist/components/kemet-tabs/types.d.ts +1 -3
- package/dist/components/kemet-tabs/types.js.map +1 -1
- package/dist/components/kemet-textarea/docs/stories.js.map +1 -0
- package/dist/components/kemet-toggle/docs/stories.js.map +1 -0
- package/dist/components/kemet-tooltip/docs/stories.js.map +1 -0
- package/dist/components/kemet-tracker/docs/stories.js.map +1 -0
- package/dist/components/kemet-upload/docs/stories.js.map +1 -0
- package/dist/kemet-components.bundle.js +7 -7
- package/dist/kemet-components.bundle.js.map +1 -1
- package/dist/kemet-components.cjs +1802 -1804
- package/dist/kemet-components.js +1802 -1804
- package/dist/styles/components/_config.scss +4 -0
- package/dist/styles/components/accordion.scss +9 -0
- package/dist/styles/components/drawer.scss +11 -0
- package/dist/styles/components/modal.scss +8 -0
- package/dist/styles/components/scrollsnap.scss +11 -0
- package/dist/styles/core/attributes.scss +38 -0
- package/dist/styles/core/layout.scss +169 -0
- package/dist/styles/kemet.base.css +1 -0
- package/dist/styles/kemet.base.scss +28 -0
- package/dist/styles/kemet.components.scss +4 -0
- package/dist/styles/kemet.core.css +155 -154
- package/dist/styles/kemet.core.css.map +1 -1
- package/dist/styles/kemet.core.scss +2 -0
- package/dist/styles/shared/_config.scss +358 -0
- package/dist/styles/shared/_helpers.scss +458 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/.storybook/decorators.d.ts +0 -2
- package/dist/.storybook/decorators.js +0 -28
- package/dist/.storybook/decorators.js.map +0 -1
- package/dist/components/kemet-alert/stories.d.ts +0 -9
- package/dist/components/kemet-alert/stories.js +0 -77
- package/dist/components/kemet-alert/stories.js.map +0 -1
- package/dist/components/kemet-avatar/stories.d.ts +0 -10
- package/dist/components/kemet-avatar/stories.js +0 -85
- package/dist/components/kemet-avatar/stories.js.map +0 -1
- package/dist/src/components/kemet-accordion/kemet-accordion-panel.d.ts +0 -51
- package/dist/src/components/kemet-accordion/kemet-accordion-panel.js +0 -136
- package/dist/src/components/kemet-accordion/kemet-accordion-panel.js.map +0 -1
- package/dist/src/components/kemet-accordion/kemet-accordion.d.ts +0 -37
- package/dist/src/components/kemet-accordion/kemet-accordion.js +0 -129
- package/dist/src/components/kemet-accordion/kemet-accordion.js.map +0 -1
- package/dist/src/components/kemet-accordion/stories.d.ts +0 -10
- package/dist/src/components/kemet-accordion/stories.js +0 -44
- package/dist/src/components/kemet-accordion/stories.js.map +0 -1
- package/dist/src/components/kemet-accordion/styles.d.ts +0 -2
- package/dist/src/components/kemet-accordion/styles.js +0 -42
- package/dist/src/components/kemet-accordion/styles.js.map +0 -1
- package/dist/src/components/kemet-accordion/types.d.ts +0 -9
- package/dist/src/components/kemet-accordion/types.js +0 -2
- package/dist/src/components/kemet-accordion/types.js.map +0 -1
- package/dist/src/components/kemet-alert/docs/stories.d.ts +0 -9
- package/dist/src/components/kemet-alert/docs/stories.js +0 -77
- package/dist/src/components/kemet-alert/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-alert/kemet-alert.d.ts +0 -52
- package/dist/src/components/kemet-alert/kemet-alert.js +0 -108
- package/dist/src/components/kemet-alert/kemet-alert.js.map +0 -1
- package/dist/src/components/kemet-alert/styles.d.ts +0 -1
- package/dist/src/components/kemet-alert/styles.js +0 -104
- package/dist/src/components/kemet-alert/styles.js.map +0 -1
- package/dist/src/components/kemet-alert/types.d.ts +0 -10
- package/dist/src/components/kemet-alert/types.js +0 -2
- package/dist/src/components/kemet-alert/types.js.map +0 -1
- package/dist/src/components/kemet-avatar/docs/stories.d.ts +0 -11
- package/dist/src/components/kemet-avatar/docs/stories.js +0 -86
- package/dist/src/components/kemet-avatar/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-avatar/kemet-avatar.d.ts +0 -43
- package/dist/src/components/kemet-avatar/kemet-avatar.js +0 -78
- package/dist/src/components/kemet-avatar/kemet-avatar.js.map +0 -1
- package/dist/src/components/kemet-avatar/kemet-avatars.d.ts +0 -20
- package/dist/src/components/kemet-avatar/kemet-avatars.js +0 -25
- package/dist/src/components/kemet-avatar/kemet-avatars.js.map +0 -1
- package/dist/src/components/kemet-avatar/styles.d.ts +0 -2
- package/dist/src/components/kemet-avatar/styles.js +0 -58
- package/dist/src/components/kemet-avatar/styles.js.map +0 -1
- package/dist/src/components/kemet-avatar/types.d.ts +0 -8
- package/dist/src/components/kemet-avatar/types.js +0 -2
- package/dist/src/components/kemet-avatar/types.js.map +0 -1
- package/dist/src/components/kemet-badge/docs/stories.d.ts +0 -9
- package/dist/src/components/kemet-badge/docs/stories.js +0 -40
- package/dist/src/components/kemet-badge/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-badge/kemet-badge.d.ts +0 -30
- package/dist/src/components/kemet-badge/kemet-badge.js +0 -55
- package/dist/src/components/kemet-badge/kemet-badge.js.map +0 -1
- package/dist/src/components/kemet-badge/styles.d.ts +0 -1
- package/dist/src/components/kemet-badge/styles.js +0 -40
- package/dist/src/components/kemet-badge/styles.js.map +0 -1
- package/dist/src/components/kemet-badge/types.d.ts +0 -6
- package/dist/src/components/kemet-badge/types.js +0 -2
- package/dist/src/components/kemet-badge/types.js.map +0 -1
- package/dist/src/components/kemet-button/docs/stories.d.ts +0 -9
- package/dist/src/components/kemet-button/docs/stories.js +0 -51
- package/dist/src/components/kemet-button/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-button/kemet-button.d.ts +0 -89
- package/dist/src/components/kemet-button/kemet-button.js +0 -153
- package/dist/src/components/kemet-button/kemet-button.js.map +0 -1
- package/dist/src/components/kemet-button/styles.d.ts +0 -1
- package/dist/src/components/kemet-button/styles.js +0 -73
- package/dist/src/components/kemet-button/styles.js.map +0 -1
- package/dist/src/components/kemet-button/types.d.ts +0 -10
- package/dist/src/components/kemet-button/types.js +0 -2
- package/dist/src/components/kemet-button/types.js.map +0 -1
- package/dist/src/components/kemet-card/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-card/kemet-card.d.ts +0 -47
- package/dist/src/components/kemet-card/kemet-card.js +0 -65
- package/dist/src/components/kemet-card/kemet-card.js.map +0 -1
- package/dist/src/components/kemet-card/styles.d.ts +0 -1
- package/dist/src/components/kemet-card/styles.js +0 -63
- package/dist/src/components/kemet-card/styles.js.map +0 -1
- package/dist/src/components/kemet-card/types.d.ts +0 -3
- package/dist/src/components/kemet-card/types.js +0 -2
- package/dist/src/components/kemet-card/types.js.map +0 -1
- package/dist/src/components/kemet-carousel/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-carousel/kemet-carousel-current.d.ts +0 -26
- package/dist/src/components/kemet-carousel/kemet-carousel-current.js +0 -44
- package/dist/src/components/kemet-carousel/kemet-carousel-current.js.map +0 -1
- package/dist/src/components/kemet-carousel/kemet-carousel-first.d.ts +0 -25
- package/dist/src/components/kemet-carousel/kemet-carousel-first.js +0 -50
- package/dist/src/components/kemet-carousel/kemet-carousel-first.js.map +0 -1
- package/dist/src/components/kemet-carousel/kemet-carousel-last.d.ts +0 -25
- package/dist/src/components/kemet-carousel/kemet-carousel-last.js +0 -50
- package/dist/src/components/kemet-carousel/kemet-carousel-last.js.map +0 -1
- package/dist/src/components/kemet-carousel/kemet-carousel-link.d.ts +0 -31
- package/dist/src/components/kemet-carousel/kemet-carousel-link.js +0 -64
- package/dist/src/components/kemet-carousel/kemet-carousel-link.js.map +0 -1
- package/dist/src/components/kemet-carousel/kemet-carousel-next.d.ts +0 -25
- package/dist/src/components/kemet-carousel/kemet-carousel-next.js +0 -50
- package/dist/src/components/kemet-carousel/kemet-carousel-next.js.map +0 -1
- package/dist/src/components/kemet-carousel/kemet-carousel-prev.d.ts +0 -25
- package/dist/src/components/kemet-carousel/kemet-carousel-prev.js +0 -50
- package/dist/src/components/kemet-carousel/kemet-carousel-prev.js.map +0 -1
- package/dist/src/components/kemet-carousel/kemet-carousel-slide.d.ts +0 -29
- package/dist/src/components/kemet-carousel/kemet-carousel-slide.js +0 -53
- package/dist/src/components/kemet-carousel/kemet-carousel-slide.js.map +0 -1
- package/dist/src/components/kemet-carousel/kemet-carousel-total.d.ts +0 -26
- package/dist/src/components/kemet-carousel/kemet-carousel-total.js +0 -44
- package/dist/src/components/kemet-carousel/kemet-carousel-total.js.map +0 -1
- package/dist/src/components/kemet-carousel/kemet-carousel.d.ts +0 -114
- package/dist/src/components/kemet-carousel/kemet-carousel.js +0 -410
- package/dist/src/components/kemet-carousel/kemet-carousel.js.map +0 -1
- package/dist/src/components/kemet-carousel/styles.d.ts +0 -1
- package/dist/src/components/kemet-carousel/styles.js +0 -66
- package/dist/src/components/kemet-carousel/styles.js.map +0 -1
- package/dist/src/components/kemet-carousel/types.d.ts +0 -21
- package/dist/src/components/kemet-carousel/types.js +0 -2
- package/dist/src/components/kemet-carousel/types.js.map +0 -1
- package/dist/src/components/kemet-checkbox/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-checkbox/kemet-checkbox.d.ts +0 -71
- package/dist/src/components/kemet-checkbox/kemet-checkbox.js +0 -192
- package/dist/src/components/kemet-checkbox/kemet-checkbox.js.map +0 -1
- package/dist/src/components/kemet-checkbox/styles.d.ts +0 -1
- package/dist/src/components/kemet-checkbox/styles.js +0 -83
- package/dist/src/components/kemet-checkbox/styles.js.map +0 -1
- package/dist/src/components/kemet-checkbox/types.d.ts +0 -15
- package/dist/src/components/kemet-checkbox/types.js +0 -2
- package/dist/src/components/kemet-checkbox/types.js.map +0 -1
- package/dist/src/components/kemet-combo/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-combo/kemet-combo.d.ts +0 -50
- package/dist/src/components/kemet-combo/kemet-combo.js +0 -162
- package/dist/src/components/kemet-combo/kemet-combo.js.map +0 -1
- package/dist/src/components/kemet-combo/styles.d.ts +0 -1
- package/dist/src/components/kemet-combo/styles.js +0 -44
- package/dist/src/components/kemet-combo/styles.js.map +0 -1
- package/dist/src/components/kemet-combo/types.d.ts +0 -5
- package/dist/src/components/kemet-combo/types.js +0 -2
- package/dist/src/components/kemet-combo/types.js.map +0 -1
- package/dist/src/components/kemet-count/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-count/kemet-count.d.ts +0 -39
- package/dist/src/components/kemet-count/kemet-count.js +0 -98
- package/dist/src/components/kemet-count/kemet-count.js.map +0 -1
- package/dist/src/components/kemet-draggable/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-draggable/kemet-draggable.d.ts +0 -49
- package/dist/src/components/kemet-draggable/kemet-draggable.js +0 -137
- package/dist/src/components/kemet-draggable/kemet-draggable.js.map +0 -1
- package/dist/src/components/kemet-draggable/types.d.ts +0 -6
- package/dist/src/components/kemet-draggable/types.js +0 -2
- package/dist/src/components/kemet-draggable/types.js.map +0 -1
- package/dist/src/components/kemet-drawer/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-drawer/kemet-drawer.d.ts +0 -48
- package/dist/src/components/kemet-drawer/kemet-drawer.js +0 -95
- package/dist/src/components/kemet-drawer/kemet-drawer.js.map +0 -1
- package/dist/src/components/kemet-drawer/styles.d.ts +0 -2
- package/dist/src/components/kemet-drawer/styles.js +0 -314
- package/dist/src/components/kemet-drawer/styles.js.map +0 -1
- package/dist/src/components/kemet-drawer/types.d.ts +0 -8
- package/dist/src/components/kemet-drawer/types.js +0 -2
- package/dist/src/components/kemet-drawer/types.js.map +0 -1
- package/dist/src/components/kemet-fab/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-fab/kemet-fab.d.ts +0 -49
- package/dist/src/components/kemet-fab/kemet-fab.js +0 -107
- package/dist/src/components/kemet-fab/kemet-fab.js.map +0 -1
- package/dist/src/components/kemet-fab/styles.d.ts +0 -1
- package/dist/src/components/kemet-fab/styles.js +0 -95
- package/dist/src/components/kemet-fab/styles.js.map +0 -1
- package/dist/src/components/kemet-fab/types.d.ts +0 -8
- package/dist/src/components/kemet-fab/types.js +0 -2
- package/dist/src/components/kemet-fab/types.js.map +0 -1
- package/dist/src/components/kemet-field/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-field/kemet-field.d.ts +0 -61
- package/dist/src/components/kemet-field/kemet-field.js +0 -144
- package/dist/src/components/kemet-field/kemet-field.js.map +0 -1
- package/dist/src/components/kemet-field/styles.d.ts +0 -1
- package/dist/src/components/kemet-field/styles.js +0 -61
- package/dist/src/components/kemet-field/styles.js.map +0 -1
- package/dist/src/components/kemet-field/types.d.ts +0 -13
- package/dist/src/components/kemet-field/types.js +0 -2
- package/dist/src/components/kemet-field/types.js.map +0 -1
- package/dist/src/components/kemet-flipcard/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-flipcard/kemet-flipcard-trigger.d.ts +0 -21
- package/dist/src/components/kemet-flipcard/kemet-flipcard-trigger.js +0 -42
- package/dist/src/components/kemet-flipcard/kemet-flipcard-trigger.js.map +0 -1
- package/dist/src/components/kemet-flipcard/kemet-flipcard.d.ts +0 -52
- package/dist/src/components/kemet-flipcard/kemet-flipcard.js +0 -131
- package/dist/src/components/kemet-flipcard/kemet-flipcard.js.map +0 -1
- package/dist/src/components/kemet-flipcard/styles.d.ts +0 -1
- package/dist/src/components/kemet-flipcard/styles.js +0 -85
- package/dist/src/components/kemet-flipcard/styles.js.map +0 -1
- package/dist/src/components/kemet-flipcard/types.d.ts +0 -7
- package/dist/src/components/kemet-flipcard/types.js +0 -2
- package/dist/src/components/kemet-flipcard/types.js.map +0 -1
- package/dist/src/components/kemet-icon/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-icon/kemet-icon.d.ts +0 -28
- package/dist/src/components/kemet-icon/kemet-icon.js +0 -114
- package/dist/src/components/kemet-icon/kemet-icon.js.map +0 -1
- package/dist/src/components/kemet-icon/styles.d.ts +0 -1
- package/dist/src/components/kemet-icon/styles.js +0 -9
- package/dist/src/components/kemet-icon/styles.js.map +0 -1
- package/dist/src/components/kemet-icon/types.d.ts +0 -5
- package/dist/src/components/kemet-icon/types.js +0 -2
- package/dist/src/components/kemet-icon/types.js.map +0 -1
- package/dist/src/components/kemet-input/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-input/kemet-input.d.ts +0 -193
- package/dist/src/components/kemet-input/kemet-input.js +0 -417
- package/dist/src/components/kemet-input/kemet-input.js.map +0 -1
- package/dist/src/components/kemet-input/styles.d.ts +0 -1
- package/dist/src/components/kemet-input/styles.js +0 -115
- package/dist/src/components/kemet-input/styles.js.map +0 -1
- package/dist/src/components/kemet-input/types.d.ts +0 -35
- package/dist/src/components/kemet-input/types.js +0 -2
- package/dist/src/components/kemet-input/types.js.map +0 -1
- package/dist/src/components/kemet-modal/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-modal/kemet-modal-close.d.ts +0 -21
- package/dist/src/components/kemet-modal/kemet-modal-close.js +0 -40
- package/dist/src/components/kemet-modal/kemet-modal-close.js.map +0 -1
- package/dist/src/components/kemet-modal/kemet-modal.d.ts +0 -49
- package/dist/src/components/kemet-modal/kemet-modal.js +0 -131
- package/dist/src/components/kemet-modal/kemet-modal.js.map +0 -1
- package/dist/src/components/kemet-modal/styles.d.ts +0 -2
- package/dist/src/components/kemet-modal/styles.js +0 -267
- package/dist/src/components/kemet-modal/styles.js.map +0 -1
- package/dist/src/components/kemet-modal/types.d.ts +0 -8
- package/dist/src/components/kemet-modal/types.js +0 -2
- package/dist/src/components/kemet-modal/types.js.map +0 -1
- package/dist/src/components/kemet-password/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-password/kemet-password.d.ts +0 -77
- package/dist/src/components/kemet-password/kemet-password.js +0 -184
- package/dist/src/components/kemet-password/kemet-password.js.map +0 -1
- package/dist/src/components/kemet-password/styles.d.ts +0 -1
- package/dist/src/components/kemet-password/styles.js +0 -80
- package/dist/src/components/kemet-password/styles.js.map +0 -1
- package/dist/src/components/kemet-password/types.d.ts +0 -10
- package/dist/src/components/kemet-password/types.js +0 -2
- package/dist/src/components/kemet-password/types.js.map +0 -1
- package/dist/src/components/kemet-popper/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-popper/kemet-popper-close.d.ts +0 -22
- package/dist/src/components/kemet-popper/kemet-popper-close.js +0 -49
- package/dist/src/components/kemet-popper/kemet-popper-close.js.map +0 -1
- package/dist/src/components/kemet-popper/kemet-popper.d.ts +0 -63
- package/dist/src/components/kemet-popper/kemet-popper.js +0 -182
- package/dist/src/components/kemet-popper/kemet-popper.js.map +0 -1
- package/dist/src/components/kemet-popper/styles.d.ts +0 -1
- package/dist/src/components/kemet-popper/styles.effects.d.ts +0 -8
- package/dist/src/components/kemet-popper/styles.effects.js +0 -306
- package/dist/src/components/kemet-popper/styles.effects.js.map +0 -1
- package/dist/src/components/kemet-popper/styles.js +0 -28
- package/dist/src/components/kemet-popper/styles.js.map +0 -1
- package/dist/src/components/kemet-popper/types.d.ts +0 -3
- package/dist/src/components/kemet-popper/types.js +0 -2
- package/dist/src/components/kemet-popper/types.js.map +0 -1
- package/dist/src/components/kemet-radio/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-radio/kemet-radio.d.ts +0 -56
- package/dist/src/components/kemet-radio/kemet-radio.js +0 -129
- package/dist/src/components/kemet-radio/kemet-radio.js.map +0 -1
- package/dist/src/components/kemet-radio/kemet-radios.d.ts +0 -49
- package/dist/src/components/kemet-radio/kemet-radios.js +0 -143
- package/dist/src/components/kemet-radio/kemet-radios.js.map +0 -1
- package/dist/src/components/kemet-radio/styles.d.ts +0 -2
- package/dist/src/components/kemet-radio/styles.js +0 -102
- package/dist/src/components/kemet-radio/styles.js.map +0 -1
- package/dist/src/components/kemet-radio/types.d.ts +0 -20
- package/dist/src/components/kemet-radio/types.js +0 -2
- package/dist/src/components/kemet-radio/types.js.map +0 -1
- package/dist/src/components/kemet-rotator/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-rotator/kemet-rotator.d.ts +0 -40
- package/dist/src/components/kemet-rotator/kemet-rotator.js +0 -122
- package/dist/src/components/kemet-rotator/kemet-rotator.js.map +0 -1
- package/dist/src/components/kemet-rotator/styles.d.ts +0 -1
- package/dist/src/components/kemet-rotator/styles.js +0 -72
- package/dist/src/components/kemet-rotator/styles.js.map +0 -1
- package/dist/src/components/kemet-rotator/types.d.ts +0 -9
- package/dist/src/components/kemet-rotator/types.js +0 -2
- package/dist/src/components/kemet-rotator/types.js.map +0 -1
- package/dist/src/components/kemet-scroll-link/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-scroll-link/kemet-scroll-link.d.ts +0 -31
- package/dist/src/components/kemet-scroll-link/kemet-scroll-link.js +0 -82
- package/dist/src/components/kemet-scroll-link/kemet-scroll-link.js.map +0 -1
- package/dist/src/components/kemet-scroll-link/types.d.ts +0 -6
- package/dist/src/components/kemet-scroll-link/types.js +0 -2
- package/dist/src/components/kemet-scroll-link/types.js.map +0 -1
- package/dist/src/components/kemet-scroll-nav/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-scroll-nav/kemet-scroll-nav.d.ts +0 -34
- package/dist/src/components/kemet-scroll-nav/kemet-scroll-nav.js +0 -70
- package/dist/src/components/kemet-scroll-nav/kemet-scroll-nav.js.map +0 -1
- package/dist/src/components/kemet-scroll-nav/styles.d.ts +0 -1
- package/dist/src/components/kemet-scroll-nav/styles.js +0 -27
- package/dist/src/components/kemet-scroll-nav/styles.js.map +0 -1
- package/dist/src/components/kemet-scroll-nav/types.d.ts +0 -6
- package/dist/src/components/kemet-scroll-nav/types.js +0 -2
- package/dist/src/components/kemet-scroll-nav/types.js.map +0 -1
- package/dist/src/components/kemet-scroll-snap/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-scroll-snap/kemet-scroll-snap-paginator.d.ts +0 -44
- package/dist/src/components/kemet-scroll-snap/kemet-scroll-snap-paginator.js +0 -120
- package/dist/src/components/kemet-scroll-snap/kemet-scroll-snap-paginator.js.map +0 -1
- package/dist/src/components/kemet-scroll-snap/kemet-scroll-snap-slide.d.ts +0 -30
- package/dist/src/components/kemet-scroll-snap/kemet-scroll-snap-slide.js +0 -53
- package/dist/src/components/kemet-scroll-snap/kemet-scroll-snap-slide.js.map +0 -1
- package/dist/src/components/kemet-scroll-snap/kemet-scroll-snap.d.ts +0 -46
- package/dist/src/components/kemet-scroll-snap/kemet-scroll-snap.js +0 -122
- package/dist/src/components/kemet-scroll-snap/kemet-scroll-snap.js.map +0 -1
- package/dist/src/components/kemet-scroll-snap/styles.d.ts +0 -2
- package/dist/src/components/kemet-scroll-snap/styles.js +0 -74
- package/dist/src/components/kemet-scroll-snap/styles.js.map +0 -1
- package/dist/src/components/kemet-scroll-snap/types.d.ts +0 -20
- package/dist/src/components/kemet-scroll-snap/types.js +0 -2
- package/dist/src/components/kemet-scroll-snap/types.js.map +0 -1
- package/dist/src/components/kemet-select/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-select/kemet-option.d.ts +0 -29
- package/dist/src/components/kemet-select/kemet-option.js +0 -45
- package/dist/src/components/kemet-select/kemet-option.js.map +0 -1
- package/dist/src/components/kemet-select/kemet-select.d.ts +0 -110
- package/dist/src/components/kemet-select/kemet-select.js +0 -239
- package/dist/src/components/kemet-select/kemet-select.js.map +0 -1
- package/dist/src/components/kemet-select/styles.d.ts +0 -1
- package/dist/src/components/kemet-select/styles.js +0 -73
- package/dist/src/components/kemet-select/styles.js.map +0 -1
- package/dist/src/components/kemet-select/types.d.ts +0 -20
- package/dist/src/components/kemet-select/types.js +0 -2
- package/dist/src/components/kemet-select/types.js.map +0 -1
- package/dist/src/components/kemet-sortable/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-sortable/kemet-sortable-item.d.ts +0 -21
- package/dist/src/components/kemet-sortable/kemet-sortable-item.js +0 -30
- package/dist/src/components/kemet-sortable/kemet-sortable-item.js.map +0 -1
- package/dist/src/components/kemet-sortable/kemet-sortable.d.ts +0 -25
- package/dist/src/components/kemet-sortable/kemet-sortable.js +0 -77
- package/dist/src/components/kemet-sortable/kemet-sortable.js.map +0 -1
- package/dist/src/components/kemet-sortable/styles.d.ts +0 -2
- package/dist/src/components/kemet-sortable/styles.js +0 -22
- package/dist/src/components/kemet-sortable/styles.js.map +0 -1
- package/dist/src/components/kemet-sortable/types.d.ts +0 -3
- package/dist/src/components/kemet-sortable/types.js +0 -2
- package/dist/src/components/kemet-sortable/types.js.map +0 -1
- package/dist/src/components/kemet-svgs/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-svgs/kemet-svg.d.ts +0 -38
- package/dist/src/components/kemet-svgs/kemet-svg.js +0 -97
- package/dist/src/components/kemet-svgs/kemet-svg.js.map +0 -1
- package/dist/src/components/kemet-svgs/kemet-svgs.d.ts +0 -27
- package/dist/src/components/kemet-svgs/kemet-svgs.js +0 -51
- package/dist/src/components/kemet-svgs/kemet-svgs.js.map +0 -1
- package/dist/src/components/kemet-svgs/types.d.ts +0 -10
- package/dist/src/components/kemet-svgs/types.js +0 -2
- package/dist/src/components/kemet-svgs/types.js.map +0 -1
- package/dist/src/components/kemet-tabs/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-tabs/kemet-tab-panel.d.ts +0 -27
- package/dist/src/components/kemet-tabs/kemet-tab-panel.js +0 -52
- package/dist/src/components/kemet-tabs/kemet-tab-panel.js.map +0 -1
- package/dist/src/components/kemet-tabs/kemet-tab.d.ts +0 -37
- package/dist/src/components/kemet-tabs/kemet-tab.js +0 -79
- package/dist/src/components/kemet-tabs/kemet-tab.js.map +0 -1
- package/dist/src/components/kemet-tabs/kemet-tabs.d.ts +0 -91
- package/dist/src/components/kemet-tabs/kemet-tabs.js +0 -523
- package/dist/src/components/kemet-tabs/kemet-tabs.js.map +0 -1
- package/dist/src/components/kemet-tabs/styles.d.ts +0 -3
- package/dist/src/components/kemet-tabs/styles.js +0 -268
- package/dist/src/components/kemet-tabs/styles.js.map +0 -1
- package/dist/src/components/kemet-tabs/types.d.ts +0 -27
- package/dist/src/components/kemet-tabs/types.js +0 -2
- package/dist/src/components/kemet-tabs/types.js.map +0 -1
- package/dist/src/components/kemet-textarea/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-textarea/kemet-textarea.d.ts +0 -123
- package/dist/src/components/kemet-textarea/kemet-textarea.js +0 -293
- package/dist/src/components/kemet-textarea/kemet-textarea.js.map +0 -1
- package/dist/src/components/kemet-textarea/styles.d.ts +0 -1
- package/dist/src/components/kemet-textarea/styles.js +0 -69
- package/dist/src/components/kemet-textarea/styles.js.map +0 -1
- package/dist/src/components/kemet-textarea/types.d.ts +0 -20
- package/dist/src/components/kemet-textarea/types.js +0 -2
- package/dist/src/components/kemet-textarea/types.js.map +0 -1
- package/dist/src/components/kemet-toggle/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-toggle/kemet-toggle.d.ts +0 -60
- package/dist/src/components/kemet-toggle/kemet-toggle.js +0 -130
- package/dist/src/components/kemet-toggle/kemet-toggle.js.map +0 -1
- package/dist/src/components/kemet-toggle/styles.d.ts +0 -1
- package/dist/src/components/kemet-toggle/styles.js +0 -84
- package/dist/src/components/kemet-toggle/styles.js.map +0 -1
- package/dist/src/components/kemet-toggle/types.d.ts +0 -10
- package/dist/src/components/kemet-toggle/types.js +0 -2
- package/dist/src/components/kemet-toggle/types.js.map +0 -1
- package/dist/src/components/kemet-tooltip/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-tooltip/kemet-tooltip.d.ts +0 -33
- package/dist/src/components/kemet-tooltip/kemet-tooltip.js +0 -68
- package/dist/src/components/kemet-tooltip/kemet-tooltip.js.map +0 -1
- package/dist/src/components/kemet-tooltip/styles.d.ts +0 -1
- package/dist/src/components/kemet-tooltip/styles.js +0 -61
- package/dist/src/components/kemet-tooltip/styles.js.map +0 -1
- package/dist/src/components/kemet-tooltip/types.d.ts +0 -3
- package/dist/src/components/kemet-tooltip/types.js +0 -2
- package/dist/src/components/kemet-tooltip/types.js.map +0 -1
- package/dist/src/components/kemet-tracker/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-tracker/kemet-tracker-step.d.ts +0 -63
- package/dist/src/components/kemet-tracker/kemet-tracker-step.js +0 -127
- package/dist/src/components/kemet-tracker/kemet-tracker-step.js.map +0 -1
- package/dist/src/components/kemet-tracker/kemet-tracker.d.ts +0 -26
- package/dist/src/components/kemet-tracker/kemet-tracker.js +0 -70
- package/dist/src/components/kemet-tracker/kemet-tracker.js.map +0 -1
- package/dist/src/components/kemet-tracker/styles.d.ts +0 -1
- package/dist/src/components/kemet-tracker/styles.js +0 -111
- package/dist/src/components/kemet-tracker/styles.js.map +0 -1
- package/dist/src/components/kemet-tracker/types.d.ts +0 -13
- package/dist/src/components/kemet-tracker/types.js +0 -2
- package/dist/src/components/kemet-tracker/types.js.map +0 -1
- package/dist/src/components/kemet-upload/docs/stories.js.map +0 -1
- package/dist/src/components/kemet-upload/kemet-upload-file.d.ts +0 -46
- package/dist/src/components/kemet-upload/kemet-upload-file.js +0 -110
- package/dist/src/components/kemet-upload/kemet-upload-file.js.map +0 -1
- package/dist/src/components/kemet-upload/kemet-upload.d.ts +0 -58
- package/dist/src/components/kemet-upload/kemet-upload.js +0 -154
- package/dist/src/components/kemet-upload/kemet-upload.js.map +0 -1
- package/dist/src/components/kemet-upload/styles.d.ts +0 -3
- package/dist/src/components/kemet-upload/styles.js +0 -169
- package/dist/src/components/kemet-upload/styles.js.map +0 -1
- package/dist/src/components/kemet-upload/types.d.ts +0 -21
- package/dist/src/components/kemet-upload/types.js +0 -2
- package/dist/src/components/kemet-upload/types.js.map +0 -1
- package/dist/src/stories/styles/borders/borders.stories.d.ts +0 -5
- package/dist/src/stories/styles/borders/borders.stories.js +0 -46
- package/dist/src/stories/styles/borders/borders.stories.js.map +0 -1
- package/dist/src/stories/styles/borders/stories.d.ts +0 -5
- package/dist/src/stories/styles/borders/stories.js +0 -46
- package/dist/src/stories/styles/borders/stories.js.map +0 -1
- package/dist/src/stories/styles/borders.stories.d.ts +0 -5
- package/dist/src/stories/styles/borders.stories.js +0 -46
- package/dist/src/stories/styles/borders.stories.js.map +0 -1
- package/dist/src/stories/styles/elevation/elevation.stories.d.ts +0 -1
- package/dist/src/stories/styles/elevation/elevation.stories.js +0 -15
- package/dist/src/stories/styles/elevation/elevation.stories.js.map +0 -1
- package/dist/src/stories/styles/elevation/stories.d.ts +0 -5
- package/dist/src/stories/styles/elevation/stories.js +0 -21
- package/dist/src/stories/styles/elevation/stories.js.map +0 -1
- package/dist/src/stories/styles/flexcolumn/stories.d.ts +0 -6
- package/dist/src/stories/styles/flexcolumn/stories.js +0 -44
- package/dist/src/stories/styles/flexcolumn/stories.js.map +0 -1
- package/dist/src/stories/styles/flexgrid/stories.d.ts +0 -6
- package/dist/src/stories/styles/flexgrid/stories.js +0 -44
- package/dist/src/stories/styles/flexgrid/stories.js.map +0 -1
- package/dist/src/stories/styles/flexlist/stories.d.ts +0 -7
- package/dist/src/stories/styles/flexlist/stories.js +0 -45
- package/dist/src/stories/styles/flexlist/stories.js.map +0 -1
- package/dist/src/stories/styles/flexrow/stories.d.ts +0 -10
- package/dist/src/stories/styles/flexrow/stories.js +0 -77
- package/dist/src/stories/styles/flexrow/stories.js.map +0 -1
- package/dist/src/stories/styles/spacing/stories.d.ts +0 -6
- package/dist/src/stories/styles/spacing/stories.js +0 -49
- package/dist/src/stories/styles/spacing/stories.js.map +0 -1
- package/dist/src/stories/styles/typealignment/stories.d.ts +0 -5
- package/dist/src/stories/styles/typealignment/stories.js +0 -14
- package/dist/src/stories/styles/typealignment/stories.js.map +0 -1
- package/dist/src/stories/styles/typography/stories.d.ts +0 -6
- package/dist/src/stories/styles/typography/stories.js +0 -41
- package/dist/src/stories/styles/typography/stories.js.map +0 -1
- package/dist/src/stories/styles/visibility/stories.d.ts +0 -6
- package/dist/src/stories/styles/visibility/stories.js +0 -60
- package/dist/src/stories/styles/visibility/stories.js.map +0 -1
- package/dist/src/stories/templates/bootstrap/stories.d.ts +0 -6
- package/dist/src/stories/templates/bootstrap/stories.js +0 -159
- package/dist/src/stories/templates/bootstrap/stories.js.map +0 -1
- package/dist/src/stories/templates/foundation/stories.d.ts +0 -8
- package/dist/src/stories/templates/foundation/stories.js +0 -911
- package/dist/src/stories/templates/foundation/stories.js.map +0 -1
- package/dist/src/utilities/controllers/forms.d.ts +0 -11
- package/dist/src/utilities/controllers/forms.js +0 -102
- package/dist/src/utilities/controllers/forms.js.map +0 -1
- package/dist/src/utilities/misc/constants.d.ts +0 -5
- package/dist/src/utilities/misc/constants.js +0 -6
- package/dist/src/utilities/misc/constants.js.map +0 -1
- package/dist/src/utilities/misc/events.d.ts +0 -1
- package/dist/src/utilities/misc/events.js +0 -4
- package/dist/src/utilities/misc/events.js.map +0 -1
- package/dist/utilities/misc/decorators.d.ts +0 -1
- package/dist/utilities/misc/decorators.js +0 -5
- package/dist/utilities/misc/decorators.js.map +0 -1
- /package/dist/{src/components → components}/kemet-card/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-card/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-carousel/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-carousel/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-checkbox/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-checkbox/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-combo/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-combo/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-count/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-count/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-draggable/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-draggable/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-drawer/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-drawer/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-fab/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-fab/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-field/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-field/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-flipcard/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-flipcard/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-icon/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-icon/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-input/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-input/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-modal/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-modal/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-password/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-password/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-popper/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-popper/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-radio/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-radio/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-rotator/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-rotator/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-scroll-link/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-scroll-link/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-scroll-nav/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-scroll-nav/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-scroll-snap/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-scroll-snap/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-select/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-select/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-sortable/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-sortable/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-svgs/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-svgs/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-tabs/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-tabs/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-textarea/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-textarea/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-toggle/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-toggle/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-tooltip/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-tooltip/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-tracker/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-tracker/docs/stories.js +0 -0
- /package/dist/{src/components → components}/kemet-upload/docs/stories.d.ts +0 -0
- /package/dist/{src/components → components}/kemet-upload/docs/stories.js +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface KemetCarouselInterface extends HTMLElement {
|
|
2
|
-
index?: number;
|
|
3
|
-
total?: number;
|
|
4
|
-
sliderWidth?: string;
|
|
5
|
-
sliderTranslateX?: string;
|
|
6
|
-
inner?: boolean;
|
|
7
|
-
arrows?: boolean;
|
|
8
|
-
options?: object;
|
|
9
|
-
breakpoints?: object;
|
|
10
|
-
}
|
|
11
|
-
export interface KemetCarouselCurrentInterface extends HTMLElement {
|
|
12
|
-
current?: number;
|
|
13
|
-
}
|
|
14
|
-
export interface KemetCarouselSlideInterface extends HTMLElement {
|
|
15
|
-
selected?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface KemetCarouselLinkInterface extends HTMLElement {
|
|
18
|
-
slide?: number;
|
|
19
|
-
selected?: boolean;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/kemet-carousel/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface KemetCarouselInterface extends HTMLElement {\n index?: number,\n total?: number,\n sliderWidth?: string,\n sliderTranslateX?: string,\n inner?: boolean,\n arrows?: boolean,\n options?: object\n breakpoints?: object,\n}\n\nexport interface KemetCarouselCurrentInterface extends HTMLElement {\n current?: number,\n}\n\nexport interface KemetCarouselSlideInterface extends HTMLElement {\n selected?: boolean,\n}\n\nexport interface KemetCarouselLinkInterface extends HTMLElement {\n slide?: number,\n selected?: boolean,\n disabled?: boolean,\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../../src/components/kemet-checkbox/docs/stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,mBAAmB,CAAC;AAE3B,OAAO,6BAA6B,CAAC;AACrC,OAAO,4BAA4B,CAAC;AACpC,OAAO,kCAAkC,CAAC;AAE1C,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,gBAAgB;CAC5B,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,MAAM,QAAQ,GAAG,CAAC,EAChB,KAAK,GAAG,OAAO,EACf,OAAO,GAAG,KAAK,EACf,aAAa,GAAG,KAAK,EACrB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,MAAM,GAAG,KAAK,GACf,EAAE,EAAE,CAAC,IAAI,CAAA;0BACgB,KAAK,aAAa,OAAO,mBAAmB,aAAa,cAAc,QAAQ,aAAa,OAAO,YAAY,MAAM;CAC9I,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,KAAK;KACd;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;SAChB;QACD,OAAO,EAAE;YACP,OAAO,EAAE,SAAS;SACnB;QACD,aAAa,EAAE;YACb,OAAO,EAAE,SAAS;SACnB;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;SACnB;QACD,OAAO,EAAE;YACP,OAAO,EAAE,SAAS;SACnB;QACD,MAAM,EAAE;YACN,OAAO,EAAE,SAAS;SACnB;KACF;CACF,CAAC","sourcesContent":["import { html } from 'lit';\nimport type { Meta, StoryObj } from '@storybook/web-components';\n\nimport '../kemet-checkbox';\n\nimport '../../kemet-tabs/kemet-tabs';\nimport '../../kemet-tabs/kemet-tab';\nimport '../../kemet-tabs/kemet-tab-panel';\n\nconst meta: Meta = {\n title: 'Components / Checkbox',\n component: 'kemet-checkbox',\n};\nexport default meta;\n\ntype Story = StoryObj;\n\nconst Template = ({\n label = 'Label',\n checked = false,\n indeterminate = false,\n disabled = false,\n rounded = false,\n filled = false,\n}) => html`\n <kemet-checkbox label=${label} ?checked=${checked} ?indeterminate=${indeterminate} ?disabled=${disabled} ?rounded=${rounded} ?filled=${filled}></kemet-checkbox>\n`;\n\nexport const Standard: Story = {\n render: args => Template(args),\n args: {\n label: 'Label',\n checked: false,\n indeterminate: false,\n disabled: false,\n rounded: false,\n filled: false,\n },\n argTypes: {\n label: {\n control: 'text',\n },\n checked: {\n control: 'boolean',\n },\n indeterminate: {\n control: 'boolean',\n },\n disabled: {\n control: 'boolean',\n },\n rounded: {\n control: 'boolean',\n },\n filled: {\n control: 'boolean',\n },\n }\n};\n"]}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { FormSubmitController } from '../../utilities/controllers/forms';
|
|
3
|
-
import { TypeStatus } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* @since 1.0.0
|
|
6
|
-
* @status stable
|
|
7
|
-
*
|
|
8
|
-
* @tagname kemet-checkbox
|
|
9
|
-
* @summary An enhanced checkbox.
|
|
10
|
-
*
|
|
11
|
-
* @prop {string} label - Label text for the checkbox
|
|
12
|
-
* @prop {boolean} checked - Determines if the checkbox is selected
|
|
13
|
-
* @prop {boolean} indeterminate - An indeterminate selection status
|
|
14
|
-
* @prop {string} name - Name of the checkbox
|
|
15
|
-
* @prop {string} value - Value of the checkbox
|
|
16
|
-
* @prop {boolean} disabled - Determines if a checkbox is disabled
|
|
17
|
-
* @prop {boolean} required - Determines if a checkbox is required
|
|
18
|
-
* @prop {boolean} focused - Is true when the checkbox is focused
|
|
19
|
-
* @prop {boolean} rounded - Gives the checkbox rounded edges
|
|
20
|
-
* @prop {boolean} filled - Fills the checkbox with color
|
|
21
|
-
* @prop {string} status - The status of the checkbox
|
|
22
|
-
* @prop {string} message - Message associated with checkbox status
|
|
23
|
-
*
|
|
24
|
-
* @csspart label - The label element.
|
|
25
|
-
* @csspart text - The the label's text.
|
|
26
|
-
* @csspart mark - The icon of the check mark.
|
|
27
|
-
*
|
|
28
|
-
* @cssproperty --kemet-checkbox-size - The width and height of the checkbox. Default: 18px.
|
|
29
|
-
* @cssproperty --kemet-checkbox-color - The color of the checkbox's mark. Default: var(--kemet-color-primary).
|
|
30
|
-
* @cssproperty --kemet-checkbox-border - The border of the checkbox. Default: 1px solid var(--kemet-color-primary).
|
|
31
|
-
* @cssproperty --kemet-checkbox-border-radius - The border radius of the checkbox. Default: 4px.
|
|
32
|
-
* @cssproperty --kemet-checkbox-filled-color - The filled color of the checkbox's mark. Default: var(--kemet-color-white).
|
|
33
|
-
* @cssproperty --kemet-checkbox-filled-background-color - The filled background color. Default: var(--kemet-color-primary).
|
|
34
|
-
*
|
|
35
|
-
* @event kemet-checkbox-change - Fires when the state of the checkbox changes
|
|
36
|
-
* @event kemet-checkbox-focused - Fires when the checkbox loses or receives focus
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
39
|
-
export default class KemetCheckbox extends LitElement {
|
|
40
|
-
/** @internal */
|
|
41
|
-
formSubmitController: FormSubmitController;
|
|
42
|
-
static styles: import("lit").CSSResult[];
|
|
43
|
-
label: string;
|
|
44
|
-
checked: boolean;
|
|
45
|
-
indeterminate: boolean;
|
|
46
|
-
name: string;
|
|
47
|
-
value: any;
|
|
48
|
-
disabled: boolean;
|
|
49
|
-
required: boolean;
|
|
50
|
-
focused: boolean;
|
|
51
|
-
rounded: boolean;
|
|
52
|
-
filled: boolean;
|
|
53
|
-
status: TypeStatus;
|
|
54
|
-
message: string;
|
|
55
|
-
input: HTMLInputElement;
|
|
56
|
-
constructor();
|
|
57
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
58
|
-
click(): void;
|
|
59
|
-
handleClick(): void;
|
|
60
|
-
handleBlur(): void;
|
|
61
|
-
handleFocus(): void;
|
|
62
|
-
handleChange(): void;
|
|
63
|
-
makeMessage(): import("lit-html").TemplateResult<1>;
|
|
64
|
-
makeCheckMark(): import("lit-html").TemplateResult<1>;
|
|
65
|
-
checkValidity(): boolean;
|
|
66
|
-
}
|
|
67
|
-
declare global {
|
|
68
|
-
interface HTMLElementTagNameMap {
|
|
69
|
-
'kemet-checkbox': KemetCheckbox;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { html, LitElement } from 'lit';
|
|
3
|
-
import { customElement, property, query } from 'lit/decorators.js';
|
|
4
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
-
import { live } from 'lit/directives/live.js';
|
|
6
|
-
import { FormSubmitController } from '../../utilities/controllers/forms';
|
|
7
|
-
import { emitEvent } from '../../utilities/misc/events';
|
|
8
|
-
import { stylesBase } from './styles';
|
|
9
|
-
/**
|
|
10
|
-
* @since 1.0.0
|
|
11
|
-
* @status stable
|
|
12
|
-
*
|
|
13
|
-
* @tagname kemet-checkbox
|
|
14
|
-
* @summary An enhanced checkbox.
|
|
15
|
-
*
|
|
16
|
-
* @prop {string} label - Label text for the checkbox
|
|
17
|
-
* @prop {boolean} checked - Determines if the checkbox is selected
|
|
18
|
-
* @prop {boolean} indeterminate - An indeterminate selection status
|
|
19
|
-
* @prop {string} name - Name of the checkbox
|
|
20
|
-
* @prop {string} value - Value of the checkbox
|
|
21
|
-
* @prop {boolean} disabled - Determines if a checkbox is disabled
|
|
22
|
-
* @prop {boolean} required - Determines if a checkbox is required
|
|
23
|
-
* @prop {boolean} focused - Is true when the checkbox is focused
|
|
24
|
-
* @prop {boolean} rounded - Gives the checkbox rounded edges
|
|
25
|
-
* @prop {boolean} filled - Fills the checkbox with color
|
|
26
|
-
* @prop {string} status - The status of the checkbox
|
|
27
|
-
* @prop {string} message - Message associated with checkbox status
|
|
28
|
-
*
|
|
29
|
-
* @csspart label - The label element.
|
|
30
|
-
* @csspart text - The the label's text.
|
|
31
|
-
* @csspart mark - The icon of the check mark.
|
|
32
|
-
*
|
|
33
|
-
* @cssproperty --kemet-checkbox-size - The width and height of the checkbox. Default: 18px.
|
|
34
|
-
* @cssproperty --kemet-checkbox-color - The color of the checkbox's mark. Default: var(--kemet-color-primary).
|
|
35
|
-
* @cssproperty --kemet-checkbox-border - The border of the checkbox. Default: 1px solid var(--kemet-color-primary).
|
|
36
|
-
* @cssproperty --kemet-checkbox-border-radius - The border radius of the checkbox. Default: 4px.
|
|
37
|
-
* @cssproperty --kemet-checkbox-filled-color - The filled color of the checkbox's mark. Default: var(--kemet-color-white).
|
|
38
|
-
* @cssproperty --kemet-checkbox-filled-background-color - The filled background color. Default: var(--kemet-color-primary).
|
|
39
|
-
*
|
|
40
|
-
* @event kemet-checkbox-change - Fires when the state of the checkbox changes
|
|
41
|
-
* @event kemet-checkbox-focused - Fires when the checkbox loses or receives focus
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
let KemetCheckbox = class KemetCheckbox extends LitElement {
|
|
45
|
-
constructor() {
|
|
46
|
-
super();
|
|
47
|
-
this.label = '';
|
|
48
|
-
this.name = 'checkbox';
|
|
49
|
-
this.disabled = false;
|
|
50
|
-
this.required = false;
|
|
51
|
-
this.rounded = false;
|
|
52
|
-
this.filled = false;
|
|
53
|
-
this.status = 'standard';
|
|
54
|
-
/** @internal */
|
|
55
|
-
this.formSubmitController = new FormSubmitController(this);
|
|
56
|
-
}
|
|
57
|
-
render() {
|
|
58
|
-
return html `
|
|
59
|
-
<label part="label">
|
|
60
|
-
<input
|
|
61
|
-
type="checkbox"
|
|
62
|
-
name=${ifDefined(this.name)}
|
|
63
|
-
.value=${this.value}
|
|
64
|
-
.indeterminate=${live(this.indeterminate)}
|
|
65
|
-
.checked=${live(this.checked)}
|
|
66
|
-
.disabled=${this.disabled}
|
|
67
|
-
.required=${this.required}
|
|
68
|
-
aria-checked=${this.checked ? 'true' : 'false'}
|
|
69
|
-
@click=${() => this.handleClick()}
|
|
70
|
-
@blur=${() => this.handleBlur()}
|
|
71
|
-
@focus=${() => this.handleFocus()}
|
|
72
|
-
@change=${() => this.handleChange()}
|
|
73
|
-
/>
|
|
74
|
-
<button part="checkbox" aria-label=${this.label}>
|
|
75
|
-
${this.makeCheckMark()}
|
|
76
|
-
</button>
|
|
77
|
-
<span part="text">${this.label}</span>
|
|
78
|
-
</label>
|
|
79
|
-
${this.makeMessage()}
|
|
80
|
-
`;
|
|
81
|
-
}
|
|
82
|
-
click() {
|
|
83
|
-
this.input.click();
|
|
84
|
-
}
|
|
85
|
-
handleClick() {
|
|
86
|
-
this.checked = !this.checked;
|
|
87
|
-
this.indeterminate = false;
|
|
88
|
-
emitEvent(this, 'kemet-checkbox-change', this);
|
|
89
|
-
}
|
|
90
|
-
handleBlur() {
|
|
91
|
-
this.focused = false;
|
|
92
|
-
emitEvent(this, 'kemet-checkbox-focused', false);
|
|
93
|
-
}
|
|
94
|
-
handleFocus() {
|
|
95
|
-
this.focused = true;
|
|
96
|
-
emitEvent(this, 'kemet-checkbox-focused', true);
|
|
97
|
-
}
|
|
98
|
-
handleChange() {
|
|
99
|
-
this.value = this.checked;
|
|
100
|
-
if (this.input.checkValidity()) {
|
|
101
|
-
this.status = 'standard';
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
makeMessage() {
|
|
105
|
-
if (this.status === 'error' || this.status === 'warning') {
|
|
106
|
-
return html `<span part="message">${this.message}</span>`;
|
|
107
|
-
}
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
makeCheckMark() {
|
|
111
|
-
if (this.checked) {
|
|
112
|
-
return html `
|
|
113
|
-
<span part="mark">
|
|
114
|
-
<svg viewBox="0 0 16 16">
|
|
115
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
|
|
116
|
-
<g stroke="currentColor" stroke-width="2">
|
|
117
|
-
<g transform="translate(3.428571, 3.428571)">
|
|
118
|
-
<path d="M0,5.71428571 L3.42857143,9.14285714"></path>
|
|
119
|
-
<path d="M9.14285714,0 L3.42857143,9.14285714"></path>
|
|
120
|
-
</g>
|
|
121
|
-
</g>
|
|
122
|
-
</g>
|
|
123
|
-
</svg>
|
|
124
|
-
</span>
|
|
125
|
-
`;
|
|
126
|
-
}
|
|
127
|
-
if (!this.checked && this.indeterminate) {
|
|
128
|
-
return html `
|
|
129
|
-
<span part="mark">
|
|
130
|
-
<svg viewBox="0 0 16 16">
|
|
131
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
|
|
132
|
-
<g stroke="currentColor" stroke-width="2">
|
|
133
|
-
<g transform="translate(2.285714, 6.857143)">
|
|
134
|
-
<path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>
|
|
135
|
-
</g>
|
|
136
|
-
</g>
|
|
137
|
-
</g>
|
|
138
|
-
</svg>
|
|
139
|
-
</span>
|
|
140
|
-
`;
|
|
141
|
-
}
|
|
142
|
-
return null;
|
|
143
|
-
}
|
|
144
|
-
checkValidity() {
|
|
145
|
-
return this.input.checkValidity();
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
KemetCheckbox.styles = [stylesBase];
|
|
149
|
-
__decorate([
|
|
150
|
-
property({ type: String })
|
|
151
|
-
], KemetCheckbox.prototype, "label", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
property({ type: Boolean, reflect: true })
|
|
154
|
-
], KemetCheckbox.prototype, "checked", void 0);
|
|
155
|
-
__decorate([
|
|
156
|
-
property({ type: Boolean, reflect: true })
|
|
157
|
-
], KemetCheckbox.prototype, "indeterminate", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
property({ type: String })
|
|
160
|
-
], KemetCheckbox.prototype, "name", void 0);
|
|
161
|
-
__decorate([
|
|
162
|
-
property({ type: String })
|
|
163
|
-
], KemetCheckbox.prototype, "value", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
property({ type: Boolean, reflect: true })
|
|
166
|
-
], KemetCheckbox.prototype, "disabled", void 0);
|
|
167
|
-
__decorate([
|
|
168
|
-
property({ type: Boolean, reflect: true })
|
|
169
|
-
], KemetCheckbox.prototype, "required", void 0);
|
|
170
|
-
__decorate([
|
|
171
|
-
property({ type: Boolean, reflect: true })
|
|
172
|
-
], KemetCheckbox.prototype, "focused", void 0);
|
|
173
|
-
__decorate([
|
|
174
|
-
property({ type: Boolean, reflect: true })
|
|
175
|
-
], KemetCheckbox.prototype, "rounded", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
property({ type: Boolean, reflect: true })
|
|
178
|
-
], KemetCheckbox.prototype, "filled", void 0);
|
|
179
|
-
__decorate([
|
|
180
|
-
property({ type: String, reflect: true })
|
|
181
|
-
], KemetCheckbox.prototype, "status", void 0);
|
|
182
|
-
__decorate([
|
|
183
|
-
property({ type: String })
|
|
184
|
-
], KemetCheckbox.prototype, "message", void 0);
|
|
185
|
-
__decorate([
|
|
186
|
-
query('input')
|
|
187
|
-
], KemetCheckbox.prototype, "input", void 0);
|
|
188
|
-
KemetCheckbox = __decorate([
|
|
189
|
-
customElement('kemet-checkbox')
|
|
190
|
-
], KemetCheckbox);
|
|
191
|
-
export default KemetCheckbox;
|
|
192
|
-
//# sourceMappingURL=kemet-checkbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kemet-checkbox.js","sourceRoot":"","sources":["../../../../src/components/kemet-checkbox/kemet-checkbox.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,IAAqB,aAAa,GAAlC,MAAqB,aAAc,SAAQ,UAAU;IA8CnD;QACE,KAAK,EAAE,CAAC;QAxCV,UAAK,GAAW,EAAE,CAAC;QASnB,SAAI,GAAW,UAAU,CAAC;QAM1B,aAAQ,GAAY,KAAK,CAAC;QAG1B,aAAQ,GAAY,KAAK,CAAC;QAM1B,YAAO,GAAY,KAAK,CAAC;QAGzB,WAAM,GAAY,KAAK,CAAC;QAGxB,WAAM,GAAe,UAAU,CAAC;QAY9B,gBAAgB;QAChB,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;;;;iBAIE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;mBAClB,IAAI,CAAC,KAAK;2BACF,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC;qBAC9B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;sBACjB,IAAI,CAAC,QAAQ;sBACb,IAAI,CAAC,QAAQ;yBACV,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;mBACrC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE;kBACzB,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE;mBACtB,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE;oBACvB,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE;;6CAEA,IAAI,CAAC,KAAK;YAC3C,IAAI,CAAC,aAAa,EAAE;;4BAEJ,IAAI,CAAC,KAAK;;QAE9B,IAAI,CAAC,WAAW,EAAE;KACrB,CAAC;IACJ,CAAC;IAED,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAED,WAAW;QACT,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,SAAS,CAAC,IAAI,EAAE,uBAAuB,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,UAAU;QACR,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,SAAS,CAAC,IAAI,EAAE,wBAAwB,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC;IAED,WAAW;QACT,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,SAAS,CAAC,IAAI,EAAE,wBAAwB,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,YAAY;QACV,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC;QAE1B,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE;YAC9B,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;SAC1B;IACH,CAAC;IAED,WAAW;QACT,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE;YACxD,OAAO,IAAI,CAAA,wBAAwB,IAAI,CAAC,OAAO,SAAS,CAAC;SAC1D;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa;QACX,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,IAAI,CAAA;;;;;;;;;;;;;OAaV,CAAC;SACH;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,aAAa,EAAE;YACvC,OAAO,IAAI,CAAA;;;;;;;;;;;;OAYV,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;IACpC,CAAC;CACF,CAAA;AAvJQ,oBAAM,GAAG,CAAC,UAAU,CAAC,CAAC;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACR;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDACpB;AAGvB;IADC,QAAQ,CAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACF;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAChB;AAGX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CACjB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CACjB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAClB;AAGzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACnB;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACV;AAGhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CACX;AAGhB;IADC,KAAK,CAAC,OAAO,CAAC;4CACS;AA3CL,aAAa;IADjC,aAAa,CAAC,gBAAgB,CAAC;GACX,aAAa,CA2JjC;eA3JoB,aAAa","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { FormSubmitController } from '../../utilities/controllers/forms';\nimport { emitEvent } from '../../utilities/misc/events';\nimport { stylesBase } from './styles';\nimport { TypeStatus } from './types';\n\n/**\n * @since 1.0.0\n * @status stable\n *\n * @tagname kemet-checkbox\n * @summary An enhanced checkbox.\n *\n * @prop {string} label - Label text for the checkbox\n * @prop {boolean} checked - Determines if the checkbox is selected\n * @prop {boolean} indeterminate - An indeterminate selection status\n * @prop {string} name - Name of the checkbox\n * @prop {string} value - Value of the checkbox\n * @prop {boolean} disabled - Determines if a checkbox is disabled\n * @prop {boolean} required - Determines if a checkbox is required\n * @prop {boolean} focused - Is true when the checkbox is focused\n * @prop {boolean} rounded - Gives the checkbox rounded edges\n * @prop {boolean} filled - Fills the checkbox with color\n * @prop {string} status - The status of the checkbox\n * @prop {string} message - Message associated with checkbox status\n *\n * @csspart label - The label element.\n * @csspart text - The the label's text.\n * @csspart mark - The icon of the check mark.\n *\n * @cssproperty --kemet-checkbox-size - The width and height of the checkbox. Default: 18px.\n * @cssproperty --kemet-checkbox-color - The color of the checkbox's mark. Default: var(--kemet-color-primary).\n * @cssproperty --kemet-checkbox-border - The border of the checkbox. Default: 1px solid var(--kemet-color-primary).\n * @cssproperty --kemet-checkbox-border-radius - The border radius of the checkbox. Default: 4px.\n * @cssproperty --kemet-checkbox-filled-color - The filled color of the checkbox's mark. Default: var(--kemet-color-white).\n * @cssproperty --kemet-checkbox-filled-background-color - The filled background color. Default: var(--kemet-color-primary).\n *\n * @event kemet-checkbox-change - Fires when the state of the checkbox changes\n * @event kemet-checkbox-focused - Fires when the checkbox loses or receives focus\n *\n */\n\n@customElement('kemet-checkbox')\nexport default class KemetCheckbox extends LitElement {\n /** @internal */\n formSubmitController: FormSubmitController;\n\n static styles = [stylesBase];\n\n @property({ type: String })\n label: string = '';\n\n @property({ type: Boolean, reflect: true })\n checked: boolean;\n\n @property({ type: Boolean, reflect: true })\n indeterminate: boolean;\n\n @property( { type: String })\n name: string = 'checkbox';\n\n @property({ type: String })\n value: any;\n\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n required: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n focused: boolean;\n\n @property({ type: Boolean, reflect: true })\n rounded: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n filled: boolean = false;\n\n @property({ type: String, reflect: true })\n status: TypeStatus = 'standard';\n\n @property({ type: String })\n message: string;\n\n @query('input')\n input: HTMLInputElement;\n\n\n constructor() {\n super();\n\n /** @internal */\n this.formSubmitController = new FormSubmitController(this);\n }\n\n render() {\n return html`\n <label part=\"label\">\n <input\n type=\"checkbox\"\n name=${ifDefined(this.name)}\n .value=${this.value}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${() => this.handleClick()}\n @blur=${() => this.handleBlur()}\n @focus=${() => this.handleFocus()}\n @change=${() => this.handleChange()}\n />\n <button part=\"checkbox\" aria-label=${this.label}>\n ${this.makeCheckMark()}\n </button>\n <span part=\"text\">${this.label}</span>\n </label>\n ${this.makeMessage()}\n `;\n }\n\n click() {\n this.input.click();\n }\n\n handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n emitEvent(this, 'kemet-checkbox-change', this);\n }\n\n handleBlur() {\n this.focused = false;\n emitEvent(this, 'kemet-checkbox-focused', false);\n }\n\n handleFocus() {\n this.focused = true;\n emitEvent(this, 'kemet-checkbox-focused', true);\n }\n\n handleChange() {\n this.value = this.checked;\n\n if (this.input.checkValidity()) {\n this.status = 'standard';\n }\n }\n\n makeMessage() {\n if (this.status === 'error' || this.status === 'warning') {\n return html`<span part=\"message\">${this.message}</span>`;\n }\n\n return null;\n }\n\n makeCheckMark() {\n if (this.checked) {\n return html`\n <span part=\"mark\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(3.428571, 3.428571)\">\n <path d=\"M0,5.71428571 L3.42857143,9.14285714\"></path>\n <path d=\"M9.14285714,0 L3.42857143,9.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n </span>\n `;\n }\n\n if (!this.checked && this.indeterminate) {\n return html`\n <span part=\"mark\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(2.285714, 6.857143)\">\n <path d=\"M10.2857143,1.14285714 L1.14285714,1.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n </span>\n `;\n }\n\n return null;\n }\n\n checkValidity() {\n return this.input.checkValidity();\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-checkbox': KemetCheckbox\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const stylesBase: import("lit").CSSResult;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const stylesBase = css `
|
|
3
|
-
*,
|
|
4
|
-
*::before,
|
|
5
|
-
*::after {
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host {
|
|
10
|
-
display: inline-block;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host([disabled]) {
|
|
14
|
-
opacity: 0.5;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
label {
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
gap: 0.5rem;
|
|
20
|
-
align-items: center;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
input {
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
margin: 0;
|
|
26
|
-
padding: 0;
|
|
27
|
-
width: var(--kemet-checkbox-size, 18px);
|
|
28
|
-
height: var(--kemet-checkbox-size, 18px);
|
|
29
|
-
position: absolute;
|
|
30
|
-
opacity: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
button {
|
|
34
|
-
margin: 0;
|
|
35
|
-
border: none;
|
|
36
|
-
background: none;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
[part='checkbox'] {
|
|
40
|
-
color: var(--kemet-checkbox-color, var(--kemet-color-background));
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
width: var(--kemet-checkbox-size, 18px);
|
|
45
|
-
height: var(--kemet-checkbox-size, 18px);
|
|
46
|
-
border: var(--kemet-checkbox-border, 1px solid var(--kemet-color-background));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
:host([rounded]) [part='checkbox'] {
|
|
50
|
-
border-radius: var(--kemet-checkbox-border-radius, 4px);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host([filled][checked]) [part='checkbox'],
|
|
54
|
-
:host([filled][indeterminate]) [part='checkbox'] {
|
|
55
|
-
border: none;
|
|
56
|
-
background-color: var(--kemet-checkbox-filled-background-color, var(--kemet-color-primary));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
[part='mark'] {
|
|
60
|
-
display: flex;
|
|
61
|
-
width: calc(var(--kemet-checkbox-size, 18px) - 4px);
|
|
62
|
-
height: calc(var(--kemet-checkbox-size, 18px) - 4px);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
:host([filled][checked]) [part='mark'],
|
|
66
|
-
:host([filled][indeterminate]) [part='mark'] {
|
|
67
|
-
color: var(--kemet-checkbox-filled-color, var(--kemet-color-white));
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
[part='message'] {
|
|
71
|
-
display: block;
|
|
72
|
-
margin-top: 0.5rem;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
:host([status='error']) [part='message'] {
|
|
76
|
-
color: var(--kemet-color-error);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
:host([status='warning']) [part='message'] {
|
|
80
|
-
color: var(--kemet-color-error);
|
|
81
|
-
}
|
|
82
|
-
`;
|
|
83
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/kemet-checkbox/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgF5B,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const stylesBase = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n opacity: 0.5;\n }\n\n label {\n display: inline-flex;\n gap: 0.5rem;\n align-items: center;\n }\n\n input {\n cursor: pointer;\n margin: 0;\n padding: 0;\n width: var(--kemet-checkbox-size, 18px);\n height: var(--kemet-checkbox-size, 18px);\n position: absolute;\n opacity: 0;\n }\n\n button {\n margin: 0;\n border: none;\n background: none;\n }\n\n [part='checkbox'] {\n color: var(--kemet-checkbox-color, var(--kemet-color-background));\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--kemet-checkbox-size, 18px);\n height: var(--kemet-checkbox-size, 18px);\n border: var(--kemet-checkbox-border, 1px solid var(--kemet-color-background));\n }\n\n :host([rounded]) [part='checkbox'] {\n border-radius: var(--kemet-checkbox-border-radius, 4px);\n }\n\n :host([filled][checked]) [part='checkbox'],\n :host([filled][indeterminate]) [part='checkbox'] {\n border: none;\n background-color: var(--kemet-checkbox-filled-background-color, var(--kemet-color-primary));\n }\n\n [part='mark'] {\n display: flex;\n width: calc(var(--kemet-checkbox-size, 18px) - 4px);\n height: calc(var(--kemet-checkbox-size, 18px) - 4px);\n }\n\n :host([filled][checked]) [part='mark'],\n :host([filled][indeterminate]) [part='mark'] {\n color: var(--kemet-checkbox-filled-color, var(--kemet-color-white));\n }\n\n [part='message'] {\n display: block;\n margin-top: 0.5rem;\n }\n\n :host([status='error']) [part='message'] {\n color: var(--kemet-color-error);\n }\n\n :host([status='warning']) [part='message'] {\n color: var(--kemet-color-error);\n }\n`;\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare type TypeStatus = 'standard' | 'error' | 'success' | 'warning';
|
|
2
|
-
export interface KemetCheckboxInterface extends HTMLElement {
|
|
3
|
-
label?: string;
|
|
4
|
-
checked?: boolean;
|
|
5
|
-
indeterminate?: boolean;
|
|
6
|
-
name?: string;
|
|
7
|
-
value?: string;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
required?: boolean;
|
|
10
|
-
focused?: boolean;
|
|
11
|
-
rounded?: boolean;
|
|
12
|
-
filled?: boolean;
|
|
13
|
-
status?: string;
|
|
14
|
-
message?: string;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/kemet-checkbox/types.ts"],"names":[],"mappings":"","sourcesContent":["export type TypeStatus = 'standard' | 'error' | 'success' | 'warning';\n\nexport interface KemetCheckboxInterface extends HTMLElement {\n label?: string,\n checked?: boolean,\n indeterminate?: boolean,\n name?: string,\n value?: string,\n disabled?: boolean,\n required?: boolean,\n focused?: boolean,\n rounded?: boolean,\n filled?: boolean,\n status?: string,\n message?: string,\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../../src/components/kemet-combo/docs/stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,gBAAgB,CAAC;AAExB,OAAO,+BAA+B,CAAC;AACvC,OAAO,+BAA+B,CAAC;AACvC,OAAO,6BAA6B,CAAC;AACrC,OAAO,4BAA4B,CAAC;AACpC,OAAO,kCAAkC,CAAC;AAE1C,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,aAAa;CACzB,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,MAAM,IAAI,GAAG;IACX,sBAAsB;IACtB,6BAA6B;IAC7B,wCAAwC;IACxC,yCAAyC;IACzC,gCAAgC;IAChC,kCAAkC;CACnC,CAAC;AAEF,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,IAAI,CAAA;;;6CAGkB,IAAI;;CAEhD,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE;CACzB,CAAC","sourcesContent":["import { html } from 'lit';\nimport type { Meta, StoryObj } from '@storybook/web-components';\n\nimport '../kemet-combo';\n\nimport '../../kemet-field/kemet-field';\nimport '../../kemet-input/kemet-input';\nimport '../../kemet-tabs/kemet-tabs';\nimport '../../kemet-tabs/kemet-tab';\nimport '../../kemet-tabs/kemet-tab-panel';\n\nconst meta: Meta = {\n title: 'Components / Combo',\n component: 'kemet-combo',\n};\nexport default meta;\n\ntype Story = StoryObj;\n\nconst faqs = [\n 'How do use Kemet UI?',\n 'What is a Blueprint System?',\n 'Are there going to be more components?',\n 'Is it good to use attribute for styles?',\n 'Does Kemet UI work with React?',\n 'Does Kemet UI work with Angular?',\n];\n\nconst Template = () => html`\n <kemet-field slug=\"unique-identifier\" label=\"Frequently asked questions.\" kemet-margin=\"tiny:smallest\">\n <kemet-input slot=\"input\" name=\"input\" placeholder=\"Start typing to see the FAQs\"></kemet-input>\n <kemet-combo slot=\"component\" .options=${faqs}></kemet-combo>\n </kemet-field>\n`;\n\nexport const Standard: Story = {\n render: () => Template(),\n};\n"]}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { KemetFieldInterface } from '../kemet-field/types';
|
|
3
|
-
/**
|
|
4
|
-
* @since 1.0.0
|
|
5
|
-
* @status stable
|
|
6
|
-
*
|
|
7
|
-
* @tagname kemet-combo
|
|
8
|
-
* @summary Allows the user to select a choice filtered through an Input. May only be used as a component of Field.
|
|
9
|
-
*
|
|
10
|
-
* @prop {string} slug - Uniquely identifies the component. Should match the slug used in a control.
|
|
11
|
-
* @prop {array} options - An array of items listed for the combo box
|
|
12
|
-
* @prop {boolean} show - Controls the display of the combo box
|
|
13
|
-
*
|
|
14
|
-
* @csspart combobox - The combo's container element.
|
|
15
|
-
* @csspart listbox - The list element in the combo.
|
|
16
|
-
*
|
|
17
|
-
* @cssproperty --kemet-combo-width - The width of the combo box. Default: calc(100% - 2px).
|
|
18
|
-
* @cssproperty --kemet-combo-margin - The margins on the combo box. Default: 1rem auto.
|
|
19
|
-
* @cssproperty --kemet-combo-max-height - The max height of the combo box. Default: calc(5 * 3rem).
|
|
20
|
-
* @cssproperty --kemet-combo-border - The border of the combo box. Default: 1px solid var(--kemet-color-primary).
|
|
21
|
-
* @cssproperty --kemet-combo-border-radius - The border radius of the combo box. Default: var(--kemet-border-radius).
|
|
22
|
-
* @cssproperty --kemet-combo-background-color - The background color of the combo box. Default: var(--kemet-color-white-to-black).
|
|
23
|
-
* @cssproperty --kemet-combo-shadow - The shadow of the combo box. Default: var(--kemet-elevation-layer5).
|
|
24
|
-
* @cssproperty --kemet-combo-hover-color - The hover item's text color. Default: var(--kemet-color-white).
|
|
25
|
-
* @cssproperty --kemet-combo-hover-background-color - The hover item's background color. Default: var(--kemet-color-primary).
|
|
26
|
-
*
|
|
27
|
-
* @event kemet-combo-selection - Fires when a selection has been made
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
export default class KemetCombo extends LitElement {
|
|
31
|
-
static styles: import("lit").CSSResult[];
|
|
32
|
-
slug: string;
|
|
33
|
-
options: any[];
|
|
34
|
-
show: boolean;
|
|
35
|
-
filteredOptions: any[];
|
|
36
|
-
field: KemetFieldInterface;
|
|
37
|
-
input: HTMLInputElement;
|
|
38
|
-
firstUpdated(): void;
|
|
39
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
40
|
-
makeOptions(): import("lit-html").TemplateResult<1>[];
|
|
41
|
-
handleInput(event: any): void;
|
|
42
|
-
handleSelection(event: any): void;
|
|
43
|
-
handleOptionKeyDown(event: any): void;
|
|
44
|
-
handleInputKeyDown(event: any): void;
|
|
45
|
-
}
|
|
46
|
-
declare global {
|
|
47
|
-
interface HTMLElementTagNameMap {
|
|
48
|
-
'kemet-combo': KemetCombo;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { html, LitElement } from 'lit';
|
|
3
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
4
|
-
import { emitEvent } from '../../utilities/misc/events';
|
|
5
|
-
import { stylesBase } from './styles';
|
|
6
|
-
/**
|
|
7
|
-
* @since 1.0.0
|
|
8
|
-
* @status stable
|
|
9
|
-
*
|
|
10
|
-
* @tagname kemet-combo
|
|
11
|
-
* @summary Allows the user to select a choice filtered through an Input. May only be used as a component of Field.
|
|
12
|
-
*
|
|
13
|
-
* @prop {string} slug - Uniquely identifies the component. Should match the slug used in a control.
|
|
14
|
-
* @prop {array} options - An array of items listed for the combo box
|
|
15
|
-
* @prop {boolean} show - Controls the display of the combo box
|
|
16
|
-
*
|
|
17
|
-
* @csspart combobox - The combo's container element.
|
|
18
|
-
* @csspart listbox - The list element in the combo.
|
|
19
|
-
*
|
|
20
|
-
* @cssproperty --kemet-combo-width - The width of the combo box. Default: calc(100% - 2px).
|
|
21
|
-
* @cssproperty --kemet-combo-margin - The margins on the combo box. Default: 1rem auto.
|
|
22
|
-
* @cssproperty --kemet-combo-max-height - The max height of the combo box. Default: calc(5 * 3rem).
|
|
23
|
-
* @cssproperty --kemet-combo-border - The border of the combo box. Default: 1px solid var(--kemet-color-primary).
|
|
24
|
-
* @cssproperty --kemet-combo-border-radius - The border radius of the combo box. Default: var(--kemet-border-radius).
|
|
25
|
-
* @cssproperty --kemet-combo-background-color - The background color of the combo box. Default: var(--kemet-color-white-to-black).
|
|
26
|
-
* @cssproperty --kemet-combo-shadow - The shadow of the combo box. Default: var(--kemet-elevation-layer5).
|
|
27
|
-
* @cssproperty --kemet-combo-hover-color - The hover item's text color. Default: var(--kemet-color-white).
|
|
28
|
-
* @cssproperty --kemet-combo-hover-background-color - The hover item's background color. Default: var(--kemet-color-primary).
|
|
29
|
-
*
|
|
30
|
-
* @event kemet-combo-selection - Fires when a selection has been made
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
let KemetCombo = class KemetCombo extends LitElement {
|
|
34
|
-
constructor() {
|
|
35
|
-
super(...arguments);
|
|
36
|
-
this.options = [];
|
|
37
|
-
}
|
|
38
|
-
firstUpdated() {
|
|
39
|
-
// standard properties
|
|
40
|
-
this.field = this.closest('kemet-field');
|
|
41
|
-
this.input = this.field.querySelector('[slot="input"]');
|
|
42
|
-
// managed properties
|
|
43
|
-
this.slug = this.field.slug || 'slug';
|
|
44
|
-
// events listeners
|
|
45
|
-
this.input.addEventListener('kemet-input-input', this.handleInput.bind(this));
|
|
46
|
-
this.input.addEventListener('keydown', event => this.handleInputKeyDown(event));
|
|
47
|
-
}
|
|
48
|
-
render() {
|
|
49
|
-
var _a;
|
|
50
|
-
return html `
|
|
51
|
-
<div
|
|
52
|
-
role="combobox"
|
|
53
|
-
part="combobox"
|
|
54
|
-
aria-expanded=${this.show}
|
|
55
|
-
aria-controls="${this.slug}-listbox"
|
|
56
|
-
aria-haspopup="listbox"
|
|
57
|
-
id="${this.slug}-combobox"
|
|
58
|
-
aria-label="${(_a = this.field) === null || _a === void 0 ? void 0 : _a.label}"
|
|
59
|
-
>
|
|
60
|
-
<ul role="listbox" aria-labelledby="${this.slug}-label" id="${this.slug}-listbox" part="listbox">
|
|
61
|
-
${this.makeOptions()}
|
|
62
|
-
</ul>
|
|
63
|
-
</div>
|
|
64
|
-
`;
|
|
65
|
-
}
|
|
66
|
-
makeOptions() {
|
|
67
|
-
if (this.input) {
|
|
68
|
-
this.filteredOptions = this.options.filter(option => { var _a; return option.toLowerCase().indexOf((_a = this.input.value) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== -1; });
|
|
69
|
-
const options = this.filteredOptions.map((option, index) => html `<li
|
|
70
|
-
id="${this.slug}-option-${index}"
|
|
71
|
-
role="option"
|
|
72
|
-
tabindex="0"
|
|
73
|
-
aria-selected="false"
|
|
74
|
-
@click=${event => this.handleSelection(event)}
|
|
75
|
-
@keydown=${event => this.handleOptionKeyDown(event)}
|
|
76
|
-
>
|
|
77
|
-
${option}
|
|
78
|
-
</li>`);
|
|
79
|
-
return options;
|
|
80
|
-
}
|
|
81
|
-
return null;
|
|
82
|
-
}
|
|
83
|
-
handleInput(event) {
|
|
84
|
-
this.makeOptions();
|
|
85
|
-
if (event.detail.length > 0) {
|
|
86
|
-
this.show = true;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
this.show = false;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
handleSelection(event) {
|
|
93
|
-
this.input.value = event.target.innerText;
|
|
94
|
-
this.show = false;
|
|
95
|
-
emitEvent(this, 'kemet-combo-section', {
|
|
96
|
-
element: event.target,
|
|
97
|
-
text: event.target.innerText,
|
|
98
|
-
id: event.target.getAttribute('id'),
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
handleOptionKeyDown(event) {
|
|
102
|
-
event.preventDefault();
|
|
103
|
-
if (event.code === 'ArrowDown') {
|
|
104
|
-
const next = event.target.nextElementSibling;
|
|
105
|
-
if (next) {
|
|
106
|
-
next.focus();
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
this.shadowRoot.querySelector('li').focus();
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (event.code === 'ArrowUp') {
|
|
113
|
-
const previous = event.target.previousElementSibling;
|
|
114
|
-
const lastChild = this.shadowRoot.querySelector('li:last-child');
|
|
115
|
-
if (previous) {
|
|
116
|
-
previous.focus();
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
lastChild.focus();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (event.code === 'Escape' || event.code === 'Tab') {
|
|
123
|
-
this.show = false;
|
|
124
|
-
this.input.focus();
|
|
125
|
-
}
|
|
126
|
-
if (event.code === 'Enter' || event.code === 'Space') {
|
|
127
|
-
this.handleSelection(event);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
handleInputKeyDown(event) {
|
|
131
|
-
if (event.code === 'ArrowDown') {
|
|
132
|
-
this.shadowRoot.querySelector('li').focus();
|
|
133
|
-
}
|
|
134
|
-
if (event.code === 'Escape') {
|
|
135
|
-
this.show = false;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
KemetCombo.styles = [stylesBase];
|
|
140
|
-
__decorate([
|
|
141
|
-
property({ type: String })
|
|
142
|
-
], KemetCombo.prototype, "slug", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
property({ type: Array })
|
|
145
|
-
], KemetCombo.prototype, "options", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
property({ type: Boolean, reflect: true })
|
|
148
|
-
], KemetCombo.prototype, "show", void 0);
|
|
149
|
-
__decorate([
|
|
150
|
-
state()
|
|
151
|
-
], KemetCombo.prototype, "filteredOptions", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
state()
|
|
154
|
-
], KemetCombo.prototype, "field", void 0);
|
|
155
|
-
__decorate([
|
|
156
|
-
state()
|
|
157
|
-
], KemetCombo.prototype, "input", void 0);
|
|
158
|
-
KemetCombo = __decorate([
|
|
159
|
-
customElement('kemet-combo')
|
|
160
|
-
], KemetCombo);
|
|
161
|
-
export default KemetCombo;
|
|
162
|
-
//# sourceMappingURL=kemet-combo.js.map
|