@nation-a/ui 0.16.4 → 0.16.6
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 +28 -0
- package/dist/index.cjs +163 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +163 -67
- package/dist/index.js.map +1 -1
- package/dist/styled-system/css/conditions.mjs +1 -1
- package/dist/styled-system/css/css.mjs +1 -1
- package/dist/styled-system/styles.css +2 -0
- package/dist/styled-system/tokens/index.mjs +8 -0
- package/dist/styled-system/tokens/tokens.d.ts +3 -3
- package/dist/styled-system/types/conditions.d.ts +16 -0
- package/dist/types/components/Button/Button.test.d.ts +1 -0
- package/dist/types/components/Button/index.d.ts +1 -1
- package/dist/types/components/Text/Text.test.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/test/setup.d.ts +0 -0
- package/dist/types/theme/breakpoints.d.ts +1 -0
- package/package.json +19 -6
package/dist/index.js
CHANGED
|
@@ -280,7 +280,7 @@ function normalizeHTMLProps(props) {
|
|
|
280
280
|
return Object.fromEntries(Object.entries(props).map(([key, value]) => [convert(key), value]));
|
|
281
281
|
}
|
|
282
282
|
normalizeHTMLProps.keys = htmlProps;
|
|
283
|
-
const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_collapsed,_off,_on,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,base";
|
|
283
|
+
const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_collapsed,_off,_on,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,xsToSm,xsToMd,xsToLg,xsToXl,xsTo2xl,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,base";
|
|
284
284
|
const conditions$1 = new Set(conditionsStr.split(","));
|
|
285
285
|
const conditionRegex = /^@|&|&$/;
|
|
286
286
|
function isCondition(value) {
|
|
@@ -326,7 +326,7 @@ const context = {
|
|
|
326
326
|
conditions: {
|
|
327
327
|
shift: sortConditions,
|
|
328
328
|
finalize: finalizeConditions,
|
|
329
|
-
breakpoints: { keys: ["base", "sm", "md", "lg", "xl", "2xl"] }
|
|
329
|
+
breakpoints: { keys: ["base", "xs", "sm", "md", "lg", "xl", "2xl"] }
|
|
330
330
|
},
|
|
331
331
|
utility: {
|
|
332
332
|
transform: (prop, value) => {
|
|
@@ -784,7 +784,7 @@ const Spinner = forwardRef(({ className, size: size2, color: color2, ...props },
|
|
|
784
784
|
setLottieComponent(() => mod.default);
|
|
785
785
|
});
|
|
786
786
|
}, []);
|
|
787
|
-
return /* @__PURE__ */ jsx(Box2, { ref, ...props, className: cx(spinnerRecipe({ size: size2 }), css$1({ color: color2 }), className), children: LottieComponent && /* @__PURE__ */ jsx(
|
|
787
|
+
return /* @__PURE__ */ jsx(Box2, { ref, id: "spinner", ...props, className: cx(spinnerRecipe({ size: size2 }), css$1({ color: color2 }), className), children: LottieComponent && /* @__PURE__ */ jsx(
|
|
788
788
|
LottieComponent,
|
|
789
789
|
{
|
|
790
790
|
options: {
|
|
@@ -9934,7 +9934,18 @@ const TabsRoot = forwardRef((props, ref) => {
|
|
|
9934
9934
|
return /* @__PURE__ */ jsx(TabsProvider, { value: tabs, children: /* @__PURE__ */ jsx(RenderStrategyPropsProvider, { value: renderStrategyProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });
|
|
9935
9935
|
});
|
|
9936
9936
|
TabsRoot.displayName = "TabsRoot";
|
|
9937
|
-
const Button = ({
|
|
9937
|
+
const Button = ({
|
|
9938
|
+
loading,
|
|
9939
|
+
disabled,
|
|
9940
|
+
loadingText,
|
|
9941
|
+
children,
|
|
9942
|
+
color: color2,
|
|
9943
|
+
variant,
|
|
9944
|
+
size: size2,
|
|
9945
|
+
radius,
|
|
9946
|
+
onClick,
|
|
9947
|
+
...rest
|
|
9948
|
+
}) => {
|
|
9938
9949
|
const StyledButton = styled(ark.button, buttonRecipe);
|
|
9939
9950
|
return /* @__PURE__ */ jsx(
|
|
9940
9951
|
StyledButton,
|
|
@@ -9945,6 +9956,7 @@ const Button = ({ loading, disabled, loadingText, children, color: color2, varia
|
|
|
9945
9956
|
size: size2,
|
|
9946
9957
|
radius,
|
|
9947
9958
|
css: { pointerEvents: loading ? "none" : "auto" },
|
|
9959
|
+
onClick: disabled || loading ? void 0 : onClick,
|
|
9948
9960
|
...rest,
|
|
9949
9961
|
children: loading ? loadingText || /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9950
9962
|
/* @__PURE__ */ jsx(
|
|
@@ -10178,16 +10190,16 @@ const dialogRecipe = sva({
|
|
|
10178
10190
|
}
|
|
10179
10191
|
}
|
|
10180
10192
|
});
|
|
10181
|
-
const { withRootProvider: withRootProvider$
|
|
10182
|
-
const Root$
|
|
10183
|
-
const Backdrop$1 = withContext$
|
|
10184
|
-
const Trigger$3 = withContext$
|
|
10185
|
-
const Content$4 = withContext$
|
|
10186
|
-
const Title = withContext$
|
|
10187
|
-
const Description$2 = withContext$
|
|
10188
|
-
const Positioner = withContext$
|
|
10189
|
-
const Header$1 = withContext$
|
|
10190
|
-
const Footer = withContext$
|
|
10193
|
+
const { withRootProvider: withRootProvider$4, withContext: withContext$7 } = createStyleContext(dialogRecipe);
|
|
10194
|
+
const Root$8 = withRootProvider$4(DialogRoot);
|
|
10195
|
+
const Backdrop$1 = withContext$7(DialogBackdrop, "backdrop");
|
|
10196
|
+
const Trigger$3 = withContext$7(DialogTrigger, "trigger");
|
|
10197
|
+
const Content$4 = withContext$7(DialogContent, "content");
|
|
10198
|
+
const Title = withContext$7(DialogTitle, "title");
|
|
10199
|
+
const Description$2 = withContext$7(DialogDescription, "description");
|
|
10200
|
+
const Positioner = withContext$7(DialogPositioner, "positioner");
|
|
10201
|
+
const Header$1 = withContext$7(ark.header, "header");
|
|
10202
|
+
const Footer = withContext$7(
|
|
10191
10203
|
({ orientation = "horizontal", className, ...props }) => {
|
|
10192
10204
|
return /* @__PURE__ */ jsx(
|
|
10193
10205
|
ark.footer,
|
|
@@ -10205,10 +10217,10 @@ const Footer = withContext$6(
|
|
|
10205
10217
|
},
|
|
10206
10218
|
"footer"
|
|
10207
10219
|
);
|
|
10208
|
-
const Body = withContext$
|
|
10209
|
-
const CloseTrigger = withContext$
|
|
10220
|
+
const Body = withContext$7(ark.main, "body");
|
|
10221
|
+
const CloseTrigger = withContext$7(DialogCloseTrigger, "closeTrigger");
|
|
10210
10222
|
const Dialog = {
|
|
10211
|
-
Root: Root$
|
|
10223
|
+
Root: Root$8,
|
|
10212
10224
|
Backdrop: Backdrop$1,
|
|
10213
10225
|
Trigger: Trigger$3,
|
|
10214
10226
|
Content: Content$4,
|
|
@@ -19347,20 +19359,20 @@ const navigationRecipe = sva({
|
|
|
19347
19359
|
}
|
|
19348
19360
|
}
|
|
19349
19361
|
});
|
|
19350
|
-
const { withRootProvider: withRootProvider$
|
|
19351
|
-
const Root$
|
|
19352
|
-
const Trigger$2 = withContext$
|
|
19362
|
+
const { withRootProvider: withRootProvider$3, withContext: withContext$6 } = createStyleContext(navigationRecipe);
|
|
19363
|
+
const Root$7 = withRootProvider$3(TabsRoot);
|
|
19364
|
+
const Trigger$2 = withContext$6(
|
|
19353
19365
|
({ icon, label, ...props }) => /* @__PURE__ */ jsxs(TabTrigger, { ...props, children: [
|
|
19354
19366
|
icon,
|
|
19355
19367
|
label
|
|
19356
19368
|
] }),
|
|
19357
19369
|
"trigger"
|
|
19358
19370
|
);
|
|
19359
|
-
const List$
|
|
19371
|
+
const List$2 = withContext$6(TabList, "list");
|
|
19360
19372
|
const Navigation = {
|
|
19361
|
-
Root: Root$
|
|
19373
|
+
Root: Root$7,
|
|
19362
19374
|
Item: Trigger$2,
|
|
19363
|
-
List: List$
|
|
19375
|
+
List: List$2
|
|
19364
19376
|
};
|
|
19365
19377
|
const tagRecipe = cva({
|
|
19366
19378
|
base: {
|
|
@@ -20124,15 +20136,15 @@ const tabsRecipe = sva({
|
|
|
20124
20136
|
shadow: false
|
|
20125
20137
|
}
|
|
20126
20138
|
});
|
|
20127
|
-
const { withRootProvider: withRootProvider$
|
|
20128
|
-
const Root$
|
|
20129
|
-
const List = withContext$
|
|
20130
|
-
const Trigger$1 = withContext$
|
|
20131
|
-
const Content$2 = withContext$
|
|
20132
|
-
const Indicator$1 = withContext$
|
|
20133
|
-
const Tabs = Object.assign(Root$
|
|
20134
|
-
Root: Root$
|
|
20135
|
-
List,
|
|
20139
|
+
const { withRootProvider: withRootProvider$2, withContext: withContext$5 } = createStyleContext(tabsRecipe);
|
|
20140
|
+
const Root$6 = withRootProvider$2(TabsRoot);
|
|
20141
|
+
const List$1 = withContext$5(TabList, "list");
|
|
20142
|
+
const Trigger$1 = withContext$5(TabTrigger, "trigger");
|
|
20143
|
+
const Content$2 = withContext$5(TabContent, "content");
|
|
20144
|
+
const Indicator$1 = withContext$5(TabIndicator, "indicator");
|
|
20145
|
+
const Tabs = Object.assign(Root$6, {
|
|
20146
|
+
Root: Root$6,
|
|
20147
|
+
List: List$1,
|
|
20136
20148
|
Trigger: Trigger$1,
|
|
20137
20149
|
Content: Content$2,
|
|
20138
20150
|
Indicator: Indicator$1
|
|
@@ -20617,13 +20629,13 @@ const toastRecipe = sva({
|
|
|
20617
20629
|
}
|
|
20618
20630
|
});
|
|
20619
20631
|
const DEFAULT_DURATION = 3e3;
|
|
20620
|
-
const Root$
|
|
20632
|
+
const Root$5 = forwardRef(
|
|
20621
20633
|
({ children, className, width = "fit", ...props }, ref) => {
|
|
20622
20634
|
const styles2 = toastRecipe({ width });
|
|
20623
20635
|
return /* @__PURE__ */ jsx(Box$1, { ref, className: cx(styles2.root, className), ...props, children });
|
|
20624
20636
|
}
|
|
20625
20637
|
);
|
|
20626
|
-
Root$
|
|
20638
|
+
Root$5.displayName = "Toast.Root";
|
|
20627
20639
|
const Content$1 = forwardRef(
|
|
20628
20640
|
({ children, className }, ref) => {
|
|
20629
20641
|
const styles2 = toastRecipe();
|
|
@@ -20669,7 +20681,7 @@ Toaster.displayName = "Toast.Toaster";
|
|
|
20669
20681
|
const Toast = forwardRef((props, ref) => {
|
|
20670
20682
|
return /* @__PURE__ */ jsx(Box$1, { ref, ...props });
|
|
20671
20683
|
});
|
|
20672
|
-
Toast.Root = Root$
|
|
20684
|
+
Toast.Root = Root$5;
|
|
20673
20685
|
Toast.Content = Content$1;
|
|
20674
20686
|
Toast.Description = Description$1;
|
|
20675
20687
|
Toast.Icon = Icon;
|
|
@@ -20861,27 +20873,27 @@ const selectRecipe = sva({
|
|
|
20861
20873
|
disabled: false
|
|
20862
20874
|
}
|
|
20863
20875
|
});
|
|
20864
|
-
const { withRootProvider, withContext: withContext$
|
|
20865
|
-
const Root$
|
|
20866
|
-
const Label$2 = withContext$
|
|
20867
|
-
const Trigger = withContext$
|
|
20876
|
+
const { withRootProvider: withRootProvider$1, withContext: withContext$4 } = createStyleContext(selectRecipe);
|
|
20877
|
+
const Root$4 = withRootProvider$1(withContext$4(SelectRoot, "root"));
|
|
20878
|
+
const Label$2 = withContext$4(SelectLabel, "label");
|
|
20879
|
+
const Trigger = withContext$4(({ description, ...props }) => {
|
|
20868
20880
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20869
20881
|
/* @__PURE__ */ jsx(SelectTrigger, { ...props }),
|
|
20870
20882
|
description && /* @__PURE__ */ jsx(Description, { text: description })
|
|
20871
20883
|
] });
|
|
20872
20884
|
}, "trigger");
|
|
20873
|
-
const ValueText = withContext$
|
|
20874
|
-
const Description = withContext$
|
|
20885
|
+
const ValueText = withContext$4(SelectValueText, "valueText");
|
|
20886
|
+
const Description = withContext$4(({ className, text, ...props }) => {
|
|
20875
20887
|
return /* @__PURE__ */ jsx(Text, { className, ...props, children: text });
|
|
20876
20888
|
}, "description");
|
|
20877
|
-
const Content = withContext$
|
|
20878
|
-
const Item$
|
|
20889
|
+
const Content = withContext$4(SelectContent, "content");
|
|
20890
|
+
const Item$2 = withContext$4(SelectItem, "item");
|
|
20879
20891
|
const Select = {
|
|
20880
|
-
Root: Root$
|
|
20892
|
+
Root: Root$4,
|
|
20881
20893
|
Label: Label$2,
|
|
20882
20894
|
Trigger,
|
|
20883
20895
|
Content,
|
|
20884
|
-
Item: Item$
|
|
20896
|
+
Item: Item$2,
|
|
20885
20897
|
ValueText,
|
|
20886
20898
|
Description
|
|
20887
20899
|
};
|
|
@@ -20952,27 +20964,27 @@ const radioGroupRecipe = sva({
|
|
|
20952
20964
|
}
|
|
20953
20965
|
}
|
|
20954
20966
|
});
|
|
20955
|
-
const { withProvider: withProvider$2, withContext: withContext$
|
|
20967
|
+
const { withProvider: withProvider$2, withContext: withContext$3 } = createStyleContext(radioGroupRecipe);
|
|
20956
20968
|
withProvider$2(RadioGroupRootProvider, "root");
|
|
20957
|
-
const Root$
|
|
20958
|
-
const ItemControl = withContext$
|
|
20969
|
+
const Root$3 = withProvider$2(RadioGroupRoot, "root");
|
|
20970
|
+
const ItemControl = withContext$3(
|
|
20959
20971
|
RadioGroupItemControl,
|
|
20960
20972
|
"itemControl"
|
|
20961
20973
|
);
|
|
20962
|
-
const Item = withContext$
|
|
20974
|
+
const Item$1 = withContext$3(
|
|
20963
20975
|
RadioGroupItem$1,
|
|
20964
20976
|
"item"
|
|
20965
20977
|
);
|
|
20966
|
-
const ItemText = withContext$
|
|
20978
|
+
const ItemText = withContext$3(
|
|
20967
20979
|
RadioGroupItemText,
|
|
20968
20980
|
"itemText"
|
|
20969
20981
|
);
|
|
20970
|
-
const Label$1 = withContext$
|
|
20982
|
+
const Label$1 = withContext$3(
|
|
20971
20983
|
RadioGroupLabel,
|
|
20972
20984
|
"label"
|
|
20973
20985
|
);
|
|
20974
|
-
const RadioGroupItem = withContext$
|
|
20975
|
-
({ children, ...props }) => /* @__PURE__ */ jsxs(Item, { ...props, children: [
|
|
20986
|
+
const RadioGroupItem = withContext$3(
|
|
20987
|
+
({ children, ...props }) => /* @__PURE__ */ jsxs(Item$1, { ...props, children: [
|
|
20976
20988
|
/* @__PURE__ */ jsx(ItemControl, {}),
|
|
20977
20989
|
children && /* @__PURE__ */ jsx(ItemText, { children }),
|
|
20978
20990
|
/* @__PURE__ */ jsx(RadioGroupItemHiddenInput, {})
|
|
@@ -20980,7 +20992,7 @@ const RadioGroupItem = withContext$2(
|
|
|
20980
20992
|
"item"
|
|
20981
20993
|
);
|
|
20982
20994
|
const RadioGroup = {
|
|
20983
|
-
Root: Root$
|
|
20995
|
+
Root: Root$3,
|
|
20984
20996
|
Item: RadioGroupItem,
|
|
20985
20997
|
Label: Label$1,
|
|
20986
20998
|
Context: RadioGroupContext
|
|
@@ -21074,28 +21086,28 @@ const checkboxRecipe = sva({
|
|
|
21074
21086
|
variant: "square"
|
|
21075
21087
|
}
|
|
21076
21088
|
});
|
|
21077
|
-
const { withProvider: withProvider$1, withContext: withContext$
|
|
21089
|
+
const { withProvider: withProvider$1, withContext: withContext$2 } = createStyleContext(checkboxRecipe);
|
|
21078
21090
|
withProvider$1(CheckboxRootProvider, "root");
|
|
21079
|
-
const Root$
|
|
21080
|
-
const Control$1 = withContext$
|
|
21091
|
+
const Root$2 = withProvider$1(CheckboxRoot, "root");
|
|
21092
|
+
const Control$1 = withContext$2(
|
|
21081
21093
|
CheckboxControl,
|
|
21082
21094
|
"control"
|
|
21083
21095
|
);
|
|
21084
|
-
withContext$
|
|
21096
|
+
withContext$2(
|
|
21085
21097
|
CheckboxGroup,
|
|
21086
21098
|
"group"
|
|
21087
21099
|
);
|
|
21088
|
-
const Indicator = withContext$
|
|
21100
|
+
const Indicator = withContext$2(
|
|
21089
21101
|
CheckboxIndicator,
|
|
21090
21102
|
"indicator"
|
|
21091
21103
|
);
|
|
21092
|
-
const Label = withContext$
|
|
21104
|
+
const Label = withContext$2(
|
|
21093
21105
|
CheckboxLabel,
|
|
21094
21106
|
"label"
|
|
21095
21107
|
);
|
|
21096
21108
|
const Checkbox = forwardRef((props, ref) => {
|
|
21097
21109
|
const { children, ...rootProps } = props;
|
|
21098
|
-
return /* @__PURE__ */ jsxs(Root$
|
|
21110
|
+
return /* @__PURE__ */ jsxs(Root$2, { ref, ...rootProps, children: [
|
|
21099
21111
|
/* @__PURE__ */ jsxs(Control$1, { children: [
|
|
21100
21112
|
/* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) }),
|
|
21101
21113
|
/* @__PURE__ */ jsx(Indicator, { indeterminate: true, children: /* @__PURE__ */ jsx(MinusIcon, {}) })
|
|
@@ -21257,23 +21269,23 @@ const switchRecipe = sva({
|
|
|
21257
21269
|
}
|
|
21258
21270
|
}
|
|
21259
21271
|
});
|
|
21260
|
-
const { withProvider, withContext } = createStyleContext(switchRecipe);
|
|
21272
|
+
const { withProvider, withContext: withContext$1 } = createStyleContext(switchRecipe);
|
|
21261
21273
|
withProvider(SwitchRootProvider, "root");
|
|
21262
|
-
const Root = withProvider(SwitchRoot, "root");
|
|
21263
|
-
const Control = withContext(
|
|
21274
|
+
const Root$1 = withProvider(SwitchRoot, "root");
|
|
21275
|
+
const Control = withContext$1(
|
|
21264
21276
|
SwitchControl,
|
|
21265
21277
|
"control"
|
|
21266
21278
|
);
|
|
21267
|
-
withContext(
|
|
21279
|
+
withContext$1(
|
|
21268
21280
|
SwitchLabel,
|
|
21269
21281
|
"label"
|
|
21270
21282
|
);
|
|
21271
|
-
const Thumb = withContext(
|
|
21283
|
+
const Thumb = withContext$1(
|
|
21272
21284
|
SwitchThumb,
|
|
21273
21285
|
"thumb"
|
|
21274
21286
|
);
|
|
21275
21287
|
const Switch = forwardRef((props, ref) => {
|
|
21276
|
-
return /* @__PURE__ */ jsxs(Root, { ref, ...props, children: [
|
|
21288
|
+
return /* @__PURE__ */ jsxs(Root$1, { ref, ...props, children: [
|
|
21277
21289
|
/* @__PURE__ */ jsx(Control, { children: /* @__PURE__ */ jsx(Thumb, {}) }),
|
|
21278
21290
|
/* @__PURE__ */ jsx(SwitchHiddenInput, {})
|
|
21279
21291
|
] });
|
|
@@ -21388,6 +21400,88 @@ const Fab = forwardRef(({ loading, disabled, children, color: color2, ...rest },
|
|
|
21388
21400
|
});
|
|
21389
21401
|
Fab.displayName = "Fab";
|
|
21390
21402
|
const index = memo$2(withPolymorphicComponent(Fab));
|
|
21403
|
+
const listRecipe = sva({
|
|
21404
|
+
className: "list",
|
|
21405
|
+
slots: ["item", "root"],
|
|
21406
|
+
base: {
|
|
21407
|
+
root: {
|
|
21408
|
+
display: "flex",
|
|
21409
|
+
flexDir: "column",
|
|
21410
|
+
w: "full"
|
|
21411
|
+
},
|
|
21412
|
+
item: {
|
|
21413
|
+
gap: 2,
|
|
21414
|
+
py: 2,
|
|
21415
|
+
w: "full",
|
|
21416
|
+
rounded: "sm",
|
|
21417
|
+
transition: "background-color 0.1s ease-in-out",
|
|
21418
|
+
cursor: "pointer",
|
|
21419
|
+
"& .label": {
|
|
21420
|
+
color: "content.neutral.default"
|
|
21421
|
+
},
|
|
21422
|
+
"& .sub-label": {
|
|
21423
|
+
color: "content.neutral.subtlest"
|
|
21424
|
+
},
|
|
21425
|
+
_hover: {
|
|
21426
|
+
bg: "background.neutral.selected"
|
|
21427
|
+
},
|
|
21428
|
+
_disabled: {
|
|
21429
|
+
_hover: {
|
|
21430
|
+
bg: "transparent"
|
|
21431
|
+
},
|
|
21432
|
+
"& .label": {
|
|
21433
|
+
color: "content.neutral.disabled"
|
|
21434
|
+
},
|
|
21435
|
+
"& .sub-label": {
|
|
21436
|
+
color: "content.neutral.disabled"
|
|
21437
|
+
},
|
|
21438
|
+
cursor: "not-allowed"
|
|
21439
|
+
}
|
|
21440
|
+
}
|
|
21441
|
+
},
|
|
21442
|
+
variants: {
|
|
21443
|
+
size: {
|
|
21444
|
+
sm: {
|
|
21445
|
+
item: {
|
|
21446
|
+
h: "52px"
|
|
21447
|
+
}
|
|
21448
|
+
},
|
|
21449
|
+
lg: {
|
|
21450
|
+
item: { h: "68px" }
|
|
21451
|
+
}
|
|
21452
|
+
},
|
|
21453
|
+
density: {
|
|
21454
|
+
1: { item: { px: 2 } },
|
|
21455
|
+
2: { item: { pl: 12, pr: 2 } }
|
|
21456
|
+
}
|
|
21457
|
+
},
|
|
21458
|
+
defaultVariants: {
|
|
21459
|
+
size: "sm",
|
|
21460
|
+
density: 1
|
|
21461
|
+
}
|
|
21462
|
+
});
|
|
21463
|
+
const { withRootProvider, withContext } = createStyleContext(listRecipe);
|
|
21464
|
+
const Root = withRootProvider(withContext(styled.ul, "root"));
|
|
21465
|
+
const Item = withContext(
|
|
21466
|
+
({ startAdornment, endAdornment, label, subLabel, disabled, ...rest }) => {
|
|
21467
|
+
return /* @__PURE__ */ jsxs(HStack2, { gap: 2, justify: "space-between", as: "li", ...rest, disabled, children: [
|
|
21468
|
+
/* @__PURE__ */ jsxs(HStack2, { children: [
|
|
21469
|
+
startAdornment,
|
|
21470
|
+
/* @__PURE__ */ jsxs(Stack2, { gap: 0, children: [
|
|
21471
|
+
/* @__PURE__ */ jsx(Text, { variant: "label.md", className: "label", children: label }),
|
|
21472
|
+
subLabel && /* @__PURE__ */ jsx(Text, { variant: "label.sm", className: "sub-label", children: subLabel })
|
|
21473
|
+
] })
|
|
21474
|
+
] }),
|
|
21475
|
+
/* @__PURE__ */ jsx(HStack2, { children: endAdornment })
|
|
21476
|
+
] });
|
|
21477
|
+
},
|
|
21478
|
+
"item"
|
|
21479
|
+
);
|
|
21480
|
+
Item.displayName = "Item";
|
|
21481
|
+
const List = Object.assign(Root, {
|
|
21482
|
+
Root,
|
|
21483
|
+
Item
|
|
21484
|
+
});
|
|
21391
21485
|
function definePreset(preset2) {
|
|
21392
21486
|
return preset2;
|
|
21393
21487
|
}
|
|
@@ -21490,6 +21584,7 @@ const conditions = {
|
|
|
21490
21584
|
}
|
|
21491
21585
|
};
|
|
21492
21586
|
const breakpoints = {
|
|
21587
|
+
xs: "480px",
|
|
21493
21588
|
sm: "640px",
|
|
21494
21589
|
md: "768px",
|
|
21495
21590
|
lg: "1024px",
|
|
@@ -21712,6 +21807,7 @@ export {
|
|
|
21712
21807
|
HStack2 as HStack,
|
|
21713
21808
|
index$4 as IconButton,
|
|
21714
21809
|
index$2 as Input,
|
|
21810
|
+
List,
|
|
21715
21811
|
Navigation,
|
|
21716
21812
|
Portal,
|
|
21717
21813
|
RadioGroup,
|