@nation-a/ui 0.16.6 → 0.16.8

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,
@@ -20649,6 +20665,7 @@ const Description$1 = forwardRef(
20649
20665
  return /* @__PURE__ */ jsx(Box$1, { ref, className: cx(styles2.description, className), children });
20650
20666
  }
20651
20667
  );
20668
+ Description$1.displayName = "Toast.Description";
20652
20669
  const Icon = forwardRef(({ icon, className }, ref) => {
20653
20670
  const styles2 = toastRecipe();
20654
20671
  return /* @__PURE__ */ jsx(Box$1, { ref, className: cx(styles2.icon, className), children: icon });
@@ -20659,7 +20676,7 @@ const ActionTrigger = forwardRef(({ onClick, children, className, asLink = false
20659
20676
  return /* @__PURE__ */ jsx("button", { ref, className: cx(styles2.actionTrigger, className), onClick, children });
20660
20677
  });
20661
20678
  ActionTrigger.displayName = "Toast.ActionTrigger";
20662
- const Toaster = () => {
20679
+ const Toaster = ({ toastOptions, ...props }) => {
20663
20680
  return /* @__PURE__ */ jsx(
20664
20681
  Oe,
20665
20682
  {
@@ -20672,8 +20689,10 @@ const Toaster = () => {
20672
20689
  padding: 0,
20673
20690
  margin: 0,
20674
20691
  width: "100%"
20675
- }
20676
- }
20692
+ },
20693
+ ...toastOptions
20694
+ },
20695
+ ...props
20677
20696
  }
20678
20697
  );
20679
20698
  };
@@ -20681,6 +20700,7 @@ Toaster.displayName = "Toast.Toaster";
20681
20700
  const Toast = forwardRef((props, ref) => {
20682
20701
  return /* @__PURE__ */ jsx(Box$1, { ref, ...props });
20683
20702
  });
20703
+ Toast.displayName = "Toast";
20684
20704
  Toast.Root = Root$5;
20685
20705
  Toast.Content = Content$1;
20686
20706
  Toast.Description = Description$1;
@@ -20774,7 +20794,7 @@ Toast.error = (description, option) => {
20774
20794
  };
20775
20795
  const selectRecipe = sva({
20776
20796
  className: "select",
20777
- slots: ["root", "trigger", "content", "item", "label", "valueText", "description"],
20797
+ slots: [...anatomy$2.keys(), "description"],
20778
20798
  base: {
20779
20799
  root: {
20780
20800
  display: "flex",
@@ -20783,6 +20803,7 @@ const selectRecipe = sva({
20783
20803
  width: "100%"
20784
20804
  },
20785
20805
  trigger: {
20806
+ position: "relative",
20786
20807
  display: "flex",
20787
20808
  alignItems: "center",
20788
20809
  justifyContent: "space-between",
@@ -20798,11 +20819,18 @@ const selectRecipe = sva({
20798
20819
  },
20799
20820
  content: {
20800
20821
  backgroundColor: "background.neutral.default",
20801
- mt: 2,
20802
20822
  padding: 2,
20803
20823
  borderRadius: 16,
20804
20824
  overflowY: "auto",
20805
- zIndex: "dropdown"
20825
+ zIndex: "dropdown",
20826
+ display: "flex",
20827
+ flexDirection: "column",
20828
+ _open: {
20829
+ animation: "fadeIn 0.2s ease-in"
20830
+ },
20831
+ _closed: {
20832
+ animation: "fadeOut 0.2s ease-out"
20833
+ }
20806
20834
  },
20807
20835
  item: {
20808
20836
  display: "flex",
@@ -20812,8 +20840,10 @@ const selectRecipe = sva({
20812
20840
  cursor: "pointer",
20813
20841
  color: "content.neutral.default",
20814
20842
  textStyle: "label.md",
20815
- "&:hover": {
20816
- backgroundColor: "background.neutral.hover"
20843
+ rounded: "sm",
20844
+ transition: "all 0.2s ease",
20845
+ _hover: {
20846
+ backgroundColor: "background.neutral.selected"
20817
20847
  }
20818
20848
  },
20819
20849
  label: {
@@ -20882,12 +20912,20 @@ const Trigger = withContext$4(({ description, ...props }) => {
20882
20912
  description && /* @__PURE__ */ jsx(Description, { text: description })
20883
20913
  ] });
20884
20914
  }, "trigger");
20915
+ const Control$2 = withContext$4(
20916
+ SelectControl,
20917
+ "control"
20918
+ );
20885
20919
  const ValueText = withContext$4(SelectValueText, "valueText");
20886
20920
  const Description = withContext$4(({ className, text, ...props }) => {
20887
20921
  return /* @__PURE__ */ jsx(Text, { className, ...props, children: text });
20888
20922
  }, "description");
20889
20923
  const Content = withContext$4(SelectContent, "content");
20890
20924
  const Item$2 = withContext$4(SelectItem, "item");
20925
+ const Positioner = withContext$4(
20926
+ SelectPositioner,
20927
+ "positioner"
20928
+ );
20891
20929
  const Select = {
20892
20930
  Root: Root$4,
20893
20931
  Label: Label$2,
@@ -20895,7 +20933,9 @@ const Select = {
20895
20933
  Content,
20896
20934
  Item: Item$2,
20897
20935
  ValueText,
20898
- Description
20936
+ Description,
20937
+ Positioner,
20938
+ Control: Control$2
20899
20939
  };
20900
20940
  const radioGroupRecipe = sva({
20901
20941
  className: "radioGroup",
@@ -21622,6 +21662,9 @@ const animations = defineTokens.animations({
21622
21662
  "fade-in": {
21623
21663
  value: "fade-in 400ms {easings.emphasized-in}"
21624
21664
  },
21665
+ "fade-out": {
21666
+ value: "fade-out 200ms {easings.emphasized-out}"
21667
+ },
21625
21668
  "collapse-in": {
21626
21669
  value: "collapse-in 250ms {easings.emphasized-in}"
21627
21670
  },