@blockle/blocks 0.20.0-alpha1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -70
- package/dist/index.cjs +21 -71
- package/dist/index.d.ts +3 -36
- package/dist/index.js +3 -73
- package/dist/reset.cjs +1 -2
- package/dist/reset.d.ts +0 -0
- package/dist/reset.js +1 -2
- package/package.json +22 -78
- package/LICENSE +0 -21
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.cjs +0 -20
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.d.ts +0 -5
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.js +0 -20
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.spec.d.ts +0 -1
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.stories.d.ts +0 -6
- package/dist/components/accessibility/VisuallyHidden/index.d.ts +0 -1
- package/dist/components/accessibility/VisuallyHidden/visually-hidden.css.cjs +0 -16
- package/dist/components/accessibility/VisuallyHidden/visually-hidden.css.d.ts +0 -1
- package/dist/components/accessibility/VisuallyHidden/visually-hidden.css.js +0 -16
- package/dist/components/display/Divider/Divider.cjs +0 -26
- package/dist/components/display/Divider/Divider.d.ts +0 -7
- package/dist/components/display/Divider/Divider.js +0 -26
- package/dist/components/display/Divider/Divider.spec.d.ts +0 -1
- package/dist/components/display/Divider/Divider.stories.d.ts +0 -6
- package/dist/components/display/Divider/divider.css.cjs +0 -16
- package/dist/components/display/Divider/divider.css.d.ts +0 -1
- package/dist/components/display/Divider/divider.css.js +0 -16
- package/dist/components/display/Divider/index.d.ts +0 -1
- package/dist/components/feedback/Progress/Progress.cjs +0 -54
- package/dist/components/feedback/Progress/Progress.d.ts +0 -16
- package/dist/components/feedback/Progress/Progress.js +0 -54
- package/dist/components/feedback/Progress/Progress.stories.d.ts +0 -5
- package/dist/components/feedback/Progress/index.d.ts +0 -1
- package/dist/components/feedback/Spinner/Spinner.cjs +0 -26
- package/dist/components/feedback/Spinner/Spinner.d.ts +0 -9
- package/dist/components/feedback/Spinner/Spinner.js +0 -26
- package/dist/components/feedback/Spinner/Spinner.stories.d.ts +0 -5
- package/dist/components/feedback/Spinner/index.d.ts +0 -1
- package/dist/components/form/Button/Button.cjs +0 -59
- package/dist/components/form/Button/Button.css.cjs +0 -16
- package/dist/components/form/Button/Button.css.d.ts +0 -1
- package/dist/components/form/Button/Button.css.js +0 -16
- package/dist/components/form/Button/Button.d.ts +0 -21
- package/dist/components/form/Button/Button.js +0 -59
- package/dist/components/form/Button/Button.spec.d.ts +0 -1
- package/dist/components/form/Button/Button.stories.d.ts +0 -7
- package/dist/components/form/Button/index.d.ts +0 -1
- package/dist/components/form/Checkbox/Checkbox.cjs +0 -79
- package/dist/components/form/Checkbox/Checkbox.d.ts +0 -9
- package/dist/components/form/Checkbox/Checkbox.js +0 -79
- package/dist/components/form/Checkbox/Checkbox.spec.d.ts +0 -1
- package/dist/components/form/Checkbox/Checkbox.stories.d.ts +0 -5
- package/dist/components/form/Checkbox/checkbox.css.cjs +0 -32
- package/dist/components/form/Checkbox/checkbox.css.d.ts +0 -3
- package/dist/components/form/Checkbox/checkbox.css.js +0 -32
- package/dist/components/form/Checkbox/index.d.ts +0 -1
- package/dist/components/form/Input/Input.cjs +0 -51
- package/dist/components/form/Input/Input.d.ts +0 -11
- package/dist/components/form/Input/Input.js +0 -51
- package/dist/components/form/Input/Input.spec.d.ts +0 -1
- package/dist/components/form/Input/Input.stories.d.ts +0 -5
- package/dist/components/form/Input/index.d.ts +0 -1
- package/dist/components/form/Input/input.css.cjs +0 -21
- package/dist/components/form/Input/input.css.d.ts +0 -1
- package/dist/components/form/Input/input.css.js +0 -21
- package/dist/components/form/Label/Label.cjs +0 -30
- package/dist/components/form/Label/Label.d.ts +0 -18
- package/dist/components/form/Label/Label.js +0 -30
- package/dist/components/form/Label/Label.spec.d.ts +0 -1
- package/dist/components/form/Label/Label.stories.d.ts +0 -6
- package/dist/components/form/Label/index.d.ts +0 -1
- package/dist/components/form/Radio/Radio.cjs +0 -48
- package/dist/components/form/Radio/Radio.d.ts +0 -8
- package/dist/components/form/Radio/Radio.js +0 -48
- package/dist/components/form/Radio/Radio.spec.d.ts +0 -1
- package/dist/components/form/Radio/Radio.stories.d.ts +0 -6
- package/dist/components/form/Radio/RadioGroup.d.ts +0 -8
- package/dist/components/form/Radio/index.d.ts +0 -2
- package/dist/components/form/Radio/radio.css.cjs +0 -32
- package/dist/components/form/Radio/radio.css.d.ts +0 -3
- package/dist/components/form/Radio/radio.css.js +0 -32
- package/dist/components/form/Select/Select.cjs +0 -65
- package/dist/components/form/Select/Select.d.ts +0 -10
- package/dist/components/form/Select/Select.js +0 -65
- package/dist/components/form/Select/Select.stories.d.ts +0 -5
- package/dist/components/form/Select/index.d.ts +0 -1
- package/dist/components/form/Select/select.css.cjs +0 -38
- package/dist/components/form/Select/select.css.d.ts +0 -3
- package/dist/components/form/Select/select.css.js +0 -38
- package/dist/components/form/Slider/Slider.cjs +0 -141
- package/dist/components/form/Slider/Slider.d.ts +0 -20
- package/dist/components/form/Slider/Slider.js +0 -141
- package/dist/components/form/Slider/Slider.spec.d.ts +0 -1
- package/dist/components/form/Slider/Slider.stories.d.ts +0 -6
- package/dist/components/form/Slider/index.d.ts +0 -1
- package/dist/components/form/Slider/slider.css.cjs +0 -75
- package/dist/components/form/Slider/slider.css.d.ts +0 -5
- package/dist/components/form/Slider/slider.css.js +0 -75
- package/dist/components/form/Slider/usePointerProgress.cjs +0 -47
- package/dist/components/form/Slider/usePointerProgress.d.ts +0 -11
- package/dist/components/form/Slider/usePointerProgress.js +0 -47
- package/dist/components/form/Switch/Switch.cjs +0 -73
- package/dist/components/form/Switch/Switch.d.ts +0 -6
- package/dist/components/form/Switch/Switch.js +0 -73
- package/dist/components/form/Switch/Switch.stories.d.ts +0 -5
- package/dist/components/form/Switch/index.d.ts +0 -1
- package/dist/components/form/Switch/switch.css.cjs +0 -27
- package/dist/components/form/Switch/switch.css.d.ts +0 -2
- package/dist/components/form/Switch/switch.css.js +0 -27
- package/dist/components/layout/Box/Box.cjs +0 -28
- package/dist/components/layout/Box/Box.d.ts +0 -11
- package/dist/components/layout/Box/Box.js +0 -28
- package/dist/components/layout/Box/Box.spec.d.ts +0 -1
- package/dist/components/layout/Box/Box.stories.d.ts +0 -6
- package/dist/components/layout/Box/index.d.ts +0 -1
- package/dist/components/layout/Inline/Inline.cjs +0 -30
- package/dist/components/layout/Inline/Inline.d.ts +0 -13
- package/dist/components/layout/Inline/Inline.js +0 -30
- package/dist/components/layout/Inline/Inline.stories.d.ts +0 -6
- package/dist/components/layout/Inline/index.d.ts +0 -1
- package/dist/components/layout/Stack/Stack.cjs +0 -30
- package/dist/components/layout/Stack/Stack.d.ts +0 -17
- package/dist/components/layout/Stack/Stack.js +0 -30
- package/dist/components/layout/Stack/Stack.stories.d.ts +0 -6
- package/dist/components/layout/Stack/index.d.ts +0 -1
- package/dist/components/navigation/Link/Link.cjs +0 -32
- package/dist/components/navigation/Link/Link.d.ts +0 -11
- package/dist/components/navigation/Link/Link.js +0 -32
- package/dist/components/navigation/Link/Link.stories.d.ts +0 -6
- package/dist/components/navigation/Link/index.d.ts +0 -1
- package/dist/components/other/BlocksProvider/BlocksProvider.cjs +0 -38
- package/dist/components/other/BlocksProvider/BlocksProvider.d.ts +0 -8
- package/dist/components/other/BlocksProvider/BlocksProvider.js +0 -38
- package/dist/components/other/BlocksProvider/context.cjs +0 -6
- package/dist/components/other/BlocksProvider/context.d.ts +0 -4
- package/dist/components/other/BlocksProvider/context.js +0 -6
- package/dist/components/other/BlocksProvider/index.d.ts +0 -2
- package/dist/components/other/Portal/Portal.cjs +0 -8
- package/dist/components/other/Portal/Portal.d.ts +0 -5
- package/dist/components/other/Portal/Portal.js +0 -8
- package/dist/components/other/Portal/index.d.ts +0 -1
- package/dist/components/overlay/Dialog/Dialog.cjs +0 -79
- package/dist/components/overlay/Dialog/Dialog.d.ts +0 -10
- package/dist/components/overlay/Dialog/Dialog.js +0 -79
- package/dist/components/overlay/Dialog/Dialog.stories.d.ts +0 -7
- package/dist/components/overlay/Dialog/dialog.css.cjs +0 -22
- package/dist/components/overlay/Dialog/dialog.css.d.ts +0 -1
- package/dist/components/overlay/Dialog/dialog.css.js +0 -22
- package/dist/components/overlay/Dialog/dialogHelper.cjs +0 -22
- package/dist/components/overlay/Dialog/dialogHelper.d.ts +0 -6
- package/dist/components/overlay/Dialog/dialogHelper.js +0 -22
- package/dist/components/overlay/Dialog/index.d.ts +0 -1
- package/dist/components/overlay/Popover/Popover.cjs +0 -113
- package/dist/components/overlay/Popover/Popover.d.ts +0 -12
- package/dist/components/overlay/Popover/Popover.js +0 -113
- package/dist/components/overlay/Popover/Popover.stories.d.ts +0 -5
- package/dist/components/overlay/Popover/popover-utils.cjs +0 -62
- package/dist/components/overlay/Popover/popover-utils.d.ts +0 -2
- package/dist/components/overlay/Popover/popover-utils.js +0 -62
- package/dist/components/overlay/Tooltip/Tooltip.cjs +0 -73
- package/dist/components/overlay/Tooltip/Tooltip.d.ts +0 -11
- package/dist/components/overlay/Tooltip/Tooltip.js +0 -73
- package/dist/components/overlay/Tooltip/Tooltip.stories.d.ts +0 -5
- package/dist/components/overlay/Tooltip/index.d.ts +0 -1
- package/dist/components/typography/Heading/Heading.cjs +0 -24
- package/dist/components/typography/Heading/Heading.d.ts +0 -8
- package/dist/components/typography/Heading/Heading.js +0 -24
- package/dist/components/typography/Heading/heading.css.cjs +0 -16
- package/dist/components/typography/Heading/heading.css.d.ts +0 -1
- package/dist/components/typography/Heading/heading.css.js +0 -16
- package/dist/components/typography/Heading/heading.stories.d.ts +0 -12
- package/dist/components/typography/Heading/index.d.ts +0 -1
- package/dist/components/typography/Text/Text.cjs +0 -21
- package/dist/components/typography/Text/Text.d.ts +0 -12
- package/dist/components/typography/Text/Text.js +0 -21
- package/dist/components/typography/Text/Text.stories.d.ts +0 -5
- package/dist/components/typography/Text/index.d.ts +0 -1
- package/dist/components/typography/Text/text.css.cjs +0 -16
- package/dist/components/typography/Text/text.css.d.ts +0 -1
- package/dist/components/typography/Text/text.css.js +0 -16
- package/dist/entries/themes/momotaro.d.ts +0 -1
- package/dist/hooks/useClickOutside/useClickOutside.cjs +0 -24
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +0 -6
- package/dist/hooks/useClickOutside/useClickOutside.js +0 -24
- package/dist/hooks/useControlledValue/useControlledValue.cjs +0 -33
- package/dist/hooks/useControlledValue/useControlledValue.d.ts +0 -8
- package/dist/hooks/useControlledValue/useControlledValue.js +0 -33
- package/dist/hooks/useFocusLock/index.d.ts +0 -1
- package/dist/hooks/useFocusLock/useFocusLock.d.ts +0 -6
- package/dist/hooks/useIsomorphicLayoutEffect/index.d.ts +0 -1
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs +0 -6
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +0 -5
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +0 -6
- package/dist/hooks/useKeyboard/index.d.ts +0 -1
- package/dist/hooks/useKeyboard/useKeyboard.cjs +0 -21
- package/dist/hooks/useKeyboard/useKeyboard.d.ts +0 -6
- package/dist/hooks/useKeyboard/useKeyboard.js +0 -21
- package/dist/hooks/useLayer/index.d.ts +0 -1
- package/dist/hooks/useLayer/useLayer.cjs +0 -27
- package/dist/hooks/useLayer/useLayer.d.ts +0 -1
- package/dist/hooks/useLayer/useLayer.js +0 -27
- package/dist/hooks/usePreventBodyScroll/index.d.ts +0 -1
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.cjs +0 -30
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.d.ts +0 -1
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.js +0 -30
- package/dist/hooks/useRestoreFocus/index.d.ts +0 -1
- package/dist/hooks/useRestoreFocus/useRestoreFocus.cjs +0 -19
- package/dist/hooks/useRestoreFocus/useRestoreFocus.d.ts +0 -4
- package/dist/hooks/useRestoreFocus/useRestoreFocus.js +0 -19
- package/dist/hooks/useRootAriaHidden/index.d.ts +0 -1
- package/dist/hooks/useRootAriaHidden/useRootAriaHidden.cjs +0 -12
- package/dist/hooks/useRootAriaHidden/useRootAriaHidden.d.ts +0 -7
- package/dist/hooks/useRootAriaHidden/useRootAriaHidden.js +0 -12
- package/dist/hooks/useVisibilityState/index.d.ts +0 -1
- package/dist/hooks/useVisibilityState/useVisibilityState.cjs +0 -17
- package/dist/hooks/useVisibilityState/useVisibilityState.d.ts +0 -3
- package/dist/hooks/useVisibilityState/useVisibilityState.js +0 -17
- package/dist/lib/asChildRenderer/createAsChildTemplate.cjs +0 -73
- package/dist/lib/asChildRenderer/createAsChildTemplate.d.ts +0 -34
- package/dist/lib/asChildRenderer/createAsChildTemplate.js +0 -73
- package/dist/lib/asChildRenderer/createAsChildTemplate.spec.d.ts +0 -1
- package/dist/lib/css/atoms/atomTypes.d.ts +0 -37
- package/dist/lib/css/atoms/atomicProperties.cjs +0 -90
- package/dist/lib/css/atoms/atomicProperties.d.ts +0 -286
- package/dist/lib/css/atoms/atomicProperties.js +0 -90
- package/dist/lib/css/atoms/atoms.d.ts +0 -1
- package/dist/lib/css/atoms/breakpoints.cjs +0 -15
- package/dist/lib/css/atoms/breakpoints.d.ts +0 -9
- package/dist/lib/css/atoms/breakpoints.js +0 -15
- package/dist/lib/css/atoms/index.d.ts +0 -2
- package/dist/lib/css/atoms/sprinkles.css.cjs +0 -52
- package/dist/lib/css/atoms/sprinkles.css.d.ts +0 -233
- package/dist/lib/css/atoms/sprinkles.css.js +0 -52
- package/dist/lib/css/flexbox/flexbox.cjs +0 -17
- package/dist/lib/css/flexbox/flexbox.d.ts +0 -15
- package/dist/lib/css/flexbox/flexbox.js +0 -17
- package/dist/lib/css/layers/layers.css.cjs +0 -8
- package/dist/lib/css/layers/layers.css.d.ts +0 -1
- package/dist/lib/css/layers/layers.css.js +0 -8
- package/dist/lib/css/reset/reset.css.cjs +0 -38
- package/dist/lib/css/reset/reset.css.d.ts +0 -1
- package/dist/lib/css/reset/reset.css.js +0 -37
- package/dist/lib/css/style/style.cjs +0 -29
- package/dist/lib/css/style/style.d.ts +0 -12
- package/dist/lib/css/style/style.js +0 -29
- package/dist/lib/css/utils/cssUtils.cjs +0 -6
- package/dist/lib/css/utils/cssUtils.d.ts +0 -1
- package/dist/lib/css/utils/cssUtils.js +0 -6
- package/dist/lib/react/mergeProps.cjs +0 -43
- package/dist/lib/react/mergeProps.d.ts +0 -4
- package/dist/lib/react/mergeProps.js +0 -43
- package/dist/lib/react/refs.cjs +0 -17
- package/dist/lib/react/refs.d.ts +0 -3
- package/dist/lib/react/refs.js +0 -17
- package/dist/lib/theme/componentThemes.d.ts +0 -134
- package/dist/lib/theme/makeComponentTheme.cjs +0 -6
- package/dist/lib/theme/makeComponentTheme.d.ts +0 -49
- package/dist/lib/theme/makeComponentTheme.js +0 -6
- package/dist/lib/theme/makeTheme.cjs +0 -13
- package/dist/lib/theme/makeTheme.d.ts +0 -14
- package/dist/lib/theme/makeTheme.js +0 -13
- package/dist/lib/theme/makeVanillaTheme.cjs +0 -20
- package/dist/lib/theme/makeVanillaTheme.d.ts +0 -16
- package/dist/lib/theme/makeVanillaTheme.js +0 -20
- package/dist/lib/theme/store/theme.cjs +0 -93
- package/dist/lib/theme/store/theme.d.ts +0 -13
- package/dist/lib/theme/store/theme.js +0 -93
- package/dist/lib/theme/tokens.cjs +0 -82
- package/dist/lib/theme/tokens.d.ts +0 -2
- package/dist/lib/theme/tokens.js +0 -82
- package/dist/lib/theme/tokensType.d.ts +0 -33
- package/dist/lib/theme/vars.css.cjs +0 -10
- package/dist/lib/theme/vars.css.d.ts +0 -75
- package/dist/lib/theme/vars.css.js +0 -10
- package/dist/lib/utils/atom-props.cjs +0 -16
- package/dist/lib/utils/atom-props.d.ts +0 -4
- package/dist/lib/utils/atom-props.js +0 -16
- package/dist/lib/utils/classnames.cjs +0 -7
- package/dist/lib/utils/classnames.d.ts +0 -3
- package/dist/lib/utils/classnames.js +0 -7
- package/dist/lib/utils/dom-focus.d.ts +0 -2
- package/dist/lib/utils/dom.cjs +0 -13
- package/dist/lib/utils/dom.d.ts +0 -4
- package/dist/lib/utils/dom.js +0 -13
- package/dist/lib/utils/helpers.d.ts +0 -9
- package/dist/lib/utils/math.cjs +0 -13
- package/dist/lib/utils/math.d.ts +0 -2
- package/dist/lib/utils/math.js +0 -13
- package/dist/lib/utils/utils.d.ts +0 -3
- package/dist/themes/momotaro/components/button.css.cjs +0 -110
- package/dist/themes/momotaro/components/button.css.d.ts +0 -1
- package/dist/themes/momotaro/components/button.css.js +0 -110
- package/dist/themes/momotaro/components/checkbox.css.cjs +0 -64
- package/dist/themes/momotaro/components/checkbox.css.d.ts +0 -1
- package/dist/themes/momotaro/components/checkbox.css.js +0 -64
- package/dist/themes/momotaro/components/dialog.css.cjs +0 -82
- package/dist/themes/momotaro/components/dialog.css.d.ts +0 -1
- package/dist/themes/momotaro/components/dialog.css.js +0 -82
- package/dist/themes/momotaro/components/divider.css.cjs +0 -16
- package/dist/themes/momotaro/components/divider.css.d.ts +0 -1
- package/dist/themes/momotaro/components/divider.css.js +0 -16
- package/dist/themes/momotaro/components/helpers.css.cjs +0 -47
- package/dist/themes/momotaro/components/helpers.css.d.ts +0 -8
- package/dist/themes/momotaro/components/helpers.css.js +0 -47
- package/dist/themes/momotaro/components/index.cjs +0 -35
- package/dist/themes/momotaro/components/index.d.ts +0 -2
- package/dist/themes/momotaro/components/index.js +0 -35
- package/dist/themes/momotaro/components/input.css.cjs +0 -48
- package/dist/themes/momotaro/components/input.css.d.ts +0 -1
- package/dist/themes/momotaro/components/input.css.js +0 -48
- package/dist/themes/momotaro/components/label.css.cjs +0 -34
- package/dist/themes/momotaro/components/label.css.d.ts +0 -1
- package/dist/themes/momotaro/components/label.css.js +0 -34
- package/dist/themes/momotaro/components/link.css.cjs +0 -57
- package/dist/themes/momotaro/components/link.css.d.ts +0 -1
- package/dist/themes/momotaro/components/link.css.js +0 -57
- package/dist/themes/momotaro/components/popover.css.cjs +0 -33
- package/dist/themes/momotaro/components/popover.css.d.ts +0 -1
- package/dist/themes/momotaro/components/popover.css.js +0 -33
- package/dist/themes/momotaro/components/progress.css.cjs +0 -59
- package/dist/themes/momotaro/components/progress.css.d.ts +0 -1
- package/dist/themes/momotaro/components/progress.css.js +0 -59
- package/dist/themes/momotaro/components/radio.css.cjs +0 -65
- package/dist/themes/momotaro/components/radio.css.d.ts +0 -1
- package/dist/themes/momotaro/components/radio.css.js +0 -65
- package/dist/themes/momotaro/components/select.css.cjs +0 -48
- package/dist/themes/momotaro/components/select.css.d.ts +0 -1
- package/dist/themes/momotaro/components/select.css.js +0 -48
- package/dist/themes/momotaro/components/slider.css.cjs +0 -93
- package/dist/themes/momotaro/components/slider.css.d.ts +0 -1
- package/dist/themes/momotaro/components/slider.css.js +0 -93
- package/dist/themes/momotaro/components/spinner.css.cjs +0 -44
- package/dist/themes/momotaro/components/spinner.css.d.ts +0 -1
- package/dist/themes/momotaro/components/spinner.css.js +0 -44
- package/dist/themes/momotaro/components/switch.css.cjs +0 -62
- package/dist/themes/momotaro/components/switch.css.d.ts +0 -1
- package/dist/themes/momotaro/components/switch.css.js +0 -62
- package/dist/themes/momotaro/components/tooltip.css.cjs +0 -31
- package/dist/themes/momotaro/components/tooltip.css.d.ts +0 -1
- package/dist/themes/momotaro/components/tooltip.css.js +0 -31
- package/dist/themes/momotaro/components/transitions.cjs +0 -4
- package/dist/themes/momotaro/components/transitions.d.ts +0 -1
- package/dist/themes/momotaro/components/transitions.js +0 -4
- package/dist/themes/momotaro/index.d.ts +0 -1
- package/dist/themes/momotaro/momotaro.css.cjs +0 -14
- package/dist/themes/momotaro/momotaro.css.d.ts +0 -1
- package/dist/themes/momotaro/momotaro.css.js +0 -14
- package/dist/themes/momotaro/tokens.css.cjs +0 -86
- package/dist/themes/momotaro/tokens.css.d.ts +0 -2
- package/dist/themes/momotaro/tokens.css.js +0 -86
- package/dist/themes/momotaro.cjs +0 -4
- package/dist/themes/momotaro.js +0 -4
- package/themes/momotaro/index.d.ts +0 -1
- package/themes/momotaro/package.json +0 -5
- /package/dist/{entries/reset.d.ts → index.spec.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const divider: string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import { blocksLayer } from "../../../lib/css/layers/layers.css.js";
|
|
4
|
-
setFileScope("src/components/display/Divider/divider.css.ts", "@blockle/blocks");
|
|
5
|
-
const divider = style({
|
|
6
|
-
"@layer": {
|
|
7
|
-
[blocksLayer]: {
|
|
8
|
-
clear: "both",
|
|
9
|
-
blockSize: "1px"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
endFileScope();
|
|
14
|
-
export {
|
|
15
|
-
divider
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Divider, type DividerProps } from './Divider';
|
|
@@ -1,54 +0,0 @@
|
|
|
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;
|
|
@@ -1,16 +0,0 @@
|
|
|
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>;
|
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Progress, type ProgressProps } from './Progress';
|
|
@@ -1,26 +0,0 @@
|
|
|
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;
|
|
@@ -1,9 +0,0 @@
|
|
|
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>;
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Spinner, type SpinnerProps } from './Spinner';
|
|
@@ -1,59 +0,0 @@
|
|
|
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,16 +0,0 @@
|
|
|
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 layers_css = require("../../../lib/css/layers/layers.css.cjs");
|
|
6
|
-
fileScope.setFileScope("src/components/form/Button/Button.css.ts", "@blockle/blocks");
|
|
7
|
-
const buttonReset = css.style({
|
|
8
|
-
"@layer": {
|
|
9
|
-
[layers_css.blocksLayer]: {
|
|
10
|
-
all: "unset",
|
|
11
|
-
cursor: "pointer"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
fileScope.endFileScope();
|
|
16
|
-
exports.buttonReset = buttonReset;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buttonReset: string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import { blocksLayer } from "../../../lib/css/layers/layers.css.js";
|
|
4
|
-
setFileScope("src/components/form/Button/Button.css.ts", "@blockle/blocks");
|
|
5
|
-
const buttonReset = style({
|
|
6
|
-
"@layer": {
|
|
7
|
-
[blocksLayer]: {
|
|
8
|
-
all: "unset",
|
|
9
|
-
cursor: "pointer"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
endFileScope();
|
|
14
|
-
export {
|
|
15
|
-
buttonReset
|
|
16
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
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,59 +0,0 @@
|
|
|
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";
|
|
9
|
-
const { Template, Slot } = createAsChildTemplate("button");
|
|
10
|
-
const Button = ({
|
|
11
|
-
asChild,
|
|
12
|
-
children,
|
|
13
|
-
className,
|
|
14
|
-
disabled,
|
|
15
|
-
endSlot,
|
|
16
|
-
intent,
|
|
17
|
-
loading,
|
|
18
|
-
ref,
|
|
19
|
-
size,
|
|
20
|
-
startSlot,
|
|
21
|
-
variant,
|
|
22
|
-
...restProps
|
|
23
|
-
}) => {
|
|
24
|
-
const buttonClassName = getComponentStyles("button", {
|
|
25
|
-
base: true,
|
|
26
|
-
variants: {
|
|
27
|
-
variant,
|
|
28
|
-
intent,
|
|
29
|
-
size,
|
|
30
|
-
disabled,
|
|
31
|
-
loading
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const [atomsProps, otherProps] = getAtomsAndProps(restProps);
|
|
35
|
-
return /* @__PURE__ */ jsxs(
|
|
36
|
-
Template,
|
|
37
|
-
{
|
|
38
|
-
ref,
|
|
39
|
-
asChild,
|
|
40
|
-
disabled: disabled || loading,
|
|
41
|
-
className: classnames(
|
|
42
|
-
buttonReset,
|
|
43
|
-
buttonClassName,
|
|
44
|
-
atoms(atomsProps),
|
|
45
|
-
className
|
|
46
|
-
),
|
|
47
|
-
...otherProps,
|
|
48
|
-
children: [
|
|
49
|
-
startSlot && /* @__PURE__ */ jsx("div", { children: startSlot }),
|
|
50
|
-
loading && /* @__PURE__ */ jsx(Spinner, { size }),
|
|
51
|
-
/* @__PURE__ */ jsx(Slot, { children }),
|
|
52
|
-
endSlot && /* @__PURE__ */ jsx("div", { children: endSlot })
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
Button
|
|
59
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
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>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button, type ButtonProps } from './Button';
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const react = require("react");
|
|
5
|
-
const theme = require("../../../lib/theme/store/theme.cjs");
|
|
6
|
-
const classnames = require("../../../lib/utils/classnames.cjs");
|
|
7
|
-
const Label = require("../Label/Label.cjs");
|
|
8
|
-
const checkbox_css = require("./checkbox.css.cjs");
|
|
9
|
-
const Checkbox = ({
|
|
10
|
-
children,
|
|
11
|
-
className,
|
|
12
|
-
id,
|
|
13
|
-
name,
|
|
14
|
-
ref,
|
|
15
|
-
required,
|
|
16
|
-
...restProps
|
|
17
|
-
}) => {
|
|
18
|
-
const containerClassName = theme.getComponentStyles(
|
|
19
|
-
"checkbox",
|
|
20
|
-
{ base: true },
|
|
21
|
-
false
|
|
22
|
-
);
|
|
23
|
-
const iconClassName = theme.getComponentStyles("checkbox", { icon: true }, false);
|
|
24
|
-
const labelClassName = theme.getComponentStyles("checkbox", { label: true }, false);
|
|
25
|
-
const reactId = react.useId();
|
|
26
|
-
const inputId = id || reactId;
|
|
27
|
-
const input = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
28
|
-
"div",
|
|
29
|
-
{
|
|
30
|
-
className: classnames.classnames(checkbox_css.container, containerClassName, className),
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33
|
-
"input",
|
|
34
|
-
{
|
|
35
|
-
ref,
|
|
36
|
-
type: "checkbox",
|
|
37
|
-
name,
|
|
38
|
-
id: inputId,
|
|
39
|
-
className: checkbox_css.input,
|
|
40
|
-
...restProps
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classnames.classnames(checkbox_css.icon, iconClassName), "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, {}) })
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
if (!children) {
|
|
48
|
-
return input;
|
|
49
|
-
}
|
|
50
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: labelClassName, children: [
|
|
51
|
-
input,
|
|
52
|
-
children && /* @__PURE__ */ jsxRuntime.jsx(Label.Label, { required, htmlFor: inputId, children })
|
|
53
|
-
] });
|
|
54
|
-
};
|
|
55
|
-
const DefaultIcon = () => {
|
|
56
|
-
return (
|
|
57
|
-
// TOOD - replace with actual icon component renderer
|
|
58
|
-
// biome-ignore lint/a11y/noSvgWithoutTitle: <explanation>
|
|
59
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
-
"svg",
|
|
61
|
-
{
|
|
62
|
-
viewBox: "0 0 24 24",
|
|
63
|
-
fill: "none",
|
|
64
|
-
strokeWidth: "1.5",
|
|
65
|
-
stroke: "currentColor",
|
|
66
|
-
style: { width: "1rem", height: "1rem", display: "block" },
|
|
67
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
68
|
-
"path",
|
|
69
|
-
{
|
|
70
|
-
strokeLinecap: "round",
|
|
71
|
-
strokeLinejoin: "round",
|
|
72
|
-
d: "m4.5 12.75 6 6 9-13.5"
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
exports.Checkbox = Checkbox;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { HTMLElementProps } from '../../../lib/utils/utils';
|
|
3
|
-
export type CheckboxProps = {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
name: string;
|
|
6
|
-
ref?: React.Ref<HTMLInputElement>;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
} & HTMLElementProps<HTMLInputElement>;
|
|
9
|
-
export declare const Checkbox: React.FC<CheckboxProps>;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useId } from "react";
|
|
3
|
-
import { getComponentStyles } from "../../../lib/theme/store/theme.js";
|
|
4
|
-
import { classnames } from "../../../lib/utils/classnames.js";
|
|
5
|
-
import { Label } from "../Label/Label.js";
|
|
6
|
-
import { input, icon, container } from "./checkbox.css.js";
|
|
7
|
-
const Checkbox = ({
|
|
8
|
-
children,
|
|
9
|
-
className,
|
|
10
|
-
id,
|
|
11
|
-
name,
|
|
12
|
-
ref,
|
|
13
|
-
required,
|
|
14
|
-
...restProps
|
|
15
|
-
}) => {
|
|
16
|
-
const containerClassName = getComponentStyles(
|
|
17
|
-
"checkbox",
|
|
18
|
-
{ base: true },
|
|
19
|
-
false
|
|
20
|
-
);
|
|
21
|
-
const iconClassName = getComponentStyles("checkbox", { icon: true }, false);
|
|
22
|
-
const labelClassName = getComponentStyles("checkbox", { label: true }, false);
|
|
23
|
-
const reactId = useId();
|
|
24
|
-
const inputId = id || reactId;
|
|
25
|
-
const input$1 = /* @__PURE__ */ jsxs(
|
|
26
|
-
"div",
|
|
27
|
-
{
|
|
28
|
-
className: classnames(container, containerClassName, className),
|
|
29
|
-
children: [
|
|
30
|
-
/* @__PURE__ */ jsx(
|
|
31
|
-
"input",
|
|
32
|
-
{
|
|
33
|
-
ref,
|
|
34
|
-
type: "checkbox",
|
|
35
|
-
name,
|
|
36
|
-
id: inputId,
|
|
37
|
-
className: input,
|
|
38
|
-
...restProps
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ jsx("div", { className: classnames(icon, iconClassName), "aria-hidden": true, children: /* @__PURE__ */ jsx(DefaultIcon, {}) })
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
if (!children) {
|
|
46
|
-
return input$1;
|
|
47
|
-
}
|
|
48
|
-
return /* @__PURE__ */ jsxs("span", { className: labelClassName, children: [
|
|
49
|
-
input$1,
|
|
50
|
-
children && /* @__PURE__ */ jsx(Label, { required, htmlFor: inputId, children })
|
|
51
|
-
] });
|
|
52
|
-
};
|
|
53
|
-
const DefaultIcon = () => {
|
|
54
|
-
return (
|
|
55
|
-
// TOOD - replace with actual icon component renderer
|
|
56
|
-
// biome-ignore lint/a11y/noSvgWithoutTitle: <explanation>
|
|
57
|
-
/* @__PURE__ */ jsx(
|
|
58
|
-
"svg",
|
|
59
|
-
{
|
|
60
|
-
viewBox: "0 0 24 24",
|
|
61
|
-
fill: "none",
|
|
62
|
-
strokeWidth: "1.5",
|
|
63
|
-
stroke: "currentColor",
|
|
64
|
-
style: { width: "1rem", height: "1rem", display: "block" },
|
|
65
|
-
children: /* @__PURE__ */ jsx(
|
|
66
|
-
"path",
|
|
67
|
-
{
|
|
68
|
-
strokeLinecap: "round",
|
|
69
|
-
strokeLinejoin: "round",
|
|
70
|
-
d: "m4.5 12.75 6 6 9-13.5"
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
export {
|
|
78
|
-
Checkbox
|
|
79
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
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 layers_css = require("../../../lib/css/layers/layers.css.cjs");
|
|
6
|
-
fileScope.setFileScope("src/components/form/Checkbox/checkbox.css.ts", "@blockle/blocks");
|
|
7
|
-
const container = css.style({
|
|
8
|
-
"@layer": {
|
|
9
|
-
[layers_css.blocksLayer]: {
|
|
10
|
-
position: "relative",
|
|
11
|
-
cursor: "pointer",
|
|
12
|
-
overflow: "hidden"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
const input = css.style({
|
|
17
|
-
position: "absolute",
|
|
18
|
-
inset: 0,
|
|
19
|
-
opacity: 0,
|
|
20
|
-
"@layer": {
|
|
21
|
-
[layers_css.blocksLayer]: {
|
|
22
|
-
all: "unset"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
const icon = css.style({
|
|
27
|
-
pointerEvents: "none"
|
|
28
|
-
});
|
|
29
|
-
fileScope.endFileScope();
|
|
30
|
-
exports.container = container;
|
|
31
|
-
exports.icon = icon;
|
|
32
|
-
exports.input = input;
|