@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.js CHANGED
@@ -7668,6 +7668,12 @@ const SelectContent = forwardRef((props, ref) => {
7668
7668
  return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) });
7669
7669
  });
7670
7670
  SelectContent.displayName = "SelectContent";
7671
+ const SelectControl = forwardRef((props, ref) => {
7672
+ const select = useSelectContext();
7673
+ const mergedProps = mergeProps(select.getControlProps(), props);
7674
+ return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
7675
+ });
7676
+ SelectControl.displayName = "SelectControl";
7671
7677
  const [SelectItemProvider, useSelectItemContext] = createContext({
7672
7678
  name: "SelectItemContext",
7673
7679
  hookName: "useSelectItemContext",
@@ -7692,6 +7698,16 @@ const SelectLabel = forwardRef((props, ref) => {
7692
7698
  return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });
7693
7699
  });
7694
7700
  SelectLabel.displayName = "SelectLabel";
7701
+ const SelectPositioner = forwardRef((props, ref) => {
7702
+ const select = useSelectContext();
7703
+ const mergedProps = mergeProps(select.getPositionerProps(), props);
7704
+ const presence = usePresenceContext();
7705
+ if (presence.unmounted) {
7706
+ return null;
7707
+ }
7708
+ return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
7709
+ });
7710
+ SelectPositioner.displayName = "SelectPositioner";
7695
7711
  var anatomy$2 = createAnatomy("select").parts(
7696
7712
  "label",
7697
7713
  "positioner",
@@ -10197,7 +10213,7 @@ const Trigger$3 = withContext$7(DialogTrigger, "trigger");
10197
10213
  const Content$4 = withContext$7(DialogContent, "content");
10198
10214
  const Title = withContext$7(DialogTitle, "title");
10199
10215
  const Description$2 = withContext$7(DialogDescription, "description");
10200
- const Positioner = withContext$7(DialogPositioner, "positioner");
10216
+ const Positioner$1 = withContext$7(DialogPositioner, "positioner");
10201
10217
  const Header$1 = withContext$7(ark.header, "header");
10202
10218
  const Footer = withContext$7(
10203
10219
  ({ orientation = "horizontal", className, ...props }) => {
@@ -10226,7 +10242,7 @@ const Dialog = {
10226
10242
  Content: Content$4,
10227
10243
  Title,
10228
10244
  Description: Description$2,
10229
- Positioner,
10245
+ Positioner: Positioner$1,
10230
10246
  Header: Header$1,
10231
10247
  Footer,
10232
10248
  Body,
@@ -20774,7 +20790,7 @@ Toast.error = (description, option) => {
20774
20790
  };
20775
20791
  const selectRecipe = sva({
20776
20792
  className: "select",
20777
- slots: ["root", "trigger", "content", "item", "label", "valueText", "description"],
20793
+ slots: [...anatomy$2.keys(), "description"],
20778
20794
  base: {
20779
20795
  root: {
20780
20796
  display: "flex",
@@ -20783,6 +20799,7 @@ const selectRecipe = sva({
20783
20799
  width: "100%"
20784
20800
  },
20785
20801
  trigger: {
20802
+ position: "relative",
20786
20803
  display: "flex",
20787
20804
  alignItems: "center",
20788
20805
  justifyContent: "space-between",
@@ -20798,11 +20815,18 @@ const selectRecipe = sva({
20798
20815
  },
20799
20816
  content: {
20800
20817
  backgroundColor: "background.neutral.default",
20801
- mt: 2,
20802
20818
  padding: 2,
20803
20819
  borderRadius: 16,
20804
20820
  overflowY: "auto",
20805
- zIndex: "dropdown"
20821
+ zIndex: "dropdown",
20822
+ display: "flex",
20823
+ flexDirection: "column",
20824
+ _open: {
20825
+ animation: "fadeIn 0.2s ease-in"
20826
+ },
20827
+ _closed: {
20828
+ animation: "fadeOut 0.2s ease-out"
20829
+ }
20806
20830
  },
20807
20831
  item: {
20808
20832
  display: "flex",
@@ -20812,8 +20836,10 @@ const selectRecipe = sva({
20812
20836
  cursor: "pointer",
20813
20837
  color: "content.neutral.default",
20814
20838
  textStyle: "label.md",
20815
- "&:hover": {
20816
- backgroundColor: "background.neutral.hover"
20839
+ rounded: "sm",
20840
+ transition: "all 0.2s ease",
20841
+ _hover: {
20842
+ backgroundColor: "background.neutral.selected"
20817
20843
  }
20818
20844
  },
20819
20845
  label: {
@@ -20882,12 +20908,20 @@ const Trigger = withContext$4(({ description, ...props }) => {
20882
20908
  description && /* @__PURE__ */ jsx(Description, { text: description })
20883
20909
  ] });
20884
20910
  }, "trigger");
20911
+ const Control$2 = withContext$4(
20912
+ SelectControl,
20913
+ "control"
20914
+ );
20885
20915
  const ValueText = withContext$4(SelectValueText, "valueText");
20886
20916
  const Description = withContext$4(({ className, text, ...props }) => {
20887
20917
  return /* @__PURE__ */ jsx(Text, { className, ...props, children: text });
20888
20918
  }, "description");
20889
20919
  const Content = withContext$4(SelectContent, "content");
20890
20920
  const Item$2 = withContext$4(SelectItem, "item");
20921
+ const Positioner = withContext$4(
20922
+ SelectPositioner,
20923
+ "positioner"
20924
+ );
20891
20925
  const Select = {
20892
20926
  Root: Root$4,
20893
20927
  Label: Label$2,
@@ -20895,7 +20929,9 @@ const Select = {
20895
20929
  Content,
20896
20930
  Item: Item$2,
20897
20931
  ValueText,
20898
- Description
20932
+ Description,
20933
+ Positioner,
20934
+ Control: Control$2
20899
20935
  };
20900
20936
  const radioGroupRecipe = sva({
20901
20937
  className: "radioGroup",
@@ -21622,6 +21658,9 @@ const animations = defineTokens.animations({
21622
21658
  "fade-in": {
21623
21659
  value: "fade-in 400ms {easings.emphasized-in}"
21624
21660
  },
21661
+ "fade-out": {
21662
+ value: "fade-out 200ms {easings.emphasized-out}"
21663
+ },
21625
21664
  "collapse-in": {
21626
21665
  value: "collapse-in 250ms {easings.emphasized-in}"
21627
21666
  },