@px-ui/core 1.27.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 -19
  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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,gBAAgB,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,kBAAkB,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAGlE,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAGlD,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,gBAAgB,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,kBAAkB,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAGlE,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAGlD,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -14,46 +14,44 @@ import * as u from "./components/block-radio-group.js";
14
14
  import { Button as l, buttonVariants as d } from "./components/button.js";
15
15
  import { Checkbox as k } from "./components/checkbox.js";
16
16
  import { Label as v } from "./components/label.js";
17
- import { TextInput as I } from "./components/text-input.js";
18
- import { Input as A } from "./components/input.js";
19
- import { Textarea as S } from "./components/textarea.js";
20
- import { Avatar as B, AvatarImpl as O } from "./components/avatar.js";
21
- import { AvatarGroup as P } from "./components/avatar-group.js";
22
- import { Spinner as y } from "./components/spinner.js";
23
- import { Switch as M } from "./components/switch.js";
24
- import { RadioGroup as j, RadioGroupItem as q } from "./components/radio-group.js";
25
- import { defineLoadOptions as E, useAsyncOptions as F } from "./hooks/use-async-options.js";
26
- import { useIntersectionObserver as J } from "./hooks/use-intersection-observer.js";
27
- import { cn as N } from "./utils/classnames.js";
17
+ import { Input as I } from "./components/input.js";
18
+ import { Textarea as A } from "./components/textarea.js";
19
+ import { Avatar as S, AvatarImpl as B } from "./components/avatar.js";
20
+ import { AvatarGroup as T } from "./components/avatar-group.js";
21
+ import { Spinner as P } from "./components/spinner.js";
22
+ import { Switch as y } from "./components/switch.js";
23
+ import { RadioGroup as M, RadioGroupItem as V } from "./components/radio-group.js";
24
+ import { defineLoadOptions as q, useAsyncOptions as z } from "./hooks/use-async-options.js";
25
+ import { useIntersectionObserver as F } from "./hooks/use-intersection-observer.js";
26
+ import { cn as J } from "./utils/classnames.js";
28
27
  export {
29
- B as Avatar,
30
- P as AvatarGroup,
31
- O as AvatarImpl,
28
+ S as Avatar,
29
+ T as AvatarGroup,
30
+ B as AvatarImpl,
32
31
  n as BlockCheckboxGroup,
33
32
  u as BlockRadioGroup,
34
33
  l as Button,
35
34
  k as Checkbox,
36
35
  p as Combobox,
37
36
  r as Dialog,
38
- A as Input,
37
+ I as Input,
39
38
  s as InputGroup,
40
39
  v as Label,
41
40
  m as Menu,
42
41
  t as Popover,
43
42
  a as Progress,
44
- j as RadioGroup,
45
- q as RadioGroupItem,
43
+ M as RadioGroup,
44
+ V as RadioGroupItem,
46
45
  x as SegmentedControl,
47
46
  e as Select,
48
- y as Spinner,
49
- M as Switch,
47
+ P as Spinner,
48
+ y as Switch,
50
49
  i as Tabs,
51
- I as TextInput,
52
- S as Textarea,
50
+ A as Textarea,
53
51
  f as Tooltip,
54
52
  d as buttonVariants,
55
- N as cn,
56
- E as defineLoadOptions,
57
- F as useAsyncOptions,
58
- J as useIntersectionObserver
53
+ J as cn,
54
+ q as defineLoadOptions,
55
+ z as useAsyncOptions,
56
+ F as useIntersectionObserver
59
57
  };
@@ -0,0 +1,39 @@
1
+ import * as n from "react";
2
+ import { useComboboxPositionerContext as u } from "../positioner/ComboboxPositionerContext.js";
3
+ import { useComboboxRootContext as b } from "../root/ComboboxRootContext.js";
4
+ import { selectors as d } from "../store.js";
5
+ import { useRenderElement as l } from "../../utils/useRenderElement.js";
6
+ import { popupStateMapping as x } from "../../utils/popupStateMapping.js";
7
+ import { useStore as w } from "../../../../../../../@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/store/useStore.js";
8
+ const C = /* @__PURE__ */ n.forwardRef(function(o, m) {
9
+ const {
10
+ className: A,
11
+ render: N,
12
+ ...i
13
+ } = o, p = b(), {
14
+ arrowRef: a,
15
+ side: e,
16
+ align: r,
17
+ arrowUncentered: t,
18
+ arrowStyles: c
19
+ } = u(), s = w(p, d.open), f = n.useMemo(() => ({
20
+ open: s,
21
+ side: e,
22
+ align: r,
23
+ uncentered: t
24
+ }), [s, e, r, t]);
25
+ return l("div", o, {
26
+ ref: [a, m],
27
+ stateAttributesMapping: x,
28
+ state: f,
29
+ props: {
30
+ style: c,
31
+ "aria-hidden": !0,
32
+ ...i
33
+ }
34
+ });
35
+ });
36
+ process.env.NODE_ENV !== "production" && (C.displayName = "ComboboxArrow");
37
+ export {
38
+ C as ComboboxArrow
39
+ };
@@ -0,0 +1,37 @@
1
+ import * as p from "react";
2
+ import { useComboboxRootContext as u } from "../root/ComboboxRootContext.js";
3
+ import { popupStateMapping as d } from "../../utils/popupStateMapping.js";
4
+ import { transitionStatusMapping as f } from "../../utils/stateAttributesMapping.js";
5
+ import { useRenderElement as b } from "../../utils/useRenderElement.js";
6
+ import { selectors as t } from "../store.js";
7
+ import { useStore as e } from "../../../../../../../@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/store/useStore.js";
8
+ const l = {
9
+ ...d,
10
+ ...f
11
+ }, S = /* @__PURE__ */ p.forwardRef(function(r, i) {
12
+ const {
13
+ className: C,
14
+ render: k,
15
+ ...m
16
+ } = r, o = u(), n = e(o, t.open), a = e(o, t.mounted), s = e(o, t.transitionStatus), c = p.useMemo(() => ({
17
+ open: n,
18
+ transitionStatus: s
19
+ }), [n, s]);
20
+ return b("div", r, {
21
+ state: c,
22
+ ref: i,
23
+ stateAttributesMapping: l,
24
+ props: [{
25
+ role: "presentation",
26
+ hidden: !a,
27
+ style: {
28
+ userSelect: "none",
29
+ WebkitUserSelect: "none"
30
+ }
31
+ }, m]
32
+ });
33
+ });
34
+ process.env.NODE_ENV !== "production" && (S.displayName = "ComboboxBackdrop");
35
+ export {
36
+ S as ComboboxBackdrop
37
+ };
@@ -1,10 +1,23 @@
1
1
  import * as o from "react";
2
- import "../../../../../../../../../_virtual/jsx-runtime.js";
2
+ import { j as c } from "../../../../../../../../../_virtual/jsx-runtime.js";
3
3
  const t = /* @__PURE__ */ o.createContext(null);
4
4
  process.env.NODE_ENV !== "production" && (t.displayName = "GroupCollectionContext");
5
- function n() {
5
+ function l() {
6
6
  return o.useContext(t);
7
7
  }
8
+ function s(n) {
9
+ const {
10
+ children: r,
11
+ items: e
12
+ } = n, i = o.useMemo(() => ({
13
+ items: e
14
+ }), [e]);
15
+ return /* @__PURE__ */ c.jsx(t.Provider, {
16
+ value: i,
17
+ children: r
18
+ });
19
+ }
8
20
  export {
9
- n as useGroupCollectionContext
21
+ s as GroupCollectionProvider,
22
+ l as useGroupCollectionContext
10
23
  };
@@ -0,0 +1,34 @@
1
+ import * as r from "react";
2
+ import { useRenderElement as u } from "../../utils/useRenderElement.js";
3
+ import { ComboboxGroupContext as c } from "./ComboboxGroupContext.js";
4
+ import { GroupCollectionProvider as d } from "../collection/GroupCollectionContext.js";
5
+ import { j as n } from "../../../../../../../../../_virtual/jsx-runtime.js";
6
+ const b = /* @__PURE__ */ r.forwardRef(function(t, i) {
7
+ const {
8
+ render: x,
9
+ className: C,
10
+ items: o,
11
+ ...l
12
+ } = t, [e, s] = r.useState(), p = r.useMemo(() => ({
13
+ labelId: e,
14
+ setLabelId: s,
15
+ items: o
16
+ }), [e, s, o]), a = u("div", t, {
17
+ ref: i,
18
+ props: [{
19
+ role: "group",
20
+ "aria-labelledby": e
21
+ }, l]
22
+ }), m = /* @__PURE__ */ n.jsx(c.Provider, {
23
+ value: p,
24
+ children: a
25
+ });
26
+ return o ? /* @__PURE__ */ n.jsx(d, {
27
+ items: o,
28
+ children: m
29
+ }) : m;
30
+ });
31
+ process.env.NODE_ENV !== "production" && (b.displayName = "ComboboxGroup");
32
+ export {
33
+ b as ComboboxGroup
34
+ };
@@ -0,0 +1,13 @@
1
+ import * as t from "react";
2
+ const e = /* @__PURE__ */ t.createContext(void 0);
3
+ process.env.NODE_ENV !== "production" && (e.displayName = "ComboboxGroupContext");
4
+ function n() {
5
+ const o = t.useContext(e);
6
+ if (o === void 0)
7
+ throw new Error("Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.");
8
+ return o;
9
+ }
10
+ export {
11
+ e as ComboboxGroupContext,
12
+ n as useComboboxGroupContext
13
+ };
@@ -0,0 +1,27 @@
1
+ import * as n from "react";
2
+ import { useIsoLayoutEffect as i } from "../../../../../../../@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/useIsoLayoutEffect.js";
3
+ import { useBaseUiId as p } from "../../utils/useBaseUiId.js";
4
+ import { useComboboxGroupContext as u } from "../group/ComboboxGroupContext.js";
5
+ import { useRenderElement as a } from "../../utils/useRenderElement.js";
6
+ const d = /* @__PURE__ */ n.forwardRef(function(r, t) {
7
+ const {
8
+ render: b,
9
+ className: c,
10
+ id: m,
11
+ ...s
12
+ } = r, {
13
+ setLabelId: o
14
+ } = u(), e = p(m);
15
+ return i(() => (o(e), () => {
16
+ o(void 0);
17
+ }), [e, o]), a("div", r, {
18
+ ref: t,
19
+ props: [{
20
+ id: e
21
+ }, s]
22
+ });
23
+ });
24
+ process.env.NODE_ENV !== "production" && (d.displayName = "ComboboxGroupLabel");
25
+ export {
26
+ d as ComboboxGroupLabel
27
+ };
@@ -0,0 +1,20 @@
1
+ import * as n from "react";
2
+ import { useRenderElement as t } from "../../utils/useRenderElement.js";
3
+ const m = /* @__PURE__ */ n.forwardRef(function(e, o) {
4
+ const {
5
+ className: c,
6
+ render: a,
7
+ ...r
8
+ } = e;
9
+ return t("span", e, {
10
+ ref: o,
11
+ props: [{
12
+ "aria-hidden": !0,
13
+ children: "▼"
14
+ }, r]
15
+ });
16
+ });
17
+ process.env.NODE_ENV !== "production" && (m.displayName = "ComboboxIcon");
18
+ export {
19
+ m as ComboboxIcon
20
+ };
@@ -0,0 +1,52 @@
1
+ import { ComboboxRoot as m } from "./root/ComboboxRoot.js";
2
+ import { ComboboxValue as b } from "./value/ComboboxValue.js";
3
+ import { ComboboxInput as x } from "./input/ComboboxInput.js";
4
+ import { ComboboxTrigger as a } from "./trigger/ComboboxTrigger.js";
5
+ import { ComboboxList as C } from "./list/ComboboxList.js";
6
+ import { ComboboxStatus as i } from "./status/ComboboxStatus.js";
7
+ import { ComboboxPortal as u } from "./portal/ComboboxPortal.js";
8
+ import { ComboboxBackdrop as I } from "./backdrop/ComboboxBackdrop.js";
9
+ import { ComboboxPositioner as h } from "./positioner/ComboboxPositioner.js";
10
+ import { ComboboxPopup as R } from "./popup/ComboboxPopup.js";
11
+ import { ComboboxArrow as g } from "./arrow/ComboboxArrow.js";
12
+ import { ComboboxIcon as G } from "./icon/ComboboxIcon.js";
13
+ import { ComboboxGroup as S } from "./group/ComboboxGroup.js";
14
+ import { ComboboxGroupLabel as v } from "./group-label/ComboboxGroupLabel.js";
15
+ import { ComboboxItem as A } from "./item/ComboboxItem.js";
16
+ import { ComboboxItemIndicator as E } from "./item-indicator/ComboboxItemIndicator.js";
17
+ import { ComboboxChips as T } from "./chips/ComboboxChips.js";
18
+ import { ComboboxChip as j } from "./chip/ComboboxChip.js";
19
+ import { ComboboxChipRemove as z } from "./chip-remove/ComboboxChipRemove.js";
20
+ import { ComboboxRow as H } from "./row/ComboboxRow.js";
21
+ import { ComboboxCollection as K } from "./collection/ComboboxCollection.js";
22
+ import { ComboboxEmpty as N } from "./empty/ComboboxEmpty.js";
23
+ import { ComboboxClear as Q } from "./clear/ComboboxClear.js";
24
+ import { useComboboxFilter as W } from "./root/utils/useFilter.js";
25
+ import { Separator as Y } from "../separator/Separator.js";
26
+ export {
27
+ g as Arrow,
28
+ I as Backdrop,
29
+ j as Chip,
30
+ z as ChipRemove,
31
+ T as Chips,
32
+ Q as Clear,
33
+ K as Collection,
34
+ N as Empty,
35
+ S as Group,
36
+ v as GroupLabel,
37
+ G as Icon,
38
+ x as Input,
39
+ A as Item,
40
+ E as ItemIndicator,
41
+ C as List,
42
+ R as Popup,
43
+ u as Portal,
44
+ h as Positioner,
45
+ m as Root,
46
+ H as Row,
47
+ Y as Separator,
48
+ i as Status,
49
+ a as Trigger,
50
+ b as Value,
51
+ W as useFilter
52
+ };
@@ -21,18 +21,18 @@ import { useCoreFilter as sn } from "./utils/useFilter.js";
21
21
  import { useTransitionStatus as un } from "../../utils/useTransitionStatus.js";
22
22
  import { useOpenInteractionType as an } from "../../utils/useOpenInteractionType.js";
23
23
  import { useValueChanged as Qe } from "./utils/useValueChanged.js";
24
- import { stringifyAsLabel as oe, isGroupedItems as cn, stringifyAsValue as We } from "../../utils/resolveValueLabel.js";
24
+ import { isGroupedItems as cn, stringifyAsLabel as oe, stringifyAsValue as We } from "../../utils/resolveValueLabel.js";
25
25
  import { defaultItemEquality as fn, itemIncludes as Ye, findItemIndex as pt } from "../../utils/itemEquality.js";
26
26
  import { j as k } from "../../../../../../../../../_virtual/jsx-runtime.js";
27
27
  import { EMPTY_ARRAY as Ce, NOOP as w } from "../../../../../../../@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/empty.js";
28
- import { Store as dn } from "../../../../../../../@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/store/Store.js";
29
28
  import { useStore as j } from "../../../../../../../@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/store/useStore.js";
30
- import { useFloatingRootContext as pn } from "../../floating-ui-react/hooks/useFloatingRootContext.js";
31
- import { useClick as mn } from "../../floating-ui-react/hooks/useClick.js";
32
- import { useDismiss as gn } from "../../floating-ui-react/hooks/useDismiss.js";
33
- import { useListNavigation as In } from "../../floating-ui-react/hooks/useListNavigation.js";
34
- import { useTypeahead as hn } from "../../floating-ui-react/hooks/useTypeahead.js";
35
- import { useInteractions as Cn } from "../../floating-ui-react/hooks/useInteractions.js";
29
+ import { useFloatingRootContext as dn } from "../../floating-ui-react/hooks/useFloatingRootContext.js";
30
+ import { useClick as pn } from "../../floating-ui-react/hooks/useClick.js";
31
+ import { useDismiss as mn } from "../../floating-ui-react/hooks/useDismiss.js";
32
+ import { useListNavigation as gn } from "../../floating-ui-react/hooks/useListNavigation.js";
33
+ import { useTypeahead as In } from "../../floating-ui-react/hooks/useTypeahead.js";
34
+ import { useInteractions as hn } from "../../floating-ui-react/hooks/useInteractions.js";
35
+ import { Store as Cn } from "../../../../../../../@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/store/Store.js";
36
36
  import { getTarget as mt, contains as Be } from "../../floating-ui-react/utils/element.js";
37
37
  function nr(C) {
38
38
  const {
@@ -136,7 +136,7 @@ function nr(C) {
136
136
  de(t, c, f) && e.push(t);
137
137
  }
138
138
  return e;
139
- }, [u, q, c, de, P, f, v]), b = o.useMemo(() => P ? K.flatMap((t) => t.items) : K, [K, P]), Ze = u !== void 0, me = o.useRef([]), Ae = o.useRef([]), Fe = o.useRef(null), m = o.useRef(null), $e = o.useRef(!0), et = o.useRef(!1), tt = o.useRef(null), nt = o.useRef(null), Oe = o.useRef(null), G = o.useRef([]), rt = o.useRef([]), l = ft(() => new dn({
139
+ }, [u, q, c, de, P, f, v]), b = o.useMemo(() => P ? K.flatMap((t) => t.items) : K, [K, P]), Ze = u !== void 0, me = o.useRef([]), Ae = o.useRef([]), Fe = o.useRef(null), m = o.useRef(null), $e = o.useRef(!0), et = o.useRef(!1), tt = o.useRef(null), nt = o.useRef(null), Oe = o.useRef(null), G = o.useRef([]), rt = o.useRef([]), l = ft(() => new Cn({
140
140
  id: A,
141
141
  selectedValue: r,
142
142
  inputValue: d,
@@ -356,7 +356,7 @@ function nr(C) {
356
356
  activeIndex: null
357
357
  });
358
358
  }, [Ze, E, b.length, g]);
359
- const ne = pn({
359
+ const ne = dn({
360
360
  open: $ ? !0 : a,
361
361
  onOpenChange: te,
362
362
  elements: {
@@ -379,14 +379,14 @@ function nr(C) {
379
379
  role: "presentation"
380
380
  }
381
381
  };
382
- }, [Z, a, He, qe, Q == null ? void 0 : Q.id, Ke]), jt = mn(ne, {
382
+ }, [Z, a, He, qe, Q == null ? void 0 : Q.id, Ke]), jt = pn(ne, {
383
383
  enabled: !S && !F && se,
384
384
  event: "mousedown-only",
385
385
  toggle: !1,
386
386
  // Apply a small delay for touch to let iOS viewport centering settle.
387
387
  // This avoids top-bottom flip flickers if the preferred position is "top" when first tapping.
388
388
  touchOpenDelay: Ie ? 0 : 50
389
- }), qt = gn(ne, {
389
+ }), qt = mn(ne, {
390
390
  enabled: !S && !F,
391
391
  outsidePressEvent: {
392
392
  mouse: "sloppy",
@@ -401,7 +401,7 @@ function nr(C) {
401
401
  const t = mt(e);
402
402
  return !Be(W, t) && !Be(nt.current, t) && !Be(tt.current, t);
403
403
  }
404
- }), Ht = In(ne, {
404
+ }), Ht = gn(ne, {
405
405
  enabled: !S && !F,
406
406
  id: A,
407
407
  listRef: me,
@@ -428,7 +428,7 @@ function nr(C) {
428
428
  }
429
429
  }), {
430
430
  reference: Le
431
- } = hn(ne, {
431
+ } = In(ne, {
432
432
  enabled: !a && !S && !F && i === "single",
433
433
  listRef: Ae,
434
434
  activeIndex: ge,
@@ -441,7 +441,7 @@ function nr(C) {
441
441
  getReferenceProps: Ne,
442
442
  getFloatingProps: Ue,
443
443
  getItemProps: ze
444
- } = Cn([wt, jt, qt, Ht]);
444
+ } = hn([wt, jt, qt, Ht]);
445
445
  Wt(() => {
446
446
  l.apply({
447
447
  popupProps: Ue(),
@@ -1,15 +1,16 @@
1
- import "react";
2
- const a = /* @__PURE__ */ new Map();
3
- function g(i = {}) {
1
+ import * as a from "react";
2
+ import { createCollatorItemFilter as f, createSingleSelectionCollatorFilter as g } from "./index.js";
3
+ const u = /* @__PURE__ */ new Map();
4
+ function h(i = {}) {
4
5
  const o = {
5
6
  usage: "search",
6
7
  sensitivity: "base",
7
8
  ignorePunctuation: !0,
8
9
  ...i
9
- }, s = JSON.stringify(o), l = a.get(s);
10
- if (l)
11
- return l;
12
- const r = new Intl.Collator(i.locale, o), c = {
10
+ }, l = JSON.stringify(o), c = u.get(l);
11
+ if (c)
12
+ return c;
13
+ const r = new Intl.Collator(i.locale, o), s = {
13
14
  contains(e, t) {
14
15
  if (!t)
15
16
  return !0;
@@ -28,9 +29,22 @@ function g(i = {}) {
28
29
  return e.length >= n && r.compare(e.slice(e.length - n), t) === 0;
29
30
  }
30
31
  };
31
- return a.set(s, c), c;
32
+ return u.set(l, s), s;
33
+ }
34
+ const m = h;
35
+ function C(i = {}) {
36
+ const {
37
+ multiple: o = !1,
38
+ value: l,
39
+ ...c
40
+ } = i, r = h(c), s = a.useCallback((e, t, n) => o ? f(r, n)(e, t) : g(r, n, l)(e, t), [r, l, o]);
41
+ return a.useMemo(() => ({
42
+ contains: s,
43
+ startsWith: r.startsWith,
44
+ endsWith: r.endsWith
45
+ }), [s, r]);
32
46
  }
33
- const u = g;
34
47
  export {
35
- u as useCoreFilter
48
+ C as useComboboxFilter,
49
+ m as useCoreFilter
36
50
  };
@@ -0,0 +1,24 @@
1
+ import * as m from "react";
2
+ import { useRenderElement as s } from "../../utils/useRenderElement.js";
3
+ import { ComboboxRowContext as n } from "./ComboboxRowContext.js";
4
+ import { j as i } from "../../../../../../../../../_virtual/jsx-runtime.js";
5
+ const p = /* @__PURE__ */ m.forwardRef(function(o, e) {
6
+ const {
7
+ render: f,
8
+ className: x,
9
+ ...r
10
+ } = o, t = s("div", o, {
11
+ ref: e,
12
+ props: [{
13
+ role: "row"
14
+ }, r]
15
+ });
16
+ return /* @__PURE__ */ i.jsx(n.Provider, {
17
+ value: !0,
18
+ children: t
19
+ });
20
+ });
21
+ process.env.NODE_ENV !== "production" && (p.displayName = "ComboboxRow");
22
+ export {
23
+ p as ComboboxRow
24
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/tw-styles/dropdown.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,wQAC0O,CAAC;AAExQ,eAAO,MAAM,iBAAiB,6mBAC8kB,CAAC;AAE7mB,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAI1D,eAAO,MAAM,eAAe;;;mFAmB3B,CAAC"}
1
+ {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/tw-styles/dropdown.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,wQAC0O,CAAC;AAExQ,eAAO,MAAM,iBAAiB,6mBAC8kB,CAAC;AAE7mB,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D,eAAO,MAAM,eAAe;;;mFAmB3B,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { cva as t } from "../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
2
- const e = "gap-2 py-2 pr-8 pl-4 text-ppx-sm flex cursor-default items-center outline-none select-none not-data-disabled:data-highlighted:bg-ppx-primary-b-1 data-selected:bg-ppx-primary-1! data-checked:bg-ppx-primary-1! text-ppx-foreground my-0.5 data-disabled:opacity-50", i = "rounded-ppx-s shadow-xs max-h-[var(--available-height)] origin-[var(--transform-origin)] overflow-y-auto bg-ppx-background bg-clip-padding shadow-ppx-neutral-5 outline-1 outline-ppx-neutral-5 transition-[transform,scale,opacity] data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[side=none]:data-[ending-style]:transition-none data-[starting-style]:scale-90 data-[starting-style]:opacity-0 data-[side=none]:data-[starting-style]:scale-100 data-[side=none]:data-[starting-style]:opacity-100 data-[side=none]:data-[starting-style]:transition-none group max-w-[var(--available-width)] text-ppx-foreground", n = "z-10 outline-none", r = t(
3
- "gap-2 text-ppx-sm bg-ppx-neutral-1 inline-flex items-center justify-between border border-ppx-neutral-5 aria-invalid:border-ppx-red-4 text-ppx-foreground outline-transparent p-input focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ppx-primary-2 focus-visible:aria-invalid:outline-transparent data-disabled:cursor-not-allowed data-disabled:border-ppx-neutral-3 data-disabled:bg-ppx-neutral-3 data-disabled:text-ppx-neutral-11",
2
+ const e = "gap-2 py-2 pr-8 pl-4 text-ppx-sm flex cursor-default items-center outline-none select-none not-data-disabled:data-highlighted:bg-ppx-primary-b-1 data-selected:bg-ppx-primary-1! data-checked:bg-ppx-primary-1! text-ppx-foreground my-0.5 data-disabled:opacity-50", n = "rounded-ppx-s shadow-xs max-h-[var(--available-height)] origin-[var(--transform-origin)] overflow-y-auto bg-ppx-background bg-clip-padding shadow-ppx-neutral-5 outline-1 outline-ppx-neutral-5 transition-[transform,scale,opacity] data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[side=none]:data-[ending-style]:transition-none data-[starting-style]:scale-90 data-[starting-style]:opacity-0 data-[side=none]:data-[starting-style]:scale-100 data-[side=none]:data-[starting-style]:opacity-100 data-[side=none]:data-[starting-style]:transition-none group max-w-[var(--available-width)] text-ppx-foreground", i = "z-10 outline-none", r = t(
3
+ "gap-2 text-ppx-sm bg-ppx-neutral-1 inline-flex items-center justify-between border border-ppx-neutral-5 aria-invalid:border-ppx-red-4 text-ppx-foreground outline-transparent p-input focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ppx-primary-2 focus-visible:aria-invalid:outline-transparent data-disabled:cursor-not-allowed data-disabled:border-ppx-neutral-3 data-disabled:bg-ppx-neutral-3 data-disabled:text-ppx-neutral-11 data-popup-open:brightness-97",
4
4
  {
5
5
  variants: {
6
6
  size: {
7
- default: "rounded-input h-input",
8
- sm: "rounded-input-s h-input-s"
7
+ default: "rounded-input min-h-input h-input",
8
+ sm: "rounded-input-s min-h-input-s h-input-s"
9
9
  },
10
10
  widthVariant: {
11
11
  enforced: "min-w-input w-[var(--min-width-input)]",
@@ -21,7 +21,7 @@ const e = "gap-2 py-2 pr-8 pl-4 text-ppx-sm flex cursor-default items-center out
21
21
  );
22
22
  export {
23
23
  e as DROPDOWN_ITEM_CN,
24
- i as DROPDOWN_POPUP_CN,
25
- n as DROPDOWN_POSITIONER_CN,
24
+ n as DROPDOWN_POPUP_CN,
25
+ i as DROPDOWN_POSITIONER_CN,
26
26
  r as triggerVariants
27
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@px-ui/core",
3
- "version": "1.27.0",
3
+ "version": "1.29.0",
4
4
  "description": "A modern React component library built with Tailwind CSS",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -145,7 +145,8 @@
145
145
  },
146
146
  "peerDependencies": {
147
147
  "react": ">=16.8.0",
148
- "react-dom": ">=16.8.0"
148
+ "react-dom": ">=16.8.0",
149
+ "@tanstack/react-query": ">=5.0.0"
149
150
  },
150
151
  "dependencies": {
151
152
  "@base-ui-components/react": "1.0.0-beta.4",
@@ -1,12 +0,0 @@
1
- import { Input as BaseInput } from '@base-ui-components/react';
2
- import * as React from "react";
3
- interface InputProps extends Omit<React.ComponentProps<typeof BaseInput>, "size"> {
4
- size?: "default" | "sm";
5
- inputContainerClassName?: string;
6
- leadingIcon?: React.ReactNode;
7
- trailingIcon?: React.ReactNode;
8
- invalid?: boolean;
9
- }
10
- export declare function TextInput({ inputContainerClassName, className, type, leadingIcon, trailingIcon, size, invalid, ...rest }: InputProps): import("react/jsx-runtime").JSX.Element;
11
- export {};
12
- //# sourceMappingURL=text-input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../src/components/text-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE/D,UAAU,UACR,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5D,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,EACxB,uBAAuB,EACvB,SAAS,EACT,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,IAAgB,EAChB,OAAO,EACP,GAAG,IAAI,EACR,EAAE,UAAU,2CAwCZ"}
@@ -1,60 +0,0 @@
1
- import { j as e } from "../_virtual/jsx-runtime.js";
2
- import { cn as n } from "../utils/classnames.js";
3
- import { Input 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/input/Input.js";
4
- function m({
5
- inputContainerClassName: p,
6
- className: l,
7
- type: s,
8
- leadingIcon: r,
9
- trailingIcon: t,
10
- size: a = "default",
11
- invalid: o,
12
- ...i
13
- }) {
14
- return /* @__PURE__ */ e.jsxs(
15
- "div",
16
- {
17
- className: n("relative w-full", p),
18
- "data-slot": "input-container",
19
- children: [
20
- r && /* @__PURE__ */ e.jsx(
21
- "span",
22
- {
23
- "data-slot": "input-leading-icon",
24
- className: "left-3 [&_svg:not([class*='size-'])]:size-4 absolute top-1/2 shrink-0 -translate-y-1/2 [&_svg]:shrink-0 [&_svg:not([class*='pointer-events-'])]:pointer-events-none",
25
- children: r
26
- }
27
- ),
28
- /* @__PURE__ */ e.jsx(
29
- d,
30
- {
31
- type: s,
32
- "data-slot": "input",
33
- className: n(
34
- "min-w-0 font-medium placeholder:font-light shadow-xs flex w-full border-ppx-neutral-5 bg-ppx-neutral-1 text-ppx-sm text-ppx-neutral-18 transition-[color,box-shadow] outline-none placeholder:text-ppx-sm! placeholder:text-ppx-neutral-12 focus:border-ppx-primary-2 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:border-ppx-red-4 aria-invalid:bg-ppx-red-1 aria-invalid:ring-ppx-red-2",
35
- a === "sm" && "h-8 p-2 rounded-ppx-s border-[0.046875rem] focus:ring focus:ring-ppx-primary-2",
36
- a === "default" && "h-10 p-2 rounded-ppx-s border-2",
37
- r ? "pl-10" : "",
38
- t ? "pr-10" : "",
39
- s === "number" && "no-arrow-spin",
40
- l
41
- ),
42
- "aria-invalid": o,
43
- ...i
44
- }
45
- ),
46
- t && /* @__PURE__ */ e.jsx(
47
- "span",
48
- {
49
- "data-slot": "input-trailing-icon",
50
- className: "right-3 [&_svg:not([class*='size-'])]:size-4 absolute top-1/2 shrink-0 -translate-y-1/2 [&_svg]:shrink-0 [&_svg:not([class*='pointer-events-'])]:pointer-events-none",
51
- children: t
52
- }
53
- )
54
- ]
55
- }
56
- );
57
- }
58
- export {
59
- m as TextInput
60
- };