thread-ui 0.2.0 → 0.4.0
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 +63 -18
- package/dist/components/form-elements/dropdown/dropdown.d.ts +14 -0
- package/dist/components/form-elements/dropdown/dropdown.d.ts.map +1 -0
- package/dist/components/form-elements/dropdown/dropdown.js +83 -0
- package/dist/components/form-elements/dropdown/dropdown.js.map +1 -0
- package/dist/components/form-elements/dropdown/dropdown.types.d.ts +24 -0
- package/dist/components/form-elements/dropdown/dropdown.types.d.ts.map +1 -0
- package/dist/components/form-elements/dropdown/dropdown.types.js +2 -0
- package/dist/components/form-elements/dropdown/dropdown.types.js.map +1 -0
- package/dist/components/form-elements/dropdown/index.d.ts +3 -0
- package/dist/components/form-elements/dropdown/index.d.ts.map +1 -0
- package/dist/components/form-elements/dropdown/index.js +2 -0
- package/dist/components/form-elements/dropdown/index.js.map +1 -0
- package/dist/components/form-elements/file-upload/components/file-input.d.ts +2 -0
- package/dist/components/form-elements/file-upload/components/file-input.d.ts.map +1 -0
- package/dist/components/form-elements/file-upload/components/file-input.js +93 -0
- package/dist/components/form-elements/file-upload/components/file-input.js.map +1 -0
- package/dist/components/form-elements/file-upload/components/file-upload-content.d.ts +2 -0
- package/dist/components/form-elements/file-upload/components/file-upload-content.d.ts.map +1 -0
- package/dist/components/form-elements/file-upload/components/file-upload-content.js +28 -0
- package/dist/components/form-elements/file-upload/components/file-upload-content.js.map +1 -0
- package/dist/components/form-elements/file-upload/components/file-upload-preview.d.ts +2 -0
- package/dist/components/form-elements/file-upload/components/file-upload-preview.d.ts.map +1 -0
- package/dist/components/form-elements/file-upload/components/file-upload-preview.js +51 -0
- package/dist/components/form-elements/file-upload/components/file-upload-preview.js.map +1 -0
- package/dist/components/form-elements/file-upload/components/item-previews.d.ts +12 -0
- package/dist/components/form-elements/file-upload/components/item-previews.d.ts.map +1 -0
- package/dist/components/form-elements/file-upload/components/item-previews.js +58 -0
- package/dist/components/form-elements/file-upload/components/item-previews.js.map +1 -0
- package/dist/components/form-elements/file-upload/file-upload-context.d.ts +3 -0
- package/dist/components/form-elements/file-upload/file-upload-context.d.ts.map +1 -0
- package/dist/components/form-elements/file-upload/file-upload-context.js +4 -0
- package/dist/components/form-elements/file-upload/file-upload-context.js.map +1 -0
- package/dist/components/form-elements/file-upload/file-upload.d.ts +20 -0
- package/dist/components/form-elements/file-upload/file-upload.d.ts.map +1 -0
- package/dist/components/form-elements/file-upload/file-upload.js +148 -0
- package/dist/components/form-elements/file-upload/file-upload.js.map +1 -0
- package/dist/components/form-elements/file-upload/file-upload.types.d.ts +36 -0
- package/dist/components/form-elements/file-upload/file-upload.types.d.ts.map +1 -0
- package/dist/components/form-elements/file-upload/file-upload.types.js +2 -0
- package/dist/components/form-elements/file-upload/file-upload.types.js.map +1 -0
- package/dist/components/form-elements/file-upload/index.d.ts +3 -0
- package/dist/components/form-elements/file-upload/index.d.ts.map +1 -0
- package/dist/components/form-elements/file-upload/index.js +2 -0
- package/dist/components/form-elements/file-upload/index.js.map +1 -0
- package/dist/components/form-elements/form-label/form-label.d.ts +6 -0
- package/dist/components/form-elements/form-label/form-label.d.ts.map +1 -1
- package/dist/components/form-elements/form-label/form-label.js +8 -2
- package/dist/components/form-elements/form-label/form-label.js.map +1 -1
- package/dist/components/form-elements/form-label/form-label.types.d.ts +3 -0
- package/dist/components/form-elements/form-label/form-label.types.d.ts.map +1 -1
- package/dist/components/form-elements/index.d.ts +2 -0
- package/dist/components/form-elements/index.d.ts.map +1 -1
- package/dist/components/form-elements/index.js +2 -0
- package/dist/components/form-elements/index.js.map +1 -1
- package/dist/components/form-elements/input-props.types.d.ts +10 -3
- package/dist/components/form-elements/input-props.types.d.ts.map +1 -1
- package/dist/components/form-elements/number-input/number-input.d.ts +15 -1
- package/dist/components/form-elements/number-input/number-input.d.ts.map +1 -1
- package/dist/components/form-elements/number-input/number-input.js +82 -21
- package/dist/components/form-elements/number-input/number-input.js.map +1 -1
- package/dist/components/form-elements/number-input/number-input.types.d.ts +3 -0
- package/dist/components/form-elements/number-input/number-input.types.d.ts.map +1 -1
- package/dist/components/form-elements/styles/index.d.ts.map +1 -1
- package/dist/components/form-elements/styles/index.js +3 -1
- package/dist/components/form-elements/styles/index.js.map +1 -1
- package/dist/components/form-elements/text-input/text-input.d.ts +7 -1
- package/dist/components/form-elements/text-input/text-input.d.ts.map +1 -1
- package/dist/components/form-elements/text-input/text-input.js +8 -2
- package/dist/components/form-elements/text-input/text-input.js.map +1 -1
- package/dist/components/form-elements/text-input/text-input.types.d.ts +1 -0
- package/dist/components/form-elements/text-input/text-input.types.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/layouts/column-layout/column-layout.d.ts +11 -2
- package/dist/components/layouts/column-layout/column-layout.d.ts.map +1 -1
- package/dist/components/layouts/column-layout/column-layout.js +11 -2
- package/dist/components/layouts/column-layout/column-layout.js.map +1 -1
- package/dist/components/layouts/column-layout/column-layout.types.d.ts +8 -18
- package/dist/components/layouts/column-layout/column-layout.types.d.ts.map +1 -1
- package/dist/components/layouts/column-layout/column-skeleton/column-skeleton.js +1 -1
- package/dist/components/layouts/column-layout/column-skeleton/column-skeleton.js.map +1 -1
- package/dist/components/layouts/footer/footer.d.ts +13 -1
- package/dist/components/layouts/footer/footer.d.ts.map +1 -1
- package/dist/components/layouts/footer/footer.js +14 -2
- package/dist/components/layouts/footer/footer.js.map +1 -1
- package/dist/components/layouts/footer/footer.types.d.ts +7 -0
- package/dist/components/layouts/footer/footer.types.d.ts.map +1 -1
- package/dist/components/layouts/masonry-layout/masonry-layout.d.ts +9 -0
- package/dist/components/layouts/masonry-layout/masonry-layout.d.ts.map +1 -1
- package/dist/components/layouts/masonry-layout/masonry-layout.js +12 -3
- package/dist/components/layouts/masonry-layout/masonry-layout.js.map +1 -1
- package/dist/components/layouts/masonry-layout/masonry-layout.types.d.ts +3 -0
- package/dist/components/layouts/masonry-layout/masonry-layout.types.d.ts.map +1 -1
- package/dist/components/media/image-panel/image-panel.d.ts +14 -0
- package/dist/components/media/image-panel/image-panel.d.ts.map +1 -1
- package/dist/components/media/image-panel/image-panel.js +15 -1
- package/dist/components/media/image-panel/image-panel.js.map +1 -1
- package/dist/components/media/image-panel/image-panel.types.d.ts +8 -0
- package/dist/components/media/image-panel/image-panel.types.d.ts.map +1 -1
- package/dist/components/media/info-card/info-card.d.ts +11 -0
- package/dist/components/media/info-card/info-card.d.ts.map +1 -1
- package/dist/components/media/info-card/info-card.js +13 -2
- package/dist/components/media/info-card/info-card.js.map +1 -1
- package/dist/components/media/info-card/info-card.types.d.ts +10 -0
- package/dist/components/media/info-card/info-card.types.d.ts.map +1 -1
- package/dist/components/media/media-card/media-card.d.ts +13 -0
- package/dist/components/media/media-card/media-card.d.ts.map +1 -1
- package/dist/components/media/media-card/media-card.js +21 -6
- package/dist/components/media/media-card/media-card.js.map +1 -1
- package/dist/components/media/media-card/media-card.types.d.ts +13 -0
- package/dist/components/media/media-card/media-card.types.d.ts.map +1 -1
- package/dist/components/navigation/nav-menu/items/nav-drop-down-item/nav-drop-down-item.d.ts.map +1 -1
- package/dist/components/navigation/nav-menu/items/nav-drop-down-item/nav-drop-down-item.js +10 -7
- package/dist/components/navigation/nav-menu/items/nav-drop-down-item/nav-drop-down-item.js.map +1 -1
- package/dist/components/navigation/nav-menu/nav-menu.d.ts +13 -0
- package/dist/components/navigation/nav-menu/nav-menu.d.ts.map +1 -1
- package/dist/components/navigation/nav-menu/nav-menu.js +13 -0
- package/dist/components/navigation/nav-menu/nav-menu.js.map +1 -1
- package/dist/components/navigation/nav-menu/nav-menu.types.d.ts +2 -0
- package/dist/components/navigation/nav-menu/nav-menu.types.d.ts.map +1 -1
- package/dist/components/navigation/side-nav/side-nav-item/side-nav-item.js +1 -1
- package/dist/components/navigation/side-nav/side-nav-item/side-nav-item.js.map +1 -1
- package/dist/components/navigation/side-nav/side-nav-item/side-nav-item.types.d.ts.map +1 -1
- package/dist/components/navigation/side-nav/side-nav.d.ts +8 -2
- package/dist/components/navigation/side-nav/side-nav.d.ts.map +1 -1
- package/dist/components/navigation/side-nav/side-nav.js +8 -2
- package/dist/components/navigation/side-nav/side-nav.js.map +1 -1
- package/dist/components/navigation/side-nav/side-nav.types.d.ts +4 -0
- package/dist/components/navigation/side-nav/side-nav.types.d.ts.map +1 -1
- package/dist/components/typography/page-header/page-header.d.ts +6 -0
- package/dist/components/typography/page-header/page-header.d.ts.map +1 -1
- package/dist/components/typography/page-header/page-header.js +6 -0
- package/dist/components/typography/page-header/page-header.js.map +1 -1
- package/dist/components/typography/page-header/page-header.types.d.ts +3 -0
- package/dist/components/typography/page-header/page-header.types.d.ts.map +1 -1
- package/dist/components/typography/typography.d.ts +55 -0
- package/dist/components/typography/typography.d.ts.map +1 -1
- package/dist/components/typography/typography.js +48 -0
- package/dist/components/typography/typography.js.map +1 -1
- package/dist/components/ui/button/button-recipe.d.ts.map +1 -1
- package/dist/components/ui/button/button-recipe.js +1 -0
- package/dist/components/ui/button/button-recipe.js.map +1 -1
- package/dist/components/ui/button/button.d.ts +8 -0
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/button/button.js +8 -0
- package/dist/components/ui/button/button.js.map +1 -1
- package/dist/components/ui/button/button.types.d.ts +7 -0
- package/dist/components/ui/button/button.types.d.ts.map +1 -1
- package/dist/components/ui/card/card.d.ts +8 -0
- package/dist/components/ui/card/card.d.ts.map +1 -1
- package/dist/components/ui/card/card.js +8 -0
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/card/card.types.d.ts +8 -1
- package/dist/components/ui/card/card.types.d.ts.map +1 -1
- package/dist/components/ui/divider/divider.d.ts +6 -0
- package/dist/components/ui/divider/divider.d.ts.map +1 -1
- package/dist/components/ui/divider/divider.js +6 -0
- package/dist/components/ui/divider/divider.js.map +1 -1
- package/dist/components/ui/divider/divider.types.d.ts +3 -0
- package/dist/components/ui/divider/divider.types.d.ts.map +1 -1
- package/dist/components/ui/icon/icon.d.ts +5 -7
- package/dist/components/ui/icon/icon.d.ts.map +1 -1
- package/dist/components/ui/icon/icon.js +5 -7
- package/dist/components/ui/icon/icon.js.map +1 -1
- package/dist/components/ui/icon/icon.types.d.ts +5 -0
- package/dist/components/ui/icon/icon.types.d.ts.map +1 -1
- package/dist/components/ui/icon-button/icon-button.d.ts +8 -0
- package/dist/components/ui/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/ui/icon-button/icon-button.js +9 -1
- package/dist/components/ui/icon-button/icon-button.js.map +1 -1
- package/dist/components/ui/icon-button/icon-button.types.d.ts +3 -1
- package/dist/components/ui/icon-button/icon-button.types.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/index.js.map +1 -1
- package/dist/components/ui/modal/components/modal-content.d.ts +2 -0
- package/dist/components/ui/modal/components/modal-content.d.ts.map +1 -0
- package/dist/components/ui/modal/components/modal-content.js +98 -0
- package/dist/components/ui/modal/components/modal-content.js.map +1 -0
- package/dist/components/ui/modal/index.d.ts +3 -0
- package/dist/components/ui/modal/index.d.ts.map +1 -0
- package/dist/components/ui/modal/index.js +2 -0
- package/dist/components/ui/modal/index.js.map +1 -0
- package/dist/components/ui/modal/modal-context.d.ts +3 -0
- package/dist/components/ui/modal/modal-context.d.ts.map +1 -0
- package/dist/components/ui/modal/modal-context.js +4 -0
- package/dist/components/ui/modal/modal-context.js.map +1 -0
- package/dist/components/ui/modal/modal.d.ts +12 -0
- package/dist/components/ui/modal/modal.d.ts.map +1 -0
- package/dist/components/ui/modal/modal.js +44 -0
- package/dist/components/ui/modal/modal.js.map +1 -0
- package/dist/components/ui/modal/modal.types.d.ts +27 -0
- package/dist/components/ui/modal/modal.types.d.ts.map +1 -0
- package/dist/components/ui/modal/modal.types.js +2 -0
- package/dist/components/ui/modal/modal.types.js.map +1 -0
- package/dist/components/ui/toggle/toggle.d.ts +6 -1
- package/dist/components/ui/toggle/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle/toggle.js +6 -1
- package/dist/components/ui/toggle/toggle.js.map +1 -1
- package/dist/components/ui/toggle/toggle.types.d.ts +3 -0
- package/dist/components/ui/toggle/toggle.types.d.ts.map +1 -1
- package/dist/styled-system/styles.css +2034 -559
- package/dist/styled-system/tokens/index.mjs +9 -9
- package/dist/styles/panda.css +1 -1877
- package/dist/styles/thread.css +18 -5
- package/dist/theme/default-theme.js +6 -6
- package/dist/theme/default-theme.js.map +1 -1
- package/dist/theme/generate-override-css.d.ts +7 -0
- package/dist/theme/generate-override-css.d.ts.map +1 -0
- package/dist/theme/generate-override-css.js +66 -0
- package/dist/theme/generate-override-css.js.map +1 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/theme-mode.d.ts +6 -0
- package/dist/theme/theme-mode.d.ts.map +1 -0
- package/dist/theme/theme-mode.js +17 -0
- package/dist/theme/theme-mode.js.map +1 -0
- package/dist/theme/theme-provider.d.ts +36 -0
- package/dist/theme/theme-provider.d.ts.map +1 -0
- package/dist/theme/theme-provider.js +76 -0
- package/dist/theme/theme-provider.js.map +1 -0
- package/dist/theme/thread-script.d.ts +27 -0
- package/dist/theme/thread-script.d.ts.map +1 -0
- package/dist/theme/thread-script.js +48 -0
- package/dist/theme/thread-script.js.map +1 -0
- package/dist/utils/context/create-component-context/create-component-context.d.ts +2 -0
- package/dist/utils/context/create-component-context/create-component-context.d.ts.map +1 -0
- package/dist/utils/context/create-component-context/create-component-context.js +14 -0
- package/dist/utils/context/create-component-context/create-component-context.js.map +1 -0
- package/dist/utils/context/create-component-context/index.d.ts +2 -0
- package/dist/utils/context/create-component-context/index.d.ts.map +1 -0
- package/dist/utils/context/create-component-context/index.js +2 -0
- package/dist/utils/context/create-component-context/index.js.map +1 -0
- package/dist/utils/context/index.d.ts +2 -0
- package/dist/utils/context/index.d.ts.map +1 -0
- package/dist/utils/context/index.js +2 -0
- package/dist/utils/context/index.js.map +1 -0
- package/dist/utils/{deep-merge → data-manipulation/deep-merge}/deep-merge.d.ts +1 -1
- package/dist/utils/data-manipulation/deep-merge/deep-merge.d.ts.map +1 -0
- package/dist/utils/data-manipulation/deep-merge/deep-merge.js.map +1 -0
- package/dist/utils/data-manipulation/deep-merge/index.d.ts.map +1 -0
- package/dist/utils/data-manipulation/deep-merge/index.js.map +1 -0
- package/dist/utils/data-manipulation/index.d.ts +2 -0
- package/dist/utils/data-manipulation/index.d.ts.map +1 -0
- package/dist/utils/data-manipulation/index.js +2 -0
- package/dist/utils/data-manipulation/index.js.map +1 -0
- package/dist/utils/hooks/index.d.ts +3 -0
- package/dist/utils/hooks/index.d.ts.map +1 -0
- package/dist/utils/hooks/index.js +3 -0
- package/dist/utils/hooks/index.js.map +1 -0
- package/dist/utils/hooks/use-outside-close-click/index.d.ts +2 -0
- package/dist/utils/hooks/use-outside-close-click/index.d.ts.map +1 -0
- package/dist/utils/hooks/use-outside-close-click/index.js +2 -0
- package/dist/utils/hooks/use-outside-close-click/index.js.map +1 -0
- package/dist/utils/hooks/use-outside-close-click/use-outside-close-click.d.ts +3 -0
- package/dist/utils/hooks/use-outside-close-click/use-outside-close-click.d.ts.map +1 -0
- package/dist/utils/hooks/use-outside-close-click/use-outside-close-click.js +16 -0
- package/dist/utils/hooks/use-outside-close-click/use-outside-close-click.js.map +1 -0
- package/dist/utils/hooks/use-pathname/index.d.ts.map +1 -0
- package/dist/utils/hooks/use-pathname/index.js.map +1 -0
- package/dist/utils/hooks/use-pathname/use-pathname.d.ts.map +1 -0
- package/dist/utils/hooks/use-pathname/use-pathname.js.map +1 -0
- package/dist/utils/index.d.ts +5 -8
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -8
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/misc/index.d.ts +2 -0
- package/dist/utils/misc/index.d.ts.map +1 -0
- package/dist/utils/misc/index.js +2 -0
- package/dist/utils/misc/index.js.map +1 -0
- package/dist/utils/misc/is-file-image-type/index.d.ts +2 -0
- package/dist/utils/misc/is-file-image-type/index.d.ts.map +1 -0
- package/dist/utils/misc/is-file-image-type/index.js +2 -0
- package/dist/utils/misc/is-file-image-type/index.js.map +1 -0
- package/dist/utils/misc/is-file-image-type/is-file-image-type.d.ts +2 -0
- package/dist/utils/misc/is-file-image-type/is-file-image-type.d.ts.map +1 -0
- package/dist/utils/misc/is-file-image-type/is-file-image-type.js +4 -0
- package/dist/utils/misc/is-file-image-type/is-file-image-type.js.map +1 -0
- package/dist/utils/{get-colored-text-color → theme-utilities/get-colored-text-color}/get-colored-text-color.d.ts +1 -1
- package/dist/utils/theme-utilities/get-colored-text-color/get-colored-text-color.d.ts.map +1 -0
- package/dist/utils/{get-colored-text-color → theme-utilities/get-colored-text-color}/get-colored-text-color.js +1 -1
- package/dist/utils/theme-utilities/get-colored-text-color/get-colored-text-color.js.map +1 -0
- package/dist/utils/theme-utilities/get-colored-text-color/index.d.ts.map +1 -0
- package/dist/utils/theme-utilities/get-colored-text-color/index.js.map +1 -0
- package/dist/utils/{get-text-color → theme-utilities/get-text-color}/get-text-color.d.ts +1 -1
- package/dist/utils/theme-utilities/get-text-color/get-text-color.d.ts.map +1 -0
- package/dist/utils/{get-text-color → theme-utilities/get-text-color}/get-text-color.js +1 -1
- package/dist/utils/theme-utilities/get-text-color/get-text-color.js.map +1 -0
- package/dist/utils/theme-utilities/get-text-color/index.d.ts.map +1 -0
- package/dist/utils/theme-utilities/get-text-color/index.js.map +1 -0
- package/dist/utils/{get-utility-color → theme-utilities/get-utility-color}/get-utility-color-value.d.ts +1 -1
- package/dist/utils/theme-utilities/get-utility-color/get-utility-color-value.d.ts.map +1 -0
- package/dist/utils/{get-utility-color → theme-utilities/get-utility-color}/get-utility-color-value.js +1 -1
- package/dist/utils/theme-utilities/get-utility-color/get-utility-color-value.js.map +1 -0
- package/dist/utils/theme-utilities/get-utility-color/index.d.ts.map +1 -0
- package/dist/utils/theme-utilities/get-utility-color/index.js.map +1 -0
- package/dist/utils/{get-utility-font-size → theme-utilities/get-utility-font-size}/getUtilityFontSize.d.ts +1 -1
- package/dist/utils/theme-utilities/get-utility-font-size/getUtilityFontSize.d.ts.map +1 -0
- package/dist/utils/theme-utilities/get-utility-font-size/getUtilityFontSize.js.map +1 -0
- package/dist/utils/theme-utilities/get-utility-font-size/index.d.ts.map +1 -0
- package/dist/utils/theme-utilities/get-utility-font-size/index.js.map +1 -0
- package/dist/utils/theme-utilities/get-utility-icon-size/get-utility-icon-size.d.ts +4 -0
- package/dist/utils/theme-utilities/get-utility-icon-size/get-utility-icon-size.d.ts.map +1 -0
- package/dist/utils/theme-utilities/get-utility-icon-size/get-utility-icon-size.js.map +1 -0
- package/dist/utils/theme-utilities/get-utility-icon-size/index.d.ts.map +1 -0
- package/dist/utils/theme-utilities/get-utility-icon-size/index.js.map +1 -0
- package/dist/utils/theme-utilities/get-utility-size-value/get-utility-size-value.d.ts +3 -0
- package/dist/utils/theme-utilities/get-utility-size-value/get-utility-size-value.d.ts.map +1 -0
- package/dist/utils/theme-utilities/get-utility-size-value/get-utility-size-value.js.map +1 -0
- package/dist/utils/theme-utilities/get-utility-size-value/index.d.ts.map +1 -0
- package/dist/utils/theme-utilities/get-utility-size-value/index.js.map +1 -0
- package/dist/utils/theme-utilities/index.d.ts +7 -0
- package/dist/utils/theme-utilities/index.d.ts.map +1 -0
- package/dist/utils/theme-utilities/index.js +7 -0
- package/dist/utils/theme-utilities/index.js.map +1 -0
- package/package.json +5 -5
- package/dist/client/index.d.ts +0 -2
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/index.js +0 -2
- package/dist/client/index.js.map +0 -1
- package/dist/client/theme-provider/index.d.ts +0 -3
- package/dist/client/theme-provider/index.d.ts.map +0 -1
- package/dist/client/theme-provider/index.js +0 -2
- package/dist/client/theme-provider/index.js.map +0 -1
- package/dist/client/theme-provider/set-theme.d.ts +0 -8
- package/dist/client/theme-provider/set-theme.d.ts.map +0 -1
- package/dist/client/theme-provider/set-theme.js +0 -60
- package/dist/client/theme-provider/set-theme.js.map +0 -1
- package/dist/client/theme-provider/theme-provider.d.ts +0 -21
- package/dist/client/theme-provider/theme-provider.d.ts.map +0 -1
- package/dist/client/theme-provider/theme-provider.js +0 -196
- package/dist/client/theme-provider/theme-provider.js.map +0 -1
- package/dist/client/theme-provider/theme-provider.types.d.ts +0 -13
- package/dist/client/theme-provider/theme-provider.types.d.ts.map +0 -1
- package/dist/client/theme-provider/theme-provider.types.js +0 -2
- package/dist/client/theme-provider/theme-provider.types.js.map +0 -1
- package/dist/utils/deep-merge/deep-merge.d.ts.map +0 -1
- package/dist/utils/deep-merge/deep-merge.js.map +0 -1
- package/dist/utils/deep-merge/index.d.ts.map +0 -1
- package/dist/utils/deep-merge/index.js.map +0 -1
- package/dist/utils/get-colored-text-color/get-colored-text-color.d.ts.map +0 -1
- package/dist/utils/get-colored-text-color/get-colored-text-color.js.map +0 -1
- package/dist/utils/get-colored-text-color/index.d.ts.map +0 -1
- package/dist/utils/get-colored-text-color/index.js.map +0 -1
- package/dist/utils/get-text-color/get-text-color.d.ts.map +0 -1
- package/dist/utils/get-text-color/get-text-color.js.map +0 -1
- package/dist/utils/get-text-color/index.d.ts.map +0 -1
- package/dist/utils/get-text-color/index.js.map +0 -1
- package/dist/utils/get-utility-color/get-utility-color-value.d.ts.map +0 -1
- package/dist/utils/get-utility-color/get-utility-color-value.js.map +0 -1
- package/dist/utils/get-utility-color/index.d.ts.map +0 -1
- package/dist/utils/get-utility-color/index.js.map +0 -1
- package/dist/utils/get-utility-font-size/getUtilityFontSize.d.ts.map +0 -1
- package/dist/utils/get-utility-font-size/getUtilityFontSize.js.map +0 -1
- package/dist/utils/get-utility-font-size/index.d.ts.map +0 -1
- package/dist/utils/get-utility-font-size/index.js.map +0 -1
- package/dist/utils/get-utility-icon-size/get-utility-icon-size.d.ts +0 -4
- package/dist/utils/get-utility-icon-size/get-utility-icon-size.d.ts.map +0 -1
- package/dist/utils/get-utility-icon-size/get-utility-icon-size.js.map +0 -1
- package/dist/utils/get-utility-icon-size/index.d.ts.map +0 -1
- package/dist/utils/get-utility-icon-size/index.js.map +0 -1
- package/dist/utils/get-utility-size-value/get-utility-size-value.d.ts +0 -3
- package/dist/utils/get-utility-size-value/get-utility-size-value.d.ts.map +0 -1
- package/dist/utils/get-utility-size-value/get-utility-size-value.js.map +0 -1
- package/dist/utils/get-utility-size-value/index.d.ts.map +0 -1
- package/dist/utils/get-utility-size-value/index.js.map +0 -1
- package/dist/utils/use-pathname/index.d.ts.map +0 -1
- package/dist/utils/use-pathname/index.js.map +0 -1
- package/dist/utils/use-pathname/use-pathname.d.ts.map +0 -1
- package/dist/utils/use-pathname/use-pathname.js.map +0 -1
- /package/dist/utils/{deep-merge → data-manipulation/deep-merge}/deep-merge.js +0 -0
- /package/dist/utils/{deep-merge → data-manipulation/deep-merge}/index.d.ts +0 -0
- /package/dist/utils/{deep-merge → data-manipulation/deep-merge}/index.js +0 -0
- /package/dist/utils/{use-pathname → hooks/use-pathname}/index.d.ts +0 -0
- /package/dist/utils/{use-pathname → hooks/use-pathname}/index.js +0 -0
- /package/dist/utils/{use-pathname → hooks/use-pathname}/use-pathname.d.ts +0 -0
- /package/dist/utils/{use-pathname → hooks/use-pathname}/use-pathname.js +0 -0
- /package/dist/utils/{get-colored-text-color → theme-utilities/get-colored-text-color}/index.d.ts +0 -0
- /package/dist/utils/{get-colored-text-color → theme-utilities/get-colored-text-color}/index.js +0 -0
- /package/dist/utils/{get-text-color → theme-utilities/get-text-color}/index.d.ts +0 -0
- /package/dist/utils/{get-text-color → theme-utilities/get-text-color}/index.js +0 -0
- /package/dist/utils/{get-utility-color → theme-utilities/get-utility-color}/index.d.ts +0 -0
- /package/dist/utils/{get-utility-color → theme-utilities/get-utility-color}/index.js +0 -0
- /package/dist/utils/{get-utility-font-size → theme-utilities/get-utility-font-size}/getUtilityFontSize.js +0 -0
- /package/dist/utils/{get-utility-font-size → theme-utilities/get-utility-font-size}/index.d.ts +0 -0
- /package/dist/utils/{get-utility-font-size → theme-utilities/get-utility-font-size}/index.js +0 -0
- /package/dist/utils/{get-utility-icon-size → theme-utilities/get-utility-icon-size}/get-utility-icon-size.js +0 -0
- /package/dist/utils/{get-utility-icon-size → theme-utilities/get-utility-icon-size}/index.d.ts +0 -0
- /package/dist/utils/{get-utility-icon-size → theme-utilities/get-utility-icon-size}/index.js +0 -0
- /package/dist/utils/{get-utility-size-value → theme-utilities/get-utility-size-value}/get-utility-size-value.js +0 -0
- /package/dist/utils/{get-utility-size-value → theme-utilities/get-utility-size-value}/index.d.ts +0 -0
- /package/dist/utils/{get-utility-size-value → theme-utilities/get-utility-size-value}/index.js +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
import { useOutsideCloseClick } from '../../../../utils';
|
|
5
|
+
import { css, cva } from '../../../../styled-system/css';
|
|
6
|
+
import { IconButton } from '../../icon-button';
|
|
7
|
+
import { H2, H3 } from '../../../../components/typography';
|
|
8
|
+
import { useModalContext } from '../modal-context';
|
|
9
|
+
export const ModalContent = () => {
|
|
10
|
+
// Extract Properties from Context
|
|
11
|
+
const { children, size, title, footer, onClose, closeOnOverlayClick, open } = useModalContext();
|
|
12
|
+
// Manage Modal Closure
|
|
13
|
+
const modalContentRef = useRef(null);
|
|
14
|
+
useOutsideCloseClick(closeOnOverlayClick ?? true, modalContentRef, open, onClose);
|
|
15
|
+
const styles = {
|
|
16
|
+
outline: cva({
|
|
17
|
+
base: {
|
|
18
|
+
background: 'background',
|
|
19
|
+
width: '100%',
|
|
20
|
+
},
|
|
21
|
+
variants: {
|
|
22
|
+
size: {
|
|
23
|
+
sm: {
|
|
24
|
+
borderRadius: 'sm',
|
|
25
|
+
maxWidth: {
|
|
26
|
+
base: '100%',
|
|
27
|
+
md: '480px',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
md: {
|
|
31
|
+
borderRadius: 'md',
|
|
32
|
+
maxWidth: {
|
|
33
|
+
base: '100%',
|
|
34
|
+
md: '560px',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
lg: {
|
|
38
|
+
borderRadius: 'lg',
|
|
39
|
+
maxWidth: {
|
|
40
|
+
base: '100%',
|
|
41
|
+
md: '720px',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
full: {
|
|
45
|
+
borderRadius: 'none',
|
|
46
|
+
maxWidth: '100%',
|
|
47
|
+
width: '100%',
|
|
48
|
+
height: '100%',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: {
|
|
53
|
+
size: 'md',
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
56
|
+
internalContent: cva({
|
|
57
|
+
base: {
|
|
58
|
+
height: '100%',
|
|
59
|
+
width: '100%',
|
|
60
|
+
display: 'flex',
|
|
61
|
+
flexDirection: 'column',
|
|
62
|
+
padding: '2',
|
|
63
|
+
},
|
|
64
|
+
variants: {
|
|
65
|
+
size: {
|
|
66
|
+
sm: {
|
|
67
|
+
padding: '2',
|
|
68
|
+
},
|
|
69
|
+
md: {
|
|
70
|
+
padding: '4',
|
|
71
|
+
},
|
|
72
|
+
lg: {
|
|
73
|
+
padding: '6',
|
|
74
|
+
},
|
|
75
|
+
full: {
|
|
76
|
+
padding: '8',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
}),
|
|
81
|
+
modalContent: css({
|
|
82
|
+
flex: 1,
|
|
83
|
+
overflowY: 'auto',
|
|
84
|
+
}),
|
|
85
|
+
outerItems: css({
|
|
86
|
+
flexShrink: 0,
|
|
87
|
+
minHeight: '4',
|
|
88
|
+
width: '100%',
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
display: 'flex',
|
|
91
|
+
flexDirection: 'row-reverse',
|
|
92
|
+
justifyContent: 'space-between',
|
|
93
|
+
}),
|
|
94
|
+
};
|
|
95
|
+
const TitleContent = title ? (size === 'sm' ? (_jsx(H3, { inline: true, children: title })) : (_jsx(H2, { inline: true, children: title }))) : null;
|
|
96
|
+
return (_jsx("div", { className: styles.outline({ size }), ref: modalContentRef, children: _jsxs("div", { className: styles.internalContent({ size }), children: [_jsxs("div", { className: styles.outerItems, children: [_jsx(IconButton, { onClick: onClose, color: "primary", size: 'sm', name: "X" }), TitleContent] }), children, footer && _jsx("div", { className: styles.outerItems })] }) }));
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=modal-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-content.js","sourceRoot":"","sources":["../../../../../src/components/ui/modal/components/modal-content.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/modal/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-context.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/modal-context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAO,MAAO,aAAa,oDAAE,eAAe,kBAA+C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-context.js","sourceRoot":"","sources":["../../../../src/components/ui/modal/modal-context.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAGjD,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,eAAe,CAAC,GAAG,sBAAsB,CAAa,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ModalProps } from './modal.types';
|
|
2
|
+
/**
|
|
3
|
+
* Modal dialog rendered in a portal with a backdrop overlay. Supports top and center placement,
|
|
4
|
+
* scroll locking, and optional overlay-click dismissal.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <Modal open={isOpen} onClose={() => setIsOpen(false)} title="Confirm" size="md">
|
|
8
|
+
* <p>Are you sure?</p>
|
|
9
|
+
* </Modal>
|
|
10
|
+
*/
|
|
11
|
+
export declare const Modal: (props: ModalProps) => import("react").ReactPortal | undefined;
|
|
12
|
+
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/modal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,UAAU,4CAqCtC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
5
|
+
import { ModalProvider } from './modal-context';
|
|
6
|
+
import { ModalContent } from './components/modal-content';
|
|
7
|
+
import { css } from '../../../styled-system/css';
|
|
8
|
+
/**
|
|
9
|
+
* Modal dialog rendered in a portal with a backdrop overlay. Supports top and center placement,
|
|
10
|
+
* scroll locking, and optional overlay-click dismissal.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <Modal open={isOpen} onClose={() => setIsOpen(false)} title="Confirm" size="md">
|
|
14
|
+
* <p>Are you sure?</p>
|
|
15
|
+
* </Modal>
|
|
16
|
+
*/
|
|
17
|
+
export const Modal = (props) => {
|
|
18
|
+
const { open, portalTarget, preventScroll = true, placement = 'center' } = props;
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (open && preventScroll) {
|
|
21
|
+
document.body.style.overflow = 'hidden';
|
|
22
|
+
}
|
|
23
|
+
return () => {
|
|
24
|
+
document.body.style.overflow = '';
|
|
25
|
+
};
|
|
26
|
+
}, [open, preventScroll]);
|
|
27
|
+
const styles = {
|
|
28
|
+
overlay: css({
|
|
29
|
+
position: 'fixed',
|
|
30
|
+
inset: 0,
|
|
31
|
+
background: 'rgba(0, 0, 0, 0.5)',
|
|
32
|
+
display: 'flex',
|
|
33
|
+
alignItems: placement === 'top' ? 'flex-start' : 'center',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
zIndex: 50,
|
|
36
|
+
paddingTop: placement === 'top' ? '10' : '0',
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
if (open) {
|
|
40
|
+
const target = portalTarget ?? document.body;
|
|
41
|
+
return createPortal(_jsx(ModalProvider, { value: props, children: _jsx("div", { className: styles.overlay, children: _jsx(ModalContent, {}) }) }), target);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../../src/components/ui/modal/modal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAE1C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAiB,EAAE,EAAE;IAC1C,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,GAAG,IAAI,EAAE,SAAS,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEjF,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,IAAI,IAAI,aAAa,EAAE,CAAC;YAC3B,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzC,CAAC;QACD,OAAO,GAAG,EAAE;YACX,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnC,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;IAE1B,MAAM,MAAM,GAAG;QACd,OAAO,EAAE,GAAG,CAAC;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,CAAC;YACR,UAAU,EAAE,oBAAoB;YAChC,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ;YACzD,cAAc,EAAE,QAAQ;YACxB,MAAM,EAAE,EAAE;YACV,UAAU,EAAE,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG;SAC5C,CAAC;KACF,CAAC;IAEF,IAAI,IAAI,EAAE,CAAC;QACV,MAAM,MAAM,GAAG,YAAY,IAAI,QAAQ,CAAC,IAAI,CAAC;QAE7C,OAAO,YAAY,CAClB,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,YAC1B,cAAK,SAAS,EAAE,MAAM,CAAC,OAAO,YAC7B,KAAC,YAAY,KAAG,GACX,GACS,EAChB,MAAM,CACN,CAAC;IACH,CAAC;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UtilitySizeOptions } from '../../../types';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
type ModalSizeOptions = UtilitySizeOptions & 'full';
|
|
4
|
+
export type ModalProps = {
|
|
5
|
+
/** Controls whether the modal is visible */
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** Called when the modal requests to be closed */
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
/** Title rendered in the modal header */
|
|
10
|
+
title?: ReactNode;
|
|
11
|
+
/** Modal Contents */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** Content rendered in the modal footer */
|
|
14
|
+
footer?: ReactNode;
|
|
15
|
+
/** Controls the max width of the modal */
|
|
16
|
+
size?: ModalSizeOptions;
|
|
17
|
+
/** Vertical placement of the modal within the page @default `'center'` */
|
|
18
|
+
placement?: 'center' | 'top';
|
|
19
|
+
/** Close the modal when the overlay is clicked @default `true` */
|
|
20
|
+
closeOnOverlayClick?: boolean;
|
|
21
|
+
/** Prevents body scroll while the modal is open @default `true` */
|
|
22
|
+
preventScroll?: boolean;
|
|
23
|
+
/** DOM element to portal the modal into. Defaults to `document.body` */
|
|
24
|
+
portalTarget?: HTMLElement;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=modal.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/modal.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAE7C,KAAK,gBAAgB,GAAG,kBAAkB,GAAG,MAAM,CAAC;AAEpD,MAAM,MAAM,UAAU,GAAG;IACxB,4CAA4C;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,kDAAkD;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,yCAAyC;IACzC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,qBAAqB;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAE7B,kEAAkE;IAClE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mEAAmE;IACnE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wEAAwE;IACxE,YAAY,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.types.js","sourceRoot":"","sources":["../../../../src/components/ui/modal/modal.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ToggleProps } from './toggle.types';
|
|
2
|
+
/**
|
|
3
|
+
* Accessible toggle switch with a sliding knob and configurable active color.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <Toggle isOn={enabled} onToggle={() => setEnabled(!enabled)} color="primary" />
|
|
7
|
+
*/
|
|
2
8
|
export declare const Toggle: ({ isOn, onToggle, color }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export default Toggle;
|
|
4
9
|
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/toggle/toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/toggle/toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GAAI,2BAAuC,WAAW,4CA+DxE,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getUtilityColorValue } from '../../../utils';
|
|
3
3
|
import { ThreadTheme } from '../../../theme';
|
|
4
|
+
/**
|
|
5
|
+
* Accessible toggle switch with a sliding knob and configurable active color.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <Toggle isOn={enabled} onToggle={() => setEnabled(!enabled)} color="primary" />
|
|
9
|
+
*/
|
|
4
10
|
export const Toggle = ({ isOn, onToggle, color = 'success' }) => {
|
|
5
11
|
const colorValue = getUtilityColorValue(color);
|
|
6
12
|
const styles = {
|
|
@@ -52,5 +58,4 @@ export const Toggle = ({ isOn, onToggle, color = 'success' }) => {
|
|
|
52
58
|
...(isOn ? styles.knobOn : {}),
|
|
53
59
|
} })] }));
|
|
54
60
|
};
|
|
55
|
-
export default Toggle;
|
|
56
61
|
//# sourceMappingURL=toggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../../../src/components/ui/toggle/toggle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../../../src/components/ui/toggle/toggle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,GAAG,SAAS,EAAe,EAAE,EAAE;IAC5E,MAAM,UAAU,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAE/C,MAAM,MAAM,GAAkC;QAC7C,MAAM,EAAE;YACP,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,aAAa;YACtB,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM;YACb,YAAY,EAAE,QAAQ;YACtB,UAAU,EAAE,oCAAoC;YAChD,OAAO,EAAE,MAAM;SACf;QACD,QAAQ,EAAE;YACT,eAAe,EAAE,UAAU;SAC3B;QACD,SAAS,EAAE;YACV,eAAe,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI;SACtC;QACD,IAAI,EAAE;YACL,OAAO,EAAE,cAAc;YACvB,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM;YACb,eAAe,EAAE,OAAO;YACxB,YAAY,EAAE,QAAQ;YACtB,SAAS,EAAE,iBAAiB;YAC5B,UAAU,EAAE,6BAA6B;SACzC;QACD,MAAM,EAAE;YACP,SAAS,EAAE,kBAAkB;SAC7B;QACD,MAAM,EAAE;YACP,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,GAAG;YACZ,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,kBAAkB;YACxB,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,GAAG;SAChB;KACD,CAAC;IAEF,OAAO,CACN,kBACC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE;YACN,GAAG,MAAM,CAAC,MAAM;YAChB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC;SAC9C,aAED,eAAM,KAAK,EAAE,MAAM,CAAC,MAAM,YAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAQ,EACxD,eACC,KAAK,EAAE;oBACN,GAAG,MAAM,CAAC,IAAI;oBACd,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;iBAC9B,GACA,IACM,CACT,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { UtilityColorOptions } from '../../../types';
|
|
2
2
|
export type ToggleProps = {
|
|
3
|
+
/** Controlled on/off state */
|
|
3
4
|
isOn: boolean;
|
|
5
|
+
/** Called when the toggle is clicked */
|
|
4
6
|
onToggle: () => void;
|
|
7
|
+
/** Color of the track when on @default `'success'` */
|
|
5
8
|
color?: UtilityColorOptions;
|
|
6
9
|
};
|
|
7
10
|
//# sourceMappingURL=toggle.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/toggle/toggle.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC5B,CAAC"}
|
|
1
|
+
{"version":3,"file":"toggle.types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/toggle/toggle.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;IACzB,8BAA8B;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,wCAAwC;IACxC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,sDAAsD;IACtD,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC5B,CAAC"}
|