revotech-ui-kit 0.0.6-beta → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/revotech-ui-kit.cjs +2293 -0
- package/dist/revotech-ui-kit.js +5608 -0
- package/dist/src/assets/icons/arrows.icon.d.ts +1 -0
- package/{src/assets/icons/arrows.icon.ts → dist/src/assets/icons/arrows.icon.js} +2 -2
- package/dist/src/assets/icons/arrows.icon.js.map +1 -0
- package/dist/src/assets/icons/index.js +4 -0
- package/dist/src/assets/icons/index.js.map +1 -0
- package/dist/src/assets/icons/search.icon.d.ts +1 -0
- package/{src/assets/icons/search.icon.ts → dist/src/assets/icons/search.icon.js} +2 -2
- package/dist/src/assets/icons/search.icon.js.map +1 -0
- package/dist/src/assets/icons/tick.icon.d.ts +1 -0
- package/{src/assets/icons/tick.icon.ts → dist/src/assets/icons/tick.icon.js} +2 -2
- package/dist/src/assets/icons/tick.icon.js.map +1 -0
- package/dist/src/components/atoms/alert/alert-description.d.ts +5 -0
- package/dist/src/components/atoms/alert/alert-description.js +18 -0
- package/dist/src/components/atoms/alert/alert-description.js.map +1 -0
- package/dist/src/components/atoms/alert/alert-title.d.ts +5 -0
- package/dist/src/components/atoms/alert/alert-title.js +20 -0
- package/dist/src/components/atoms/alert/alert-title.js.map +1 -0
- package/dist/src/components/atoms/alert/alert.atom.d.ts +15 -0
- package/{src/components/atoms/alert/alert.atom.ts → dist/src/components/atoms/alert/alert.atom.js} +33 -33
- package/dist/src/components/atoms/alert/alert.atom.js.map +1 -0
- package/dist/src/components/atoms/alert/alert.stories.d.ts +6 -0
- package/dist/src/components/atoms/alert/alert.stories.js +62 -0
- package/dist/src/components/atoms/alert/alert.stories.js.map +1 -0
- package/dist/src/components/atoms/alert/alert.styles.d.ts +4 -0
- package/dist/src/components/atoms/alert/alert.styles.js +21 -0
- package/dist/src/components/atoms/alert/alert.styles.js.map +1 -0
- package/dist/src/components/atoms/alert/alert.types.js +2 -0
- package/dist/src/components/atoms/alert/alert.types.js.map +1 -0
- package/dist/src/components/atoms/badge/badge.atom.d.ts +16 -0
- package/dist/src/components/atoms/badge/badge.atom.js +43 -0
- package/dist/src/components/atoms/badge/badge.atom.js.map +1 -0
- package/dist/src/components/atoms/badge/badge.stories.d.ts +6 -0
- package/dist/src/components/atoms/badge/badge.stories.js +110 -0
- package/dist/src/components/atoms/badge/badge.stories.js.map +1 -0
- package/dist/src/components/atoms/badge/badge.style.d.ts +3 -0
- package/dist/src/components/atoms/badge/badge.style.js +17 -0
- package/dist/src/components/atoms/badge/badge.style.js.map +1 -0
- package/dist/src/components/atoms/badge/badge.type.d.ts +1 -0
- package/dist/src/components/atoms/badge/badge.type.js +2 -0
- package/dist/src/components/atoms/badge/badge.type.js.map +1 -0
- package/dist/src/components/atoms/button/button.atom.d.ts +22 -0
- package/dist/src/components/atoms/button/button.atom.js +67 -0
- package/dist/src/components/atoms/button/button.atom.js.map +1 -0
- package/dist/src/components/atoms/button/button.stories.d.ts +6 -0
- package/dist/src/components/atoms/button/button.stories.js +204 -0
- package/dist/src/components/atoms/button/button.stories.js.map +1 -0
- package/dist/src/components/atoms/button/button.style.d.ts +4 -0
- package/dist/src/components/atoms/button/button.style.js +24 -0
- package/dist/src/components/atoms/button/button.style.js.map +1 -0
- package/{src/components/atoms/button/button.type.ts → dist/src/components/atoms/button/button.type.d.ts} +1 -8
- package/dist/src/components/atoms/button/button.type.js +2 -0
- package/dist/src/components/atoms/button/button.type.js.map +1 -0
- package/dist/src/components/atoms/card/card-content.d.ts +5 -0
- package/dist/src/components/atoms/card/card-content.js +17 -0
- package/dist/src/components/atoms/card/card-content.js.map +1 -0
- package/dist/src/components/atoms/card/card-description.d.ts +5 -0
- package/dist/src/components/atoms/card/card-description.js +17 -0
- package/dist/src/components/atoms/card/card-description.js.map +1 -0
- package/dist/src/components/atoms/card/card-footer.d.ts +5 -0
- package/dist/src/components/atoms/card/card-footer.js +17 -0
- package/dist/src/components/atoms/card/card-footer.js.map +1 -0
- package/dist/src/components/atoms/card/card-header.d.ts +5 -0
- package/dist/src/components/atoms/card/card-header.js +17 -0
- package/dist/src/components/atoms/card/card-header.js.map +1 -0
- package/dist/src/components/atoms/card/card-title.d.ts +5 -0
- package/dist/src/components/atoms/card/card-title.js +17 -0
- package/dist/src/components/atoms/card/card-title.js.map +1 -0
- package/dist/src/components/atoms/card/card.atom.d.ts +11 -0
- package/{src/components/atoms/card/card.atom.ts → dist/src/components/atoms/card/card.atom.js} +11 -17
- package/dist/src/components/atoms/card/card.atom.js.map +1 -0
- package/dist/src/components/atoms/card/card.stories.d.ts +6 -0
- package/{src/components/atoms/card/card.stories.ts → dist/src/components/atoms/card/card.stories.js} +42 -55
- package/dist/src/components/atoms/card/card.stories.js.map +1 -0
- package/dist/src/components/atoms/checkbox/checkbox.atom.d.ts +13 -0
- package/dist/src/components/atoms/checkbox/checkbox.atom.js +87 -0
- package/dist/src/components/atoms/checkbox/checkbox.atom.js.map +1 -0
- package/dist/src/components/atoms/checkbox/checkbox.stories.d.ts +8 -0
- package/dist/src/components/atoms/checkbox/checkbox.stories.js +244 -0
- package/dist/src/components/atoms/checkbox/checkbox.stories.js.map +1 -0
- package/dist/src/components/atoms/checkbox/checkbox.style.d.ts +2 -0
- package/dist/src/components/atoms/checkbox/checkbox.style.js +3 -0
- package/dist/src/components/atoms/checkbox/checkbox.style.js.map +1 -0
- package/dist/src/components/atoms/checkbox/checkbox.type.d.ts +21 -0
- package/dist/src/components/atoms/checkbox/checkbox.type.js +2 -0
- package/dist/src/components/atoms/checkbox/checkbox.type.js.map +1 -0
- package/dist/src/components/atoms/combo-box/combo-box-input.d.ts +8 -0
- package/dist/src/components/atoms/combo-box/combo-box-input.js +47 -0
- package/dist/src/components/atoms/combo-box/combo-box-input.js.map +1 -0
- package/dist/src/components/atoms/combo-box/combo-box-item.d.ts +12 -0
- package/{src/components/atoms/combo-box/combo-box-item.ts → dist/src/components/atoms/combo-box/combo-box-item.js} +44 -18
- package/dist/src/components/atoms/combo-box/combo-box-item.js.map +1 -0
- package/dist/src/components/atoms/combo-box/combo-box-list.d.ts +9 -0
- package/{src/components/atoms/combo-box/combo-box-list.ts → dist/src/components/atoms/combo-box/combo-box-list.js} +37 -27
- package/dist/src/components/atoms/combo-box/combo-box-list.js.map +1 -0
- package/dist/src/components/atoms/combo-box/combo-box.atom.d.ts +23 -0
- package/dist/src/components/atoms/combo-box/combo-box.atom.js +199 -0
- package/dist/src/components/atoms/combo-box/combo-box.atom.js.map +1 -0
- package/dist/src/components/atoms/combo-box/combo-box.stories.d.ts +9 -0
- package/dist/src/components/atoms/combo-box/combo-box.stories.js +86 -0
- package/dist/src/components/atoms/combo-box/combo-box.stories.js.map +1 -0
- package/dist/src/components/atoms/command-empty/command-empty.atom.d.ts +9 -0
- package/dist/src/components/atoms/command-empty/command-empty.atom.js +53 -0
- package/dist/src/components/atoms/command-empty/command-empty.atom.js.map +1 -0
- package/dist/src/components/atoms/command-group/command-group.atom.d.ts +10 -0
- package/dist/src/components/atoms/command-group/command-group.atom.js +70 -0
- package/dist/src/components/atoms/command-group/command-group.atom.js.map +1 -0
- package/dist/src/components/atoms/command-item/command-item.atom.d.ts +12 -0
- package/dist/src/components/atoms/command-item/command-item.atom.js +78 -0
- package/dist/src/components/atoms/command-item/command-item.atom.js.map +1 -0
- package/dist/src/components/atoms/command-list/command-list.atom.d.ts +6 -0
- package/dist/src/components/atoms/command-list/command-list.atom.js +35 -0
- package/dist/src/components/atoms/command-list/command-list.atom.js.map +1 -0
- package/dist/src/components/atoms/command-separator/command-separator.atom.d.ts +9 -0
- package/dist/src/components/atoms/command-separator/command-separator.atom.js +51 -0
- package/dist/src/components/atoms/command-separator/command-separator.atom.js.map +1 -0
- package/dist/src/components/atoms/dialog/dialog-close.d.ts +7 -0
- package/dist/src/components/atoms/dialog/dialog-close.js +46 -0
- package/dist/src/components/atoms/dialog/dialog-close.js.map +1 -0
- package/dist/src/components/atoms/dialog/dialog-content.d.ts +8 -0
- package/dist/src/components/atoms/dialog/dialog-content.js +72 -0
- package/dist/src/components/atoms/dialog/dialog-content.js.map +1 -0
- package/dist/src/components/atoms/dialog/dialog-footer.d.ts +5 -0
- package/dist/src/components/atoms/dialog/dialog-footer.js +22 -0
- package/dist/src/components/atoms/dialog/dialog-footer.js.map +1 -0
- package/dist/src/components/atoms/dialog/dialog-header.d.ts +7 -0
- package/dist/src/components/atoms/dialog/dialog-header.js +40 -0
- package/dist/src/components/atoms/dialog/dialog-header.js.map +1 -0
- package/dist/src/components/atoms/dialog/dialog-overly.d.ts +5 -0
- package/dist/src/components/atoms/dialog/dialog-overly.js +20 -0
- package/dist/src/components/atoms/dialog/dialog-overly.js.map +1 -0
- package/dist/src/components/atoms/dialog/dialog-trigger.d.ts +8 -0
- package/dist/src/components/atoms/dialog/dialog-trigger.js +53 -0
- package/dist/src/components/atoms/dialog/dialog-trigger.js.map +1 -0
- package/dist/src/components/atoms/dialog/dialog.atom.d.ts +8 -0
- package/dist/src/components/atoms/dialog/dialog.atom.js +78 -0
- package/dist/src/components/atoms/dialog/dialog.atom.js.map +1 -0
- package/dist/src/components/atoms/dialog/dialog.stories.d.ts +16 -0
- package/{src/components/atoms/dialog/dialog.stories.ts → dist/src/components/atoms/dialog/dialog.stories.js} +7 -12
- package/dist/src/components/atoms/dialog/dialog.stories.js.map +1 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-checkbox-Item.d.ts +15 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-checkbox-Item.js +115 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-checkbox-Item.js.map +1 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-content.d.ts +13 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-content.js +80 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-content.js.map +1 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-group.d.ts +10 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-group.js +70 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-group.js.map +1 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-item.d.ts +12 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-item.js +78 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-item.js.map +1 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-radio-item.d.ts +15 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-radio-item.js +116 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-radio-item.js.map +1 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-seperator.d.ts +9 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-seperator.js +51 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-seperator.js.map +1 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-shortcut.d.ts +5 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-shortcut.js +20 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu-shortcut.js.map +1 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu.atom.d.ts +14 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu.atom.js +77 -0
- package/dist/src/components/atoms/dropdownMenu/dropdown-menu.atom.js.map +1 -0
- package/dist/src/components/atoms/dropdownMenu/dropdownMenu.stories.d.ts +15 -0
- package/{src/components/atoms/dropdownMenu/dropdownMenu.stories.ts → dist/src/components/atoms/dropdownMenu/dropdownMenu.stories.js} +7 -16
- package/dist/src/components/atoms/dropdownMenu/dropdownMenu.stories.js.map +1 -0
- package/dist/src/components/atoms/dropdownMenu/dropdownMenu.style.d.ts +2 -0
- package/dist/src/components/atoms/dropdownMenu/dropdownMenu.style.js +4 -0
- package/dist/src/components/atoms/dropdownMenu/dropdownMenu.style.js.map +1 -0
- package/dist/src/components/atoms/index.js +14 -0
- package/dist/src/components/atoms/index.js.map +1 -0
- package/dist/src/components/atoms/input/input.atom.d.ts +21 -0
- package/dist/src/components/atoms/input/input.atom.js +93 -0
- package/dist/src/components/atoms/input/input.atom.js.map +1 -0
- package/dist/src/components/atoms/input/input.stories.d.ts +8 -0
- package/dist/src/components/atoms/input/input.stories.js +382 -0
- package/dist/src/components/atoms/input/input.stories.js.map +1 -0
- package/dist/src/components/atoms/input/input.styles.d.ts +1 -0
- package/dist/src/components/atoms/input/input.styles.js +2 -0
- package/dist/src/components/atoms/input/input.styles.js.map +1 -0
- package/dist/src/components/atoms/input/input.type.d.ts +21 -0
- package/dist/src/components/atoms/input/input.type.js +2 -0
- package/dist/src/components/atoms/input/input.type.js.map +1 -0
- package/dist/src/components/atoms/label/label.atom.d.ts +11 -0
- package/dist/src/components/atoms/label/label.atom.js +67 -0
- package/dist/src/components/atoms/label/label.atom.js.map +1 -0
- package/dist/src/components/atoms/label/label.stories.d.ts +6 -0
- package/dist/src/components/atoms/label/label.stories.js +85 -0
- package/dist/src/components/atoms/label/label.stories.js.map +1 -0
- package/dist/src/components/atoms/label/label.style.d.ts +1 -0
- package/dist/src/components/atoms/label/label.style.js +3 -0
- package/dist/src/components/atoms/label/label.style.js.map +1 -0
- package/dist/src/components/atoms/popover/popover-content.d.ts +11 -0
- package/dist/src/components/atoms/popover/popover-content.js +62 -0
- package/dist/src/components/atoms/popover/popover-content.js.map +1 -0
- package/dist/src/components/atoms/popover/popover-trigger.d.ts +9 -0
- package/dist/src/components/atoms/popover/popover-trigger.js +50 -0
- package/dist/src/components/atoms/popover/popover-trigger.js.map +1 -0
- package/dist/src/components/atoms/popover/popover.atom.d.ts +8 -0
- package/dist/src/components/atoms/popover/popover.atom.js +40 -0
- package/dist/src/components/atoms/popover/popover.atom.js.map +1 -0
- package/dist/src/components/atoms/popover/popover.stories.d.ts +10 -0
- package/dist/src/components/atoms/popover/popover.stories.js +69 -0
- package/dist/src/components/atoms/popover/popover.stories.js.map +1 -0
- package/dist/src/components/atoms/popover/popover.style.d.ts +5 -0
- package/dist/src/components/atoms/popover/popover.style.js +21 -0
- package/dist/src/components/atoms/popover/popover.style.js.map +1 -0
- package/dist/src/components/atoms/popover/popover.types.d.ts +2 -0
- package/{src/components/atoms/popover/popover.types.ts → dist/src/components/atoms/popover/popover.types.js} +1 -0
- package/dist/src/components/atoms/popover/popover.types.js.map +1 -0
- package/dist/src/components/atoms/toggle/defs.d.ts +27 -0
- package/dist/src/components/atoms/toggle/defs.js +30 -0
- package/dist/src/components/atoms/toggle/defs.js.map +1 -0
- package/dist/src/components/atoms/toggle/toggle.atom.d.ts +19 -0
- package/dist/src/components/atoms/toggle/toggle.atom.js +72 -0
- package/dist/src/components/atoms/toggle/toggle.atom.js.map +1 -0
- package/dist/src/components/atoms/toggle/toggle.stories.d.ts +6 -0
- package/dist/src/components/atoms/toggle/toggle.stories.js +189 -0
- package/dist/src/components/atoms/toggle/toggle.stories.js.map +1 -0
- package/dist/src/components/atoms/toggle/toggle.style.d.ts +4 -0
- package/dist/src/components/atoms/toggle/toggle.style.js +19 -0
- package/dist/src/components/atoms/toggle/toggle.style.js.map +1 -0
- package/dist/src/components/command/command.d.ts +56 -0
- package/dist/src/components/command/command.js +402 -0
- package/dist/src/components/command/command.js.map +1 -0
- package/dist/src/components/command/command.stories.d.ts +5 -0
- package/{src/components/command/command.stories.ts → dist/src/components/command/command.stories.js} +6 -7
- package/dist/src/components/command/command.stories.js.map +1 -0
- package/dist/src/components/index.js +3 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/components/molecules/command/command.molecules.d.ts +6 -0
- package/dist/src/components/molecules/command/command.molecules.js +27 -0
- package/dist/src/components/molecules/command/command.molecules.js.map +1 -0
- package/dist/src/components/molecules/command-input/command-input.atom.d.ts +10 -0
- package/dist/src/components/molecules/command-input/command-input.atom.js +125 -0
- package/dist/src/components/molecules/command-input/command-input.atom.js.map +1 -0
- package/dist/src/components/molecules/dropdownMenu/dropdownMenu.molecules.js +2 -0
- package/dist/src/components/molecules/dropdownMenu/dropdownMenu.molecules.js.map +1 -0
- package/dist/src/components/molecules/index.js +2 -0
- package/dist/src/components/molecules/index.js.map +1 -0
- package/dist/src/helpers/base-element.d.ts +10 -0
- package/dist/src/helpers/base-element.js +62 -0
- package/dist/src/helpers/base-element.js.map +1 -0
- package/dist/src/helpers/index.js +4 -0
- package/dist/src/helpers/index.js.map +1 -0
- package/dist/src/helpers/mouse-conroller.helper.d.ts +14 -0
- package/dist/src/helpers/mouse-conroller.helper.js +33 -0
- package/dist/src/helpers/mouse-conroller.helper.js.map +1 -0
- package/dist/src/helpers/style.helpers.d.ts +2 -0
- package/dist/src/helpers/style.helpers.js +6 -0
- package/dist/src/helpers/style.helpers.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interfaces/actionable.interface.d.ts +5 -0
- package/dist/src/interfaces/actionable.interface.js +2 -0
- package/dist/src/interfaces/actionable.interface.js.map +1 -0
- package/dist/src/interfaces/atomic.interface.d.ts +6 -0
- package/dist/src/interfaces/atomic.interface.js +2 -0
- package/dist/src/interfaces/atomic.interface.js.map +1 -0
- package/{src/interfaces/changeable.interface.ts → dist/src/interfaces/changeable.interface.d.ts} +7 -14
- package/dist/src/interfaces/changeable.interface.js +2 -0
- package/dist/src/interfaces/changeable.interface.js.map +1 -0
- package/{src/interfaces/child-support-atomic.interface.ts → dist/src/interfaces/child-support-atomic.interface.d.ts} +4 -5
- package/dist/src/interfaces/child-support-atomic.interface.js +2 -0
- package/dist/src/interfaces/child-support-atomic.interface.js.map +1 -0
- package/dist/src/interfaces/index.js +7 -0
- package/dist/src/interfaces/index.js.map +1 -0
- package/dist/src/interfaces/intractable.interface.d.ts +6 -0
- package/dist/src/interfaces/intractable.interface.js +2 -0
- package/dist/src/interfaces/intractable.interface.js.map +1 -0
- package/{src/interfaces/variant.interface.ts → dist/src/interfaces/variant.interface.d.ts} +1 -1
- package/dist/src/interfaces/variant.interface.js +2 -0
- package/dist/src/interfaces/variant.interface.js.map +1 -0
- package/dist/src/lib/index.js +2 -0
- package/dist/src/lib/index.js.map +1 -0
- package/dist/src/lib/next/next.lib.js +2 -0
- package/dist/src/lib/next/next.lib.js.map +1 -0
- package/dist/src/lib/react/react.lib.d.ts +5 -0
- package/{src/lib/react/react.lib.ts → dist/src/lib/react/react.lib.js} +7 -9
- package/dist/src/lib/react/react.lib.js.map +1 -0
- package/dist/src/lib/tw-styles.d.ts +1 -0
- package/{src/lib/tw-styles.ts → dist/src/lib/tw-styles.js} +4 -5
- package/dist/src/lib/tw-styles.js.map +1 -0
- package/dist/src/styles/index.js +2 -0
- package/dist/src/styles/index.js.map +1 -0
- package/dist/src/styles/tw.styles.d.ts +1 -0
- package/{src/styles/tw.styles.ts → dist/src/styles/tw.styles.js} +4 -5
- package/dist/src/styles/tw.styles.js.map +1 -0
- package/dist/src/wc-ui-app.d.ts +6 -0
- package/{src/wc-ui-app.ts → dist/src/wc-ui-app.js} +42 -35
- package/dist/src/wc-ui-app.js.map +1 -0
- package/dist/test/wc-ui-app.test.js +18 -0
- package/dist/test/wc-ui-app.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/vite.config.d.ts +2 -0
- package/dist/vite.config.js +29 -0
- package/dist/vite.config.js.map +1 -0
- package/package.json +14 -21
- package/.editorconfig +0 -29
- package/.eslintrc +0 -10
- package/.github/workflows/deploy-storybook.yml +0 -107
- package/.storybook/main.ts +0 -17
- package/.storybook/preview-head.html +0 -1
- package/.storybook/preview.ts +0 -17
- package/assets/fonts/Geist/Geist-Black.otf +0 -0
- package/assets/fonts/Geist/Geist-Black.woff2 +0 -0
- package/assets/fonts/Geist/Geist-Bold.otf +0 -0
- package/assets/fonts/Geist/Geist-Bold.woff2 +0 -0
- package/assets/fonts/Geist/Geist-Light.otf +0 -0
- package/assets/fonts/Geist/Geist-Light.woff2 +0 -0
- package/assets/fonts/Geist/Geist-Medium.otf +0 -0
- package/assets/fonts/Geist/Geist-Medium.woff2 +0 -0
- package/assets/fonts/Geist/Geist-Regular.otf +0 -0
- package/assets/fonts/Geist/Geist-Regular.woff2 +0 -0
- package/assets/fonts/Geist/Geist-SemiBold.otf +0 -0
- package/assets/fonts/Geist/Geist-SemiBold.woff2 +0 -0
- package/assets/fonts/Geist/Geist-Thin.otf +0 -0
- package/assets/fonts/Geist/Geist-Thin.woff2 +0 -0
- package/assets/fonts/Geist/Geist-UltraBlack.otf +0 -0
- package/assets/fonts/Geist/Geist-UltraBlack.woff2 +0 -0
- package/assets/fonts/Geist/Geist-UltraLight.otf +0 -0
- package/assets/fonts/Geist/Geist-UltraLight.woff2 +0 -0
- package/assets/fonts/Geist/GeistVariableVF.ttf +0 -0
- package/assets/fonts/Geist/GeistVariableVF.woff2 +0 -0
- package/assets/fonts/Geist/LICENSE.TXT +0 -92
- package/assets/open-wc-logo.svg +0 -29
- package/assume_role.sh +0 -18
- package/dist/f28fd4b1.js +0 -1
- package/dist/index.ts +0 -1
- package/dist/sw.js +0 -2
- package/dist/sw.js.map +0 -1
- package/dist/workbox-a523fd56.js +0 -2
- package/dist/workbox-a523fd56.js.map +0 -1
- package/index.html +0 -314
- package/rollup.config.js +0 -83
- package/src/components/atoms/alert/alert-description.ts +0 -15
- package/src/components/atoms/alert/alert-title.ts +0 -17
- package/src/components/atoms/alert/alert.stories.ts +0 -71
- package/src/components/atoms/alert/alert.styles.ts +0 -21
- package/src/components/atoms/badge/badge.atom.ts +0 -40
- package/src/components/atoms/badge/badge.stories.ts +0 -118
- package/src/components/atoms/badge/badge.style.ts +0 -24
- package/src/components/atoms/badge/badge.type.ts +0 -7
- package/src/components/atoms/button/button.atom.ts +0 -59
- package/src/components/atoms/button/button.stories.ts +0 -224
- package/src/components/atoms/button/button.style.ts +0 -31
- package/src/components/atoms/card/card-content.ts +0 -15
- package/src/components/atoms/card/card-description.ts +0 -15
- package/src/components/atoms/card/card-footer.ts +0 -15
- package/src/components/atoms/card/card-header.ts +0 -15
- package/src/components/atoms/card/card-title.ts +0 -15
- package/src/components/atoms/checkbox/checkbox.atom.ts +0 -76
- package/src/components/atoms/checkbox/checkbox.stories.ts +0 -309
- package/src/components/atoms/checkbox/checkbox.style.ts +0 -5
- package/src/components/atoms/checkbox/checkbox.type.ts +0 -24
- package/src/components/atoms/combo-box/combo-box-input.ts +0 -33
- package/src/components/atoms/combo-box/combo-box.atom.ts +0 -187
- package/src/components/atoms/combo-box/combo-box.stories.ts +0 -95
- package/src/components/atoms/command-empty/command-empty.atom.ts +0 -44
- package/src/components/atoms/command-group/command-group.atom.ts +0 -60
- package/src/components/atoms/command-item/command-item.atom.ts +0 -74
- package/src/components/atoms/command-list/command-list.atom.ts +0 -37
- package/src/components/atoms/command-separator/command-separator.atom.ts +0 -42
- package/src/components/atoms/dialog/dialog-close.ts +0 -50
- package/src/components/atoms/dialog/dialog-content.ts +0 -71
- package/src/components/atoms/dialog/dialog-footer.ts +0 -22
- package/src/components/atoms/dialog/dialog-header.ts +0 -36
- package/src/components/atoms/dialog/dialog-overly.ts +0 -20
- package/src/components/atoms/dialog/dialog-trigger.ts +0 -54
- package/src/components/atoms/dialog/dialog.atom.ts +0 -78
- package/src/components/atoms/dropdownMenu/dropdown-menu-checkbox-Item.ts +0 -106
- package/src/components/atoms/dropdownMenu/dropdown-menu-content.ts +0 -79
- package/src/components/atoms/dropdownMenu/dropdown-menu-group.ts +0 -60
- package/src/components/atoms/dropdownMenu/dropdown-menu-item.ts +0 -74
- package/src/components/atoms/dropdownMenu/dropdown-menu-radio-item.ts +0 -107
- package/src/components/atoms/dropdownMenu/dropdown-menu-seperator.ts +0 -44
- package/src/components/atoms/dropdownMenu/dropdown-menu-shortcut.ts +0 -17
- package/src/components/atoms/dropdownMenu/dropdown-menu.atom.ts +0 -84
- package/src/components/atoms/dropdownMenu/dropdownMenu.style.ts +0 -7
- package/src/components/atoms/input/input.atom.ts +0 -88
- package/src/components/atoms/input/input.stories.ts +0 -451
- package/src/components/atoms/input/input.styles.ts +0 -2
- package/src/components/atoms/input/input.type.ts +0 -58
- package/src/components/atoms/label/label.atom.ts +0 -64
- package/src/components/atoms/label/label.stories.ts +0 -102
- package/src/components/atoms/label/label.style.ts +0 -5
- package/src/components/atoms/popover/popover-content.ts +0 -58
- package/src/components/atoms/popover/popover-trigger.ts +0 -50
- package/src/components/atoms/popover/popover.atom.ts +0 -34
- package/src/components/atoms/popover/popover.stories.ts +0 -79
- package/src/components/atoms/popover/popover.style.ts +0 -25
- package/src/components/atoms/toggle/defs.ts +0 -29
- package/src/components/atoms/toggle/toggle.atom.ts +0 -58
- package/src/components/atoms/toggle/toggle.stories.ts +0 -204
- package/src/components/atoms/toggle/toggle.style.ts +0 -22
- package/src/components/command/command.ts +0 -391
- package/src/components/molecules/command/command.molecules.ts +0 -31
- package/src/components/molecules/command-input/command-input.atom.ts +0 -130
- package/src/globals.css +0 -2215
- package/src/helpers/base-element.ts +0 -79
- package/src/helpers/mouse-conroller.helper.ts +0 -42
- package/src/helpers/style.helpers.ts +0 -6
- package/src/index.d.ts +0 -1
- package/src/index.ts +0 -1
- package/src/interfaces/actionable.interface.ts +0 -6
- package/src/interfaces/atomic.interface.ts +0 -6
- package/src/interfaces/intractable.interface.ts +0 -6
- package/src/tailwind-lib.css +0 -115
- package/tailwind.config.js +0 -217
- package/test/wc-ui-app.test.ts +0 -22
- package/tsconfig.json +0 -30
- package/web-dev-server.config.mjs +0 -26
- package/web-test-runner.config.mjs +0 -41
- /package/{src/assets/icons/index.ts → dist/src/assets/icons/index.d.ts} +0 -0
- /package/{src/components/atoms/alert/alert.types.ts → dist/src/components/atoms/alert/alert.types.d.ts} +0 -0
- /package/{src/components/atoms/index.ts → dist/src/components/atoms/index.d.ts} +0 -0
- /package/{src/components/index.ts → dist/src/components/index.d.ts} +0 -0
- /package/{src/chai-custom.d.ts → dist/src/components/molecules/dropdownMenu/dropdownMenu.molecules.d.ts} +0 -0
- /package/{src/components/molecules/index.ts → dist/src/components/molecules/index.d.ts} +0 -0
- /package/{src/helpers/index.ts → dist/src/helpers/index.d.ts} +0 -0
- /package/{src/interfaces/index.ts → dist/src/interfaces/index.d.ts} +0 -0
- /package/{src/components/molecules/dropdownMenu/dropdownMenu.molecules.ts → dist/src/lib/index.d.ts} +0 -0
- /package/{src/lib/index.ts → dist/src/lib/next/next.lib.d.ts} +0 -0
- /package/{src/styles/index.ts → dist/src/styles/index.d.ts} +0 -0
- /package/{src/lib/next/next.lib.ts → dist/test/wc-ui-app.test.d.ts} +0 -0
@@ -0,0 +1,72 @@
|
|
1
|
+
var Toggle_1;
|
2
|
+
import { __decorate } from "tslib";
|
3
|
+
import { html } from 'lit-element';
|
4
|
+
import { customElement, property } from 'lit/decorators.js';
|
5
|
+
import { TOGGLE_SIZE, TOGGLE_VARIANT } from './defs';
|
6
|
+
import { TWStyles } from '../../../styles';
|
7
|
+
import { toggleStyle } from './toggle.style';
|
8
|
+
import { BaseElement, cn } from '../../../helpers';
|
9
|
+
import { spread } from '@open-wc/lit-helpers';
|
10
|
+
export { TOGGLE_SIZE, TOGGLE_VARIANT };
|
11
|
+
let Toggle = Toggle_1 = class Toggle extends BaseElement {
|
12
|
+
constructor() {
|
13
|
+
super(...arguments);
|
14
|
+
this.disabled = false;
|
15
|
+
this.checked = false;
|
16
|
+
this.required = false;
|
17
|
+
this.variant = TOGGLE_VARIANT.DEFAULT;
|
18
|
+
this.size = TOGGLE_SIZE.SMALL;
|
19
|
+
}
|
20
|
+
getAttributesToExclude() {
|
21
|
+
return ['disabled', 'checked', 'variant', 'size', 'required'];
|
22
|
+
}
|
23
|
+
toggle() {
|
24
|
+
if (!this.disabled) {
|
25
|
+
this.checked = !this.checked;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
render() {
|
29
|
+
const attributes = this.getFilteredAttributes();
|
30
|
+
return html `
|
31
|
+
<button
|
32
|
+
type="button"
|
33
|
+
class="${cn(Toggle_1.toggleVariants({
|
34
|
+
variant: this.variant,
|
35
|
+
size: this.size,
|
36
|
+
className: this.className,
|
37
|
+
}))}"
|
38
|
+
aria-pressed=${this.checked}
|
39
|
+
data-state="${this.checked ? 'on' : 'off'}"
|
40
|
+
aria-label="Toggle bold"
|
41
|
+
@click=${this.toggle}
|
42
|
+
?disabled=${this.disabled}
|
43
|
+
?required=${this.required}
|
44
|
+
${spread(attributes)}
|
45
|
+
>
|
46
|
+
<slot></slot>
|
47
|
+
</button>
|
48
|
+
`;
|
49
|
+
}
|
50
|
+
};
|
51
|
+
Toggle.styles = [TWStyles];
|
52
|
+
Toggle.toggleVariants = toggleStyle;
|
53
|
+
__decorate([
|
54
|
+
property({ attribute: true, type: Boolean, reflect: true })
|
55
|
+
], Toggle.prototype, "disabled", void 0);
|
56
|
+
__decorate([
|
57
|
+
property({ attribute: true, type: Boolean, reflect: true })
|
58
|
+
], Toggle.prototype, "checked", void 0);
|
59
|
+
__decorate([
|
60
|
+
property({ attribute: true, type: Boolean, reflect: true })
|
61
|
+
], Toggle.prototype, "required", void 0);
|
62
|
+
__decorate([
|
63
|
+
property({ attribute: true, type: String })
|
64
|
+
], Toggle.prototype, "variant", void 0);
|
65
|
+
__decorate([
|
66
|
+
property({ attribute: true, type: String })
|
67
|
+
], Toggle.prototype, "size", void 0);
|
68
|
+
Toggle = Toggle_1 = __decorate([
|
69
|
+
customElement('rtg-toggle')
|
70
|
+
], Toggle);
|
71
|
+
export { Toggle };
|
72
|
+
//# sourceMappingURL=toggle.atom.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toggle.atom.js","sourceRoot":"","sources":["../../../../../src/components/atoms/toggle/toggle.atom.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO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W,AAAd,CAAe;AATyB;IAA5D,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAkB;AACjB;IAA5D,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAAiB;AAChB;IAA5D,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAkB;AACjC;IAA5C,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACnB;AACoB;IAA5C,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oCACxB;AAPhB,MAAM;IADX,aAAa,CAAC,YAAY,CAAC;GACtB,MAAM,CA4CX;AAED,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["import { html } from 'lit-element';\nimport { customElement, property } from 'lit/decorators.js';\nimport { TOGGLE_SIZE, TOGGLE_VARIANT } from './defs';\nimport { TWStyles } from '../../../styles';\nimport { toggleStyle } from './toggle.style';\nimport { BaseElement, cn } from '../../../helpers';\nimport { spread } from '@open-wc/lit-helpers';\n\nexport { TOGGLE_SIZE, TOGGLE_VARIANT };\n\n@customElement('rtg-toggle')\nclass Toggle extends BaseElement {\n @property({ attribute: true, type: Boolean, reflect: true }) disabled = false;\n @property({ attribute: true, type: Boolean, reflect: true }) checked = false;\n @property({ attribute: true, type: Boolean, reflect: true }) required = false;\n @property({ attribute: true, type: String }) variant: TOGGLE_VARIANT =\n TOGGLE_VARIANT.DEFAULT;\n @property({ attribute: true, type: String }) size: TOGGLE_SIZE =\n TOGGLE_SIZE.SMALL;\n\n static styles = [TWStyles];\n static toggleVariants = toggleStyle;\n protected getAttributesToExclude(): string[] {\n return ['disabled', 'checked', 'variant', 'size', 'required'];\n }\n\n toggle() {\n if (!this.disabled) {\n this.checked = !this.checked;\n }\n }\n render() {\n const attributes = this.getFilteredAttributes();\n return html`\n <button\n type=\"button\"\n class=\"${cn(\n Toggle.toggleVariants({\n variant: this.variant,\n size: this.size,\n className: this.className,\n })\n )}\"\n aria-pressed=${this.checked}\n data-state=\"${this.checked ? 'on' : 'off'}\"\n aria-label=\"Toggle bold\"\n @click=${this.toggle}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ${spread(attributes)}\n >\n <slot></slot>\n </button>\n `;\n }\n}\n\nexport { Toggle };\n"]}
|
@@ -0,0 +1,189 @@
|
|
1
|
+
import { html } from 'lit';
|
2
|
+
import { expect, within, waitFor, userEvent } from '@storybook/test';
|
3
|
+
import { Toggle, TOGGLE_SIZE, TOGGLE_VARIANT } from './toggle.atom';
|
4
|
+
// import '../button';
|
5
|
+
const meta = {
|
6
|
+
component: 'Toggle',
|
7
|
+
tags: ['autodocs'],
|
8
|
+
argTypes: {
|
9
|
+
variant: {
|
10
|
+
control: {
|
11
|
+
type: 'select',
|
12
|
+
},
|
13
|
+
options: Object.values(TOGGLE_VARIANT),
|
14
|
+
defaultValue: 'DEFAULT',
|
15
|
+
description: 'Choose the visual style of the toggle.',
|
16
|
+
table: {
|
17
|
+
defaultValue: { summary: 'DEFAULT' },
|
18
|
+
},
|
19
|
+
},
|
20
|
+
size: {
|
21
|
+
control: {
|
22
|
+
type: 'select',
|
23
|
+
},
|
24
|
+
options: Object.values(TOGGLE_SIZE),
|
25
|
+
description: 'Choose the size of the toggle.',
|
26
|
+
defaultValue: 'SMALL',
|
27
|
+
table: {
|
28
|
+
defaultValue: { summary: 'SMALL' },
|
29
|
+
},
|
30
|
+
},
|
31
|
+
disabled: {
|
32
|
+
control: 'boolean',
|
33
|
+
description: 'Disable the toggle to prevent interactions.',
|
34
|
+
table: {
|
35
|
+
defaultValue: { summary: 'false' },
|
36
|
+
},
|
37
|
+
},
|
38
|
+
checked: {
|
39
|
+
control: 'boolean',
|
40
|
+
description: 'Set the initial checked state of the toggle.',
|
41
|
+
table: {
|
42
|
+
defaultValue: { summary: 'false' },
|
43
|
+
},
|
44
|
+
},
|
45
|
+
required: {
|
46
|
+
control: 'boolean',
|
47
|
+
description: 'Mark the toggle as required.',
|
48
|
+
table: {
|
49
|
+
defaultValue: { summary: 'false' },
|
50
|
+
},
|
51
|
+
},
|
52
|
+
},
|
53
|
+
};
|
54
|
+
const testToggleBehavior = async (args, canvasElement, mockHandler) => {
|
55
|
+
const canvas = within(canvasElement);
|
56
|
+
const toggle = await waitFor(() => canvas.getByTestId('toggle-id'));
|
57
|
+
if (toggle.shadowRoot) {
|
58
|
+
const innerToggle = toggle.shadowRoot.querySelector('[data-testchild="children-id"]');
|
59
|
+
expect(innerToggle).toHaveAttribute('type', 'button');
|
60
|
+
// Test toggle state
|
61
|
+
if (args.checked) {
|
62
|
+
expect(innerToggle).toBeChecked();
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
expect(innerToggle).not.toBeChecked();
|
66
|
+
}
|
67
|
+
// Test toggle click behavior
|
68
|
+
if (!args.disabled && innerToggle) {
|
69
|
+
await userEvent.click(innerToggle);
|
70
|
+
if (mockHandler) {
|
71
|
+
expect(mockHandler).toHaveBeenCalled();
|
72
|
+
}
|
73
|
+
}
|
74
|
+
// Test toggle disabled state
|
75
|
+
if (args.disabled) {
|
76
|
+
expect(innerToggle).toBeDisabled();
|
77
|
+
}
|
78
|
+
else {
|
79
|
+
expect(innerToggle).not.toBeDisabled();
|
80
|
+
}
|
81
|
+
// Test toggle variant classes
|
82
|
+
const expectedClasses = Toggle.toggleVariants({
|
83
|
+
variant: args.variant,
|
84
|
+
size: args.size,
|
85
|
+
className: '',
|
86
|
+
});
|
87
|
+
expect(innerToggle).toHaveClass(expectedClasses);
|
88
|
+
// Test toggle size classes
|
89
|
+
const expectedSizeClasses = Toggle.toggleVariants({
|
90
|
+
variant: args.variant,
|
91
|
+
size: args.size,
|
92
|
+
className: '',
|
93
|
+
});
|
94
|
+
expect(innerToggle).toHaveClass(expectedSizeClasses);
|
95
|
+
}
|
96
|
+
};
|
97
|
+
export default meta;
|
98
|
+
export const Toggles = {
|
99
|
+
args: {
|
100
|
+
variant: 'DEFAULT',
|
101
|
+
size: 'SMALL',
|
102
|
+
disabled: false,
|
103
|
+
checked: false,
|
104
|
+
required: false,
|
105
|
+
},
|
106
|
+
render: ({ variant, size, disabled, checked, required }) => html `
|
107
|
+
<rtg-toggle
|
108
|
+
?disabled=${disabled}
|
109
|
+
?checked=${checked}
|
110
|
+
?required=${required}
|
111
|
+
.variant=${variant}
|
112
|
+
.size=${size}
|
113
|
+
data-testid="toggle-id"
|
114
|
+
data-testchild="children-id"
|
115
|
+
>
|
116
|
+
<svg
|
117
|
+
xmlns="http://www.w3.org/2000/svg"
|
118
|
+
width="24"
|
119
|
+
height="24"
|
120
|
+
viewBox="0 0 24 24"
|
121
|
+
fill="none"
|
122
|
+
stroke="currentColor"
|
123
|
+
stroke-width="2"
|
124
|
+
stroke-linecap="round"
|
125
|
+
stroke-linejoin="round"
|
126
|
+
class="lucide lucide-bold h-4 w-4"
|
127
|
+
>
|
128
|
+
<path d="M14 12a4 4 0 0 0 0-8H6v8"></path>
|
129
|
+
<path d="M15 20a4 4 0 0 0 0-8H6v8Z"></path>
|
130
|
+
</svg>
|
131
|
+
</rtg-toggle>
|
132
|
+
`,
|
133
|
+
play: async ({ args, canvasElement }) => {
|
134
|
+
await testToggleBehavior(args, canvasElement, null);
|
135
|
+
},
|
136
|
+
};
|
137
|
+
export const RequiredToggle = {
|
138
|
+
name: 'Required Toggle',
|
139
|
+
args: {
|
140
|
+
variant: 'DEFAULT',
|
141
|
+
size: 'SMALL',
|
142
|
+
disabled: false,
|
143
|
+
checked: false,
|
144
|
+
required: true,
|
145
|
+
},
|
146
|
+
render: ({ variant, size, disabled, checked, required }) => html `
|
147
|
+
<div>
|
148
|
+
<rtg-toggle
|
149
|
+
?disabled=${disabled}
|
150
|
+
?checked=${checked}
|
151
|
+
?required=${required}
|
152
|
+
.variant=${variant}
|
153
|
+
.size=${size}
|
154
|
+
data-testid="toggle-id"
|
155
|
+
data-testchild="children-id"
|
156
|
+
@click=${(e) => {
|
157
|
+
const checkbox = e.target;
|
158
|
+
const button = document.querySelector('rtg-button');
|
159
|
+
if (button) {
|
160
|
+
button.disabled = required ? !checkbox.checked : false;
|
161
|
+
}
|
162
|
+
}}
|
163
|
+
>
|
164
|
+
<svg
|
165
|
+
xmlns="http://www.w3.org/2000/svg"
|
166
|
+
width="24"
|
167
|
+
height="24"
|
168
|
+
viewBox="0 0 24 24"
|
169
|
+
fill="none"
|
170
|
+
stroke="currentColor"
|
171
|
+
stroke-width="2"
|
172
|
+
stroke-linecap="round"
|
173
|
+
stroke-linejoin="round"
|
174
|
+
class="lucide lucide-italic h-4 w-4"
|
175
|
+
>
|
176
|
+
<line x1="19" x2="10" y1="4" y2="4"></line>
|
177
|
+
<line x1="14" x2="5" y1="20" y2="20"></line>
|
178
|
+
<line x1="15" x2="9" y1="4" y2="20"></line>
|
179
|
+
</svg>
|
180
|
+
</rtg-toggle>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
<rtg-button ?disabled=${required && !checked}> send </rtg-button>
|
184
|
+
`,
|
185
|
+
play: async ({ args, canvasElement }) => {
|
186
|
+
await testToggleBehavior(args, canvasElement, null);
|
187
|
+
},
|
188
|
+
};
|
189
|
+
//# sourceMappingURL=toggle.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toggle.stories.js","sourceRoot":"","sources":["../../../../../src/components/atoms/toggle/toggle.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MA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,CAAQ,EAAE,EAAE;QACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,MAA0B,CAAC;QAC9C,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CACnC,YAAY,CACmB,CAAC;QAClC,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;QACzD,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;4BAqBmB,QAAQ,IAAI,CAAC,OAAO;GAC7C;IACD,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE;QACtC,MAAM,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit';\nimport type { Meta, StoryObj } from '@storybook/web-components';\nimport { expect, within, waitFor, userEvent } from '@storybook/test';\nimport { Toggle, TOGGLE_SIZE, TOGGLE_VARIANT } from './toggle.atom';\n// import '../button';\n\nconst meta: Meta = {\n component: 'Toggle',\n tags: ['autodocs'],\n argTypes: {\n variant: {\n control: {\n type: 'select',\n },\n options: Object.values(TOGGLE_VARIANT),\n defaultValue: 'DEFAULT',\n description: 'Choose the visual style of the toggle.',\n table: {\n defaultValue: { summary: 'DEFAULT' },\n },\n },\n size: {\n control: {\n type: 'select',\n },\n options: Object.values(TOGGLE_SIZE),\n description: 'Choose the size of the toggle.',\n defaultValue: 'SMALL',\n table: {\n defaultValue: { summary: 'SMALL' },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Disable the toggle to prevent interactions.',\n table: {\n defaultValue: { summary: 'false' },\n },\n },\n checked: {\n control: 'boolean',\n description: 'Set the initial checked state of the toggle.',\n table: {\n defaultValue: { summary: 'false' },\n },\n },\n required: {\n control: 'boolean',\n description: 'Mark the toggle as required.',\n table: {\n defaultValue: { summary: 'false' },\n },\n },\n },\n};\n\nconst testToggleBehavior = async (\n args: any,\n canvasElement: any,\n mockHandler: any\n) => {\n const canvas = within(canvasElement);\n const toggle = await waitFor(() => canvas.getByTestId('toggle-id'));\n if (toggle.shadowRoot) {\n const innerToggle = toggle.shadowRoot.querySelector(\n '[data-testchild=\"children-id\"]'\n );\n expect(innerToggle).toHaveAttribute('type', 'button');\n // Test toggle state\n if (args.checked) {\n expect(innerToggle).toBeChecked();\n } else {\n expect(innerToggle).not.toBeChecked();\n }\n\n // Test toggle click behavior\n if (!args.disabled && innerToggle) {\n await userEvent.click(innerToggle);\n if (mockHandler) {\n expect(mockHandler).toHaveBeenCalled();\n }\n }\n\n // Test toggle disabled state\n if (args.disabled) {\n expect(innerToggle).toBeDisabled();\n } else {\n expect(innerToggle).not.toBeDisabled();\n }\n\n // Test toggle variant classes\n const expectedClasses = Toggle.toggleVariants({\n variant: args.variant,\n size: args.size,\n className: '',\n });\n expect(innerToggle).toHaveClass(expectedClasses);\n // Test toggle size classes\n const expectedSizeClasses = Toggle.toggleVariants({\n variant: args.variant,\n size: args.size,\n className: '',\n });\n expect(innerToggle).toHaveClass(expectedSizeClasses);\n }\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Toggles: Story = {\n args: {\n variant: 'DEFAULT',\n size: 'SMALL',\n disabled: false,\n checked: false,\n required: false,\n },\n render: ({ variant, size, disabled, checked, required }) => html`\n <rtg-toggle\n ?disabled=${disabled}\n ?checked=${checked}\n ?required=${required}\n .variant=${variant}\n .size=${size}\n data-testid=\"toggle-id\"\n data-testchild=\"children-id\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-bold h-4 w-4\"\n >\n <path d=\"M14 12a4 4 0 0 0 0-8H6v8\"></path>\n <path d=\"M15 20a4 4 0 0 0 0-8H6v8Z\"></path>\n </svg>\n </rtg-toggle>\n `,\n play: async ({ args, canvasElement }) => {\n await testToggleBehavior(args, canvasElement, null);\n },\n};\n\nexport const RequiredToggle: Story = {\n name: 'Required Toggle',\n args: {\n variant: 'DEFAULT',\n size: 'SMALL',\n disabled: false,\n checked: false,\n required: true,\n },\n render: ({ variant, size, disabled, checked, required }) => html`\n <div>\n <rtg-toggle\n ?disabled=${disabled}\n ?checked=${checked}\n ?required=${required}\n .variant=${variant}\n .size=${size}\n data-testid=\"toggle-id\"\n data-testchild=\"children-id\"\n @click=${(e: Event) => {\n const checkbox = e.target as HTMLInputElement;\n const button = document.querySelector(\n 'rtg-button'\n ) as unknown as HTMLButtonElement;\n if (button) {\n button.disabled = required ? !checkbox.checked : false;\n }\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-italic h-4 w-4\"\n >\n <line x1=\"19\" x2=\"10\" y1=\"4\" y2=\"4\"></line>\n <line x1=\"14\" x2=\"5\" y1=\"20\" y2=\"20\"></line>\n <line x1=\"15\" x2=\"9\" y1=\"4\" y2=\"20\"></line>\n </svg>\n </rtg-toggle>\n </div>\n\n <rtg-button ?disabled=${required && !checked}> send </rtg-button>\n `,\n play: async ({ args, canvasElement }) => {\n await testToggleBehavior(args, canvasElement, null);\n },\n};\n"]}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
2
|
+
export const toggleStyle = cva('inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground bg-transparent h-10 px-3', {
|
3
|
+
variants: {
|
4
|
+
variant: {
|
5
|
+
default: ` hover:bg-muted hover:text-muted-foreground`,
|
6
|
+
outline: ` border border-input hover:bg-accent hover:text-accent-foreground`,
|
7
|
+
},
|
8
|
+
size: {
|
9
|
+
sm: 'h-9 px-2.5',
|
10
|
+
md: 'h-10 px-3',
|
11
|
+
lg: 'h-11 px-5',
|
12
|
+
},
|
13
|
+
},
|
14
|
+
defaultVariants: {
|
15
|
+
variant: 'default',
|
16
|
+
size: 'sm',
|
17
|
+
},
|
18
|
+
});
|
19
|
+
//# sourceMappingURL=toggle.style.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toggle.style.js","sourceRoot":"","sources":["../../../../../src/components/atoms/toggle/toggle.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAC5B,gWAAgW,EAChW;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,6CAA6C;YACtD,OAAO,EAAE,mEAAmE;SAC7E;QACD,IAAI,EAAE;YACJ,EAAE,EAAE,YAAY;YAChB,EAAE,EAAE,WAAW;YACf,EAAE,EAAE,WAAW;SAChB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI;KACX;CACF,CACF,CAAC","sourcesContent":["import { cva } from 'class-variance-authority';\n\nexport const toggleStyle = cva(\n 'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground bg-transparent h-10 px-3',\n {\n variants: {\n variant: {\n default: ` hover:bg-muted hover:text-muted-foreground`,\n outline: ` border border-input hover:bg-accent hover:text-accent-foreground`,\n },\n size: {\n sm: 'h-9 px-2.5',\n md: 'h-10 px-3',\n lg: 'h-11 px-5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'sm',\n },\n }\n);\n"]}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { LitElement } from 'lit';
|
2
|
+
export declare class Command extends LitElement {
|
3
|
+
static styles: import("lit").CSSResult[];
|
4
|
+
_input: Array<HTMLElement>;
|
5
|
+
render(): import("lit-html").TemplateResult<1>;
|
6
|
+
}
|
7
|
+
export declare class CommandList extends LitElement {
|
8
|
+
static styles: import("lit").CSSResult[];
|
9
|
+
private get identifier();
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
11
|
+
}
|
12
|
+
export declare class CommandGroup extends LitElement {
|
13
|
+
heading: string;
|
14
|
+
_id: string;
|
15
|
+
_hidden: string;
|
16
|
+
private static _counter;
|
17
|
+
static styles: import("lit").CSSResult[];
|
18
|
+
private get identifier();
|
19
|
+
render(): import("lit-html").TemplateResult<1>;
|
20
|
+
}
|
21
|
+
export declare class CommandSeparator extends LitElement {
|
22
|
+
_id: string;
|
23
|
+
_hidden: string;
|
24
|
+
private static _counter;
|
25
|
+
static styles: import("lit").CSSResult[];
|
26
|
+
private get identifier();
|
27
|
+
render(): import("lit-html").TemplateResult<1>;
|
28
|
+
}
|
29
|
+
export declare class CommandEmpty extends LitElement {
|
30
|
+
_id: string;
|
31
|
+
_hidden: string;
|
32
|
+
private static _counter;
|
33
|
+
static styles: import("lit").CSSResult[];
|
34
|
+
private get identifier();
|
35
|
+
render(): import("lit-html").TemplateResult<1>;
|
36
|
+
}
|
37
|
+
export declare class CommandItem extends LitElement {
|
38
|
+
_id: string;
|
39
|
+
_hidden: string;
|
40
|
+
private static _counter;
|
41
|
+
static styles: import("lit").CSSResult[];
|
42
|
+
private get identifier();
|
43
|
+
get value(): string;
|
44
|
+
selected: boolean;
|
45
|
+
private handleMouseEvent;
|
46
|
+
render(): import("lit-html").TemplateResult<1>;
|
47
|
+
}
|
48
|
+
export declare class CommandInput extends LitElement {
|
49
|
+
placeholder: string;
|
50
|
+
_value: string;
|
51
|
+
static styles: import("lit").CSSResult[];
|
52
|
+
private get identifier();
|
53
|
+
private filterItems;
|
54
|
+
private handleChange;
|
55
|
+
render(): import("lit-html").TemplateResult<1>;
|
56
|
+
}
|