@px-ui/core 1.28.0 → 1.29.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 (60) hide show
  1. package/dist/components/avatar-group.d.ts +2 -1
  2. package/dist/components/avatar-group.d.ts.map +1 -1
  3. package/dist/components/avatar-group.js +17 -10
  4. package/dist/components/avatar.d.ts +3 -2
  5. package/dist/components/avatar.d.ts.map +1 -1
  6. package/dist/components/button.d.ts +5 -5
  7. package/dist/components/button.d.ts.map +1 -1
  8. package/dist/components/button.js +15 -18
  9. package/dist/components/checkbox.d.ts +3 -1
  10. package/dist/components/checkbox.d.ts.map +1 -1
  11. package/dist/components/checkbox.js +1 -4
  12. package/dist/components/combobox.d.ts +12 -4
  13. package/dist/components/combobox.d.ts.map +1 -1
  14. package/dist/components/combobox.js +135 -128
  15. package/dist/components/dialog.d.ts +12 -11
  16. package/dist/components/dialog.d.ts.map +1 -1
  17. package/dist/components/dialog.js +118 -88
  18. package/dist/components/input-group.d.ts +4 -2
  19. package/dist/components/input-group.d.ts.map +1 -1
  20. package/dist/components/input.d.ts +3 -2
  21. package/dist/components/input.d.ts.map +1 -1
  22. package/dist/components/label.js +1 -1
  23. package/dist/components/menu.d.ts +1 -4
  24. package/dist/components/menu.d.ts.map +1 -1
  25. package/dist/components/menu.js +87 -108
  26. package/dist/components/popover.d.ts +17 -15
  27. package/dist/components/popover.d.ts.map +1 -1
  28. package/dist/components/popover.js +84 -63
  29. package/dist/components/radio-group.d.ts +3 -1
  30. package/dist/components/radio-group.d.ts.map +1 -1
  31. package/dist/components/select.d.ts +10 -2
  32. package/dist/components/select.d.ts.map +1 -1
  33. package/dist/components/select.js +66 -61
  34. package/dist/components/switch.js +3 -3
  35. package/dist/components/textarea.d.ts +3 -2
  36. package/dist/components/textarea.d.ts.map +1 -1
  37. package/dist/components/textarea.js +2 -1
  38. package/dist/core.css +1 -1
  39. package/dist/index.d.ts +0 -1
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +23 -25
  42. 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/combobox/arrow/ComboboxArrow.js +39 -0
  43. 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/combobox/backdrop/ComboboxBackdrop.js +37 -0
  44. 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/combobox/collection/GroupCollectionContext.js +16 -3
  45. 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/combobox/group/ComboboxGroup.js +34 -0
  46. 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/combobox/group/ComboboxGroupContext.js +13 -0
  47. 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/combobox/group-label/ComboboxGroupLabel.js +27 -0
  48. 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/combobox/icon/ComboboxIcon.js +20 -0
  49. 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/combobox/index.parts.js +52 -0
  50. 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/combobox/root/ComboboxRootInternal.js +15 -15
  51. 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/combobox/root/utils/useFilter.js +24 -10
  52. 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/combobox/row/ComboboxRow.js +24 -0
  53. package/dist/tw-styles/dropdown.d.ts.map +1 -1
  54. package/dist/tw-styles/dropdown.js +6 -6
  55. package/package.json +3 -2
  56. package/dist/components/text-input.d.ts +0 -12
  57. package/dist/components/text-input.d.ts.map +0 -1
  58. package/dist/components/text-input.js +0 -60
  59. 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/field/control/FieldControl.js +0 -104
  60. 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/input/Input.js +0 -13
@@ -1,111 +1,112 @@
1
1
  import { j as e } from "../_virtual/jsx-runtime.js";
2
2
  import * as m from "react";
3
- import { cn as s } from "../utils/classnames.js";
3
+ import { cn as a } from "../utils/classnames.js";
4
4
  import S from "../hooks/use-infinite-scroll.js";
5
5
  import { Spinner as L } from "./spinner.js";
6
- import { DROPDOWN_POPUP_CN as z, DROPDOWN_POSITIONER_CN as k, triggerVariants as E, DROPDOWN_ITEM_CN as w } from "../tw-styles/dropdown.js";
6
+ import { DROPDOWN_POPUP_CN as k, DROPDOWN_POSITIONER_CN as z, triggerVariants as V, DROPDOWN_ITEM_CN as w } from "../tw-styles/dropdown.js";
7
7
  import _ from "../icons/clear-icon.js";
8
8
  import g from "../icons/chevron-down-icon.js";
9
- import D from "../icons/search-icon.js";
10
- import M from "../icons/check-icon.js";
11
- import A from "../icons/close-icon.js";
12
- import { Root as V, Input as W, Addon as P, Button as y } from "./input-group.js";
13
- import { cva as B } from "../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
9
+ import E from "../icons/search-icon.js";
10
+ import D from "../icons/check-icon.js";
11
+ import M from "../icons/close-icon.js";
12
+ import { Root as A, Input as W, Addon as B, Button as y } from "./input-group.js";
13
+ import { cva as P } from "../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
14
14
  import { useAsyncOptions as F } from "../hooks/use-async-options.js";
15
15
  import { ComboboxList as G } 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/combobox/list/ComboboxList.js";
16
- import { ComboboxRoot as H } 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/combobox/root/ComboboxRoot.js";
17
- import { ComboboxPortal as U } 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/combobox/portal/ComboboxPortal.js";
18
- import { ComboboxPositioner 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/combobox/positioner/ComboboxPositioner.js";
19
- import { ComboboxPopup as $ } 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/combobox/popup/ComboboxPopup.js";
20
- import { ComboboxEmpty as q } 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/combobox/empty/ComboboxEmpty.js";
16
+ import * as H 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/combobox/index.parts.js";
17
+ import { ComboboxRoot as U } 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/combobox/root/ComboboxRoot.js";
18
+ import { ComboboxPortal 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/combobox/portal/ComboboxPortal.js";
19
+ import { ComboboxPositioner as $ } 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/combobox/positioner/ComboboxPositioner.js";
20
+ import { ComboboxPopup as q } 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/combobox/popup/ComboboxPopup.js";
21
+ import { ComboboxEmpty as J } 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/combobox/empty/ComboboxEmpty.js";
21
22
  import { ComboboxStatus as h } 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/combobox/status/ComboboxStatus.js";
22
23
  import { ComboboxItem 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/combobox/item/ComboboxItem.js";
23
24
  import { ComboboxInput as j } 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/combobox/input/ComboboxInput.js";
24
- import { ComboboxClear as J } 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/combobox/clear/ComboboxClear.js";
25
+ import { ComboboxClear as K } 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/combobox/clear/ComboboxClear.js";
25
26
  import { ComboboxTrigger 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/combobox/trigger/ComboboxTrigger.js";
26
27
  import { ComboboxValue 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/combobox/value/ComboboxValue.js";
27
- import { ComboboxChips as K } 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/combobox/chips/ComboboxChips.js";
28
- import { ComboboxChip as Q } 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/combobox/chip/ComboboxChip.js";
29
- import { ComboboxChipRemove as Y } 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/combobox/chip-remove/ComboboxChipRemove.js";
30
- import { ComboboxItemIndicator as Z } 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/combobox/item-indicator/ComboboxItemIndicator.js";
31
- const b = "px-4 py-2 text-ppx-sm min-h-11 flex items-center justify-center text-ppx-muted-foreground", ke = G, R = m.createContext(
28
+ import { ComboboxChips as Q } 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/combobox/chips/ComboboxChips.js";
29
+ import { ComboboxChip as Y } 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/combobox/chip/ComboboxChip.js";
30
+ import { ComboboxChipRemove as Z } 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/combobox/chip-remove/ComboboxChipRemove.js";
31
+ import { ComboboxItemIndicator as ee } 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/combobox/item-indicator/ComboboxItemIndicator.js";
32
+ const b = "px-4 py-2 text-ppx-sm min-h-11 flex items-center justify-center text-ppx-muted-foreground", Ve = G, R = m.createContext(
32
33
  {}
33
34
  );
34
- function Ee({
35
+ function _e({
35
36
  children: r,
36
- ...t
37
+ ...n
37
38
  }) {
38
- const n = m.useRef(null), o = m.useRef(null), [l, i] = m.useState(!1), [a, d] = m.useState(""), c = {
39
+ const t = m.useRef(null), i = m.useRef(null), [o, s] = m.useState(!1), [l, d] = m.useState(""), c = {
39
40
  ...{
40
- open: l,
41
- onOpenChange: i,
42
- inputValue: a,
41
+ open: o,
42
+ onOpenChange: s,
43
+ inputValue: l,
43
44
  onInputValueChange: d
44
45
  },
45
- ...t
46
+ ...n
46
47
  }, x = {
47
- ...t.loadOptions ? F(t.loadOptions, {
48
+ ...n.loadOptions ? F(n.loadOptions, {
48
49
  isOpen: c.open,
49
50
  inputValue: c.inputValue
50
51
  }) : {},
51
52
  ...c
52
53
  }, u = {
53
54
  ...x,
54
- chipsTriggerRef: n,
55
- searchableTriggerRef: o
55
+ chipsTriggerRef: t,
56
+ searchableTriggerRef: i
56
57
  };
57
- return /* @__PURE__ */ e.jsx(R.Provider, { value: u, children: /* @__PURE__ */ e.jsx(H, { autoHighlight: !0, ...x, children: r }) });
58
+ return /* @__PURE__ */ e.jsx(R.Provider, { value: u, children: /* @__PURE__ */ e.jsx(U, { autoHighlight: !0, ...x, children: r }) });
58
59
  }
59
- function _e({
60
+ function Ee({
60
61
  empty: r = "No options",
61
- portalProps: t,
62
- positionerProps: n,
63
- popupProps: o,
64
- children: l,
65
- widthVariant: i = "trigger"
62
+ portalProps: n,
63
+ positionerProps: t,
64
+ popupProps: i,
65
+ children: o,
66
+ widthVariant: s = "trigger"
66
67
  }) {
67
68
  const {
68
- chipsTriggerRef: a,
69
+ chipsTriggerRef: l,
69
70
  searchableTriggerRef: d,
70
- isLoading: p,
71
+ isLoading: f,
71
72
  isError: c,
72
73
  isLoadingMore: v,
73
74
  hasMore: x,
74
75
  onLoadMore: u
75
- } = f(), [T] = S({
76
+ } = p(), [T] = S({
76
77
  isLoadingMore: !!v,
77
78
  hasMore: !!x,
78
79
  onLoadMore: () => u == null ? void 0 : u(),
79
80
  disabled: c
80
81
  });
81
- return /* @__PURE__ */ e.jsx(U, { ...t, children: /* @__PURE__ */ e.jsx(
82
- X,
82
+ return /* @__PURE__ */ e.jsx(X, { ...n, children: /* @__PURE__ */ e.jsx(
83
+ $,
83
84
  {
84
85
  sideOffset: 6,
85
86
  align: "start",
86
- ...n,
87
- className: s(k, n == null ? void 0 : n.className),
88
- anchor: (n == null ? void 0 : n.anchor) ?? a.current ?? d.current,
87
+ ...t,
88
+ className: a(z, t == null ? void 0 : t.className),
89
+ anchor: (t == null ? void 0 : t.anchor) ?? l.current ?? d.current,
89
90
  children: /* @__PURE__ */ e.jsxs(
90
- $,
91
+ q,
91
92
  {
92
- className: s(
93
- z,
93
+ className: a(
94
+ k,
94
95
  "scroll-pt-2 scroll-pb-2 overscroll-contain",
95
- i === "trigger" ? "w-[var(--anchor-width)]" : i === "fit" ? "w-fit" : i === "enforced" ? "w-[var(--min-width-input)]" : "",
96
- o == null ? void 0 : o.className
96
+ s === "trigger" ? "w-[var(--anchor-width)]" : s === "fit" ? "w-fit" : s === "enforced" ? "w-[var(--min-width-input)]" : "",
97
+ i == null ? void 0 : i.className
97
98
  ),
98
- ...o,
99
+ ...i,
99
100
  children: [
100
- l,
101
- !p && !c && /* @__PURE__ */ e.jsx(
102
- q,
101
+ o,
102
+ !f && !c && /* @__PURE__ */ e.jsx(
103
+ J,
103
104
  {
104
- className: s(b, "empty:hidden"),
105
+ className: a(b, "empty:hidden"),
105
106
  children: r
106
107
  }
107
108
  ),
108
- p && /* @__PURE__ */ e.jsx(h, { className: b, children: "Loading..." }),
109
+ f && /* @__PURE__ */ e.jsx(h, { className: b, children: "Loading..." }),
109
110
  c && /* @__PURE__ */ e.jsx(h, { className: b, children: "Error loading options" }),
110
111
  x && /* @__PURE__ */ e.jsx(
111
112
  h,
@@ -124,84 +125,84 @@ function _e({
124
125
  }
125
126
  function De({
126
127
  className: r,
127
- ...t
128
+ ...n
128
129
  }) {
129
- return /* @__PURE__ */ e.jsx(I, { className: s(w, r), ...t, children: t.children });
130
+ return /* @__PURE__ */ e.jsx(I, { className: a(w, r), ...n, children: n.children });
130
131
  }
131
132
  function Me({
132
133
  className: r,
133
- ...t
134
+ ...n
134
135
  }) {
135
136
  return /* @__PURE__ */ e.jsx(
136
137
  I,
137
138
  {
138
- ...t,
139
- render: (n, o) => /* @__PURE__ */ e.jsxs("div", { ...n, className: s(w, r), children: [
140
- /* @__PURE__ */ e.jsx(ee, { selected: o.selected }),
141
- t.children
139
+ ...n,
140
+ render: (t, i) => /* @__PURE__ */ e.jsxs("div", { ...t, className: a(w, r), children: [
141
+ /* @__PURE__ */ e.jsx(re, { selected: i.selected }),
142
+ n.children
142
143
  ] })
143
144
  }
144
145
  );
145
146
  }
146
- function ee(r) {
147
+ function re(r) {
147
148
  return /* @__PURE__ */ e.jsx(
148
149
  "div",
149
150
  {
150
- className: s(
151
+ className: a(
151
152
  "peer rounded-sm size-4 flex shrink-0 items-center justify-center border border-ppx-neutral-10 bg-ppx-background transition-colors duration-150 outline-none",
152
153
  r.selected && "text-white border-ppx-primary-5 bg-ppx-primary-5"
153
154
  ),
154
- children: /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx(M, {}) })
155
+ children: /* @__PURE__ */ e.jsx(ee, { children: /* @__PURE__ */ e.jsx(D, {}) })
155
156
  }
156
157
  );
157
158
  }
158
159
  function C(r) {
159
- return /* @__PURE__ */ e.jsx("div", { className: s("flex items-center justify-center", r.className), children: /* @__PURE__ */ e.jsxs("div", { className: "space-x-1 flex", children: [
160
+ return /* @__PURE__ */ e.jsx("div", { className: a("flex items-center justify-center", r.className), children: /* @__PURE__ */ e.jsxs("div", { className: "space-x-1 flex", children: [
160
161
  /* @__PURE__ */ e.jsx("div", { className: "w-1 h-1 animate-bounce rounded-full bg-ppx-foreground opacity-40 [animation-delay:-0.3s] [animation-name:bounce-color]" }),
161
162
  /* @__PURE__ */ e.jsx("div", { className: "w-1 h-1 animate-bounce rounded-full bg-ppx-foreground opacity-70 [animation-delay:-0.15s] [animation-name:bounce-color]" }),
162
163
  /* @__PURE__ */ e.jsx("div", { className: "w-1 h-1 animate-bounce rounded-full bg-ppx-foreground opacity-100 [animation-name:bounce-color]" })
163
164
  ] }) });
164
165
  }
165
166
  function Ae(r) {
166
- const { invalid: t, disabled: n, searchableTriggerRef: o } = f();
167
- return /* @__PURE__ */ e.jsxs(V, { ...r, disabled: n, ref: o, children: [
167
+ const { invalid: n, disabled: t, searchableTriggerRef: i } = p();
168
+ return /* @__PURE__ */ e.jsxs(A, { ...r, disabled: t, ref: i, children: [
168
169
  /* @__PURE__ */ e.jsx(
169
170
  j,
170
171
  {
171
- render: (l) => /* @__PURE__ */ e.jsx(
172
+ render: (o) => /* @__PURE__ */ e.jsx(
172
173
  W,
173
174
  {
174
- ...l,
175
- invalid: t,
175
+ ...o,
176
+ invalid: n,
176
177
  placeholder: r.placeholder
177
178
  }
178
179
  )
179
180
  }
180
181
  ),
181
182
  r.addons,
182
- /* @__PURE__ */ e.jsx(re, {})
183
+ /* @__PURE__ */ e.jsx(ne, {})
183
184
  ] });
184
185
  }
185
- function re() {
186
- const { isLoading: r } = f();
187
- return /* @__PURE__ */ e.jsxs(P, { align: "inline-end", className: "gap-0.5", children: [
186
+ function ne() {
187
+ const { isLoading: r } = p();
188
+ return /* @__PURE__ */ e.jsxs(B, { align: "inline-end", className: "gap-0.5", children: [
188
189
  r && /* @__PURE__ */ e.jsx(C, { className: "mr-2" }),
189
190
  !r && /* @__PURE__ */ e.jsx(
190
- J,
191
+ K,
191
192
  {
192
193
  "aria-label": "Clear selection",
193
- render: (t) => /* @__PURE__ */ e.jsx(y, { size: "icon-xs", ...t, children: /* @__PURE__ */ e.jsx(_, { className: "size-4" }) })
194
+ render: (n) => /* @__PURE__ */ e.jsx(y, { size: "icon-xs", ...n, children: /* @__PURE__ */ e.jsx(_, { className: "size-4" }) })
194
195
  }
195
196
  ),
196
197
  /* @__PURE__ */ e.jsx(
197
198
  N,
198
199
  {
199
- render: (t) => /* @__PURE__ */ e.jsx(
200
+ render: (n) => /* @__PURE__ */ e.jsx(
200
201
  y,
201
202
  {
202
203
  size: "icon-xs",
203
204
  "aria-label": "Open popup",
204
- ...t,
205
+ ...n,
205
206
  children: /* @__PURE__ */ e.jsx(g, {})
206
207
  }
207
208
  )
@@ -209,37 +210,40 @@ function re() {
209
210
  )
210
211
  ] });
211
212
  }
212
- function Ve({
213
+ function We({
213
214
  size: r,
214
- widthVariant: t,
215
- ...n
215
+ widthVariant: n,
216
+ children: t,
217
+ className: i,
218
+ ...o
216
219
  }) {
217
- const { isLoading: o, invalid: l } = f();
220
+ const { isLoading: s, invalid: l } = p();
218
221
  return /* @__PURE__ */ e.jsxs(
219
222
  N,
220
223
  {
221
224
  "aria-label": "Open popup",
222
- className: s(E({ size: r, widthVariant: t }), n.className),
223
225
  "aria-invalid": l ?? void 0,
226
+ className: a(V({ size: r, widthVariant: n }), i),
227
+ ...o,
224
228
  children: [
225
- /* @__PURE__ */ e.jsx(O, { children: (i) => {
226
- if (i == null && n.placeholder)
227
- return /* @__PURE__ */ e.jsx("span", { className: "truncate text-ppx-foreground", children: n.placeholder });
228
- if (n.children) {
229
- const a = typeof n.children == "function" ? n.children(i) : n.children;
230
- return typeof a == "string" ? /* @__PURE__ */ e.jsx("span", { className: "truncate", children: a }) : a;
231
- }
232
- return typeof i == "string" ? /* @__PURE__ */ e.jsx("span", { className: "truncate", children: i }) : i && typeof i == "object" && "label" in i ? /* @__PURE__ */ e.jsx("span", { className: "truncate", children: i.label }) : null;
233
- } }),
234
- /* @__PURE__ */ e.jsxs("div", { className: "gap-2 flex items-center", children: [
235
- o && /* @__PURE__ */ e.jsx(C, {}),
229
+ t,
230
+ /* @__PURE__ */ e.jsxs("div", { className: "gap-2 flex shrink-0 items-center", children: [
231
+ s && /* @__PURE__ */ e.jsx(C, {}),
236
232
  /* @__PURE__ */ e.jsx(g, {})
237
233
  ] })
238
234
  ]
239
235
  }
240
236
  );
241
237
  }
242
- const ne = B(
238
+ function Be({
239
+ children: r,
240
+ className: n,
241
+ placeholder: t,
242
+ ...i
243
+ }) {
244
+ return /* @__PURE__ */ e.jsx("span", { className: a("truncate text-ppx-sm", n), ...i, children: /* @__PURE__ */ e.jsx(O, { children: (o) => o == null && t ? t : r ? typeof r == "function" ? r(o) : r : o && typeof o == "object" && "label" in o ? o.label : o }) });
245
+ }
246
+ const te = P(
243
247
  "p-input text-ppx-sm bg-ppx-neutral-1 inline-flex items-center justify-between border border-ppx-neutral-5 focus-within:outline-2 focus-within:-outline-offset-1 focus-within:outline-ppx-primary-2 aria-invalid:border-ppx-red-4 focus-within:aria-invalid:outline-transparent has-data-disabled:border-ppx-neutral-3 has-data-disabled:bg-ppx-neutral-3 has-data-disabled:text-ppx-neutral-11 has-data-disabled:cursor-not-allowed",
244
248
  {
245
249
  variants: {
@@ -258,66 +262,66 @@ const ne = B(
258
262
  }
259
263
  }
260
264
  );
261
- function We({
265
+ function Pe({
262
266
  size: r,
263
- widthVariant: t,
264
- ...n
267
+ widthVariant: n,
268
+ ...t
265
269
  }) {
266
- const { chipsTriggerRef: o, isLoading: l, invalid: i } = f();
270
+ const { chipsTriggerRef: i, isLoading: o, invalid: s } = p();
267
271
  return /* @__PURE__ */ e.jsxs(
268
- K,
272
+ Q,
269
273
  {
270
- className: s(
271
- ne({ size: r, widthVariant: t }),
272
- n.className
274
+ className: a(
275
+ te({ size: r, widthVariant: n }),
276
+ t.className
273
277
  ),
274
- "aria-invalid": i ?? void 0,
275
- ref: o,
278
+ "aria-invalid": s ?? void 0,
279
+ ref: i,
276
280
  children: [
277
- /* @__PURE__ */ e.jsx("div", { className: "gap-1 flex flex-1 flex-wrap items-center", children: /* @__PURE__ */ e.jsx(O, { children: (a) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
278
- a.map((d) => typeof n.children == "function" ? n.children(d) : n.children),
281
+ /* @__PURE__ */ e.jsx("div", { className: "gap-1 flex flex-1 flex-wrap items-center", children: /* @__PURE__ */ e.jsx(O, { children: (l) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
282
+ l.map((d) => typeof t.children == "function" ? t.children(d) : t.children),
279
283
  /* @__PURE__ */ e.jsx(
280
284
  j,
281
285
  {
282
- placeholder: a.length > 0 ? "" : n.placeholder,
286
+ placeholder: l.length > 0 ? "" : t.placeholder,
283
287
  className: "min-w-12 flex-1 border-0 text-ppx-sm text-ppx-foreground outline-none"
284
288
  }
285
289
  )
286
290
  ] }) }) }),
287
291
  /* @__PURE__ */ e.jsxs("div", { className: "gap-2 flex h-stretch-available items-center text-ppx-muted-foreground", children: [
288
- l && /* @__PURE__ */ e.jsx(C, {}),
292
+ o && /* @__PURE__ */ e.jsx(C, {}),
289
293
  /* @__PURE__ */ e.jsx(N, { className: "h-full", children: /* @__PURE__ */ e.jsx(g, {}) })
290
294
  ] })
291
295
  ]
292
296
  }
293
297
  );
294
298
  }
295
- function Pe(r) {
299
+ function Fe(r) {
296
300
  return /* @__PURE__ */ e.jsxs(
297
- Q,
301
+ Y,
298
302
  {
299
303
  ...r,
300
- className: s(
304
+ className: a(
301
305
  "gap-1 pl-2 pr-1 text-sm flex cursor-default items-center rounded-full bg-ppx-neutral-3 py-[0.2rem] text-ppx-foreground outline-none",
302
306
  r.className
303
307
  ),
304
308
  children: [
305
309
  r.children,
306
310
  /* @__PURE__ */ e.jsx(
307
- Y,
311
+ Z,
308
312
  {
309
313
  className: "size-5 flex shrink-0 items-center justify-center rounded-full border border-transparent text-inherit hover:border-ppx-neutral-4 hover:bg-ppx-neutral-5 hover:text-ppx-background active:bg-ppx-neutral-6",
310
314
  "aria-label": "Remove",
311
- children: /* @__PURE__ */ e.jsx(A, { className: "size-3" })
315
+ children: /* @__PURE__ */ e.jsx(M, { className: "size-3" })
312
316
  }
313
317
  )
314
318
  ]
315
319
  }
316
320
  );
317
321
  }
318
- function Be({
322
+ function Ge({
319
323
  placeholder: r = "Search options",
320
- ...t
324
+ ...n
321
325
  }) {
322
326
  return /* @__PURE__ */ e.jsxs("div", { className: "top-0 gap-2 sticky z-10 flex items-center justify-between border-b-[0.75px] border-ppx-neutral-7 bg-ppx-background p-input", children: [
323
327
  /* @__PURE__ */ e.jsx(
@@ -326,27 +330,30 @@ function Be({
326
330
  placeholder: r,
327
331
  className: "text-sm flex-1 placeholder:text-ppx-neutral-7 focus:outline-none",
328
332
  "data-popup-search": !0,
329
- ...t
333
+ ...n
330
334
  }
331
335
  ),
332
- /* @__PURE__ */ e.jsx(D, { className: "size-3.5 text-ppx-neutral-10" })
336
+ /* @__PURE__ */ e.jsx(E, { className: "size-3.5 text-ppx-neutral-10" })
333
337
  ] });
334
338
  }
335
- function f() {
339
+ function p() {
336
340
  return m.useContext(R);
337
341
  }
342
+ const He = H;
338
343
  export {
339
- Pe as Chip,
340
- We as ChipsTrigger,
341
- _e as Content,
344
+ He as BaseCombobox,
345
+ Fe as Chip,
346
+ Pe as ChipsTrigger,
347
+ Ee as Content,
342
348
  De as Item,
343
- ke as List,
349
+ Ve as List,
344
350
  C as LoadingIndicator,
345
351
  Me as MultiItem,
346
- Ee as Root,
347
- Be as Search,
352
+ _e as Root,
353
+ Ge as Search,
348
354
  Ae as SearchableTrigger,
349
- re as SearchableTriggerDropdownAddon,
350
- Ve as Trigger,
351
- f as useComboboxContext
355
+ ne as SearchableTriggerDropdownAddon,
356
+ We as Trigger,
357
+ Be as Value,
358
+ p as useComboboxContext
352
359
  };
@@ -1,14 +1,15 @@
1
1
  import { Dialog as BaseDialog } from '@base-ui-components/react';
2
2
  import * as React from "react";
3
- declare function Root({ ...props }: React.ComponentProps<typeof BaseDialog.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function Portal({ ...props }: React.ComponentProps<typeof BaseDialog.Portal>): import("react/jsx-runtime").JSX.Element;
5
- declare function Trigger({ ...props }: React.ComponentProps<typeof BaseDialog.Trigger>): import("react/jsx-runtime").JSX.Element;
6
- declare function Close({ ...props }: React.ComponentProps<typeof BaseDialog.Close>): import("react/jsx-runtime").JSX.Element;
7
- declare function Overlay({ className, ...props }: React.ComponentProps<typeof BaseDialog.Backdrop>): import("react/jsx-runtime").JSX.Element;
8
- declare function Content({ className, children, ...props }: React.ComponentProps<typeof BaseDialog.Popup>): import("react/jsx-runtime").JSX.Element;
9
- declare function Header({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
- declare function Footer({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
- declare function Title({ className, ...props }: React.ComponentProps<typeof BaseDialog.Title>): import("react/jsx-runtime").JSX.Element;
12
- declare function Description({ className, ...props }: React.ComponentProps<typeof BaseDialog.Description>): import("react/jsx-runtime").JSX.Element;
13
- export { Root, Portal, Overlay, Close, Trigger, Content, Header, Footer, Title, Description, };
3
+ export declare function Root({ ...props }: React.ComponentProps<typeof BaseDialog.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export declare function Portal({ ...props }: React.ComponentProps<typeof BaseDialog.Portal>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Trigger({ ...props }: React.ComponentProps<typeof BaseDialog.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ export declare function Close({ ...props }: React.ComponentProps<typeof BaseDialog.Close>): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Overlay({ className, ...props }: React.ComponentProps<typeof BaseDialog.Backdrop>): import("react/jsx-runtime").JSX.Element;
8
+ export declare function Content({ className, children, ...props }: React.ComponentProps<typeof BaseDialog.Popup>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function Header({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ export declare function HeaderContent({ className, children, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
+ export declare function HeaderIcon({ className, children, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
12
+ export declare function Footer({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
+ export declare function Title({ className, ...props }: React.ComponentProps<typeof BaseDialog.Title>): import("react/jsx-runtime").JSX.Element;
14
+ export declare function Description({ className, ...props }: React.ComponentProps<typeof BaseDialog.Description>): import("react/jsx-runtime").JSX.Element;
14
15
  //# sourceMappingURL=dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAIjE,iBAAS,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,2CAEvE;AAED,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,C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