@blockle/blocks 0.18.4 → 0.19.1
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/index.cjs +25 -9
- package/dist/index.mjs +25 -9
- package/dist/momotaro.chunk.d.ts +52 -314
- package/dist/styles/components/display/Divider/Divider.cjs +48 -35
- package/dist/styles/components/display/Divider/Divider.mjs +49 -36
- package/dist/styles/components/form/Button/Button.cjs +9 -9
- package/dist/styles/components/form/Button/Button.mjs +9 -9
- package/dist/styles/components/form/Checkbox/Checkbox.cjs +10 -2
- package/dist/styles/components/form/Checkbox/Checkbox.mjs +12 -4
- package/dist/styles/components/form/Input/Input.cjs +11 -2
- package/dist/styles/components/form/Input/Input.mjs +12 -3
- package/dist/styles/components/form/Radio/Radio.cjs +2 -3
- package/dist/styles/components/form/Radio/Radio.mjs +3 -4
- package/dist/styles/components/form/Select/Select.cjs +9 -3
- package/dist/styles/components/form/Select/Select.mjs +10 -4
- package/dist/styles/components/form/Slider/Slider.cjs +5 -1
- package/dist/styles/components/form/Slider/Slider.mjs +6 -2
- package/dist/styles/components/form/Switch/Switch.cjs +9 -2
- package/dist/styles/components/form/Switch/Switch.mjs +11 -4
- package/dist/styles/components/other/BlocksProvider/BlocksProvider.cjs +2 -12
- package/dist/styles/components/other/BlocksProvider/BlocksProvider.mjs +3 -13
- package/dist/styles/components/typography/Text/Text.cjs +14 -4
- package/dist/styles/components/typography/Text/Text.mjs +14 -4
- package/dist/styles/lib/css/atoms/sprinkles.css.mjs +1 -1
- package/dist/styles/themes/momotaro/components/button.css.mjs +1 -1
- package/dist/styles/themes/momotaro/components/helpers.css.mjs +1 -1
- package/dist/styles/themes/momotaro/components/progress.css.mjs +1 -1
- package/dist/styles/themes/momotaro/components/spinner.css.mjs +1 -1
- package/package.json +34 -34
package/dist/momotaro.chunk.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleRule } from '@vanilla-extract/css';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import React$1, { useEffect } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as _vanilla_extract_sprinkles from '@vanilla-extract/sprinkles';
|
|
5
5
|
|
|
6
6
|
declare const atoms: ((props: {
|
|
@@ -621,13 +621,14 @@ type ProgressProps = {
|
|
|
621
621
|
className?: string;
|
|
622
622
|
indeterminate?: boolean;
|
|
623
623
|
max?: number;
|
|
624
|
-
style?: React.CSSProperties;
|
|
624
|
+
style?: React$1.CSSProperties;
|
|
625
625
|
/**
|
|
626
626
|
* The value of the progress bar, between 0 and max=100.
|
|
627
627
|
*/
|
|
628
628
|
value?: number;
|
|
629
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
629
630
|
};
|
|
630
|
-
declare const Progress:
|
|
631
|
+
declare const Progress: React$1.FC<ProgressProps>;
|
|
631
632
|
|
|
632
633
|
type SpinnerProps = {
|
|
633
634
|
className?: string;
|
|
@@ -638,61 +639,40 @@ type SpinnerProps = {
|
|
|
638
639
|
declare const Spinner: React.FC<SpinnerProps>;
|
|
639
640
|
|
|
640
641
|
type ButtonProps = {
|
|
641
|
-
children: React.ReactNode;
|
|
642
|
-
type?: 'button' | 'submit' | 'reset';
|
|
643
|
-
variant?: ButtonTheme['variants']['variant'];
|
|
644
|
-
intent?: ButtonTheme['variants']['intent'];
|
|
645
|
-
size?: ButtonTheme['variants']['size'];
|
|
646
|
-
inlineSize?: Atoms['inlineSize'];
|
|
647
642
|
alignSelf?: Atoms['alignSelf'];
|
|
648
|
-
loading?: boolean;
|
|
649
|
-
startSlot?: React.ReactNode;
|
|
650
|
-
endSlot?: React.ReactNode;
|
|
651
|
-
disabled?: boolean;
|
|
652
643
|
asChild?: boolean;
|
|
653
|
-
|
|
654
|
-
} & Omit<HTMLElementProps<HTMLButtonElement>, 'size'> & MarginAtoms;
|
|
655
|
-
declare const Button: react.ForwardRefExoticComponent<{
|
|
656
|
-
children: React.ReactNode;
|
|
657
|
-
type?: "button" | "submit" | "reset";
|
|
658
|
-
variant?: ButtonTheme["variants"]["variant"];
|
|
659
|
-
intent?: ButtonTheme["variants"]["intent"];
|
|
660
|
-
size?: ButtonTheme["variants"]["size"];
|
|
661
|
-
inlineSize?: Atoms["inlineSize"];
|
|
662
|
-
alignSelf?: Atoms["alignSelf"];
|
|
663
|
-
loading?: boolean;
|
|
664
|
-
startSlot?: React.ReactNode;
|
|
665
|
-
endSlot?: React.ReactNode;
|
|
644
|
+
children: React$1.ReactNode;
|
|
666
645
|
disabled?: boolean;
|
|
667
|
-
|
|
646
|
+
endSlot?: React$1.ReactNode;
|
|
647
|
+
inlineSize?: Atoms['inlineSize'];
|
|
648
|
+
intent?: ButtonTheme['variants']['intent'];
|
|
649
|
+
loading?: boolean;
|
|
668
650
|
popovertarget?: string;
|
|
669
|
-
|
|
651
|
+
ref?: React$1.Ref<HTMLButtonElement>;
|
|
652
|
+
size?: ButtonTheme['variants']['size'];
|
|
653
|
+
startSlot?: React$1.ReactNode;
|
|
654
|
+
type?: 'button' | 'submit' | 'reset';
|
|
655
|
+
variant?: ButtonTheme['variants']['variant'];
|
|
656
|
+
} & Omit<HTMLElementProps<HTMLButtonElement>, 'size'> & MarginAtoms;
|
|
657
|
+
declare const Button: React$1.FC<ButtonProps>;
|
|
670
658
|
|
|
671
659
|
type CheckboxProps = {
|
|
660
|
+
children?: React$1.ReactNode;
|
|
672
661
|
name: string;
|
|
673
|
-
|
|
662
|
+
ref?: React$1.Ref<HTMLInputElement>;
|
|
674
663
|
required?: boolean;
|
|
675
664
|
} & HTMLElementProps<HTMLInputElement>;
|
|
676
|
-
declare const Checkbox:
|
|
677
|
-
name: string;
|
|
678
|
-
children?: react__default.ReactNode;
|
|
679
|
-
required?: boolean;
|
|
680
|
-
} & HTMLElementProps<HTMLInputElement> & react__default.RefAttributes<HTMLInputElement>>;
|
|
665
|
+
declare const Checkbox: React$1.FC<CheckboxProps>;
|
|
681
666
|
|
|
682
667
|
type InputProps = {
|
|
683
668
|
className?: string;
|
|
684
|
-
name: string;
|
|
685
|
-
type?: OptionalLiteral<'email' | 'number' | 'password' | 'tel' | 'text' | 'url'>;
|
|
686
|
-
startSlot?: React.ReactNode;
|
|
687
669
|
endSlot?: React.ReactNode;
|
|
688
|
-
} & Omit<HTMLElementProps<HTMLInputElement>, 'type'>;
|
|
689
|
-
declare const Input: react.ForwardRefExoticComponent<{
|
|
690
|
-
className?: string;
|
|
691
670
|
name: string;
|
|
692
|
-
|
|
671
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
693
672
|
startSlot?: React.ReactNode;
|
|
694
|
-
|
|
695
|
-
} & Omit<HTMLElementProps<HTMLInputElement>,
|
|
673
|
+
type?: OptionalLiteral<'email' | 'number' | 'password' | 'tel' | 'text' | 'url'>;
|
|
674
|
+
} & Omit<HTMLElementProps<HTMLInputElement>, 'type'>;
|
|
675
|
+
declare const Input: React.FC<InputProps>;
|
|
696
676
|
|
|
697
677
|
type LabelProps = {
|
|
698
678
|
/**
|
|
@@ -711,26 +691,20 @@ type LabelProps = {
|
|
|
711
691
|
declare const Label: React.FC<LabelProps>;
|
|
712
692
|
|
|
713
693
|
type RadioProps = {
|
|
714
|
-
name: string;
|
|
715
|
-
value: string;
|
|
716
694
|
children?: React.ReactNode;
|
|
717
|
-
} & HTMLElementProps<HTMLInputElement>;
|
|
718
|
-
declare const Radio: react.ForwardRefExoticComponent<{
|
|
719
695
|
name: string;
|
|
696
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
720
697
|
value: string;
|
|
721
|
-
|
|
722
|
-
|
|
698
|
+
} & HTMLElementProps<HTMLInputElement>;
|
|
699
|
+
declare const Radio: React.FC<RadioProps>;
|
|
723
700
|
|
|
724
701
|
type SelectProps = {
|
|
725
|
-
children:
|
|
702
|
+
children: React$1.ReactNode;
|
|
726
703
|
placeholder?: string;
|
|
704
|
+
ref?: React$1.Ref<HTMLSelectElement>;
|
|
727
705
|
variant?: SelectTheme['variants']['variant'];
|
|
728
706
|
} & HTMLElementProps<HTMLSelectElement>;
|
|
729
|
-
declare const Select:
|
|
730
|
-
children: react__default.ReactNode;
|
|
731
|
-
placeholder?: string;
|
|
732
|
-
variant?: SelectTheme["variants"]["variant"];
|
|
733
|
-
} & HTMLElementProps<HTMLSelectElement> & react__default.RefAttributes<HTMLSelectElement>>;
|
|
707
|
+
declare const Select: React$1.FC<SelectProps>;
|
|
734
708
|
|
|
735
709
|
type SliderProps = {
|
|
736
710
|
name?: string;
|
|
@@ -749,257 +723,22 @@ type SliderProps = {
|
|
|
749
723
|
disabled?: boolean;
|
|
750
724
|
precision?: number;
|
|
751
725
|
};
|
|
752
|
-
declare const Slider:
|
|
726
|
+
declare const Slider: React$1.FC<SliderProps>;
|
|
753
727
|
|
|
754
728
|
type SwitchProps = {
|
|
755
729
|
onChange?: (value: boolean) => void;
|
|
730
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
756
731
|
} & Omit<HTMLElementProps<HTMLInputElement>, 'onChange'>;
|
|
757
|
-
declare const Switch:
|
|
758
|
-
onChange?: (value: boolean) => void;
|
|
759
|
-
} & Omit<HTMLElementProps<HTMLInputElement>, "onChange"> & react.RefAttributes<HTMLInputElement>>;
|
|
732
|
+
declare const Switch: React.FC<SwitchProps>;
|
|
760
733
|
|
|
761
734
|
type BoxProps = {
|
|
762
|
-
children?: React.ReactNode;
|
|
763
|
-
className?: string;
|
|
764
|
-
style?: React.CSSProperties;
|
|
765
735
|
asChild?: boolean;
|
|
766
|
-
|
|
767
|
-
declare const Box: react.ForwardRefExoticComponent<{
|
|
768
|
-
children?: React.ReactNode;
|
|
736
|
+
children?: React$1.ReactNode;
|
|
769
737
|
className?: string;
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
} &
|
|
773
|
-
|
|
774
|
-
readonly borderColor?: "white" | "black" | "body" | "primaryLight" | "primary" | "primaryDark" | "secondaryLight" | "secondary" | "secondaryDark" | "text" | "textLight" | "textDark" | "danger" | "link" | "currentColor" | undefined;
|
|
775
|
-
readonly borderRadius?: ("small" | "medium" | "large" | "xlarge") | undefined;
|
|
776
|
-
readonly borderWidth?: ("small" | "medium" | "large") | undefined;
|
|
777
|
-
readonly border?: "none" | undefined;
|
|
778
|
-
readonly insetBlock?: 0 | undefined;
|
|
779
|
-
readonly insetBlockStart?: 0 | undefined;
|
|
780
|
-
readonly insetBlockEnd?: 0 | undefined;
|
|
781
|
-
readonly insetInline?: 0 | undefined;
|
|
782
|
-
readonly insetInlineStart?: 0 | undefined;
|
|
783
|
-
readonly insetInlineEnd?: 0 | undefined;
|
|
784
|
-
readonly boxShadow?: ("small" | "medium" | "large") | undefined;
|
|
785
|
-
readonly color?: "white" | "black" | "body" | "primaryLight" | "primary" | "primaryDark" | "secondaryLight" | "secondary" | "secondaryDark" | "text" | "textLight" | "textDark" | "danger" | "link" | "currentColor" | undefined;
|
|
786
|
-
readonly cursor?: "auto" | "pointer" | undefined;
|
|
787
|
-
readonly fontFamily?: "body" | "primary" | "secondary" | undefined;
|
|
788
|
-
readonly fontStyle?: "normal" | "italic" | "oblique" | undefined;
|
|
789
|
-
readonly fontWeight?: ("medium" | "regular" | "strong") | undefined;
|
|
790
|
-
readonly lineHeight?: ("xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
791
|
-
readonly blockSize?: "auto" | "fit-content" | "full" | undefined;
|
|
792
|
-
readonly maxBlockSize?: "auto" | "fit-content" | "full" | undefined;
|
|
793
|
-
readonly inlineSize?: "auto" | "fit-content" | "full" | undefined;
|
|
794
|
-
readonly maxInlineSize?: "auto" | "fit-content" | "full" | undefined;
|
|
795
|
-
readonly opacity?: 0 | 1 | undefined;
|
|
796
|
-
readonly overflow?: "auto" | "hidden" | "scroll" | "visible" | undefined;
|
|
797
|
-
readonly overflowBlock?: "auto" | "hidden" | "scroll" | "visible" | undefined;
|
|
798
|
-
readonly overflowInline?: "auto" | "hidden" | "scroll" | "visible" | undefined;
|
|
799
|
-
readonly pointerEvents?: "none" | undefined;
|
|
800
|
-
readonly textDecoration?: "none" | "overline" | "line-through" | "underline" | undefined;
|
|
801
|
-
readonly textTransform?: "lowercase" | "uppercase" | "capitalize" | undefined;
|
|
802
|
-
readonly textWrap?: "balance" | "wrap" | undefined;
|
|
803
|
-
readonly transition?: ("slow" | "normal" | "fast") | undefined;
|
|
804
|
-
readonly userSelect?: "none" | undefined;
|
|
805
|
-
readonly whiteSpace?: "nowrap" | "pre" | "pre-line" | "pre-wrap" | undefined;
|
|
806
|
-
readonly wordBreak?: "break-word" | undefined;
|
|
807
|
-
readonly wordWrap?: "break-word" | undefined;
|
|
808
|
-
inset?: 0 | undefined;
|
|
809
|
-
} & {
|
|
810
|
-
readonly alignContent?: ("stretch" | "center" | "flex-start" | "flex-end" | {
|
|
811
|
-
mobile?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
812
|
-
tablet?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
813
|
-
desktop?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
814
|
-
wide?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
815
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "stretch" | "center" | "flex-start" | "flex-end" | null>;
|
|
816
|
-
readonly alignItems?: ("stretch" | "center" | "flex-start" | "flex-end" | {
|
|
817
|
-
mobile?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
818
|
-
tablet?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
819
|
-
desktop?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
820
|
-
wide?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
821
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "stretch" | "center" | "flex-start" | "flex-end" | null>;
|
|
822
|
-
readonly alignSelf?: ("stretch" | "center" | "flex-start" | "flex-end" | {
|
|
823
|
-
mobile?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
824
|
-
tablet?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
825
|
-
desktop?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
826
|
-
wide?: "stretch" | "center" | "flex-start" | "flex-end" | undefined;
|
|
827
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "stretch" | "center" | "flex-start" | "flex-end" | null>;
|
|
828
|
-
readonly columnGap?: (("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
829
|
-
mobile?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
830
|
-
tablet?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
831
|
-
desktop?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
832
|
-
wide?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
833
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
834
|
-
readonly display?: ("none" | "flex" | "grid" | "inline-flex" | "block" | "inline" | "inline-block" | "inline-grid" | {
|
|
835
|
-
mobile?: "none" | "flex" | "grid" | "inline-flex" | "block" | "inline" | "inline-block" | "inline-grid" | undefined;
|
|
836
|
-
tablet?: "none" | "flex" | "grid" | "inline-flex" | "block" | "inline" | "inline-block" | "inline-grid" | undefined;
|
|
837
|
-
desktop?: "none" | "flex" | "grid" | "inline-flex" | "block" | "inline" | "inline-block" | "inline-grid" | undefined;
|
|
838
|
-
wide?: "none" | "flex" | "grid" | "inline-flex" | "block" | "inline" | "inline-block" | "inline-grid" | undefined;
|
|
839
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "none" | "flex" | "grid" | "inline-flex" | "block" | "inline" | "inline-block" | "inline-grid" | null>;
|
|
840
|
-
readonly flex?: (1 | {
|
|
841
|
-
mobile?: 1 | undefined;
|
|
842
|
-
tablet?: 1 | undefined;
|
|
843
|
-
desktop?: 1 | undefined;
|
|
844
|
-
wide?: 1 | undefined;
|
|
845
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, 1 | null>;
|
|
846
|
-
readonly flexDirection?: ("row" | "row-reverse" | "column" | "column-reverse" | {
|
|
847
|
-
mobile?: "row" | "row-reverse" | "column" | "column-reverse" | undefined;
|
|
848
|
-
tablet?: "row" | "row-reverse" | "column" | "column-reverse" | undefined;
|
|
849
|
-
desktop?: "row" | "row-reverse" | "column" | "column-reverse" | undefined;
|
|
850
|
-
wide?: "row" | "row-reverse" | "column" | "column-reverse" | undefined;
|
|
851
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "row" | "row-reverse" | "column" | "column-reverse" | null>;
|
|
852
|
-
readonly flexGrow?: (0 | 1 | {
|
|
853
|
-
mobile?: 0 | 1 | undefined;
|
|
854
|
-
tablet?: 0 | 1 | undefined;
|
|
855
|
-
desktop?: 0 | 1 | undefined;
|
|
856
|
-
wide?: 0 | 1 | undefined;
|
|
857
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, 0 | 1 | null>;
|
|
858
|
-
readonly flexShrink?: (0 | 1 | {
|
|
859
|
-
mobile?: 0 | 1 | undefined;
|
|
860
|
-
tablet?: 0 | 1 | undefined;
|
|
861
|
-
desktop?: 0 | 1 | undefined;
|
|
862
|
-
wide?: 0 | 1 | undefined;
|
|
863
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, 0 | 1 | null>;
|
|
864
|
-
readonly flexWrap?: ("wrap" | "nowrap" | {
|
|
865
|
-
mobile?: "wrap" | "nowrap" | undefined;
|
|
866
|
-
tablet?: "wrap" | "nowrap" | undefined;
|
|
867
|
-
desktop?: "wrap" | "nowrap" | undefined;
|
|
868
|
-
wide?: "wrap" | "nowrap" | undefined;
|
|
869
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "wrap" | "nowrap" | null>;
|
|
870
|
-
readonly fontSize?: (("xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
871
|
-
mobile?: ("xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
872
|
-
tablet?: ("xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
873
|
-
desktop?: ("xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
874
|
-
wide?: ("xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
875
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
876
|
-
readonly gap?: (("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
877
|
-
mobile?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
878
|
-
tablet?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
879
|
-
desktop?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
880
|
-
wide?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
881
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
882
|
-
readonly justifyContent?: ("center" | "flex-start" | "flex-end" | "space-between" | "space-around" | {
|
|
883
|
-
mobile?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | undefined;
|
|
884
|
-
tablet?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | undefined;
|
|
885
|
-
desktop?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | undefined;
|
|
886
|
-
wide?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | undefined;
|
|
887
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | null>;
|
|
888
|
-
readonly marginBlockStart?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | {
|
|
889
|
-
mobile?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
890
|
-
tablet?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
891
|
-
desktop?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
892
|
-
wide?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
893
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | null>;
|
|
894
|
-
readonly marginBlockEnd?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | {
|
|
895
|
-
mobile?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
896
|
-
tablet?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
897
|
-
desktop?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
898
|
-
wide?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
899
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | null>;
|
|
900
|
-
readonly marginInlineStart?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | {
|
|
901
|
-
mobile?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
902
|
-
tablet?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
903
|
-
desktop?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
904
|
-
wide?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
905
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | null>;
|
|
906
|
-
readonly marginInlineEnd?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | {
|
|
907
|
-
mobile?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
908
|
-
tablet?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
909
|
-
desktop?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
910
|
-
wide?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
911
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | null>;
|
|
912
|
-
readonly outline?: ("none" | {
|
|
913
|
-
mobile?: "none" | undefined;
|
|
914
|
-
tablet?: "none" | undefined;
|
|
915
|
-
desktop?: "none" | undefined;
|
|
916
|
-
wide?: "none" | undefined;
|
|
917
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "none" | null>;
|
|
918
|
-
readonly padding?: (("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
919
|
-
mobile?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
920
|
-
tablet?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
921
|
-
desktop?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
922
|
-
wide?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
923
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
924
|
-
readonly paddingBlock?: (("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
925
|
-
mobile?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
926
|
-
tablet?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
927
|
-
desktop?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
928
|
-
wide?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
929
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
930
|
-
readonly paddingBlockStart?: (("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
931
|
-
mobile?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
932
|
-
tablet?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
933
|
-
desktop?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
934
|
-
wide?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
935
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
936
|
-
readonly paddingBlockEnd?: (("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
937
|
-
mobile?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
938
|
-
tablet?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
939
|
-
desktop?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
940
|
-
wide?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
941
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
942
|
-
readonly paddingInline?: (("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
943
|
-
mobile?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
944
|
-
tablet?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
945
|
-
desktop?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
946
|
-
wide?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
947
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
948
|
-
readonly paddingInlineStart?: (("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
949
|
-
mobile?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
950
|
-
tablet?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
951
|
-
desktop?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
952
|
-
wide?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
953
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
954
|
-
readonly paddingInlineEnd?: (("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
955
|
-
mobile?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
956
|
-
tablet?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
957
|
-
desktop?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
958
|
-
wide?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
959
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
960
|
-
readonly position?: ("relative" | "fixed" | "absolute" | "sticky" | "static" | {
|
|
961
|
-
mobile?: "relative" | "fixed" | "absolute" | "sticky" | "static" | undefined;
|
|
962
|
-
tablet?: "relative" | "fixed" | "absolute" | "sticky" | "static" | undefined;
|
|
963
|
-
desktop?: "relative" | "fixed" | "absolute" | "sticky" | "static" | undefined;
|
|
964
|
-
wide?: "relative" | "fixed" | "absolute" | "sticky" | "static" | undefined;
|
|
965
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "relative" | "fixed" | "absolute" | "sticky" | "static" | null>;
|
|
966
|
-
readonly rowGap?: (("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | {
|
|
967
|
-
mobile?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
968
|
-
tablet?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
969
|
-
desktop?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
970
|
-
wide?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | undefined;
|
|
971
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge") | null>;
|
|
972
|
-
readonly textAlign?: ("left" | "right" | "center" | "justify" | {
|
|
973
|
-
mobile?: "left" | "right" | "center" | "justify" | undefined;
|
|
974
|
-
tablet?: "left" | "right" | "center" | "justify" | undefined;
|
|
975
|
-
desktop?: "left" | "right" | "center" | "justify" | undefined;
|
|
976
|
-
wide?: "left" | "right" | "center" | "justify" | undefined;
|
|
977
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "left" | "right" | "center" | "justify" | null>;
|
|
978
|
-
margin?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | {
|
|
979
|
-
mobile?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
980
|
-
tablet?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
981
|
-
desktop?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
982
|
-
wide?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
983
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | null>;
|
|
984
|
-
marginBlock?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | {
|
|
985
|
-
mobile?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
986
|
-
tablet?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
987
|
-
desktop?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
988
|
-
wide?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
989
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | null>;
|
|
990
|
-
marginInline?: ("none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | {
|
|
991
|
-
mobile?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
992
|
-
tablet?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
993
|
-
desktop?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
994
|
-
wide?: "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | undefined;
|
|
995
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "none" | "gutter" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "auto" | null>;
|
|
996
|
-
placeItems?: ("center" | "flex-start" | "flex-end" | {
|
|
997
|
-
mobile?: "center" | "flex-start" | "flex-end" | undefined;
|
|
998
|
-
tablet?: "center" | "flex-start" | "flex-end" | undefined;
|
|
999
|
-
desktop?: "center" | "flex-start" | "flex-end" | undefined;
|
|
1000
|
-
wide?: "center" | "flex-start" | "flex-end" | undefined;
|
|
1001
|
-
} | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<4 | 1 | 2 | 3, "center" | "flex-start" | "flex-end" | null>;
|
|
1002
|
-
} & HTMLElementProps<HTMLDivElement> & react.RefAttributes<unknown>>;
|
|
738
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
739
|
+
style?: React$1.CSSProperties;
|
|
740
|
+
} & Atoms & HTMLElementProps<HTMLDivElement>;
|
|
741
|
+
declare const Box: React$1.FC<BoxProps>;
|
|
1003
742
|
|
|
1004
743
|
declare const justifyContentMap: {
|
|
1005
744
|
readonly left: "flex-start";
|
|
@@ -1048,15 +787,11 @@ declare const Stack: React.FC<StackProps>;
|
|
|
1048
787
|
type LinkProps = {
|
|
1049
788
|
asChild?: boolean;
|
|
1050
789
|
children?: React.ReactNode;
|
|
790
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
1051
791
|
underline?: LinkTheme['variants']['underline'];
|
|
1052
792
|
variant?: LinkTheme['variants']['variant'];
|
|
1053
793
|
} & MarginAtoms & HTMLElementProps<HTMLAnchorElement>;
|
|
1054
|
-
declare const Link:
|
|
1055
|
-
asChild?: boolean;
|
|
1056
|
-
children?: React.ReactNode;
|
|
1057
|
-
underline?: LinkTheme["variants"]["underline"];
|
|
1058
|
-
variant?: LinkTheme["variants"]["variant"];
|
|
1059
|
-
} & MarginAtoms & HTMLElementProps<HTMLAnchorElement> & react.RefAttributes<HTMLAnchorElement>>;
|
|
794
|
+
declare const Link: React.FC<LinkProps>;
|
|
1060
795
|
|
|
1061
796
|
type BlocksProviderProps = {
|
|
1062
797
|
children: React.ReactNode;
|
|
@@ -1084,7 +819,7 @@ declare const Dialog: React.FC<DialogProps>;
|
|
|
1084
819
|
|
|
1085
820
|
type PopoverProps = {
|
|
1086
821
|
align?: 'top' | 'bottom' | 'left' | 'right';
|
|
1087
|
-
anchorElement: React.RefObject<HTMLElement>;
|
|
822
|
+
anchorElement: React.RefObject<HTMLElement | null>;
|
|
1088
823
|
children: React.ReactNode;
|
|
1089
824
|
className?: string;
|
|
1090
825
|
onRequestClose: () => void;
|
|
@@ -1109,16 +844,19 @@ type HeadingProps = {
|
|
|
1109
844
|
} & TextAtoms & MarginAtoms & PaddingAtoms & HTMLElementProps<HTMLHeadingElement>;
|
|
1110
845
|
declare const Heading: React.FC<HeadingProps>;
|
|
1111
846
|
|
|
1112
|
-
type
|
|
1113
|
-
|
|
1114
|
-
tag?: 'span' | 'p' | 'strong' | 'em' | 'small' | 's' | 'del' | 'ins' | 'sub' | 'sup' | 'label';
|
|
847
|
+
type Tags = 'del' | 'em' | 'ins' | 'label' | 'p' | 's' | 'small' | 'span' | 'strong' | 'sub' | 'sup';
|
|
848
|
+
type TextProps<Tag extends Tags = 'span'> = {
|
|
1115
849
|
asChild?: boolean;
|
|
850
|
+
children: React$1.ReactNode;
|
|
851
|
+
ref?: React$1.Ref<HTMLElementTagNameMap[Tag]>;
|
|
852
|
+
tag?: Tag;
|
|
1116
853
|
} & TextAtoms & MarginAtoms & PaddingAtoms & HTMLElementProps<HTMLSpanElement>;
|
|
1117
|
-
declare const Text:
|
|
854
|
+
declare const Text: <T extends Tags = "span">({ asChild, children, className, ref, tag, ...restProps }: TextProps<T>) => react_jsx_runtime.JSX.Element;
|
|
1118
855
|
|
|
1119
856
|
type TemplateProps = {
|
|
1120
857
|
asChild?: boolean;
|
|
1121
|
-
children?: React.ReactNode;
|
|
858
|
+
children?: React$1.ReactNode;
|
|
859
|
+
ref?: React$1.Ref<Element>;
|
|
1122
860
|
};
|
|
1123
861
|
/**
|
|
1124
862
|
* Create a Template component that can render as a child of another component with asChild prop.
|
|
@@ -1140,11 +878,11 @@ type TemplateProps = {
|
|
|
1140
878
|
* <MyComponent className="test" asChild><a href="#">Link</a></MyComponent> // Renders as <a href="#" class="test">Link</a>
|
|
1141
879
|
*/
|
|
1142
880
|
declare function createAsChildTemplate<T extends keyof HTMLElementTagNameMap>(defaultElement: T): {
|
|
1143
|
-
Template:
|
|
1144
|
-
Slot:
|
|
881
|
+
Template: React$1.FC<TemplateProps & HTMLElementProps<HTMLElementTagNameMap[T]>>;
|
|
882
|
+
Slot: React$1.FC<SlotProps>;
|
|
1145
883
|
};
|
|
1146
884
|
type SlotProps = {
|
|
1147
|
-
children: React.ReactNode;
|
|
885
|
+
children: React$1.ReactNode;
|
|
1148
886
|
};
|
|
1149
887
|
|
|
1150
888
|
declare function useComponentStyles<T extends keyof ComponentThemesProps>(name: T, props: ComponentThemesProps[T], useDefaultVariants?: boolean): string;
|
|
@@ -85,6 +85,20 @@ const useComponentStyleDefaultProps = (name) => {
|
|
|
85
85
|
}
|
|
86
86
|
return component.defaultVariants ?? {};
|
|
87
87
|
};
|
|
88
|
+
function setRef(ref, value) {
|
|
89
|
+
if (typeof ref === "function") {
|
|
90
|
+
ref(value);
|
|
91
|
+
} else if (ref !== null && ref !== void 0) {
|
|
92
|
+
ref.current = value;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function composeRefs(...refs) {
|
|
96
|
+
return (node) => {
|
|
97
|
+
for (const ref of refs) {
|
|
98
|
+
setRef(ref, node);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
88
102
|
function mergeProps(slotProps, childProps) {
|
|
89
103
|
const overrideProps = {};
|
|
90
104
|
for (const propName in childProps) {
|
|
@@ -102,33 +116,35 @@ function mergeProps(slotProps, childProps) {
|
|
|
102
116
|
childPropValue(...args);
|
|
103
117
|
slotPropValue(...args);
|
|
104
118
|
};
|
|
105
|
-
} else
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
119
|
+
} else
|
|
120
|
+
switch (propName) {
|
|
121
|
+
case "style": {
|
|
122
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
case "className": {
|
|
126
|
+
overrideProps[propName] = styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs.classnames(slotPropValue, childPropValue);
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
case "ref": {
|
|
130
|
+
overrideProps[propName] = composeRefs(slotPropValue, childPropValue);
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
default: {
|
|
134
|
+
overrideProps[propName] = childPropValue;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
112
137
|
}
|
|
113
138
|
return { ...slotProps, ...overrideProps };
|
|
114
139
|
}
|
|
115
|
-
function setRef(ref, value) {
|
|
116
|
-
if (typeof ref === "function") {
|
|
117
|
-
ref(value);
|
|
118
|
-
} else if (ref !== null && ref !== void 0) {
|
|
119
|
-
ref.current = value;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function composeRefs(...refs) {
|
|
123
|
-
return (node) => {
|
|
124
|
-
for (const ref of refs) {
|
|
125
|
-
setRef(ref, node);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
140
|
function createAsChildTemplate(defaultElement) {
|
|
130
141
|
const Tag = defaultElement;
|
|
131
|
-
const Template2 =
|
|
142
|
+
const Template2 = ({
|
|
143
|
+
asChild,
|
|
144
|
+
children,
|
|
145
|
+
ref,
|
|
146
|
+
...rootProps
|
|
147
|
+
}) => {
|
|
132
148
|
if (!asChild) {
|
|
133
149
|
const tagProps = { ref, ...rootProps };
|
|
134
150
|
return /* @__PURE__ */ jsxRuntime.jsx(Tag, { ...tagProps, children });
|
|
@@ -147,7 +163,7 @@ function createAsChildTemplate(defaultElement) {
|
|
|
147
163
|
}
|
|
148
164
|
return null;
|
|
149
165
|
}
|
|
150
|
-
if (!
|
|
166
|
+
if (!isValidElementWithChildren(slot)) {
|
|
151
167
|
return null;
|
|
152
168
|
}
|
|
153
169
|
if (!react.isValidElement(slot.props.children)) {
|
|
@@ -160,36 +176,33 @@ function createAsChildTemplate(defaultElement) {
|
|
|
160
176
|
}
|
|
161
177
|
return null;
|
|
162
178
|
}
|
|
163
|
-
if (!
|
|
179
|
+
if (!isValidElementWithChildren(slot.props.children)) {
|
|
164
180
|
return null;
|
|
165
181
|
}
|
|
166
182
|
const nextChildren = [...childrenArray];
|
|
167
183
|
if (nextChildren.length === 1 && !slot.props.children.props.children) {
|
|
168
|
-
return react.cloneElement(slot.props.children,
|
|
169
|
-
...mergeProps(rootProps, slot.props.children.props),
|
|
170
|
-
ref: composeRefs(ref, slot.props.children.ref)
|
|
171
|
-
});
|
|
184
|
+
return react.cloneElement(slot.props.children, mergeProps(rootProps, slot.props.children.props));
|
|
172
185
|
}
|
|
173
186
|
nextChildren[slotIndex] = slot.props.children.props.children;
|
|
174
187
|
return react.cloneElement(
|
|
175
188
|
slot.props.children,
|
|
176
|
-
|
|
177
|
-
...mergeProps(rootProps, slot.props.children.props),
|
|
178
|
-
ref: composeRefs(ref, slot.props.children.ref)
|
|
179
|
-
},
|
|
189
|
+
mergeProps(rootProps, slot.props.children.props),
|
|
180
190
|
nextChildren
|
|
181
191
|
);
|
|
182
|
-
}
|
|
192
|
+
};
|
|
183
193
|
return {
|
|
184
194
|
Template: Template2,
|
|
185
195
|
Slot: Slot$1
|
|
186
196
|
};
|
|
187
197
|
}
|
|
198
|
+
function isValidElementWithChildren(child) {
|
|
199
|
+
return react.isValidElement(child) && !!child.props;
|
|
200
|
+
}
|
|
188
201
|
const Slot$1 = ({ children }) => {
|
|
189
202
|
return children;
|
|
190
203
|
};
|
|
191
204
|
const { Template, Slot } = createAsChildTemplate("div");
|
|
192
|
-
const Box =
|
|
205
|
+
const Box = ({ asChild, className, children, ref, ...restProps }) => {
|
|
193
206
|
const [atomsProps, otherProps] = styles_lib_utils_atomProps_cjs.getAtomsAndProps(restProps);
|
|
194
207
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
195
208
|
Template,
|
|
@@ -201,7 +214,7 @@ const Box = react.forwardRef(function Box2({ asChild, className, children, ...re
|
|
|
201
214
|
children: /* @__PURE__ */ jsxRuntime.jsx(Slot, { children })
|
|
202
215
|
}
|
|
203
216
|
);
|
|
204
|
-
}
|
|
217
|
+
};
|
|
205
218
|
const Divider = ({ className, color, ...restProps }) => {
|
|
206
219
|
const dividerClass = useComponentStyles("divider", { base: true });
|
|
207
220
|
const dividerDefaults = useComponentStyleDefaultProps("divider");
|