@nation-a/ui 0.16.6 → 0.16.7
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 +47 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +47 -8
- package/dist/index.js.map +1 -1
- package/dist/styled-system/styles.css +23 -16
- package/dist/styled-system/tokens/index.mjs +4 -0
- package/dist/styled-system/tokens/tokens.d.ts +2 -2
- package/dist/types/components/Select/index.d.ts +4 -0
- package/dist/types/components/Select/select.recipe.d.ts +1 -1
- package/dist/types/theme/tokens/animations.d.ts +3 -0
- package/dist/types/theme/tokens/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7686,6 +7686,12 @@ const SelectContent = React.forwardRef((props, ref) => {
|
|
|
7686
7686
|
return /* @__PURE__ */ jsxRuntime.jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) });
|
|
7687
7687
|
});
|
|
7688
7688
|
SelectContent.displayName = "SelectContent";
|
|
7689
|
+
const SelectControl = React.forwardRef((props, ref) => {
|
|
7690
|
+
const select = useSelectContext();
|
|
7691
|
+
const mergedProps = mergeProps(select.getControlProps(), props);
|
|
7692
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ark.div, { ...mergedProps, ref });
|
|
7693
|
+
});
|
|
7694
|
+
SelectControl.displayName = "SelectControl";
|
|
7689
7695
|
const [SelectItemProvider, useSelectItemContext] = createContext({
|
|
7690
7696
|
name: "SelectItemContext",
|
|
7691
7697
|
hookName: "useSelectItemContext",
|
|
@@ -7710,6 +7716,16 @@ const SelectLabel = React.forwardRef((props, ref) => {
|
|
|
7710
7716
|
return /* @__PURE__ */ jsxRuntime.jsx(ark.label, { ...mergedProps, ref });
|
|
7711
7717
|
});
|
|
7712
7718
|
SelectLabel.displayName = "SelectLabel";
|
|
7719
|
+
const SelectPositioner = React.forwardRef((props, ref) => {
|
|
7720
|
+
const select = useSelectContext();
|
|
7721
|
+
const mergedProps = mergeProps(select.getPositionerProps(), props);
|
|
7722
|
+
const presence = usePresenceContext();
|
|
7723
|
+
if (presence.unmounted) {
|
|
7724
|
+
return null;
|
|
7725
|
+
}
|
|
7726
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ark.div, { ...mergedProps, ref });
|
|
7727
|
+
});
|
|
7728
|
+
SelectPositioner.displayName = "SelectPositioner";
|
|
7713
7729
|
var anatomy$2 = createAnatomy("select").parts(
|
|
7714
7730
|
"label",
|
|
7715
7731
|
"positioner",
|
|
@@ -10215,7 +10231,7 @@ const Trigger$3 = withContext$7(DialogTrigger, "trigger");
|
|
|
10215
10231
|
const Content$4 = withContext$7(DialogContent, "content");
|
|
10216
10232
|
const Title = withContext$7(DialogTitle, "title");
|
|
10217
10233
|
const Description$2 = withContext$7(DialogDescription, "description");
|
|
10218
|
-
const Positioner = withContext$7(DialogPositioner, "positioner");
|
|
10234
|
+
const Positioner$1 = withContext$7(DialogPositioner, "positioner");
|
|
10219
10235
|
const Header$1 = withContext$7(ark.header, "header");
|
|
10220
10236
|
const Footer = withContext$7(
|
|
10221
10237
|
({ orientation = "horizontal", className, ...props }) => {
|
|
@@ -10244,7 +10260,7 @@ const Dialog = {
|
|
|
10244
10260
|
Content: Content$4,
|
|
10245
10261
|
Title,
|
|
10246
10262
|
Description: Description$2,
|
|
10247
|
-
Positioner,
|
|
10263
|
+
Positioner: Positioner$1,
|
|
10248
10264
|
Header: Header$1,
|
|
10249
10265
|
Footer,
|
|
10250
10266
|
Body,
|
|
@@ -20792,7 +20808,7 @@ Toast.error = (description, option) => {
|
|
|
20792
20808
|
};
|
|
20793
20809
|
const selectRecipe = sva({
|
|
20794
20810
|
className: "select",
|
|
20795
|
-
slots: [
|
|
20811
|
+
slots: [...anatomy$2.keys(), "description"],
|
|
20796
20812
|
base: {
|
|
20797
20813
|
root: {
|
|
20798
20814
|
display: "flex",
|
|
@@ -20801,6 +20817,7 @@ const selectRecipe = sva({
|
|
|
20801
20817
|
width: "100%"
|
|
20802
20818
|
},
|
|
20803
20819
|
trigger: {
|
|
20820
|
+
position: "relative",
|
|
20804
20821
|
display: "flex",
|
|
20805
20822
|
alignItems: "center",
|
|
20806
20823
|
justifyContent: "space-between",
|
|
@@ -20816,11 +20833,18 @@ const selectRecipe = sva({
|
|
|
20816
20833
|
},
|
|
20817
20834
|
content: {
|
|
20818
20835
|
backgroundColor: "background.neutral.default",
|
|
20819
|
-
mt: 2,
|
|
20820
20836
|
padding: 2,
|
|
20821
20837
|
borderRadius: 16,
|
|
20822
20838
|
overflowY: "auto",
|
|
20823
|
-
zIndex: "dropdown"
|
|
20839
|
+
zIndex: "dropdown",
|
|
20840
|
+
display: "flex",
|
|
20841
|
+
flexDirection: "column",
|
|
20842
|
+
_open: {
|
|
20843
|
+
animation: "fadeIn 0.2s ease-in"
|
|
20844
|
+
},
|
|
20845
|
+
_closed: {
|
|
20846
|
+
animation: "fadeOut 0.2s ease-out"
|
|
20847
|
+
}
|
|
20824
20848
|
},
|
|
20825
20849
|
item: {
|
|
20826
20850
|
display: "flex",
|
|
@@ -20830,8 +20854,10 @@ const selectRecipe = sva({
|
|
|
20830
20854
|
cursor: "pointer",
|
|
20831
20855
|
color: "content.neutral.default",
|
|
20832
20856
|
textStyle: "label.md",
|
|
20833
|
-
"
|
|
20834
|
-
|
|
20857
|
+
rounded: "sm",
|
|
20858
|
+
transition: "all 0.2s ease",
|
|
20859
|
+
_hover: {
|
|
20860
|
+
backgroundColor: "background.neutral.selected"
|
|
20835
20861
|
}
|
|
20836
20862
|
},
|
|
20837
20863
|
label: {
|
|
@@ -20900,12 +20926,20 @@ const Trigger = withContext$4(({ description, ...props }) => {
|
|
|
20900
20926
|
description && /* @__PURE__ */ jsxRuntime.jsx(Description, { text: description })
|
|
20901
20927
|
] });
|
|
20902
20928
|
}, "trigger");
|
|
20929
|
+
const Control$2 = withContext$4(
|
|
20930
|
+
SelectControl,
|
|
20931
|
+
"control"
|
|
20932
|
+
);
|
|
20903
20933
|
const ValueText = withContext$4(SelectValueText, "valueText");
|
|
20904
20934
|
const Description = withContext$4(({ className, text, ...props }) => {
|
|
20905
20935
|
return /* @__PURE__ */ jsxRuntime.jsx(Text, { className, ...props, children: text });
|
|
20906
20936
|
}, "description");
|
|
20907
20937
|
const Content = withContext$4(SelectContent, "content");
|
|
20908
20938
|
const Item$2 = withContext$4(SelectItem, "item");
|
|
20939
|
+
const Positioner = withContext$4(
|
|
20940
|
+
SelectPositioner,
|
|
20941
|
+
"positioner"
|
|
20942
|
+
);
|
|
20909
20943
|
const Select = {
|
|
20910
20944
|
Root: Root$4,
|
|
20911
20945
|
Label: Label$2,
|
|
@@ -20913,7 +20947,9 @@ const Select = {
|
|
|
20913
20947
|
Content,
|
|
20914
20948
|
Item: Item$2,
|
|
20915
20949
|
ValueText,
|
|
20916
|
-
Description
|
|
20950
|
+
Description,
|
|
20951
|
+
Positioner,
|
|
20952
|
+
Control: Control$2
|
|
20917
20953
|
};
|
|
20918
20954
|
const radioGroupRecipe = sva({
|
|
20919
20955
|
className: "radioGroup",
|
|
@@ -21640,6 +21676,9 @@ const animations = defineTokens.animations({
|
|
|
21640
21676
|
"fade-in": {
|
|
21641
21677
|
value: "fade-in 400ms {easings.emphasized-in}"
|
|
21642
21678
|
},
|
|
21679
|
+
"fade-out": {
|
|
21680
|
+
value: "fade-out 200ms {easings.emphasized-out}"
|
|
21681
|
+
},
|
|
21643
21682
|
"collapse-in": {
|
|
21644
21683
|
value: "collapse-in 250ms {easings.emphasized-in}"
|
|
21645
21684
|
},
|