@alixpartners/ui-components 2.0.0-beta.8 → 2.0.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/ap-logos-Cl1TR5nm.js +4 -0
- package/dist/assets/Banner.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/DragAndDrop.css +1 -1
- package/dist/assets/Dropdown.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/LogosGallery.css +1 -0
- package/dist/assets/NavBar.css +1 -1
- package/dist/assets/SplitButton.css +1 -1
- package/dist/assets/TabNavigation.css +1 -1
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/Textarea.css +1 -1
- package/dist/assets/Toast.css +1 -1
- package/dist/assets/Tooltip.css +1 -1
- package/dist/assets/ap-icons-types.d.ts +1 -1
- package/dist/assets/ap-icons.d.ts +1 -1
- package/dist/assets/ap-logos-types.d.ts +1 -0
- package/dist/assets/ap-logos.d.ts +1 -0
- package/dist/assets/main.css +1 -1
- package/dist/components/Banner/Banner.d.ts +4 -2
- package/dist/components/Banner/Banner.js +23 -21
- package/dist/components/Button/Button.d.ts +13 -14
- package/dist/components/Button/Button.js +27 -25
- package/dist/components/Checkbox/Checkbox.d.ts +4 -2
- package/dist/components/Checkbox/Checkbox.js +141 -138
- package/dist/components/Creatable/Creatable.d.ts +6 -2
- package/dist/components/Creatable/Creatable.js +29 -14
- package/dist/components/Dialog/Dialog.d.ts +16 -4
- package/dist/components/Dialog/Dialog.js +58 -41
- package/dist/components/DragAndDrop/DragAndDrop.d.ts +10 -5
- package/dist/components/DragAndDrop/DragAndDrop.js +81 -70
- package/dist/components/Dropdown/Dropdown.d.ts +11 -2
- package/dist/components/Dropdown/Dropdown.js +383 -345
- package/dist/components/Ghost/Ghost.d.ts +4 -2
- package/dist/components/Ghost/Ghost.js +18 -15
- package/dist/components/Icons/IconsGallery.js +1 -1
- package/dist/components/Input/Input.d.ts +25 -22
- package/dist/components/Input/Input.js +62 -58
- package/dist/components/Logo/Logo.d.ts +8 -0
- package/dist/components/Logo/Logo.js +57 -0
- package/dist/components/Logos/LogosGallery.d.ts +1 -0
- package/dist/components/Logos/LogosGallery.js +16 -0
- package/dist/components/NavBar/NavBar.d.ts +14 -5
- package/dist/components/NavBar/NavBar.js +241 -224
- package/dist/components/Radio/Radio.d.ts +3 -2
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +4 -2
- package/dist/components/RadioGroup/RadioGroup.js +14 -13
- package/dist/components/Search/Search.d.ts +6 -4
- package/dist/components/Search/Search.js +20 -18
- package/dist/components/SplitButton/SplitButton.d.ts +4 -2
- package/dist/components/SplitButton/SplitButton.js +115 -106
- package/dist/components/Tab/Tab.d.ts +4 -2
- package/dist/components/Tab/Tab.js +27 -24
- package/dist/components/TabNavigation/TabNavigation.d.ts +3 -1
- package/dist/components/TabNavigation/TabNavigation.js +15 -8
- package/dist/components/Tag/Tag.d.ts +2 -1
- package/dist/components/Tag/Tag.js +8 -8
- package/dist/components/TagsFields/TagsFields.d.ts +4 -2
- package/dist/components/TagsFields/TagsFields.js +7 -6
- package/dist/components/Textarea/Textarea.d.ts +7 -5
- package/dist/components/Textarea/Textarea.js +27 -25
- package/dist/components/Toast/Toast.d.ts +4 -2
- package/dist/components/Toast/Toast.js +23 -22
- package/dist/components/Toast/Toast.test.js +1 -1
- package/dist/components/Toggle/Toggle.d.ts +4 -2
- package/dist/components/Toggle/Toggle.js +80 -78
- package/dist/components/Tooltip/Tooltip.d.ts +2 -1
- package/dist/components/Tooltip/Tooltip.js +376 -123
- package/dist/index-2H7slGYV.js +23 -0
- package/dist/index-BGZDIjm9.js +674 -0
- package/dist/{index-snhwePGJ.js → index-BJXIvJs4.js} +3 -3
- package/dist/{index-DNvS1y4S.js → index-CVWHq7Pr.js} +33 -32
- package/dist/{index-DrL-TXFC.js → index-CjQV7MmW.js} +2 -2
- package/dist/index-DWydnyjJ.js +245 -0
- package/dist/index-DieLVN0p.js +1664 -0
- package/dist/{index-BvhDRUM9.js → index-DpfPnSMn.js} +1 -1
- package/dist/main.d.ts +10 -8
- package/dist/main.js +29 -25
- package/dist/storybook-docs-page.d.ts +4 -1
- package/dist/types/native-events.d.ts +80 -0
- package/package.json +1 -1
- package/dist/index-Bx8a_H5C.js +0 -2331
- package/dist/index-CVlmPg9Z.js +0 -239
- package/dist/index-k9IXwz5f.js +0 -23
package/dist/index-CVlmPg9Z.js
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import * as c from "react";
|
|
2
|
-
import * as w from "react-dom";
|
|
3
|
-
import { jsx as y } from "react/jsx-runtime";
|
|
4
|
-
function v(e, n) {
|
|
5
|
-
if (typeof e == "function")
|
|
6
|
-
return e(n);
|
|
7
|
-
e != null && (e.current = n);
|
|
8
|
-
}
|
|
9
|
-
function C(...e) {
|
|
10
|
-
return (n) => {
|
|
11
|
-
let o = !1;
|
|
12
|
-
const r = e.map((t) => {
|
|
13
|
-
const s = v(t, n);
|
|
14
|
-
return !o && typeof s == "function" && (o = !0), s;
|
|
15
|
-
});
|
|
16
|
-
if (o)
|
|
17
|
-
return () => {
|
|
18
|
-
for (let t = 0; t < r.length; t++) {
|
|
19
|
-
const s = r[t];
|
|
20
|
-
typeof s == "function" ? s() : v(e[t], null);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
function V(...e) {
|
|
26
|
-
return c.useCallback(C(...e), e);
|
|
27
|
-
}
|
|
28
|
-
// @__NO_SIDE_EFFECTS__
|
|
29
|
-
function P(e) {
|
|
30
|
-
const n = /* @__PURE__ */ R(e), o = c.forwardRef((r, t) => {
|
|
31
|
-
const { children: s, ...u } = r, i = c.Children.toArray(s), l = i.find($);
|
|
32
|
-
if (l) {
|
|
33
|
-
const f = l.props.children, d = i.map((a) => a === l ? c.Children.count(f) > 1 ? c.Children.only(null) : c.isValidElement(f) ? f.props.children : null : a);
|
|
34
|
-
return /* @__PURE__ */ y(n, { ...u, ref: t, children: c.isValidElement(f) ? c.cloneElement(f, void 0, d) : null });
|
|
35
|
-
}
|
|
36
|
-
return /* @__PURE__ */ y(n, { ...u, ref: t, children: s });
|
|
37
|
-
});
|
|
38
|
-
return o.displayName = `${e}.Slot`, o;
|
|
39
|
-
}
|
|
40
|
-
// @__NO_SIDE_EFFECTS__
|
|
41
|
-
function R(e) {
|
|
42
|
-
const n = c.forwardRef((o, r) => {
|
|
43
|
-
const { children: t, ...s } = o;
|
|
44
|
-
if (c.isValidElement(t)) {
|
|
45
|
-
const u = _(t), i = z(s, t.props);
|
|
46
|
-
return t.type !== c.Fragment && (i.ref = r ? C(r, u) : u), c.cloneElement(t, i);
|
|
47
|
-
}
|
|
48
|
-
return c.Children.count(t) > 1 ? c.Children.only(null) : null;
|
|
49
|
-
});
|
|
50
|
-
return n.displayName = `${e}.SlotClone`, n;
|
|
51
|
-
}
|
|
52
|
-
var E = Symbol("radix.slottable");
|
|
53
|
-
function $(e) {
|
|
54
|
-
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === E;
|
|
55
|
-
}
|
|
56
|
-
function z(e, n) {
|
|
57
|
-
const o = { ...n };
|
|
58
|
-
for (const r in n) {
|
|
59
|
-
const t = e[r], s = n[r];
|
|
60
|
-
/^on[A-Z]/.test(r) ? t && s ? o[r] = (...i) => {
|
|
61
|
-
const l = s(...i);
|
|
62
|
-
return t(...i), l;
|
|
63
|
-
} : t && (o[r] = t) : r === "style" ? o[r] = { ...t, ...s } : r === "className" && (o[r] = [t, s].filter(Boolean).join(" "));
|
|
64
|
-
}
|
|
65
|
-
return { ...e, ...o };
|
|
66
|
-
}
|
|
67
|
-
function _(e) {
|
|
68
|
-
var r, t;
|
|
69
|
-
let n = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, o = n && "isReactWarning" in n && n.isReactWarning;
|
|
70
|
-
return o ? e.ref : (n = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, o = n && "isReactWarning" in n && n.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
71
|
-
}
|
|
72
|
-
var O = [
|
|
73
|
-
"a",
|
|
74
|
-
"button",
|
|
75
|
-
"div",
|
|
76
|
-
"form",
|
|
77
|
-
"h2",
|
|
78
|
-
"h3",
|
|
79
|
-
"img",
|
|
80
|
-
"input",
|
|
81
|
-
"label",
|
|
82
|
-
"li",
|
|
83
|
-
"nav",
|
|
84
|
-
"ol",
|
|
85
|
-
"p",
|
|
86
|
-
"select",
|
|
87
|
-
"span",
|
|
88
|
-
"svg",
|
|
89
|
-
"ul"
|
|
90
|
-
], j = O.reduce((e, n) => {
|
|
91
|
-
const o = /* @__PURE__ */ P(`Primitive.${n}`), r = c.forwardRef((t, s) => {
|
|
92
|
-
const { asChild: u, ...i } = t, l = u ? o : n;
|
|
93
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y(l, { ...i, ref: s });
|
|
94
|
-
});
|
|
95
|
-
return r.displayName = `Primitive.${n}`, { ...e, [n]: r };
|
|
96
|
-
}, {});
|
|
97
|
-
function B(e, n) {
|
|
98
|
-
e && w.flushSync(() => e.dispatchEvent(n));
|
|
99
|
-
}
|
|
100
|
-
function k(e, n = []) {
|
|
101
|
-
let o = [];
|
|
102
|
-
function r(s, u) {
|
|
103
|
-
const i = c.createContext(u), l = o.length;
|
|
104
|
-
o = [...o, u];
|
|
105
|
-
const f = (a) => {
|
|
106
|
-
var b;
|
|
107
|
-
const { scope: p, children: h, ...m } = a, S = ((b = p == null ? void 0 : p[e]) == null ? void 0 : b[l]) || i, g = c.useMemo(() => m, Object.values(m));
|
|
108
|
-
return /* @__PURE__ */ y(S.Provider, { value: g, children: h });
|
|
109
|
-
};
|
|
110
|
-
f.displayName = s + "Provider";
|
|
111
|
-
function d(a, p) {
|
|
112
|
-
var S;
|
|
113
|
-
const h = ((S = p == null ? void 0 : p[e]) == null ? void 0 : S[l]) || i, m = c.useContext(h);
|
|
114
|
-
if (m) return m;
|
|
115
|
-
if (u !== void 0) return u;
|
|
116
|
-
throw new Error(`\`${a}\` must be used within \`${s}\``);
|
|
117
|
-
}
|
|
118
|
-
return [f, d];
|
|
119
|
-
}
|
|
120
|
-
const t = () => {
|
|
121
|
-
const s = o.map((u) => c.createContext(u));
|
|
122
|
-
return function(i) {
|
|
123
|
-
const l = (i == null ? void 0 : i[e]) || s;
|
|
124
|
-
return c.useMemo(
|
|
125
|
-
() => ({ [`__scope${e}`]: { ...i, [e]: l } }),
|
|
126
|
-
[i, l]
|
|
127
|
-
);
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
return t.scopeName = e, [r, A(t, ...n)];
|
|
131
|
-
}
|
|
132
|
-
function A(...e) {
|
|
133
|
-
const n = e[0];
|
|
134
|
-
if (e.length === 1) return n;
|
|
135
|
-
const o = () => {
|
|
136
|
-
const r = e.map((t) => ({
|
|
137
|
-
useScope: t(),
|
|
138
|
-
scopeName: t.scopeName
|
|
139
|
-
}));
|
|
140
|
-
return function(s) {
|
|
141
|
-
const u = r.reduce((i, { useScope: l, scopeName: f }) => {
|
|
142
|
-
const a = l(s)[`__scope${f}`];
|
|
143
|
-
return { ...i, ...a };
|
|
144
|
-
}, {});
|
|
145
|
-
return c.useMemo(() => ({ [`__scope${n.scopeName}`]: u }), [u]);
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
return o.scopeName = n.scopeName, o;
|
|
149
|
-
}
|
|
150
|
-
function L(e, n, { checkForDefaultPrevented: o = !0 } = {}) {
|
|
151
|
-
return function(t) {
|
|
152
|
-
if (e == null || e(t), o === !1 || !t.defaultPrevented)
|
|
153
|
-
return n == null ? void 0 : n(t);
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
var x = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
|
|
157
|
-
}, N = c[" useInsertionEffect ".trim().toString()] || x;
|
|
158
|
-
function M({
|
|
159
|
-
prop: e,
|
|
160
|
-
defaultProp: n,
|
|
161
|
-
onChange: o = () => {
|
|
162
|
-
},
|
|
163
|
-
caller: r
|
|
164
|
-
}) {
|
|
165
|
-
const [t, s, u] = D({
|
|
166
|
-
defaultProp: n,
|
|
167
|
-
onChange: o
|
|
168
|
-
}), i = e !== void 0, l = i ? e : t;
|
|
169
|
-
{
|
|
170
|
-
const d = c.useRef(e !== void 0);
|
|
171
|
-
c.useEffect(() => {
|
|
172
|
-
const a = d.current;
|
|
173
|
-
a !== i && console.warn(
|
|
174
|
-
`${r} is changing from ${a ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
175
|
-
), d.current = i;
|
|
176
|
-
}, [i, r]);
|
|
177
|
-
}
|
|
178
|
-
const f = c.useCallback(
|
|
179
|
-
(d) => {
|
|
180
|
-
var a;
|
|
181
|
-
if (i) {
|
|
182
|
-
const p = I(d) ? d(e) : d;
|
|
183
|
-
p !== e && ((a = u.current) == null || a.call(u, p));
|
|
184
|
-
} else
|
|
185
|
-
s(d);
|
|
186
|
-
},
|
|
187
|
-
[i, e, s, u]
|
|
188
|
-
);
|
|
189
|
-
return [l, f];
|
|
190
|
-
}
|
|
191
|
-
function D({
|
|
192
|
-
defaultProp: e,
|
|
193
|
-
onChange: n
|
|
194
|
-
}) {
|
|
195
|
-
const [o, r] = c.useState(e), t = c.useRef(o), s = c.useRef(n);
|
|
196
|
-
return N(() => {
|
|
197
|
-
s.current = n;
|
|
198
|
-
}, [n]), c.useEffect(() => {
|
|
199
|
-
var u;
|
|
200
|
-
t.current !== o && ((u = s.current) == null || u.call(s, o), t.current = o);
|
|
201
|
-
}, [o, t]), [o, r, s];
|
|
202
|
-
}
|
|
203
|
-
function I(e) {
|
|
204
|
-
return typeof e == "function";
|
|
205
|
-
}
|
|
206
|
-
function T(e) {
|
|
207
|
-
const [n, o] = c.useState(void 0);
|
|
208
|
-
return x(() => {
|
|
209
|
-
if (e) {
|
|
210
|
-
o({ width: e.offsetWidth, height: e.offsetHeight });
|
|
211
|
-
const r = new ResizeObserver((t) => {
|
|
212
|
-
if (!Array.isArray(t) || !t.length)
|
|
213
|
-
return;
|
|
214
|
-
const s = t[0];
|
|
215
|
-
let u, i;
|
|
216
|
-
if ("borderBoxSize" in s) {
|
|
217
|
-
const l = s.borderBoxSize, f = Array.isArray(l) ? l[0] : l;
|
|
218
|
-
u = f.inlineSize, i = f.blockSize;
|
|
219
|
-
} else
|
|
220
|
-
u = e.offsetWidth, i = e.offsetHeight;
|
|
221
|
-
o({ width: u, height: i });
|
|
222
|
-
});
|
|
223
|
-
return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
|
|
224
|
-
} else
|
|
225
|
-
o(void 0);
|
|
226
|
-
}, [e]), n;
|
|
227
|
-
}
|
|
228
|
-
export {
|
|
229
|
-
j as P,
|
|
230
|
-
L as a,
|
|
231
|
-
C as b,
|
|
232
|
-
k as c,
|
|
233
|
-
V as d,
|
|
234
|
-
T as e,
|
|
235
|
-
B as f,
|
|
236
|
-
P as g,
|
|
237
|
-
x as h,
|
|
238
|
-
M as u
|
|
239
|
-
};
|
package/dist/index-k9IXwz5f.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as r from "react";
|
|
2
|
-
import { h as o } from "./index-CVlmPg9Z.js";
|
|
3
|
-
var n = r[" useId ".trim().toString()] || (() => {
|
|
4
|
-
}), a = 0;
|
|
5
|
-
function c(e) {
|
|
6
|
-
const [t, s] = r.useState(n());
|
|
7
|
-
return o(() => {
|
|
8
|
-
s((u) => u ?? String(a++));
|
|
9
|
-
}, [e]), e || (t ? `radix-${t}` : "");
|
|
10
|
-
}
|
|
11
|
-
function i(e) {
|
|
12
|
-
const t = r.useRef(e);
|
|
13
|
-
return r.useEffect(() => {
|
|
14
|
-
t.current = e;
|
|
15
|
-
}), r.useMemo(() => (...s) => {
|
|
16
|
-
var u;
|
|
17
|
-
return (u = t.current) == null ? void 0 : u.call(t, ...s);
|
|
18
|
-
}, []);
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
i as a,
|
|
22
|
-
c as u
|
|
23
|
-
};
|