@px-ui/core 1.22.0 → 1.24.0

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.
Files changed (38) hide show
  1. package/dist/components/block-checkbox-group.js +72 -0
  2. package/dist/components/block-radio-group.js +79 -0
  3. package/dist/components/input-group.js +37 -24
  4. package/dist/components/input.js +46 -0
  5. package/dist/components/radio-group.js +85 -0
  6. package/dist/components/switch.js +39 -0
  7. package/dist/components/tabs.js +108 -0
  8. package/dist/components/textarea.js +41 -0
  9. package/dist/components/tooltip.js +5 -5
  10. package/dist/hooks/use-async-options.js +17 -13
  11. package/dist/index.d.ts +21 -11
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +48 -21
  14. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/checkbox-group/CheckboxGroup.js +82 -0
  15. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/checkbox-group/useCheckboxGroupParent.js +42 -0
  16. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/radio/indicator/RadioIndicator.js +37 -0
  17. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/radio/root/RadioRootContext.js +11 -4
  18. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/switch/root/SwitchRoot.js +144 -0
  19. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/switch/root/SwitchRootContext.js +13 -0
  20. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/switch/root/SwitchRootDataAttributes.js +6 -0
  21. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/switch/stateAttributesMapping.js +15 -0
  22. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/switch/thumb/SwitchThumb.js +27 -0
  23. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/indicator/TabsIndicator.js +107 -0
  24. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/indicator/TabsIndicatorCssVars.js +6 -0
  25. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/indicator/prehydrationScript.min.js +4 -0
  26. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/list/TabsList.js +130 -0
  27. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/list/TabsListContext.js +13 -0
  28. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/panel/TabsPanel.js +53 -0
  29. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/panel/TabsPanelDataAttributes.js +6 -0
  30. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/root/TabsRoot.js +76 -0
  31. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/root/TabsRootContext.js +13 -0
  32. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/root/TabsRootDataAttributes.js +6 -0
  33. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/root/stateAttributesMapping.js +9 -0
  34. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/tab/TabsTab.js +108 -0
  35. package/dist/node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/utils/createBaseUIEventDetails.js +9 -9
  36. package/dist/node_modules/.pnpm/@base-ui-components_utils@0.1.2_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/utils/esm/generateId.js +7 -0
  37. package/dist/node_modules/.pnpm/@base-ui-components_utils@0.1.2_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/utils/esm/useForcedRerendering.js +10 -0
  38. package/package.json +98 -6
@@ -0,0 +1,72 @@
1
+ import { j as r } from "../_virtual/jsx-runtime.js";
2
+ import { cn as a } from "../utils/classnames.js";
3
+ import { Checkbox as i } from "./checkbox.js";
4
+ import { CheckboxGroup as o } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/checkbox-group/CheckboxGroup.js";
5
+ function c({
6
+ className: e,
7
+ ...s
8
+ }) {
9
+ return /* @__PURE__ */ r.jsx(o, { className: a("gap-4 flex", e), ...s });
10
+ }
11
+ function m({
12
+ className: e,
13
+ invalid: s,
14
+ children: t,
15
+ ...n
16
+ }) {
17
+ return /* @__PURE__ */ r.jsxs(
18
+ "label",
19
+ {
20
+ className: a(
21
+ "gap-2 p-5 flex min-h-[155px] justify-between rounded-ppx-s border-2 border-ppx-neutral-3 shadow-[0px_0px_12px_#0000001F] transition-colors duration-300 has-not-disabled:hover:border-ppx-neutral-6 has-disabled:cursor-not-allowed has-disabled:opacity-60 has-disabled:hover:border-ppx-neutral-3 has-aria-invalid:shadow-ppx-red-2 has-data-checked:border-ppx-primary-5!",
22
+ e
23
+ ),
24
+ children: [
25
+ /* @__PURE__ */ r.jsx("div", { className: "flex-1", children: t }),
26
+ /* @__PURE__ */ r.jsx(
27
+ i,
28
+ {
29
+ ...n,
30
+ className: "ml-auto shrink-0 self-start",
31
+ size: "lg",
32
+ "aria-invalid": s
33
+ }
34
+ )
35
+ ]
36
+ }
37
+ );
38
+ }
39
+ function u(e) {
40
+ return /* @__PURE__ */ r.jsx("div", { className: a("mb-5 gap-2 flex items-center", e.className), children: e.children });
41
+ }
42
+ function h(e) {
43
+ return /* @__PURE__ */ r.jsx(
44
+ "div",
45
+ {
46
+ className: a(
47
+ "font-sans-sb text-ppx-base text-ppx-foreground",
48
+ e.className
49
+ ),
50
+ children: e.children
51
+ }
52
+ );
53
+ }
54
+ function f(e) {
55
+ return /* @__PURE__ */ r.jsx(
56
+ "p",
57
+ {
58
+ className: a(
59
+ "mb-5 text-ppx-sm text-ppx-muted-foreground",
60
+ e.className
61
+ ),
62
+ children: e.children
63
+ }
64
+ );
65
+ }
66
+ export {
67
+ f as Description,
68
+ c as Group,
69
+ u as Header,
70
+ m as Item,
71
+ h as Title
72
+ };
@@ -0,0 +1,79 @@
1
+ import { j as r } from "../_virtual/jsx-runtime.js";
2
+ import { cn as a } from "../utils/classnames.js";
3
+ import { RadioGroupItem as o } from "./radio-group.js";
4
+ import { RadioGroup as n } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/radio-group/RadioGroup.js";
5
+ function c({
6
+ className: e,
7
+ ...s
8
+ }) {
9
+ return /* @__PURE__ */ r.jsx(
10
+ n,
11
+ {
12
+ "data-slot": "radio-group",
13
+ className: a("gap-4 flex", e),
14
+ ...s
15
+ }
16
+ );
17
+ }
18
+ function m({
19
+ className: e,
20
+ invalid: s,
21
+ children: t,
22
+ ...i
23
+ }) {
24
+ return /* @__PURE__ */ r.jsxs(
25
+ "label",
26
+ {
27
+ className: a(
28
+ "gap-2 p-5 flex min-h-[155px] justify-between rounded-ppx-s border-2 border-ppx-neutral-3 shadow-[0px_0px_12px_#0000001F] transition-colors duration-300 has-not-disabled:hover:border-ppx-neutral-6 has-disabled:cursor-not-allowed has-disabled:opacity-60 has-disabled:hover:border-ppx-neutral-3 has-aria-invalid:shadow-ppx-red-2 has-data-checked:border-ppx-primary-5!",
29
+ e
30
+ ),
31
+ children: [
32
+ /* @__PURE__ */ r.jsx("div", { className: "flex-1", children: t }),
33
+ /* @__PURE__ */ r.jsx(
34
+ o,
35
+ {
36
+ ...i,
37
+ className: "ml-auto shrink-0 self-start",
38
+ size: "lg",
39
+ "aria-invalid": s
40
+ }
41
+ )
42
+ ]
43
+ }
44
+ );
45
+ }
46
+ function u(e) {
47
+ return /* @__PURE__ */ r.jsx("div", { className: a("mb-5 gap-2 flex items-center", e.className), children: e.children });
48
+ }
49
+ function h(e) {
50
+ return /* @__PURE__ */ r.jsx(
51
+ "div",
52
+ {
53
+ className: a(
54
+ "font-sans-sb text-ppx-base text-ppx-foreground",
55
+ e.className
56
+ ),
57
+ children: e.children
58
+ }
59
+ );
60
+ }
61
+ function f(e) {
62
+ return /* @__PURE__ */ r.jsx(
63
+ "p",
64
+ {
65
+ className: a(
66
+ "mb-5 text-ppx-sm text-ppx-muted-foreground",
67
+ e.className
68
+ ),
69
+ children: e.children
70
+ }
71
+ );
72
+ }
73
+ export {
74
+ f as Description,
75
+ c as Group,
76
+ u as Header,
77
+ m as Item,
78
+ h as Title
79
+ };
@@ -23,9 +23,9 @@ const l = s(
23
23
  }
24
24
  );
25
25
  function h({
26
- className: a,
26
+ className: n,
27
27
  size: t,
28
- disabled: n,
28
+ disabled: a,
29
29
  widthVariant: e,
30
30
  ...i
31
31
  }) {
@@ -34,8 +34,8 @@ function h({
34
34
  {
35
35
  "data-slot": "input-group",
36
36
  role: "group",
37
- className: r(l({ size: t, widthVariant: e }), a),
38
- "data-disabled": n,
37
+ className: r(l({ size: t, widthVariant: e }), n),
38
+ "data-disabled": a,
39
39
  ...i
40
40
  }
41
41
  );
@@ -54,10 +54,10 @@ const d = s(
54
54
  }
55
55
  }
56
56
  );
57
- function b({
58
- className: a,
57
+ function v({
58
+ className: n,
59
59
  align: t = "inline-start",
60
- ...n
60
+ ...a
61
61
  }) {
62
62
  return /* @__PURE__ */ o.jsx(
63
63
  "div",
@@ -65,12 +65,12 @@ function b({
65
65
  role: "group",
66
66
  "data-slot": "input-group-addon",
67
67
  "data-align": t,
68
- className: r(d({ align: t }), a),
68
+ className: r(d({ align: t }), n),
69
69
  onClick: (e) => {
70
70
  var i, u;
71
71
  e.target.closest("button") || (u = (i = e.currentTarget.parentElement) == null ? void 0 : i.querySelector("input")) == null || u.focus();
72
72
  },
73
- ...n
73
+ ...a
74
74
  }
75
75
  );
76
76
  }
@@ -90,10 +90,10 @@ const c = s(
90
90
  }
91
91
  }
92
92
  );
93
- function v({
94
- className: a,
93
+ function b({
94
+ className: n,
95
95
  type: t = "button",
96
- variant: n = "ghost",
96
+ variant: a = "ghost",
97
97
  size: e = "xs",
98
98
  ...i
99
99
  }) {
@@ -102,16 +102,28 @@ function v({
102
102
  {
103
103
  type: t,
104
104
  "data-size": e,
105
- variant: n,
106
- className: r(c({ size: e }), a),
105
+ variant: a,
106
+ className: r(c({ size: e }), n),
107
107
  ...i
108
108
  }
109
109
  );
110
110
  }
111
- function w({
112
- className: a,
111
+ function w({ className: n, ...t }) {
112
+ return /* @__PURE__ */ o.jsx(
113
+ "span",
114
+ {
115
+ className: r(
116
+ "gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 flex items-center text-ppx-muted-foreground [&_svg]:pointer-events-none",
117
+ n
118
+ ),
119
+ ...t
120
+ }
121
+ );
122
+ }
123
+ function z({
124
+ className: n,
113
125
  invalid: t,
114
- ...n
126
+ ...a
115
127
  }) {
116
128
  return /* @__PURE__ */ o.jsx(
117
129
  "input",
@@ -120,16 +132,17 @@ function w({
120
132
  "aria-invalid": t,
121
133
  className: r(
122
134
  "font-medium min-w-0 flex-1 rounded-none border-0 bg-transparent p-input text-ppx-sm text-ppx-foreground placeholder:font-sans-light placeholder:text-ppx-sm placeholder:text-ppx-neutral-12 focus:outline-none disabled:placeholder:text-ppx-neutral-11",
123
- n.type === "number" && "no-arrow-spin",
124
- a
135
+ a.type === "number" && "no-arrow-spin",
136
+ n
125
137
  ),
126
- ...n
138
+ ...a
127
139
  }
128
140
  );
129
141
  }
130
142
  export {
131
- b as Addon,
132
- v as Button,
133
- w as Input,
134
- h as Root
143
+ v as Addon,
144
+ b as Button,
145
+ z as Input,
146
+ h as Root,
147
+ w as Text
135
148
  };
@@ -0,0 +1,46 @@
1
+ import { j as r } from "../_virtual/jsx-runtime.js";
2
+ import { cn as l } from "../utils/classnames.js";
3
+ import { cva as o } from "../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
4
+ const p = o(
5
+ "font-medium shadow-xs inline-flex border-ppx-neutral-5 bg-ppx-neutral-1 text-ppx-sm text-ppx-foreground outline-transparent focus:-outline-offset-1 focus:outline-2 placeholder:text-ppx-sm placeholder:text-ppx-neutral-12 focus:not-aria-invalid:outline-ppx-primary-2 focus:not-aria-invalid:not-aria-disabled:bg-ppx-background focus:not-aria-invalid:bg-white disabled:cursor-not-allowed disabled:border-ppx-neutral-3 disabled:bg-ppx-neutral-3 disabled:text-ppx-neutral-11 disabled:placeholder:text-ppx-neutral-11 aria-invalid:outline-ppx-red-4 aria-invalid:bg-ppx-red-1 aria-invalid:outline aria-invalid:-outline-offset-1 placeholder:font-sans-light p-input border",
6
+ {
7
+ variants: {
8
+ size: {
9
+ default: "h-input rounded-input",
10
+ sm: "h-input-s rounded-input-s"
11
+ },
12
+ widthVariant: {
13
+ enforced: "min-w-input w-fit",
14
+ full: "min-w-0 w-full"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ size: "default",
19
+ widthVariant: "enforced"
20
+ }
21
+ }
22
+ );
23
+ function x({
24
+ className: i,
25
+ size: a,
26
+ invalid: n,
27
+ widthVariant: e,
28
+ ...t
29
+ }) {
30
+ return /* @__PURE__ */ r.jsx(
31
+ "input",
32
+ {
33
+ "data-slot": "input",
34
+ className: l(
35
+ p({ size: a, widthVariant: e }),
36
+ t.type === "number" && "no-arrow-spin",
37
+ i
38
+ ),
39
+ "aria-invalid": n,
40
+ ...t
41
+ }
42
+ );
43
+ }
44
+ export {
45
+ x as Input
46
+ };
@@ -0,0 +1,85 @@
1
+ import { j as r } from "../_virtual/jsx-runtime.js";
2
+ import { cn as e } from "../utils/classnames.js";
3
+ import { cva as s } from "../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
4
+ import { RadioGroup as d } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/radio-group/RadioGroup.js";
5
+ import { RadioRoot as l } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/radio/root/RadioRoot.js";
6
+ import { RadioIndicator as n } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/radio/indicator/RadioIndicator.js";
7
+ function g({
8
+ className: a,
9
+ ...t
10
+ }) {
11
+ return /* @__PURE__ */ r.jsx(
12
+ d,
13
+ {
14
+ "data-slot": "radio-group",
15
+ className: e("gap-3 flex flex-col", a),
16
+ ...t
17
+ }
18
+ );
19
+ }
20
+ const p = s(
21
+ "bg-white aria-invalid:border-ppx-red-5 aspect-square shrink-0 rounded-full border border-ppx-neutral-10 shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 ",
22
+ {
23
+ variants: {
24
+ variant: {
25
+ default: "data-checked:border-ppx-primary-5 text-ppx-primary-5"
26
+ },
27
+ size: {
28
+ default: "size-5",
29
+ sm: "size-4",
30
+ lg: "size-6"
31
+ }
32
+ },
33
+ defaultVariants: {
34
+ variant: "default",
35
+ size: "default"
36
+ }
37
+ }
38
+ );
39
+ function v({
40
+ className: a,
41
+ variant: t,
42
+ size: o,
43
+ ...i
44
+ }) {
45
+ return /* @__PURE__ */ r.jsx(
46
+ l,
47
+ {
48
+ "data-slot": "radio-group-item",
49
+ className: e(p({ variant: t, size: o, className: a })),
50
+ ...i,
51
+ children: /* @__PURE__ */ r.jsx(
52
+ n,
53
+ {
54
+ "data-slot": "radio-group-indicator",
55
+ className: "relative flex items-center justify-center",
56
+ children: /* @__PURE__ */ r.jsx(
57
+ "svg",
58
+ {
59
+ xmlns: "http://www.w3.org/2000/svg",
60
+ width: "24",
61
+ height: "24",
62
+ viewBox: "0 0 24 24",
63
+ fill: "currentColor",
64
+ stroke: "currentColor",
65
+ strokeWidth: "2",
66
+ strokeLinecap: "round",
67
+ strokeLinejoin: "round",
68
+ className: e(
69
+ "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
70
+ o === "sm" && "size-2",
71
+ o === void 0 && "size-3",
72
+ o === "lg" && "size-3.5"
73
+ ),
74
+ children: /* @__PURE__ */ r.jsx("circle", { cx: "12", cy: "12", r: "10" })
75
+ }
76
+ )
77
+ }
78
+ )
79
+ }
80
+ );
81
+ }
82
+ export {
83
+ g as RadioGroup,
84
+ v as RadioGroupItem
85
+ };
@@ -0,0 +1,39 @@
1
+ import { j as a } from "../_virtual/jsx-runtime.js";
2
+ import { cn as e } from "../utils/classnames.js";
3
+ import { SwitchRoot as o } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/switch/root/SwitchRoot.js";
4
+ import { SwitchThumb as i } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/switch/thumb/SwitchThumb.js";
5
+ function p({
6
+ className: r,
7
+ size: t,
8
+ ...n
9
+ }) {
10
+ return /* @__PURE__ */ a.jsx(
11
+ o,
12
+ {
13
+ "data-slot": "switch",
14
+ className: e(
15
+ "peer focus-visible:border-ring focus-visible:ring-ring/50 shadow-xs inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-checked:bg-ppx-primary-5 data-unchecked:bg-ppx-neutral-4",
16
+ t === "sm" && "h-4 w-8",
17
+ t === void 0 && "h-5 w-10",
18
+ t === "lg" && "h-6 w-12",
19
+ r
20
+ ),
21
+ ...n,
22
+ children: /* @__PURE__ */ a.jsx(
23
+ i,
24
+ {
25
+ "data-slot": "switch-thumb",
26
+ className: e(
27
+ "ease-in-out pointer-events-none block rounded-full bg-ppx-neutral-1 ring-0 transition-transform duration-300",
28
+ t === "sm" && "size-3.5 data-checked:translate-x-[calc(100%+2px)]",
29
+ t === void 0 && "size-4 data-checked:translate-x-[calc(100%+5px)] data-unchecked:translate-x-px",
30
+ t === "lg" && "size-5 data-checked:translate-x-[calc(100%+5px)] data-unchecked:translate-x-px"
31
+ )
32
+ }
33
+ )
34
+ }
35
+ );
36
+ }
37
+ export {
38
+ p as Switch
39
+ };
@@ -0,0 +1,108 @@
1
+ import { j as a } from "../_virtual/jsx-runtime.js";
2
+ import * as r from "react";
3
+ import { cn as n } from "../utils/classnames.js";
4
+ import { TabsRoot as i } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/root/TabsRoot.js";
5
+ import { TabsList as l } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/list/TabsList.js";
6
+ import { TabsTab as c } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/tab/TabsTab.js";
7
+ import { TabsPanel as p } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/panel/TabsPanel.js";
8
+ import { TabsIndicator as x } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/indicator/TabsIndicator.js";
9
+ const o = r.createContext(null), u = () => {
10
+ const t = r.useContext(o);
11
+ if (!t)
12
+ throw new Error("useTabs must be used within a Tabs");
13
+ return t;
14
+ };
15
+ function T({
16
+ variant: t = "underline",
17
+ className: e,
18
+ ...s
19
+ }) {
20
+ return /* @__PURE__ */ a.jsx(o.Provider, { value: { variant: t }, children: /* @__PURE__ */ a.jsx(
21
+ i,
22
+ {
23
+ "data-slot": "tabs",
24
+ className: n("gap-2 flex flex-col", e),
25
+ ...s
26
+ }
27
+ ) });
28
+ }
29
+ function w({
30
+ className: t,
31
+ children: e,
32
+ ...s
33
+ }) {
34
+ return /* @__PURE__ */ a.jsxs(
35
+ l,
36
+ {
37
+ "data-slot": "tabs-list",
38
+ className: n(
39
+ "text-muted-foreground h-9 gap-x-1 p-1 relative z-0 inline-flex w-fit items-center justify-center",
40
+ t
41
+ ),
42
+ ...s,
43
+ children: [
44
+ e,
45
+ /* @__PURE__ */ a.jsx(m, {}),
46
+ /* @__PURE__ */ a.jsx(
47
+ "div",
48
+ {
49
+ className: "absolute top-[calc(100%-1px)] left-1/2 z-2 h-[2px] w-[calc(100%-8px)] -translate-x-1/2 bg-[#EFEFEF]"
50
+ }
51
+ )
52
+ ]
53
+ }
54
+ );
55
+ }
56
+ function y({
57
+ className: t,
58
+ ...e
59
+ }) {
60
+ return /* @__PURE__ */ a.jsx(
61
+ c,
62
+ {
63
+ "data-slot": "tabs-trigger",
64
+ className: n(
65
+ "focus-visible:ring-ring/50 [&_svg:not([class*='size-'])] gap-1.5 px-2 py-1 text-sm font-medium z-[1] flex-1 items-center justify-center text-nowrap whitespace-nowrap text-ppx-neutral-18 not-data-selected:hover:text-ppx-neutral-12 focus-visible:ring-[3px] data-selected:text-ppx-primary-b-5 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
66
+ t
67
+ ),
68
+ ...e
69
+ }
70
+ );
71
+ }
72
+ function m({
73
+ className: t,
74
+ ...e
75
+ }) {
76
+ const { variant: s } = u();
77
+ return /* @__PURE__ */ a.jsx(
78
+ x,
79
+ {
80
+ "data-slot": "tab-indicator",
81
+ className: n(
82
+ "left-0 ease-in-out absolute w-[var(--active-tab-width)] translate-x-[var(--active-tab-left)] -translate-y-1/2 transition-all duration-300",
83
+ s === "underline" ? "top-full z-10 h-[2px] bg-ppx-primary-b-5" : "",
84
+ t
85
+ ),
86
+ ...e
87
+ }
88
+ );
89
+ }
90
+ function N({
91
+ className: t,
92
+ ...e
93
+ }) {
94
+ return /* @__PURE__ */ a.jsx(
95
+ p,
96
+ {
97
+ "data-slot": "tabs-content",
98
+ className: n("flex-1 outline-none", t),
99
+ ...e
100
+ }
101
+ );
102
+ }
103
+ export {
104
+ N as Content,
105
+ w as List,
106
+ T as Root,
107
+ y as Trigger
108
+ };
@@ -0,0 +1,41 @@
1
+ import { j as n } from "../_virtual/jsx-runtime.js";
2
+ import { cva as l } from "../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
3
+ import { cn as o } from "../utils/classnames.js";
4
+ const p = l(
5
+ "font-medium shadow-xs border-ppx-neutral-5 bg-ppx-neutral-1 text-ppx-sm text-ppx-foreground outline-transparent focus:-outline-offset-1 focus:outline-2 placeholder:text-ppx-sm placeholder:text-ppx-neutral-12 focus:not-aria-invalid:outline-ppx-primary-2 focus:not-aria-invalid:bg-ppx-background disabled:cursor-not-allowed disabled:border-ppx-neutral-3 disabled:bg-ppx-neutral-3 disabled:text-ppx-neutral-11 disabled:placeholder:text-ppx-neutral-11 aria-invalid:outline-ppx-red-4 aria-invalid:bg-ppx-red-1 aria-invalid:outline aria-invalid:-outline-offset-1 placeholder:font-sans-light p-input border",
6
+ {
7
+ variants: {
8
+ size: {
9
+ default: "min-h-16 rounded-input",
10
+ sm: "min-h-12 rounded-input-s"
11
+ },
12
+ widthVariant: {
13
+ enforced: "min-w-input",
14
+ full: "min-w-0 w-full"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ size: "default"
19
+ }
20
+ }
21
+ );
22
+ function x({
23
+ className: a,
24
+ size: t,
25
+ invalid: e,
26
+ widthVariant: i,
27
+ ...r
28
+ }) {
29
+ return /* @__PURE__ */ n.jsx(
30
+ "textarea",
31
+ {
32
+ "data-slot": "textarea",
33
+ className: o(p({ size: t, widthVariant: i }), a),
34
+ "aria-invalid": e,
35
+ ...r
36
+ }
37
+ );
38
+ }
39
+ export {
40
+ x as Textarea
41
+ };
@@ -1,14 +1,14 @@
1
1
  import { j as t } from "../_virtual/jsx-runtime.js";
2
2
  import { cn as p } from "../utils/classnames.js";
3
- import { TooltipProvider as i } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tooltip/provider/TooltipProvider.js";
4
- import { TooltipRoot as r } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tooltip/root/TooltipRoot.js";
3
+ import { TooltipRoot as i } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tooltip/root/TooltipRoot.js";
4
+ import { TooltipProvider as r } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tooltip/provider/TooltipProvider.js";
5
5
  import { TooltipTrigger as d } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tooltip/trigger/TooltipTrigger.js";
6
6
  import { TooltipPopup as c } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tooltip/popup/TooltipPopup.js";
7
7
  import { TooltipPortal as m } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tooltip/portal/TooltipPortal.js";
8
8
  import { TooltipPositioner as x } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tooltip/positioner/TooltipPositioner.js";
9
9
  import { TooltipArrow as f } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/tooltip/arrow/TooltipArrow.js";
10
10
  function g(o) {
11
- return /* @__PURE__ */ t.jsx(i, { "data-slot": "tooltip-provider", ...o });
11
+ return /* @__PURE__ */ t.jsx(r, { "data-slot": "tooltip-provider", ...o });
12
12
  }
13
13
  function u({
14
14
  ...o
@@ -28,9 +28,9 @@ function h({
28
28
  function N({
29
29
  ...o
30
30
  }) {
31
- return /* @__PURE__ */ t.jsx(g, { children: /* @__PURE__ */ t.jsx(r, { "data-slot": "tooltip", ...o }) });
31
+ return /* @__PURE__ */ t.jsx(g, { children: /* @__PURE__ */ t.jsx(i, { "data-slot": "tooltip", ...o }) });
32
32
  }
33
- const R = r, V = i;
33
+ const R = i, V = r;
34
34
  function $({
35
35
  ...o
36
36
  }) {
@@ -1,18 +1,18 @@
1
1
  import { useState as y, useRef as m } from "react";
2
2
  import { useInfiniteQuery as M } from "../node_modules/.pnpm/@tanstack_react-query@5.90.1_react@19.2.0/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js";
3
3
  import P from "./use-debounce.js";
4
- function b(s, {
4
+ function x(t, {
5
5
  isOpen: i,
6
- inputValue: t
6
+ inputValue: o
7
7
  }) {
8
8
  var d;
9
- const [o, c] = y(t), a = m(!1), e = M({
10
- queryKey: [...s.cacheKey, o],
11
- queryFn: async ({ pageParam: r, signal: n }) => {
12
- const { error: f, data: g } = await s.loader({
13
- search: o,
9
+ const [n, c] = y(o), a = m(!1), e = M({
10
+ queryKey: [...t.cacheKey, n],
11
+ queryFn: async ({ pageParam: r, signal: s }) => {
12
+ const { error: f, data: g } = await t.loader({
13
+ search: n,
14
14
  page: r,
15
- signal: n
15
+ signal: s
16
16
  });
17
17
  if (f)
18
18
  throw new Error(f);
@@ -21,15 +21,15 @@ function b(s, {
21
21
  enabled: i,
22
22
  initialPageParam: 1,
23
23
  staleTime: () => a.current ? 1 / 0 : 0,
24
- getNextPageParam: (r, n) => r.hasMore ? n.length + 1 : void 0,
24
+ getNextPageParam: (r, s) => r.hasMore ? s.length + 1 : void 0,
25
25
  retry: !1
26
26
  });
27
- e.isFetchedAfterMount && !a.current && (a.current = !0), t === "" && o !== "" && i && c(""), P(
27
+ e.isFetchedAfterMount && !a.current && (a.current = !0), o === "" && n !== "" && i && c(""), P(
28
28
  () => {
29
- c(t);
29
+ c(o);
30
30
  },
31
31
  300,
32
- [t]
32
+ [o]
33
33
  );
34
34
  const u = ((d = e.data) == null ? void 0 : d.pages.flatMap((r) => r.options)) ?? [], h = () => {
35
35
  e.fetchNextPage();
@@ -44,6 +44,10 @@ function b(s, {
44
44
  _query: e
45
45
  };
46
46
  }
47
+ function b(t) {
48
+ return t;
49
+ }
47
50
  export {
48
- b as useAsyncOptions
51
+ b as defineLoadOptions,
52
+ x as useAsyncOptions
49
53
  };