@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.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,
@@ -20667,6 +20683,7 @@ const Description$1 = React.forwardRef(
20667
20683
  return /* @__PURE__ */ jsxRuntime.jsx(Box$1, { ref, className: cx(styles2.description, className), children });
20668
20684
  }
20669
20685
  );
20686
+ Description$1.displayName = "Toast.Description";
20670
20687
  const Icon = React.forwardRef(({ icon, className }, ref) => {
20671
20688
  const styles2 = toastRecipe();
20672
20689
  return /* @__PURE__ */ jsxRuntime.jsx(Box$1, { ref, className: cx(styles2.icon, className), children: icon });
@@ -20677,7 +20694,7 @@ const ActionTrigger = React.forwardRef(({ onClick, children, className, asLink =
20677
20694
  return /* @__PURE__ */ jsxRuntime.jsx("button", { ref, className: cx(styles2.actionTrigger, className), onClick, children });
20678
20695
  });
20679
20696
  ActionTrigger.displayName = "Toast.ActionTrigger";
20680
- const Toaster = () => {
20697
+ const Toaster = ({ toastOptions, ...props }) => {
20681
20698
  return /* @__PURE__ */ jsxRuntime.jsx(
20682
20699
  Oe,
20683
20700
  {
@@ -20690,8 +20707,10 @@ const Toaster = () => {
20690
20707
  padding: 0,
20691
20708
  margin: 0,
20692
20709
  width: "100%"
20693
- }
20694
- }
20710
+ },
20711
+ ...toastOptions
20712
+ },
20713
+ ...props
20695
20714
  }
20696
20715
  );
20697
20716
  };
@@ -20699,6 +20718,7 @@ Toaster.displayName = "Toast.Toaster";
20699
20718
  const Toast = React.forwardRef((props, ref) => {
20700
20719
  return /* @__PURE__ */ jsxRuntime.jsx(Box$1, { ref, ...props });
20701
20720
  });
20721
+ Toast.displayName = "Toast";
20702
20722
  Toast.Root = Root$5;
20703
20723
  Toast.Content = Content$1;
20704
20724
  Toast.Description = Description$1;
@@ -20792,7 +20812,7 @@ Toast.error = (description, option) => {
20792
20812
  };
20793
20813
  const selectRecipe = sva({
20794
20814
  className: "select",
20795
- slots: ["root", "trigger", "content", "item", "label", "valueText", "description"],
20815
+ slots: [...anatomy$2.keys(), "description"],
20796
20816
  base: {
20797
20817
  root: {
20798
20818
  display: "flex",
@@ -20801,6 +20821,7 @@ const selectRecipe = sva({
20801
20821
  width: "100%"
20802
20822
  },
20803
20823
  trigger: {
20824
+ position: "relative",
20804
20825
  display: "flex",
20805
20826
  alignItems: "center",
20806
20827
  justifyContent: "space-between",
@@ -20816,11 +20837,18 @@ const selectRecipe = sva({
20816
20837
  },
20817
20838
  content: {
20818
20839
  backgroundColor: "background.neutral.default",
20819
- mt: 2,
20820
20840
  padding: 2,
20821
20841
  borderRadius: 16,
20822
20842
  overflowY: "auto",
20823
- zIndex: "dropdown"
20843
+ zIndex: "dropdown",
20844
+ display: "flex",
20845
+ flexDirection: "column",
20846
+ _open: {
20847
+ animation: "fadeIn 0.2s ease-in"
20848
+ },
20849
+ _closed: {
20850
+ animation: "fadeOut 0.2s ease-out"
20851
+ }
20824
20852
  },
20825
20853
  item: {
20826
20854
  display: "flex",
@@ -20830,8 +20858,10 @@ const selectRecipe = sva({
20830
20858
  cursor: "pointer",
20831
20859
  color: "content.neutral.default",
20832
20860
  textStyle: "label.md",
20833
- "&:hover": {
20834
- backgroundColor: "background.neutral.hover"
20861
+ rounded: "sm",
20862
+ transition: "all 0.2s ease",
20863
+ _hover: {
20864
+ backgroundColor: "background.neutral.selected"
20835
20865
  }
20836
20866
  },
20837
20867
  label: {
@@ -20900,12 +20930,20 @@ const Trigger = withContext$4(({ description, ...props }) => {
20900
20930
  description && /* @__PURE__ */ jsxRuntime.jsx(Description, { text: description })
20901
20931
  ] });
20902
20932
  }, "trigger");
20933
+ const Control$2 = withContext$4(
20934
+ SelectControl,
20935
+ "control"
20936
+ );
20903
20937
  const ValueText = withContext$4(SelectValueText, "valueText");
20904
20938
  const Description = withContext$4(({ className, text, ...props }) => {
20905
20939
  return /* @__PURE__ */ jsxRuntime.jsx(Text, { className, ...props, children: text });
20906
20940
  }, "description");
20907
20941
  const Content = withContext$4(SelectContent, "content");
20908
20942
  const Item$2 = withContext$4(SelectItem, "item");
20943
+ const Positioner = withContext$4(
20944
+ SelectPositioner,
20945
+ "positioner"
20946
+ );
20909
20947
  const Select = {
20910
20948
  Root: Root$4,
20911
20949
  Label: Label$2,
@@ -20913,7 +20951,9 @@ const Select = {
20913
20951
  Content,
20914
20952
  Item: Item$2,
20915
20953
  ValueText,
20916
- Description
20954
+ Description,
20955
+ Positioner,
20956
+ Control: Control$2
20917
20957
  };
20918
20958
  const radioGroupRecipe = sva({
20919
20959
  className: "radioGroup",
@@ -21640,6 +21680,9 @@ const animations = defineTokens.animations({
21640
21680
  "fade-in": {
21641
21681
  value: "fade-in 400ms {easings.emphasized-in}"
21642
21682
  },
21683
+ "fade-out": {
21684
+ value: "fade-out 200ms {easings.emphasized-out}"
21685
+ },
21643
21686
  "collapse-in": {
21644
21687
  value: "collapse-in 250ms {easings.emphasized-in}"
21645
21688
  },