@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.
- 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 -19
- 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,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
|
|
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
|
|
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
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { Root as
|
|
13
|
-
import { cva as
|
|
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
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
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
|
|
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
|
|
28
|
-
import { ComboboxChip as
|
|
29
|
-
import { ComboboxChipRemove as
|
|
30
|
-
import { ComboboxItemIndicator as
|
|
31
|
-
const b = "px-4 py-2 text-ppx-sm min-h-11 flex items-center justify-center text-ppx-muted-foreground",
|
|
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
|
|
35
|
+
function _e({
|
|
35
36
|
children: r,
|
|
36
|
-
...
|
|
37
|
+
...n
|
|
37
38
|
}) {
|
|
38
|
-
const
|
|
39
|
+
const t = m.useRef(null), i = m.useRef(null), [o, s] = m.useState(!1), [l, d] = m.useState(""), c = {
|
|
39
40
|
...{
|
|
40
|
-
open:
|
|
41
|
-
onOpenChange:
|
|
42
|
-
inputValue:
|
|
41
|
+
open: o,
|
|
42
|
+
onOpenChange: s,
|
|
43
|
+
inputValue: l,
|
|
43
44
|
onInputValueChange: d
|
|
44
45
|
},
|
|
45
|
-
...
|
|
46
|
+
...n
|
|
46
47
|
}, x = {
|
|
47
|
-
...
|
|
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:
|
|
55
|
-
searchableTriggerRef:
|
|
55
|
+
chipsTriggerRef: t,
|
|
56
|
+
searchableTriggerRef: i
|
|
56
57
|
};
|
|
57
|
-
return /* @__PURE__ */ e.jsx(R.Provider, { value: u, children: /* @__PURE__ */ e.jsx(
|
|
58
|
+
return /* @__PURE__ */ e.jsx(R.Provider, { value: u, children: /* @__PURE__ */ e.jsx(U, { autoHighlight: !0, ...x, children: r }) });
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
+
function Ee({
|
|
60
61
|
empty: r = "No options",
|
|
61
|
-
portalProps:
|
|
62
|
-
positionerProps:
|
|
63
|
-
popupProps:
|
|
64
|
-
children:
|
|
65
|
-
widthVariant:
|
|
62
|
+
portalProps: n,
|
|
63
|
+
positionerProps: t,
|
|
64
|
+
popupProps: i,
|
|
65
|
+
children: o,
|
|
66
|
+
widthVariant: s = "trigger"
|
|
66
67
|
}) {
|
|
67
68
|
const {
|
|
68
|
-
chipsTriggerRef:
|
|
69
|
+
chipsTriggerRef: l,
|
|
69
70
|
searchableTriggerRef: d,
|
|
70
|
-
isLoading:
|
|
71
|
+
isLoading: f,
|
|
71
72
|
isError: c,
|
|
72
73
|
isLoadingMore: v,
|
|
73
74
|
hasMore: x,
|
|
74
75
|
onLoadMore: u
|
|
75
|
-
} =
|
|
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(
|
|
82
|
-
|
|
82
|
+
return /* @__PURE__ */ e.jsx(X, { ...n, children: /* @__PURE__ */ e.jsx(
|
|
83
|
+
$,
|
|
83
84
|
{
|
|
84
85
|
sideOffset: 6,
|
|
85
86
|
align: "start",
|
|
86
|
-
...
|
|
87
|
-
className:
|
|
88
|
-
anchor: (
|
|
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:
|
|
93
|
-
|
|
93
|
+
className: a(
|
|
94
|
+
k,
|
|
94
95
|
"scroll-pt-2 scroll-pb-2 overscroll-contain",
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
...
|
|
99
|
+
...i,
|
|
99
100
|
children: [
|
|
100
|
-
|
|
101
|
-
!
|
|
102
|
-
|
|
101
|
+
o,
|
|
102
|
+
!f && !c && /* @__PURE__ */ e.jsx(
|
|
103
|
+
J,
|
|
103
104
|
{
|
|
104
|
-
className:
|
|
105
|
+
className: a(b, "empty:hidden"),
|
|
105
106
|
children: r
|
|
106
107
|
}
|
|
107
108
|
),
|
|
108
|
-
|
|
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
|
-
...
|
|
128
|
+
...n
|
|
128
129
|
}) {
|
|
129
|
-
return /* @__PURE__ */ e.jsx(I, { className:
|
|
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
|
-
...
|
|
134
|
+
...n
|
|
134
135
|
}) {
|
|
135
136
|
return /* @__PURE__ */ e.jsx(
|
|
136
137
|
I,
|
|
137
138
|
{
|
|
138
|
-
...
|
|
139
|
-
render: (
|
|
140
|
-
/* @__PURE__ */ e.jsx(
|
|
141
|
-
|
|
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
|
|
147
|
+
function re(r) {
|
|
147
148
|
return /* @__PURE__ */ e.jsx(
|
|
148
149
|
"div",
|
|
149
150
|
{
|
|
150
|
-
className:
|
|
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(
|
|
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:
|
|
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:
|
|
167
|
-
return /* @__PURE__ */ e.jsxs(
|
|
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: (
|
|
172
|
+
render: (o) => /* @__PURE__ */ e.jsx(
|
|
172
173
|
W,
|
|
173
174
|
{
|
|
174
|
-
...
|
|
175
|
-
invalid:
|
|
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(
|
|
183
|
+
/* @__PURE__ */ e.jsx(ne, {})
|
|
183
184
|
] });
|
|
184
185
|
}
|
|
185
|
-
function
|
|
186
|
-
const { isLoading: r } =
|
|
187
|
-
return /* @__PURE__ */ e.jsxs(
|
|
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
|
-
|
|
191
|
+
K,
|
|
191
192
|
{
|
|
192
193
|
"aria-label": "Clear selection",
|
|
193
|
-
render: (
|
|
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: (
|
|
200
|
+
render: (n) => /* @__PURE__ */ e.jsx(
|
|
200
201
|
y,
|
|
201
202
|
{
|
|
202
203
|
size: "icon-xs",
|
|
203
204
|
"aria-label": "Open popup",
|
|
204
|
-
...
|
|
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
|
|
213
|
+
function We({
|
|
213
214
|
size: r,
|
|
214
|
-
widthVariant:
|
|
215
|
-
|
|
215
|
+
widthVariant: n,
|
|
216
|
+
children: t,
|
|
217
|
+
className: i,
|
|
218
|
+
...o
|
|
216
219
|
}) {
|
|
217
|
-
const { isLoading:
|
|
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
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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
|
-
|
|
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
|
|
265
|
+
function Pe({
|
|
262
266
|
size: r,
|
|
263
|
-
widthVariant:
|
|
264
|
-
...
|
|
267
|
+
widthVariant: n,
|
|
268
|
+
...t
|
|
265
269
|
}) {
|
|
266
|
-
const { chipsTriggerRef:
|
|
270
|
+
const { chipsTriggerRef: i, isLoading: o, invalid: s } = p();
|
|
267
271
|
return /* @__PURE__ */ e.jsxs(
|
|
268
|
-
|
|
272
|
+
Q,
|
|
269
273
|
{
|
|
270
|
-
className:
|
|
271
|
-
|
|
272
|
-
|
|
274
|
+
className: a(
|
|
275
|
+
te({ size: r, widthVariant: n }),
|
|
276
|
+
t.className
|
|
273
277
|
),
|
|
274
|
-
"aria-invalid":
|
|
275
|
-
ref:
|
|
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: (
|
|
278
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
|
299
|
+
function Fe(r) {
|
|
296
300
|
return /* @__PURE__ */ e.jsxs(
|
|
297
|
-
|
|
301
|
+
Y,
|
|
298
302
|
{
|
|
299
303
|
...r,
|
|
300
|
-
className:
|
|
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
|
-
|
|
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(
|
|
315
|
+
children: /* @__PURE__ */ e.jsx(M, { className: "size-3" })
|
|
312
316
|
}
|
|
313
317
|
)
|
|
314
318
|
]
|
|
315
319
|
}
|
|
316
320
|
);
|
|
317
321
|
}
|
|
318
|
-
function
|
|
322
|
+
function Ge({
|
|
319
323
|
placeholder: r = "Search options",
|
|
320
|
-
...
|
|
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
|
-
...
|
|
333
|
+
...n
|
|
330
334
|
}
|
|
331
335
|
),
|
|
332
|
-
/* @__PURE__ */ e.jsx(
|
|
336
|
+
/* @__PURE__ */ e.jsx(E, { className: "size-3.5 text-ppx-neutral-10" })
|
|
333
337
|
] });
|
|
334
338
|
}
|
|
335
|
-
function
|
|
339
|
+
function p() {
|
|
336
340
|
return m.useContext(R);
|
|
337
341
|
}
|
|
342
|
+
const He = H;
|
|
338
343
|
export {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
344
|
+
He as BaseCombobox,
|
|
345
|
+
Fe as Chip,
|
|
346
|
+
Pe as ChipsTrigger,
|
|
347
|
+
Ee as Content,
|
|
342
348
|
De as Item,
|
|
343
|
-
|
|
349
|
+
Ve as List,
|
|
344
350
|
C as LoadingIndicator,
|
|
345
351
|
Me as MultiItem,
|
|
346
|
-
|
|
347
|
-
|
|
352
|
+
_e as Root,
|
|
353
|
+
Ge as Search,
|
|
348
354
|
Ae as SearchableTrigger,
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
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
|
|
11
|
-
declare function
|
|
12
|
-
declare function
|
|
13
|
-
export
|
|
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;
|
|
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;AAMjE,wBAAgB,IAAI,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,2CAE9C;AAED,wBAAgB,MAAM,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,MAAM,CAAC,2CAEhD;AAED,wBAAgB,OAAO,CAAC,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,OAAO,CAAC,2CAEjD;AAED,wBAAgB,KAAK,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,KAAK,CAAC,2CAE/C;AAED,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,QAAQ,CAAC,2CAWlD;AAED,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,KAAK,CAAC,2CAgC/C;AAED,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ1E;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAS7B;AAED,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAY7B;AAED,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW1E;AAED,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,KAAK,CAAC,2CAQ/C;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,WAAW,CAAC,2CAQrD"}
|