@ogcio/design-system-react 1.29.0 → 1.31.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/README.md +11 -33
- package/dist/alert/variants.d.ts +78 -2
- package/dist/atoms/DsButton.d.ts +194 -0
- package/dist/atoms/DsButton.js +330 -0
- package/dist/atoms/InsetText.d.ts +14 -0
- package/dist/atoms/InsetText.js +17 -0
- package/dist/atoms/icons/Close.d.ts +3 -0
- package/dist/atoms/icons/Close.js +23 -0
- package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowDown.js +23 -0
- package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowUp.js +23 -0
- package/dist/atoms/icons/Visibility.d.ts +3 -0
- package/dist/atoms/icons/Visibility.js +23 -0
- package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
- package/dist/atoms/icons/VisibilityOff.js +23 -0
- package/dist/atoms/icons/index.d.ts +6 -0
- package/dist/atoms/icons/index.js +12 -0
- package/dist/atoms/icons/logos/LogoBlack.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoBlack.js +327 -0
- package/dist/atoms/icons/logos/LogoGoldGreen.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoGoldGreen.js +327 -0
- package/dist/atoms/icons/logos/LogoGoldWhite.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoGoldWhite.js +87 -0
- package/dist/atoms/icons/logos/LogoHarpBlack.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoHarpBlack.js +68 -0
- package/dist/atoms/icons/logos/LogoHarpWhite.d.ts +3 -0
- package/dist/{assets/logos/LogoHarpBlack.js → atoms/icons/logos/LogoHarpWhite.js} +33 -31
- package/dist/atoms/icons/logos/LogoWhite.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoWhite.js +327 -0
- package/dist/atoms/icons/logos/index.d.ts +6 -0
- package/dist/atoms/icons/logos/index.js +14 -0
- package/dist/atoms/icons/types.d.ts +10 -0
- package/dist/atoms/icons/types.js +1 -0
- package/dist/atoms/index.d.ts +3 -0
- package/dist/atoms/index.js +16 -0
- package/dist/autocomplete/autocomplete.js +131 -115
- package/dist/blockquote/blockquote.d.ts +4 -1
- package/dist/blockquote/blockquote.js +18 -4
- package/dist/breadcrumbs/breadcrumbs.js +54 -33
- package/dist/button-group/button-group.js +31 -28
- package/dist/character-count/character-count.js +5 -5
- package/dist/chip/chip.js +41 -19
- package/dist/combo-box/combo-box.js +6 -13
- package/dist/combo-box/dropdown-item.js +39 -40
- package/dist/cookie-banner/cookie-banner.js +28 -20
- package/dist/data-table/data-table-footer.js +57 -51
- package/dist/data-table/data-table-header.d.ts +7 -7
- package/dist/data-table/data-table-header.js +97 -110
- package/dist/data-table/data-table-selected-rows.d.ts +1 -0
- package/dist/data-table/data-table-selected-rows.js +15 -19
- package/dist/details/details.js +43 -23
- package/dist/drawer/drawer.js +35 -32
- package/dist/footer/footer.js +54 -46
- package/dist/forms/form-field/form-field.d.ts +2 -2
- package/dist/forms/form-field/form-field.js +40 -30
- package/dist/forms/form-field/types.d.ts +10 -3
- package/dist/header/components/header-slot.js +33 -32
- package/dist/header/header-legacy.js +8 -8
- package/dist/header/variants.d.ts +220 -20
- package/dist/heading/heading.d.ts +70 -2
- package/dist/hooks/use-aria-hider.d.ts +1 -1
- package/dist/hooks/use-aria-hider.js +14 -13
- package/dist/hooks/use-breakpoint.js +15 -12
- package/dist/hooks/use-focus-trap.d.ts +1 -1
- package/dist/hooks/use-focus-trap.js +179 -179
- package/dist/icon/icon.d.ts +10 -0
- package/dist/icon/icon.js +64 -52
- package/dist/icon/icons.d.ts +1 -1
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +144 -142
- package/dist/input-file/input-file.js +15 -12
- package/dist/input-password/input-password.js +13 -12
- package/dist/input-text/input-text.js +18 -16
- package/dist/label/label.d.ts +43 -0
- package/dist/label/label.js +7 -6
- package/dist/logos/index.d.ts +1 -0
- package/dist/logos/index.js +14 -0
- package/dist/modal/modal.js +125 -127
- package/dist/popover/popover.js +67 -64
- package/dist/score-select/score-select.js +20 -20
- package/dist/select/select-next.js +45 -45
- package/dist/spinner/spinner.d.ts +30 -2
- package/dist/styles.css +12 -2
- package/dist/table/table-row.js +14 -7
- package/dist/table/table.d.ts +22 -2
- package/dist/tabs/tab-item.d.ts +2 -2
- package/dist/tabs/tab-panel.js +6 -6
- package/dist/tabs/tabs.js +19 -19
- package/dist/text-input/text-input.d.ts +1 -1
- package/dist/textarea/textarea.js +27 -28
- package/dist/toast/ds-toast.d.ts +78 -2
- package/fonts.css +10 -0
- package/package.json +17 -12
- package/dist/assets/logos/LogoBlack.d.ts +0 -3
- package/dist/assets/logos/LogoBlack.js +0 -322
- package/dist/assets/logos/LogoGoldGreen.d.ts +0 -3
- package/dist/assets/logos/LogoGoldGreen.js +0 -322
- package/dist/assets/logos/LogoGoldWhite.d.ts +0 -3
- package/dist/assets/logos/LogoGoldWhite.js +0 -82
- package/dist/assets/logos/LogoHarpBlack.d.ts +0 -3
- package/dist/assets/logos/LogoHarpWhite.d.ts +0 -3
- package/dist/assets/logos/LogoHarpWhite.js +0 -60
- package/dist/assets/logos/LogoWhite.d.ts +0 -3
- package/dist/assets/logos/LogoWhite.js +0 -322
- package/dist/assets/logos/index.d.ts +0 -6
- package/dist/assets/logos/index.js +0 -14
|
@@ -1,83 +1,67 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as z, jsx as
|
|
3
|
-
import { forwardRef as J, useRef as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { jsxs as z, jsx as y } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as J, useRef as D, useImperativeHandle as Q, useEffect as W, useCallback as P, createElement as Y, Children as Z, isValidElement as ee } from "react";
|
|
4
|
+
import { c as te } from "../index-CB-zPpNk.js";
|
|
5
|
+
import { cn as oe } from "../cn.js";
|
|
6
|
+
import { useDomId as ne } from "../hooks/use-dom-id.js";
|
|
6
7
|
import { translate as G } from "../i18n/utility.js";
|
|
7
|
-
import { InputText as
|
|
8
|
-
import { Popover as
|
|
9
|
-
import { SelectMenu as
|
|
10
|
-
import { cycleEnabledIndex as
|
|
11
|
-
import { AUTOCOMPLETE_ACTIONS as
|
|
12
|
-
import { useAutocompleteController as
|
|
8
|
+
import { InputText as re } from "../input-text/input-text.js";
|
|
9
|
+
import { Popover as ae } from "../popover/popover.js";
|
|
10
|
+
import { SelectMenu as le, SelectMenuOption as L, SelectMenuGroupItem as pe } from "../select/select-menu.js";
|
|
11
|
+
import { cycleEnabledIndex as ie } from "../utilities.js";
|
|
12
|
+
import { AUTOCOMPLETE_ACTIONS as se } from "./types.js";
|
|
13
|
+
import { useAutocompleteController as ce } from "./use-autocomplete-controller.js";
|
|
13
14
|
const {
|
|
14
|
-
ON_RESET:
|
|
15
|
-
ON_SELECT_ITEM:
|
|
15
|
+
ON_RESET: ue,
|
|
16
|
+
ON_SELECT_ITEM: de,
|
|
16
17
|
SET_INPUT_VALUE: R,
|
|
17
18
|
SET_IS_OPEN: i,
|
|
18
|
-
TOGGLE_CLEAR_BUTTON:
|
|
19
|
-
SET_HIGHLIGHTED_INDEX:
|
|
20
|
-
SET_VALUE:
|
|
21
|
-
} =
|
|
22
|
-
a
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
}, fe = (a, r) => (p) => {
|
|
30
|
-
a && a({
|
|
31
|
-
target: { name: r, value: p },
|
|
32
|
-
currentTarget: { name: r, value: p },
|
|
33
|
-
type: "blur",
|
|
34
|
-
bubbles: !0,
|
|
35
|
-
isTrusted: !0
|
|
36
|
-
});
|
|
37
|
-
}, ke = J(
|
|
38
|
-
(a, r) => {
|
|
39
|
-
var x;
|
|
40
|
-
const p = N(null), {
|
|
41
|
-
disabled: l,
|
|
42
|
-
children: c,
|
|
43
|
-
placeholder: y,
|
|
19
|
+
TOGGLE_CLEAR_BUTTON: S,
|
|
20
|
+
SET_HIGHLIGHTED_INDEX: me,
|
|
21
|
+
SET_VALUE: fe
|
|
22
|
+
} = se, Pe = J(
|
|
23
|
+
(r, a) => {
|
|
24
|
+
var k;
|
|
25
|
+
const l = D(null), {
|
|
26
|
+
disabled: p = !1,
|
|
27
|
+
children: s,
|
|
28
|
+
placeholder: h,
|
|
44
29
|
onSelectItem: m,
|
|
45
30
|
isLoading: g,
|
|
46
|
-
freeSolo:
|
|
31
|
+
freeSolo: c = !1,
|
|
47
32
|
onChange: b,
|
|
48
33
|
onBlur: B,
|
|
49
34
|
name: u,
|
|
50
35
|
value: E,
|
|
51
36
|
id: M
|
|
52
|
-
} =
|
|
37
|
+
} = r, v = D(!1), C = be({ freeSolo: c, disabled: p }), {
|
|
53
38
|
state: t,
|
|
54
39
|
dispatch: o,
|
|
55
40
|
inputRef: f,
|
|
56
|
-
getOptionLabelByValue:
|
|
57
|
-
listRef:
|
|
58
|
-
debouncedFilter: U
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
...a,
|
|
41
|
+
getOptionLabelByValue: A,
|
|
42
|
+
listRef: _,
|
|
43
|
+
debouncedFilter: U
|
|
44
|
+
} = ce({
|
|
45
|
+
...r,
|
|
62
46
|
onChange: T(b, u)
|
|
63
|
-
}),
|
|
64
|
-
Q(
|
|
65
|
-
E !== void 0 && (o({ type:
|
|
47
|
+
}), w = ne();
|
|
48
|
+
Q(a, () => f.current), W(() => {
|
|
49
|
+
E !== void 0 && (o({ type: fe, payload: E }), o({
|
|
66
50
|
type: R,
|
|
67
|
-
payload:
|
|
68
|
-
}), o({ type:
|
|
51
|
+
payload: A(s, E)
|
|
52
|
+
}), o({ type: S }));
|
|
69
53
|
}, [E]);
|
|
70
|
-
const
|
|
71
|
-
o({ type: i, payload: e }), e || o({ type:
|
|
54
|
+
const x = r["aria-label"] ?? G("autocomplete.placeholder", { defaultValue: "Type to Search" }), V = (e) => {
|
|
55
|
+
o({ type: i, payload: e }), e || o({ type: S, payload: !1 });
|
|
72
56
|
}, H = () => {
|
|
73
|
-
o({ type:
|
|
57
|
+
o({ type: ue }), o({ type: i, payload: !1 }), T(b, u)("");
|
|
74
58
|
}, j = (e) => {
|
|
75
|
-
o({ type: R, payload: e }),
|
|
59
|
+
o({ type: R, payload: e }), c && T(b, u)(e), e && o({ type: i, payload: !0 }), U(e);
|
|
76
60
|
}, $ = (e) => {
|
|
77
61
|
const {
|
|
78
62
|
target: { value: n }
|
|
79
63
|
} = e;
|
|
80
|
-
e.__origin === "clear_button" && H(), !/^\s/.test(n) && (j(n), o({ type:
|
|
64
|
+
e.__origin === "clear_button" && H(), !/^\s/.test(n) && (j(n), o({ type: S }), setTimeout(() => {
|
|
81
65
|
var d;
|
|
82
66
|
return (d = f.current) == null ? void 0 : d.focus();
|
|
83
67
|
}));
|
|
@@ -89,12 +73,12 @@ const {
|
|
|
89
73
|
type: i,
|
|
90
74
|
payload: !0
|
|
91
75
|
});
|
|
92
|
-
}, I =
|
|
76
|
+
}, I = P(
|
|
93
77
|
(e) => {
|
|
94
78
|
o({
|
|
95
|
-
type:
|
|
79
|
+
type: de,
|
|
96
80
|
payload: {
|
|
97
|
-
inputValue:
|
|
81
|
+
inputValue: A(s, e),
|
|
98
82
|
value: e
|
|
99
83
|
}
|
|
100
84
|
}), T(b, u)(e), setTimeout(() => {
|
|
@@ -102,28 +86,28 @@ const {
|
|
|
102
86
|
(n = f.current) == null || n.focus();
|
|
103
87
|
}, 0), m == null || m(e);
|
|
104
88
|
},
|
|
105
|
-
[
|
|
89
|
+
[s, o, u, b, m]
|
|
106
90
|
), X = (e) => {
|
|
107
|
-
var O,
|
|
91
|
+
var O, N;
|
|
108
92
|
const { relatedTarget: n } = e;
|
|
109
|
-
if (n && ((O =
|
|
93
|
+
if (n && ((O = _.current) != null && O.contains(n) || (N = l.current) != null && N.contains(n)) || v.current) {
|
|
110
94
|
setTimeout(() => v.current = !1, 0);
|
|
111
95
|
return;
|
|
112
96
|
}
|
|
113
97
|
const d = t.value ?? t.inputValue ?? "";
|
|
114
|
-
|
|
115
|
-
}, q =
|
|
98
|
+
Ie(B, u)(d);
|
|
99
|
+
}, q = P(
|
|
116
100
|
(e) => {
|
|
117
101
|
switch (e.key) {
|
|
118
102
|
case "ArrowDown":
|
|
119
103
|
case "ArrowUp": {
|
|
120
104
|
e.preventDefault();
|
|
121
|
-
const n = () => t.highlightedIndex === -1 ? d === -1 ? 0 : -1 : t.highlightedIndex, d = e.key === "ArrowDown" ? 1 : -1, O =
|
|
105
|
+
const n = () => t.highlightedIndex === -1 ? d === -1 ? 0 : -1 : t.highlightedIndex, d = e.key === "ArrowDown" ? 1 : -1, O = ie(
|
|
122
106
|
t.autocompleteOptions,
|
|
123
107
|
n(),
|
|
124
108
|
d
|
|
125
109
|
);
|
|
126
|
-
o({ type:
|
|
110
|
+
o({ type: me, payload: O }), o({ type: i, payload: !0 });
|
|
127
111
|
break;
|
|
128
112
|
}
|
|
129
113
|
case "Enter":
|
|
@@ -149,12 +133,12 @@ const {
|
|
|
149
133
|
return /* @__PURE__ */ z(
|
|
150
134
|
"div",
|
|
151
135
|
{
|
|
152
|
-
"aria-disabled":
|
|
153
|
-
className:
|
|
136
|
+
"aria-disabled": p,
|
|
137
|
+
className: oe(C.root(), r.className),
|
|
154
138
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
|
|
139
|
+
/* @__PURE__ */ y("span", { id: w, className: "gi-sr-only", children: x }),
|
|
140
|
+
/* @__PURE__ */ y(
|
|
141
|
+
re,
|
|
158
142
|
{
|
|
159
143
|
autoComplete: "off",
|
|
160
144
|
id: M,
|
|
@@ -166,28 +150,25 @@ const {
|
|
|
166
150
|
onBlur: X,
|
|
167
151
|
clearButtonEnabled: t.isClearButtonEnabled,
|
|
168
152
|
inputActionPosition: "beforeSuffix",
|
|
169
|
-
"aria-label":
|
|
170
|
-
"aria-labelledby":
|
|
171
|
-
"aria-disabled":
|
|
172
|
-
disabled:
|
|
173
|
-
placeholder:
|
|
174
|
-
iconEndClassName:
|
|
175
|
-
|
|
176
|
-
"gi-cursor-not-allowed gi-pointer-events-none": l && !s
|
|
177
|
-
}),
|
|
178
|
-
iconEnd: s ? void 0 : me(t.isOpen),
|
|
153
|
+
"aria-label": x,
|
|
154
|
+
"aria-labelledby": w,
|
|
155
|
+
"aria-disabled": p,
|
|
156
|
+
disabled: p,
|
|
157
|
+
placeholder: h ?? G("autocomplete.placeholder", { defaultValue: "Type to Search" }),
|
|
158
|
+
iconEndClassName: C.iconEnd(),
|
|
159
|
+
iconEnd: c ? void 0 : Ee(t.isOpen),
|
|
179
160
|
ref: f,
|
|
180
|
-
iconEndRef:
|
|
161
|
+
iconEndRef: l,
|
|
181
162
|
value: t.inputValue,
|
|
182
163
|
"data-highlighted-index": t.highlightedIndex
|
|
183
164
|
}
|
|
184
165
|
),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
|
|
166
|
+
/* @__PURE__ */ y(
|
|
167
|
+
ae,
|
|
187
168
|
{
|
|
188
169
|
onOpenChange: V,
|
|
189
170
|
triggerRef: f,
|
|
190
|
-
extraRefs: [
|
|
171
|
+
extraRefs: [l],
|
|
191
172
|
open: t.isOpen,
|
|
192
173
|
maxHeight: 304,
|
|
193
174
|
options: {
|
|
@@ -201,14 +182,14 @@ const {
|
|
|
201
182
|
}
|
|
202
183
|
]
|
|
203
184
|
},
|
|
204
|
-
children: /* @__PURE__ */
|
|
205
|
-
|
|
185
|
+
children: /* @__PURE__ */ y(
|
|
186
|
+
le,
|
|
206
187
|
{
|
|
207
188
|
onChange: I,
|
|
208
189
|
isLoading: g,
|
|
209
|
-
showNoData: !((
|
|
210
|
-
ref:
|
|
211
|
-
children:
|
|
190
|
+
showNoData: !((k = t.autocompleteOptions) != null && k.length),
|
|
191
|
+
ref: _,
|
|
192
|
+
children: ye(
|
|
212
193
|
t.autocompleteOptions,
|
|
213
194
|
t,
|
|
214
195
|
I
|
|
@@ -221,44 +202,44 @@ const {
|
|
|
221
202
|
}
|
|
222
203
|
);
|
|
223
204
|
}
|
|
224
|
-
),
|
|
225
|
-
if (
|
|
205
|
+
), ye = (r, a, l) => r.map((p, s) => {
|
|
206
|
+
if (a.optionType === "AutocompleteItem")
|
|
226
207
|
return /* @__PURE__ */ Y(
|
|
227
208
|
L,
|
|
228
209
|
{
|
|
229
|
-
...
|
|
230
|
-
key: `AutocompleteItem-${
|
|
231
|
-
selected:
|
|
232
|
-
isHighlighted:
|
|
233
|
-
index:
|
|
210
|
+
...p.props,
|
|
211
|
+
key: `AutocompleteItem-${p.props.value}`,
|
|
212
|
+
selected: a.value === p.props.value,
|
|
213
|
+
isHighlighted: s === a.highlightedIndex,
|
|
214
|
+
index: s
|
|
234
215
|
}
|
|
235
216
|
);
|
|
236
|
-
if (
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
return /* @__PURE__ */
|
|
217
|
+
if (a.optionType === "AutocompleteGroupItem") {
|
|
218
|
+
const h = p, m = Z.toArray(h.props.children).filter((g) => ee(g)).map((g) => {
|
|
219
|
+
const c = g.props;
|
|
220
|
+
return /* @__PURE__ */ y(
|
|
240
221
|
L,
|
|
241
222
|
{
|
|
242
|
-
...
|
|
243
|
-
selected:
|
|
244
|
-
onChange:
|
|
245
|
-
index:
|
|
223
|
+
...c,
|
|
224
|
+
selected: a.value.toString() === c.value.toString(),
|
|
225
|
+
onChange: l,
|
|
226
|
+
index: s
|
|
246
227
|
},
|
|
247
|
-
`SelectGroupItemNext-SelectItemNext-${
|
|
228
|
+
`SelectGroupItemNext-SelectItemNext-${c.value.toString()}`
|
|
248
229
|
);
|
|
249
230
|
});
|
|
250
|
-
return /* @__PURE__ */
|
|
251
|
-
|
|
231
|
+
return /* @__PURE__ */ y(
|
|
232
|
+
pe,
|
|
252
233
|
{
|
|
253
|
-
label:
|
|
234
|
+
label: h.props.label,
|
|
254
235
|
children: m
|
|
255
236
|
},
|
|
256
|
-
`Group-${
|
|
237
|
+
`Group-${h.props.label}`
|
|
257
238
|
);
|
|
258
239
|
}
|
|
259
240
|
return null;
|
|
260
|
-
}),
|
|
261
|
-
Object.defineProperty(
|
|
241
|
+
}), he = () => null;
|
|
242
|
+
Object.defineProperty(he, "componentType", {
|
|
262
243
|
value: "AutocompleteItem",
|
|
263
244
|
writable: !1,
|
|
264
245
|
enumerable: !1
|
|
@@ -269,9 +250,44 @@ Object.defineProperty(ge, "componentType", {
|
|
|
269
250
|
writable: !1,
|
|
270
251
|
enumerable: !1
|
|
271
252
|
});
|
|
253
|
+
const be = te({
|
|
254
|
+
slots: {
|
|
255
|
+
root: "gi-relative gi-w-full gi-not-prose",
|
|
256
|
+
iconEnd: ""
|
|
257
|
+
},
|
|
258
|
+
variants: {
|
|
259
|
+
freeSolo: {
|
|
260
|
+
true: {},
|
|
261
|
+
false: {
|
|
262
|
+
iconEnd: "gi-cursor-pointer"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
disabled: {
|
|
266
|
+
true: {
|
|
267
|
+
iconEnd: "gi-cursor-not-allowed gi-pointer-events-none"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}), Ee = (r) => r ? "keyboard_arrow_up" : "keyboard_arrow_down", T = (r, a) => (l) => {
|
|
272
|
+
r == null || r({
|
|
273
|
+
target: { name: a, value: l },
|
|
274
|
+
currentTarget: { name: a, value: l },
|
|
275
|
+
type: "change",
|
|
276
|
+
bubbles: !0,
|
|
277
|
+
isTrusted: !0
|
|
278
|
+
});
|
|
279
|
+
}, Ie = (r, a) => (l) => {
|
|
280
|
+
r && r({
|
|
281
|
+
target: { name: a, value: l },
|
|
282
|
+
currentTarget: { name: a, value: l },
|
|
283
|
+
type: "blur",
|
|
284
|
+
bubbles: !0,
|
|
285
|
+
isTrusted: !0
|
|
286
|
+
});
|
|
287
|
+
};
|
|
272
288
|
export {
|
|
273
|
-
|
|
289
|
+
Pe as Autocomplete,
|
|
274
290
|
ge as AutocompleteGroupItem,
|
|
275
|
-
|
|
276
|
-
|
|
291
|
+
he as AutocompleteItem,
|
|
292
|
+
ye as renderSelectMenuOptions
|
|
277
293
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export type BlockquoteProps = React.QuoteHTMLAttributes<HTMLQuoteElement>;
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `InsetText` instead. `Blockquote` is kept as an alias for backward compatibility.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Blockquote(props: BlockquoteProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import s from "../atoms/InsetText.js";
|
|
3
|
+
const a = ({
|
|
4
|
+
id: e,
|
|
5
|
+
cite: r,
|
|
6
|
+
children: t,
|
|
7
|
+
"aria-describedby": o,
|
|
8
|
+
"aria-labelledby": i
|
|
9
|
+
}) => ({
|
|
10
|
+
id: e,
|
|
11
|
+
cite: r,
|
|
12
|
+
children: t,
|
|
13
|
+
describedBy: o,
|
|
14
|
+
labelledBy: i
|
|
15
|
+
});
|
|
16
|
+
function n(e) {
|
|
17
|
+
return /* @__PURE__ */ l(s, { ...a(e) });
|
|
4
18
|
}
|
|
5
19
|
export {
|
|
6
|
-
|
|
20
|
+
n as Blockquote
|
|
7
21
|
};
|
|
@@ -1,44 +1,65 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { translate as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Link as
|
|
5
|
-
const
|
|
6
|
-
href:
|
|
7
|
-
children:
|
|
8
|
-
asChild:
|
|
9
|
-
...
|
|
10
|
-
}) => /* @__PURE__ */
|
|
11
|
-
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { translate as m } from "../i18n/utility.js";
|
|
3
|
+
import { Icon as n } from "../icon/icon.js";
|
|
4
|
+
import { Link as c } from "../link/link.js";
|
|
5
|
+
const f = () => /* @__PURE__ */ e("div", { "aria-hidden": "true", children: /* @__PURE__ */ e(n, { className: "gi-text-gray-700", icon: "more_horiz" }) }), o = ({
|
|
6
|
+
href: r,
|
|
7
|
+
children: i,
|
|
8
|
+
asChild: a,
|
|
9
|
+
...s
|
|
10
|
+
}) => /* @__PURE__ */ e(
|
|
11
|
+
c,
|
|
12
12
|
{
|
|
13
13
|
noColor: !0,
|
|
14
|
-
asChild:
|
|
15
|
-
href:
|
|
16
|
-
"aria-label": `${
|
|
14
|
+
asChild: a,
|
|
15
|
+
href: r,
|
|
16
|
+
"aria-label": `${i} page`,
|
|
17
17
|
size: "sm",
|
|
18
|
-
className: "gi-
|
|
19
|
-
...
|
|
20
|
-
children:
|
|
18
|
+
className: "gi-text-ellipsis gi-whitespace-nowrap gi-line-clamp-1",
|
|
19
|
+
...s,
|
|
20
|
+
children: i
|
|
21
21
|
}
|
|
22
|
-
),
|
|
23
|
-
const
|
|
24
|
-
return /* @__PURE__ */
|
|
22
|
+
), x = (r) => /* @__PURE__ */ e(o, { ...r, "aria-current": "page" }), g = () => /* @__PURE__ */ e("span", { className: "gi-px-3 gi-text-gray-500", children: "/" }), h = ({ children: r, iconStart: i }) => {
|
|
23
|
+
const a = Array.isArray(r) ? r : [r];
|
|
24
|
+
return /* @__PURE__ */ e(
|
|
25
25
|
"nav",
|
|
26
26
|
{
|
|
27
|
-
"aria-label":
|
|
28
|
-
className: "gi-
|
|
29
|
-
children: /* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
"aria-label": m("breadcrumbs.breadcrumbs", { defaultValue: "Breadcrumbs" }),
|
|
28
|
+
className: "gi-flex gi-items-center gi-gap-1",
|
|
29
|
+
children: /* @__PURE__ */ t(
|
|
30
|
+
"ol",
|
|
31
|
+
{
|
|
32
|
+
role: "list",
|
|
33
|
+
className: `
|
|
34
|
+
gi-flex
|
|
35
|
+
gi-list-none
|
|
36
|
+
gi-flex-wrap
|
|
37
|
+
[&>li]:gi-flex
|
|
38
|
+
[&>li]:gi-items-center
|
|
39
|
+
`,
|
|
40
|
+
children: [
|
|
41
|
+
i && /* @__PURE__ */ e("li", { role: "listitem", className: "gi-pr-1", children: /* @__PURE__ */ e(n, { "aria-label": "chevron-left", icon: "chevron_left", size: "sm" }) }),
|
|
42
|
+
a.map((s, l) => /* @__PURE__ */ t(
|
|
43
|
+
"li",
|
|
44
|
+
{
|
|
45
|
+
className: "gi-mx-0",
|
|
46
|
+
role: "listitem",
|
|
47
|
+
children: [
|
|
48
|
+
s,
|
|
49
|
+
l < a.length - 1 && /* @__PURE__ */ e(g, {})
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
`breadcrumb_item_${l}`
|
|
53
|
+
))
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
)
|
|
36
57
|
}
|
|
37
58
|
);
|
|
38
59
|
};
|
|
39
60
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
61
|
+
x as BreadcrumbCurrentLink,
|
|
62
|
+
f as BreadcrumbEllipsis,
|
|
63
|
+
o as BreadcrumbLink,
|
|
64
|
+
h as Breadcrumbs
|
|
44
65
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { createContext as G, useState as V, useEffect as k, useContext as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { useDomId as
|
|
7
|
-
const
|
|
2
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as G, useState as V, useEffect as k, useContext as w } from "react";
|
|
4
|
+
import { Button as S } from "../button/button.js";
|
|
5
|
+
import { cn as g } from "../cn.js";
|
|
6
|
+
import { useDomId as j } from "../hooks/use-dom-id.js";
|
|
7
|
+
const I = G(
|
|
8
8
|
void 0
|
|
9
|
-
),
|
|
9
|
+
), D = ({
|
|
10
10
|
value: r,
|
|
11
|
-
children:
|
|
12
|
-
role:
|
|
11
|
+
children: s,
|
|
12
|
+
role: d,
|
|
13
13
|
"aria-checked": e,
|
|
14
14
|
"aria-label": a,
|
|
15
15
|
...t
|
|
16
16
|
}) => {
|
|
17
|
-
const c =
|
|
17
|
+
const c = w(I);
|
|
18
18
|
if (!c)
|
|
19
19
|
throw new Error("ButtonGroupItem must be used within a ButtonGroup");
|
|
20
20
|
const {
|
|
@@ -27,26 +27,26 @@ const x = G(
|
|
|
27
27
|
} = c, i = n === r, b = () => {
|
|
28
28
|
l(r), o == null || o(r);
|
|
29
29
|
}, f = `${m}-${r}`;
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
|
|
30
|
+
return /* @__PURE__ */ x(
|
|
31
|
+
S,
|
|
32
32
|
{
|
|
33
33
|
variant: i ? "primary" : "secondary",
|
|
34
34
|
size: u,
|
|
35
35
|
appearance: p,
|
|
36
36
|
onClick: b,
|
|
37
37
|
id: f,
|
|
38
|
-
role:
|
|
38
|
+
role: d || "radio",
|
|
39
39
|
"aria-checked": e === void 0 ? i : e,
|
|
40
40
|
"aria-label": a,
|
|
41
41
|
type: "button",
|
|
42
42
|
...t,
|
|
43
|
-
children:
|
|
43
|
+
children: s
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
|
-
},
|
|
46
|
+
}, N = ({
|
|
47
47
|
name: r,
|
|
48
|
-
size:
|
|
49
|
-
appearance:
|
|
48
|
+
size: s = "medium",
|
|
49
|
+
appearance: d = "dark",
|
|
50
50
|
onChange: e,
|
|
51
51
|
defaultValue: a,
|
|
52
52
|
value: t,
|
|
@@ -63,26 +63,29 @@ const x = G(
|
|
|
63
63
|
k(() => {
|
|
64
64
|
t !== void 0 && i(t);
|
|
65
65
|
}, [t]);
|
|
66
|
-
const f = (
|
|
67
|
-
t === void 0 && i(
|
|
68
|
-
}, B =
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
|
|
66
|
+
const f = (y) => {
|
|
67
|
+
t === void 0 && i(y), e == null || e(y);
|
|
68
|
+
}, B = j();
|
|
69
|
+
return /* @__PURE__ */ x(
|
|
70
|
+
I.Provider,
|
|
71
71
|
{
|
|
72
72
|
value: {
|
|
73
73
|
selectedValue: b,
|
|
74
74
|
setSelectedValue: f,
|
|
75
75
|
name: r,
|
|
76
|
-
size:
|
|
76
|
+
size: s,
|
|
77
77
|
onChange: e,
|
|
78
78
|
groupId: B,
|
|
79
|
-
appearance:
|
|
79
|
+
appearance: d,
|
|
80
80
|
...m
|
|
81
81
|
},
|
|
82
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ x(
|
|
83
83
|
"div",
|
|
84
84
|
{
|
|
85
|
-
className:
|
|
85
|
+
className: g(
|
|
86
|
+
"gi-flex gi-flex-wrap gi-gap-3 [&_button]:gi-min-w-12 [&_button]:gi-justify-center",
|
|
87
|
+
o
|
|
88
|
+
),
|
|
86
89
|
role: n || "radiogroup",
|
|
87
90
|
"aria-labelledby": l,
|
|
88
91
|
"aria-describedby": u,
|
|
@@ -93,6 +96,6 @@ const x = G(
|
|
|
93
96
|
);
|
|
94
97
|
};
|
|
95
98
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
N as ButtonGroup,
|
|
100
|
+
D as ButtonGroupItem
|
|
98
101
|
};
|
|
@@ -4,15 +4,15 @@ import { HintText as n } from "../hint-text/hint-text.js";
|
|
|
4
4
|
import { translate as i } from "../i18n/utility.js";
|
|
5
5
|
const m = ({
|
|
6
6
|
maxChars: e,
|
|
7
|
-
value:
|
|
7
|
+
value: t
|
|
8
8
|
}) => {
|
|
9
|
-
const
|
|
10
|
-
return /* @__PURE__ */ a("div", { className: "gi-
|
|
9
|
+
const r = Math.max(0, e - ((t == null ? void 0 : t.length) ?? 0));
|
|
10
|
+
return /* @__PURE__ */ a("div", { className: "gi-mt-2", children: /* @__PURE__ */ a(
|
|
11
11
|
n,
|
|
12
12
|
{
|
|
13
13
|
text: i("textarea.remainingChars", {
|
|
14
|
-
remainingChars:
|
|
15
|
-
defaultValue: `You have ${
|
|
14
|
+
remainingChars: r,
|
|
15
|
+
defaultValue: `You have ${r} characters remaining`
|
|
16
16
|
})
|
|
17
17
|
}
|
|
18
18
|
) });
|