@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,13 @@
|
|
|
1
|
+
function hasAnimationDuration(element) {
|
|
2
|
+
if (!element) {
|
|
3
|
+
return false;
|
|
4
|
+
}
|
|
5
|
+
const style = window.getComputedStyle(element);
|
|
6
|
+
return hasDuration(style.transitionDuration) || hasDuration(style.animationDuration);
|
|
7
|
+
}
|
|
8
|
+
function hasDuration(duration) {
|
|
9
|
+
return duration.split(",").map((part) => Number.parseFloat(part.trim())).some((part) => part > 0);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
hasAnimationDuration
|
|
13
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type AnyString = string & {};
|
|
2
|
+
/**
|
|
3
|
+
* Suggest a type for a string literal but also allow any string.
|
|
4
|
+
*/
|
|
5
|
+
export type OptionalLiteral<T extends string> = T | AnyString;
|
|
6
|
+
export type RecordLike = Record<string | number, unknown>;
|
|
7
|
+
export type IsStringUnion<T> = T extends string ? string extends T ? false : true : false;
|
|
8
|
+
export type IsNumberUnion<T> = T extends number ? number extends T ? false : true : false;
|
|
9
|
+
export type IsUnion<T> = IsStringUnion<T> extends true ? true : IsNumberUnion<T> extends true ? true : false;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function roundToPrecision(value, precision) {
|
|
4
|
+
const factor = 10 ** precision;
|
|
5
|
+
return Math.round(value * factor) / factor;
|
|
6
|
+
}
|
|
7
|
+
function getBoundValue(newValue, min, max, step) {
|
|
8
|
+
let value = Math.round(newValue / step) * step;
|
|
9
|
+
value = Math.max(min, Math.min(max, value));
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
exports.getBoundValue = getBoundValue;
|
|
13
|
+
exports.roundToPrecision = roundToPrecision;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function roundToPrecision(value, precision) {
|
|
2
|
+
const factor = 10 ** precision;
|
|
3
|
+
return Math.round(value * factor) / factor;
|
|
4
|
+
}
|
|
5
|
+
function getBoundValue(newValue, min, max, step) {
|
|
6
|
+
let value = Math.round(newValue / step) * step;
|
|
7
|
+
value = Math.max(min, Math.min(max, value));
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
getBoundValue,
|
|
12
|
+
roundToPrecision
|
|
13
|
+
};
|
package/dist/reset.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
require("./
|
|
3
|
-
require("./
|
|
2
|
+
require("./lib/css/atoms/sprinkles.css.cjs");
|
|
3
|
+
require("./lib/css/reset/reset.css.cjs");
|
package/dist/reset.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
+
const css = require("@vanilla-extract/css");
|
|
5
|
+
const style = require("../../../lib/css/style/style.cjs");
|
|
6
|
+
const makeComponentTheme = require("../../../lib/theme/makeComponentTheme.cjs");
|
|
7
|
+
const vars_css = require("../../../lib/theme/vars.css.cjs");
|
|
8
|
+
const helpers_css = require("./helpers.css.cjs");
|
|
9
|
+
fileScope.setFileScope("src/themes/momotaro/components/button.css.ts", "@blockle/blocks");
|
|
10
|
+
const intentColor = css.createVar();
|
|
11
|
+
const hoverBackgroundColor = css.createVar();
|
|
12
|
+
const button = makeComponentTheme.makeComponentTheme("button", {
|
|
13
|
+
base: style.style([
|
|
14
|
+
{
|
|
15
|
+
display: "inline-flex",
|
|
16
|
+
placeItems: "center",
|
|
17
|
+
fontSize: "medium",
|
|
18
|
+
borderRadius: "medium",
|
|
19
|
+
fontWeight: "medium",
|
|
20
|
+
// Space between `startSlot | children | endSlot`
|
|
21
|
+
gap: "small",
|
|
22
|
+
selectors: {
|
|
23
|
+
"&:hover:not(:disabled)": {
|
|
24
|
+
backgroundColor: hoverBackgroundColor
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
helpers_css.clickable
|
|
29
|
+
]),
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
solid: style.style({
|
|
33
|
+
color: vars_css.vars.color.white,
|
|
34
|
+
backgroundColor: intentColor,
|
|
35
|
+
border: "none"
|
|
36
|
+
}),
|
|
37
|
+
outline: style.style({
|
|
38
|
+
color: intentColor,
|
|
39
|
+
borderWidth: "small",
|
|
40
|
+
borderStyle: "solid",
|
|
41
|
+
borderColor: intentColor,
|
|
42
|
+
background: "transparent"
|
|
43
|
+
}),
|
|
44
|
+
ghost: style.style({
|
|
45
|
+
color: intentColor,
|
|
46
|
+
background: "transparent"
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
size: {
|
|
50
|
+
small: style.style({
|
|
51
|
+
paddingInline: "large",
|
|
52
|
+
height: 40
|
|
53
|
+
}),
|
|
54
|
+
medium: style.style({
|
|
55
|
+
paddingInline: "xlarge",
|
|
56
|
+
height: 56
|
|
57
|
+
}),
|
|
58
|
+
large: style.style({
|
|
59
|
+
paddingInline: "xlarge",
|
|
60
|
+
height: 72
|
|
61
|
+
})
|
|
62
|
+
},
|
|
63
|
+
intent: {
|
|
64
|
+
neutral: style.style({
|
|
65
|
+
vars: {
|
|
66
|
+
[intentColor]: vars_css.vars.color.primary,
|
|
67
|
+
[hoverBackgroundColor]: vars_css.vars.color.primaryLight
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
70
|
+
danger: style.style({
|
|
71
|
+
vars: {
|
|
72
|
+
[intentColor]: vars_css.vars.color.danger,
|
|
73
|
+
[hoverBackgroundColor]: "#fff8f7",
|
|
74
|
+
[helpers_css.focusRingColor]: vars_css.vars.color.danger
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
compoundVariants: [
|
|
80
|
+
{
|
|
81
|
+
variants: {
|
|
82
|
+
variant: "solid",
|
|
83
|
+
intent: "neutral"
|
|
84
|
+
},
|
|
85
|
+
style: style.style({
|
|
86
|
+
vars: {
|
|
87
|
+
[hoverBackgroundColor]: vars_css.vars.color.primaryDark
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
variants: {
|
|
93
|
+
variant: "solid",
|
|
94
|
+
intent: "danger"
|
|
95
|
+
},
|
|
96
|
+
style: style.style({
|
|
97
|
+
vars: {
|
|
98
|
+
[hoverBackgroundColor]: "#f9b1a9"
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
defaultVariants: {
|
|
104
|
+
size: "small",
|
|
105
|
+
variant: "solid",
|
|
106
|
+
intent: "neutral"
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
fileScope.endFileScope();
|
|
110
|
+
exports.button = button;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const button: import('../../../lib/theme/makeComponentTheme').ComponentTheme<import('../../../lib/theme/componentThemes').ButtonTheme> | undefined;
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { createVar } from "@vanilla-extract/css";
|
|
3
|
-
import { style } from "../../../lib/css/style/style.
|
|
4
|
-
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.
|
|
5
|
-
import { vars } from "../../../lib/theme/vars.css.
|
|
6
|
-
import { focusRingColor, clickable } from "./helpers.css.
|
|
3
|
+
import { style } from "../../../lib/css/style/style.js";
|
|
4
|
+
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.js";
|
|
5
|
+
import { vars } from "../../../lib/theme/vars.css.js";
|
|
6
|
+
import { focusRingColor, clickable } from "./helpers.css.js";
|
|
7
7
|
setFileScope("src/themes/momotaro/components/button.css.ts", "@blockle/blocks");
|
|
8
|
-
const intentColor = createVar(
|
|
9
|
-
const hoverBackgroundColor = createVar(
|
|
8
|
+
const intentColor = createVar();
|
|
9
|
+
const hoverBackgroundColor = createVar();
|
|
10
10
|
const button = makeComponentTheme("button", {
|
|
11
|
-
base: style([
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
base: style([
|
|
12
|
+
{
|
|
13
|
+
display: "inline-flex",
|
|
14
|
+
placeItems: "center",
|
|
15
|
+
fontSize: "medium",
|
|
16
|
+
borderRadius: "medium",
|
|
17
|
+
fontWeight: "medium",
|
|
18
|
+
// Space between `startSlot | children | endSlot`
|
|
19
|
+
gap: "small",
|
|
20
|
+
selectors: {
|
|
21
|
+
"&:hover:not(:disabled)": {
|
|
22
|
+
backgroundColor: hoverBackgroundColor
|
|
23
|
+
}
|
|
22
24
|
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
+
},
|
|
26
|
+
clickable
|
|
27
|
+
]),
|
|
25
28
|
variants: {
|
|
26
29
|
variant: {
|
|
27
30
|
solid: style({
|
|
@@ -71,27 +74,30 @@ const button = makeComponentTheme("button", {
|
|
|
71
74
|
})
|
|
72
75
|
}
|
|
73
76
|
},
|
|
74
|
-
compoundVariants: [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
variants: {
|
|
86
|
-
variant: "solid",
|
|
87
|
-
intent: "danger"
|
|
77
|
+
compoundVariants: [
|
|
78
|
+
{
|
|
79
|
+
variants: {
|
|
80
|
+
variant: "solid",
|
|
81
|
+
intent: "neutral"
|
|
82
|
+
},
|
|
83
|
+
style: style({
|
|
84
|
+
vars: {
|
|
85
|
+
[hoverBackgroundColor]: vars.color.primaryDark
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
88
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
{
|
|
90
|
+
variants: {
|
|
91
|
+
variant: "solid",
|
|
92
|
+
intent: "danger"
|
|
93
|
+
},
|
|
94
|
+
style: style({
|
|
95
|
+
vars: {
|
|
96
|
+
[hoverBackgroundColor]: "#f9b1a9"
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
],
|
|
95
101
|
defaultVariants: {
|
|
96
102
|
size: "small",
|
|
97
103
|
variant: "solid",
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
+
const css = require("@vanilla-extract/css");
|
|
5
|
+
const makeComponentTheme = require("../../../lib/theme/makeComponentTheme.cjs");
|
|
6
|
+
const vars_css = require("../../../lib/theme/vars.css.cjs");
|
|
7
|
+
const helpers_css = require("./helpers.css.cjs");
|
|
8
|
+
const transitions = require("./transitions.cjs");
|
|
9
|
+
const sprinkles_css = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
10
|
+
fileScope.setFileScope("src/themes/momotaro/components/checkbox.css.ts", "@blockle/blocks");
|
|
11
|
+
const checkbox = makeComponentTheme.makeComponentTheme("checkbox", {
|
|
12
|
+
base: css.style([
|
|
13
|
+
{
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
inlineSize: 24,
|
|
18
|
+
blockSize: 24,
|
|
19
|
+
"@media": {
|
|
20
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
21
|
+
transition: `background-color ${vars_css.vars.transition.normal}, box-shadow ${vars_css.vars.transition.fast}`
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
selectors: {
|
|
25
|
+
"&:hover:not(:has(input:disabled))": {
|
|
26
|
+
backgroundColor: vars_css.vars.color.primaryDark
|
|
27
|
+
},
|
|
28
|
+
"&:has(input:checked)": {
|
|
29
|
+
backgroundColor: vars_css.vars.color.primary
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
sprinkles_css.atoms({
|
|
34
|
+
backgroundColor: "primaryLight",
|
|
35
|
+
borderRadius: "small"
|
|
36
|
+
}),
|
|
37
|
+
helpers_css.focusable
|
|
38
|
+
]),
|
|
39
|
+
icon: css.style({
|
|
40
|
+
inlineSize: "1rem",
|
|
41
|
+
blockSize: "1rem",
|
|
42
|
+
color: "white",
|
|
43
|
+
transform: "scale(0)",
|
|
44
|
+
selectors: {
|
|
45
|
+
"input:checked ~ &": {
|
|
46
|
+
transform: "scale(1)"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"@media": {
|
|
50
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
51
|
+
transition: `transform ${vars_css.vars.transition.normal} ${transitions.bounceOut}`
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}),
|
|
55
|
+
label: sprinkles_css.atoms({
|
|
56
|
+
display: "flex",
|
|
57
|
+
flexDirection: "row",
|
|
58
|
+
padding: "xsmall",
|
|
59
|
+
gap: "medium",
|
|
60
|
+
cursor: "pointer"
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
fileScope.endFileScope();
|
|
64
|
+
exports.checkbox = checkbox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const checkbox: import('../../../lib/theme/makeComponentTheme').ComponentTheme<import('../../../lib/theme/componentThemes').CheckboxTheme> | undefined;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { style } from "@vanilla-extract/css";
|
|
3
|
+
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.js";
|
|
4
|
+
import { vars } from "../../../lib/theme/vars.css.js";
|
|
5
|
+
import { focusable } from "./helpers.css.js";
|
|
6
|
+
import { bounceOut } from "./transitions.js";
|
|
7
|
+
import { atoms } from "../../../lib/css/atoms/sprinkles.css.js";
|
|
8
|
+
setFileScope("src/themes/momotaro/components/checkbox.css.ts", "@blockle/blocks");
|
|
9
|
+
const checkbox = makeComponentTheme("checkbox", {
|
|
10
|
+
base: style([
|
|
11
|
+
{
|
|
12
|
+
display: "flex",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
inlineSize: 24,
|
|
16
|
+
blockSize: 24,
|
|
17
|
+
"@media": {
|
|
18
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
19
|
+
transition: `background-color ${vars.transition.normal}, box-shadow ${vars.transition.fast}`
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
selectors: {
|
|
23
|
+
"&:hover:not(:has(input:disabled))": {
|
|
24
|
+
backgroundColor: vars.color.primaryDark
|
|
25
|
+
},
|
|
26
|
+
"&:has(input:checked)": {
|
|
27
|
+
backgroundColor: vars.color.primary
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
atoms({
|
|
32
|
+
backgroundColor: "primaryLight",
|
|
33
|
+
borderRadius: "small"
|
|
34
|
+
}),
|
|
35
|
+
focusable
|
|
36
|
+
]),
|
|
37
|
+
icon: style({
|
|
38
|
+
inlineSize: "1rem",
|
|
39
|
+
blockSize: "1rem",
|
|
40
|
+
color: "white",
|
|
41
|
+
transform: "scale(0)",
|
|
42
|
+
selectors: {
|
|
43
|
+
"input:checked ~ &": {
|
|
44
|
+
transform: "scale(1)"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"@media": {
|
|
48
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
49
|
+
transition: `transform ${vars.transition.normal} ${bounceOut}`
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
label: atoms({
|
|
54
|
+
display: "flex",
|
|
55
|
+
flexDirection: "row",
|
|
56
|
+
padding: "xsmall",
|
|
57
|
+
gap: "medium",
|
|
58
|
+
cursor: "pointer"
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
endFileScope();
|
|
62
|
+
export {
|
|
63
|
+
checkbox
|
|
64
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
+
const css = require("@vanilla-extract/css");
|
|
5
|
+
const makeComponentTheme = require("../../../lib/theme/makeComponentTheme.cjs");
|
|
6
|
+
const sprinkles_css = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
7
|
+
fileScope.setFileScope("src/themes/momotaro/components/dialog.css.ts", "@blockle/blocks");
|
|
8
|
+
const dialog = makeComponentTheme.makeComponentTheme("dialog", {
|
|
9
|
+
dialog: css.style([
|
|
10
|
+
sprinkles_css.atoms({
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexDirection: "column",
|
|
13
|
+
padding: "gutter",
|
|
14
|
+
border: "none",
|
|
15
|
+
overflow: "auto",
|
|
16
|
+
borderRadius: "medium",
|
|
17
|
+
boxShadow: "large"
|
|
18
|
+
}),
|
|
19
|
+
{
|
|
20
|
+
maxHeight: "90%",
|
|
21
|
+
minWidth: "300px",
|
|
22
|
+
"::backdrop": {
|
|
23
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)"
|
|
24
|
+
},
|
|
25
|
+
selectors: {
|
|
26
|
+
"&[open]": {
|
|
27
|
+
transform: "translate(0, 0)",
|
|
28
|
+
opacity: 1,
|
|
29
|
+
// @ts-expect-error - Vanilla Extract does not support @starting-style (yet)
|
|
30
|
+
"@starting-style": {
|
|
31
|
+
transform: "translate(0, -120px)",
|
|
32
|
+
opacity: 0
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"&[open]::backdrop": {
|
|
36
|
+
opacity: 1,
|
|
37
|
+
"@starting-style": {
|
|
38
|
+
opacity: 0
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
43
|
+
"@media": {
|
|
44
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
45
|
+
// Ending style
|
|
46
|
+
transform: "translate(0, -120px)",
|
|
47
|
+
opacity: 0,
|
|
48
|
+
transitionBehavior: "allow-discrete",
|
|
49
|
+
transitionProperty: "opacity, transform, overlay, display",
|
|
50
|
+
transitionDuration: "240ms, 160ms, 240ms, 240ms",
|
|
51
|
+
"::backdrop": {
|
|
52
|
+
opacity: 0,
|
|
53
|
+
transitionBehavior: "allow-discrete",
|
|
54
|
+
transitionProperty: "opacity, overlay, display",
|
|
55
|
+
transitionDuration: "160ms, 240ms, 240ms"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
]),
|
|
61
|
+
variants: {
|
|
62
|
+
size: {
|
|
63
|
+
small: css.style({
|
|
64
|
+
width: "400px",
|
|
65
|
+
maxWidth: "min(400px, 90%)"
|
|
66
|
+
}),
|
|
67
|
+
medium: css.style({
|
|
68
|
+
width: "600px",
|
|
69
|
+
maxWidth: "min(600px, 90%)"
|
|
70
|
+
}),
|
|
71
|
+
large: css.style({
|
|
72
|
+
width: "800px",
|
|
73
|
+
maxWidth: "min(800px, 90%)"
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
defaultVariants: {
|
|
78
|
+
size: "small"
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
fileScope.endFileScope();
|
|
82
|
+
exports.dialog = dialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dialog: import('../../../lib/theme/makeComponentTheme').ComponentTheme<import('../../../lib/theme/componentThemes').DialogTheme> | undefined;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { style } from "@vanilla-extract/css";
|
|
3
|
+
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.js";
|
|
4
|
+
import { atoms } from "../../../lib/css/atoms/sprinkles.css.js";
|
|
5
|
+
setFileScope("src/themes/momotaro/components/dialog.css.ts", "@blockle/blocks");
|
|
6
|
+
const dialog = makeComponentTheme("dialog", {
|
|
7
|
+
dialog: style([
|
|
8
|
+
atoms({
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
padding: "gutter",
|
|
12
|
+
border: "none",
|
|
13
|
+
overflow: "auto",
|
|
14
|
+
borderRadius: "medium",
|
|
15
|
+
boxShadow: "large"
|
|
16
|
+
}),
|
|
17
|
+
{
|
|
18
|
+
maxHeight: "90%",
|
|
19
|
+
minWidth: "300px",
|
|
20
|
+
"::backdrop": {
|
|
21
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)"
|
|
22
|
+
},
|
|
23
|
+
selectors: {
|
|
24
|
+
"&[open]": {
|
|
25
|
+
transform: "translate(0, 0)",
|
|
26
|
+
opacity: 1,
|
|
27
|
+
// @ts-expect-error - Vanilla Extract does not support @starting-style (yet)
|
|
28
|
+
"@starting-style": {
|
|
29
|
+
transform: "translate(0, -120px)",
|
|
30
|
+
opacity: 0
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"&[open]::backdrop": {
|
|
34
|
+
opacity: 1,
|
|
35
|
+
"@starting-style": {
|
|
36
|
+
opacity: 0
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
41
|
+
"@media": {
|
|
42
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
43
|
+
// Ending style
|
|
44
|
+
transform: "translate(0, -120px)",
|
|
45
|
+
opacity: 0,
|
|
46
|
+
transitionBehavior: "allow-discrete",
|
|
47
|
+
transitionProperty: "opacity, transform, overlay, display",
|
|
48
|
+
transitionDuration: "240ms, 160ms, 240ms, 240ms",
|
|
49
|
+
"::backdrop": {
|
|
50
|
+
opacity: 0,
|
|
51
|
+
transitionBehavior: "allow-discrete",
|
|
52
|
+
transitionProperty: "opacity, overlay, display",
|
|
53
|
+
transitionDuration: "160ms, 240ms, 240ms"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]),
|
|
59
|
+
variants: {
|
|
60
|
+
size: {
|
|
61
|
+
small: style({
|
|
62
|
+
width: "400px",
|
|
63
|
+
maxWidth: "min(400px, 90%)"
|
|
64
|
+
}),
|
|
65
|
+
medium: style({
|
|
66
|
+
width: "600px",
|
|
67
|
+
maxWidth: "min(600px, 90%)"
|
|
68
|
+
}),
|
|
69
|
+
large: style({
|
|
70
|
+
width: "800px",
|
|
71
|
+
maxWidth: "min(800px, 90%)"
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
defaultVariants: {
|
|
76
|
+
size: "small"
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
endFileScope();
|
|
80
|
+
export {
|
|
81
|
+
dialog
|
|
82
|
+
};
|
|
@@ -1,12 +1,13 @@
|
|
|
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 makeComponentTheme = require("../../../lib/theme/makeComponentTheme.cjs");
|
|
5
6
|
fileScope.setFileScope("src/themes/momotaro/components/divider.css.ts", "@blockle/blocks");
|
|
6
|
-
const divider =
|
|
7
|
+
const divider = makeComponentTheme.makeComponentTheme("divider", {
|
|
7
8
|
base: css.style({
|
|
8
9
|
blockSize: 1
|
|
9
|
-
}
|
|
10
|
+
}),
|
|
10
11
|
defaultVariants: {
|
|
11
12
|
color: "textLight"
|
|
12
13
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const divider: import('../../../lib/theme/makeComponentTheme').ComponentTheme<import('../../../lib/theme/componentThemes').DividerTheme> | undefined;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.
|
|
3
|
+
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.js";
|
|
4
4
|
setFileScope("src/themes/momotaro/components/divider.css.ts", "@blockle/blocks");
|
|
5
5
|
const divider = makeComponentTheme("divider", {
|
|
6
6
|
base: style({
|
|
7
7
|
blockSize: 1
|
|
8
|
-
}
|
|
8
|
+
}),
|
|
9
9
|
defaultVariants: {
|
|
10
10
|
color: "textLight"
|
|
11
11
|
}
|