@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.
- package/dist/components/avatar-group.d.ts +2 -1
- package/dist/components/avatar-group.d.ts.map +1 -1
- package/dist/components/avatar-group.js +17 -10
- package/dist/components/avatar.d.ts +3 -2
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/button.d.ts +5 -5
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +15 -18
- package/dist/components/checkbox.d.ts +3 -1
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +1 -4
- package/dist/components/combobox.d.ts +12 -4
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +135 -128
- package/dist/components/dialog.d.ts +12 -11
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +118 -88
- package/dist/components/input-group.d.ts +4 -2
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input.d.ts +3 -2
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/menu.d.ts +1 -4
- package/dist/components/menu.d.ts.map +1 -1
- package/dist/components/menu.js +87 -108
- package/dist/components/popover.d.ts +17 -15
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +84 -63
- package/dist/components/radio-group.d.ts +3 -1
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/select.d.ts +10 -2
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +66 -61
- package/dist/components/switch.js +3 -3
- package/dist/components/textarea.d.ts +3 -2
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +2 -1
- package/dist/core.css +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -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/combobox/arrow/ComboboxArrow.js +39 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/tw-styles/dropdown.d.ts.map +1 -1
- package/dist/tw-styles/dropdown.js +6 -6
- package/package.json +3 -2
- package/dist/components/text-input.d.ts +0 -12
- package/dist/components/text-input.d.ts.map +0 -1
- package/dist/components/text-input.js +0 -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/field/control/FieldControl.js +0 -104
- 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,104 +0,0 @@
|
|
|
1
|
-
import * as g from "react";
|
|
2
|
-
import { useEventCallback as K } 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/useEventCallback.js";
|
|
3
|
-
import { useControlled as L } 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/useControlled.js";
|
|
4
|
-
import { useIsoLayoutEffect as V } 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";
|
|
5
|
-
import { useFieldRootContext as b } from "../root/FieldRootContext.js";
|
|
6
|
-
import { fieldValidityMapping as O } from "../utils/constants.js";
|
|
7
|
-
import { useRenderElement as S } from "../../utils/useRenderElement.js";
|
|
8
|
-
import { useField as _ } from "../useField.js";
|
|
9
|
-
import { useBaseUiId as j } from "../../utils/useBaseUiId.js";
|
|
10
|
-
import { useFieldControlValidation as q } from "./useFieldControlValidation.js";
|
|
11
|
-
import { createChangeEventDetails as z } from "../../utils/createBaseUIEventDetails.js";
|
|
12
|
-
const G = /* @__PURE__ */ g.forwardRef(function(u, F) {
|
|
13
|
-
const {
|
|
14
|
-
render: J,
|
|
15
|
-
className: Q,
|
|
16
|
-
id: E,
|
|
17
|
-
name: y,
|
|
18
|
-
value: o,
|
|
19
|
-
disabled: N = !1,
|
|
20
|
-
onValueChange: n,
|
|
21
|
-
defaultValue: f,
|
|
22
|
-
...P
|
|
23
|
-
} = u, {
|
|
24
|
-
state: m,
|
|
25
|
-
name: I,
|
|
26
|
-
disabled: R
|
|
27
|
-
} = b(), i = R || N, c = I ?? y, T = g.useMemo(() => ({
|
|
28
|
-
...m,
|
|
29
|
-
disabled: i
|
|
30
|
-
}), [m, i]), {
|
|
31
|
-
setControlId: s,
|
|
32
|
-
labelId: D,
|
|
33
|
-
setTouched: p,
|
|
34
|
-
setDirty: M,
|
|
35
|
-
validityData: h,
|
|
36
|
-
setFocused: v,
|
|
37
|
-
setFilled: a,
|
|
38
|
-
validationMode: w
|
|
39
|
-
} = b(), {
|
|
40
|
-
getValidationProps: B,
|
|
41
|
-
getInputValidationProps: U,
|
|
42
|
-
commitValidation: d,
|
|
43
|
-
inputRef: r
|
|
44
|
-
} = q(), l = j(E);
|
|
45
|
-
V(() => (s(l), () => {
|
|
46
|
-
s(void 0);
|
|
47
|
-
}), [l, s]), V(() => {
|
|
48
|
-
var t;
|
|
49
|
-
const e = o != null;
|
|
50
|
-
(t = r.current) != null && t.value || e && o !== "" ? a(!0) : e && o === "" && a(!1);
|
|
51
|
-
}, [r, a, o]);
|
|
52
|
-
const [C, k] = L({
|
|
53
|
-
controlled: o,
|
|
54
|
-
default: f,
|
|
55
|
-
name: "FieldControl",
|
|
56
|
-
state: "value"
|
|
57
|
-
}), x = o !== void 0, A = K((e, t) => {
|
|
58
|
-
n == null || n(e, t), !t.isCanceled && k(e);
|
|
59
|
-
});
|
|
60
|
-
return _({
|
|
61
|
-
id: l,
|
|
62
|
-
name: c,
|
|
63
|
-
commitValidation: d,
|
|
64
|
-
value: C,
|
|
65
|
-
getValue: () => {
|
|
66
|
-
var e;
|
|
67
|
-
return (e = r.current) == null ? void 0 : e.value;
|
|
68
|
-
},
|
|
69
|
-
controlRef: r
|
|
70
|
-
}), S("input", u, {
|
|
71
|
-
ref: F,
|
|
72
|
-
state: T,
|
|
73
|
-
props: [{
|
|
74
|
-
id: l,
|
|
75
|
-
disabled: i,
|
|
76
|
-
name: c,
|
|
77
|
-
ref: r,
|
|
78
|
-
"aria-labelledby": D,
|
|
79
|
-
...x ? {
|
|
80
|
-
value: C
|
|
81
|
-
} : {
|
|
82
|
-
defaultValue: f
|
|
83
|
-
},
|
|
84
|
-
onChange(e) {
|
|
85
|
-
const t = e.currentTarget.value;
|
|
86
|
-
A(t, z("none", e.nativeEvent)), M(t !== h.initialValue), a(t !== "");
|
|
87
|
-
},
|
|
88
|
-
onFocus() {
|
|
89
|
-
v(!0);
|
|
90
|
-
},
|
|
91
|
-
onBlur(e) {
|
|
92
|
-
p(!0), v(!1), w === "onBlur" && d(e.currentTarget.value);
|
|
93
|
-
},
|
|
94
|
-
onKeyDown(e) {
|
|
95
|
-
e.currentTarget.tagName === "INPUT" && e.key === "Enter" && (p(!0), d(e.currentTarget.value));
|
|
96
|
-
}
|
|
97
|
-
}, B(), U(), P],
|
|
98
|
-
stateAttributesMapping: O
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
process.env.NODE_ENV !== "production" && (G.displayName = "FieldControl");
|
|
102
|
-
export {
|
|
103
|
-
G as FieldControl
|
|
104
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as t from "react";
|
|
2
|
-
import { j as n } from "../../../../../../../../_virtual/jsx-runtime.js";
|
|
3
|
-
import { FieldControl as p } from "../field/control/FieldControl.js";
|
|
4
|
-
const e = /* @__PURE__ */ t.forwardRef(function(o, r) {
|
|
5
|
-
return /* @__PURE__ */ n.jsx(p, {
|
|
6
|
-
ref: r,
|
|
7
|
-
...o
|
|
8
|
-
});
|
|
9
|
-
});
|
|
10
|
-
process.env.NODE_ENV !== "production" && (e.displayName = "Input");
|
|
11
|
-
export {
|
|
12
|
-
e as Input
|
|
13
|
-
};
|