@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,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const classnames = require("../../../lib/utils/classnames.cjs");
|
|
5
|
+
const visuallyHidden_css = require("./visually-hidden.css.cjs");
|
|
6
|
+
const VisuallyHidden = ({
|
|
7
|
+
children,
|
|
8
|
+
className,
|
|
9
|
+
...restProps
|
|
10
|
+
}) => {
|
|
11
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12
|
+
"span",
|
|
13
|
+
{
|
|
14
|
+
className: classnames.classnames(visuallyHidden_css.visuallyHidden, className),
|
|
15
|
+
...restProps,
|
|
16
|
+
children
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
exports.VisuallyHidden = VisuallyHidden;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classnames } from "../../../lib/utils/classnames.js";
|
|
3
|
+
import { visuallyHidden } from "./visually-hidden.css.js";
|
|
4
|
+
const VisuallyHidden = ({
|
|
5
|
+
children,
|
|
6
|
+
className,
|
|
7
|
+
...restProps
|
|
8
|
+
}) => {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
"span",
|
|
11
|
+
{
|
|
12
|
+
className: classnames(visuallyHidden, className),
|
|
13
|
+
...restProps,
|
|
14
|
+
children
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
VisuallyHidden
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { VisuallyHidden, VisuallyHiddenProps } from './VisuallyHidden';
|
|
3
|
+
declare const meta: Meta<typeof VisuallyHidden>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<VisuallyHiddenProps>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VisuallyHidden, type VisuallyHiddenProps } from './VisuallyHidden';
|
|
@@ -1,7 +1,8 @@
|
|
|
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
|
-
fileScope.setFileScope("src/components/
|
|
5
|
+
fileScope.setFileScope("src/components/accessibility/VisuallyHidden/visually-hidden.css.ts", "@blockle/blocks");
|
|
5
6
|
const visuallyHidden = css.style({
|
|
6
7
|
clip: "rect(0 0 0 0)",
|
|
7
8
|
clipPath: "inset(50%)",
|
|
@@ -10,6 +11,6 @@ const visuallyHidden = css.style({
|
|
|
10
11
|
position: "absolute",
|
|
11
12
|
whiteSpace: "nowrap",
|
|
12
13
|
width: "1px"
|
|
13
|
-
}
|
|
14
|
+
});
|
|
14
15
|
fileScope.endFileScope();
|
|
15
16
|
exports.visuallyHidden = visuallyHidden;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const visuallyHidden: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
|
-
setFileScope("src/components/
|
|
3
|
+
setFileScope("src/components/accessibility/VisuallyHidden/visually-hidden.css.ts", "@blockle/blocks");
|
|
4
4
|
const visuallyHidden = style({
|
|
5
5
|
clip: "rect(0 0 0 0)",
|
|
6
6
|
clipPath: "inset(50%)",
|
|
@@ -9,7 +9,7 @@ const visuallyHidden = style({
|
|
|
9
9
|
position: "absolute",
|
|
10
10
|
whiteSpace: "nowrap",
|
|
11
11
|
width: "1px"
|
|
12
|
-
}
|
|
12
|
+
});
|
|
13
13
|
endFileScope();
|
|
14
14
|
export {
|
|
15
15
|
visuallyHidden
|
|
@@ -0,0 +1,26 @@
|
|
|
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 divider_css = require("./divider.css.cjs");
|
|
7
|
+
const Box = require("../../layout/Box/Box.cjs");
|
|
8
|
+
const Divider = ({
|
|
9
|
+
className,
|
|
10
|
+
color,
|
|
11
|
+
...restProps
|
|
12
|
+
}) => {
|
|
13
|
+
const dividerClass = theme.getComponentStyles("divider", { base: true });
|
|
14
|
+
const dividerDefaults = theme.getComponentStyleDefaults("divider");
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
+
Box.Box,
|
|
17
|
+
{
|
|
18
|
+
role: "separator",
|
|
19
|
+
inlineSize: "full",
|
|
20
|
+
backgroundColor: color ?? dividerDefaults.color,
|
|
21
|
+
className: classnames.classnames(className, dividerClass, divider_css.divider),
|
|
22
|
+
...restProps
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
exports.Divider = Divider;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getComponentStyles, getComponentStyleDefaults } from "../../../lib/theme/store/theme.js";
|
|
3
|
+
import { classnames } from "../../../lib/utils/classnames.js";
|
|
4
|
+
import { divider } from "./divider.css.js";
|
|
5
|
+
import { Box } from "../../layout/Box/Box.js";
|
|
6
|
+
const Divider = ({
|
|
7
|
+
className,
|
|
8
|
+
color,
|
|
9
|
+
...restProps
|
|
10
|
+
}) => {
|
|
11
|
+
const dividerClass = getComponentStyles("divider", { base: true });
|
|
12
|
+
const dividerDefaults = getComponentStyleDefaults("divider");
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
Box,
|
|
15
|
+
{
|
|
16
|
+
role: "separator",
|
|
17
|
+
inlineSize: "full",
|
|
18
|
+
backgroundColor: color ?? dividerDefaults.color,
|
|
19
|
+
className: classnames(className, dividerClass, divider),
|
|
20
|
+
...restProps
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
Divider
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,15 +1,16 @@
|
|
|
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/display/Divider/divider.css.ts", "@blockle/blocks");
|
|
6
7
|
const divider = css.style({
|
|
7
8
|
"@layer": {
|
|
8
|
-
[
|
|
9
|
+
[layers_css.blocksLayer]: {
|
|
9
10
|
clear: "both",
|
|
10
11
|
blockSize: "1px"
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
}
|
|
14
|
+
});
|
|
14
15
|
fileScope.endFileScope();
|
|
15
16
|
exports.divider = divider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const divider: string;
|
|
@@ -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/display/Divider/divider.css.ts", "@blockle/blocks");
|
|
5
5
|
const divider = style({
|
|
6
6
|
"@layer": {
|
|
@@ -9,7 +9,7 @@ const divider = style({
|
|
|
9
9
|
blockSize: "1px"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
}
|
|
12
|
+
});
|
|
13
13
|
endFileScope();
|
|
14
14
|
export {
|
|
15
15
|
divider
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Divider, type DividerProps } from './Divider';
|
|
@@ -0,0 +1,54 @@
|
|
|
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 Box = require("../../layout/Box/Box.cjs");
|
|
7
|
+
const Progress = ({
|
|
8
|
+
className,
|
|
9
|
+
indeterminate,
|
|
10
|
+
max = 100,
|
|
11
|
+
ref,
|
|
12
|
+
value = 0,
|
|
13
|
+
...restProps
|
|
14
|
+
}) => {
|
|
15
|
+
const progress = value / max * 100;
|
|
16
|
+
const containerClassName = theme.getComponentStyles(
|
|
17
|
+
"progress",
|
|
18
|
+
{
|
|
19
|
+
base: true
|
|
20
|
+
},
|
|
21
|
+
false
|
|
22
|
+
);
|
|
23
|
+
const barClassName = theme.getComponentStyles(
|
|
24
|
+
"progress",
|
|
25
|
+
{ bar: true, variants: { indeterminate } },
|
|
26
|
+
false
|
|
27
|
+
);
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
+
Box.Box,
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
className: classnames.classnames(containerClassName, className),
|
|
33
|
+
overflow: "hidden",
|
|
34
|
+
role: "progressbar",
|
|
35
|
+
"aria-valuenow": value,
|
|
36
|
+
"aria-valuemin": 0,
|
|
37
|
+
"aria-valuemax": max,
|
|
38
|
+
...restProps,
|
|
39
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
Box.Box,
|
|
41
|
+
{
|
|
42
|
+
className: barClassName,
|
|
43
|
+
backgroundColor: "currentColor",
|
|
44
|
+
inlineSize: "full",
|
|
45
|
+
blockSize: "full",
|
|
46
|
+
style: {
|
|
47
|
+
transform: indeterminate ? void 0 : `translateX(-${100 - progress}%)`
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
exports.Progress = Progress;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ProgressProps = {
|
|
3
|
+
'aria-label'?: string;
|
|
4
|
+
'aria-labelledby'?: string;
|
|
5
|
+
'aria-valuetext'?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
max?: number;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
/**
|
|
11
|
+
* The value of the progress bar, between 0 and max=100.
|
|
12
|
+
*/
|
|
13
|
+
value?: number;
|
|
14
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
15
|
+
};
|
|
16
|
+
export declare const Progress: React.FC<ProgressProps>;
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { Box } from "../../layout/Box/Box.js";
|
|
5
|
+
const Progress = ({
|
|
6
|
+
className,
|
|
7
|
+
indeterminate,
|
|
8
|
+
max = 100,
|
|
9
|
+
ref,
|
|
10
|
+
value = 0,
|
|
11
|
+
...restProps
|
|
12
|
+
}) => {
|
|
13
|
+
const progress = value / max * 100;
|
|
14
|
+
const containerClassName = getComponentStyles(
|
|
15
|
+
"progress",
|
|
16
|
+
{
|
|
17
|
+
base: true
|
|
18
|
+
},
|
|
19
|
+
false
|
|
20
|
+
);
|
|
21
|
+
const barClassName = getComponentStyles(
|
|
22
|
+
"progress",
|
|
23
|
+
{ bar: true, variants: { indeterminate } },
|
|
24
|
+
false
|
|
25
|
+
);
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
Box,
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
className: classnames(containerClassName, className),
|
|
31
|
+
overflow: "hidden",
|
|
32
|
+
role: "progressbar",
|
|
33
|
+
"aria-valuenow": value,
|
|
34
|
+
"aria-valuemin": 0,
|
|
35
|
+
"aria-valuemax": max,
|
|
36
|
+
...restProps,
|
|
37
|
+
children: /* @__PURE__ */ jsx(
|
|
38
|
+
Box,
|
|
39
|
+
{
|
|
40
|
+
className: barClassName,
|
|
41
|
+
backgroundColor: "currentColor",
|
|
42
|
+
inlineSize: "full",
|
|
43
|
+
blockSize: "full",
|
|
44
|
+
style: {
|
|
45
|
+
transform: indeterminate ? void 0 : `translateX(-${100 - progress}%)`
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
Progress
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Progress, type ProgressProps } from './Progress';
|
|
@@ -0,0 +1,26 @@
|
|
|
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 Box = require("../../layout/Box/Box.cjs");
|
|
7
|
+
const Spinner = ({
|
|
8
|
+
className,
|
|
9
|
+
size,
|
|
10
|
+
color,
|
|
11
|
+
...restProps
|
|
12
|
+
}) => {
|
|
13
|
+
const spinnerClassName = theme.getComponentStyles("spinner", {
|
|
14
|
+
base: true,
|
|
15
|
+
variants: { size, color }
|
|
16
|
+
});
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18
|
+
Box.Box,
|
|
19
|
+
{
|
|
20
|
+
color,
|
|
21
|
+
className: classnames.classnames(spinnerClassName, className),
|
|
22
|
+
...restProps
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
exports.Spinner = Spinner;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MarginAtoms } from '../../../lib/css/atoms';
|
|
2
|
+
import { SpinnerTheme } from '../../../lib/theme/componentThemes';
|
|
3
|
+
export type SpinnerProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
color?: SpinnerTheme['variants']['color'];
|
|
6
|
+
size?: SpinnerTheme['variants']['size'];
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
} & MarginAtoms;
|
|
9
|
+
export declare const Spinner: React.FC<SpinnerProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { Box } from "../../layout/Box/Box.js";
|
|
5
|
+
const Spinner = ({
|
|
6
|
+
className,
|
|
7
|
+
size,
|
|
8
|
+
color,
|
|
9
|
+
...restProps
|
|
10
|
+
}) => {
|
|
11
|
+
const spinnerClassName = getComponentStyles("spinner", {
|
|
12
|
+
base: true,
|
|
13
|
+
variants: { size, color }
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
Box,
|
|
17
|
+
{
|
|
18
|
+
color,
|
|
19
|
+
className: classnames(spinnerClassName, className),
|
|
20
|
+
...restProps
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
Spinner
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Spinner, type SpinnerProps } from './Spinner';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const createAsChildTemplate = require("../../../lib/asChildRenderer/createAsChildTemplate.cjs");
|
|
5
|
+
const theme = require("../../../lib/theme/store/theme.cjs");
|
|
6
|
+
const atomProps = require("../../../lib/utils/atom-props.cjs");
|
|
7
|
+
const classnames = require("../../../lib/utils/classnames.cjs");
|
|
8
|
+
const Button_css = require("./Button.css.cjs");
|
|
9
|
+
const Spinner = require("../../feedback/Spinner/Spinner.cjs");
|
|
10
|
+
const sprinkles_css = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
11
|
+
const { Template, Slot } = createAsChildTemplate.createAsChildTemplate("button");
|
|
12
|
+
const Button = ({
|
|
13
|
+
asChild,
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
disabled,
|
|
17
|
+
endSlot,
|
|
18
|
+
intent,
|
|
19
|
+
loading,
|
|
20
|
+
ref,
|
|
21
|
+
size,
|
|
22
|
+
startSlot,
|
|
23
|
+
variant,
|
|
24
|
+
...restProps
|
|
25
|
+
}) => {
|
|
26
|
+
const buttonClassName = theme.getComponentStyles("button", {
|
|
27
|
+
base: true,
|
|
28
|
+
variants: {
|
|
29
|
+
variant,
|
|
30
|
+
intent,
|
|
31
|
+
size,
|
|
32
|
+
disabled,
|
|
33
|
+
loading
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const [atomsProps, otherProps] = atomProps.getAtomsAndProps(restProps);
|
|
37
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
38
|
+
Template,
|
|
39
|
+
{
|
|
40
|
+
ref,
|
|
41
|
+
asChild,
|
|
42
|
+
disabled: disabled || loading,
|
|
43
|
+
className: classnames.classnames(
|
|
44
|
+
Button_css.buttonReset,
|
|
45
|
+
buttonClassName,
|
|
46
|
+
sprinkles_css.atoms(atomsProps),
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
...otherProps,
|
|
50
|
+
children: [
|
|
51
|
+
startSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { children: startSlot }),
|
|
52
|
+
loading && /* @__PURE__ */ jsxRuntime.jsx(Spinner.Spinner, { size }),
|
|
53
|
+
/* @__PURE__ */ jsxRuntime.jsx(Slot, { children }),
|
|
54
|
+
endSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { children: endSlot })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
exports.Button = Button;
|
|
@@ -1,15 +1,16 @@
|
|
|
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/Button/Button.css.ts", "@blockle/blocks");
|
|
6
7
|
const buttonReset = css.style({
|
|
7
8
|
"@layer": {
|
|
8
|
-
[
|
|
9
|
+
[layers_css.blocksLayer]: {
|
|
9
10
|
all: "unset",
|
|
10
11
|
cursor: "pointer"
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
}
|
|
14
|
+
});
|
|
14
15
|
fileScope.endFileScope();
|
|
15
16
|
exports.buttonReset = buttonReset;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buttonReset: string;
|
package/dist/{styles/components/form/Button/Button.css.mjs → components/form/Button/Button.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/Button/Button.css.ts", "@blockle/blocks");
|
|
5
5
|
const buttonReset = style({
|
|
6
6
|
"@layer": {
|
|
@@ -9,7 +9,7 @@ const buttonReset = style({
|
|
|
9
9
|
cursor: "pointer"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
}
|
|
12
|
+
});
|
|
13
13
|
endFileScope();
|
|
14
14
|
export {
|
|
15
15
|
buttonReset
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Atoms, MarginAtoms } from '../../../lib/css/atoms';
|
|
3
|
+
import { ButtonTheme } from '../../../lib/theme/componentThemes';
|
|
4
|
+
import { HTMLElementProps } from '../../../lib/utils/utils';
|
|
5
|
+
export type ButtonProps = {
|
|
6
|
+
alignSelf?: Atoms['alignSelf'];
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
endSlot?: React.ReactNode;
|
|
11
|
+
inlineSize?: Atoms['inlineSize'];
|
|
12
|
+
intent?: ButtonTheme['variants']['intent'];
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
popovertarget?: string;
|
|
15
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
16
|
+
size?: ButtonTheme['variants']['size'];
|
|
17
|
+
startSlot?: React.ReactNode;
|
|
18
|
+
type?: 'button' | 'submit' | 'reset';
|
|
19
|
+
variant?: ButtonTheme['variants']['variant'];
|
|
20
|
+
} & Omit<HTMLElementProps<HTMLButtonElement>, 'size'> & MarginAtoms;
|
|
21
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return /* @__PURE__ */ jsx(Box, { color, className: classnames(spinnerClassName, className), ...restProps });
|
|
10
|
-
};
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createAsChildTemplate } from "../../../lib/asChildRenderer/createAsChildTemplate.js";
|
|
3
|
+
import { getComponentStyles } from "../../../lib/theme/store/theme.js";
|
|
4
|
+
import { getAtomsAndProps } from "../../../lib/utils/atom-props.js";
|
|
5
|
+
import { classnames } from "../../../lib/utils/classnames.js";
|
|
6
|
+
import { buttonReset } from "./Button.css.js";
|
|
7
|
+
import { Spinner } from "../../feedback/Spinner/Spinner.js";
|
|
8
|
+
import { atoms } from "../../../lib/css/atoms/sprinkles.css.js";
|
|
11
9
|
const { Template, Slot } = createAsChildTemplate("button");
|
|
12
10
|
const Button = ({
|
|
13
11
|
asChild,
|
|
@@ -23,7 +21,7 @@ const Button = ({
|
|
|
23
21
|
variant,
|
|
24
22
|
...restProps
|
|
25
23
|
}) => {
|
|
26
|
-
const buttonClassName =
|
|
24
|
+
const buttonClassName = getComponentStyles("button", {
|
|
27
25
|
base: true,
|
|
28
26
|
variants: {
|
|
29
27
|
variant,
|
|
@@ -40,7 +38,12 @@ const Button = ({
|
|
|
40
38
|
ref,
|
|
41
39
|
asChild,
|
|
42
40
|
disabled: disabled || loading,
|
|
43
|
-
className: classnames(
|
|
41
|
+
className: classnames(
|
|
42
|
+
buttonReset,
|
|
43
|
+
buttonClassName,
|
|
44
|
+
atoms(atomsProps),
|
|
45
|
+
className
|
|
46
|
+
),
|
|
44
47
|
...otherProps,
|
|
45
48
|
children: [
|
|
46
49
|
startSlot && /* @__PURE__ */ jsx("div", { children: startSlot }),
|
|
@@ -52,6 +55,5 @@ const Button = ({
|
|
|
52
55
|
);
|
|
53
56
|
};
|
|
54
57
|
export {
|
|
55
|
-
Button
|
|
56
|
-
Spinner
|
|
58
|
+
Button
|
|
57
59
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ButtonProps } from './Button';
|
|
3
|
+
declare const _default: Meta;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: StoryObj<ButtonProps>;
|
|
6
|
+
export declare const LinkButton: StoryObj<ButtonProps>;
|
|
7
|
+
export declare const Play: StoryObj<ButtonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button, type ButtonProps } from './Button';
|