@nation-a/ui 0.16.2 → 0.16.5
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 +147 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +147 -64
- package/dist/index.js.map +1 -1
- package/dist/types/components/BottomSheet/index.d.ts +16 -0
- package/dist/types/components/index.d.ts +1 -0
- package/package.json +4 -2
package/dist/index.cjs
CHANGED
|
@@ -10196,16 +10196,16 @@ const dialogRecipe = sva({
|
|
|
10196
10196
|
}
|
|
10197
10197
|
}
|
|
10198
10198
|
});
|
|
10199
|
-
const { withRootProvider: withRootProvider$
|
|
10200
|
-
const Root$
|
|
10201
|
-
const Backdrop$1 = withContext$
|
|
10202
|
-
const Trigger$3 = withContext$
|
|
10203
|
-
const Content$4 = withContext$
|
|
10204
|
-
const Title = withContext$
|
|
10205
|
-
const Description$2 = withContext$
|
|
10206
|
-
const Positioner = withContext$
|
|
10207
|
-
const Header$1 = withContext$
|
|
10208
|
-
const Footer = withContext$
|
|
10199
|
+
const { withRootProvider: withRootProvider$4, withContext: withContext$7 } = createStyleContext(dialogRecipe);
|
|
10200
|
+
const Root$8 = withRootProvider$4(DialogRoot);
|
|
10201
|
+
const Backdrop$1 = withContext$7(DialogBackdrop, "backdrop");
|
|
10202
|
+
const Trigger$3 = withContext$7(DialogTrigger, "trigger");
|
|
10203
|
+
const Content$4 = withContext$7(DialogContent, "content");
|
|
10204
|
+
const Title = withContext$7(DialogTitle, "title");
|
|
10205
|
+
const Description$2 = withContext$7(DialogDescription, "description");
|
|
10206
|
+
const Positioner = withContext$7(DialogPositioner, "positioner");
|
|
10207
|
+
const Header$1 = withContext$7(ark.header, "header");
|
|
10208
|
+
const Footer = withContext$7(
|
|
10209
10209
|
({ orientation = "horizontal", className, ...props }) => {
|
|
10210
10210
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10211
10211
|
ark.footer,
|
|
@@ -10223,10 +10223,10 @@ const Footer = withContext$6(
|
|
|
10223
10223
|
},
|
|
10224
10224
|
"footer"
|
|
10225
10225
|
);
|
|
10226
|
-
const Body = withContext$
|
|
10227
|
-
const CloseTrigger = withContext$
|
|
10226
|
+
const Body = withContext$7(ark.main, "body");
|
|
10227
|
+
const CloseTrigger = withContext$7(DialogCloseTrigger, "closeTrigger");
|
|
10228
10228
|
const Dialog = {
|
|
10229
|
-
Root: Root$
|
|
10229
|
+
Root: Root$8,
|
|
10230
10230
|
Backdrop: Backdrop$1,
|
|
10231
10231
|
Trigger: Trigger$3,
|
|
10232
10232
|
Content: Content$4,
|
|
@@ -19225,7 +19225,7 @@ const BottomSheet = React.forwardRef(
|
|
|
19225
19225
|
...props
|
|
19226
19226
|
}, ref) => {
|
|
19227
19227
|
let snapPercentPoints = null;
|
|
19228
|
-
if (snapPercent
|
|
19228
|
+
if (snapPercent && snapPercent.max) {
|
|
19229
19229
|
snapPercentPoints = [snapPercent.max * window.innerHeight, snapPercent.min * window.innerHeight];
|
|
19230
19230
|
}
|
|
19231
19231
|
const snapPoints = snapPercentPoints ? snapPercentPoints : maxSnapPoint ? [maxSnapPoint] : void 0;
|
|
@@ -19365,20 +19365,20 @@ const navigationRecipe = sva({
|
|
|
19365
19365
|
}
|
|
19366
19366
|
}
|
|
19367
19367
|
});
|
|
19368
|
-
const { withRootProvider: withRootProvider$
|
|
19369
|
-
const Root$
|
|
19370
|
-
const Trigger$2 = withContext$
|
|
19368
|
+
const { withRootProvider: withRootProvider$3, withContext: withContext$6 } = createStyleContext(navigationRecipe);
|
|
19369
|
+
const Root$7 = withRootProvider$3(TabsRoot);
|
|
19370
|
+
const Trigger$2 = withContext$6(
|
|
19371
19371
|
({ icon, label, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(TabTrigger, { ...props, children: [
|
|
19372
19372
|
icon,
|
|
19373
19373
|
label
|
|
19374
19374
|
] }),
|
|
19375
19375
|
"trigger"
|
|
19376
19376
|
);
|
|
19377
|
-
const List$
|
|
19377
|
+
const List$2 = withContext$6(TabList, "list");
|
|
19378
19378
|
const Navigation = {
|
|
19379
|
-
Root: Root$
|
|
19379
|
+
Root: Root$7,
|
|
19380
19380
|
Item: Trigger$2,
|
|
19381
|
-
List: List$
|
|
19381
|
+
List: List$2
|
|
19382
19382
|
};
|
|
19383
19383
|
const tagRecipe = cva({
|
|
19384
19384
|
base: {
|
|
@@ -20142,15 +20142,15 @@ const tabsRecipe = sva({
|
|
|
20142
20142
|
shadow: false
|
|
20143
20143
|
}
|
|
20144
20144
|
});
|
|
20145
|
-
const { withRootProvider: withRootProvider$
|
|
20146
|
-
const Root$
|
|
20147
|
-
const List = withContext$
|
|
20148
|
-
const Trigger$1 = withContext$
|
|
20149
|
-
const Content$2 = withContext$
|
|
20150
|
-
const Indicator$1 = withContext$
|
|
20151
|
-
const Tabs = Object.assign(Root$
|
|
20152
|
-
Root: Root$
|
|
20153
|
-
List,
|
|
20145
|
+
const { withRootProvider: withRootProvider$2, withContext: withContext$5 } = createStyleContext(tabsRecipe);
|
|
20146
|
+
const Root$6 = withRootProvider$2(TabsRoot);
|
|
20147
|
+
const List$1 = withContext$5(TabList, "list");
|
|
20148
|
+
const Trigger$1 = withContext$5(TabTrigger, "trigger");
|
|
20149
|
+
const Content$2 = withContext$5(TabContent, "content");
|
|
20150
|
+
const Indicator$1 = withContext$5(TabIndicator, "indicator");
|
|
20151
|
+
const Tabs = Object.assign(Root$6, {
|
|
20152
|
+
Root: Root$6,
|
|
20153
|
+
List: List$1,
|
|
20154
20154
|
Trigger: Trigger$1,
|
|
20155
20155
|
Content: Content$2,
|
|
20156
20156
|
Indicator: Indicator$1
|
|
@@ -20635,13 +20635,13 @@ const toastRecipe = sva({
|
|
|
20635
20635
|
}
|
|
20636
20636
|
});
|
|
20637
20637
|
const DEFAULT_DURATION = 3e3;
|
|
20638
|
-
const Root$
|
|
20638
|
+
const Root$5 = React.forwardRef(
|
|
20639
20639
|
({ children, className, width = "fit", ...props }, ref) => {
|
|
20640
20640
|
const styles2 = toastRecipe({ width });
|
|
20641
20641
|
return /* @__PURE__ */ jsxRuntime.jsx(Box$1, { ref, className: cx(styles2.root, className), ...props, children });
|
|
20642
20642
|
}
|
|
20643
20643
|
);
|
|
20644
|
-
Root$
|
|
20644
|
+
Root$5.displayName = "Toast.Root";
|
|
20645
20645
|
const Content$1 = React.forwardRef(
|
|
20646
20646
|
({ children, className }, ref) => {
|
|
20647
20647
|
const styles2 = toastRecipe();
|
|
@@ -20687,7 +20687,7 @@ Toaster.displayName = "Toast.Toaster";
|
|
|
20687
20687
|
const Toast = React.forwardRef((props, ref) => {
|
|
20688
20688
|
return /* @__PURE__ */ jsxRuntime.jsx(Box$1, { ref, ...props });
|
|
20689
20689
|
});
|
|
20690
|
-
Toast.Root = Root$
|
|
20690
|
+
Toast.Root = Root$5;
|
|
20691
20691
|
Toast.Content = Content$1;
|
|
20692
20692
|
Toast.Description = Description$1;
|
|
20693
20693
|
Toast.Icon = Icon;
|
|
@@ -20879,27 +20879,27 @@ const selectRecipe = sva({
|
|
|
20879
20879
|
disabled: false
|
|
20880
20880
|
}
|
|
20881
20881
|
});
|
|
20882
|
-
const { withRootProvider, withContext: withContext$
|
|
20883
|
-
const Root$
|
|
20884
|
-
const Label$2 = withContext$
|
|
20885
|
-
const Trigger = withContext$
|
|
20882
|
+
const { withRootProvider: withRootProvider$1, withContext: withContext$4 } = createStyleContext(selectRecipe);
|
|
20883
|
+
const Root$4 = withRootProvider$1(withContext$4(SelectRoot, "root"));
|
|
20884
|
+
const Label$2 = withContext$4(SelectLabel, "label");
|
|
20885
|
+
const Trigger = withContext$4(({ description, ...props }) => {
|
|
20886
20886
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20887
20887
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { ...props }),
|
|
20888
20888
|
description && /* @__PURE__ */ jsxRuntime.jsx(Description, { text: description })
|
|
20889
20889
|
] });
|
|
20890
20890
|
}, "trigger");
|
|
20891
|
-
const ValueText = withContext$
|
|
20892
|
-
const Description = withContext$
|
|
20891
|
+
const ValueText = withContext$4(SelectValueText, "valueText");
|
|
20892
|
+
const Description = withContext$4(({ className, text, ...props }) => {
|
|
20893
20893
|
return /* @__PURE__ */ jsxRuntime.jsx(Text, { className, ...props, children: text });
|
|
20894
20894
|
}, "description");
|
|
20895
|
-
const Content = withContext$
|
|
20896
|
-
const Item$
|
|
20895
|
+
const Content = withContext$4(SelectContent, "content");
|
|
20896
|
+
const Item$2 = withContext$4(SelectItem, "item");
|
|
20897
20897
|
const Select = {
|
|
20898
|
-
Root: Root$
|
|
20898
|
+
Root: Root$4,
|
|
20899
20899
|
Label: Label$2,
|
|
20900
20900
|
Trigger,
|
|
20901
20901
|
Content,
|
|
20902
|
-
Item: Item$
|
|
20902
|
+
Item: Item$2,
|
|
20903
20903
|
ValueText,
|
|
20904
20904
|
Description
|
|
20905
20905
|
};
|
|
@@ -20970,27 +20970,27 @@ const radioGroupRecipe = sva({
|
|
|
20970
20970
|
}
|
|
20971
20971
|
}
|
|
20972
20972
|
});
|
|
20973
|
-
const { withProvider: withProvider$2, withContext: withContext$
|
|
20973
|
+
const { withProvider: withProvider$2, withContext: withContext$3 } = createStyleContext(radioGroupRecipe);
|
|
20974
20974
|
withProvider$2(RadioGroupRootProvider, "root");
|
|
20975
|
-
const Root$
|
|
20976
|
-
const ItemControl = withContext$
|
|
20975
|
+
const Root$3 = withProvider$2(RadioGroupRoot, "root");
|
|
20976
|
+
const ItemControl = withContext$3(
|
|
20977
20977
|
RadioGroupItemControl,
|
|
20978
20978
|
"itemControl"
|
|
20979
20979
|
);
|
|
20980
|
-
const Item = withContext$
|
|
20980
|
+
const Item$1 = withContext$3(
|
|
20981
20981
|
RadioGroupItem$1,
|
|
20982
20982
|
"item"
|
|
20983
20983
|
);
|
|
20984
|
-
const ItemText = withContext$
|
|
20984
|
+
const ItemText = withContext$3(
|
|
20985
20985
|
RadioGroupItemText,
|
|
20986
20986
|
"itemText"
|
|
20987
20987
|
);
|
|
20988
|
-
const Label$1 = withContext$
|
|
20988
|
+
const Label$1 = withContext$3(
|
|
20989
20989
|
RadioGroupLabel,
|
|
20990
20990
|
"label"
|
|
20991
20991
|
);
|
|
20992
|
-
const RadioGroupItem = withContext$
|
|
20993
|
-
({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(Item, { ...props, children: [
|
|
20992
|
+
const RadioGroupItem = withContext$3(
|
|
20993
|
+
({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(Item$1, { ...props, children: [
|
|
20994
20994
|
/* @__PURE__ */ jsxRuntime.jsx(ItemControl, {}),
|
|
20995
20995
|
children && /* @__PURE__ */ jsxRuntime.jsx(ItemText, { children }),
|
|
20996
20996
|
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItemHiddenInput, {})
|
|
@@ -20998,7 +20998,7 @@ const RadioGroupItem = withContext$2(
|
|
|
20998
20998
|
"item"
|
|
20999
20999
|
);
|
|
21000
21000
|
const RadioGroup = {
|
|
21001
|
-
Root: Root$
|
|
21001
|
+
Root: Root$3,
|
|
21002
21002
|
Item: RadioGroupItem,
|
|
21003
21003
|
Label: Label$1,
|
|
21004
21004
|
Context: RadioGroupContext
|
|
@@ -21092,28 +21092,28 @@ const checkboxRecipe = sva({
|
|
|
21092
21092
|
variant: "square"
|
|
21093
21093
|
}
|
|
21094
21094
|
});
|
|
21095
|
-
const { withProvider: withProvider$1, withContext: withContext$
|
|
21095
|
+
const { withProvider: withProvider$1, withContext: withContext$2 } = createStyleContext(checkboxRecipe);
|
|
21096
21096
|
withProvider$1(CheckboxRootProvider, "root");
|
|
21097
|
-
const Root$
|
|
21098
|
-
const Control$1 = withContext$
|
|
21097
|
+
const Root$2 = withProvider$1(CheckboxRoot, "root");
|
|
21098
|
+
const Control$1 = withContext$2(
|
|
21099
21099
|
CheckboxControl,
|
|
21100
21100
|
"control"
|
|
21101
21101
|
);
|
|
21102
|
-
withContext$
|
|
21102
|
+
withContext$2(
|
|
21103
21103
|
CheckboxGroup,
|
|
21104
21104
|
"group"
|
|
21105
21105
|
);
|
|
21106
|
-
const Indicator = withContext$
|
|
21106
|
+
const Indicator = withContext$2(
|
|
21107
21107
|
CheckboxIndicator,
|
|
21108
21108
|
"indicator"
|
|
21109
21109
|
);
|
|
21110
|
-
const Label = withContext$
|
|
21110
|
+
const Label = withContext$2(
|
|
21111
21111
|
CheckboxLabel,
|
|
21112
21112
|
"label"
|
|
21113
21113
|
);
|
|
21114
21114
|
const Checkbox = React.forwardRef((props, ref) => {
|
|
21115
21115
|
const { children, ...rootProps } = props;
|
|
21116
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Root$
|
|
21116
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Root$2, { ref, ...rootProps, children: [
|
|
21117
21117
|
/* @__PURE__ */ jsxRuntime.jsxs(Control$1, { children: [
|
|
21118
21118
|
/* @__PURE__ */ jsxRuntime.jsx(Indicator, { children: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, {}) }),
|
|
21119
21119
|
/* @__PURE__ */ jsxRuntime.jsx(Indicator, { indeterminate: true, children: /* @__PURE__ */ jsxRuntime.jsx(MinusIcon, {}) })
|
|
@@ -21275,23 +21275,23 @@ const switchRecipe = sva({
|
|
|
21275
21275
|
}
|
|
21276
21276
|
}
|
|
21277
21277
|
});
|
|
21278
|
-
const { withProvider, withContext } = createStyleContext(switchRecipe);
|
|
21278
|
+
const { withProvider, withContext: withContext$1 } = createStyleContext(switchRecipe);
|
|
21279
21279
|
withProvider(SwitchRootProvider, "root");
|
|
21280
|
-
const Root = withProvider(SwitchRoot, "root");
|
|
21281
|
-
const Control = withContext(
|
|
21280
|
+
const Root$1 = withProvider(SwitchRoot, "root");
|
|
21281
|
+
const Control = withContext$1(
|
|
21282
21282
|
SwitchControl,
|
|
21283
21283
|
"control"
|
|
21284
21284
|
);
|
|
21285
|
-
withContext(
|
|
21285
|
+
withContext$1(
|
|
21286
21286
|
SwitchLabel,
|
|
21287
21287
|
"label"
|
|
21288
21288
|
);
|
|
21289
|
-
const Thumb = withContext(
|
|
21289
|
+
const Thumb = withContext$1(
|
|
21290
21290
|
SwitchThumb,
|
|
21291
21291
|
"thumb"
|
|
21292
21292
|
);
|
|
21293
21293
|
const Switch = React.forwardRef((props, ref) => {
|
|
21294
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Root, { ref, ...props, children: [
|
|
21294
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Root$1, { ref, ...props, children: [
|
|
21295
21295
|
/* @__PURE__ */ jsxRuntime.jsx(Control, { children: /* @__PURE__ */ jsxRuntime.jsx(Thumb, {}) }),
|
|
21296
21296
|
/* @__PURE__ */ jsxRuntime.jsx(SwitchHiddenInput, {})
|
|
21297
21297
|
] });
|
|
@@ -21406,6 +21406,88 @@ const Fab = React.forwardRef(({ loading, disabled, children, color: color2, ...r
|
|
|
21406
21406
|
});
|
|
21407
21407
|
Fab.displayName = "Fab";
|
|
21408
21408
|
const index = React.memo(withPolymorphicComponent(Fab));
|
|
21409
|
+
const listRecipe = sva({
|
|
21410
|
+
className: "list",
|
|
21411
|
+
slots: ["item", "root"],
|
|
21412
|
+
base: {
|
|
21413
|
+
root: {
|
|
21414
|
+
display: "flex",
|
|
21415
|
+
flexDir: "column",
|
|
21416
|
+
w: "full"
|
|
21417
|
+
},
|
|
21418
|
+
item: {
|
|
21419
|
+
gap: 2,
|
|
21420
|
+
py: 2,
|
|
21421
|
+
w: "full",
|
|
21422
|
+
rounded: "sm",
|
|
21423
|
+
transition: "background-color 0.1s ease-in-out",
|
|
21424
|
+
cursor: "pointer",
|
|
21425
|
+
"& .label": {
|
|
21426
|
+
color: "content.neutral.default"
|
|
21427
|
+
},
|
|
21428
|
+
"& .sub-label": {
|
|
21429
|
+
color: "content.neutral.subtlest"
|
|
21430
|
+
},
|
|
21431
|
+
_hover: {
|
|
21432
|
+
bg: "background.neutral.selected"
|
|
21433
|
+
},
|
|
21434
|
+
_disabled: {
|
|
21435
|
+
_hover: {
|
|
21436
|
+
bg: "transparent"
|
|
21437
|
+
},
|
|
21438
|
+
"& .label": {
|
|
21439
|
+
color: "content.neutral.disabled"
|
|
21440
|
+
},
|
|
21441
|
+
"& .sub-label": {
|
|
21442
|
+
color: "content.neutral.disabled"
|
|
21443
|
+
},
|
|
21444
|
+
cursor: "not-allowed"
|
|
21445
|
+
}
|
|
21446
|
+
}
|
|
21447
|
+
},
|
|
21448
|
+
variants: {
|
|
21449
|
+
size: {
|
|
21450
|
+
sm: {
|
|
21451
|
+
item: {
|
|
21452
|
+
h: "52px"
|
|
21453
|
+
}
|
|
21454
|
+
},
|
|
21455
|
+
lg: {
|
|
21456
|
+
item: { h: "68px" }
|
|
21457
|
+
}
|
|
21458
|
+
},
|
|
21459
|
+
density: {
|
|
21460
|
+
1: { item: { px: 2 } },
|
|
21461
|
+
2: { item: { pl: 12, pr: 2 } }
|
|
21462
|
+
}
|
|
21463
|
+
},
|
|
21464
|
+
defaultVariants: {
|
|
21465
|
+
size: "sm",
|
|
21466
|
+
density: 1
|
|
21467
|
+
}
|
|
21468
|
+
});
|
|
21469
|
+
const { withRootProvider, withContext } = createStyleContext(listRecipe);
|
|
21470
|
+
const Root = withRootProvider(withContext(styled.ul, "root"));
|
|
21471
|
+
const Item = withContext(
|
|
21472
|
+
({ startAdornment, endAdornment, label, subLabel, disabled, ...rest }) => {
|
|
21473
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(HStack2, { gap: 2, justify: "space-between", as: "li", ...rest, disabled, children: [
|
|
21474
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack2, { children: [
|
|
21475
|
+
startAdornment,
|
|
21476
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Stack2, { gap: 0, children: [
|
|
21477
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "label.md", className: "label", children: label }),
|
|
21478
|
+
subLabel && /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "label.sm", className: "sub-label", children: subLabel })
|
|
21479
|
+
] })
|
|
21480
|
+
] }),
|
|
21481
|
+
/* @__PURE__ */ jsxRuntime.jsx(HStack2, { children: endAdornment })
|
|
21482
|
+
] });
|
|
21483
|
+
},
|
|
21484
|
+
"item"
|
|
21485
|
+
);
|
|
21486
|
+
Item.displayName = "Item";
|
|
21487
|
+
const List = Object.assign(Root, {
|
|
21488
|
+
Root,
|
|
21489
|
+
Item
|
|
21490
|
+
});
|
|
21409
21491
|
function definePreset(preset2) {
|
|
21410
21492
|
return preset2;
|
|
21411
21493
|
}
|
|
@@ -21729,6 +21811,7 @@ exports.GridItem = GridItem2;
|
|
|
21729
21811
|
exports.HStack = HStack2;
|
|
21730
21812
|
exports.IconButton = index$4;
|
|
21731
21813
|
exports.Input = index$2;
|
|
21814
|
+
exports.List = List;
|
|
21732
21815
|
exports.Navigation = Navigation;
|
|
21733
21816
|
exports.Portal = Portal;
|
|
21734
21817
|
exports.RadioGroup = RadioGroup;
|