@blockle/blocks 0.19.1 → 0.20.0-alpha1.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/dist/components/accessibility/VisuallyHidden/VisuallyHidden.cjs +20 -0
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.d.ts +5 -0
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.js +20 -0
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.spec.d.ts +1 -0
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.stories.d.ts +6 -0
- package/dist/components/accessibility/VisuallyHidden/index.d.ts +1 -0
- package/dist/{styles/components/Accessibility → components/accessibility}/VisuallyHidden/visually-hidden.css.cjs +3 -2
- package/dist/components/accessibility/VisuallyHidden/visually-hidden.css.d.ts +1 -0
- package/dist/{styles/components/Accessibility/VisuallyHidden/visually-hidden.css.mjs → components/accessibility/VisuallyHidden/visually-hidden.css.js} +2 -2
- package/dist/components/display/Divider/Divider.cjs +26 -0
- package/dist/components/display/Divider/Divider.d.ts +7 -0
- package/dist/components/display/Divider/Divider.js +26 -0
- package/dist/components/display/Divider/Divider.spec.d.ts +1 -0
- package/dist/components/display/Divider/Divider.stories.d.ts +6 -0
- package/dist/{styles/components → components}/display/Divider/divider.css.cjs +4 -3
- package/dist/components/display/Divider/divider.css.d.ts +1 -0
- package/dist/{styles/components/display/Divider/divider.css.mjs → components/display/Divider/divider.css.js} +2 -2
- package/dist/components/display/Divider/index.d.ts +1 -0
- package/dist/components/feedback/Progress/Progress.cjs +54 -0
- package/dist/components/feedback/Progress/Progress.d.ts +16 -0
- package/dist/components/feedback/Progress/Progress.js +54 -0
- package/dist/components/feedback/Progress/Progress.stories.d.ts +5 -0
- package/dist/components/feedback/Progress/index.d.ts +1 -0
- package/dist/components/feedback/Spinner/Spinner.cjs +26 -0
- package/dist/components/feedback/Spinner/Spinner.d.ts +9 -0
- package/dist/components/feedback/Spinner/Spinner.js +26 -0
- package/dist/components/feedback/Spinner/Spinner.stories.d.ts +5 -0
- package/dist/components/feedback/Spinner/index.d.ts +1 -0
- package/dist/components/form/Button/Button.cjs +59 -0
- package/dist/{styles/components → components}/form/Button/Button.css.cjs +4 -3
- package/dist/components/form/Button/Button.css.d.ts +1 -0
- package/dist/{styles/components/form/Button/Button.css.mjs → components/form/Button/Button.css.js} +2 -2
- package/dist/components/form/Button/Button.d.ts +21 -0
- package/dist/{styles/components/form/Button/Button.mjs → components/form/Button/Button.js} +16 -14
- package/dist/components/form/Button/Button.spec.d.ts +1 -0
- package/dist/components/form/Button/Button.stories.d.ts +7 -0
- package/dist/components/form/Button/index.d.ts +1 -0
- package/dist/components/form/Checkbox/Checkbox.cjs +79 -0
- package/dist/components/form/Checkbox/Checkbox.d.ts +9 -0
- package/dist/components/form/Checkbox/Checkbox.js +79 -0
- package/dist/components/form/Checkbox/Checkbox.spec.d.ts +1 -0
- package/dist/components/form/Checkbox/Checkbox.stories.d.ts +5 -0
- package/dist/{styles/components → components}/form/Checkbox/checkbox.css.cjs +7 -6
- package/dist/components/form/Checkbox/checkbox.css.d.ts +3 -0
- package/dist/{styles/components/form/Checkbox/checkbox.css.mjs → components/form/Checkbox/checkbox.css.js} +4 -4
- package/dist/components/form/Checkbox/index.d.ts +1 -0
- package/dist/components/form/Input/Input.cjs +51 -0
- package/dist/components/form/Input/Input.d.ts +11 -0
- package/dist/components/form/Input/Input.js +51 -0
- package/dist/components/form/Input/Input.spec.d.ts +1 -0
- package/dist/components/form/Input/Input.stories.d.ts +5 -0
- package/dist/components/form/Input/index.d.ts +1 -0
- package/dist/{styles/components → components}/form/Input/input.css.cjs +4 -3
- package/dist/components/form/Input/input.css.d.ts +1 -0
- package/dist/{styles/components/form/Input/input.css.mjs → components/form/Input/input.css.js} +2 -2
- package/dist/components/form/Label/Label.cjs +30 -0
- package/dist/components/form/Label/Label.d.ts +18 -0
- package/dist/components/form/Label/Label.js +30 -0
- package/dist/components/form/Label/Label.spec.d.ts +1 -0
- package/dist/components/form/Label/Label.stories.d.ts +6 -0
- package/dist/components/form/Label/index.d.ts +1 -0
- package/dist/components/form/Radio/Radio.cjs +48 -0
- package/dist/components/form/Radio/Radio.d.ts +8 -0
- package/dist/components/form/Radio/Radio.js +48 -0
- package/dist/components/form/Radio/Radio.spec.d.ts +1 -0
- package/dist/components/form/Radio/Radio.stories.d.ts +6 -0
- package/dist/components/form/Radio/RadioGroup.d.ts +8 -0
- package/dist/components/form/Radio/index.d.ts +2 -0
- package/dist/{styles/components → components}/form/Radio/radio.css.cjs +7 -6
- package/dist/components/form/Radio/radio.css.d.ts +3 -0
- package/dist/{styles/components/form/Radio/radio.css.mjs → components/form/Radio/radio.css.js} +4 -4
- package/dist/components/form/Select/Select.cjs +65 -0
- package/dist/components/form/Select/Select.d.ts +10 -0
- package/dist/{styles/components/form/Select/Select.mjs → components/form/Select/Select.js} +24 -7
- package/dist/components/form/Select/Select.stories.d.ts +5 -0
- package/dist/components/form/Select/index.d.ts +1 -0
- package/dist/{styles/components → components}/form/Select/select.css.cjs +8 -7
- package/dist/components/form/Select/select.css.d.ts +3 -0
- package/dist/{styles/components/form/Select/select.css.mjs → components/form/Select/select.css.js} +4 -4
- package/dist/components/form/Slider/Slider.cjs +141 -0
- package/dist/components/form/Slider/Slider.d.ts +20 -0
- package/dist/components/form/Slider/Slider.js +141 -0
- package/dist/components/form/Slider/Slider.spec.d.ts +1 -0
- package/dist/components/form/Slider/Slider.stories.d.ts +6 -0
- package/dist/components/form/Slider/index.d.ts +1 -0
- package/dist/{styles/components → components}/form/Slider/slider.css.cjs +12 -11
- package/dist/components/form/Slider/slider.css.d.ts +5 -0
- package/dist/{styles/components/form/Slider/slider.css.mjs → components/form/Slider/slider.css.js} +6 -6
- package/dist/components/form/Slider/usePointerProgress.cjs +47 -0
- package/dist/components/form/Slider/usePointerProgress.d.ts +11 -0
- package/dist/components/form/Slider/usePointerProgress.js +47 -0
- package/dist/{styles/components → components}/form/Switch/Switch.cjs +12 -8
- package/dist/components/form/Switch/Switch.d.ts +6 -0
- package/dist/{styles/components/form/Switch/Switch.mjs → components/form/Switch/Switch.js} +9 -6
- package/dist/components/form/Switch/Switch.stories.d.ts +5 -0
- package/dist/components/form/Switch/index.d.ts +1 -0
- package/dist/{styles/components → components}/form/Switch/switch.css.cjs +6 -5
- package/dist/components/form/Switch/switch.css.d.ts +2 -0
- package/dist/{styles/components/form/Switch/switch.css.mjs → components/form/Switch/switch.css.js} +3 -3
- package/dist/components/layout/Box/Box.cjs +28 -0
- package/dist/components/layout/Box/Box.d.ts +11 -0
- package/dist/components/layout/Box/Box.js +28 -0
- package/dist/components/layout/Box/Box.spec.d.ts +1 -0
- package/dist/components/layout/Box/Box.stories.d.ts +6 -0
- package/dist/components/layout/Box/index.d.ts +1 -0
- package/dist/components/layout/Inline/Inline.cjs +30 -0
- package/dist/components/layout/Inline/Inline.d.ts +13 -0
- package/dist/components/layout/Inline/Inline.js +30 -0
- package/dist/components/layout/Inline/Inline.stories.d.ts +6 -0
- package/dist/components/layout/Inline/index.d.ts +1 -0
- package/dist/components/layout/Stack/Stack.cjs +30 -0
- package/dist/components/layout/Stack/Stack.d.ts +17 -0
- package/dist/components/layout/Stack/Stack.js +30 -0
- package/dist/components/layout/Stack/Stack.stories.d.ts +6 -0
- package/dist/components/layout/Stack/index.d.ts +1 -0
- package/dist/components/navigation/Link/Link.cjs +32 -0
- package/dist/components/navigation/Link/Link.d.ts +11 -0
- package/dist/components/navigation/Link/Link.js +32 -0
- package/dist/components/navigation/Link/Link.stories.d.ts +6 -0
- package/dist/components/navigation/Link/index.d.ts +1 -0
- package/dist/components/other/BlocksProvider/BlocksProvider.cjs +38 -0
- package/dist/components/other/BlocksProvider/BlocksProvider.d.ts +8 -0
- package/dist/{styles/components/other/BlocksProvider/BlocksProvider.mjs → components/other/BlocksProvider/BlocksProvider.js} +12 -6
- package/dist/components/other/BlocksProvider/context.cjs +6 -0
- package/dist/components/other/BlocksProvider/context.d.ts +4 -0
- package/dist/components/other/BlocksProvider/context.js +6 -0
- package/dist/components/other/BlocksProvider/index.d.ts +2 -0
- package/dist/components/other/Portal/Portal.cjs +8 -0
- package/dist/components/other/Portal/Portal.d.ts +5 -0
- package/dist/components/other/Portal/Portal.js +8 -0
- package/dist/components/other/Portal/index.d.ts +1 -0
- package/dist/components/overlay/Dialog/Dialog.cjs +79 -0
- package/dist/components/overlay/Dialog/Dialog.d.ts +10 -0
- package/dist/components/overlay/Dialog/Dialog.js +79 -0
- package/dist/components/overlay/Dialog/Dialog.stories.d.ts +7 -0
- package/dist/{styles/components → components}/overlay/Dialog/dialog.css.cjs +4 -3
- package/dist/components/overlay/Dialog/dialog.css.d.ts +1 -0
- package/dist/{styles/components/overlay/Dialog/dialog.css.mjs → components/overlay/Dialog/dialog.css.js} +2 -2
- package/dist/components/overlay/Dialog/dialogHelper.cjs +22 -0
- package/dist/components/overlay/Dialog/dialogHelper.d.ts +6 -0
- package/dist/components/overlay/Dialog/dialogHelper.js +22 -0
- package/dist/components/overlay/Dialog/index.d.ts +1 -0
- package/dist/components/overlay/Popover/Popover.cjs +113 -0
- package/dist/components/overlay/Popover/Popover.d.ts +12 -0
- package/dist/components/overlay/Popover/Popover.js +113 -0
- package/dist/components/overlay/Popover/Popover.stories.d.ts +5 -0
- package/dist/components/overlay/Popover/popover-utils.cjs +62 -0
- package/dist/components/overlay/Popover/popover-utils.d.ts +2 -0
- package/dist/components/overlay/Popover/popover-utils.js +62 -0
- package/dist/components/overlay/Tooltip/Tooltip.cjs +73 -0
- package/dist/components/overlay/Tooltip/Tooltip.d.ts +11 -0
- package/dist/components/overlay/Tooltip/Tooltip.js +73 -0
- package/dist/components/overlay/Tooltip/Tooltip.stories.d.ts +5 -0
- package/dist/components/overlay/Tooltip/index.d.ts +1 -0
- package/dist/components/typography/Heading/Heading.cjs +24 -0
- package/dist/components/typography/Heading/Heading.d.ts +8 -0
- package/dist/components/typography/Heading/Heading.js +24 -0
- package/dist/{styles/components → components}/typography/Heading/heading.css.cjs +4 -3
- package/dist/components/typography/Heading/heading.css.d.ts +1 -0
- package/dist/{styles/components/typography/Heading/heading.css.mjs → components/typography/Heading/heading.css.js} +2 -2
- package/dist/components/typography/Heading/heading.stories.d.ts +12 -0
- package/dist/components/typography/Heading/index.d.ts +1 -0
- package/dist/components/typography/Text/Text.cjs +21 -0
- package/dist/components/typography/Text/Text.d.ts +12 -0
- package/dist/{styles/components/typography/Text/Text.mjs → components/typography/Text/Text.js} +3 -3
- package/dist/components/typography/Text/Text.stories.d.ts +5 -0
- package/dist/components/typography/Text/index.d.ts +1 -0
- package/dist/{styles/components → components}/typography/Text/text.css.cjs +4 -3
- package/dist/components/typography/Text/text.css.d.ts +1 -0
- package/dist/{styles/components/typography/Text/text.css.mjs → components/typography/Text/text.css.js} +2 -2
- package/dist/entries/reset.d.ts +0 -0
- package/dist/entries/themes/momotaro.d.ts +1 -0
- package/dist/hooks/useClickOutside/useClickOutside.cjs +24 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +6 -0
- package/dist/hooks/useClickOutside/useClickOutside.js +24 -0
- package/dist/hooks/useControlledValue/useControlledValue.cjs +33 -0
- package/dist/hooks/useControlledValue/useControlledValue.d.ts +8 -0
- package/dist/hooks/useControlledValue/useControlledValue.js +33 -0
- package/dist/hooks/useFocusLock/index.d.ts +1 -0
- package/dist/hooks/useFocusLock/useFocusLock.d.ts +6 -0
- package/dist/hooks/useIsomorphicLayoutEffect/index.d.ts +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs +6 -0
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +5 -0
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +6 -0
- package/dist/hooks/useKeyboard/index.d.ts +1 -0
- package/dist/hooks/useKeyboard/useKeyboard.cjs +21 -0
- package/dist/hooks/useKeyboard/useKeyboard.d.ts +6 -0
- package/dist/hooks/useKeyboard/useKeyboard.js +21 -0
- package/dist/hooks/useLayer/index.d.ts +1 -0
- package/dist/hooks/useLayer/useLayer.cjs +27 -0
- package/dist/hooks/useLayer/useLayer.d.ts +1 -0
- package/dist/hooks/useLayer/useLayer.js +27 -0
- package/dist/hooks/usePreventBodyScroll/index.d.ts +1 -0
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.cjs +30 -0
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.d.ts +1 -0
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.js +30 -0
- package/dist/hooks/useRestoreFocus/index.d.ts +1 -0
- package/dist/hooks/useRestoreFocus/useRestoreFocus.cjs +19 -0
- package/dist/hooks/useRestoreFocus/useRestoreFocus.d.ts +4 -0
- package/dist/hooks/useRestoreFocus/useRestoreFocus.js +19 -0
- package/dist/hooks/useRootAriaHidden/index.d.ts +1 -0
- package/dist/hooks/useRootAriaHidden/useRootAriaHidden.cjs +12 -0
- package/dist/hooks/useRootAriaHidden/useRootAriaHidden.d.ts +7 -0
- package/dist/hooks/useRootAriaHidden/useRootAriaHidden.js +12 -0
- package/dist/hooks/useVisibilityState/index.d.ts +1 -0
- package/dist/hooks/useVisibilityState/useVisibilityState.cjs +17 -0
- package/dist/hooks/useVisibilityState/useVisibilityState.d.ts +3 -0
- package/dist/hooks/useVisibilityState/useVisibilityState.js +17 -0
- package/dist/index.cjs +71 -444
- package/dist/index.d.ts +36 -1
- package/dist/index.js +73 -0
- package/dist/lib/asChildRenderer/createAsChildTemplate.cjs +73 -0
- package/dist/lib/asChildRenderer/createAsChildTemplate.d.ts +34 -0
- package/dist/lib/asChildRenderer/createAsChildTemplate.js +73 -0
- package/dist/lib/asChildRenderer/createAsChildTemplate.spec.d.ts +1 -0
- package/dist/lib/css/atoms/atomTypes.d.ts +37 -0
- package/dist/{styles/lib → lib}/css/atoms/atomicProperties.cjs +29 -22
- package/dist/lib/css/atoms/atomicProperties.d.ts +286 -0
- package/dist/{styles/lib/css/atoms/atomicProperties.mjs → lib/css/atoms/atomicProperties.js} +8 -2
- package/dist/lib/css/atoms/atoms.d.ts +1 -0
- package/dist/{styles/lib → lib}/css/atoms/breakpoints.cjs +2 -0
- package/dist/lib/css/atoms/breakpoints.d.ts +9 -0
- package/dist/{styles/lib/css/atoms/breakpoints.mjs → lib/css/atoms/breakpoints.js} +1 -0
- package/dist/lib/css/atoms/index.d.ts +2 -0
- package/dist/lib/css/atoms/sprinkles.css.cjs +52 -0
- package/dist/lib/css/atoms/sprinkles.css.d.ts +233 -0
- package/dist/{styles/lib/css/atoms/sprinkles.css.mjs → lib/css/atoms/sprinkles.css.js} +18 -5
- package/dist/lib/css/flexbox/flexbox.cjs +17 -0
- package/dist/lib/css/flexbox/flexbox.d.ts +15 -0
- package/dist/lib/css/flexbox/flexbox.js +17 -0
- package/dist/{styles/lib → lib}/css/layers/layers.css.cjs +1 -0
- package/dist/lib/css/layers/layers.css.d.ts +1 -0
- package/dist/lib/css/reset/reset.css.d.ts +1 -0
- package/dist/{styles/lib → lib}/css/style/style.cjs +4 -3
- package/dist/lib/css/style/style.d.ts +12 -0
- package/dist/{styles/lib/css/style/style.mjs → lib/css/style/style.js} +1 -1
- package/dist/{styles/lib → lib}/css/utils/cssUtils.cjs +1 -0
- package/dist/lib/css/utils/cssUtils.d.ts +1 -0
- package/dist/lib/react/mergeProps.cjs +43 -0
- package/dist/lib/react/mergeProps.d.ts +4 -0
- package/dist/lib/react/mergeProps.js +43 -0
- package/dist/lib/react/refs.cjs +17 -0
- package/dist/lib/react/refs.d.ts +3 -0
- package/dist/lib/react/refs.js +17 -0
- package/dist/lib/theme/componentThemes.d.ts +134 -0
- package/dist/{styles/lib → lib}/theme/makeComponentTheme.cjs +1 -0
- package/dist/lib/theme/makeComponentTheme.d.ts +49 -0
- package/dist/lib/theme/makeTheme.cjs +13 -0
- package/dist/lib/theme/makeTheme.d.ts +14 -0
- package/dist/{styles/lib/theme/makeTheme.mjs → lib/theme/makeTheme.js} +2 -2
- package/dist/{styles/lib → lib}/theme/makeVanillaTheme.cjs +1 -0
- package/dist/lib/theme/makeVanillaTheme.d.ts +16 -0
- package/dist/lib/theme/store/theme.cjs +93 -0
- package/dist/lib/theme/store/theme.d.ts +13 -0
- package/dist/lib/theme/store/theme.js +93 -0
- package/dist/{styles/lib → lib}/theme/tokens.cjs +1 -0
- package/dist/lib/theme/tokens.d.ts +2 -0
- package/dist/lib/theme/tokensType.d.ts +33 -0
- package/dist/lib/theme/vars.css.cjs +10 -0
- package/dist/lib/theme/vars.css.d.ts +75 -0
- package/dist/{styles/lib/theme/vars.css.mjs → lib/theme/vars.css.js} +2 -2
- package/dist/{styles/lib → lib}/utils/atom-props.cjs +3 -2
- package/dist/lib/utils/atom-props.d.ts +4 -0
- package/dist/{styles/lib/utils/atom-props.mjs → lib/utils/atom-props.js} +1 -1
- package/dist/lib/utils/classnames.cjs +7 -0
- package/dist/lib/utils/classnames.d.ts +3 -0
- package/dist/lib/utils/classnames.js +7 -0
- package/dist/lib/utils/dom-focus.d.ts +2 -0
- package/dist/lib/utils/dom.cjs +13 -0
- package/dist/lib/utils/dom.d.ts +4 -0
- package/dist/lib/utils/dom.js +13 -0
- package/dist/lib/utils/helpers.d.ts +9 -0
- package/dist/lib/utils/math.cjs +13 -0
- package/dist/lib/utils/math.d.ts +2 -0
- package/dist/lib/utils/math.js +13 -0
- package/dist/lib/utils/utils.d.ts +3 -0
- package/dist/reset.cjs +2 -2
- package/dist/reset.js +2 -0
- package/dist/themes/momotaro/components/button.css.cjs +110 -0
- package/dist/themes/momotaro/components/button.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/button.css.mjs → themes/momotaro/components/button.css.js} +45 -39
- package/dist/themes/momotaro/components/checkbox.css.cjs +64 -0
- package/dist/themes/momotaro/components/checkbox.css.d.ts +1 -0
- package/dist/themes/momotaro/components/checkbox.css.js +64 -0
- package/dist/themes/momotaro/components/dialog.css.cjs +82 -0
- package/dist/themes/momotaro/components/dialog.css.d.ts +1 -0
- package/dist/themes/momotaro/components/dialog.css.js +82 -0
- package/dist/{styles/themes → themes}/momotaro/components/divider.css.cjs +4 -3
- package/dist/themes/momotaro/components/divider.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/divider.css.mjs → themes/momotaro/components/divider.css.js} +2 -2
- package/dist/{styles/themes → themes}/momotaro/components/helpers.css.cjs +13 -9
- package/dist/themes/momotaro/components/helpers.css.d.ts +8 -0
- package/dist/{styles/themes/momotaro/components/helpers.css.mjs → themes/momotaro/components/helpers.css.js} +10 -7
- package/dist/themes/momotaro/components/index.cjs +35 -0
- package/dist/themes/momotaro/components/index.d.ts +2 -0
- package/dist/themes/momotaro/components/index.js +35 -0
- package/dist/themes/momotaro/components/input.css.cjs +48 -0
- package/dist/themes/momotaro/components/input.css.d.ts +1 -0
- package/dist/themes/momotaro/components/input.css.js +48 -0
- package/dist/themes/momotaro/components/label.css.cjs +34 -0
- package/dist/themes/momotaro/components/label.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/label.css.mjs → themes/momotaro/components/label.css.js} +7 -7
- package/dist/themes/momotaro/components/link.css.cjs +57 -0
- package/dist/themes/momotaro/components/link.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/link.css.mjs → themes/momotaro/components/link.css.js} +27 -24
- package/dist/{styles/themes → themes}/momotaro/components/popover.css.cjs +5 -4
- package/dist/themes/momotaro/components/popover.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/popover.css.mjs → themes/momotaro/components/popover.css.js} +2 -2
- package/dist/{styles/themes → themes}/momotaro/components/progress.css.cjs +22 -18
- package/dist/themes/momotaro/components/progress.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/progress.css.mjs → themes/momotaro/components/progress.css.js} +18 -15
- package/dist/themes/momotaro/components/radio.css.cjs +65 -0
- package/dist/themes/momotaro/components/radio.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/radio.css.mjs → themes/momotaro/components/radio.css.js} +31 -27
- package/dist/themes/momotaro/components/select.css.cjs +48 -0
- package/dist/themes/momotaro/components/select.css.d.ts +1 -0
- package/dist/themes/momotaro/components/select.css.js +48 -0
- package/dist/themes/momotaro/components/slider.css.cjs +93 -0
- package/dist/themes/momotaro/components/slider.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/slider.css.mjs → themes/momotaro/components/slider.css.js} +31 -28
- package/dist/{styles/themes → themes}/momotaro/components/spinner.css.cjs +8 -7
- package/dist/themes/momotaro/components/spinner.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/spinner.css.mjs → themes/momotaro/components/spinner.css.js} +6 -6
- package/dist/themes/momotaro/components/switch.css.cjs +62 -0
- package/dist/themes/momotaro/components/switch.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/switch.css.mjs → themes/momotaro/components/switch.css.js} +31 -28
- package/dist/{styles/themes → themes}/momotaro/components/tooltip.css.cjs +7 -6
- package/dist/themes/momotaro/components/tooltip.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/components/tooltip.css.mjs → themes/momotaro/components/tooltip.css.js} +2 -2
- package/dist/{styles/themes → themes}/momotaro/components/transitions.cjs +1 -0
- package/dist/themes/momotaro/components/transitions.d.ts +1 -0
- package/dist/themes/momotaro/index.d.ts +1 -0
- package/dist/themes/momotaro/momotaro.css.cjs +14 -0
- package/dist/themes/momotaro/momotaro.css.d.ts +1 -0
- package/dist/{styles/themes/momotaro/momotaro.css.mjs → themes/momotaro/momotaro.css.js} +3 -3
- package/dist/{styles/themes → themes}/momotaro/tokens.css.cjs +12 -11
- package/dist/themes/momotaro/tokens.css.d.ts +2 -0
- package/dist/{styles/themes/momotaro/tokens.css.mjs → themes/momotaro/tokens.css.js} +1 -1
- package/dist/themes/momotaro.cjs +2 -2
- package/dist/themes/momotaro.js +4 -0
- package/package.json +17 -28
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +0 -451
- package/dist/momotaro.chunk.d.ts +0 -922
- package/dist/reset.d.mts +0 -2
- package/dist/reset.d.ts +0 -2
- package/dist/reset.mjs +0 -2
- package/dist/styles/components/Accessibility/VisuallyHidden/VisuallyHidden.cjs +0 -16
- package/dist/styles/components/Accessibility/VisuallyHidden/VisuallyHidden.mjs +0 -17
- package/dist/styles/components/display/Divider/Divider.cjs +0 -239
- package/dist/styles/components/display/Divider/Divider.mjs +0 -240
- package/dist/styles/components/form/Button/Button.cjs +0 -56
- package/dist/styles/components/form/Checkbox/Checkbox.cjs +0 -84
- package/dist/styles/components/form/Checkbox/Checkbox.mjs +0 -85
- package/dist/styles/components/form/Input/Input.cjs +0 -37
- package/dist/styles/components/form/Input/Input.mjs +0 -38
- package/dist/styles/components/form/Radio/Radio.cjs +0 -23
- package/dist/styles/components/form/Radio/Radio.mjs +0 -24
- package/dist/styles/components/form/Select/Select.cjs +0 -47
- package/dist/styles/components/form/Slider/Slider.cjs +0 -205
- package/dist/styles/components/form/Slider/Slider.mjs +0 -206
- package/dist/styles/components/other/BlocksProvider/BlocksProvider.cjs +0 -31
- package/dist/styles/components/overlay/Dialog/Dialog.cjs +0 -172
- package/dist/styles/components/overlay/Dialog/Dialog.mjs +0 -173
- package/dist/styles/components/typography/Heading/Heading.cjs +0 -15
- package/dist/styles/components/typography/Heading/Heading.mjs +0 -16
- package/dist/styles/components/typography/Text/Text.cjs +0 -20
- package/dist/styles/lib/css/atoms/atoms.cjs +0 -2
- package/dist/styles/lib/css/atoms/atoms.mjs +0 -1
- package/dist/styles/lib/css/atoms/index.cjs +0 -2
- package/dist/styles/lib/css/atoms/index.mjs +0 -1
- package/dist/styles/lib/css/atoms/sprinkles.css.cjs +0 -38
- package/dist/styles/lib/theme/makeTheme.cjs +0 -12
- package/dist/styles/lib/theme/vars.css.cjs +0 -9
- package/dist/styles/themes/momotaro/components/button.css.cjs +0 -103
- package/dist/styles/themes/momotaro/components/checkbox.css.cjs +0 -59
- package/dist/styles/themes/momotaro/components/checkbox.css.mjs +0 -60
- package/dist/styles/themes/momotaro/components/dialog.css.cjs +0 -78
- package/dist/styles/themes/momotaro/components/dialog.css.mjs +0 -79
- package/dist/styles/themes/momotaro/components/index.cjs +0 -34
- package/dist/styles/themes/momotaro/components/index.mjs +0 -35
- package/dist/styles/themes/momotaro/components/input.css.cjs +0 -41
- package/dist/styles/themes/momotaro/components/input.css.mjs +0 -42
- package/dist/styles/themes/momotaro/components/label.css.cjs +0 -33
- package/dist/styles/themes/momotaro/components/link.css.cjs +0 -53
- package/dist/styles/themes/momotaro/components/radio.css.cjs +0 -60
- package/dist/styles/themes/momotaro/components/select.css.cjs +0 -44
- package/dist/styles/themes/momotaro/components/select.css.mjs +0 -45
- package/dist/styles/themes/momotaro/components/slider.css.cjs +0 -89
- package/dist/styles/themes/momotaro/components/switch.css.cjs +0 -58
- package/dist/styles/themes/momotaro/index.cjs +0 -2
- package/dist/styles/themes/momotaro/index.mjs +0 -1
- package/dist/styles/themes/momotaro/momotaro.css.cjs +0 -13
- package/dist/themes/momotaro.d.mts +0 -1
- package/dist/themes/momotaro.d.ts +0 -1
- package/dist/themes/momotaro.mjs +0 -4
- package/reset/index.d.ts +0 -1
- package/reset/package.json +0 -5
- /package/dist/{styles/lib/css/layers/layers.css.mjs → lib/css/layers/layers.css.js} +0 -0
- /package/dist/{styles/lib → lib}/css/reset/reset.css.cjs +0 -0
- /package/dist/{styles/lib/css/reset/reset.css.mjs → lib/css/reset/reset.css.js} +0 -0
- /package/dist/{styles/lib/css/utils/cssUtils.mjs → lib/css/utils/cssUtils.js} +0 -0
- /package/dist/{styles/lib/theme/makeComponentTheme.mjs → lib/theme/makeComponentTheme.js} +0 -0
- /package/dist/{styles/lib/theme/makeVanillaTheme.mjs → lib/theme/makeVanillaTheme.js} +0 -0
- /package/dist/{styles/lib/theme/tokens.mjs → lib/theme/tokens.js} +0 -0
- /package/dist/{styles/themes/momotaro/components/transitions.mjs → themes/momotaro/components/transitions.js} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const theme = require("../../../lib/theme/store/theme.cjs");
|
|
6
|
+
const classnames = require("../../../lib/utils/classnames.cjs");
|
|
7
|
+
const Label = require("../Label/Label.cjs");
|
|
8
|
+
const checkbox_css = require("./checkbox.css.cjs");
|
|
9
|
+
const Checkbox = ({
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
id,
|
|
13
|
+
name,
|
|
14
|
+
ref,
|
|
15
|
+
required,
|
|
16
|
+
...restProps
|
|
17
|
+
}) => {
|
|
18
|
+
const containerClassName = theme.getComponentStyles(
|
|
19
|
+
"checkbox",
|
|
20
|
+
{ base: true },
|
|
21
|
+
false
|
|
22
|
+
);
|
|
23
|
+
const iconClassName = theme.getComponentStyles("checkbox", { icon: true }, false);
|
|
24
|
+
const labelClassName = theme.getComponentStyles("checkbox", { label: true }, false);
|
|
25
|
+
const reactId = react.useId();
|
|
26
|
+
const inputId = id || reactId;
|
|
27
|
+
const input = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: classnames.classnames(checkbox_css.container, containerClassName, className),
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33
|
+
"input",
|
|
34
|
+
{
|
|
35
|
+
ref,
|
|
36
|
+
type: "checkbox",
|
|
37
|
+
name,
|
|
38
|
+
id: inputId,
|
|
39
|
+
className: checkbox_css.input,
|
|
40
|
+
...restProps
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classnames.classnames(checkbox_css.icon, iconClassName), "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, {}) })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
if (!children) {
|
|
48
|
+
return input;
|
|
49
|
+
}
|
|
50
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: labelClassName, children: [
|
|
51
|
+
input,
|
|
52
|
+
children && /* @__PURE__ */ jsxRuntime.jsx(Label.Label, { required, htmlFor: inputId, children })
|
|
53
|
+
] });
|
|
54
|
+
};
|
|
55
|
+
const DefaultIcon = () => {
|
|
56
|
+
return (
|
|
57
|
+
// TOOD - replace with actual icon component renderer
|
|
58
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: <explanation>
|
|
59
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
"svg",
|
|
61
|
+
{
|
|
62
|
+
viewBox: "0 0 24 24",
|
|
63
|
+
fill: "none",
|
|
64
|
+
strokeWidth: "1.5",
|
|
65
|
+
stroke: "currentColor",
|
|
66
|
+
style: { width: "1rem", height: "1rem", display: "block" },
|
|
67
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
68
|
+
"path",
|
|
69
|
+
{
|
|
70
|
+
strokeLinecap: "round",
|
|
71
|
+
strokeLinejoin: "round",
|
|
72
|
+
d: "m4.5 12.75 6 6 9-13.5"
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
exports.Checkbox = Checkbox;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { HTMLElementProps } from '../../../lib/utils/utils';
|
|
3
|
+
export type CheckboxProps = {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
name: string;
|
|
6
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
} & HTMLElementProps<HTMLInputElement>;
|
|
9
|
+
export declare const Checkbox: React.FC<CheckboxProps>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { getComponentStyles } from "../../../lib/theme/store/theme.js";
|
|
4
|
+
import { classnames } from "../../../lib/utils/classnames.js";
|
|
5
|
+
import { Label } from "../Label/Label.js";
|
|
6
|
+
import { input, icon, container } from "./checkbox.css.js";
|
|
7
|
+
const Checkbox = ({
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
id,
|
|
11
|
+
name,
|
|
12
|
+
ref,
|
|
13
|
+
required,
|
|
14
|
+
...restProps
|
|
15
|
+
}) => {
|
|
16
|
+
const containerClassName = getComponentStyles(
|
|
17
|
+
"checkbox",
|
|
18
|
+
{ base: true },
|
|
19
|
+
false
|
|
20
|
+
);
|
|
21
|
+
const iconClassName = getComponentStyles("checkbox", { icon: true }, false);
|
|
22
|
+
const labelClassName = getComponentStyles("checkbox", { label: true }, false);
|
|
23
|
+
const reactId = useId();
|
|
24
|
+
const inputId = id || reactId;
|
|
25
|
+
const input$1 = /* @__PURE__ */ jsxs(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: classnames(container, containerClassName, className),
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
31
|
+
"input",
|
|
32
|
+
{
|
|
33
|
+
ref,
|
|
34
|
+
type: "checkbox",
|
|
35
|
+
name,
|
|
36
|
+
id: inputId,
|
|
37
|
+
className: input,
|
|
38
|
+
...restProps
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: classnames(icon, iconClassName), "aria-hidden": true, children: /* @__PURE__ */ jsx(DefaultIcon, {}) })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
if (!children) {
|
|
46
|
+
return input$1;
|
|
47
|
+
}
|
|
48
|
+
return /* @__PURE__ */ jsxs("span", { className: labelClassName, children: [
|
|
49
|
+
input$1,
|
|
50
|
+
children && /* @__PURE__ */ jsx(Label, { required, htmlFor: inputId, children })
|
|
51
|
+
] });
|
|
52
|
+
};
|
|
53
|
+
const DefaultIcon = () => {
|
|
54
|
+
return (
|
|
55
|
+
// TOOD - replace with actual icon component renderer
|
|
56
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: <explanation>
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
"svg",
|
|
59
|
+
{
|
|
60
|
+
viewBox: "0 0 24 24",
|
|
61
|
+
fill: "none",
|
|
62
|
+
strokeWidth: "1.5",
|
|
63
|
+
stroke: "currentColor",
|
|
64
|
+
style: { width: "1rem", height: "1rem", display: "block" },
|
|
65
|
+
children: /* @__PURE__ */ jsx(
|
|
66
|
+
"path",
|
|
67
|
+
{
|
|
68
|
+
strokeLinecap: "round",
|
|
69
|
+
strokeLinejoin: "round",
|
|
70
|
+
d: "m4.5 12.75 6 6 9-13.5"
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
Checkbox
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
3
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
4
|
const css = require("@vanilla-extract/css");
|
|
4
|
-
const
|
|
5
|
+
const layers_css = require("../../../lib/css/layers/layers.css.cjs");
|
|
5
6
|
fileScope.setFileScope("src/components/form/Checkbox/checkbox.css.ts", "@blockle/blocks");
|
|
6
7
|
const container = css.style({
|
|
7
8
|
"@layer": {
|
|
8
|
-
[
|
|
9
|
+
[layers_css.blocksLayer]: {
|
|
9
10
|
position: "relative",
|
|
10
11
|
cursor: "pointer",
|
|
11
12
|
overflow: "hidden"
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
|
-
}
|
|
15
|
+
});
|
|
15
16
|
const input = css.style({
|
|
16
17
|
position: "absolute",
|
|
17
18
|
inset: 0,
|
|
18
19
|
opacity: 0,
|
|
19
20
|
"@layer": {
|
|
20
|
-
[
|
|
21
|
+
[layers_css.blocksLayer]: {
|
|
21
22
|
all: "unset"
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
}
|
|
25
|
+
});
|
|
25
26
|
const icon = css.style({
|
|
26
27
|
pointerEvents: "none"
|
|
27
|
-
}
|
|
28
|
+
});
|
|
28
29
|
fileScope.endFileScope();
|
|
29
30
|
exports.container = container;
|
|
30
31
|
exports.icon = icon;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import { blocksLayer } from "../../../lib/css/layers/layers.css.
|
|
3
|
+
import { blocksLayer } from "../../../lib/css/layers/layers.css.js";
|
|
4
4
|
setFileScope("src/components/form/Checkbox/checkbox.css.ts", "@blockle/blocks");
|
|
5
5
|
const container = style({
|
|
6
6
|
"@layer": {
|
|
@@ -10,7 +10,7 @@ const container = style({
|
|
|
10
10
|
overflow: "hidden"
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
}
|
|
13
|
+
});
|
|
14
14
|
const input = style({
|
|
15
15
|
position: "absolute",
|
|
16
16
|
inset: 0,
|
|
@@ -20,10 +20,10 @@ const input = style({
|
|
|
20
20
|
all: "unset"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
}
|
|
23
|
+
});
|
|
24
24
|
const icon = style({
|
|
25
25
|
pointerEvents: "none"
|
|
26
|
-
}
|
|
26
|
+
});
|
|
27
27
|
endFileScope();
|
|
28
28
|
export {
|
|
29
29
|
container,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Checkbox, type CheckboxProps } from './Checkbox';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const theme = require("../../../lib/theme/store/theme.cjs");
|
|
6
|
+
const classnames = require("../../../lib/utils/classnames.cjs");
|
|
7
|
+
const input_css = require("./input.css.cjs");
|
|
8
|
+
const Box = require("../../layout/Box/Box.cjs");
|
|
9
|
+
const Input = ({
|
|
10
|
+
className,
|
|
11
|
+
endSlot,
|
|
12
|
+
name,
|
|
13
|
+
placeholder,
|
|
14
|
+
ref,
|
|
15
|
+
startSlot,
|
|
16
|
+
type = "text",
|
|
17
|
+
...restProps
|
|
18
|
+
}) => {
|
|
19
|
+
const id = react.useId();
|
|
20
|
+
const containerClassName = theme.getComponentStyles(
|
|
21
|
+
"input",
|
|
22
|
+
{ container: true },
|
|
23
|
+
false
|
|
24
|
+
);
|
|
25
|
+
const inputClassName = theme.getComponentStyles("input", { input: true });
|
|
26
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27
|
+
Box.Box,
|
|
28
|
+
{
|
|
29
|
+
display: "flex",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
className: classnames.classnames(containerClassName, className),
|
|
32
|
+
children: [
|
|
33
|
+
startSlot,
|
|
34
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35
|
+
"input",
|
|
36
|
+
{
|
|
37
|
+
id,
|
|
38
|
+
ref,
|
|
39
|
+
name,
|
|
40
|
+
type,
|
|
41
|
+
placeholder,
|
|
42
|
+
className: classnames.classnames(input_css.input, inputClassName),
|
|
43
|
+
...restProps
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
endSlot
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
) });
|
|
50
|
+
};
|
|
51
|
+
exports.Input = Input;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OptionalLiteral } from '../../../lib/utils/helpers';
|
|
2
|
+
import { HTMLElementProps } from '../../../lib/utils/utils';
|
|
3
|
+
export type InputProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
endSlot?: React.ReactNode;
|
|
6
|
+
name: string;
|
|
7
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
8
|
+
startSlot?: React.ReactNode;
|
|
9
|
+
type?: OptionalLiteral<'email' | 'number' | 'password' | 'tel' | 'text' | 'url'>;
|
|
10
|
+
} & Omit<HTMLElementProps<HTMLInputElement>, 'type'>;
|
|
11
|
+
export declare const Input: React.FC<InputProps>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { getComponentStyles } from "../../../lib/theme/store/theme.js";
|
|
4
|
+
import { classnames } from "../../../lib/utils/classnames.js";
|
|
5
|
+
import { input } from "./input.css.js";
|
|
6
|
+
import { Box } from "../../layout/Box/Box.js";
|
|
7
|
+
const Input = ({
|
|
8
|
+
className,
|
|
9
|
+
endSlot,
|
|
10
|
+
name,
|
|
11
|
+
placeholder,
|
|
12
|
+
ref,
|
|
13
|
+
startSlot,
|
|
14
|
+
type = "text",
|
|
15
|
+
...restProps
|
|
16
|
+
}) => {
|
|
17
|
+
const id = useId();
|
|
18
|
+
const containerClassName = getComponentStyles(
|
|
19
|
+
"input",
|
|
20
|
+
{ container: true },
|
|
21
|
+
false
|
|
22
|
+
);
|
|
23
|
+
const inputClassName = getComponentStyles("input", { input: true });
|
|
24
|
+
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(
|
|
25
|
+
Box,
|
|
26
|
+
{
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
className: classnames(containerClassName, className),
|
|
30
|
+
children: [
|
|
31
|
+
startSlot,
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
"input",
|
|
34
|
+
{
|
|
35
|
+
id,
|
|
36
|
+
ref,
|
|
37
|
+
name,
|
|
38
|
+
type,
|
|
39
|
+
placeholder,
|
|
40
|
+
className: classnames(input, inputClassName),
|
|
41
|
+
...restProps
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
endSlot
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
) });
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
Input
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Input, type InputProps } from './Input';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
3
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
4
|
const css = require("@vanilla-extract/css");
|
|
4
|
-
const
|
|
5
|
+
const layers_css = require("../../../lib/css/layers/layers.css.cjs");
|
|
5
6
|
fileScope.setFileScope("src/components/form/Input/input.css.ts", "@blockle/blocks");
|
|
6
7
|
const input = css.style({
|
|
7
8
|
"@layer": {
|
|
8
|
-
[
|
|
9
|
+
[layers_css.blocksLayer]: {
|
|
9
10
|
appearance: "none",
|
|
10
11
|
width: "100%",
|
|
11
12
|
selectors: {
|
|
@@ -15,6 +16,6 @@ const input = css.style({
|
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
}
|
|
19
|
+
});
|
|
19
20
|
fileScope.endFileScope();
|
|
20
21
|
exports.input = input;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const input: string;
|
package/dist/{styles/components/form/Input/input.css.mjs → components/form/Input/input.css.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import { blocksLayer } from "../../../lib/css/layers/layers.css.
|
|
3
|
+
import { blocksLayer } from "../../../lib/css/layers/layers.css.js";
|
|
4
4
|
setFileScope("src/components/form/Input/input.css.ts", "@blockle/blocks");
|
|
5
5
|
const input = style({
|
|
6
6
|
"@layer": {
|
|
@@ -14,7 +14,7 @@ const input = style({
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
}
|
|
17
|
+
});
|
|
18
18
|
endFileScope();
|
|
19
19
|
export {
|
|
20
20
|
input
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const theme = require("../../../lib/theme/store/theme.cjs");
|
|
5
|
+
const classnames = require("../../../lib/utils/classnames.cjs");
|
|
6
|
+
const sprinkles_css = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
7
|
+
const Label = ({
|
|
8
|
+
asSpan,
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
required,
|
|
12
|
+
size,
|
|
13
|
+
cursor,
|
|
14
|
+
...restProps
|
|
15
|
+
}) => {
|
|
16
|
+
const Component = asSpan ? "span" : "label";
|
|
17
|
+
const containerClassName = theme.getComponentStyles("label", {
|
|
18
|
+
base: true,
|
|
19
|
+
variants: { required, size }
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
+
Component,
|
|
23
|
+
{
|
|
24
|
+
className: classnames.classnames(containerClassName, className, sprinkles_css.atoms({ cursor })),
|
|
25
|
+
...restProps,
|
|
26
|
+
children
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
exports.Label = Label;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Atoms } from '../../../lib/css/atoms';
|
|
2
|
+
import { LabelTheme } from '../../../lib/theme/componentThemes';
|
|
3
|
+
import { HTMLElementProps } from '../../../lib/utils/utils';
|
|
4
|
+
export type LabelProps = {
|
|
5
|
+
/**
|
|
6
|
+
* If true, the label will be rendered as a span element
|
|
7
|
+
* but will still have the same styles as a label.
|
|
8
|
+
* Useful for when you want to use a label element but
|
|
9
|
+
* can't because of the parent element's structure.
|
|
10
|
+
*/
|
|
11
|
+
asSpan?: boolean;
|
|
12
|
+
htmlFor?: string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
size?: LabelTheme['variants']['size'];
|
|
16
|
+
cursor?: Atoms['cursor'];
|
|
17
|
+
} & HTMLElementProps<HTMLLabelElement>;
|
|
18
|
+
export declare const Label: React.FC<LabelProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getComponentStyles } from "../../../lib/theme/store/theme.js";
|
|
3
|
+
import { classnames } from "../../../lib/utils/classnames.js";
|
|
4
|
+
import { atoms } from "../../../lib/css/atoms/sprinkles.css.js";
|
|
5
|
+
const Label = ({
|
|
6
|
+
asSpan,
|
|
7
|
+
children,
|
|
8
|
+
className,
|
|
9
|
+
required,
|
|
10
|
+
size,
|
|
11
|
+
cursor,
|
|
12
|
+
...restProps
|
|
13
|
+
}) => {
|
|
14
|
+
const Component = asSpan ? "span" : "label";
|
|
15
|
+
const containerClassName = getComponentStyles("label", {
|
|
16
|
+
base: true,
|
|
17
|
+
variants: { required, size }
|
|
18
|
+
});
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
Component,
|
|
21
|
+
{
|
|
22
|
+
className: classnames(containerClassName, className, atoms({ cursor })),
|
|
23
|
+
...restProps,
|
|
24
|
+
children
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
Label
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Label, type LabelProps } from './Label';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const theme = require("../../../lib/theme/store/theme.cjs");
|
|
5
|
+
const classnames = require("../../../lib/utils/classnames.cjs");
|
|
6
|
+
const radio_css = require("./radio.css.cjs");
|
|
7
|
+
const Label = require("../Label/Label.cjs");
|
|
8
|
+
const Radio = ({
|
|
9
|
+
name,
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
ref,
|
|
13
|
+
...restProps
|
|
14
|
+
}) => {
|
|
15
|
+
const containerClassName = theme.getComponentStyles("radio", { base: true }, false);
|
|
16
|
+
const iconClassName = theme.getComponentStyles("radio", { icon: true }, false);
|
|
17
|
+
const labelClassName = theme.getComponentStyles("checkbox", { label: true }, false);
|
|
18
|
+
const input = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: classnames.classnames(radio_css.container, containerClassName, className),
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24
|
+
"input",
|
|
25
|
+
{
|
|
26
|
+
ref,
|
|
27
|
+
type: "radio",
|
|
28
|
+
name,
|
|
29
|
+
className: radio_css.input,
|
|
30
|
+
...restProps
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classnames.classnames(radio_css.icon, iconClassName) })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
if (!children) {
|
|
38
|
+
return input;
|
|
39
|
+
}
|
|
40
|
+
return (
|
|
41
|
+
// biome-ignore lint/a11y/noLabelWithoutControl: <explanation>
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: labelClassName, children: [
|
|
43
|
+
input,
|
|
44
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label.Label, { asSpan: true, children })
|
|
45
|
+
] })
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
exports.Radio = Radio;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLElementProps } from '../../../lib/utils/utils';
|
|
2
|
+
export type RadioProps = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
name: string;
|
|
5
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
6
|
+
value: string;
|
|
7
|
+
} & HTMLElementProps<HTMLInputElement>;
|
|
8
|
+
export declare const Radio: React.FC<RadioProps>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getComponentStyles } from "../../../lib/theme/store/theme.js";
|
|
3
|
+
import { classnames } from "../../../lib/utils/classnames.js";
|
|
4
|
+
import { input, icon, container } from "./radio.css.js";
|
|
5
|
+
import { Label } from "../Label/Label.js";
|
|
6
|
+
const Radio = ({
|
|
7
|
+
name,
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
ref,
|
|
11
|
+
...restProps
|
|
12
|
+
}) => {
|
|
13
|
+
const containerClassName = getComponentStyles("radio", { base: true }, false);
|
|
14
|
+
const iconClassName = getComponentStyles("radio", { icon: true }, false);
|
|
15
|
+
const labelClassName = getComponentStyles("checkbox", { label: true }, false);
|
|
16
|
+
const input$1 = /* @__PURE__ */ jsxs(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: classnames(container, containerClassName, className),
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
"input",
|
|
23
|
+
{
|
|
24
|
+
ref,
|
|
25
|
+
type: "radio",
|
|
26
|
+
name,
|
|
27
|
+
className: input,
|
|
28
|
+
...restProps
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ jsx("div", { className: classnames(icon, iconClassName) })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
if (!children) {
|
|
36
|
+
return input$1;
|
|
37
|
+
}
|
|
38
|
+
return (
|
|
39
|
+
// biome-ignore lint/a11y/noLabelWithoutControl: <explanation>
|
|
40
|
+
/* @__PURE__ */ jsxs("label", { className: labelClassName, children: [
|
|
41
|
+
input$1,
|
|
42
|
+
/* @__PURE__ */ jsx(Label, { asSpan: true, children })
|
|
43
|
+
] })
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
Radio
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|