@ogcio/design-system-react 1.11.2 → 1.12.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/accordion/accordion-item.js +1 -1
- package/dist/alert/alert.js +1 -1
- package/dist/autocomplete/autocomplete.js +4 -4
- package/dist/button-group/button-group.js +44 -44
- package/dist/card/card-next.js +28 -28
- package/dist/combo-box/dropdown-item.js +30 -30
- package/dist/drawer/drawer.content.js +6 -6
- package/dist/drawer/drawer.js +8 -8
- package/dist/error-text/error-text.js +1 -1
- package/dist/forms/form-field/form-field.d.ts +18 -0
- package/dist/forms/form-field/form-field.js +85 -0
- package/dist/forms/form-field/types.d.ts +13 -0
- package/dist/forms/form-field/types.js +1 -0
- package/dist/forms/form-field-with-tag/form-field-with-tag.js +1 -1
- package/dist/heading/heading.js +1 -1
- package/dist/hint-text/hint-text.js +1 -1
- package/dist/icon/icon.js +32 -32
- package/dist/index-2sRBqKFV.js +78 -0
- package/dist/{index-DNkhmzZp.js → index-CB-zPpNk.js} +44 -44
- package/dist/index.d.ts +3 -1
- package/dist/index.js +162 -155
- package/dist/input-checkbox/input-checkbox.js +13 -13
- package/dist/input-radio/input-radio.js +15 -15
- package/dist/label/label.js +1 -1
- package/dist/link/link.js +1 -1
- package/dist/list/list.js +2 -2
- package/dist/modal/modal.content.js +1 -1
- package/dist/modal/modal.js +3 -3
- package/dist/popover/popover.js +471 -467
- package/dist/primitives/anchor.js +1 -1
- package/dist/progress-bar/progress-bar.js +8 -8
- package/dist/progress-stepper/progress-stepper.js +10 -10
- package/dist/score-select/score-select.js +29 -29
- package/dist/select/select-menu.js +1 -0
- package/dist/select/select-next.js +11 -10
- package/dist/side-nav/side-nav.js +23 -23
- package/dist/spinner/spinner.js +1 -1
- package/dist/stack/stack.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/table/table.js +1 -1
- package/dist/textarea/textarea.js +7 -7
- package/dist/toast/ds-toast.js +1 -1
- package/dist/tooltip/tooltip.js +1 -1
- package/package.json +5 -4
- package/dist/accordion/accordion.test.d.ts +0 -1
- package/dist/accordion/accordion.test.js +0 -61
- package/dist/alert/alert.test.d.ts +0 -1
- package/dist/alert/alert.test.js +0 -45
- package/dist/blockquote/blockquote.test.d.ts +0 -1
- package/dist/blockquote/blockquote.test.js +0 -21
- package/dist/breadcrumbs/breadcrumbs.test.d.ts +0 -1
- package/dist/breadcrumbs/breadcrumbs.test.js +0 -43
- package/dist/button/button.test.d.ts +0 -1
- package/dist/button/button.test.js +0 -78
- package/dist/button-group/button-group.test.d.ts +0 -1
- package/dist/button-group/button-group.test.js +0 -2982
- package/dist/card/card.test.d.ts +0 -1
- package/dist/card/card.test.js +0 -130
- package/dist/combo-box/dropdown-item.test.d.ts +0 -1
- package/dist/combo-box/dropdown-item.test.js +0 -88
- package/dist/container/container.test.d.ts +0 -1
- package/dist/container/container.test.js +0 -28
- package/dist/cookie-banner/cookie-banner.test.d.ts +0 -1
- package/dist/cookie-banner/cookie-banner.test.js +0 -20
- package/dist/details/details.test.d.ts +0 -1
- package/dist/details/details.test.js +0 -50
- package/dist/drawer/drawer.test.d.ts +0 -1
- package/dist/drawer/drawer.test.js +0 -69
- package/dist/error-text/error-text.test.d.ts +0 -1
- package/dist/error-text/error-text.test.js +0 -30
- package/dist/footer/footer.test.d.ts +0 -1
- package/dist/footer/footer.test.js +0 -42
- package/dist/forms/form-field.d.ts +0 -11
- package/dist/forms/form-field.js +0 -41
- package/dist/header/header.test.d.ts +0 -1
- package/dist/header/header.test.js +0 -95
- package/dist/hint-text/hint-text.test.d.ts +0 -1
- package/dist/hint-text/hint-text.test.js +0 -31
- package/dist/icon/icon.test.d.ts +0 -1
- package/dist/icon/icon.test.js +0 -53
- package/dist/icon-button/icon-button.test.d.ts +0 -1
- package/dist/icon-button/icon-button.test.js +0 -56
- package/dist/index-ntYL1VRC.js +0 -64
- package/dist/input-password/input-password.test.d.ts +0 -1
- package/dist/input-password/input-password.test.js +0 -16
- package/dist/label/label.test.d.ts +0 -1
- package/dist/label/label.test.js +0 -49
- package/dist/link/link.test.d.ts +0 -1
- package/dist/link/link.test.js +0 -66
- package/dist/list/list.test.d.ts +0 -1
- package/dist/list/list.test.js +0 -67
- package/dist/modal/modal.test.d.ts +0 -1
- package/dist/modal/modal.test.js +0 -81
- package/dist/pagination/pagination.test.d.ts +0 -1
- package/dist/pagination/pagination.test.js +0 -95
- package/dist/paragraph/paragraph.test.d.ts +0 -1
- package/dist/paragraph/paragraph.test.js +0 -63
- package/dist/phase-banner/phase-banner.test.d.ts +0 -1
- package/dist/phase-banner/phase-banner.test.js +0 -27
- package/dist/primitives/anchor.test.d.ts +0 -1
- package/dist/primitives/anchor.test.js +0 -39
- package/dist/progress-bar/progress-bar.test.d.ts +0 -1
- package/dist/progress-bar/progress-bar.test.js +0 -34
- package/dist/progress-stepper/progress-stepper.test.d.ts +0 -1
- package/dist/progress-stepper/progress-stepper.test.js +0 -117
- package/dist/section-break/section-break.test.d.ts +0 -1
- package/dist/section-break/section-break.test.js +0 -36
- package/dist/spinner/spinner.test.d.ts +0 -1
- package/dist/spinner/spinner.test.js +0 -11
- package/dist/stack/stack.test.d.ts +0 -1
- package/dist/stack/stack.test.js +0 -44
- package/dist/summary-list/summary-list.test.d.ts +0 -1
- package/dist/summary-list/summary-list.test.js +0 -56
- package/dist/table/table.test.d.ts +0 -1
- package/dist/table/table.test.js +0 -18
- package/dist/tabs/tabs.test.d.ts +0 -1
- package/dist/tabs/tabs.test.js +0 -44
- package/dist/tag/tag.test.d.ts +0 -1
- package/dist/tag/tag.test.js +0 -40
- package/dist/test-utilities-BS7B3BF-.js +0 -34112
- package/dist/test-utilities.d.ts +0 -8
- package/dist/test-utilities.js +0 -87
- package/dist/toast/toast.test.d.ts +0 -1
- package/dist/toast/toast.test.js +0 -44
- package/dist/tooltip/tooltip.test.d.ts +0 -1
- package/dist/tooltip/tooltip.test.js +0 -85
- package/dist/utils/utilities.test.d.ts +0 -1
- package/dist/utils/utilities.test.js +0 -79
package/dist/icon/icon.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { cn as a } from "../cn.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import b from "./svgs/bluesky.js";
|
|
5
|
+
import u from "./svgs/facebook.js";
|
|
6
6
|
import y from "./svgs/instagram.js";
|
|
7
7
|
import z from "./svgs/linkedin.js";
|
|
8
8
|
import N from "./svgs/placeholder.js";
|
|
9
9
|
import h from "./svgs/threads.js";
|
|
10
10
|
import x from "./svgs/tiktok.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
function
|
|
11
|
+
import _ from "./svgs/x.js";
|
|
12
|
+
import n from "./svgs/youtube.js";
|
|
13
|
+
function j({
|
|
14
14
|
icon: t,
|
|
15
15
|
size: g = "md",
|
|
16
16
|
filled: c,
|
|
17
|
-
disabled:
|
|
17
|
+
disabled: s,
|
|
18
18
|
ariaHidden: l,
|
|
19
19
|
ariaLabel: i,
|
|
20
20
|
inline: r = !1,
|
|
@@ -38,115 +38,115 @@ function v({
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
if (t === "social_bluesky")
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
41
|
+
return /* @__PURE__ */ e(
|
|
42
|
+
b,
|
|
43
43
|
{
|
|
44
44
|
size: o,
|
|
45
45
|
className: a({
|
|
46
46
|
"gi-block": !r,
|
|
47
47
|
"gi-inline-block": r,
|
|
48
|
-
"gi-stroke-gray-700":
|
|
48
|
+
"gi-stroke-gray-700": s
|
|
49
49
|
})
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
52
|
if (t === "social_facebook")
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
|
|
53
|
+
return /* @__PURE__ */ e(
|
|
54
|
+
u,
|
|
55
55
|
{
|
|
56
56
|
size: o,
|
|
57
57
|
className: a({
|
|
58
58
|
"gi-block": !r,
|
|
59
59
|
"gi-inline-block": r,
|
|
60
|
-
"gi-stroke-gray-700":
|
|
60
|
+
"gi-stroke-gray-700": s
|
|
61
61
|
})
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
64
|
if (t === "social_instagram")
|
|
65
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ e(
|
|
66
66
|
y,
|
|
67
67
|
{
|
|
68
68
|
size: o,
|
|
69
69
|
className: a({
|
|
70
70
|
"gi-block": !r,
|
|
71
71
|
"gi-inline-block": r,
|
|
72
|
-
"gi-stroke-gray-700":
|
|
72
|
+
"gi-stroke-gray-700": s
|
|
73
73
|
})
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
76
|
if (t === "social_linkedin")
|
|
77
|
-
return /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ e(
|
|
78
78
|
z,
|
|
79
79
|
{
|
|
80
80
|
size: o,
|
|
81
81
|
className: a({
|
|
82
82
|
"gi-block": !r,
|
|
83
83
|
"gi-inline-block": r,
|
|
84
|
-
"gi-stroke-gray-700":
|
|
84
|
+
"gi-stroke-gray-700": s
|
|
85
85
|
})
|
|
86
86
|
}
|
|
87
87
|
);
|
|
88
88
|
if (t === "social_threads")
|
|
89
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ e(
|
|
90
90
|
h,
|
|
91
91
|
{
|
|
92
92
|
size: o,
|
|
93
93
|
className: a({
|
|
94
94
|
"gi-block": !r,
|
|
95
95
|
"gi-inline-block": r,
|
|
96
|
-
"gi-stroke-gray-700":
|
|
96
|
+
"gi-stroke-gray-700": s
|
|
97
97
|
})
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
100
|
if (t === "social_tiktok")
|
|
101
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ e(
|
|
102
102
|
x,
|
|
103
103
|
{
|
|
104
104
|
size: o,
|
|
105
105
|
className: a({
|
|
106
106
|
"gi-block": !r,
|
|
107
107
|
"gi-inline-block": r,
|
|
108
|
-
"gi-stroke-gray-700":
|
|
108
|
+
"gi-stroke-gray-700": s
|
|
109
109
|
})
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
112
|
if (t === "social_x")
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
|
|
113
|
+
return /* @__PURE__ */ e(
|
|
114
|
+
_,
|
|
115
115
|
{
|
|
116
116
|
size: o,
|
|
117
117
|
className: a({
|
|
118
118
|
"gi-block": !r,
|
|
119
119
|
"gi-inline-block": r,
|
|
120
|
-
"gi-stroke-gray-700":
|
|
120
|
+
"gi-stroke-gray-700": s
|
|
121
121
|
})
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
124
|
if (t === "social_youtube")
|
|
125
|
-
return /* @__PURE__ */
|
|
126
|
-
|
|
125
|
+
return /* @__PURE__ */ e(
|
|
126
|
+
n,
|
|
127
127
|
{
|
|
128
128
|
size: o,
|
|
129
129
|
className: a({
|
|
130
130
|
"gi-block": !r,
|
|
131
131
|
"gi-inline-block": r,
|
|
132
|
-
"gi-stroke-gray-700":
|
|
132
|
+
"gi-stroke-gray-700": s
|
|
133
133
|
})
|
|
134
134
|
}
|
|
135
135
|
);
|
|
136
136
|
if (t === "placeholder")
|
|
137
|
-
return /* @__PURE__ */
|
|
137
|
+
return /* @__PURE__ */ e(
|
|
138
138
|
N,
|
|
139
139
|
{
|
|
140
140
|
size: o,
|
|
141
141
|
className: a({
|
|
142
142
|
"gi-block": !r,
|
|
143
143
|
"gi-inline-block": r,
|
|
144
|
-
"gi-fill-gray-700":
|
|
144
|
+
"gi-fill-gray-700": s
|
|
145
145
|
})
|
|
146
146
|
}
|
|
147
147
|
);
|
|
148
148
|
const p = c ? "'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' " + o : "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' " + o;
|
|
149
|
-
return /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ e(
|
|
150
150
|
"span",
|
|
151
151
|
{
|
|
152
152
|
...f,
|
|
@@ -156,7 +156,7 @@ function v({
|
|
|
156
156
|
"aria-label": i || t,
|
|
157
157
|
role: i ? "img" : "presentation",
|
|
158
158
|
className: a(
|
|
159
|
-
{ "gi-block": !r, "gi-text-gray-700":
|
|
159
|
+
{ "gi-block": !r, "gi-text-gray-700": s },
|
|
160
160
|
"material-symbols-outlined",
|
|
161
161
|
k
|
|
162
162
|
),
|
|
@@ -169,5 +169,5 @@ function v({
|
|
|
169
169
|
);
|
|
170
170
|
}
|
|
171
171
|
export {
|
|
172
|
-
|
|
172
|
+
j as Icon
|
|
173
173
|
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { jsx as f, Fragment as S } from "react/jsx-runtime";
|
|
3
|
+
function d(t, e) {
|
|
4
|
+
if (typeof t == "function")
|
|
5
|
+
return t(e);
|
|
6
|
+
t != null && (t.current = e);
|
|
7
|
+
}
|
|
8
|
+
function g(...t) {
|
|
9
|
+
return (e) => {
|
|
10
|
+
let r = !1;
|
|
11
|
+
const o = t.map((n) => {
|
|
12
|
+
const l = d(n, e);
|
|
13
|
+
return !r && typeof l == "function" && (r = !0), l;
|
|
14
|
+
});
|
|
15
|
+
if (r)
|
|
16
|
+
return () => {
|
|
17
|
+
for (let n = 0; n < o.length; n++) {
|
|
18
|
+
const l = o[n];
|
|
19
|
+
typeof l == "function" ? l() : d(t[n], null);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
// @__NO_SIDE_EFFECTS__
|
|
25
|
+
function b(t) {
|
|
26
|
+
const e = /* @__PURE__ */ C(t), r = i.forwardRef((o, n) => {
|
|
27
|
+
const { children: l, ...a } = o, s = i.Children.toArray(l), c = s.find(h);
|
|
28
|
+
if (c) {
|
|
29
|
+
const u = c.props.children, m = s.map((p) => p === c ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : p);
|
|
30
|
+
return /* @__PURE__ */ f(e, { ...a, ref: n, children: i.isValidElement(u) ? i.cloneElement(u, void 0, m) : null });
|
|
31
|
+
}
|
|
32
|
+
return /* @__PURE__ */ f(e, { ...a, ref: n, children: l });
|
|
33
|
+
});
|
|
34
|
+
return r.displayName = `${t}.Slot`, r;
|
|
35
|
+
}
|
|
36
|
+
var I = /* @__PURE__ */ b("Slot");
|
|
37
|
+
// @__NO_SIDE_EFFECTS__
|
|
38
|
+
function C(t) {
|
|
39
|
+
const e = i.forwardRef((r, o) => {
|
|
40
|
+
const { children: n, ...l } = r;
|
|
41
|
+
if (i.isValidElement(n)) {
|
|
42
|
+
const a = _(n), s = R(l, n.props);
|
|
43
|
+
return n.type !== i.Fragment && (s.ref = o ? g(o, a) : a), i.cloneElement(n, s);
|
|
44
|
+
}
|
|
45
|
+
return i.Children.count(n) > 1 ? i.Children.only(null) : null;
|
|
46
|
+
});
|
|
47
|
+
return e.displayName = `${t}.SlotClone`, e;
|
|
48
|
+
}
|
|
49
|
+
var y = Symbol("radix.slottable");
|
|
50
|
+
// @__NO_SIDE_EFFECTS__
|
|
51
|
+
function E(t) {
|
|
52
|
+
const e = ({ children: r }) => /* @__PURE__ */ f(S, { children: r });
|
|
53
|
+
return e.displayName = `${t}.Slottable`, e.__radixId = y, e;
|
|
54
|
+
}
|
|
55
|
+
var V = /* @__PURE__ */ E("Slottable");
|
|
56
|
+
function h(t) {
|
|
57
|
+
return i.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === y;
|
|
58
|
+
}
|
|
59
|
+
function R(t, e) {
|
|
60
|
+
const r = { ...e };
|
|
61
|
+
for (const o in e) {
|
|
62
|
+
const n = t[o], l = e[o];
|
|
63
|
+
/^on[A-Z]/.test(o) ? n && l ? r[o] = (...s) => {
|
|
64
|
+
const c = l(...s);
|
|
65
|
+
return n(...s), c;
|
|
66
|
+
} : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...l } : o === "className" && (r[o] = [n, l].filter(Boolean).join(" "));
|
|
67
|
+
}
|
|
68
|
+
return { ...t, ...r };
|
|
69
|
+
}
|
|
70
|
+
function _(t) {
|
|
71
|
+
var o, n;
|
|
72
|
+
let e = (o = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : o.get, r = e && "isReactWarning" in e && e.isReactWarning;
|
|
73
|
+
return r ? t.ref : (e = (n = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : n.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? t.props.ref : t.props.ref || t.ref);
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
V as S,
|
|
77
|
+
I as a
|
|
78
|
+
};
|
|
@@ -119,7 +119,7 @@ const ie = "-", Me = (e) => {
|
|
|
119
119
|
r.has(o) ? r.set(o, i) : a(o, i);
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
|
-
},
|
|
122
|
+
}, ve = "!", Ne = (e) => {
|
|
123
123
|
const {
|
|
124
124
|
separator: t,
|
|
125
125
|
experimentalParseClassName: r
|
|
@@ -140,7 +140,7 @@ const ie = "-", Me = (e) => {
|
|
|
140
140
|
}
|
|
141
141
|
A === "[" ? C++ : A === "]" && C--;
|
|
142
142
|
}
|
|
143
|
-
const M = u.length === 0 ? s : s.substring(m), R = M.startsWith(
|
|
143
|
+
const M = u.length === 0 ? s : s.substring(m), R = M.startsWith(ve), j = R ? M.substring(1) : M, k = S && S > m ? S - m : void 0;
|
|
144
144
|
return {
|
|
145
145
|
modifiers: u,
|
|
146
146
|
hasImportantModifier: R,
|
|
@@ -190,7 +190,7 @@ const ie = "-", Me = (e) => {
|
|
|
190
190
|
}
|
|
191
191
|
j = !1;
|
|
192
192
|
}
|
|
193
|
-
const b = $e(m).join(":"), A = S ? b +
|
|
193
|
+
const b = $e(m).join(":"), A = S ? b + ve : b, h = A + k;
|
|
194
194
|
if (o.includes(h))
|
|
195
195
|
continue;
|
|
196
196
|
o.push(h);
|
|
@@ -206,15 +206,15 @@ const ie = "-", Me = (e) => {
|
|
|
206
206
|
function Oe() {
|
|
207
207
|
let e = 0, t, r, n = "";
|
|
208
208
|
for (; e < arguments.length; )
|
|
209
|
-
(t = arguments[e++]) && (r =
|
|
209
|
+
(t = arguments[e++]) && (r = xe(t)) && (n && (n += " "), n += r);
|
|
210
210
|
return n;
|
|
211
211
|
}
|
|
212
|
-
const
|
|
212
|
+
const xe = (e) => {
|
|
213
213
|
if (typeof e == "string")
|
|
214
214
|
return e;
|
|
215
215
|
let t, r = "";
|
|
216
216
|
for (let n = 0; n < e.length; n++)
|
|
217
|
-
e[n] && (t =
|
|
217
|
+
e[n] && (t = xe(e[n])) && (r && (r += " "), r += t);
|
|
218
218
|
return r;
|
|
219
219
|
};
|
|
220
220
|
function ne(e, ...t) {
|
|
@@ -234,11 +234,11 @@ function ne(e, ...t) {
|
|
|
234
234
|
return o(Oe.apply(null, arguments));
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const w = (e) => {
|
|
238
238
|
const t = (r) => r[e] || [];
|
|
239
239
|
return t.isThemeGetter = !0, t;
|
|
240
|
-
},
|
|
241
|
-
const n =
|
|
240
|
+
}, we = /^\[(?:([a-z-]+):)?(.+)\]$/i, Le = /^\d+\/\d+$/, We = /* @__PURE__ */ new Set(["px", "full", "screen"]), _e = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Be = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ue = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Fe = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Je = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, N = (e) => _(e) || We.has(e) || Le.test(e), T = (e) => B(e, "length", De), _ = (e) => !!e && !Number.isNaN(Number(e)), re = (e) => B(e, "number", _), K = (e) => !!e && Number.isInteger(Number(e)), qe = (e) => e.endsWith("%") && _(e.slice(0, -1)), c = (e) => we.test(e), E = (e) => _e.test(e), Ke = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Ze = (e) => B(e, Ke, ke), He = (e) => B(e, "position", ke), Xe = /* @__PURE__ */ new Set(["image", "url"]), Qe = (e) => B(e, Xe, rr), Ye = (e) => B(e, "", er), Z = () => !0, B = (e, t, r) => {
|
|
241
|
+
const n = we.exec(e);
|
|
242
242
|
return n ? n[1] ? typeof t == "string" ? n[1] === t : t.has(n[1]) : r(n[2]) : !1;
|
|
243
243
|
}, De = (e) => (
|
|
244
244
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
@@ -246,7 +246,7 @@ const v = (e) => {
|
|
|
246
246
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
247
247
|
Be.test(e) && !Ue.test(e)
|
|
248
248
|
), ke = () => !1, er = (e) => Fe.test(e), rr = (e) => Je.test(e), se = () => {
|
|
249
|
-
const e =
|
|
249
|
+
const e = w("colors"), t = w("spacing"), r = w("blur"), n = w("brightness"), a = w("borderColor"), o = w("borderRadius"), i = w("borderSpacing"), s = w("borderWidth"), u = w("contrast"), C = w("grayscale"), m = w("hueRotate"), S = w("invert"), M = w("gap"), R = w("gradientColorStops"), j = w("gradientColorStopPositions"), k = w("inset"), b = w("margin"), A = w("opacity"), h = w("padding"), O = w("saturate"), V = w("scale"), L = w("sepia"), Y = w("skew"), U = w("space"), F = w("translate"), W = () => ["auto", "contain", "none"], J = () => ["auto", "hidden", "clip", "visible", "scroll"], q = () => ["auto", c, t], l = () => [c, t], p = () => ["", N, T], d = () => ["auto", _, c], g = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], f = () => ["solid", "dashed", "dotted", "double", "none"], y = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], v = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], x = () => ["", "0", c], z = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], G = () => [_, c];
|
|
250
250
|
return {
|
|
251
251
|
cacheSize: 500,
|
|
252
252
|
separator: ":",
|
|
@@ -260,9 +260,9 @@ const v = (e) => {
|
|
|
260
260
|
borderSpacing: l(),
|
|
261
261
|
borderWidth: p(),
|
|
262
262
|
contrast: G(),
|
|
263
|
-
grayscale:
|
|
263
|
+
grayscale: x(),
|
|
264
264
|
hueRotate: G(),
|
|
265
|
-
invert:
|
|
265
|
+
invert: x(),
|
|
266
266
|
gap: l(),
|
|
267
267
|
gradientColorStops: [e],
|
|
268
268
|
gradientColorStopPositions: [qe, T],
|
|
@@ -272,7 +272,7 @@ const v = (e) => {
|
|
|
272
272
|
padding: l(),
|
|
273
273
|
saturate: G(),
|
|
274
274
|
scale: G(),
|
|
275
|
-
sepia:
|
|
275
|
+
sepia: x(),
|
|
276
276
|
skew: G(),
|
|
277
277
|
space: l(),
|
|
278
278
|
translate: l()
|
|
@@ -527,14 +527,14 @@ const v = (e) => {
|
|
|
527
527
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
528
528
|
*/
|
|
529
529
|
grow: [{
|
|
530
|
-
grow:
|
|
530
|
+
grow: x()
|
|
531
531
|
}],
|
|
532
532
|
/**
|
|
533
533
|
* Flex Shrink
|
|
534
534
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
535
535
|
*/
|
|
536
536
|
shrink: [{
|
|
537
|
-
shrink:
|
|
537
|
+
shrink: x()
|
|
538
538
|
}],
|
|
539
539
|
/**
|
|
540
540
|
* Order
|
|
@@ -650,7 +650,7 @@ const v = (e) => {
|
|
|
650
650
|
* @see https://tailwindcss.com/docs/justify-content
|
|
651
651
|
*/
|
|
652
652
|
"justify-content": [{
|
|
653
|
-
justify: ["normal", ...
|
|
653
|
+
justify: ["normal", ...v()]
|
|
654
654
|
}],
|
|
655
655
|
/**
|
|
656
656
|
* Justify Items
|
|
@@ -671,7 +671,7 @@ const v = (e) => {
|
|
|
671
671
|
* @see https://tailwindcss.com/docs/align-content
|
|
672
672
|
*/
|
|
673
673
|
"align-content": [{
|
|
674
|
-
content: ["normal", ...
|
|
674
|
+
content: ["normal", ...v(), "baseline"]
|
|
675
675
|
}],
|
|
676
676
|
/**
|
|
677
677
|
* Align Items
|
|
@@ -692,7 +692,7 @@ const v = (e) => {
|
|
|
692
692
|
* @see https://tailwindcss.com/docs/place-content
|
|
693
693
|
*/
|
|
694
694
|
"place-content": [{
|
|
695
|
-
"place-content": [...
|
|
695
|
+
"place-content": [...v(), "baseline"]
|
|
696
696
|
}],
|
|
697
697
|
/**
|
|
698
698
|
* Place Items
|
|
@@ -2314,14 +2314,14 @@ var ir = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, Ce = (e) =>
|
|
|
2314
2314
|
let O = (l, p, d = [], g) => {
|
|
2315
2315
|
let f = d;
|
|
2316
2316
|
if (typeof p == "string") f = f.concat(de(p).split(" ").map((y) => `${l}:${y}`));
|
|
2317
|
-
else if (Array.isArray(p)) f = f.concat(p.reduce((y,
|
|
2317
|
+
else if (Array.isArray(p)) f = f.concat(p.reduce((y, v) => y.concat(`${l}:${v}`), []));
|
|
2318
2318
|
else if (typeof p == "object" && typeof g == "string") {
|
|
2319
2319
|
for (let y in p) if (p.hasOwnProperty(y) && y === g) {
|
|
2320
|
-
let
|
|
2321
|
-
if (
|
|
2322
|
-
let
|
|
2323
|
-
f[g] ? f[g] = f[g].concat(
|
|
2324
|
-
} else Array.isArray(
|
|
2320
|
+
let v = p[y];
|
|
2321
|
+
if (v && typeof v == "string") {
|
|
2322
|
+
let x = de(v);
|
|
2323
|
+
f[g] ? f[g] = f[g].concat(x.split(" ").map((z) => `${l}:${z}`)) : f[g] = x.split(" ").map((z) => `${l}:${z}`);
|
|
2324
|
+
} else Array.isArray(v) && v.length > 0 && (f[g] = v.reduce((x, z) => x.concat(`${l}:${z}`), []));
|
|
2325
2325
|
}
|
|
2326
2326
|
}
|
|
2327
2327
|
return f;
|
|
@@ -2329,10 +2329,10 @@ var ir = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, Ce = (e) =>
|
|
|
2329
2329
|
var f;
|
|
2330
2330
|
let y = p[l];
|
|
2331
2331
|
if (!y || P(y)) return null;
|
|
2332
|
-
let
|
|
2333
|
-
if (
|
|
2334
|
-
let
|
|
2335
|
-
if (typeof
|
|
2332
|
+
let v = (f = g == null ? void 0 : g[l]) != null ? f : h == null ? void 0 : h[l];
|
|
2333
|
+
if (v === null) return null;
|
|
2334
|
+
let x = ce(v), z = Array.isArray(u.responsiveVariants) && u.responsiveVariants.length > 0 || u.responsiveVariants === !0, G = S == null ? void 0 : S[l], I = [];
|
|
2335
|
+
if (typeof x == "object" && z) for (let [ee, ae] of Object.entries(x)) {
|
|
2336
2336
|
let ze = y[ae];
|
|
2337
2337
|
if (ee === "initial") {
|
|
2338
2338
|
G = ae;
|
|
@@ -2340,7 +2340,7 @@ var ir = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, Ce = (e) =>
|
|
|
2340
2340
|
}
|
|
2341
2341
|
Array.isArray(u.responsiveVariants) && !u.responsiveVariants.includes(ee) || (I = O(ee, ze, I, d));
|
|
2342
2342
|
}
|
|
2343
|
-
let Ae =
|
|
2343
|
+
let Ae = x != null && typeof x != "object" ? x : ce(G), D = y[Ae || "false"];
|
|
2344
2344
|
return typeof I == "object" && typeof d == "string" && I[d] ? fe(I, D) : I.length > 0 ? (I.push(D), I) : D;
|
|
2345
2345
|
}, L = () => m ? Object.keys(m).map((l) => V(l, m)) : null, Y = (l, p) => {
|
|
2346
2346
|
if (!m || typeof m != "object") return null;
|
|
@@ -2359,20 +2359,20 @@ var ir = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, Ce = (e) =>
|
|
|
2359
2359
|
}, W = (l = [], p) => {
|
|
2360
2360
|
let d = [];
|
|
2361
2361
|
for (let { class: g, className: f, ...y } of l) {
|
|
2362
|
-
let
|
|
2363
|
-
for (let [
|
|
2364
|
-
let G = F(
|
|
2362
|
+
let v = !0;
|
|
2363
|
+
for (let [x, z] of Object.entries(y)) {
|
|
2364
|
+
let G = F(x, p);
|
|
2365
2365
|
if (Array.isArray(z)) {
|
|
2366
|
-
if (!z.includes(G[
|
|
2367
|
-
|
|
2366
|
+
if (!z.includes(G[x])) {
|
|
2367
|
+
v = !1;
|
|
2368
2368
|
break;
|
|
2369
2369
|
}
|
|
2370
|
-
} else if (G[
|
|
2371
|
-
|
|
2370
|
+
} else if (G[x] !== z) {
|
|
2371
|
+
v = !1;
|
|
2372
2372
|
break;
|
|
2373
2373
|
}
|
|
2374
2374
|
}
|
|
2375
|
-
|
|
2375
|
+
v && (g && d.push(g), f && d.push(f));
|
|
2376
2376
|
}
|
|
2377
2377
|
return d;
|
|
2378
2378
|
}, J = (l) => {
|
|
@@ -2386,17 +2386,17 @@ var ir = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, Ce = (e) =>
|
|
|
2386
2386
|
let p = {};
|
|
2387
2387
|
for (let { slots: d = [], class: g, className: f, ...y } of i) {
|
|
2388
2388
|
if (!P(y)) {
|
|
2389
|
-
let
|
|
2390
|
-
for (let
|
|
2391
|
-
let z = F(
|
|
2392
|
-
if (z === void 0 || (Array.isArray(y[
|
|
2393
|
-
|
|
2389
|
+
let v = !0;
|
|
2390
|
+
for (let x of Object.keys(y)) {
|
|
2391
|
+
let z = F(x, l)[x];
|
|
2392
|
+
if (z === void 0 || (Array.isArray(y[x]) ? !y[x].includes(z) : y[x] !== z)) {
|
|
2393
|
+
v = !1;
|
|
2394
2394
|
break;
|
|
2395
2395
|
}
|
|
2396
2396
|
}
|
|
2397
|
-
if (!
|
|
2397
|
+
if (!v) continue;
|
|
2398
2398
|
}
|
|
2399
|
-
for (let
|
|
2399
|
+
for (let v of d) p[v] = p[v] || [], p[v].push([g, f]);
|
|
2400
2400
|
}
|
|
2401
2401
|
return p;
|
|
2402
2402
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,8 @@ export type { ErrorTextProps } from './error-text/types.js';
|
|
|
28
28
|
export { FileUpload, type FileUploadProps } from './file-upload/file-upload.js';
|
|
29
29
|
export { Footer, type FooterProps } from './footer/footer.js';
|
|
30
30
|
export { FormFieldWithTag, type FormFieldWithTagProps, } from './forms/form-field-with-tag/form-field-with-tag.js';
|
|
31
|
-
export { FormField,
|
|
31
|
+
export { FormField, FormFieldError, FormFieldHint, FormFieldLabel, } from './forms/form-field/form-field.js';
|
|
32
|
+
export type { FormFieldProps } from './forms/form-field/types.js';
|
|
32
33
|
export { Form } from './forms/form.js';
|
|
33
34
|
export { HeaderSearch, type HeaderSearchProps, } from './header/components/header-search.js';
|
|
34
35
|
export { Header } from './header/header.js';
|
|
@@ -72,6 +73,7 @@ export { ScoreSelect } from './score-select/score-select.js';
|
|
|
72
73
|
export type { ScoreSelectProps } from './score-select/type.js';
|
|
73
74
|
export { SectionBreak, type SectionBreakProps, } from './section-break/section-break.js';
|
|
74
75
|
export { Select, SelectGroupItem, SelectItem } from './select/select.js';
|
|
76
|
+
export { SelectNext, SelectGroupItemNext, SelectItemNext, } from './select/select-next.js';
|
|
75
77
|
export type { SelectGroupItemProps, SelectMenuOptionProps, SelectMenuProps, SelectNextGroupProps, SelectNextOptionProps, SelectNextProps, } from './select/types.js';
|
|
76
78
|
export { SideNav, SideNavItem } from './side-nav/side-nav.js';
|
|
77
79
|
export type { SideNavItemProps, SideNavProps } from './side-nav/types.js';
|