kemet-ui 1.4.0 → 2.0.1
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/README.md +1 -1
- package/custom-elements.json +3113 -2570
- package/dist/components/kemet-accordion/kemet-accordion-panel.d.ts +51 -0
- package/dist/components/kemet-accordion/kemet-accordion-panel.js +94 -134
- package/dist/components/kemet-accordion/kemet-accordion-panel.js.map +1 -0
- package/dist/components/kemet-accordion/kemet-accordion.d.ts +37 -0
- package/dist/components/kemet-accordion/kemet-accordion.js +113 -129
- package/dist/components/kemet-accordion/kemet-accordion.js.map +1 -0
- package/dist/components/kemet-accordion/stories.d.ts +10 -0
- package/dist/components/kemet-accordion/stories.js +44 -0
- package/dist/components/kemet-accordion/stories.js.map +1 -0
- package/dist/components/kemet-accordion/styles.d.ts +2 -0
- package/dist/components/kemet-accordion/styles.js +42 -0
- package/dist/components/kemet-accordion/styles.js.map +1 -0
- package/dist/components/kemet-accordion/types.d.ts +9 -0
- package/dist/components/kemet-accordion/types.js +2 -0
- package/dist/components/kemet-accordion/types.js.map +1 -0
- package/dist/components/kemet-alert/docs/stories.d.ts +9 -0
- package/dist/components/kemet-alert/docs/stories.js +77 -0
- package/dist/components/kemet-alert/docs/stories.js.map +1 -0
- package/dist/components/kemet-alert/kemet-alert.d.ts +52 -0
- package/dist/components/kemet-alert/kemet-alert.js +67 -65
- package/dist/components/kemet-alert/kemet-alert.js.map +1 -0
- package/dist/components/kemet-alert/styles.d.ts +1 -0
- package/dist/components/kemet-alert/styles.js +4 -4
- package/dist/components/kemet-alert/styles.js.map +1 -0
- package/dist/components/kemet-alert/types.d.ts +10 -0
- package/dist/components/kemet-alert/types.js +2 -0
- package/dist/components/kemet-alert/types.js.map +1 -0
- package/dist/components/kemet-avatar/docs/stories.d.ts +11 -0
- package/dist/components/kemet-avatar/docs/stories.js +86 -0
- package/dist/components/kemet-avatar/docs/stories.js.map +1 -0
- package/dist/components/kemet-avatar/kemet-avatar.d.ts +43 -0
- package/dist/components/kemet-avatar/kemet-avatar.js +48 -88
- package/dist/components/kemet-avatar/kemet-avatar.js.map +1 -0
- package/dist/components/kemet-avatar/kemet-avatars.d.ts +20 -0
- package/dist/components/kemet-avatar/kemet-avatars.js +15 -31
- package/dist/components/kemet-avatar/kemet-avatars.js.map +1 -0
- package/dist/components/kemet-avatar/styles.d.ts +2 -0
- package/dist/components/kemet-avatar/styles.js +58 -0
- package/dist/components/kemet-avatar/styles.js.map +1 -0
- package/dist/components/kemet-avatar/types.d.ts +8 -0
- package/dist/components/kemet-avatar/types.js +2 -0
- package/dist/components/kemet-avatar/types.js.map +1 -0
- package/dist/components/kemet-badge/docs/stories.d.ts +9 -0
- package/dist/components/kemet-badge/docs/stories.js +40 -0
- package/dist/components/kemet-badge/docs/stories.js.map +1 -0
- package/dist/components/kemet-badge/kemet-badge.d.ts +30 -0
- package/dist/components/kemet-badge/kemet-badge.js +38 -89
- package/dist/components/kemet-badge/kemet-badge.js.map +1 -0
- package/dist/components/kemet-badge/styles.d.ts +1 -0
- package/dist/components/kemet-badge/styles.js +40 -0
- package/dist/components/kemet-badge/styles.js.map +1 -0
- package/dist/components/kemet-badge/types.d.ts +6 -0
- package/dist/components/kemet-badge/types.js +2 -0
- package/dist/components/kemet-badge/types.js.map +1 -0
- package/dist/components/kemet-button/docs/stories.d.ts +9 -0
- package/dist/components/kemet-button/docs/stories.js +51 -0
- package/dist/components/kemet-button/docs/stories.js.map +1 -0
- package/dist/components/kemet-button/kemet-button.d.ts +89 -0
- package/dist/components/kemet-button/kemet-button.js +101 -195
- package/dist/components/kemet-button/kemet-button.js.map +1 -0
- package/dist/components/kemet-button/styles.d.ts +1 -0
- package/dist/components/kemet-button/styles.js +73 -0
- package/dist/components/kemet-button/styles.js.map +1 -0
- package/dist/components/kemet-button/types.d.ts +10 -0
- package/dist/components/kemet-button/types.js +2 -0
- package/dist/components/kemet-button/types.js.map +1 -0
- package/dist/components/kemet-card/docs/stories.d.ts +9 -0
- package/dist/components/kemet-card/docs/stories.js +108 -0
- package/dist/components/kemet-card/docs/stories.js.map +1 -0
- package/dist/components/kemet-card/kemet-card.d.ts +47 -0
- package/dist/components/kemet-card/kemet-card.js +17 -21
- package/dist/components/kemet-card/kemet-card.js.map +1 -0
- package/dist/components/kemet-card/styles.d.ts +1 -0
- package/dist/components/kemet-card/styles.js +2 -2
- package/dist/components/kemet-card/styles.js.map +1 -0
- package/dist/components/kemet-card/types.d.ts +3 -0
- package/dist/components/kemet-card/types.js +2 -0
- package/dist/components/kemet-card/types.js.map +1 -0
- package/dist/components/kemet-carousel/docs/stories.d.ts +17 -0
- package/dist/components/kemet-carousel/docs/stories.js +168 -0
- package/dist/components/kemet-carousel/docs/stories.js.map +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-current.d.ts +26 -0
- package/dist/components/kemet-carousel/kemet-carousel-current.js +32 -34
- package/dist/components/kemet-carousel/kemet-carousel-current.js.map +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-first.d.ts +25 -0
- package/dist/components/kemet-carousel/kemet-carousel-first.js +30 -35
- package/dist/components/kemet-carousel/kemet-carousel-first.js.map +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-last.d.ts +25 -0
- package/dist/components/kemet-carousel/kemet-carousel-last.js +30 -35
- package/dist/components/kemet-carousel/kemet-carousel-last.js.map +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-link.d.ts +31 -0
- package/dist/components/kemet-carousel/kemet-carousel-link.js +40 -41
- package/dist/components/kemet-carousel/kemet-carousel-link.js.map +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-next.d.ts +25 -0
- package/dist/components/kemet-carousel/kemet-carousel-next.js +30 -35
- package/dist/components/kemet-carousel/kemet-carousel-next.js.map +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-prev.d.ts +25 -0
- package/dist/components/kemet-carousel/kemet-carousel-prev.js +30 -35
- package/dist/components/kemet-carousel/kemet-carousel-prev.js.map +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-slide.d.ts +29 -0
- package/dist/components/kemet-carousel/kemet-carousel-slide.js +38 -39
- package/dist/components/kemet-carousel/kemet-carousel-slide.js.map +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-total.d.ts +26 -0
- package/dist/components/kemet-carousel/kemet-carousel-total.js +32 -34
- package/dist/components/kemet-carousel/kemet-carousel-total.js.map +1 -0
- package/dist/components/kemet-carousel/kemet-carousel.d.ts +114 -0
- package/dist/components/kemet-carousel/kemet-carousel.js +328 -340
- package/dist/components/kemet-carousel/kemet-carousel.js.map +1 -0
- package/dist/components/kemet-carousel/styles.d.ts +1 -0
- package/dist/components/kemet-carousel/styles.js +2 -2
- package/dist/components/kemet-carousel/styles.js.map +1 -0
- package/dist/components/kemet-carousel/types.d.ts +21 -0
- package/dist/components/kemet-carousel/types.js +2 -0
- package/dist/components/kemet-carousel/types.js.map +1 -0
- package/dist/components/kemet-checkbox/docs/stories.d.ts +9 -0
- package/dist/components/kemet-checkbox/docs/stories.js +45 -0
- package/dist/components/kemet-checkbox/docs/stories.js.map +1 -0
- package/dist/components/kemet-checkbox/kemet-checkbox.d.ts +71 -0
- package/dist/components/kemet-checkbox/kemet-checkbox.js +118 -217
- package/dist/components/kemet-checkbox/kemet-checkbox.js.map +1 -0
- package/dist/components/kemet-checkbox/styles.d.ts +1 -0
- package/dist/components/kemet-checkbox/styles.js +83 -0
- package/dist/components/kemet-checkbox/styles.js.map +1 -0
- package/dist/components/kemet-checkbox/types.d.ts +15 -0
- package/dist/components/kemet-checkbox/types.js +2 -0
- package/dist/components/kemet-checkbox/types.js.map +1 -0
- package/dist/components/kemet-combo/docs/stories.d.ts +11 -0
- package/dist/components/kemet-combo/docs/stories.js +30 -0
- package/dist/components/kemet-combo/docs/stories.js.map +1 -0
- package/dist/components/kemet-combo/kemet-combo.d.ts +50 -0
- package/dist/components/kemet-combo/kemet-combo.js +111 -175
- package/dist/components/kemet-combo/kemet-combo.js.map +1 -0
- package/dist/components/kemet-combo/styles.d.ts +1 -0
- package/dist/components/kemet-combo/styles.js +44 -0
- package/dist/components/kemet-combo/styles.js.map +1 -0
- package/dist/components/kemet-combo/types.d.ts +5 -0
- package/dist/components/kemet-combo/types.js +2 -0
- package/dist/components/kemet-combo/types.js.map +1 -0
- package/dist/components/kemet-count/docs/stories.d.ts +11 -0
- package/dist/components/kemet-count/docs/stories.js +51 -0
- package/dist/components/kemet-count/docs/stories.js.map +1 -0
- package/dist/components/kemet-count/kemet-count.d.ts +39 -0
- package/dist/components/kemet-count/kemet-count.js +79 -82
- package/dist/components/kemet-count/kemet-count.js.map +1 -0
- package/dist/components/kemet-draggable/docs/stories.d.ts +9 -0
- package/dist/components/kemet-draggable/docs/stories.js +32 -0
- package/dist/components/kemet-draggable/docs/stories.js.map +1 -0
- package/dist/components/kemet-draggable/kemet-draggable.d.ts +49 -0
- package/dist/components/kemet-draggable/kemet-draggable.js +111 -114
- package/dist/components/kemet-draggable/kemet-draggable.js.map +1 -0
- package/dist/components/kemet-draggable/types.d.ts +6 -0
- package/dist/components/kemet-draggable/types.js +2 -0
- package/dist/components/kemet-draggable/types.js.map +1 -0
- package/dist/components/kemet-drawer/docs/stories.d.ts +10 -0
- package/dist/components/kemet-drawer/docs/stories.js +91 -0
- package/dist/components/kemet-drawer/docs/stories.js.map +1 -0
- package/dist/components/kemet-drawer/kemet-drawer.d.ts +48 -0
- package/dist/components/kemet-drawer/kemet-drawer.js +50 -65
- package/dist/components/kemet-drawer/kemet-drawer.js.map +1 -0
- package/dist/components/kemet-drawer/styles.d.ts +2 -0
- package/dist/components/kemet-drawer/styles.js +3 -5
- package/dist/components/kemet-drawer/styles.js.map +1 -0
- package/dist/components/kemet-drawer/types.d.ts +8 -0
- package/dist/components/kemet-drawer/types.js +2 -0
- package/dist/components/kemet-drawer/types.js.map +1 -0
- package/dist/components/kemet-fab/docs/stories.d.ts +11 -0
- package/dist/components/kemet-fab/docs/stories.js +87 -0
- package/dist/components/kemet-fab/docs/stories.js.map +1 -0
- package/dist/components/kemet-fab/kemet-fab.d.ts +49 -0
- package/dist/components/kemet-fab/kemet-fab.js +64 -67
- package/dist/components/kemet-fab/kemet-fab.js.map +1 -0
- package/dist/components/kemet-fab/styles.d.ts +1 -0
- package/dist/components/kemet-fab/styles.js +5 -5
- package/dist/components/kemet-fab/styles.js.map +1 -0
- package/dist/components/kemet-fab/types.d.ts +8 -0
- package/dist/components/kemet-fab/types.js +2 -0
- package/dist/components/kemet-fab/types.js.map +1 -0
- package/dist/components/kemet-field/docs/stories.d.ts +15 -0
- package/dist/components/kemet-field/docs/stories.js +105 -0
- package/dist/components/kemet-field/docs/stories.js.map +1 -0
- package/dist/components/kemet-field/kemet-field.d.ts +61 -0
- package/dist/components/kemet-field/kemet-field.js +102 -182
- package/dist/components/kemet-field/kemet-field.js.map +1 -0
- package/dist/components/kemet-field/styles.d.ts +1 -0
- package/dist/components/kemet-field/styles.js +61 -0
- package/dist/components/kemet-field/styles.js.map +1 -0
- package/dist/components/kemet-field/types.d.ts +13 -0
- package/dist/components/kemet-field/types.js +2 -0
- package/dist/components/kemet-field/types.js.map +1 -0
- package/dist/components/kemet-flipcard/docs/stories.d.ts +11 -0
- package/dist/components/kemet-flipcard/docs/stories.js +109 -0
- package/dist/components/kemet-flipcard/docs/stories.js.map +1 -0
- package/dist/components/kemet-flipcard/kemet-flipcard-trigger.d.ts +21 -0
- package/dist/components/kemet-flipcard/kemet-flipcard-trigger.js +29 -39
- package/dist/components/kemet-flipcard/kemet-flipcard-trigger.js.map +1 -0
- package/dist/components/kemet-flipcard/kemet-flipcard.d.ts +52 -0
- package/dist/components/kemet-flipcard/kemet-flipcard.js +97 -173
- package/dist/components/kemet-flipcard/kemet-flipcard.js.map +1 -0
- package/dist/components/kemet-flipcard/styles.d.ts +1 -0
- package/dist/components/kemet-flipcard/styles.js +85 -0
- package/dist/components/kemet-flipcard/styles.js.map +1 -0
- package/dist/components/kemet-flipcard/types.d.ts +7 -0
- package/dist/components/kemet-flipcard/types.js +2 -0
- package/dist/components/kemet-flipcard/types.js.map +1 -0
- package/dist/components/kemet-icon/docs/stories.d.ts +9 -0
- package/dist/components/kemet-icon/docs/stories.js +34 -0
- package/dist/components/kemet-icon/docs/stories.js.map +1 -0
- package/dist/components/kemet-icon/kemet-icon.d.ts +28 -0
- package/dist/components/kemet-icon/kemet-icon.js +86 -101
- package/dist/components/kemet-icon/kemet-icon.js.map +1 -0
- package/dist/components/kemet-icon/styles.d.ts +1 -0
- package/dist/components/kemet-icon/styles.js +9 -0
- package/dist/components/kemet-icon/styles.js.map +1 -0
- package/dist/components/kemet-icon/types.d.ts +5 -0
- package/dist/components/kemet-icon/types.js +2 -0
- package/dist/components/kemet-icon/types.js.map +1 -0
- package/dist/components/kemet-input/docs/stories.d.ts +9 -0
- package/dist/components/kemet-input/docs/stories.js +142 -0
- package/dist/components/kemet-input/docs/stories.js.map +1 -0
- package/dist/components/kemet-input/kemet-input.d.ts +193 -0
- package/dist/components/kemet-input/kemet-input.js +296 -447
- package/dist/components/kemet-input/kemet-input.js.map +1 -0
- package/dist/components/kemet-input/styles.d.ts +1 -0
- package/dist/components/kemet-input/styles.js +115 -0
- package/dist/components/kemet-input/styles.js.map +1 -0
- package/dist/components/kemet-input/types.d.ts +35 -0
- package/dist/components/kemet-input/types.js +2 -0
- package/dist/components/kemet-input/types.js.map +1 -0
- package/dist/components/kemet-modal/docs/stories.d.ts +10 -0
- package/dist/components/kemet-modal/docs/stories.js +101 -0
- package/dist/components/kemet-modal/docs/stories.js.map +1 -0
- package/dist/components/kemet-modal/kemet-modal-close.d.ts +21 -0
- package/dist/components/kemet-modal/kemet-modal-close.js +27 -30
- package/dist/components/kemet-modal/kemet-modal-close.js.map +1 -0
- package/dist/components/kemet-modal/kemet-modal.d.ts +49 -0
- package/dist/components/kemet-modal/kemet-modal.js +101 -115
- package/dist/components/kemet-modal/kemet-modal.js.map +1 -0
- package/dist/components/kemet-modal/styles.d.ts +2 -0
- package/dist/components/kemet-modal/styles.js +4 -4
- package/dist/components/kemet-modal/styles.js.map +1 -0
- package/dist/components/kemet-modal/types.d.ts +8 -0
- package/dist/components/kemet-modal/types.js +2 -0
- package/dist/components/kemet-modal/types.js.map +1 -0
- package/dist/components/kemet-password/docs/stories.d.ts +10 -0
- package/dist/components/kemet-password/docs/stories.js +37 -0
- package/dist/components/kemet-password/docs/stories.js.map +1 -0
- package/dist/components/kemet-password/kemet-password.d.ts +77 -0
- package/dist/components/kemet-password/kemet-password.js +142 -144
- package/dist/components/kemet-password/kemet-password.js.map +1 -0
- package/dist/components/kemet-password/styles.d.ts +1 -0
- package/dist/components/kemet-password/styles.js +5 -5
- package/dist/components/kemet-password/styles.js.map +1 -0
- package/dist/components/kemet-password/types.d.ts +10 -0
- package/dist/components/kemet-password/types.js +2 -0
- package/dist/components/kemet-password/types.js.map +1 -0
- package/dist/components/kemet-popper/docs/stories.d.ts +10 -0
- package/dist/components/kemet-popper/docs/stories.js +72 -0
- package/dist/components/kemet-popper/docs/stories.js.map +1 -0
- package/dist/components/kemet-popper/kemet-popper-close.d.ts +22 -0
- package/dist/components/kemet-popper/kemet-popper-close.js +49 -0
- package/dist/components/kemet-popper/kemet-popper-close.js.map +1 -0
- package/dist/components/kemet-popper/kemet-popper.d.ts +63 -0
- package/dist/components/kemet-popper/kemet-popper.js +182 -0
- package/dist/components/kemet-popper/kemet-popper.js.map +1 -0
- package/dist/components/kemet-popper/styles.d.ts +1 -0
- package/dist/components/kemet-popper/styles.effects.d.ts +8 -0
- package/dist/components/{kemet-popover → kemet-popper}/styles.effects.js +9 -16
- package/dist/components/kemet-popper/styles.effects.js.map +1 -0
- package/dist/components/kemet-popper/styles.js +28 -0
- package/dist/components/kemet-popper/styles.js.map +1 -0
- package/dist/components/kemet-popper/types.d.ts +3 -0
- package/dist/components/kemet-popper/types.js +2 -0
- package/dist/components/kemet-popper/types.js.map +1 -0
- package/dist/components/kemet-radio/docs/stories.d.ts +10 -0
- package/dist/components/kemet-radio/docs/stories.js +40 -0
- package/dist/components/kemet-radio/docs/stories.js.map +1 -0
- package/dist/components/kemet-radio/kemet-radio.d.ts +56 -0
- package/dist/components/kemet-radio/kemet-radio.js +76 -153
- package/dist/components/kemet-radio/kemet-radio.js.map +1 -0
- package/dist/components/kemet-radio/kemet-radios.d.ts +49 -0
- package/dist/components/kemet-radio/kemet-radios.js +112 -178
- package/dist/components/kemet-radio/kemet-radios.js.map +1 -0
- package/dist/components/kemet-radio/styles.d.ts +2 -0
- package/dist/components/kemet-radio/styles.js +102 -0
- package/dist/components/kemet-radio/styles.js.map +1 -0
- package/dist/components/kemet-radio/types.d.ts +20 -0
- package/dist/components/kemet-radio/types.js +2 -0
- package/dist/components/kemet-radio/types.js.map +1 -0
- package/dist/components/kemet-rotator/docs/stories.d.ts +9 -0
- package/dist/components/kemet-rotator/docs/stories.js +46 -0
- package/dist/components/kemet-rotator/docs/stories.js.map +1 -0
- package/dist/components/kemet-rotator/kemet-rotator.d.ts +40 -0
- package/dist/components/kemet-rotator/kemet-rotator.js +91 -180
- package/dist/components/kemet-rotator/kemet-rotator.js.map +1 -0
- package/dist/components/kemet-rotator/styles.d.ts +1 -0
- package/dist/components/kemet-rotator/styles.js +72 -0
- package/dist/components/kemet-rotator/styles.js.map +1 -0
- package/dist/components/kemet-rotator/types.d.ts +9 -0
- package/dist/components/kemet-rotator/types.js +2 -0
- package/dist/components/kemet-rotator/types.js.map +1 -0
- package/dist/components/kemet-scroll-link/docs/stories.d.ts +9 -0
- package/dist/components/kemet-scroll-link/docs/stories.js +97 -0
- package/dist/components/kemet-scroll-link/docs/stories.js.map +1 -0
- package/dist/components/kemet-scroll-link/kemet-scroll-link.d.ts +31 -0
- package/dist/components/kemet-scroll-link/kemet-scroll-link.js +62 -79
- package/dist/components/kemet-scroll-link/kemet-scroll-link.js.map +1 -0
- package/dist/components/kemet-scroll-link/types.d.ts +6 -0
- package/dist/components/kemet-scroll-link/types.js +2 -0
- package/dist/components/kemet-scroll-link/types.js.map +1 -0
- package/dist/components/kemet-scroll-nav/docs/stories.d.ts +10 -0
- package/dist/components/kemet-scroll-nav/docs/stories.js +162 -0
- package/dist/components/kemet-scroll-nav/docs/stories.js.map +1 -0
- package/dist/components/kemet-scroll-nav/kemet-scroll-nav.d.ts +34 -0
- package/dist/components/kemet-scroll-nav/kemet-scroll-nav.js +49 -86
- package/dist/components/kemet-scroll-nav/kemet-scroll-nav.js.map +1 -0
- package/dist/components/kemet-scroll-nav/styles.d.ts +1 -0
- package/dist/components/kemet-scroll-nav/styles.js +27 -0
- package/dist/components/kemet-scroll-nav/styles.js.map +1 -0
- package/dist/components/kemet-scroll-nav/types.d.ts +6 -0
- package/dist/components/kemet-scroll-nav/types.js +2 -0
- package/dist/components/kemet-scroll-nav/types.js.map +1 -0
- package/dist/components/kemet-scroll-snap/docs/stories.d.ts +11 -0
- package/dist/components/kemet-scroll-snap/docs/stories.js +131 -0
- package/dist/components/kemet-scroll-snap/docs/stories.js.map +1 -0
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap-paginator.d.ts +44 -0
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap-paginator.js +79 -124
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap-paginator.js.map +1 -0
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap-slide.d.ts +30 -0
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap-slide.js +36 -47
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap-slide.js.map +1 -0
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap.d.ts +46 -0
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap.js +93 -164
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap.js.map +1 -0
- package/dist/components/kemet-scroll-snap/styles.d.ts +2 -0
- package/dist/components/kemet-scroll-snap/styles.js +74 -0
- package/dist/components/kemet-scroll-snap/styles.js.map +1 -0
- package/dist/components/kemet-scroll-snap/types.d.ts +20 -0
- package/dist/components/kemet-scroll-snap/types.js +2 -0
- package/dist/components/kemet-scroll-snap/types.js.map +1 -0
- package/dist/components/kemet-select/docs/stories.d.ts +10 -0
- package/dist/components/kemet-select/docs/stories.js +57 -0
- package/dist/components/kemet-select/docs/stories.js.map +1 -0
- package/dist/components/kemet-select/kemet-option.d.ts +29 -0
- package/dist/components/kemet-select/kemet-option.js +28 -33
- package/dist/components/kemet-select/kemet-option.js.map +1 -0
- package/dist/components/kemet-select/kemet-select.d.ts +110 -0
- package/dist/components/kemet-select/kemet-select.js +179 -265
- package/dist/components/kemet-select/kemet-select.js.map +1 -0
- package/dist/components/kemet-select/styles.d.ts +1 -0
- package/dist/components/kemet-select/styles.js +73 -0
- package/dist/components/kemet-select/styles.js.map +1 -0
- package/dist/components/kemet-select/types.d.ts +20 -0
- package/dist/components/kemet-select/types.js +2 -0
- package/dist/components/kemet-select/types.js.map +1 -0
- package/dist/components/kemet-sortable/docs/stories.d.ts +10 -0
- package/dist/components/kemet-sortable/docs/stories.js +34 -0
- package/dist/components/kemet-sortable/docs/stories.js.map +1 -0
- package/dist/components/kemet-sortable/kemet-sortable-item.d.ts +21 -0
- package/dist/components/kemet-sortable/kemet-sortable-item.js +21 -39
- package/dist/components/kemet-sortable/kemet-sortable-item.js.map +1 -0
- package/dist/components/kemet-sortable/kemet-sortable.d.ts +25 -0
- package/dist/components/kemet-sortable/kemet-sortable.js +61 -79
- package/dist/components/kemet-sortable/kemet-sortable.js.map +1 -0
- package/dist/components/kemet-sortable/styles.d.ts +2 -0
- package/dist/components/kemet-sortable/styles.js +22 -0
- package/dist/components/kemet-sortable/styles.js.map +1 -0
- package/dist/components/kemet-sortable/types.d.ts +3 -0
- package/dist/components/kemet-sortable/types.js +2 -0
- package/dist/components/kemet-sortable/types.js.map +1 -0
- package/dist/components/kemet-svgs/docs/stories.d.ts +10 -0
- package/dist/components/kemet-svgs/docs/stories.js +67 -0
- package/dist/components/kemet-svgs/docs/stories.js.map +1 -0
- package/dist/components/kemet-svgs/kemet-svg.d.ts +38 -0
- package/dist/components/kemet-svgs/kemet-svg.js +76 -90
- package/dist/components/kemet-svgs/kemet-svg.js.map +1 -0
- package/dist/components/kemet-svgs/kemet-svgs.d.ts +27 -0
- package/dist/components/kemet-svgs/kemet-svgs.js +39 -48
- package/dist/components/kemet-svgs/kemet-svgs.js.map +1 -0
- package/dist/components/kemet-svgs/types.d.ts +10 -0
- package/dist/components/kemet-svgs/types.js +2 -0
- package/dist/components/kemet-svgs/types.js.map +1 -0
- package/dist/components/kemet-tabs/docs/stories.d.ts +9 -0
- package/dist/components/kemet-tabs/docs/stories.js +142 -0
- package/dist/components/kemet-tabs/docs/stories.js.map +1 -0
- package/dist/components/kemet-tabs/kemet-tab-panel.d.ts +27 -0
- package/dist/components/kemet-tabs/kemet-tab-panel.js +36 -76
- package/dist/components/kemet-tabs/kemet-tab-panel.js.map +1 -0
- package/dist/components/kemet-tabs/kemet-tab.d.ts +37 -0
- package/dist/components/kemet-tabs/kemet-tab.js +57 -92
- package/dist/components/kemet-tabs/kemet-tab.js.map +1 -0
- package/dist/components/kemet-tabs/kemet-tabs.d.ts +91 -0
- package/dist/components/kemet-tabs/kemet-tabs.js +438 -473
- package/dist/components/kemet-tabs/kemet-tabs.js.map +1 -0
- package/dist/components/kemet-tabs/styles.d.ts +3 -0
- package/dist/components/kemet-tabs/styles.js +71 -3
- package/dist/components/kemet-tabs/styles.js.map +1 -0
- package/dist/components/kemet-tabs/types.d.ts +27 -0
- package/dist/components/kemet-tabs/types.js +2 -0
- package/dist/components/kemet-tabs/types.js.map +1 -0
- package/dist/components/kemet-textarea/docs/stories.d.ts +9 -0
- package/dist/components/kemet-textarea/docs/stories.js +88 -0
- package/dist/components/kemet-textarea/docs/stories.js.map +1 -0
- package/dist/components/kemet-textarea/kemet-textarea.d.ts +123 -0
- package/dist/components/kemet-textarea/kemet-textarea.js +235 -308
- package/dist/components/kemet-textarea/kemet-textarea.js.map +1 -0
- package/dist/components/kemet-textarea/styles.d.ts +1 -0
- package/dist/components/kemet-textarea/styles.js +69 -0
- package/dist/components/kemet-textarea/styles.js.map +1 -0
- package/dist/components/kemet-textarea/types.d.ts +20 -0
- package/dist/components/kemet-textarea/types.js +2 -0
- package/dist/components/kemet-textarea/types.js.map +1 -0
- package/dist/components/kemet-toggle/docs/stories.d.ts +9 -0
- package/dist/components/kemet-toggle/docs/stories.js +58 -0
- package/dist/components/kemet-toggle/docs/stories.js.map +1 -0
- package/dist/components/kemet-toggle/kemet-toggle.d.ts +60 -0
- package/dist/components/kemet-toggle/kemet-toggle.js +73 -169
- package/dist/components/kemet-toggle/kemet-toggle.js.map +1 -0
- package/dist/components/kemet-toggle/styles.d.ts +1 -0
- package/dist/components/kemet-toggle/styles.js +84 -0
- package/dist/components/kemet-toggle/styles.js.map +1 -0
- package/dist/components/kemet-toggle/types.d.ts +10 -0
- package/dist/components/kemet-toggle/types.js +2 -0
- package/dist/components/kemet-toggle/types.js.map +1 -0
- package/dist/components/kemet-tooltip/docs/stories.d.ts +10 -0
- package/dist/components/kemet-tooltip/docs/stories.js +72 -0
- package/dist/components/kemet-tooltip/docs/stories.js.map +1 -0
- package/dist/components/kemet-tooltip/kemet-tooltip.d.ts +33 -0
- package/dist/components/kemet-tooltip/kemet-tooltip.js +68 -0
- package/dist/components/kemet-tooltip/kemet-tooltip.js.map +1 -0
- package/dist/components/kemet-tooltip/styles.d.ts +1 -0
- package/dist/components/kemet-tooltip/styles.js +61 -0
- package/dist/components/kemet-tooltip/styles.js.map +1 -0
- package/dist/components/kemet-tooltip/types.d.ts +3 -0
- package/dist/components/kemet-tooltip/types.js +2 -0
- package/dist/components/kemet-tooltip/types.js.map +1 -0
- package/dist/components/kemet-tracker/docs/stories.d.ts +10 -0
- package/dist/components/kemet-tracker/docs/stories.js +46 -0
- package/dist/components/kemet-tracker/docs/stories.js.map +1 -0
- package/dist/components/kemet-tracker/kemet-tracker-step.d.ts +63 -0
- package/dist/components/kemet-tracker/kemet-tracker-step.js +75 -76
- package/dist/components/kemet-tracker/kemet-tracker-step.js.map +1 -0
- package/dist/components/kemet-tracker/kemet-tracker.d.ts +26 -0
- package/dist/components/kemet-tracker/kemet-tracker.js +59 -65
- package/dist/components/kemet-tracker/kemet-tracker.js.map +1 -0
- package/dist/components/kemet-tracker/styles.d.ts +1 -0
- package/dist/components/kemet-tracker/styles.js +2 -2
- package/dist/components/kemet-tracker/styles.js.map +1 -0
- package/dist/components/kemet-tracker/types.d.ts +13 -0
- package/dist/components/kemet-tracker/types.js +2 -0
- package/dist/components/kemet-tracker/types.js.map +1 -0
- package/dist/components/kemet-upload/docs/stories.d.ts +10 -0
- package/dist/components/kemet-upload/docs/stories.js +57 -0
- package/dist/components/kemet-upload/docs/stories.js.map +1 -0
- package/dist/components/kemet-upload/kemet-upload-file.d.ts +46 -0
- package/dist/components/kemet-upload/kemet-upload-file.js +69 -117
- package/dist/components/kemet-upload/kemet-upload-file.js.map +1 -0
- package/dist/components/kemet-upload/kemet-upload.d.ts +58 -0
- package/dist/components/kemet-upload/kemet-upload.js +105 -169
- package/dist/components/kemet-upload/kemet-upload.js.map +1 -0
- package/dist/components/kemet-upload/styles.d.ts +3 -0
- package/dist/components/kemet-upload/styles.js +117 -1
- package/dist/components/kemet-upload/styles.js.map +1 -0
- package/dist/components/kemet-upload/types.d.ts +21 -0
- package/dist/components/kemet-upload/types.js +2 -0
- package/dist/components/kemet-upload/types.js.map +1 -0
- package/dist/kemet-components.bundle.js +88 -0
- package/dist/kemet-components.bundle.js.map +1 -0
- package/dist/kemet-components.cjs +8599 -7472
- package/dist/kemet-components.js +8602 -7469
- package/dist/styles/core/attributes.scss +2 -2
- package/dist/styles/core/layout.scss +2 -2
- package/dist/styles/kemet.base.css +107 -0
- package/dist/styles/kemet.base.css.map +1 -0
- package/dist/styles/kemet.base.scss +28 -0
- package/dist/styles/kemet.core.css +163 -887
- package/dist/styles/kemet.core.css.map +1 -1
- package/dist/styles/kemet.core.scss +0 -1
- package/dist/styles/{core → shared}/_config.scss +6 -2
- package/dist/styles/{core → shared}/_helpers.scss +55 -4
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utilities/controllers/forms.d.ts +11 -0
- package/dist/utilities/controllers/forms.js +93 -114
- package/dist/utilities/controllers/forms.js.map +1 -0
- package/dist/utilities/misc/constants.d.ts +5 -0
- package/dist/utilities/misc/constants.js +6 -0
- package/dist/utilities/misc/constants.js.map +1 -0
- package/dist/utilities/misc/events.d.ts +1 -0
- package/dist/utilities/misc/events.js +2 -3
- package/dist/utilities/misc/events.js.map +1 -0
- package/package.json +69 -76
- package/dist/components/kemet-popover/kemet-popover-close.js +0 -57
- package/dist/components/kemet-popover/kemet-popover.js +0 -418
- package/dist/components/kemet-popover/styles.tooltip.js +0 -96
- package/dist/kemet-components.min.js +0 -3689
- package/dist/styles/core/base.scss +0 -38
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
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';
|
|
4
6
|
/**
|
|
5
7
|
* @since 1.0.0
|
|
6
8
|
* @status stable
|
|
@@ -28,142 +30,31 @@ import { emitEvent } from '../../utilities/misc/events.js';
|
|
|
28
30
|
* @event kemet-field-input - Fires when input fires on the input slot
|
|
29
31
|
*
|
|
30
32
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
label {
|
|
51
|
-
position: relative;
|
|
52
|
-
display: block;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
label span {
|
|
56
|
-
color: inherit;
|
|
57
|
-
display: inline-flex;
|
|
58
|
-
gap: 0.5rem;
|
|
59
|
-
align-items: center;
|
|
60
|
-
margin-bottom: 0.8rem;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:host([status='error']) kemet-icon {
|
|
64
|
-
color: var(--kemet-color-error);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
:host([status='success']) kemet-icon {
|
|
68
|
-
color: var(--kemet-color-success);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:host([status='warning']) kemet-icon {
|
|
72
|
-
color: var(--kemet-color-warning);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.message {
|
|
76
|
-
font-size: 0.9rem;
|
|
77
|
-
line-height: 1;
|
|
78
|
-
display: block;
|
|
79
|
-
margin-top: 0.8rem;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
:host([status='error']) .message {
|
|
83
|
-
color: var(--kemet-color-error);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
:host([status='success']) .message {
|
|
87
|
-
color: var(--kemet-color-success);
|
|
33
|
+
let KemetField = class KemetField extends LitElement {
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
this.status = 'standard';
|
|
37
|
+
this.errorIcon = 'exclamation-triangle-fill';
|
|
38
|
+
this.successIcon = 'check-lg';
|
|
39
|
+
// listeners
|
|
40
|
+
this.addEventListener('kemet-input-focused', event => this.handleFocused(event));
|
|
41
|
+
this.addEventListener('kemet-input-status', event => this.handleStatus(event));
|
|
42
|
+
this.addEventListener('kemet-input-input', event => this.handleInput(event));
|
|
43
|
+
this.addEventListener('kemet-count-status', event => this.handleStatus(event));
|
|
44
|
+
this.addEventListener('kemet-combo-selection', event => this.handleSelection(event));
|
|
45
|
+
}
|
|
46
|
+
firstUpdated() {
|
|
47
|
+
this.slotInput = this.querySelector('[slot="input"]');
|
|
48
|
+
this.slotCombo = this.querySelector('[slot="combo"]');
|
|
49
|
+
if (this.slotInput.value) {
|
|
50
|
+
this.length = this.slotInput.value.length;
|
|
88
51
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
color: var(--kemet-color-warning);
|
|
52
|
+
else {
|
|
53
|
+
this.length = 0;
|
|
92
54
|
}
|
|
93
|
-
`,
|
|
94
|
-
];
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
static get properties() {
|
|
98
|
-
return {
|
|
99
|
-
slug: {
|
|
100
|
-
type: String,
|
|
101
|
-
},
|
|
102
|
-
label: {
|
|
103
|
-
type: String,
|
|
104
|
-
},
|
|
105
|
-
message: {
|
|
106
|
-
type: String,
|
|
107
|
-
},
|
|
108
|
-
focused: {
|
|
109
|
-
type: Boolean,
|
|
110
|
-
reflect: true,
|
|
111
|
-
},
|
|
112
|
-
status: {
|
|
113
|
-
type: String,
|
|
114
|
-
reflect: true,
|
|
115
|
-
},
|
|
116
|
-
filled: {
|
|
117
|
-
type: Boolean,
|
|
118
|
-
reflect: true,
|
|
119
|
-
},
|
|
120
|
-
length: {
|
|
121
|
-
type: Number,
|
|
122
|
-
},
|
|
123
|
-
disabled: {
|
|
124
|
-
type: Boolean,
|
|
125
|
-
reflect: true,
|
|
126
|
-
},
|
|
127
|
-
errorIcon: {
|
|
128
|
-
type: String,
|
|
129
|
-
attribute: 'error-icon',
|
|
130
|
-
},
|
|
131
|
-
successIcon: {
|
|
132
|
-
type: String,
|
|
133
|
-
attribute: 'success-icon',
|
|
134
|
-
},
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
constructor() {
|
|
139
|
-
super();
|
|
140
|
-
|
|
141
|
-
// managed properties
|
|
142
|
-
this.status = 'standard';
|
|
143
|
-
this.errorIcon = 'exclamation-triangle-fill';
|
|
144
|
-
this.successIcon = 'check-lg';
|
|
145
|
-
|
|
146
|
-
// listeners
|
|
147
|
-
this.addEventListener('kemet-input-focused', event => this.handleFocused(event));
|
|
148
|
-
this.addEventListener('kemet-input-status', event => this.handleStatus(event));
|
|
149
|
-
this.addEventListener('kemet-input-input', event => this.handleInput(event));
|
|
150
|
-
this.addEventListener('kemet-count-status', event => this.handleStatus(event));
|
|
151
|
-
this.addEventListener('kemet-combo-selection', event => this.handleSelection(event));
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
firstUpdated() {
|
|
155
|
-
this.slotInput = this.querySelector('[slot="input"]');
|
|
156
|
-
this.slotCombo = this.querySelector('[slot="combo"]');
|
|
157
|
-
|
|
158
|
-
if (this.slotInput.value) {
|
|
159
|
-
this.length = this.slotInput.value.length;
|
|
160
|
-
} else {
|
|
161
|
-
this.length = 0;
|
|
162
55
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
render() {
|
|
166
|
-
return html`
|
|
56
|
+
render() {
|
|
57
|
+
return html `
|
|
167
58
|
<label for="${this.slug}" id="${this.slug}-label" part="label">
|
|
168
59
|
<span part="text">${this.label}${this.makeStatusIcon()}</span>
|
|
169
60
|
<slot name="input"></slot>
|
|
@@ -171,54 +62,83 @@ export default class KemetField extends LitElement {
|
|
|
171
62
|
${this.makeStatusMessage()}
|
|
172
63
|
<slot name="component"></slot>
|
|
173
64
|
`;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
makeStatusIcon() {
|
|
177
|
-
if (this.status === 'error' || this.status === 'warning') {
|
|
178
|
-
return html`<kemet-icon icon="${this.errorIcon}" size="16"></kemet-icon>`;
|
|
179
65
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
66
|
+
makeStatusIcon() {
|
|
67
|
+
if (this.status === 'error' || this.status === 'warning') {
|
|
68
|
+
return html `<kemet-icon icon="${this.errorIcon}" size="16"></kemet-icon>`;
|
|
69
|
+
}
|
|
70
|
+
if (this.status === 'success') {
|
|
71
|
+
return html `<kemet-icon icon="${this.successIcon}" size="16"></kemet-icon>`;
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
183
74
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
if (this.status !== 'standard') {
|
|
190
|
-
return html`<span class="message" part="message">${this.message}</span>`;
|
|
75
|
+
makeStatusMessage() {
|
|
76
|
+
if (this.status !== 'standard') {
|
|
77
|
+
return html `<span class="message" part="message">${this.message}</span>`;
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
191
80
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
81
|
+
handleFocused(event) {
|
|
82
|
+
this.focused = event.detail;
|
|
83
|
+
if (!this.focused && this.slotCombo && this.slotCombo.options.length < 1) {
|
|
84
|
+
this.slotCombo.show = false;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
handleStatus(event) {
|
|
88
|
+
this.status = event.detail.status;
|
|
89
|
+
}
|
|
90
|
+
handleInput(event) {
|
|
91
|
+
emitEvent(this, 'kemet-field-input', event.detail.length);
|
|
92
|
+
if (event.detail === '') {
|
|
93
|
+
this.filled = false;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
this.filled = true;
|
|
97
|
+
}
|
|
201
98
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
handleStatus(event) {
|
|
205
|
-
this.status = event.detail.status;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
handleInput(event) {
|
|
209
|
-
emitEvent(this, 'kemet-field-input', event.detail.length);
|
|
210
|
-
|
|
211
|
-
if (event.detail === '') {
|
|
212
|
-
this.filled = false;
|
|
213
|
-
} else {
|
|
214
|
-
this.filled = true;
|
|
99
|
+
handleSelection(event) {
|
|
100
|
+
this.slotInput.setAttribute('aria-activedescendant', event.detail);
|
|
215
101
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
102
|
+
};
|
|
103
|
+
KemetField.styles = [stylesBase];
|
|
104
|
+
__decorate([
|
|
105
|
+
property({ type: String })
|
|
106
|
+
], KemetField.prototype, "slug", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
property({ type: String })
|
|
109
|
+
], KemetField.prototype, "label", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
property({ type: String })
|
|
112
|
+
], KemetField.prototype, "message", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
property({ type: Boolean, reflect: true })
|
|
115
|
+
], KemetField.prototype, "focused", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
property({ type: String, reflect: true })
|
|
118
|
+
], KemetField.prototype, "status", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
property({ type: Boolean, reflect: true })
|
|
121
|
+
], KemetField.prototype, "filled", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
property({ type: Number })
|
|
124
|
+
], KemetField.prototype, "length", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
property({ type: Boolean, reflect: true })
|
|
127
|
+
], KemetField.prototype, "disabled", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
property({ type: String, attribute: 'error-icon' })
|
|
130
|
+
], KemetField.prototype, "errorIcon", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
property({ type: String, attribute: 'success-icon' })
|
|
133
|
+
], KemetField.prototype, "successIcon", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
state()
|
|
136
|
+
], KemetField.prototype, "slotInput", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
state()
|
|
139
|
+
], KemetField.prototype, "slotCombo", void 0);
|
|
140
|
+
KemetField = __decorate([
|
|
141
|
+
customElement('kemet-field')
|
|
142
|
+
], KemetField);
|
|
143
|
+
export default KemetField;
|
|
144
|
+
//# sourceMappingURL=kemet-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kemet-field.js","sourceRoot":"","sources":["../../../src/components/kemet-field/kemet-field.ts"],"names":[],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hD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;+CACrB;AAGjC;IADC,KAAK,EAAE;6CACgD;AAGxD;IADC,KAAK,EAAE;6CACuB;AArCZ,UAAU;IAD9B,aAAa,CAAC,aAAa,CAAC;GACR,UAAU,CAqH9B;eArHoB,UAAU","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { emitEvent } from '../../utilities/misc/events';\nimport { KemetComboInterface } from '../kemet-combo/types';\nimport { KemetInputInterface } from '../kemet-input/types';\nimport { KemetTextareaInterface } from '../kemet-textarea/types';\nimport { stylesBase } from './styles';\nimport { TypeStatus } from './types';\n\n/**\n * @since 1.0.0\n * @status stable\n *\n * @tagname kemet-field\n * @summary Used in combination with Input, Select, and Textarea, to make a Field.\n *\n * @prop {string} slug - Uniquely identifies the control. Use the same slug for slotted sub components.\n * @prop {string} label - The label text\n * @prop {string} message - The validation message for error or success\n * @prop {boolean} focused - Determines if the containing input is focused\n * @prop {string} status - The validation status of standard, error, or success\n * @prop {boolean} filled - Is true when the containing input has a value\n * @prop {number} length - The length of the containing input\n * @prop {boolean} disabled - Determines the disabled state of the control\n * @prop {string} errorIcon - The icon while in an error or warning state\n * @prop {string} successIcon - The icon while in an success state\n *\n * @slot component - Allows sub components of the field to display.\n *\n * @csspart label - The label of the field.\n * @csspart message - The validation message of the field.\n * @csspart text - The text in the label.\n *\n * @event kemet-field-input - Fires when input fires on the input slot\n *\n */\n\n@customElement('kemet-field')\nexport default class KemetField extends LitElement {\n static styles = [stylesBase];\n\n @property({ type: String })\n slug: string;\n\n @property({ type: String })\n label: string;\n\n @property({ type: String })\n message: string;\n\n @property({ type: Boolean, reflect: true })\n focused: boolean;\n\n @property({ type: String, reflect: true })\n status: TypeStatus = 'standard';\n\n @property({ type: Boolean, reflect: true })\n filled: boolean;\n\n @property({ type: Number })\n length: number;\n\n @property({ type: Boolean, reflect: true })\n disabled: boolean;\n\n @property({ type: String, attribute: 'error-icon' })\n errorIcon: string = 'exclamation-triangle-fill';\n\n @property({ type: String, attribute: 'success-icon' })\n successIcon: string = 'check-lg';\n\n @state()\n slotInput: KemetInputInterface | KemetTextareaInterface;\n\n @state()\n slotCombo: KemetComboInterface;\n\n constructor() {\n super();\n\n // listeners\n this.addEventListener('kemet-input-focused', event => this.handleFocused(event));\n this.addEventListener('kemet-input-status', event => this.handleStatus(event));\n this.addEventListener('kemet-input-input', event => this.handleInput(event));\n this.addEventListener('kemet-count-status', event => this.handleStatus(event));\n this.addEventListener('kemet-combo-selection', event => this.handleSelection(event));\n }\n\n firstUpdated() {\n this.slotInput = this.querySelector('[slot=\"input\"]');\n this.slotCombo = this.querySelector('[slot=\"combo\"]');\n\n if (this.slotInput.value) {\n this.length = this.slotInput.value.length;\n } else {\n this.length = 0;\n }\n }\n\n render() {\n return html`\n <label for=\"${this.slug}\" id=\"${this.slug}-label\" part=\"label\">\n <span part=\"text\">${this.label}${this.makeStatusIcon()}</span>\n <slot name=\"input\"></slot>\n </label>\n ${this.makeStatusMessage()}\n <slot name=\"component\"></slot>\n `;\n }\n\n makeStatusIcon() {\n if (this.status === 'error' || this.status === 'warning') {\n return html`<kemet-icon icon=\"${this.errorIcon}\" size=\"16\"></kemet-icon>`;\n }\n\n if (this.status === 'success') {\n return html`<kemet-icon icon=\"${this.successIcon}\" size=\"16\"></kemet-icon>`;\n }\n\n return null;\n }\n\n makeStatusMessage() {\n if (this.status !== 'standard') {\n return html`<span class=\"message\" part=\"message\">${this.message}</span>`;\n }\n\n return null;\n }\n\n handleFocused(event) {\n this.focused = event.detail;\n\n if (!this.focused && this.slotCombo && this.slotCombo.options.length < 1) {\n this.slotCombo.show = false;\n }\n }\n\n handleStatus(event) {\n this.status = event.detail.status;\n }\n\n handleInput(event) {\n emitEvent(this, 'kemet-field-input', event.detail.length);\n\n if (event.detail === '') {\n this.filled = false;\n } else {\n this.filled = true;\n }\n }\n\n handleSelection(event) {\n this.slotInput.setAttribute('aria-activedescendant', event.detail);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-field': KemetField\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const stylesBase: import("lit").CSSResult;
|
|
@@ -0,0 +1,61 @@
|
|
|
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: block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host([disabled]) {
|
|
14
|
+
opacity: 0.5;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
label {
|
|
18
|
+
position: relative;
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
label span {
|
|
23
|
+
color: inherit;
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
gap: 0.5rem;
|
|
26
|
+
align-items: center;
|
|
27
|
+
margin-bottom: 0.8rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([status='error']) kemet-icon {
|
|
31
|
+
color: var(--kemet-color-error);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([status='success']) kemet-icon {
|
|
35
|
+
color: var(--kemet-color-success);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([status='warning']) kemet-icon {
|
|
39
|
+
color: var(--kemet-color-warning);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.message {
|
|
43
|
+
font-size: 0.9rem;
|
|
44
|
+
line-height: 1;
|
|
45
|
+
display: block;
|
|
46
|
+
margin-top: 0.8rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host([status='error']) .message {
|
|
50
|
+
color: var(--kemet-color-error);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host([status='success']) .message {
|
|
54
|
+
color: var(--kemet-color-success);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:host([status='warning']) .message {
|
|
58
|
+
color: var(--kemet-color-warning);
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/kemet-field/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D5B,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: block;\n }\n\n :host([disabled]) {\n opacity: 0.5;\n }\n\n label {\n position: relative;\n display: block;\n }\n\n label span {\n color: inherit;\n display: inline-flex;\n gap: 0.5rem;\n align-items: center;\n margin-bottom: 0.8rem;\n }\n\n :host([status='error']) kemet-icon {\n color: var(--kemet-color-error);\n }\n\n :host([status='success']) kemet-icon {\n color: var(--kemet-color-success);\n }\n\n :host([status='warning']) kemet-icon {\n color: var(--kemet-color-warning);\n }\n\n .message {\n font-size: 0.9rem;\n line-height: 1;\n display: block;\n margin-top: 0.8rem;\n }\n\n :host([status='error']) .message {\n color: var(--kemet-color-error);\n }\n\n :host([status='success']) .message {\n color: var(--kemet-color-success);\n }\n\n :host([status='warning']) .message {\n color: var(--kemet-color-warning);\n }\n`;\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare type TypeStatus = 'standard' | 'error' | 'success' | 'warning';
|
|
2
|
+
export interface KemetFieldInterface extends HTMLElement {
|
|
3
|
+
slug?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
message?: string;
|
|
6
|
+
focused?: boolean;
|
|
7
|
+
status?: string;
|
|
8
|
+
filled?: boolean;
|
|
9
|
+
length?: number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
errorIcon?: string;
|
|
12
|
+
successIcon?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/kemet-field/types.ts"],"names":[],"mappings":"","sourcesContent":["export type TypeStatus = 'standard' | 'error' | 'success' | 'warning';\n\nexport interface KemetFieldInterface extends HTMLElement {\n slug?: string,\n label?: string,\n message?: string,\n focused?: boolean,\n status?: string,\n filled?: boolean,\n length?: number,\n disabled?: boolean,\n errorIcon?: string,\n successIcon?: string,\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components';
|
|
2
|
+
import '../kemet-flipcard';
|
|
3
|
+
import '../kemet-flipcard-trigger';
|
|
4
|
+
import '../../kemet-button/kemet-button';
|
|
5
|
+
import '../../kemet-tabs/kemet-tabs';
|
|
6
|
+
import '../../kemet-tabs/kemet-tab';
|
|
7
|
+
import '../../kemet-tabs/kemet-tab-panel';
|
|
8
|
+
declare const meta: Meta;
|
|
9
|
+
export default meta;
|
|
10
|
+
declare type Story = StoryObj;
|
|
11
|
+
export declare const Standard: Story;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import '../kemet-flipcard';
|
|
3
|
+
import '../kemet-flipcard-trigger';
|
|
4
|
+
import '../../kemet-button/kemet-button';
|
|
5
|
+
import '../../kemet-tabs/kemet-tabs';
|
|
6
|
+
import '../../kemet-tabs/kemet-tab';
|
|
7
|
+
import '../../kemet-tabs/kemet-tab-panel';
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Components / Flipcard',
|
|
10
|
+
component: 'kemet-flipcard',
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
const Template = ({ width = '50%', height = 'auto', frontColor = 'var(--kemet-color-text)', frontBackgroundColor = 'transparent', backColor = 'var(--kemet-color-text)', backBackgroundColor = 'transparent', border = '2px solid var(--kemet-color-background)', borderRadius = '0', ratio = '16/9', flipped = false, measure = false, axis = 'horizontal', flipOnHover = false, rounded = false, }) => html `
|
|
14
|
+
<style>
|
|
15
|
+
kemet-flipcard {
|
|
16
|
+
--kemet-flipcard-width: ${width};
|
|
17
|
+
--kemet-flipcard-height: ${height};
|
|
18
|
+
--kemet-flipcard-front-color: ${frontColor};
|
|
19
|
+
--kemet-flipcard-front-background-color: ${frontBackgroundColor};
|
|
20
|
+
--kemet-flipcard-back-color: ${backColor};
|
|
21
|
+
--kemet-flipcard-back-background-color: ${backBackgroundColor};
|
|
22
|
+
--kemet-flipcard-border: ${border};
|
|
23
|
+
--kemet-flipcard-border-radius: ${borderRadius};
|
|
24
|
+
--kemet-flipcard-ratio: ${ratio};
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
27
|
+
<kemet-flipcard
|
|
28
|
+
?flipped="${flipped}"
|
|
29
|
+
?measure="${measure}"
|
|
30
|
+
axis="${axis}"
|
|
31
|
+
?flip-on-hover="${flipOnHover}"
|
|
32
|
+
?rounded=${rounded}
|
|
33
|
+
>
|
|
34
|
+
<div slot="front" kemet-elevation="layer5" kemet-padding="tiny:normal">
|
|
35
|
+
<p>This is the front of the card.</p>
|
|
36
|
+
<kemet-flipcard-trigger>
|
|
37
|
+
<kemet-button>Flip Me</kemet-button>
|
|
38
|
+
</kemet-flipcard-trigger>
|
|
39
|
+
</div>
|
|
40
|
+
<div slot="back" kemet-elevation="layer5" kemet-padding="tiny:normal">
|
|
41
|
+
<p>This is the back of the card.</p>
|
|
42
|
+
<kemet-flipcard-trigger>
|
|
43
|
+
<kemet-button>Flip Me</kemet-button>
|
|
44
|
+
</kemet-flipcard-trigger>
|
|
45
|
+
</div>
|
|
46
|
+
</kemet-flipcard>
|
|
47
|
+
`;
|
|
48
|
+
export const Standard = {
|
|
49
|
+
render: (args) => Template(args),
|
|
50
|
+
argTypes: {
|
|
51
|
+
width: {
|
|
52
|
+
control: { type: 'text' },
|
|
53
|
+
},
|
|
54
|
+
height: {
|
|
55
|
+
control: { type: 'text' },
|
|
56
|
+
},
|
|
57
|
+
frontColor: {
|
|
58
|
+
control: { type: 'color' },
|
|
59
|
+
},
|
|
60
|
+
frontBackgroundColor: {
|
|
61
|
+
control: { type: 'color' },
|
|
62
|
+
},
|
|
63
|
+
backColor: {
|
|
64
|
+
control: { type: 'color' },
|
|
65
|
+
},
|
|
66
|
+
backBackgroundColor: {
|
|
67
|
+
control: { type: 'color' },
|
|
68
|
+
},
|
|
69
|
+
border: {
|
|
70
|
+
control: { type: 'text' },
|
|
71
|
+
},
|
|
72
|
+
borderRadius: {
|
|
73
|
+
control: { type: 'text' },
|
|
74
|
+
},
|
|
75
|
+
flipped: {
|
|
76
|
+
control: { type: 'boolean' },
|
|
77
|
+
},
|
|
78
|
+
measure: {
|
|
79
|
+
control: { type: 'boolean' },
|
|
80
|
+
},
|
|
81
|
+
axis: {
|
|
82
|
+
control: { type: 'select' },
|
|
83
|
+
options: ['horizontal', 'vertical'],
|
|
84
|
+
},
|
|
85
|
+
flipOnHover: {
|
|
86
|
+
control: { type: 'boolean' },
|
|
87
|
+
},
|
|
88
|
+
rounded: {
|
|
89
|
+
control: { type: 'boolean' },
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
args: {
|
|
93
|
+
width: '50%',
|
|
94
|
+
height: 'auto',
|
|
95
|
+
frontColor: 'var(--kemet-color-text)',
|
|
96
|
+
frontBackgroundColor: 'transparent',
|
|
97
|
+
backColor: 'var(--kemet-color-text)',
|
|
98
|
+
backBackgroundColor: 'transparent',
|
|
99
|
+
border: '2px solid var(--kemet-color-background)',
|
|
100
|
+
borderRadius: '0',
|
|
101
|
+
ratio: '16/9',
|
|
102
|
+
flipped: false,
|
|
103
|
+
measure: false,
|
|
104
|
+
axis: 'horizontal',
|
|
105
|
+
flipOnHover: false,
|
|
106
|
+
rounded: false,
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../src/components/kemet-flipcard/docs/stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,2BAA2B,CAAC;AAEnC,OAAO,iCAAiC,CAAC;AACzC,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,KAAK,EACb,MAAM,GAAG,MAAM,EACf,UAAU,GAAG,yBAAyB,EACtC,oBAAoB,GAAG,aAAa,EACpC,SAAS,GAAG,yBAAyB,EACrC,mBAAmB,GAAG,aAAa,EACnC,MAAM,GAAG,yCAAyC,EAClD,YAAY,GAAG,GAAG,EAClB,KAAK,GAAG,MAAM,EACd,OAAO,GAAG,KAAK,EACf,OAAO,GAAG,KAAK,EACf,IAAI,GAAG,YAAY,EACnB,WAAW,GAAG,KAAK,EACnB,OAAO,GAAG,KAAK,GAChB,EAAE,EAAE,CAAC,IAAI,CAAA;;;gCAGsB,KAAK;iCACJ,MAAM;sCACD,UAAU;iDACC,oBAAoB;qCAChC,SAAS;gDACE,mBAAmB;iCAClC,MAAM;wCACC,YAAY;gCACpB,KAAK;;;;gBAIrB,OAAO;gBACP,OAAO;YACX,IAAI;sBACM,WAAW;eAClB,OAAO;;;;;;;;;;;;;;;CAerB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CA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ACjD,YAAY,EAAE,GAAG;QACjB,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,KAAK;KACf;CACF,CAAC","sourcesContent":["import { html } from 'lit';\nimport type { Meta, StoryObj } from '@storybook/web-components';\n\nimport '../kemet-flipcard';\nimport '../kemet-flipcard-trigger';\n\nimport '../../kemet-button/kemet-button';\nimport '../../kemet-tabs/kemet-tabs';\nimport '../../kemet-tabs/kemet-tab';\nimport '../../kemet-tabs/kemet-tab-panel';\n\nconst meta: Meta = {\n title: 'Components / Flipcard',\n component: 'kemet-flipcard',\n};\nexport default meta;\n\ntype Story = StoryObj;\n\nconst Template = ({\n width = '50%',\n height = 'auto',\n frontColor = 'var(--kemet-color-text)',\n frontBackgroundColor = 'transparent',\n backColor = 'var(--kemet-color-text)',\n backBackgroundColor = 'transparent',\n border = '2px solid var(--kemet-color-background)',\n borderRadius = '0',\n ratio = '16/9',\n flipped = false,\n measure = false,\n axis = 'horizontal',\n flipOnHover = false,\n rounded = false,\n}) => html`\n <style>\n kemet-flipcard {\n --kemet-flipcard-width: ${width};\n --kemet-flipcard-height: ${height};\n --kemet-flipcard-front-color: ${frontColor};\n --kemet-flipcard-front-background-color: ${frontBackgroundColor};\n --kemet-flipcard-back-color: ${backColor};\n --kemet-flipcard-back-background-color: ${backBackgroundColor};\n --kemet-flipcard-border: ${border};\n --kemet-flipcard-border-radius: ${borderRadius};\n --kemet-flipcard-ratio: ${ratio};\n }\n </style>\n <kemet-flipcard\n ?flipped=\"${flipped}\"\n ?measure=\"${measure}\"\n axis=\"${axis}\"\n ?flip-on-hover=\"${flipOnHover}\"\n ?rounded=${rounded}\n >\n <div slot=\"front\" kemet-elevation=\"layer5\" kemet-padding=\"tiny:normal\">\n <p>This is the front of the card.</p>\n <kemet-flipcard-trigger>\n <kemet-button>Flip Me</kemet-button>\n </kemet-flipcard-trigger>\n </div>\n <div slot=\"back\" kemet-elevation=\"layer5\" kemet-padding=\"tiny:normal\">\n <p>This is the back of the card.</p>\n <kemet-flipcard-trigger>\n <kemet-button>Flip Me</kemet-button>\n </kemet-flipcard-trigger>\n </div>\n </kemet-flipcard>\n`;\n\nexport const Standard: Story = {\n render: (args) => Template(args),\n argTypes: {\n width: {\n control: { type: 'text' },\n },\n height: {\n control: { type: 'text' },\n },\n frontColor: {\n control: { type: 'color' },\n },\n frontBackgroundColor: {\n control: { type: 'color' },\n },\n backColor: {\n control: { type: 'color' },\n },\n backBackgroundColor: {\n control: { type: 'color' },\n },\n border: {\n control: { type: 'text' },\n },\n borderRadius: {\n control: { type: 'text' },\n },\n flipped: {\n control: { type: 'boolean' },\n },\n measure: {\n control: { type: 'boolean' },\n },\n axis: {\n control: { type: 'select' },\n options: ['horizontal', 'vertical'],\n },\n flipOnHover: {\n control: { type: 'boolean' },\n },\n rounded: {\n control: { type: 'boolean' },\n },\n },\n args: {\n width: '50%',\n height: 'auto',\n frontColor: 'var(--kemet-color-text)',\n frontBackgroundColor: 'transparent',\n backColor: 'var(--kemet-color-text)',\n backBackgroundColor: 'transparent',\n border: '2px solid var(--kemet-color-background)',\n borderRadius: '0',\n ratio: '16/9',\n flipped: false,\n measure: false,\n axis: 'horizontal',\n flipOnHover: false,\n rounded: false,\n },\n};\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @since 1.0.0
|
|
4
|
+
* @status stable
|
|
5
|
+
*
|
|
6
|
+
* @tagname kemet-flipcard-trigger
|
|
7
|
+
* @summary Triggers a flipcard component to flip.
|
|
8
|
+
*
|
|
9
|
+
* @event kemet-flipcard-flipped - Fires when a flipcard is flipped
|
|
10
|
+
*/
|
|
11
|
+
export default class KemetFlipcardTrigger extends LitElement {
|
|
12
|
+
static styles: import("lit").CSSResult[];
|
|
13
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
14
|
+
trigger(): void;
|
|
15
|
+
handleKeyup(event: any): void;
|
|
16
|
+
}
|
|
17
|
+
declare global {
|
|
18
|
+
interface HTMLElementTagNameMap {
|
|
19
|
+
'kemet-flipcard-trigger': KemetFlipcardTrigger;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
1
2
|
import { LitElement, html, css } from 'lit';
|
|
2
|
-
import {
|
|
3
|
-
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { emitEvent } from '../../utilities/misc/events';
|
|
5
|
+
import { keyCodes } from '../../utilities/misc/constants';
|
|
4
6
|
/**
|
|
5
7
|
* @since 1.0.0
|
|
6
8
|
* @status stable
|
|
@@ -10,43 +12,31 @@ import { emitEvent } from '../../utilities/misc/events.js';
|
|
|
10
12
|
*
|
|
11
13
|
* @event kemet-flipcard-flipped - Fires when a flipcard is flipped
|
|
12
14
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return [
|
|
17
|
-
css`
|
|
18
|
-
:host {
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
}
|
|
21
|
-
`,
|
|
22
|
-
];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
firstUpdated() {
|
|
26
|
-
this.keyCodes = {
|
|
27
|
-
ENTER: 13,
|
|
28
|
-
SPACE: 32,
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
render() {
|
|
33
|
-
return html`
|
|
15
|
+
let KemetFlipcardTrigger = class KemetFlipcardTrigger extends LitElement {
|
|
16
|
+
render() {
|
|
17
|
+
return html `
|
|
34
18
|
<slot tabindex="0" @click=${() => this.trigger()} @keypress=${event => this.handleKeyup(event)}></slot>
|
|
35
19
|
`;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
trigger() {
|
|
39
|
-
emitEvent(this, 'kemet-flipcard-flipped', this);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
handleKeyup(event) {
|
|
43
|
-
event.preventDefault();
|
|
44
|
-
|
|
45
|
-
if (event.keyCode === this.keyCodes.ENTER) {
|
|
46
|
-
this.trigger();
|
|
47
20
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
21
|
+
trigger() {
|
|
22
|
+
emitEvent(this, 'kemet-flipcard-flipped', this);
|
|
23
|
+
}
|
|
24
|
+
handleKeyup(event) {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
if (event.keyCode === keyCodes.ENTER) {
|
|
27
|
+
this.trigger();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
KemetFlipcardTrigger.styles = [
|
|
32
|
+
css `
|
|
33
|
+
:host {
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
`,
|
|
37
|
+
];
|
|
38
|
+
KemetFlipcardTrigger = __decorate([
|
|
39
|
+
customElement('kemet-flipcard-trigger')
|
|
40
|
+
], KemetFlipcardTrigger);
|
|
41
|
+
export default KemetFlipcardTrigger;
|
|
42
|
+
//# sourceMappingURL=kemet-flipcard-trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kemet-flipcard-trigger.js","sourceRoot":"","sources":["../../../src/components/kemet-flipcard/kemet-flipcard-trigger.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D;;;;;;;;GAQG;AAGH,IAAqB,oBAAoB,GAAzC,MAAqB,oBAAqB,SAAQ,UAAU;IAS1D,MAAM;QACJ,OAAO,IAAI,CAAA;kCACmB,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;KAC/F,CAAC;IACJ,CAAC;IAED,OAAO;QACL,SAAS,CAAC,IAAI,EAAE,wBAAwB,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,WAAW,CAAC,KAAK;QACf,KAAK,CAAC,cAAc,EAAE,CAAC;QAEvB,IAAI,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,KAAK,EAAE;YACpC,IAAI,CAAC,OAAO,EAAE,CAAC;SAChB;IACH,CAAC;CACF,CAAA;AAzBQ,2BAAM,GAAG;IACd,GAAG,CAAA;;;;KAIF;CACF,CAAC;AAPiB,oBAAoB;IADxC,aAAa,CAAC,wBAAwB,CAAC;GACnB,oBAAoB,CA0BxC;eA1BoB,oBAAoB","sourcesContent":["import { LitElement, html, css } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { emitEvent } from '../../utilities/misc/events';\nimport { keyCodes } from '../../utilities/misc/constants';\n\n/**\n * @since 1.0.0\n * @status stable\n *\n * @tagname kemet-flipcard-trigger\n * @summary Triggers a flipcard component to flip.\n *\n * @event kemet-flipcard-flipped - Fires when a flipcard is flipped\n */\n\n@customElement('kemet-flipcard-trigger')\nexport default class KemetFlipcardTrigger extends LitElement {\n static styles = [\n css`\n :host {\n cursor: pointer;\n }\n `,\n ];\n\n render() {\n return html`\n <slot tabindex=\"0\" @click=${() => this.trigger()} @keypress=${event => this.handleKeyup(event)}></slot>\n `;\n }\n\n trigger() {\n emitEvent(this, 'kemet-flipcard-flipped', this);\n }\n\n handleKeyup(event) {\n event.preventDefault();\n\n if (event.keyCode === keyCodes.ENTER) {\n this.trigger();\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-flipcard-trigger': KemetFlipcardTrigger\n }\n}\n"]}
|