@ahmetilhn/hanui 1.0.1 → 1.1.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 +78 -3
- package/build/index.cjs +11 -11
- package/build/index.cjs.map +1 -1
- package/build/index.d.ts +257 -92
- package/build/index.js +1782 -1658
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as a, jsxs as _, Fragment as
|
|
3
|
-
import { useContext as
|
|
4
|
-
import { isClient as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
const
|
|
2
|
+
import { jsx as a, jsxs as _, Fragment as aa } from "react/jsx-runtime";
|
|
3
|
+
import { useContext as en, createContext as an, useMemo as ia, useEffect as F, useRef as Y, useState as Z, useCallback as Q, memo as v, forwardRef as xe, useId as ce, Children as nn } from "react";
|
|
4
|
+
import { isClient as Me, isDefined as Ge, normalize as fa, isNumber as ya } from "@ahmetilhn/handy-utils";
|
|
5
|
+
import { createPortal as tn } from "react-dom";
|
|
6
|
+
const k = {
|
|
7
7
|
n0: "#ffffff",
|
|
8
8
|
n25: "#fafbfc",
|
|
9
9
|
n50: "#f6f7f9",
|
|
@@ -26,14 +26,14 @@ const g = {
|
|
|
26
26
|
n550: "#6b7583",
|
|
27
27
|
n600: "#5a6472",
|
|
28
28
|
n900: "#11151b"
|
|
29
|
-
},
|
|
29
|
+
}, ne = {
|
|
30
30
|
base: "#1f2937",
|
|
31
31
|
two: "#2b3646",
|
|
32
32
|
three: "#3a4658",
|
|
33
33
|
/** Koyu temada üst bant; sayfadan koyu kalmalı. */
|
|
34
34
|
ink: "#12161d",
|
|
35
35
|
inkTwo: "#1c222b"
|
|
36
|
-
},
|
|
36
|
+
}, ie = {
|
|
37
37
|
base: "#f59e0b",
|
|
38
38
|
hover: "#d98706",
|
|
39
39
|
active: "#b87205",
|
|
@@ -43,7 +43,7 @@ const g = {
|
|
|
43
43
|
darkHover: "#f0af12",
|
|
44
44
|
/** Amber üzerinde metin — beyaz 2,3:1'de kalıyor, okunmuyor. */
|
|
45
45
|
on: "#291500"
|
|
46
|
-
},
|
|
46
|
+
}, z = {
|
|
47
47
|
base: "#2f6fed",
|
|
48
48
|
hover: "#1d54c4",
|
|
49
49
|
active: "#17439c",
|
|
@@ -55,7 +55,7 @@ const g = {
|
|
|
55
55
|
darkHover: "#7aa8ff",
|
|
56
56
|
darkTint: "#16243c",
|
|
57
57
|
darkLine: "#2a3f63"
|
|
58
|
-
},
|
|
58
|
+
}, C = {
|
|
59
59
|
/* Yeşil ailesi `ANCHOR.green`den türetildi (L +44 / S −24, L +33 / S −14). */
|
|
60
60
|
okBg: "#e8f4eb",
|
|
61
61
|
/** 5,58:1 tint üzerinde — metin katmanı. */
|
|
@@ -105,13 +105,13 @@ const g = {
|
|
|
105
105
|
altBgDark: "#1d1a33",
|
|
106
106
|
altFgDark: "#bfb3f5",
|
|
107
107
|
altLineDark: "#332d56"
|
|
108
|
-
},
|
|
108
|
+
}, Ie = {
|
|
109
109
|
base: "#dc2626",
|
|
110
110
|
hover: "#bb1e1e",
|
|
111
111
|
dark: "#e45b5b",
|
|
112
112
|
darkHover: "#ef7a72",
|
|
113
113
|
onDark: "#1a0b0a"
|
|
114
|
-
},
|
|
114
|
+
}, ve = {
|
|
115
115
|
red: "#dc2626",
|
|
116
116
|
redDark: "#e35252",
|
|
117
117
|
green: "#34c759",
|
|
@@ -120,37 +120,37 @@ const g = {
|
|
|
120
120
|
greenHoverDark: "#63e084",
|
|
121
121
|
/** Yeşil dolgu üzerindeki metin. BEYAZ DEĞİL: #34c759 üzerinde 2,22:1. */
|
|
122
122
|
onGreen: "#06280f"
|
|
123
|
-
},
|
|
123
|
+
}, sa = {
|
|
124
124
|
bg: "#e8f4eb",
|
|
125
125
|
fg: "#1d6e31",
|
|
126
126
|
bgDark: "#122817",
|
|
127
127
|
fgDark: "#34c759"
|
|
128
|
-
},
|
|
128
|
+
}, La = {
|
|
129
129
|
/** 5,23:1 beyaz üzerinde. */
|
|
130
130
|
light: "#9a5f04",
|
|
131
131
|
/** 9,82:1 koyu zemin üzerinde. */
|
|
132
132
|
dark: "#f0b429"
|
|
133
|
-
},
|
|
134
|
-
const t = e.replace("#", ""), o = t.length === 3 ? t.split("").map((
|
|
135
|
-
return `rgba(${
|
|
136
|
-
},
|
|
133
|
+
}, w = (e, n) => {
|
|
134
|
+
const t = e.replace("#", ""), o = t.length === 3 ? t.split("").map((c) => c + c).join("") : t, i = parseInt(o.slice(0, 2), 16), r = parseInt(o.slice(2, 4), 16), s = parseInt(o.slice(4, 6), 16);
|
|
135
|
+
return `rgba(${i}, ${r}, ${s}, ${n})`;
|
|
136
|
+
}, V = "#000000", on = {
|
|
137
137
|
// --- Yüzey ---
|
|
138
|
-
page:
|
|
139
|
-
surface:
|
|
140
|
-
"surface-2":
|
|
141
|
-
"surface-3":
|
|
142
|
-
"surface-inset":
|
|
138
|
+
page: k.n50,
|
|
139
|
+
surface: k.n0,
|
|
140
|
+
"surface-2": k.n100,
|
|
141
|
+
"surface-3": k.n150,
|
|
142
|
+
"surface-inset": k.n25,
|
|
143
143
|
// --- Kenarlık ---
|
|
144
|
-
border:
|
|
145
|
-
"border-strong":
|
|
144
|
+
border: k.n250,
|
|
145
|
+
"border-strong": k.n300,
|
|
146
146
|
// --- Metin ---
|
|
147
|
-
text:
|
|
148
|
-
"text-2":
|
|
149
|
-
"text-3":
|
|
147
|
+
text: k.n900,
|
|
148
|
+
"text-2": k.n600,
|
|
149
|
+
"text-3": k.n550,
|
|
150
150
|
// --- Grafit: bant, alt bilgi, tablo başlığı, teknik blok ---
|
|
151
|
-
graphite:
|
|
152
|
-
"graphite-2":
|
|
153
|
-
"graphite-3":
|
|
151
|
+
graphite: ne.base,
|
|
152
|
+
"graphite-2": ne.two,
|
|
153
|
+
"graphite-3": ne.three,
|
|
154
154
|
/*
|
|
155
155
|
* BİRİNCİL EYLEM (dolgulu, nötr).
|
|
156
156
|
*
|
|
@@ -158,56 +158,56 @@ const g = {
|
|
|
158
158
|
* ayrılmıştır; her dolu düğmeyi amber yapmak o tekilliği yok eder ve
|
|
159
159
|
* kullanıcı hangi turuncunun dönüşüm olduğunu bilemez.
|
|
160
160
|
*/
|
|
161
|
-
action:
|
|
162
|
-
"action-hover":
|
|
163
|
-
"action-active":
|
|
164
|
-
"on-action":
|
|
161
|
+
action: ne.base,
|
|
162
|
+
"action-hover": ne.two,
|
|
163
|
+
"action-active": ne.three,
|
|
164
|
+
"on-action": k.n0,
|
|
165
165
|
/** Pasif dolgu; saydamlık DEĞİL kendi rengi (bkz. Button `:disabled`). */
|
|
166
|
-
"action-soft":
|
|
166
|
+
"action-soft": k.n300,
|
|
167
167
|
// --- Dönüşüm eylemi: ekrandaki tek doygun turuncu ---
|
|
168
|
-
amber:
|
|
169
|
-
"amber-hover":
|
|
170
|
-
"amber-active":
|
|
171
|
-
"amber-soft":
|
|
172
|
-
"on-amber":
|
|
168
|
+
amber: ie.base,
|
|
169
|
+
"amber-hover": ie.hover,
|
|
170
|
+
"amber-active": ie.active,
|
|
171
|
+
"amber-soft": ie.soft,
|
|
172
|
+
"on-amber": ie.on,
|
|
173
173
|
// --- Mavi: gezinme ve keşif ---
|
|
174
|
-
blue:
|
|
175
|
-
"blue-hover":
|
|
176
|
-
"blue-active":
|
|
177
|
-
"blue-text":
|
|
178
|
-
"blue-tint":
|
|
179
|
-
"blue-line":
|
|
174
|
+
blue: z.base,
|
|
175
|
+
"blue-hover": z.hover,
|
|
176
|
+
"blue-active": z.active,
|
|
177
|
+
"blue-text": z.text,
|
|
178
|
+
"blue-tint": z.tint,
|
|
179
|
+
"blue-line": z.line,
|
|
180
180
|
// --- Durum: tint zemin + koyu metin + eşleşen hairline ---
|
|
181
|
-
"ok-bg":
|
|
182
|
-
"ok-fg":
|
|
183
|
-
"ok-line":
|
|
184
|
-
"warn-bg":
|
|
185
|
-
"warn-fg":
|
|
186
|
-
"warn-line":
|
|
187
|
-
"off-bg":
|
|
188
|
-
"off-fg":
|
|
189
|
-
"off-line":
|
|
190
|
-
"bad-bg":
|
|
191
|
-
"bad-fg":
|
|
192
|
-
"bad-line":
|
|
193
|
-
"oem-bg":
|
|
194
|
-
"oem-fg":
|
|
195
|
-
"oem-line":
|
|
196
|
-
"alt-bg":
|
|
197
|
-
"alt-fg":
|
|
198
|
-
"alt-line":
|
|
199
|
-
"sale-bg":
|
|
200
|
-
"sale-fg":
|
|
181
|
+
"ok-bg": C.okBg,
|
|
182
|
+
"ok-fg": C.okFg,
|
|
183
|
+
"ok-line": C.okLine,
|
|
184
|
+
"warn-bg": C.warnBg,
|
|
185
|
+
"warn-fg": C.warnFg,
|
|
186
|
+
"warn-line": C.warnLine,
|
|
187
|
+
"off-bg": C.offBg,
|
|
188
|
+
"off-fg": C.offFg,
|
|
189
|
+
"off-line": C.offLine,
|
|
190
|
+
"bad-bg": C.badBg,
|
|
191
|
+
"bad-fg": C.badFg,
|
|
192
|
+
"bad-line": C.badLine,
|
|
193
|
+
"oem-bg": C.oemBg,
|
|
194
|
+
"oem-fg": C.oemFg,
|
|
195
|
+
"oem-line": C.oemLine,
|
|
196
|
+
"alt-bg": C.altBg,
|
|
197
|
+
"alt-fg": C.altFg,
|
|
198
|
+
"alt-line": C.altLine,
|
|
199
|
+
"sale-bg": sa.bg,
|
|
200
|
+
"sale-fg": sa.fg,
|
|
201
201
|
// --- İkon vurguları: METİN DEĞİL (WCAG grafik eşiği 3:1) ---
|
|
202
|
-
"red-accent":
|
|
203
|
-
"green-accent":
|
|
204
|
-
"green-accent-hover":
|
|
205
|
-
"on-green":
|
|
206
|
-
star:
|
|
202
|
+
"red-accent": ve.red,
|
|
203
|
+
"green-accent": ve.green,
|
|
204
|
+
"green-accent-hover": ve.greenHover,
|
|
205
|
+
"on-green": ve.onGreen,
|
|
206
|
+
star: La.light,
|
|
207
207
|
// --- Yıkıcı eylem: durum tinti DEĞİL, gerçek bir dolgu ---
|
|
208
|
-
"danger-solid":
|
|
209
|
-
"danger-solid-hover":
|
|
210
|
-
"on-danger":
|
|
208
|
+
"danger-solid": Ie.base,
|
|
209
|
+
"danger-solid-hover": Ie.hover,
|
|
210
|
+
"on-danger": k.n0,
|
|
211
211
|
/*
|
|
212
212
|
* ÜST BANT / ALT BİLGİ / KAHRAMAN BÖLÜMÜ.
|
|
213
213
|
*
|
|
@@ -217,49 +217,49 @@ const g = {
|
|
|
217
217
|
* sayfa üzerinde), alt bilgi bir kademe çöker. Bunu `surface` ile yazmak
|
|
218
218
|
* iki bandı sayfayla aynı tonda bırakıyordu.
|
|
219
219
|
*/
|
|
220
|
-
"nav-bg":
|
|
221
|
-
"nav-bg-2":
|
|
222
|
-
"nav-fg":
|
|
223
|
-
"nav-fg-2":
|
|
224
|
-
"nav-fg-3":
|
|
225
|
-
"nav-line":
|
|
226
|
-
"nav-line-strong":
|
|
227
|
-
"nav-hover":
|
|
228
|
-
"footer-bg":
|
|
220
|
+
"nav-bg": k.n0,
|
|
221
|
+
"nav-bg-2": k.n100,
|
|
222
|
+
"nav-fg": k.n900,
|
|
223
|
+
"nav-fg-2": k.n600,
|
|
224
|
+
"nav-fg-3": k.n500,
|
|
225
|
+
"nav-line": k.n200,
|
|
226
|
+
"nav-line-strong": k.n300,
|
|
227
|
+
"nav-hover": k.n100,
|
|
228
|
+
"footer-bg": k.n100,
|
|
229
229
|
// --- Gölge: nötr-serin (sıcak gölge serin gri zeminde kirli durur) ---
|
|
230
|
-
"shadow-xs": `0 1px 2px ${
|
|
231
|
-
"shadow-sm": `0 1px 2px ${
|
|
232
|
-
"shadow-md": `0 2px 4px ${
|
|
233
|
-
"shadow-lg": `0 4px 8px ${
|
|
234
|
-
"shadow-xl": `0 8px 16px ${
|
|
230
|
+
"shadow-xs": `0 1px 2px ${w(k.n900, 0.05)}`,
|
|
231
|
+
"shadow-sm": `0 1px 2px ${w(k.n900, 0.05)}, 0 1px 3px ${w(k.n900, 0.04)}`,
|
|
232
|
+
"shadow-md": `0 2px 4px ${w(k.n900, 0.04)}, 0 6px 16px ${w(k.n900, 0.07)}`,
|
|
233
|
+
"shadow-lg": `0 4px 8px ${w(k.n900, 0.05)}, 0 16px 32px ${w(k.n900, 0.1)}`,
|
|
234
|
+
"shadow-xl": `0 8px 16px ${w(k.n900, 0.06)}, 0 28px 56px ${w(k.n900, 0.13)}`,
|
|
235
235
|
/** Yapışkan alt bar; gölge YUKARI düşer. */
|
|
236
|
-
"shadow-up": `0 -2px 4px ${
|
|
236
|
+
"shadow-up": `0 -2px 4px ${w(k.n900, 0.03)}, 0 -8px 24px ${w(k.n900, 0.08)}`,
|
|
237
237
|
/** Odak halkası MAVİ: odak bir gezinme olayıdır, bir dönüşüm değil. */
|
|
238
|
-
ring: `0 0 0 3px ${
|
|
239
|
-
"ring-color":
|
|
240
|
-
"ring-danger": `0 0 0 3px ${
|
|
241
|
-
"ring-ok": `0 0 0 4px ${
|
|
238
|
+
ring: `0 0 0 3px ${w(z.base, 0.28)}`,
|
|
239
|
+
"ring-color": z.base,
|
|
240
|
+
"ring-danger": `0 0 0 3px ${w(Ie.base, 0.24)}`,
|
|
241
|
+
"ring-ok": `0 0 0 4px ${w(C.okFg, 0.16)}`,
|
|
242
242
|
// --- Örtü ve cam: görsel üzerine binen yüzeyler ---
|
|
243
|
-
scrim:
|
|
244
|
-
"scrim-soft":
|
|
245
|
-
glass:
|
|
246
|
-
"glass-solid":
|
|
247
|
-
"on-scrim":
|
|
243
|
+
scrim: w(k.n900, 0.55),
|
|
244
|
+
"scrim-soft": w(k.n900, 0.32),
|
|
245
|
+
glass: w(k.n0, 0.92),
|
|
246
|
+
"glass-solid": k.n0,
|
|
247
|
+
"on-scrim": k.n0,
|
|
248
248
|
// --- İskelet ve dönen gösterge ---
|
|
249
|
-
"skeleton-a":
|
|
250
|
-
"skeleton-b":
|
|
251
|
-
track:
|
|
249
|
+
"skeleton-a": k.n100,
|
|
250
|
+
"skeleton-b": k.n25,
|
|
251
|
+
track: w(k.n900, 0.12),
|
|
252
252
|
/** Görsel yer tutucu (medya yoksa). */
|
|
253
|
-
"media-bg":
|
|
253
|
+
"media-bg": k.n100,
|
|
254
254
|
/*
|
|
255
255
|
* Vurgu bloğundaki ışık lekeleri. Açık temada ZEMİN DE AÇIK olduğu için
|
|
256
256
|
* lekeler çok daha hafif: koyu bant için ayarlanmış %22 opaklık açık
|
|
257
257
|
* zeminde lekeyi kirli bir dasa çeviriyordu.
|
|
258
258
|
*/
|
|
259
|
-
"glow-1":
|
|
260
|
-
"glow-2":
|
|
261
|
-
"glow-amber":
|
|
262
|
-
},
|
|
259
|
+
"glow-1": w(z.base, 0.1),
|
|
260
|
+
"glow-2": w(z.base, 0.06),
|
|
261
|
+
"glow-amber": w(ie.base, 0.09)
|
|
262
|
+
}, rn = {
|
|
263
263
|
page: "#0e1116",
|
|
264
264
|
surface: "#171b22",
|
|
265
265
|
"surface-2": "#1f242d",
|
|
@@ -270,124 +270,124 @@ const g = {
|
|
|
270
270
|
text: "#e7eaee",
|
|
271
271
|
"text-2": "#9aa4b2",
|
|
272
272
|
"text-3": "#6b7583",
|
|
273
|
-
graphite:
|
|
274
|
-
"graphite-2":
|
|
275
|
-
"graphite-3":
|
|
273
|
+
graphite: ne.ink,
|
|
274
|
+
"graphite-2": ne.inkTwo,
|
|
275
|
+
"graphite-3": ne.two,
|
|
276
276
|
/*
|
|
277
277
|
* Koyu temada grafit dolgu sayfadan ayırt edilemez. Birincil eylem AÇIK bir
|
|
278
278
|
* nötr yüzeye döner — koyu zeminde en yüksek vurgu budur.
|
|
279
279
|
*/
|
|
280
|
-
action:
|
|
281
|
-
"action-hover":
|
|
282
|
-
"action-active":
|
|
283
|
-
"on-action":
|
|
280
|
+
action: k.n150,
|
|
281
|
+
"action-hover": k.n0,
|
|
282
|
+
"action-active": k.n300,
|
|
283
|
+
"on-action": k.n900,
|
|
284
284
|
"action-soft": "#414a58",
|
|
285
|
-
amber:
|
|
286
|
-
"amber-hover":
|
|
287
|
-
"amber-active":
|
|
285
|
+
amber: ie.dark,
|
|
286
|
+
"amber-hover": ie.darkHover,
|
|
287
|
+
"amber-active": ie.base,
|
|
288
288
|
"amber-soft": "#6d5316",
|
|
289
|
-
"on-amber":
|
|
290
|
-
blue:
|
|
291
|
-
"blue-hover":
|
|
292
|
-
"blue-active":
|
|
293
|
-
"blue-text":
|
|
294
|
-
"blue-tint":
|
|
295
|
-
"blue-line":
|
|
296
|
-
"ok-bg":
|
|
297
|
-
"ok-fg":
|
|
298
|
-
"ok-line":
|
|
299
|
-
"warn-bg":
|
|
300
|
-
"warn-fg":
|
|
301
|
-
"warn-line":
|
|
302
|
-
"off-bg":
|
|
303
|
-
"off-fg":
|
|
304
|
-
"off-line":
|
|
305
|
-
"bad-bg":
|
|
306
|
-
"bad-fg":
|
|
307
|
-
"bad-line":
|
|
308
|
-
"oem-bg":
|
|
309
|
-
"oem-fg":
|
|
310
|
-
"oem-line":
|
|
311
|
-
"alt-bg":
|
|
312
|
-
"alt-fg":
|
|
313
|
-
"alt-line":
|
|
314
|
-
"sale-bg":
|
|
315
|
-
"sale-fg":
|
|
316
|
-
"red-accent":
|
|
317
|
-
"green-accent":
|
|
318
|
-
"green-accent-hover":
|
|
319
|
-
"on-green":
|
|
320
|
-
star:
|
|
321
|
-
"danger-solid":
|
|
322
|
-
"danger-solid-hover":
|
|
323
|
-
"on-danger":
|
|
289
|
+
"on-amber": ie.on,
|
|
290
|
+
blue: z.dark,
|
|
291
|
+
"blue-hover": z.darkHover,
|
|
292
|
+
"blue-active": z.base,
|
|
293
|
+
"blue-text": z.dark,
|
|
294
|
+
"blue-tint": z.darkTint,
|
|
295
|
+
"blue-line": z.darkLine,
|
|
296
|
+
"ok-bg": C.okBgDark,
|
|
297
|
+
"ok-fg": C.okFgDark,
|
|
298
|
+
"ok-line": C.okLineDark,
|
|
299
|
+
"warn-bg": C.warnBgDark,
|
|
300
|
+
"warn-fg": C.warnFgDark,
|
|
301
|
+
"warn-line": C.warnLineDark,
|
|
302
|
+
"off-bg": C.offBgDark,
|
|
303
|
+
"off-fg": C.offFgDark,
|
|
304
|
+
"off-line": C.offLineDark,
|
|
305
|
+
"bad-bg": C.badBgDark,
|
|
306
|
+
"bad-fg": C.badFgDark,
|
|
307
|
+
"bad-line": C.badLineDark,
|
|
308
|
+
"oem-bg": C.oemBgDark,
|
|
309
|
+
"oem-fg": C.oemFgDark,
|
|
310
|
+
"oem-line": C.oemLineDark,
|
|
311
|
+
"alt-bg": C.altBgDark,
|
|
312
|
+
"alt-fg": C.altFgDark,
|
|
313
|
+
"alt-line": C.altLineDark,
|
|
314
|
+
"sale-bg": sa.bgDark,
|
|
315
|
+
"sale-fg": sa.fgDark,
|
|
316
|
+
"red-accent": ve.redDark,
|
|
317
|
+
"green-accent": ve.greenDark,
|
|
318
|
+
"green-accent-hover": ve.greenHoverDark,
|
|
319
|
+
"on-green": ve.onGreen,
|
|
320
|
+
star: La.dark,
|
|
321
|
+
"danger-solid": Ie.dark,
|
|
322
|
+
"danger-solid-hover": Ie.darkHover,
|
|
323
|
+
"on-danger": Ie.onDark,
|
|
324
324
|
/* Koyu temada bant sayfadan daha KOYU: aynı tonda olsa yüzüyor görünüyor. */
|
|
325
|
-
"nav-bg":
|
|
326
|
-
"nav-bg-2":
|
|
325
|
+
"nav-bg": ne.ink,
|
|
326
|
+
"nav-bg-2": ne.inkTwo,
|
|
327
327
|
"nav-fg": "#e7eaee",
|
|
328
328
|
"nav-fg-2": "#9aa4b2",
|
|
329
329
|
"nav-fg-3": "#6b7583",
|
|
330
330
|
"nav-line": "#262c36",
|
|
331
331
|
"nav-line-strong": "#363e4a",
|
|
332
|
-
"nav-hover":
|
|
333
|
-
"footer-bg":
|
|
332
|
+
"nav-hover": w(k.n0, 0.07),
|
|
333
|
+
"footer-bg": ne.ink,
|
|
334
334
|
/*
|
|
335
335
|
* Koyu zeminde gölge okunmaz; derinlik daha çok kenarlıkla kurulur.
|
|
336
336
|
* Gölgeler yine de KORUNUR ama daha derin: modal ve açılır liste yüzeyin
|
|
337
337
|
* üzerinde durmalı.
|
|
338
338
|
*/
|
|
339
|
-
"shadow-xs": `0 1px 2px ${
|
|
340
|
-
"shadow-sm": `0 1px 2px ${
|
|
341
|
-
"shadow-md": `0 2px 4px ${
|
|
342
|
-
"shadow-lg": `0 4px 8px ${
|
|
343
|
-
"shadow-xl": `0 8px 16px ${
|
|
344
|
-
"shadow-up": `0 -2px 4px ${
|
|
345
|
-
ring: `0 0 0 3px ${
|
|
346
|
-
"ring-color":
|
|
347
|
-
"ring-danger": `0 0 0 3px ${
|
|
348
|
-
"ring-ok": `0 0 0 4px ${
|
|
349
|
-
scrim:
|
|
350
|
-
"scrim-soft":
|
|
351
|
-
glass:
|
|
339
|
+
"shadow-xs": `0 1px 2px ${w(V, 0.4)}`,
|
|
340
|
+
"shadow-sm": `0 1px 2px ${w(V, 0.4)}, 0 1px 3px ${w(V, 0.3)}`,
|
|
341
|
+
"shadow-md": `0 2px 4px ${w(V, 0.35)}, 0 6px 16px ${w(V, 0.45)}`,
|
|
342
|
+
"shadow-lg": `0 4px 8px ${w(V, 0.4)}, 0 16px 32px ${w(V, 0.55)}`,
|
|
343
|
+
"shadow-xl": `0 8px 16px ${w(V, 0.45)}, 0 28px 56px ${w(V, 0.6)}`,
|
|
344
|
+
"shadow-up": `0 -2px 4px ${w(V, 0.3)}, 0 -8px 24px ${w(V, 0.45)}`,
|
|
345
|
+
ring: `0 0 0 3px ${w(z.dark, 0.36)}`,
|
|
346
|
+
"ring-color": z.dark,
|
|
347
|
+
"ring-danger": `0 0 0 3px ${w(Ie.dark, 0.32)}`,
|
|
348
|
+
"ring-ok": `0 0 0 4px ${w(C.okFgDark, 0.2)}`,
|
|
349
|
+
scrim: w(V, 0.68),
|
|
350
|
+
"scrim-soft": w(V, 0.45),
|
|
351
|
+
glass: w("#1f242d", 0.92),
|
|
352
352
|
"glass-solid": "#1f242d",
|
|
353
|
-
"on-scrim":
|
|
353
|
+
"on-scrim": k.n0,
|
|
354
354
|
"skeleton-a": "#1f242d",
|
|
355
355
|
"skeleton-b": "#262c36",
|
|
356
|
-
track:
|
|
356
|
+
track: w(k.n0, 0.14),
|
|
357
357
|
"media-bg": "#1f242d",
|
|
358
|
-
"glow-1":
|
|
359
|
-
"glow-2":
|
|
360
|
-
"glow-amber":
|
|
361
|
-
},
|
|
358
|
+
"glow-1": w(z.base, 0.2),
|
|
359
|
+
"glow-2": w(z.dark, 0.1),
|
|
360
|
+
"glow-amber": w(ie.dark, 0.12)
|
|
361
|
+
}, zs = {
|
|
362
362
|
heading: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
363
363
|
body: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
364
364
|
mono: "ui-monospace, 'SF Mono', Menlo, Consolas, monospace"
|
|
365
|
-
},
|
|
366
|
-
const t = e === "dark" ?
|
|
365
|
+
}, va = "--hanui-", xa = "hanui-theme-overrides", Ee = "data-hanui-theme", ka = "hanui-theme-switching", Ks = (e, n) => {
|
|
366
|
+
const t = e === "dark" ? rn : on, o = (e === "dark" ? n == null ? void 0 : n.dark : n == null ? void 0 : n.light) ?? {};
|
|
367
367
|
return { ...t, ...o };
|
|
368
|
-
},
|
|
369
|
-
const n = [], t = (
|
|
370
|
-
`), o = e.fonts ?? {},
|
|
371
|
-
if (
|
|
368
|
+
}, sn = (e) => {
|
|
369
|
+
const n = [], t = (r, s = " ") => Object.entries(r).map(([c, l]) => `${s}${va}${c}: ${l};`).join(`
|
|
370
|
+
`), o = e.fonts ?? {}, i = Object.entries(o).filter(([, r]) => !!r);
|
|
371
|
+
if (i.length > 0 && n.push(
|
|
372
372
|
`:root {
|
|
373
|
-
${
|
|
373
|
+
${i.map(([r, s]) => ` ${va}font-${r}: ${s};`).join(`
|
|
374
374
|
`)}
|
|
375
375
|
}`
|
|
376
376
|
), e.light && Object.keys(e.light).length > 0) {
|
|
377
|
-
const
|
|
377
|
+
const r = t(e.light);
|
|
378
378
|
n.push(`:root {
|
|
379
|
-
${
|
|
380
|
-
}`), n.push(`:root[${
|
|
381
|
-
${
|
|
379
|
+
${r}
|
|
380
|
+
}`), n.push(`:root[${Ee}='light'] {
|
|
381
|
+
${r}
|
|
382
382
|
}`);
|
|
383
383
|
}
|
|
384
384
|
if (e.dark && Object.keys(e.dark).length > 0) {
|
|
385
|
-
const
|
|
386
|
-
n.push(`:root[${
|
|
387
|
-
${
|
|
385
|
+
const r = t(e.dark);
|
|
386
|
+
n.push(`:root[${Ee}='dark'] {
|
|
387
|
+
${r}
|
|
388
388
|
}`), n.push(
|
|
389
389
|
`@media (prefers-color-scheme: dark) {
|
|
390
|
-
:root:not([${
|
|
390
|
+
:root:not([${Ee}]) {
|
|
391
391
|
${t(
|
|
392
392
|
e.dark,
|
|
393
393
|
" "
|
|
@@ -399,76 +399,86 @@ ${t(
|
|
|
399
399
|
return n.join(`
|
|
400
400
|
|
|
401
401
|
`);
|
|
402
|
-
},
|
|
403
|
-
if (!
|
|
404
|
-
const n = e ?
|
|
402
|
+
}, Ca = (e) => {
|
|
403
|
+
if (!Me()) return;
|
|
404
|
+
const n = e ? sn(e) : "", t = document.getElementById(xa);
|
|
405
405
|
if (n === "") {
|
|
406
406
|
t == null || t.remove();
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
409
409
|
const o = t ?? document.createElement("style");
|
|
410
|
-
o.id =
|
|
411
|
-
},
|
|
412
|
-
const
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}, [
|
|
416
|
-
const r =
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
410
|
+
o.id = xa, o.textContent = n, t || document.head.appendChild(o);
|
|
411
|
+
}, Ia = an({}), P = () => en(Ia), qs = ({ children: e, theme: n, linkComponent: t, labels: o }) => {
|
|
412
|
+
const i = ia(() => n ? JSON.stringify(n) : "", [n]);
|
|
413
|
+
F(() => {
|
|
414
|
+
Ca(n);
|
|
415
|
+
}, [i]);
|
|
416
|
+
const r = Y(n);
|
|
417
|
+
r.current = n;
|
|
418
|
+
const s = ia(
|
|
419
|
+
() => ({ theme: r.current, linkComponent: t, labels: o }),
|
|
420
|
+
/* `themeKey` denetciye GEREKSIZ gorunuyor cunku memo'nun govdesinde
|
|
421
|
+
gecmiyor — ama tam da isi bu: temanin ICERIGI degistiginde yeni bir
|
|
422
|
+
nesne uretilmesini saglayan tetik o. Cikarilirsa tema ezmesi degisse
|
|
423
|
+
de tuketiciler eski degeri gorurdu. */
|
|
424
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
425
|
+
[i, t, o]
|
|
426
|
+
);
|
|
427
|
+
return /* @__PURE__ */ a(Ia.Provider, { value: s, children: e });
|
|
428
|
+
}, js = (e = {}) => {
|
|
429
|
+
Ca(e.theme), !(!Me() || !e.colorScheme) && document.documentElement.setAttribute(Ee, e.colorScheme);
|
|
430
|
+
}, Ea = () => {
|
|
421
431
|
var e;
|
|
422
|
-
return
|
|
423
|
-
},
|
|
424
|
-
if (!
|
|
425
|
-
const e = document.documentElement.getAttribute(
|
|
426
|
-
return e === "dark" || e === "light" ? e :
|
|
427
|
-
},
|
|
428
|
-
const [e, n] =
|
|
429
|
-
|
|
430
|
-
n(
|
|
431
|
-
}, []),
|
|
432
|
-
if (!
|
|
433
|
-
const s = window.matchMedia("(prefers-color-scheme: dark)"),
|
|
434
|
-
document.documentElement.hasAttribute(
|
|
432
|
+
return Me() && ((e = window.matchMedia) != null && e.call(window, "(prefers-color-scheme: dark)").matches) ? "dark" : "light";
|
|
433
|
+
}, cn = () => {
|
|
434
|
+
if (!Me()) return "light";
|
|
435
|
+
const e = document.documentElement.getAttribute(Ee);
|
|
436
|
+
return e === "dark" || e === "light" ? e : Ea();
|
|
437
|
+
}, Gs = () => {
|
|
438
|
+
const [e, n] = Z("light"), [t, o] = Z(!1);
|
|
439
|
+
F(() => {
|
|
440
|
+
n(cn()), o(!0);
|
|
441
|
+
}, []), F(() => {
|
|
442
|
+
if (!Me() || !window.matchMedia) return;
|
|
443
|
+
const s = window.matchMedia("(prefers-color-scheme: dark)"), c = () => {
|
|
444
|
+
document.documentElement.hasAttribute(Ee) || n(Ea());
|
|
435
445
|
};
|
|
436
|
-
return s.addEventListener("change",
|
|
446
|
+
return s.addEventListener("change", c), () => s.removeEventListener("change", c);
|
|
437
447
|
}, []);
|
|
438
|
-
const
|
|
439
|
-
if (!
|
|
440
|
-
const
|
|
441
|
-
|
|
442
|
-
window.requestAnimationFrame(() =>
|
|
448
|
+
const i = Q((s) => {
|
|
449
|
+
if (!Me()) return;
|
|
450
|
+
const c = document.documentElement;
|
|
451
|
+
c.classList.add(ka), c.setAttribute(Ee, s), n(s), window.requestAnimationFrame(() => {
|
|
452
|
+
window.requestAnimationFrame(() => c.classList.remove(ka));
|
|
443
453
|
});
|
|
444
|
-
}, []),
|
|
445
|
-
() =>
|
|
446
|
-
[e,
|
|
454
|
+
}, []), r = Q(
|
|
455
|
+
() => i(e === "dark" ? "light" : "dark"),
|
|
456
|
+
[e, i]
|
|
447
457
|
);
|
|
448
|
-
return { scheme: e, setScheme:
|
|
449
|
-
},
|
|
450
|
-
let
|
|
451
|
-
const
|
|
458
|
+
return { scheme: e, setScheme: i, toggle: r, isReady: t };
|
|
459
|
+
}, Ma = "--hanui-sheet-height", Ta = "--hanui-sheet-inset-bottom";
|
|
460
|
+
let na = 0, Ue = 0;
|
|
461
|
+
const Ra = () => {
|
|
452
462
|
const e = window.visualViewport;
|
|
453
463
|
if (!e) return;
|
|
454
464
|
const n = window.innerHeight - e.height - e.offsetTop, t = document.documentElement;
|
|
455
|
-
t.style.setProperty(
|
|
456
|
-
},
|
|
457
|
-
|
|
458
|
-
|
|
465
|
+
t.style.setProperty(Ta, `${Math.max(0, Math.round(n))}px`), t.style.setProperty(Ma, `${Math.round(e.height)}px`);
|
|
466
|
+
}, Be = () => {
|
|
467
|
+
Ue || (Ue = window.requestAnimationFrame(() => {
|
|
468
|
+
Ue = 0, Ra();
|
|
459
469
|
}));
|
|
460
|
-
},
|
|
461
|
-
|
|
470
|
+
}, ln = (e = !0) => {
|
|
471
|
+
F(() => {
|
|
462
472
|
if (!e) return;
|
|
463
473
|
const n = window.visualViewport;
|
|
464
474
|
if (n)
|
|
465
|
-
return
|
|
466
|
-
|
|
475
|
+
return na += 1, na === 1 && (n.addEventListener("resize", Be), n.addEventListener("scroll", Be), window.addEventListener("orientationchange", Be)), Ra(), () => {
|
|
476
|
+
na -= 1, !(na > 0) && (n.removeEventListener("resize", Be), n.removeEventListener("scroll", Be), window.removeEventListener("orientationchange", Be), Ue && (window.cancelAnimationFrame(Ue), Ue = 0), document.documentElement.style.removeProperty(Ta), document.documentElement.style.removeProperty(Ma));
|
|
467
477
|
};
|
|
468
478
|
}, [e]);
|
|
469
479
|
};
|
|
470
|
-
var
|
|
471
|
-
const
|
|
480
|
+
var ge = /* @__PURE__ */ ((e) => (e.PRIMARY = "PRIMARY", e.CART = "CART", e.SECONDARY = "SECONDARY", e.OUTLINE = "OUTLINE", e.DARK = "DARK", e.LIGHT = "LIGHT", e.GHOST = "GHOST", e.DANGER = "DANGER", e))(ge || {}), Te = /* @__PURE__ */ ((e) => (e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e))(Te || {});
|
|
481
|
+
const dn = 640, Us = 768, _n = 1024, Xs = `(min-width: ${_n + 1}px)`, ha = `(min-width: ${dn + 1}px)`, Na = (e) => e.replace(/İ/g, "i").replace(/I/g, "i").replace(/ı/g, "i").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/ş/g, "s").replace(/ğ/g, "g").replace(/ç/g, "c").replace(/ø/g, "o").replace(/æ/g, "ae").replace(/ß/g, "ss").replace(/đ/g, "d").replace(/ł/g, "l").replace(/\s+/g, " ").trim(), wa = (e, n) => Na(e).includes(Na(n)), un = /* @__PURE__ */ new Set([
|
|
472
482
|
"button",
|
|
473
483
|
"checkbox",
|
|
474
484
|
"color",
|
|
@@ -479,36 +489,44 @@ const rn = 640, zs = 768, sn = 1024, Ks = `(min-width: ${sn + 1}px)`, ca = `(min
|
|
|
479
489
|
"range",
|
|
480
490
|
"reset",
|
|
481
491
|
"submit"
|
|
482
|
-
]),
|
|
492
|
+
]), hn = (e) => {
|
|
483
493
|
if (!(e instanceof HTMLElement)) return !1;
|
|
484
494
|
if (e.isContentEditable) return !0;
|
|
485
495
|
const n = e.getAttribute("contenteditable");
|
|
486
496
|
if (n === "" || n === "true" || n === "plaintext-only") return !0;
|
|
487
497
|
const t = e.tagName;
|
|
488
|
-
return t === "TEXTAREA" ? !0 : t !== "INPUT" ? !1 : !
|
|
489
|
-
},
|
|
498
|
+
return t === "TEXTAREA" ? !0 : t !== "INPUT" ? !1 : !un.has(e.type);
|
|
499
|
+
}, Aa = (e) => {
|
|
490
500
|
const n = e.ownerDocument.activeElement;
|
|
491
|
-
!e.contains(n) || !
|
|
501
|
+
!e.contains(n) || !hn(n) || (n.blur(), e.tabIndex = -1, e.focus({ preventScroll: !0 }));
|
|
492
502
|
}, d = (...e) => {
|
|
493
503
|
let n = "";
|
|
494
504
|
for (const t of e)
|
|
495
505
|
t && (n = n === "" ? t : `${n} ${t}`);
|
|
496
506
|
return n;
|
|
497
|
-
},
|
|
498
|
-
const { linkComponent: t } =
|
|
507
|
+
}, le = ({ children: e, ...n }) => {
|
|
508
|
+
const { linkComponent: t } = P();
|
|
499
509
|
return t ? /* @__PURE__ */ a(t, { ...n, children: e }) : /* @__PURE__ */ a("a", { ...n, children: e });
|
|
500
|
-
},
|
|
501
|
-
|
|
510
|
+
}, $a = /* @__PURE__ */ new Set(), I = (e, ...n) => {
|
|
511
|
+
for (const t of n) if (t !== void 0) return t;
|
|
512
|
+
return process.env.NODE_ENV !== "production" && !$a.has(e) && ($a.add(e), console.error(
|
|
513
|
+
`[hanui] Eksik metin: ${e}. Prop olarak geçin ya da <HanuiProvider labels={…}> içinde bir kez tanımlayın. Metinsiz bırakılan öğe ekran okuyucuda adsız kalır.`
|
|
514
|
+
)), "";
|
|
515
|
+
}, qe = (e, n, ...t) => n ? n(...t) : I(e), pn = "hanui-spinner-7pXwf", bn = "hanui-spinner__label-sZvSq", da = {
|
|
516
|
+
spinner: pn,
|
|
502
517
|
"hanui-spin": "hanui-hanui-spin-wTV0a",
|
|
503
|
-
spinner__label:
|
|
518
|
+
spinner__label: bn,
|
|
504
519
|
"spinner--sm": "hanui-spinner--sm-uI0wH",
|
|
505
520
|
"spinner--md": "hanui-spinner--md--VmFK",
|
|
506
521
|
"spinner--lg": "hanui-spinner--lg-K9k-Z"
|
|
507
|
-
},
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
522
|
+
}, mn = ({ size: e = "md", label: n, className: t }) => {
|
|
523
|
+
const { labels: o } = P();
|
|
524
|
+
return /* @__PURE__ */ a("span", { className: d(da.spinner, da[`spinner--${e}`], t), role: "status", children: /* @__PURE__ */ a("span", { className: da.spinner__label, children: n ?? I("Spinner.label", o == null ? void 0 : o.loading) }) });
|
|
525
|
+
}, Ba = v(mn), gn = "hanui-button-SRu4R", fn = "hanui-button__icon-giom6", yn = "hanui-button__spinner-vexVG", vn = "hanui-button__label-qiMHm", he = {
|
|
526
|
+
button: gn,
|
|
527
|
+
button__icon: fn,
|
|
528
|
+
button__spinner: yn,
|
|
529
|
+
button__label: vn,
|
|
512
530
|
"button--full": "hanui-button--full-CwPHR",
|
|
513
531
|
"button--loading": "hanui-button--loading-O-naJ",
|
|
514
532
|
"button--small": "hanui-button--small-TF9Hz",
|
|
@@ -522,64 +540,64 @@ const rn = 640, zs = 768, sn = 1024, Ks = `(min-width: ${sn + 1}px)`, ca = `(min
|
|
|
522
540
|
"button--light": "hanui-button--light-YzEPs",
|
|
523
541
|
"button--ghost": "hanui-button--ghost-rijnZ",
|
|
524
542
|
"button--danger": "hanui-button--danger-TNGd2"
|
|
525
|
-
},
|
|
543
|
+
}, Sa = xe(
|
|
526
544
|
({
|
|
527
|
-
variant: e =
|
|
528
|
-
size: n =
|
|
545
|
+
variant: e = ge.PRIMARY,
|
|
546
|
+
size: n = Te.MEDIUM,
|
|
529
547
|
isLoading: t,
|
|
530
548
|
isFullWidth: o,
|
|
531
|
-
startIcon:
|
|
532
|
-
endIcon:
|
|
549
|
+
startIcon: i,
|
|
550
|
+
endIcon: r,
|
|
533
551
|
className: s,
|
|
534
|
-
children:
|
|
535
|
-
disabled:
|
|
536
|
-
href:
|
|
537
|
-
isExternal:
|
|
538
|
-
linkProps:
|
|
539
|
-
testId:
|
|
540
|
-
...
|
|
541
|
-
},
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
o &&
|
|
547
|
-
t &&
|
|
552
|
+
children: c,
|
|
553
|
+
disabled: l,
|
|
554
|
+
href: u,
|
|
555
|
+
isExternal: b,
|
|
556
|
+
linkProps: g,
|
|
557
|
+
testId: h,
|
|
558
|
+
...p
|
|
559
|
+
}, N) => {
|
|
560
|
+
const m = d(
|
|
561
|
+
he.button,
|
|
562
|
+
he[`button--${e.toLowerCase()}`],
|
|
563
|
+
he[`button--${n.toLowerCase()}`],
|
|
564
|
+
o && he["button--full"],
|
|
565
|
+
t && he["button--loading"],
|
|
548
566
|
s
|
|
549
|
-
),
|
|
550
|
-
t && /* @__PURE__ */ a(
|
|
551
|
-
!t &&
|
|
552
|
-
/* @__PURE__ */ a("span", { className:
|
|
553
|
-
|
|
567
|
+
), f = /* @__PURE__ */ _(aa, { children: [
|
|
568
|
+
t && /* @__PURE__ */ a(Ba, { size: "sm", className: he.button__spinner, label: "" }),
|
|
569
|
+
!t && i && /* @__PURE__ */ a("span", { className: he.button__icon, children: i }),
|
|
570
|
+
/* @__PURE__ */ a("span", { className: he.button__label, children: c }),
|
|
571
|
+
r && /* @__PURE__ */ a("span", { className: he.button__icon, children: r })
|
|
554
572
|
] });
|
|
555
|
-
return
|
|
573
|
+
return u && b ? /* @__PURE__ */ a(
|
|
556
574
|
"a",
|
|
557
575
|
{
|
|
558
|
-
href:
|
|
559
|
-
className:
|
|
576
|
+
href: u,
|
|
577
|
+
className: m,
|
|
560
578
|
target: "_blank",
|
|
561
579
|
rel: "noopener noreferrer",
|
|
562
|
-
"aria-label":
|
|
563
|
-
"data-testid":
|
|
564
|
-
children:
|
|
580
|
+
"aria-label": p["aria-label"],
|
|
581
|
+
"data-testid": h,
|
|
582
|
+
children: f
|
|
565
583
|
}
|
|
566
|
-
) :
|
|
584
|
+
) : u ? /* @__PURE__ */ a(le, { href: u, className: m, "data-testid": h, ...g, children: f }) : /* @__PURE__ */ a(
|
|
567
585
|
"button",
|
|
568
586
|
{
|
|
569
|
-
ref:
|
|
570
|
-
className:
|
|
571
|
-
disabled:
|
|
587
|
+
ref: N,
|
|
588
|
+
className: m,
|
|
589
|
+
disabled: l || t,
|
|
572
590
|
"aria-busy": t,
|
|
573
|
-
"data-testid":
|
|
574
|
-
...
|
|
575
|
-
children:
|
|
591
|
+
"data-testid": h,
|
|
592
|
+
...p,
|
|
593
|
+
children: f
|
|
576
594
|
}
|
|
577
595
|
);
|
|
578
596
|
}
|
|
579
597
|
);
|
|
580
|
-
|
|
581
|
-
const
|
|
582
|
-
iconButton:
|
|
598
|
+
Sa.displayName = "Button";
|
|
599
|
+
const ea = v(Sa), xn = "hanui-iconButton-JdtwM", _a = {
|
|
600
|
+
iconButton: xn,
|
|
583
601
|
"iconButton--sm": "hanui-iconButton--sm-wE6zE",
|
|
584
602
|
"iconButton--md": "hanui-iconButton--md-iTNNS",
|
|
585
603
|
"iconButton--ghost": "hanui-iconButton--ghost-w-8K3",
|
|
@@ -587,53 +605,53 @@ const Ze = h(Ma), gn = "hanui-iconButton-JdtwM", ra = {
|
|
|
587
605
|
"iconButton--solid": "hanui-iconButton--solid-NUszP",
|
|
588
606
|
"iconButton--cart": "hanui-iconButton--cart-nVsH-",
|
|
589
607
|
"iconButton--danger": "hanui-iconButton--danger-xKkEA"
|
|
590
|
-
},
|
|
608
|
+
}, Fa = xe(
|
|
591
609
|
({
|
|
592
610
|
icon: e,
|
|
593
611
|
label: n,
|
|
594
612
|
variant: t = "ghost",
|
|
595
613
|
size: o = "md",
|
|
596
|
-
className:
|
|
597
|
-
type:
|
|
614
|
+
className: i,
|
|
615
|
+
type: r = "button",
|
|
598
616
|
href: s,
|
|
599
|
-
linkProps:
|
|
600
|
-
testId:
|
|
601
|
-
...
|
|
602
|
-
},
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
617
|
+
linkProps: c,
|
|
618
|
+
testId: l,
|
|
619
|
+
...u
|
|
620
|
+
}, b) => {
|
|
621
|
+
const g = d(
|
|
622
|
+
_a.iconButton,
|
|
623
|
+
_a[`iconButton--${t}`],
|
|
624
|
+
_a[`iconButton--${o}`],
|
|
625
|
+
i
|
|
608
626
|
);
|
|
609
627
|
return s ? /* @__PURE__ */ a(
|
|
610
|
-
|
|
628
|
+
le,
|
|
611
629
|
{
|
|
612
630
|
href: s,
|
|
613
|
-
className:
|
|
631
|
+
className: g,
|
|
614
632
|
"aria-label": n,
|
|
615
|
-
title:
|
|
616
|
-
"data-testid":
|
|
617
|
-
...
|
|
633
|
+
title: u.title ?? n,
|
|
634
|
+
"data-testid": l,
|
|
635
|
+
...c,
|
|
618
636
|
children: e
|
|
619
637
|
}
|
|
620
638
|
) : /* @__PURE__ */ a(
|
|
621
639
|
"button",
|
|
622
640
|
{
|
|
623
|
-
ref:
|
|
624
|
-
type:
|
|
625
|
-
className:
|
|
641
|
+
ref: b,
|
|
642
|
+
type: r,
|
|
643
|
+
className: g,
|
|
626
644
|
"aria-label": n,
|
|
627
645
|
title: n,
|
|
628
|
-
"data-testid":
|
|
629
|
-
...
|
|
646
|
+
"data-testid": l,
|
|
647
|
+
...u,
|
|
630
648
|
children: e
|
|
631
649
|
}
|
|
632
650
|
);
|
|
633
651
|
}
|
|
634
652
|
);
|
|
635
|
-
|
|
636
|
-
const
|
|
653
|
+
Fa.displayName = "IconButton";
|
|
654
|
+
const ca = v(Fa), O = ({ children: e, ...n }) => /* @__PURE__ */ a(
|
|
637
655
|
"svg",
|
|
638
656
|
{
|
|
639
657
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -646,497 +664,526 @@ const ta = h(Aa), T = ({ children: e, ...n }) => /* @__PURE__ */ a(
|
|
|
646
664
|
...n,
|
|
647
665
|
children: e
|
|
648
666
|
}
|
|
649
|
-
),
|
|
667
|
+
), pa = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M1.293 1.293a1 1 0 0 1 1.414 0L8 6.586l5.293-5.293a1 1 0 1 1 1.414 1.414L9.414 8l5.293 5.293a1 1 0 0 1-1.414 1.414L8 9.414l-5.293 5.293a1 1 0 0 1-1.414-1.414L6.586 8 1.293 2.707a1 1 0 0 1 0-1.414" }) }), Pa = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425z" }) }), kn = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0" }) }), Oa = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a(
|
|
650
668
|
"path",
|
|
651
669
|
{
|
|
652
670
|
fillRule: "evenodd",
|
|
653
671
|
d: "M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"
|
|
654
672
|
}
|
|
655
|
-
) }),
|
|
673
|
+
) }), Nn = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a(
|
|
656
674
|
"path",
|
|
657
675
|
{
|
|
658
676
|
fillRule: "evenodd",
|
|
659
677
|
d: "M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"
|
|
660
678
|
}
|
|
661
|
-
) }),
|
|
679
|
+
) }), Ha = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a(
|
|
662
680
|
"path",
|
|
663
681
|
{
|
|
664
682
|
fillRule: "evenodd",
|
|
665
683
|
d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"
|
|
666
684
|
}
|
|
667
|
-
) }),
|
|
685
|
+
) }), wn = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a(
|
|
668
686
|
"path",
|
|
669
687
|
{
|
|
670
688
|
fillRule: "evenodd",
|
|
671
689
|
d: "M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8"
|
|
672
690
|
}
|
|
673
|
-
) }),
|
|
691
|
+
) }), $n = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.31.98.85l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.85-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0" }) }), Dn = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2" }) }), Ln = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M2 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 8" }) }), Cn = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a(
|
|
674
692
|
"path",
|
|
675
693
|
{
|
|
676
694
|
fillRule: "evenodd",
|
|
677
695
|
d: "M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"
|
|
678
696
|
}
|
|
679
|
-
) }),
|
|
697
|
+
) }), In = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2" }) }), En = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z" }) }), za = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5m.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2" }) }), Mn = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293z" }) }), Ka = (e) => /* @__PURE__ */ _(O, { ...e, children: [
|
|
680
698
|
/* @__PURE__ */ a("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
|
|
681
699
|
/* @__PURE__ */ a("path", { d: "M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0M7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z" })
|
|
682
|
-
] }),
|
|
683
|
-
link:
|
|
684
|
-
link__label:
|
|
685
|
-
link__arrow:
|
|
700
|
+
] }), Tn = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247m2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.03-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927" }) }), Rn = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M2.5 1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1H3v9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V4h.5a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H10a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1zm3 4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 .5-.5M8 5a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7A.5.5 0 0 1 8 5m3 .5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 1 0" }) }), An = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.56.56 0 0 0-.163-.505L1.71 6.745l4.052-.576a.53.53 0 0 0 .393-.288L8 2.223l1.847 3.658a.53.53 0 0 0 .393.288l4.052.575-2.906 2.77a.56.56 0 0 0-.163.506l.694 3.957-3.686-1.894a.5.5 0 0 0-.461 0z" }) }), qa = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.283.95l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z" }) }), Bn = (e) => /* @__PURE__ */ a(O, { ...e, children: /* @__PURE__ */ a("path", { d: "M5.354 5.119 7.538.792A.52.52 0 0 1 8 .5c.183 0 .366.097.465.292l2.184 4.327 4.898.696A.54.54 0 0 1 16 6.32a.55.55 0 0 1-.17.445l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256a.5.5 0 0 1-.146.05c-.342.06-.668-.254-.6-.642l.83-4.73L.173 6.765a.55.55 0 0 1-.171-.443.5.5 0 0 1 .084-.302.5.5 0 0 1 .37-.245zM8 12.027a.5.5 0 0 1 .232.056l3.686 1.894-.694-3.957a.56.56 0 0 1 .162-.505l2.907-2.77-4.052-.576a.53.53 0 0 1-.393-.288L8.001 2.223 8 2.226z" }) }), Sn = "hanui-link-WBmXY", Fn = "hanui-link__label--OEu-", Pn = "hanui-link__arrow-JKXm-", Xe = {
|
|
701
|
+
link: Sn,
|
|
702
|
+
link__label: Fn,
|
|
703
|
+
link__arrow: Pn,
|
|
686
704
|
"link--sm": "hanui-link--sm-a-3Dz",
|
|
687
705
|
"link--md": "hanui-link--md-lZdYP",
|
|
688
706
|
"link--brand": "hanui-link--brand-vr8sW",
|
|
689
707
|
"link--muted": "hanui-link--muted-EeN6l"
|
|
690
|
-
},
|
|
708
|
+
}, On = ({
|
|
691
709
|
href: e,
|
|
692
710
|
children: n,
|
|
693
711
|
hasArrow: t,
|
|
694
712
|
tone: o = "brand",
|
|
695
|
-
size:
|
|
696
|
-
className:
|
|
713
|
+
size: i = "md",
|
|
714
|
+
className: r,
|
|
697
715
|
linkProps: s,
|
|
698
|
-
...
|
|
716
|
+
...c
|
|
699
717
|
}) => /* @__PURE__ */ _(
|
|
700
|
-
|
|
718
|
+
le,
|
|
701
719
|
{
|
|
702
720
|
href: e,
|
|
703
|
-
className: d(
|
|
721
|
+
className: d(Xe.link, Xe[`link--${o}`], Xe[`link--${i}`], r),
|
|
704
722
|
...s,
|
|
705
|
-
...
|
|
723
|
+
...c,
|
|
706
724
|
children: [
|
|
707
|
-
/* @__PURE__ */ a("span", { className:
|
|
708
|
-
t && /* @__PURE__ */ a(
|
|
725
|
+
/* @__PURE__ */ a("span", { className: Xe.link__label, children: n }),
|
|
726
|
+
t && /* @__PURE__ */ a(wn, { className: Xe.link__arrow })
|
|
709
727
|
]
|
|
710
728
|
}
|
|
711
|
-
),
|
|
712
|
-
tooltip:
|
|
713
|
-
tooltip__trigger:
|
|
714
|
-
bubble:
|
|
729
|
+
), Ys = v(On), Hn = "hanui-tooltip-RG1g1", zn = "hanui-tooltip__trigger-nWZtO", Kn = "hanui-bubble-bcBNk", ta = {
|
|
730
|
+
tooltip: Hn,
|
|
731
|
+
tooltip__trigger: zn,
|
|
732
|
+
bubble: Kn,
|
|
715
733
|
"hanui-fade-in-up": "hanui-hanui-fade-in-up-Fwj3A",
|
|
716
734
|
"bubble--top": "hanui-bubble--top-uWSZy",
|
|
717
735
|
"bubble--bottom": "hanui-bubble--bottom-jKokL"
|
|
718
|
-
},
|
|
719
|
-
const [
|
|
736
|
+
}, qn = ({ content: e, children: n, position: t = "top", className: o }) => {
|
|
737
|
+
const [i, r] = Z(!1), s = ce();
|
|
720
738
|
return /* @__PURE__ */ _(
|
|
721
739
|
"span",
|
|
722
740
|
{
|
|
723
|
-
className: d(
|
|
724
|
-
onMouseEnter: () =>
|
|
725
|
-
onMouseLeave: () =>
|
|
726
|
-
onFocus: () =>
|
|
727
|
-
onBlur: () =>
|
|
728
|
-
onKeyDown: (
|
|
729
|
-
|
|
741
|
+
className: d(ta.tooltip, o),
|
|
742
|
+
onMouseEnter: () => r(!0),
|
|
743
|
+
onMouseLeave: () => r(!1),
|
|
744
|
+
onFocus: () => r(!0),
|
|
745
|
+
onBlur: () => r(!1),
|
|
746
|
+
onKeyDown: (c) => {
|
|
747
|
+
c.key === "Escape" && r(!1);
|
|
730
748
|
},
|
|
731
749
|
children: [
|
|
732
|
-
/* @__PURE__ */ a("span", { "aria-describedby":
|
|
733
|
-
|
|
750
|
+
/* @__PURE__ */ a("span", { "aria-describedby": i ? s : void 0, className: ta.tooltip__trigger, children: n }),
|
|
751
|
+
i && /* @__PURE__ */ a("span", { id: s, role: "tooltip", className: d(ta.bubble, ta[`bubble--${t}`]), children: e })
|
|
734
752
|
]
|
|
735
753
|
}
|
|
736
754
|
);
|
|
737
|
-
},
|
|
738
|
-
chip:
|
|
739
|
-
chip__icon:
|
|
740
|
-
chip__label:
|
|
741
|
-
chip__count:
|
|
755
|
+
}, Zs = v(qn), jn = "hanui-chip--NLgU", Gn = "hanui-chip__icon-IjjSb", Un = "hanui-chip__label-cT4hw", Xn = "hanui-chip__count-MBGO3", ye = {
|
|
756
|
+
chip: jn,
|
|
757
|
+
chip__icon: Gn,
|
|
758
|
+
chip__label: Un,
|
|
759
|
+
chip__count: Xn,
|
|
742
760
|
"chip--sm": "hanui-chip--sm-60H-S",
|
|
743
761
|
"chip--md": "hanui-chip--md--yAlm",
|
|
744
762
|
"chip--iconOnly": "hanui-chip--iconOnly-5LT1h",
|
|
745
763
|
"chip--selected": "hanui-chip--selected-FdpCr"
|
|
746
|
-
},
|
|
764
|
+
}, ja = xe(
|
|
747
765
|
({
|
|
748
766
|
children: e,
|
|
749
767
|
icon: n,
|
|
750
768
|
endIcon: t,
|
|
751
769
|
count: o,
|
|
752
|
-
isSelected:
|
|
753
|
-
size:
|
|
770
|
+
isSelected: i,
|
|
771
|
+
size: r = "md",
|
|
754
772
|
label: s,
|
|
755
|
-
href:
|
|
756
|
-
linkProps:
|
|
757
|
-
className:
|
|
758
|
-
type:
|
|
759
|
-
role:
|
|
760
|
-
testId:
|
|
761
|
-
...
|
|
762
|
-
},
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
!e &&
|
|
768
|
-
|
|
769
|
-
),
|
|
770
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
771
|
-
e && /* @__PURE__ */ a("span", { className:
|
|
772
|
-
|
|
773
|
-
t && /* @__PURE__ */ a("span", { className:
|
|
773
|
+
href: c,
|
|
774
|
+
linkProps: l,
|
|
775
|
+
className: u,
|
|
776
|
+
type: b = "button",
|
|
777
|
+
role: g,
|
|
778
|
+
testId: h,
|
|
779
|
+
...p
|
|
780
|
+
}, N) => {
|
|
781
|
+
const m = d(
|
|
782
|
+
ye.chip,
|
|
783
|
+
ye[`chip--${r}`],
|
|
784
|
+
i && ye["chip--selected"],
|
|
785
|
+
!e && ye["chip--iconOnly"],
|
|
786
|
+
u
|
|
787
|
+
), f = /* @__PURE__ */ _(aa, { children: [
|
|
788
|
+
n && /* @__PURE__ */ a("span", { className: ye.chip__icon, "aria-hidden": !0, children: n }),
|
|
789
|
+
e && /* @__PURE__ */ a("span", { className: ye.chip__label, children: e }),
|
|
790
|
+
Ge(o) && /* @__PURE__ */ a("span", { className: ye.chip__count, children: o }),
|
|
791
|
+
t && /* @__PURE__ */ a("span", { className: ye.chip__icon, "aria-hidden": !0, children: t })
|
|
774
792
|
] });
|
|
775
|
-
return
|
|
776
|
-
|
|
793
|
+
return c ? /* @__PURE__ */ a(
|
|
794
|
+
le,
|
|
777
795
|
{
|
|
778
|
-
href:
|
|
779
|
-
className:
|
|
796
|
+
href: c,
|
|
797
|
+
className: m,
|
|
780
798
|
"aria-label": e ? void 0 : s,
|
|
781
|
-
"aria-current":
|
|
799
|
+
"aria-current": i ? "page" : void 0,
|
|
782
800
|
title: e ? void 0 : s,
|
|
783
|
-
"data-testid":
|
|
784
|
-
...
|
|
785
|
-
children:
|
|
801
|
+
"data-testid": h,
|
|
802
|
+
...l,
|
|
803
|
+
children: f
|
|
786
804
|
}
|
|
787
805
|
) : /* @__PURE__ */ a(
|
|
788
806
|
"button",
|
|
789
807
|
{
|
|
790
|
-
ref:
|
|
791
|
-
type:
|
|
792
|
-
role:
|
|
793
|
-
className:
|
|
808
|
+
ref: N,
|
|
809
|
+
type: b,
|
|
810
|
+
role: g,
|
|
811
|
+
className: m,
|
|
794
812
|
"aria-label": e ? void 0 : s,
|
|
795
813
|
title: e ? void 0 : s,
|
|
796
|
-
"data-testid":
|
|
797
|
-
...
|
|
798
|
-
...
|
|
799
|
-
children:
|
|
814
|
+
"data-testid": h,
|
|
815
|
+
...g === "radio" ? { "aria-checked": !!i } : { "aria-pressed": !!i },
|
|
816
|
+
...p,
|
|
817
|
+
children: f
|
|
800
818
|
}
|
|
801
819
|
);
|
|
802
820
|
}
|
|
803
821
|
);
|
|
804
|
-
|
|
805
|
-
const
|
|
806
|
-
group:
|
|
822
|
+
ja.displayName = "Chip";
|
|
823
|
+
const Yn = v(ja), Zn = "hanui-group-0tnVf", Da = {
|
|
824
|
+
group: Zn,
|
|
807
825
|
"group--scrollable": "hanui-group--scrollable-PMu6V"
|
|
808
|
-
},
|
|
826
|
+
}, Jn = ({
|
|
809
827
|
options: e,
|
|
810
828
|
label: n,
|
|
811
829
|
size: t = "md",
|
|
812
830
|
isScrollable: o,
|
|
813
|
-
className:
|
|
814
|
-
...
|
|
831
|
+
className: i,
|
|
832
|
+
...r
|
|
815
833
|
}) => {
|
|
816
|
-
var
|
|
817
|
-
const s = Y(null),
|
|
818
|
-
if (
|
|
819
|
-
const
|
|
820
|
-
|
|
834
|
+
var g;
|
|
835
|
+
const s = Y(null), c = (h) => r.isMultiple ? r.value.includes(h) : r.value === h, l = (h) => {
|
|
836
|
+
if (r.isMultiple) {
|
|
837
|
+
const p = r.value.includes(h) ? r.value.filter((N) => N !== h) : [...r.value, h];
|
|
838
|
+
r.onChange(p);
|
|
821
839
|
return;
|
|
822
840
|
}
|
|
823
|
-
|
|
824
|
-
},
|
|
825
|
-
var
|
|
826
|
-
if (
|
|
827
|
-
const
|
|
828
|
-
if (
|
|
829
|
-
|
|
830
|
-
const
|
|
831
|
-
if (
|
|
832
|
-
const
|
|
833
|
-
|
|
834
|
-
},
|
|
841
|
+
r.onChange(r.value === h ? null : h);
|
|
842
|
+
}, u = (h) => {
|
|
843
|
+
var D, x;
|
|
844
|
+
if (r.isMultiple) return;
|
|
845
|
+
const p = h.key === "ArrowRight" || h.key === "ArrowDown" ? 1 : h.key === "ArrowLeft" || h.key === "ArrowUp" ? -1 : 0;
|
|
846
|
+
if (p === 0) return;
|
|
847
|
+
h.preventDefault();
|
|
848
|
+
const N = e.filter((L) => !L.isDisabled);
|
|
849
|
+
if (N.length === 0) return;
|
|
850
|
+
const m = N.findIndex((L) => L.value === r.value), f = N[(m + p + N.length) % N.length];
|
|
851
|
+
r.onChange(f.value), (x = (D = s.current) == null ? void 0 : D.querySelector(`[data-chip-value="${f.value}"]`)) == null || x.focus();
|
|
852
|
+
}, b = r.isMultiple ? null : r.value ?? ((g = e.find((h) => !h.isDisabled)) == null ? void 0 : g.value) ?? null;
|
|
835
853
|
return /* @__PURE__ */ a(
|
|
836
854
|
"div",
|
|
837
855
|
{
|
|
838
856
|
ref: s,
|
|
839
|
-
className: d(
|
|
840
|
-
role:
|
|
857
|
+
className: d(Da.group, o && Da["group--scrollable"], i),
|
|
858
|
+
role: r.isMultiple ? "group" : "radiogroup",
|
|
841
859
|
"aria-label": n,
|
|
842
|
-
onKeyDown:
|
|
843
|
-
children: e.map((
|
|
844
|
-
|
|
860
|
+
onKeyDown: u,
|
|
861
|
+
children: e.map((h) => /* @__PURE__ */ a(
|
|
862
|
+
Yn,
|
|
845
863
|
{
|
|
846
864
|
size: t,
|
|
847
|
-
icon:
|
|
848
|
-
count:
|
|
849
|
-
isSelected:
|
|
850
|
-
disabled:
|
|
851
|
-
role:
|
|
852
|
-
tabIndex:
|
|
853
|
-
"data-chip-value":
|
|
854
|
-
onClick: () =>
|
|
855
|
-
children:
|
|
865
|
+
icon: h.icon,
|
|
866
|
+
count: h.count,
|
|
867
|
+
isSelected: c(h.value),
|
|
868
|
+
disabled: h.isDisabled,
|
|
869
|
+
role: r.isMultiple ? void 0 : "radio",
|
|
870
|
+
tabIndex: r.isMultiple || h.value === b ? 0 : -1,
|
|
871
|
+
"data-chip-value": h.value,
|
|
872
|
+
onClick: () => l(h.value),
|
|
873
|
+
children: h.label
|
|
856
874
|
},
|
|
857
|
-
|
|
875
|
+
h.value
|
|
858
876
|
))
|
|
859
877
|
}
|
|
860
878
|
);
|
|
861
|
-
},
|
|
862
|
-
sheet:
|
|
863
|
-
sheet__header:
|
|
864
|
-
sheet__title:
|
|
865
|
-
sheet__toolbar:
|
|
866
|
-
sheet__body:
|
|
867
|
-
sheet__footer:
|
|
868
|
-
},
|
|
879
|
+
}, Js = v(Jn), Qn = "hanui-sheet-GEvdE", Vn = "hanui-sheet__header-NJgw-", Wn = "hanui-sheet__title-f-b07", et = "hanui-sheet__toolbar-eyhmW", at = "hanui-sheet__body-eJ2KB", nt = "hanui-sheet__footer-NpsY5", Se = {
|
|
880
|
+
sheet: Qn,
|
|
881
|
+
sheet__header: Vn,
|
|
882
|
+
sheet__title: Wn,
|
|
883
|
+
sheet__toolbar: et,
|
|
884
|
+
sheet__body: at,
|
|
885
|
+
sheet__footer: nt
|
|
886
|
+
}, tt = ({
|
|
869
887
|
title: e,
|
|
870
888
|
closeLabel: n,
|
|
871
889
|
onClose: t,
|
|
872
890
|
children: o,
|
|
873
|
-
toolbar:
|
|
874
|
-
footer:
|
|
875
|
-
closeAbove: s =
|
|
876
|
-
className:
|
|
877
|
-
testId:
|
|
891
|
+
toolbar: i,
|
|
892
|
+
footer: r,
|
|
893
|
+
closeAbove: s = ha,
|
|
894
|
+
className: c,
|
|
895
|
+
testId: l
|
|
878
896
|
}) => {
|
|
879
|
-
const
|
|
880
|
-
|
|
881
|
-
const
|
|
897
|
+
const { labels: u } = P(), b = ce();
|
|
898
|
+
ln(), F(() => {
|
|
899
|
+
const p = document.body.style.overflow;
|
|
882
900
|
return document.body.style.overflow = "hidden", () => {
|
|
883
|
-
document.body.style.overflow =
|
|
901
|
+
document.body.style.overflow = p;
|
|
884
902
|
};
|
|
885
|
-
}, []),
|
|
886
|
-
const
|
|
887
|
-
return
|
|
903
|
+
}, []), F(() => {
|
|
904
|
+
const p = window.matchMedia(s);
|
|
905
|
+
return p.addEventListener("change", t), () => p.removeEventListener("change", t);
|
|
888
906
|
}, [s, t]);
|
|
889
|
-
const
|
|
890
|
-
!
|
|
891
|
-
}, []),
|
|
892
|
-
(
|
|
893
|
-
|
|
907
|
+
const g = Q((p) => {
|
|
908
|
+
!p || p.open || (p.showModal(), Aa(p));
|
|
909
|
+
}, []), h = Q(
|
|
910
|
+
(p) => {
|
|
911
|
+
p.target === p.currentTarget && t();
|
|
894
912
|
},
|
|
895
913
|
[t]
|
|
896
914
|
);
|
|
897
|
-
return
|
|
915
|
+
return Me() ? tn(
|
|
898
916
|
/* @__PURE__ */ _(
|
|
899
917
|
"dialog",
|
|
900
918
|
{
|
|
901
|
-
ref:
|
|
902
|
-
className: d(
|
|
903
|
-
"aria-labelledby":
|
|
904
|
-
"data-testid":
|
|
905
|
-
onCancel: (
|
|
906
|
-
|
|
919
|
+
ref: g,
|
|
920
|
+
className: d(Se.sheet, c),
|
|
921
|
+
"aria-labelledby": b,
|
|
922
|
+
"data-testid": l,
|
|
923
|
+
onCancel: (p) => {
|
|
924
|
+
p.preventDefault(), t();
|
|
907
925
|
},
|
|
908
|
-
onClick:
|
|
926
|
+
onClick: h,
|
|
909
927
|
children: [
|
|
910
|
-
/* @__PURE__ */ _("header", { className:
|
|
911
|
-
/* @__PURE__ */ a("h2", { id:
|
|
928
|
+
/* @__PURE__ */ _("header", { className: Se.sheet__header, children: [
|
|
929
|
+
/* @__PURE__ */ a("h2", { id: b, className: Se.sheet__title, children: e }),
|
|
912
930
|
/* @__PURE__ */ a(
|
|
913
|
-
|
|
931
|
+
ca,
|
|
914
932
|
{
|
|
915
|
-
icon: /* @__PURE__ */ a(
|
|
916
|
-
label: n,
|
|
933
|
+
icon: /* @__PURE__ */ a(pa, {}),
|
|
934
|
+
label: I("BottomSheet.closeLabel", n, u == null ? void 0 : u.close),
|
|
917
935
|
variant: "ghost",
|
|
918
936
|
size: "sm",
|
|
919
937
|
onClick: t
|
|
920
938
|
}
|
|
921
939
|
)
|
|
922
940
|
] }),
|
|
923
|
-
|
|
924
|
-
/* @__PURE__ */ a("div", { className:
|
|
925
|
-
|
|
941
|
+
i && /* @__PURE__ */ a("div", { className: Se.sheet__toolbar, children: i }),
|
|
942
|
+
/* @__PURE__ */ a("div", { className: Se.sheet__body, children: o }),
|
|
943
|
+
r && /* @__PURE__ */ a("div", { className: Se.sheet__footer, children: r })
|
|
926
944
|
]
|
|
927
945
|
}
|
|
928
946
|
),
|
|
929
947
|
document.body
|
|
930
948
|
) : null;
|
|
931
|
-
},
|
|
932
|
-
combobox:
|
|
933
|
-
combobox__trigger:
|
|
949
|
+
}, Ga = v(tt), ot = "hanui-combobox-NtZoV", rt = "hanui-combobox__trigger-2riRR", it = "hanui-combobox__leadingIcon-it2xz", st = "hanui-combobox__value-acDlr", ct = "hanui-combobox__clear-EXOsc", lt = "hanui-combobox__chevron-g-QzQ", dt = "hanui-combobox__panel-srBxl", _t = "hanui-combobox__search-THjer", ut = "hanui-combobox__searchIcon-vr4Bg", ht = "hanui-combobox__searchInput-JPp5h", pt = "hanui-combobox__list-p-eCs", bt = "hanui-combobox__option-CLWh-", mt = "hanui-combobox__optionText-Zm0D6", gt = "hanui-combobox__optionLabel-WvT4W", ft = "hanui-combobox__optionDescription-8OEzi", yt = "hanui-combobox__check-MKlLz", vt = "hanui-combobox__empty-mZwBq", R = {
|
|
950
|
+
combobox: ot,
|
|
951
|
+
combobox__trigger: rt,
|
|
934
952
|
"combobox__trigger--empty": "hanui-combobox__trigger--empty-RxwCq",
|
|
935
953
|
"combobox__trigger--open": "hanui-combobox__trigger--open-rw1ZS",
|
|
936
954
|
"combobox__trigger--invalid": "hanui-combobox__trigger--invalid-iZgiN",
|
|
937
|
-
combobox__leadingIcon:
|
|
938
|
-
combobox__value:
|
|
939
|
-
combobox__clear:
|
|
940
|
-
combobox__chevron:
|
|
955
|
+
combobox__leadingIcon: it,
|
|
956
|
+
combobox__value: st,
|
|
957
|
+
combobox__clear: ct,
|
|
958
|
+
combobox__chevron: lt,
|
|
941
959
|
"combobox__chevron--open": "hanui-combobox__chevron--open-9kj1j",
|
|
942
|
-
combobox__panel:
|
|
943
|
-
combobox__search:
|
|
944
|
-
combobox__searchIcon:
|
|
945
|
-
combobox__searchInput:
|
|
946
|
-
combobox__list:
|
|
960
|
+
combobox__panel: dt,
|
|
961
|
+
combobox__search: _t,
|
|
962
|
+
combobox__searchIcon: ut,
|
|
963
|
+
combobox__searchInput: ht,
|
|
964
|
+
combobox__list: pt,
|
|
947
965
|
"combobox__list--sheet": "hanui-combobox__list--sheet-r3MzB",
|
|
948
|
-
combobox__option:
|
|
966
|
+
combobox__option: bt,
|
|
949
967
|
"combobox__option--active": "hanui-combobox__option--active--75Vq",
|
|
950
968
|
"combobox__option--selected": "hanui-combobox__option--selected-DVFGy",
|
|
951
969
|
"combobox__option--disabled": "hanui-combobox__option--disabled-e6VjI",
|
|
952
|
-
combobox__optionText:
|
|
953
|
-
combobox__optionLabel:
|
|
954
|
-
combobox__optionDescription:
|
|
955
|
-
combobox__check:
|
|
956
|
-
combobox__empty:
|
|
957
|
-
},
|
|
970
|
+
combobox__optionText: mt,
|
|
971
|
+
combobox__optionLabel: gt,
|
|
972
|
+
combobox__optionDescription: ft,
|
|
973
|
+
combobox__check: yt,
|
|
974
|
+
combobox__empty: vt
|
|
975
|
+
}, xt = ({
|
|
958
976
|
options: e,
|
|
959
977
|
value: n,
|
|
960
978
|
onChange: t,
|
|
961
979
|
labels: o,
|
|
962
|
-
isSearchHidden:
|
|
963
|
-
onSearch:
|
|
980
|
+
isSearchHidden: i,
|
|
981
|
+
onSearch: r,
|
|
964
982
|
isLoading: s,
|
|
965
|
-
isDisabled:
|
|
966
|
-
isClearable:
|
|
967
|
-
icon:
|
|
968
|
-
id:
|
|
969
|
-
className:
|
|
970
|
-
testId:
|
|
971
|
-
"aria-describedby":
|
|
972
|
-
"aria-invalid":
|
|
983
|
+
isDisabled: c,
|
|
984
|
+
isClearable: l,
|
|
985
|
+
icon: u,
|
|
986
|
+
id: b,
|
|
987
|
+
className: g,
|
|
988
|
+
testId: h,
|
|
989
|
+
"aria-describedby": p,
|
|
990
|
+
"aria-invalid": N
|
|
973
991
|
}) => {
|
|
974
|
-
const
|
|
975
|
-
|
|
976
|
-
|
|
992
|
+
const { labels: m } = P(), f = {
|
|
993
|
+
get search() {
|
|
994
|
+
var y;
|
|
995
|
+
return I(
|
|
996
|
+
"Combobox.searchPlaceholder",
|
|
997
|
+
o.searchPlaceholder,
|
|
998
|
+
(y = m == null ? void 0 : m.combobox) == null ? void 0 : y.searchPlaceholder
|
|
999
|
+
);
|
|
1000
|
+
},
|
|
1001
|
+
get empty() {
|
|
1002
|
+
var y;
|
|
1003
|
+
return I(
|
|
1004
|
+
"Combobox.emptyMessage",
|
|
1005
|
+
o.emptyMessage,
|
|
1006
|
+
(y = m == null ? void 0 : m.combobox) == null ? void 0 : y.emptyMessage
|
|
1007
|
+
);
|
|
1008
|
+
},
|
|
1009
|
+
get loading() {
|
|
1010
|
+
var y;
|
|
1011
|
+
return I(
|
|
1012
|
+
"Combobox.loadingMessage",
|
|
1013
|
+
o.loadingMessage,
|
|
1014
|
+
(y = m == null ? void 0 : m.combobox) == null ? void 0 : y.loadingMessage
|
|
1015
|
+
);
|
|
1016
|
+
},
|
|
1017
|
+
get clear() {
|
|
1018
|
+
var y;
|
|
1019
|
+
return I("Combobox.clearLabel", o.clearLabel, (y = m == null ? void 0 : m.combobox) == null ? void 0 : y.clearLabel);
|
|
1020
|
+
}
|
|
1021
|
+
}, D = ce(), x = b ?? D, L = `${x}-listbox`, E = Y(null), S = Y(null), j = Y(null), te = Y(null), [B, oe] = Z(null), M = B !== null, [A, H] = Z(""), [U, ee] = Z(0), [de, ke] = Z(null), _e = ia(() => {
|
|
1022
|
+
if (r || A.trim() === "") return e;
|
|
1023
|
+
const y = A.trim();
|
|
977
1024
|
return e.filter(
|
|
978
|
-
(
|
|
1025
|
+
(T) => wa(T.label, y) || (T.description ? wa(T.description, y) : !1)
|
|
979
1026
|
);
|
|
980
|
-
}, [e,
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
}, [
|
|
984
|
-
const
|
|
985
|
-
|
|
986
|
-
if (!
|
|
1027
|
+
}, [e, A, r]), ue = e.find((y) => y.value === n) ?? null;
|
|
1028
|
+
F(() => {
|
|
1029
|
+
ue ? ke(ue.label) : n === null && ke(null);
|
|
1030
|
+
}, [ue, n]);
|
|
1031
|
+
const Re = (ue == null ? void 0 : ue.label) ?? de, fe = Y(r);
|
|
1032
|
+
fe.current = r, F(() => {
|
|
1033
|
+
if (!M || !fe.current) return;
|
|
987
1034
|
const y = window.setTimeout(() => {
|
|
988
|
-
var
|
|
989
|
-
return (
|
|
1035
|
+
var T;
|
|
1036
|
+
return (T = fe.current) == null ? void 0 : T.call(fe, A.trim());
|
|
990
1037
|
}, 300);
|
|
991
1038
|
return () => window.clearTimeout(y);
|
|
992
|
-
}, [
|
|
993
|
-
const
|
|
994
|
-
|
|
995
|
-
}, []),
|
|
996
|
-
if (
|
|
997
|
-
|
|
998
|
-
const y = e.findIndex((
|
|
999
|
-
|
|
1000
|
-
}, [
|
|
1001
|
-
|
|
1002
|
-
if (
|
|
1003
|
-
const y = (
|
|
1004
|
-
var
|
|
1005
|
-
(
|
|
1039
|
+
}, [A, M]);
|
|
1040
|
+
const $ = Q(() => {
|
|
1041
|
+
oe(null), H("");
|
|
1042
|
+
}, []), G = Q(() => {
|
|
1043
|
+
if (c) return;
|
|
1044
|
+
oe(window.matchMedia(ha).matches ? "popover" : "sheet"), H("");
|
|
1045
|
+
const y = e.findIndex((T) => T.value === n);
|
|
1046
|
+
ee(y >= 0 ? y : 0);
|
|
1047
|
+
}, [c, e, n]);
|
|
1048
|
+
F(() => {
|
|
1049
|
+
if (B !== "popover") return;
|
|
1050
|
+
const y = (T) => {
|
|
1051
|
+
var X;
|
|
1052
|
+
(X = E.current) != null && X.contains(T.target) || $();
|
|
1006
1053
|
};
|
|
1007
1054
|
return document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
|
|
1008
|
-
}, [
|
|
1055
|
+
}, [B, $]), F(() => {
|
|
1009
1056
|
var y;
|
|
1010
|
-
|
|
1011
|
-
}, [
|
|
1012
|
-
var y,
|
|
1013
|
-
|
|
1014
|
-
}, [
|
|
1015
|
-
const
|
|
1016
|
-
y.isDisabled || (
|
|
1017
|
-
},
|
|
1018
|
-
|
|
1057
|
+
B === "popover" && ((y = j.current) == null || y.focus({ preventScroll: !0 }));
|
|
1058
|
+
}, [B]), F(() => {
|
|
1059
|
+
var y, T;
|
|
1060
|
+
M && ((T = (y = te.current) == null ? void 0 : y.querySelector(`[data-index="${U}"]`)) == null || T.scrollIntoView({ block: "nearest" }));
|
|
1061
|
+
}, [U, M, _e.length]);
|
|
1062
|
+
const K = (y) => {
|
|
1063
|
+
y.isDisabled || (ke(y.label), t(y.value), $());
|
|
1064
|
+
}, Ae = Y(!1);
|
|
1065
|
+
F(() => {
|
|
1019
1066
|
var y;
|
|
1020
|
-
|
|
1021
|
-
}, [
|
|
1022
|
-
const
|
|
1023
|
-
const
|
|
1067
|
+
Ae.current && !M && ((y = S.current) == null || y.focus()), Ae.current = M;
|
|
1068
|
+
}, [M]);
|
|
1069
|
+
const Va = (y) => {
|
|
1070
|
+
const T = _e.length - 1;
|
|
1024
1071
|
switch (y.key) {
|
|
1025
1072
|
case "ArrowDown":
|
|
1026
|
-
y.preventDefault(),
|
|
1073
|
+
y.preventDefault(), ee((X) => X >= T ? 0 : X + 1);
|
|
1027
1074
|
break;
|
|
1028
1075
|
case "ArrowUp":
|
|
1029
|
-
y.preventDefault(),
|
|
1076
|
+
y.preventDefault(), ee((X) => X <= 0 ? T : X - 1);
|
|
1030
1077
|
break;
|
|
1031
1078
|
case "Home":
|
|
1032
|
-
y.preventDefault(),
|
|
1079
|
+
y.preventDefault(), ee(0);
|
|
1033
1080
|
break;
|
|
1034
1081
|
case "End":
|
|
1035
|
-
y.preventDefault(),
|
|
1082
|
+
y.preventDefault(), ee(T);
|
|
1036
1083
|
break;
|
|
1037
1084
|
case "Enter": {
|
|
1038
1085
|
y.preventDefault();
|
|
1039
|
-
const
|
|
1040
|
-
|
|
1086
|
+
const X = _e[U];
|
|
1087
|
+
X && K(X);
|
|
1041
1088
|
break;
|
|
1042
1089
|
}
|
|
1043
1090
|
case "Escape":
|
|
1044
|
-
y.preventDefault(),
|
|
1091
|
+
y.preventDefault(), $();
|
|
1045
1092
|
break;
|
|
1046
1093
|
case "Tab":
|
|
1047
|
-
|
|
1094
|
+
$();
|
|
1048
1095
|
break;
|
|
1049
1096
|
}
|
|
1050
|
-
},
|
|
1051
|
-
t(null),
|
|
1052
|
-
},
|
|
1053
|
-
/* @__PURE__ */ a(
|
|
1097
|
+
}, ba = () => {
|
|
1098
|
+
t(null), ke(null);
|
|
1099
|
+
}, ma = i ? null : /* @__PURE__ */ _("div", { className: R.combobox__search, children: [
|
|
1100
|
+
/* @__PURE__ */ a($n, { className: R.combobox__searchIcon }),
|
|
1054
1101
|
/* @__PURE__ */ a(
|
|
1055
1102
|
"input",
|
|
1056
1103
|
{
|
|
1057
|
-
ref:
|
|
1104
|
+
ref: j,
|
|
1058
1105
|
type: "text",
|
|
1059
1106
|
role: "combobox",
|
|
1060
|
-
className:
|
|
1061
|
-
value:
|
|
1062
|
-
placeholder:
|
|
1107
|
+
className: R.combobox__searchInput,
|
|
1108
|
+
value: A,
|
|
1109
|
+
placeholder: f.search,
|
|
1063
1110
|
autoComplete: "off",
|
|
1064
1111
|
"aria-autocomplete": "list",
|
|
1065
1112
|
"aria-expanded": !0,
|
|
1066
|
-
"aria-controls":
|
|
1067
|
-
"aria-activedescendant":
|
|
1068
|
-
"aria-label":
|
|
1113
|
+
"aria-controls": L,
|
|
1114
|
+
"aria-activedescendant": _e[U] ? `${x}-option-${U}` : void 0,
|
|
1115
|
+
"aria-label": f.search,
|
|
1069
1116
|
onChange: (y) => {
|
|
1070
|
-
|
|
1117
|
+
H(y.target.value), ee(0);
|
|
1071
1118
|
},
|
|
1072
|
-
onKeyDown:
|
|
1119
|
+
onKeyDown: Va
|
|
1073
1120
|
}
|
|
1074
1121
|
),
|
|
1075
|
-
s && /* @__PURE__ */ a(
|
|
1076
|
-
] }),
|
|
1122
|
+
s && /* @__PURE__ */ a(Ba, { size: "sm", label: "" })
|
|
1123
|
+
] }), ga = (y) => /* @__PURE__ */ _(
|
|
1077
1124
|
"ul",
|
|
1078
1125
|
{
|
|
1079
|
-
ref:
|
|
1080
|
-
id:
|
|
1126
|
+
ref: te,
|
|
1127
|
+
id: L,
|
|
1081
1128
|
role: "listbox",
|
|
1082
|
-
className: d(
|
|
1129
|
+
className: d(R.combobox__list, y && R["combobox__list--sheet"]),
|
|
1083
1130
|
children: [
|
|
1084
|
-
|
|
1085
|
-
const
|
|
1131
|
+
_e.map((T, X) => {
|
|
1132
|
+
const Wa = X === U, la = T.value === n;
|
|
1086
1133
|
return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ _(
|
|
1087
1134
|
"div",
|
|
1088
1135
|
{
|
|
1089
|
-
id: `${
|
|
1136
|
+
id: `${x}-option-${X}`,
|
|
1090
1137
|
role: "option",
|
|
1091
|
-
"data-index":
|
|
1092
|
-
"aria-selected":
|
|
1093
|
-
"aria-disabled":
|
|
1138
|
+
"data-index": X,
|
|
1139
|
+
"aria-selected": la,
|
|
1140
|
+
"aria-disabled": T.isDisabled,
|
|
1094
1141
|
className: d(
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1142
|
+
R.combobox__option,
|
|
1143
|
+
Wa && R["combobox__option--active"],
|
|
1144
|
+
la && R["combobox__option--selected"],
|
|
1145
|
+
T.isDisabled && R["combobox__option--disabled"]
|
|
1099
1146
|
),
|
|
1100
|
-
onMouseEnter: () =>
|
|
1101
|
-
onClick: () =>
|
|
1147
|
+
onMouseEnter: () => ee(X),
|
|
1148
|
+
onClick: () => K(T),
|
|
1102
1149
|
children: [
|
|
1103
|
-
/* @__PURE__ */ _("span", { className:
|
|
1104
|
-
/* @__PURE__ */ a("span", { className:
|
|
1105
|
-
|
|
1150
|
+
/* @__PURE__ */ _("span", { className: R.combobox__optionText, children: [
|
|
1151
|
+
/* @__PURE__ */ a("span", { className: R.combobox__optionLabel, children: T.label }),
|
|
1152
|
+
T.description && /* @__PURE__ */ a("span", { className: R.combobox__optionDescription, children: T.description })
|
|
1106
1153
|
] }),
|
|
1107
|
-
|
|
1154
|
+
la && /* @__PURE__ */ a(Pa, { className: R.combobox__check })
|
|
1108
1155
|
]
|
|
1109
1156
|
}
|
|
1110
|
-
) },
|
|
1157
|
+
) }, T.value);
|
|
1111
1158
|
}),
|
|
1112
|
-
|
|
1159
|
+
_e.length === 0 && /* @__PURE__ */ a("li", { className: R.combobox__empty, children: s ? f.loading : f.empty })
|
|
1113
1160
|
]
|
|
1114
1161
|
}
|
|
1115
1162
|
);
|
|
1116
|
-
return /* @__PURE__ */ _("div", { ref:
|
|
1163
|
+
return /* @__PURE__ */ _("div", { ref: E, className: d(R.combobox, g), "data-testid": h, children: [
|
|
1117
1164
|
/* @__PURE__ */ _(
|
|
1118
1165
|
"button",
|
|
1119
1166
|
{
|
|
1120
|
-
ref:
|
|
1121
|
-
id:
|
|
1167
|
+
ref: S,
|
|
1168
|
+
id: x,
|
|
1122
1169
|
type: "button",
|
|
1123
1170
|
className: d(
|
|
1124
|
-
|
|
1125
|
-
!
|
|
1126
|
-
|
|
1127
|
-
|
|
1171
|
+
R.combobox__trigger,
|
|
1172
|
+
!Re && R["combobox__trigger--empty"],
|
|
1173
|
+
M && R["combobox__trigger--open"],
|
|
1174
|
+
N && R["combobox__trigger--invalid"]
|
|
1128
1175
|
),
|
|
1129
|
-
disabled:
|
|
1176
|
+
disabled: c,
|
|
1130
1177
|
"aria-haspopup": "listbox",
|
|
1131
|
-
"aria-expanded":
|
|
1132
|
-
"aria-controls":
|
|
1178
|
+
"aria-expanded": M,
|
|
1179
|
+
"aria-controls": M ? L : void 0,
|
|
1133
1180
|
"aria-label": o.placeholder,
|
|
1134
|
-
"aria-describedby":
|
|
1135
|
-
onClick: () =>
|
|
1181
|
+
"aria-describedby": p,
|
|
1182
|
+
onClick: () => M ? $() : G(),
|
|
1136
1183
|
children: [
|
|
1137
|
-
|
|
1138
|
-
/* @__PURE__ */ a("span", { className:
|
|
1139
|
-
|
|
1184
|
+
u && /* @__PURE__ */ a("span", { className: R.combobox__leadingIcon, "aria-hidden": !0, children: u }),
|
|
1185
|
+
/* @__PURE__ */ a("span", { className: R.combobox__value, children: Re ?? o.placeholder }),
|
|
1186
|
+
l && Re && !c && /*
|
|
1140
1187
|
Temizleme, tetikleyicinin İÇİNDE ayrı bir düğme olamaz (iç içe
|
|
1141
1188
|
düğme geçersiz HTML). Görsel olarak içeride duran, DOM'da kardeş
|
|
1142
1189
|
olan bir düğme kullanılır.
|
|
@@ -1146,342 +1193,343 @@ const Gn = h(Ha), Un = "hanui-group-0tnVf", ya = {
|
|
|
1146
1193
|
{
|
|
1147
1194
|
role: "button",
|
|
1148
1195
|
tabIndex: 0,
|
|
1149
|
-
className:
|
|
1150
|
-
"aria-label":
|
|
1196
|
+
className: R.combobox__clear,
|
|
1197
|
+
"aria-label": f.clear,
|
|
1151
1198
|
onClick: (y) => {
|
|
1152
|
-
y.stopPropagation(),
|
|
1199
|
+
y.stopPropagation(), ba();
|
|
1153
1200
|
},
|
|
1154
1201
|
onKeyDown: (y) => {
|
|
1155
|
-
y.key !== "Enter" && y.key !== " " || (y.preventDefault(), y.stopPropagation(),
|
|
1202
|
+
y.key !== "Enter" && y.key !== " " || (y.preventDefault(), y.stopPropagation(), ba());
|
|
1156
1203
|
},
|
|
1157
|
-
children: /* @__PURE__ */ a(
|
|
1204
|
+
children: /* @__PURE__ */ a(pa, {})
|
|
1158
1205
|
}
|
|
1159
1206
|
),
|
|
1160
1207
|
/* @__PURE__ */ a(
|
|
1161
|
-
|
|
1208
|
+
Oa,
|
|
1162
1209
|
{
|
|
1163
|
-
className: d(
|
|
1210
|
+
className: d(R.combobox__chevron, M && R["combobox__chevron--open"])
|
|
1164
1211
|
}
|
|
1165
1212
|
)
|
|
1166
1213
|
]
|
|
1167
1214
|
}
|
|
1168
1215
|
),
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1216
|
+
B === "popover" && /* @__PURE__ */ _("div", { className: R.combobox__panel, children: [
|
|
1217
|
+
ma,
|
|
1218
|
+
ga(!1)
|
|
1172
1219
|
] }),
|
|
1173
|
-
|
|
1174
|
-
|
|
1220
|
+
B === "sheet" && /* @__PURE__ */ a(
|
|
1221
|
+
Ga,
|
|
1175
1222
|
{
|
|
1176
1223
|
title: o.placeholder,
|
|
1177
|
-
closeLabel: o.closeLabel,
|
|
1178
|
-
onClose:
|
|
1179
|
-
toolbar:
|
|
1180
|
-
children:
|
|
1224
|
+
closeLabel: o.closeLabel ?? (m == null ? void 0 : m.close),
|
|
1225
|
+
onClose: $,
|
|
1226
|
+
toolbar: ma ?? void 0,
|
|
1227
|
+
children: ga(!0)
|
|
1181
1228
|
}
|
|
1182
1229
|
)
|
|
1183
1230
|
] });
|
|
1184
|
-
},
|
|
1185
|
-
select:
|
|
1186
|
-
trigger:
|
|
1231
|
+
}, Qs = v(xt), kt = "hanui-select-tiiPL", Nt = "hanui-trigger-rHQJz", wt = "hanui-trigger__icon-apCcx", $t = "hanui-trigger__value-ioH7K", Dt = "hanui-trigger__chevron-FtsIZ", Lt = "hanui-panel-rGOOd", Ct = "hanui-list-SOKf8", It = "hanui-option-ZDPef", Et = "hanui-option__label-SsoYB", Mt = "hanui-option__check-8CPSG", q = {
|
|
1232
|
+
select: kt,
|
|
1233
|
+
trigger: Nt,
|
|
1187
1234
|
"trigger--empty": "hanui-trigger--empty-cuinb",
|
|
1188
1235
|
"trigger--open": "hanui-trigger--open-1nsvu",
|
|
1189
1236
|
"trigger--sm": "hanui-trigger--sm-Xnu1C",
|
|
1190
|
-
trigger__icon:
|
|
1191
|
-
trigger__value:
|
|
1192
|
-
trigger__chevron:
|
|
1237
|
+
trigger__icon: wt,
|
|
1238
|
+
trigger__value: $t,
|
|
1239
|
+
trigger__chevron: Dt,
|
|
1193
1240
|
"trigger__chevron--open": "hanui-trigger__chevron--open-1P2P-",
|
|
1194
|
-
panel:
|
|
1241
|
+
panel: Lt,
|
|
1195
1242
|
"hanui-fade-in-up": "hanui-hanui-fade-in-up-Lt0Bt",
|
|
1196
1243
|
"panel--start": "hanui-panel--start-Fotwa",
|
|
1197
1244
|
"panel--end": "hanui-panel--end-ClVl2",
|
|
1198
|
-
list:
|
|
1245
|
+
list: Ct,
|
|
1199
1246
|
"list--sheet": "hanui-list--sheet-BIjCb",
|
|
1200
|
-
option:
|
|
1247
|
+
option: It,
|
|
1201
1248
|
"option--active": "hanui-option--active-R4lLF",
|
|
1202
1249
|
"option--selected": "hanui-option--selected-glQMj",
|
|
1203
1250
|
"option--disabled": "hanui-option--disabled-h4rdd",
|
|
1204
|
-
option__label:
|
|
1205
|
-
option__check:
|
|
1206
|
-
},
|
|
1251
|
+
option__label: Et,
|
|
1252
|
+
option__check: Mt
|
|
1253
|
+
}, Tt = ({
|
|
1207
1254
|
options: e,
|
|
1208
1255
|
value: n,
|
|
1209
1256
|
onChange: t,
|
|
1210
1257
|
label: o,
|
|
1211
|
-
placeholder:
|
|
1212
|
-
closeLabel:
|
|
1258
|
+
placeholder: i,
|
|
1259
|
+
closeLabel: r,
|
|
1213
1260
|
icon: s,
|
|
1214
|
-
size:
|
|
1215
|
-
align:
|
|
1216
|
-
isDisabled:
|
|
1217
|
-
id:
|
|
1218
|
-
className:
|
|
1219
|
-
testId:
|
|
1220
|
-
"aria-describedby":
|
|
1221
|
-
"aria-invalid":
|
|
1261
|
+
size: c = "md",
|
|
1262
|
+
align: l = "start",
|
|
1263
|
+
isDisabled: u,
|
|
1264
|
+
id: b,
|
|
1265
|
+
className: g,
|
|
1266
|
+
testId: h,
|
|
1267
|
+
"aria-describedby": p,
|
|
1268
|
+
"aria-invalid": N
|
|
1222
1269
|
}) => {
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1225
|
-
}, [
|
|
1226
|
-
|
|
1227
|
-
},
|
|
1228
|
-
|
|
1229
|
-
var
|
|
1230
|
-
|
|
1231
|
-
}, [
|
|
1232
|
-
if (
|
|
1233
|
-
const
|
|
1234
|
-
var
|
|
1235
|
-
(
|
|
1270
|
+
const { labels: m } = P(), f = I("Select.placeholder", i, m == null ? void 0 : m.selectPlaceholder), D = ce(), x = b ?? D, L = `${x}-listbox`, E = ($) => `${x}-option-${$}`, S = Y(null), j = Y(null), te = Y(null), [B, oe] = Z(null), [M, A] = Z(0), H = B !== null, U = e.findIndex(($) => $.value === n), ee = U >= 0 ? e[U] : null, de = Q(() => oe(null), []), ke = Q(() => {
|
|
1271
|
+
u || e.length === 0 || (oe(window.matchMedia(ha).matches ? "popover" : "sheet"), A(U >= 0 ? U : 0));
|
|
1272
|
+
}, [u, e.length, U]), _e = ($) => {
|
|
1273
|
+
$.isDisabled || (t($.value), de());
|
|
1274
|
+
}, ue = Y(!1);
|
|
1275
|
+
F(() => {
|
|
1276
|
+
var $;
|
|
1277
|
+
ue.current && !H && (($ = j.current) == null || $.focus()), ue.current = H;
|
|
1278
|
+
}, [H]), F(() => {
|
|
1279
|
+
if (B !== "popover") return;
|
|
1280
|
+
const $ = (G) => {
|
|
1281
|
+
var K;
|
|
1282
|
+
(K = S.current) != null && K.contains(G.target) || de();
|
|
1236
1283
|
};
|
|
1237
|
-
return document.addEventListener("mousedown",
|
|
1238
|
-
}, [
|
|
1239
|
-
var
|
|
1240
|
-
|
|
1241
|
-
}, [
|
|
1242
|
-
var
|
|
1243
|
-
|
|
1244
|
-
}, [
|
|
1245
|
-
const
|
|
1246
|
-
const
|
|
1247
|
-
if (!
|
|
1248
|
-
["ArrowDown", "ArrowUp", "Enter", " "].includes(
|
|
1284
|
+
return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
|
|
1285
|
+
}, [B, de]), F(() => {
|
|
1286
|
+
var $;
|
|
1287
|
+
B === "sheet" && (($ = te.current) == null || $.focus({ preventScroll: !0 }));
|
|
1288
|
+
}, [B]), F(() => {
|
|
1289
|
+
var $, G;
|
|
1290
|
+
H && ((G = ($ = te.current) == null ? void 0 : $.querySelector(`[data-index="${M}"]`)) == null || G.scrollIntoView({ block: "nearest" }));
|
|
1291
|
+
}, [M, H]);
|
|
1292
|
+
const Re = ($) => {
|
|
1293
|
+
const G = e.length - 1;
|
|
1294
|
+
if (!H) {
|
|
1295
|
+
["ArrowDown", "ArrowUp", "Enter", " "].includes($.key) && ($.preventDefault(), ke());
|
|
1249
1296
|
return;
|
|
1250
1297
|
}
|
|
1251
|
-
switch (
|
|
1298
|
+
switch ($.key) {
|
|
1252
1299
|
case "ArrowDown":
|
|
1253
|
-
|
|
1300
|
+
$.preventDefault(), A((K) => K >= G ? 0 : K + 1);
|
|
1254
1301
|
break;
|
|
1255
1302
|
case "ArrowUp":
|
|
1256
|
-
|
|
1303
|
+
$.preventDefault(), A((K) => K <= 0 ? G : K - 1);
|
|
1257
1304
|
break;
|
|
1258
1305
|
case "Home":
|
|
1259
|
-
|
|
1306
|
+
$.preventDefault(), A(0);
|
|
1260
1307
|
break;
|
|
1261
1308
|
case "End":
|
|
1262
|
-
|
|
1309
|
+
$.preventDefault(), A(G);
|
|
1263
1310
|
break;
|
|
1264
1311
|
case "Enter":
|
|
1265
1312
|
case " ": {
|
|
1266
|
-
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1313
|
+
$.preventDefault();
|
|
1314
|
+
const K = e[M];
|
|
1315
|
+
K && _e(K);
|
|
1269
1316
|
break;
|
|
1270
1317
|
}
|
|
1271
1318
|
case "Escape":
|
|
1272
|
-
|
|
1319
|
+
$.preventDefault(), de();
|
|
1273
1320
|
break;
|
|
1274
1321
|
case "Tab":
|
|
1275
|
-
|
|
1322
|
+
de();
|
|
1276
1323
|
break;
|
|
1277
1324
|
}
|
|
1278
|
-
},
|
|
1325
|
+
}, fe = ($) => /* @__PURE__ */ a(
|
|
1279
1326
|
"ul",
|
|
1280
1327
|
{
|
|
1281
|
-
ref:
|
|
1282
|
-
id:
|
|
1328
|
+
ref: te,
|
|
1329
|
+
id: L,
|
|
1283
1330
|
role: "listbox",
|
|
1284
1331
|
"aria-label": o,
|
|
1285
|
-
"aria-activedescendant":
|
|
1286
|
-
tabIndex:
|
|
1287
|
-
className: d(
|
|
1288
|
-
onKeyDown:
|
|
1289
|
-
children: e.map((
|
|
1290
|
-
const
|
|
1332
|
+
"aria-activedescendant": $ && e[M] ? E(M) : void 0,
|
|
1333
|
+
tabIndex: $ ? 0 : -1,
|
|
1334
|
+
className: d(q.list, $ && q["list--sheet"]),
|
|
1335
|
+
onKeyDown: $ ? Re : void 0,
|
|
1336
|
+
children: e.map((G, K) => {
|
|
1337
|
+
const Ae = G.value === n;
|
|
1291
1338
|
return /* @__PURE__ */ _(
|
|
1292
1339
|
"li",
|
|
1293
1340
|
{
|
|
1294
|
-
id:
|
|
1341
|
+
id: E(K),
|
|
1295
1342
|
role: "option",
|
|
1296
|
-
"data-index":
|
|
1297
|
-
"aria-selected":
|
|
1298
|
-
"aria-disabled":
|
|
1343
|
+
"data-index": K,
|
|
1344
|
+
"aria-selected": Ae,
|
|
1345
|
+
"aria-disabled": G.isDisabled,
|
|
1299
1346
|
className: d(
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1347
|
+
q.option,
|
|
1348
|
+
K === M && q["option--active"],
|
|
1349
|
+
Ae && q["option--selected"],
|
|
1350
|
+
G.isDisabled && q["option--disabled"]
|
|
1304
1351
|
),
|
|
1305
|
-
onMouseEnter: () =>
|
|
1306
|
-
onClick: () =>
|
|
1352
|
+
onMouseEnter: () => A(K),
|
|
1353
|
+
onClick: () => _e(G),
|
|
1307
1354
|
children: [
|
|
1308
|
-
/* @__PURE__ */ a("span", { className:
|
|
1309
|
-
|
|
1355
|
+
/* @__PURE__ */ a("span", { className: q.option__label, children: G.label }),
|
|
1356
|
+
Ae && /* @__PURE__ */ a(Pa, { className: q.option__check })
|
|
1310
1357
|
]
|
|
1311
1358
|
},
|
|
1312
|
-
|
|
1359
|
+
G.value
|
|
1313
1360
|
);
|
|
1314
1361
|
})
|
|
1315
1362
|
}
|
|
1316
1363
|
);
|
|
1317
|
-
return /* @__PURE__ */ _("span", { ref:
|
|
1364
|
+
return /* @__PURE__ */ _("span", { ref: S, className: d(q.select, g), "data-testid": h, children: [
|
|
1318
1365
|
/* @__PURE__ */ _(
|
|
1319
1366
|
"button",
|
|
1320
1367
|
{
|
|
1321
|
-
ref:
|
|
1322
|
-
id:
|
|
1368
|
+
ref: j,
|
|
1369
|
+
id: x,
|
|
1323
1370
|
type: "button",
|
|
1324
1371
|
role: "combobox",
|
|
1325
1372
|
className: d(
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
!
|
|
1329
|
-
|
|
1373
|
+
q.trigger,
|
|
1374
|
+
q[`trigger--${c}`],
|
|
1375
|
+
!ee && q["trigger--empty"],
|
|
1376
|
+
H && q["trigger--open"]
|
|
1330
1377
|
),
|
|
1331
|
-
disabled:
|
|
1378
|
+
disabled: u,
|
|
1332
1379
|
"aria-haspopup": "listbox",
|
|
1333
|
-
"aria-expanded":
|
|
1334
|
-
"aria-controls":
|
|
1335
|
-
"aria-activedescendant":
|
|
1380
|
+
"aria-expanded": H,
|
|
1381
|
+
"aria-controls": H ? L : void 0,
|
|
1382
|
+
"aria-activedescendant": B === "popover" && e[M] ? E(M) : void 0,
|
|
1336
1383
|
"aria-label": o,
|
|
1337
|
-
"aria-describedby":
|
|
1338
|
-
"aria-invalid":
|
|
1339
|
-
onClick: () =>
|
|
1340
|
-
onKeyDown:
|
|
1384
|
+
"aria-describedby": p,
|
|
1385
|
+
"aria-invalid": N,
|
|
1386
|
+
onClick: () => H ? de() : ke(),
|
|
1387
|
+
onKeyDown: Re,
|
|
1341
1388
|
children: [
|
|
1342
|
-
s && /* @__PURE__ */ a("span", { className:
|
|
1343
|
-
/* @__PURE__ */ a("span", { className:
|
|
1389
|
+
s && /* @__PURE__ */ a("span", { className: q.trigger__icon, "aria-hidden": !0, children: s }),
|
|
1390
|
+
/* @__PURE__ */ a("span", { className: q.trigger__value, children: (ee == null ? void 0 : ee.label) ?? f }),
|
|
1344
1391
|
/* @__PURE__ */ a(
|
|
1345
|
-
|
|
1392
|
+
Oa,
|
|
1346
1393
|
{
|
|
1347
|
-
className: d(
|
|
1394
|
+
className: d(q.trigger__chevron, H && q["trigger__chevron--open"])
|
|
1348
1395
|
}
|
|
1349
1396
|
)
|
|
1350
1397
|
]
|
|
1351
1398
|
}
|
|
1352
1399
|
),
|
|
1353
|
-
|
|
1354
|
-
|
|
1400
|
+
B === "popover" && /* @__PURE__ */ a("div", { className: d(q.panel, q[`panel--${l}`]), children: fe(!1) }),
|
|
1401
|
+
B === "sheet" && /* @__PURE__ */ a(Ga, { title: o, closeLabel: r ?? (m == null ? void 0 : m.close), onClose: de, children: fe(!0) })
|
|
1355
1402
|
] });
|
|
1356
|
-
},
|
|
1357
|
-
checkbox:
|
|
1358
|
-
checkbox__input:
|
|
1359
|
-
checkbox__body:
|
|
1360
|
-
checkbox__label:
|
|
1361
|
-
checkbox__hint:
|
|
1362
|
-
},
|
|
1363
|
-
({ label: e, hint: n, className: t, testId: o, ...
|
|
1364
|
-
/* @__PURE__ */ a("input", { ref:
|
|
1365
|
-
/* @__PURE__ */ _("span", { className:
|
|
1366
|
-
/* @__PURE__ */ a("span", { className:
|
|
1367
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
1403
|
+
}, Vs = v(Tt), Rt = "hanui-checkbox-FaFCj", At = "hanui-checkbox__input-nTHne", Bt = "hanui-checkbox__body-VAEW2", St = "hanui-checkbox__label-sSNZY", Ft = "hanui-checkbox__hint-ish-J", Ye = {
|
|
1404
|
+
checkbox: Rt,
|
|
1405
|
+
checkbox__input: At,
|
|
1406
|
+
checkbox__body: Bt,
|
|
1407
|
+
checkbox__label: St,
|
|
1408
|
+
checkbox__hint: Ft
|
|
1409
|
+
}, Ua = xe(
|
|
1410
|
+
({ label: e, hint: n, className: t, testId: o, ...i }, r) => /* @__PURE__ */ _("label", { className: d(Ye.checkbox, t), "data-testid": o, children: [
|
|
1411
|
+
/* @__PURE__ */ a("input", { ref: r, type: "checkbox", className: Ye.checkbox__input, ...i }),
|
|
1412
|
+
/* @__PURE__ */ _("span", { className: Ye.checkbox__body, children: [
|
|
1413
|
+
/* @__PURE__ */ a("span", { className: Ye.checkbox__label, children: e }),
|
|
1414
|
+
n && /* @__PURE__ */ a("span", { className: Ye.checkbox__hint, children: n })
|
|
1368
1415
|
] })
|
|
1369
1416
|
] })
|
|
1370
1417
|
);
|
|
1371
|
-
|
|
1372
|
-
const
|
|
1373
|
-
radio:
|
|
1374
|
-
radio__input:
|
|
1375
|
-
radio__body:
|
|
1376
|
-
radio__label:
|
|
1377
|
-
radio__hint:
|
|
1378
|
-
radio__count:
|
|
1379
|
-
},
|
|
1380
|
-
({ label: e, hint: n, count: t, className: o, testId:
|
|
1381
|
-
/* @__PURE__ */ a("input", { ref: s, type: "radio", className:
|
|
1382
|
-
/* @__PURE__ */ _("span", { className:
|
|
1383
|
-
/* @__PURE__ */ a("span", { className:
|
|
1384
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
1418
|
+
Ua.displayName = "Checkbox";
|
|
1419
|
+
const Ws = v(Ua), Pt = "hanui-radio-KoZak", Ot = "hanui-radio__input-gVMgh", Ht = "hanui-radio__body-oZWg6", zt = "hanui-radio__label-d-5ce", Kt = "hanui-radio__hint-baVbs", qt = "hanui-radio__count-OtkUM", Fe = {
|
|
1420
|
+
radio: Pt,
|
|
1421
|
+
radio__input: Ot,
|
|
1422
|
+
radio__body: Ht,
|
|
1423
|
+
radio__label: zt,
|
|
1424
|
+
radio__hint: Kt,
|
|
1425
|
+
radio__count: qt
|
|
1426
|
+
}, Xa = xe(
|
|
1427
|
+
({ label: e, hint: n, count: t, className: o, testId: i, ...r }, s) => /* @__PURE__ */ _("label", { className: d(Fe.radio, o), "data-testid": i, children: [
|
|
1428
|
+
/* @__PURE__ */ a("input", { ref: s, type: "radio", className: Fe.radio__input, ...r }),
|
|
1429
|
+
/* @__PURE__ */ _("span", { className: Fe.radio__body, children: [
|
|
1430
|
+
/* @__PURE__ */ a("span", { className: Fe.radio__label, children: e }),
|
|
1431
|
+
n && /* @__PURE__ */ a("span", { className: Fe.radio__hint, children: n })
|
|
1385
1432
|
] }),
|
|
1386
|
-
|
|
1433
|
+
Ge(t) && /* @__PURE__ */ a("span", { className: Fe.radio__count, children: t })
|
|
1387
1434
|
] })
|
|
1388
1435
|
);
|
|
1389
|
-
|
|
1390
|
-
const
|
|
1391
|
-
radioCard:
|
|
1392
|
-
radioCard__input:
|
|
1436
|
+
Xa.displayName = "Radio";
|
|
1437
|
+
const ec = v(Xa), jt = "hanui-radioCard-sndiC", Gt = "hanui-radioCard__input-6vuoD", Ut = "hanui-radioCard__indicator--x9LT", Xt = "hanui-radioCard__body-CFqoi", Pe = {
|
|
1438
|
+
radioCard: jt,
|
|
1439
|
+
radioCard__input: Gt,
|
|
1393
1440
|
"radioCard--selected": "hanui-radioCard--selected-Mi7ee",
|
|
1394
|
-
radioCard__indicator:
|
|
1441
|
+
radioCard__indicator: Ut,
|
|
1395
1442
|
"radioCard--disabled": "hanui-radioCard--disabled-YlYee",
|
|
1396
|
-
radioCard__body:
|
|
1397
|
-
},
|
|
1443
|
+
radioCard__body: Xt
|
|
1444
|
+
}, Yt = ({
|
|
1398
1445
|
name: e,
|
|
1399
1446
|
value: n,
|
|
1400
1447
|
isSelected: t,
|
|
1401
1448
|
isDisabled: o,
|
|
1402
|
-
onChange:
|
|
1403
|
-
children:
|
|
1449
|
+
onChange: i,
|
|
1450
|
+
children: r,
|
|
1404
1451
|
className: s,
|
|
1405
|
-
id:
|
|
1406
|
-
testId:
|
|
1452
|
+
id: c,
|
|
1453
|
+
testId: l
|
|
1407
1454
|
}) => /* @__PURE__ */ _(
|
|
1408
1455
|
"label",
|
|
1409
1456
|
{
|
|
1410
1457
|
className: d(
|
|
1411
|
-
|
|
1412
|
-
t &&
|
|
1413
|
-
o &&
|
|
1458
|
+
Pe.radioCard,
|
|
1459
|
+
t && Pe["radioCard--selected"],
|
|
1460
|
+
o && Pe["radioCard--disabled"],
|
|
1414
1461
|
s
|
|
1415
1462
|
),
|
|
1416
|
-
"data-testid":
|
|
1463
|
+
"data-testid": l,
|
|
1417
1464
|
children: [
|
|
1418
1465
|
/* @__PURE__ */ a(
|
|
1419
1466
|
"input",
|
|
1420
1467
|
{
|
|
1421
1468
|
type: "radio",
|
|
1422
|
-
id:
|
|
1469
|
+
id: c,
|
|
1423
1470
|
name: e,
|
|
1424
1471
|
value: n,
|
|
1425
1472
|
checked: t,
|
|
1426
1473
|
disabled: o,
|
|
1427
|
-
onChange: () =>
|
|
1428
|
-
className:
|
|
1474
|
+
onChange: () => i(n),
|
|
1475
|
+
className: Pe.radioCard__input
|
|
1429
1476
|
}
|
|
1430
1477
|
),
|
|
1431
|
-
/* @__PURE__ */ a("span", { className:
|
|
1432
|
-
/* @__PURE__ */ a("span", { className:
|
|
1478
|
+
/* @__PURE__ */ a("span", { className: Pe.radioCard__indicator, "aria-hidden": !0 }),
|
|
1479
|
+
/* @__PURE__ */ a("span", { className: Pe.radioCard__body, children: r })
|
|
1433
1480
|
]
|
|
1434
1481
|
}
|
|
1435
|
-
),
|
|
1436
|
-
range:
|
|
1482
|
+
), ac = v(Yt), Zt = "hanui-range-RpDPh", Jt = "hanui-range__readout-itDMd", Qt = "hanui-range__separator-u-ZJX", Vt = "hanui-range__track-bCh5Y", Wt = "hanui-range__fill-VXMCE", eo = "hanui-range__input-TAN2I", ao = "hanui-range__bounds-GIhFd", re = {
|
|
1483
|
+
range: Zt,
|
|
1437
1484
|
"range--disabled": "hanui-range--disabled-13hlc",
|
|
1438
|
-
range__readout:
|
|
1439
|
-
range__separator:
|
|
1440
|
-
range__track:
|
|
1441
|
-
range__fill:
|
|
1442
|
-
range__input:
|
|
1443
|
-
range__bounds:
|
|
1444
|
-
},
|
|
1485
|
+
range__readout: Jt,
|
|
1486
|
+
range__separator: Qt,
|
|
1487
|
+
range__track: Vt,
|
|
1488
|
+
range__fill: Wt,
|
|
1489
|
+
range__input: eo,
|
|
1490
|
+
range__bounds: ao
|
|
1491
|
+
}, no = ({
|
|
1445
1492
|
min: e,
|
|
1446
1493
|
max: n,
|
|
1447
1494
|
step: t = 1,
|
|
1448
1495
|
value: o,
|
|
1449
|
-
onChange:
|
|
1450
|
-
onCommit:
|
|
1496
|
+
onChange: i,
|
|
1497
|
+
onCommit: r,
|
|
1451
1498
|
formatValue: s = String,
|
|
1452
|
-
label:
|
|
1453
|
-
minLabel:
|
|
1454
|
-
maxLabel:
|
|
1455
|
-
isDisabled:
|
|
1456
|
-
className:
|
|
1457
|
-
testId:
|
|
1499
|
+
label: c,
|
|
1500
|
+
minLabel: l,
|
|
1501
|
+
maxLabel: u,
|
|
1502
|
+
isDisabled: b,
|
|
1503
|
+
className: g,
|
|
1504
|
+
testId: h
|
|
1458
1505
|
}) => {
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
[
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
[
|
|
1465
|
-
|
|
1506
|
+
var oe, M;
|
|
1507
|
+
const { labels: p } = P(), N = I("RangeSlider.minLabel", l, (oe = p == null ? void 0 : p.range) == null ? void 0 : oe.min), m = I("RangeSlider.maxLabel", u, (M = p == null ? void 0 : p.range) == null ? void 0 : M.max), [f, D] = o, x = Q(
|
|
1508
|
+
(A) => i([Math.min(A, D), D]),
|
|
1509
|
+
[D, i]
|
|
1510
|
+
), L = Q(
|
|
1511
|
+
(A) => i([f, Math.max(A, f)]),
|
|
1512
|
+
[f, i]
|
|
1513
|
+
), E = Q(() => r == null ? void 0 : r([f, D]), [f, D, r]), S = n - e, j = S === 0 ? 0 : fa(f - e, S), te = S === 0 ? 0 : fa(D - e, S), B = j > 50;
|
|
1466
1514
|
return /* @__PURE__ */ _(
|
|
1467
1515
|
"div",
|
|
1468
1516
|
{
|
|
1469
|
-
className: d(
|
|
1517
|
+
className: d(re.range, b && re["range--disabled"], g),
|
|
1470
1518
|
role: "group",
|
|
1471
|
-
"aria-label":
|
|
1472
|
-
"data-testid":
|
|
1519
|
+
"aria-label": c,
|
|
1520
|
+
"data-testid": h,
|
|
1473
1521
|
children: [
|
|
1474
|
-
/* @__PURE__ */ _("div", { className:
|
|
1475
|
-
/* @__PURE__ */ a("span", { className:
|
|
1476
|
-
/* @__PURE__ */ a("span", { className:
|
|
1477
|
-
/* @__PURE__ */ a("span", { className:
|
|
1522
|
+
/* @__PURE__ */ _("div", { className: re.range__readout, children: [
|
|
1523
|
+
/* @__PURE__ */ a("span", { className: re.range__value, children: s(f) }),
|
|
1524
|
+
/* @__PURE__ */ a("span", { className: re.range__separator, "aria-hidden": !0, children: "—" }),
|
|
1525
|
+
/* @__PURE__ */ a("span", { className: re.range__value, children: s(D) })
|
|
1478
1526
|
] }),
|
|
1479
|
-
/* @__PURE__ */ _("div", { className:
|
|
1527
|
+
/* @__PURE__ */ _("div", { className: re.range__track, children: [
|
|
1480
1528
|
/* @__PURE__ */ a(
|
|
1481
1529
|
"span",
|
|
1482
1530
|
{
|
|
1483
|
-
className:
|
|
1484
|
-
style: { left: `${
|
|
1531
|
+
className: re.range__fill,
|
|
1532
|
+
style: { left: `${j}%`, right: `${100 - te}%` },
|
|
1485
1533
|
"aria-hidden": !0
|
|
1486
1534
|
}
|
|
1487
1535
|
),
|
|
@@ -1489,341 +1537,362 @@ const Zs = h(Ka), Pt = "hanui-radioCard-sndiC", zt = "hanui-radioCard__input-6vu
|
|
|
1489
1537
|
"input",
|
|
1490
1538
|
{
|
|
1491
1539
|
type: "range",
|
|
1492
|
-
className:
|
|
1493
|
-
style: { zIndex:
|
|
1540
|
+
className: re.range__input,
|
|
1541
|
+
style: { zIndex: B ? 4 : 3 },
|
|
1494
1542
|
min: e,
|
|
1495
1543
|
max: n,
|
|
1496
1544
|
step: t,
|
|
1497
|
-
value:
|
|
1498
|
-
disabled:
|
|
1499
|
-
"aria-label": `${
|
|
1500
|
-
"aria-valuetext": s(
|
|
1501
|
-
onChange: (
|
|
1502
|
-
onPointerUp:
|
|
1503
|
-
onKeyUp:
|
|
1545
|
+
value: f,
|
|
1546
|
+
disabled: b,
|
|
1547
|
+
"aria-label": `${c} — ${N}`,
|
|
1548
|
+
"aria-valuetext": s(f),
|
|
1549
|
+
onChange: (A) => x(Number(A.target.value)),
|
|
1550
|
+
onPointerUp: E,
|
|
1551
|
+
onKeyUp: E
|
|
1504
1552
|
}
|
|
1505
1553
|
),
|
|
1506
1554
|
/* @__PURE__ */ a(
|
|
1507
1555
|
"input",
|
|
1508
1556
|
{
|
|
1509
1557
|
type: "range",
|
|
1510
|
-
className:
|
|
1511
|
-
style: { zIndex:
|
|
1558
|
+
className: re.range__input,
|
|
1559
|
+
style: { zIndex: B ? 3 : 4 },
|
|
1512
1560
|
min: e,
|
|
1513
1561
|
max: n,
|
|
1514
1562
|
step: t,
|
|
1515
|
-
value:
|
|
1516
|
-
disabled:
|
|
1517
|
-
"aria-label": `${
|
|
1518
|
-
"aria-valuetext": s(
|
|
1519
|
-
onChange: (
|
|
1520
|
-
onPointerUp:
|
|
1521
|
-
onKeyUp:
|
|
1563
|
+
value: D,
|
|
1564
|
+
disabled: b,
|
|
1565
|
+
"aria-label": `${c} — ${m}`,
|
|
1566
|
+
"aria-valuetext": s(D),
|
|
1567
|
+
onChange: (A) => L(Number(A.target.value)),
|
|
1568
|
+
onPointerUp: E,
|
|
1569
|
+
onKeyUp: E
|
|
1522
1570
|
}
|
|
1523
1571
|
)
|
|
1524
1572
|
] }),
|
|
1525
|
-
/* @__PURE__ */ _("div", { className:
|
|
1573
|
+
/* @__PURE__ */ _("div", { className: re.range__bounds, "aria-hidden": !0, children: [
|
|
1526
1574
|
/* @__PURE__ */ a("span", { children: s(e) }),
|
|
1527
1575
|
/* @__PURE__ */ a("span", { children: s(n) })
|
|
1528
1576
|
] })
|
|
1529
1577
|
]
|
|
1530
1578
|
}
|
|
1531
1579
|
);
|
|
1532
|
-
},
|
|
1533
|
-
rating:
|
|
1580
|
+
}, nc = v(no), to = "hanui-rating-neNnF", oo = "hanui-rating__legend-uYvFS", ro = "hanui-rating__stars-vJFLk", io = "hanui-rating__star-BANFJ", so = "hanui-rating__input-s2iiO", co = "hanui-rating__srOnly-iSCoz", lo = "hanui-rating__caption-13KFX", pe = {
|
|
1581
|
+
rating: to,
|
|
1534
1582
|
"rating--disabled": "hanui-rating--disabled-ZKjHa",
|
|
1535
|
-
rating__legend:
|
|
1536
|
-
rating__stars:
|
|
1537
|
-
rating__star:
|
|
1583
|
+
rating__legend: oo,
|
|
1584
|
+
rating__stars: ro,
|
|
1585
|
+
rating__star: io,
|
|
1538
1586
|
"rating__star--filled": "hanui-rating__star--filled-L3AkT",
|
|
1539
|
-
rating__input:
|
|
1540
|
-
rating__srOnly:
|
|
1541
|
-
rating__caption:
|
|
1542
|
-
},
|
|
1587
|
+
rating__input: so,
|
|
1588
|
+
rating__srOnly: co,
|
|
1589
|
+
rating__caption: lo
|
|
1590
|
+
}, _o = [1, 2, 3, 4, 5], uo = ({
|
|
1543
1591
|
value: e,
|
|
1544
1592
|
onChange: n,
|
|
1545
1593
|
label: t,
|
|
1546
1594
|
ratingLabels: o,
|
|
1547
|
-
formatStarCount:
|
|
1548
|
-
isDisabled:
|
|
1595
|
+
formatStarCount: i,
|
|
1596
|
+
isDisabled: r,
|
|
1549
1597
|
className: s,
|
|
1550
|
-
testId:
|
|
1598
|
+
testId: c
|
|
1551
1599
|
}) => {
|
|
1552
|
-
|
|
1600
|
+
var N;
|
|
1601
|
+
const { labels: l } = P(), u = o ?? ((N = l == null ? void 0 : l.rating) == null ? void 0 : N.scale), b = ce(), [g, h] = Z(null), p = g ?? e;
|
|
1553
1602
|
return /* @__PURE__ */ _(
|
|
1554
1603
|
"fieldset",
|
|
1555
1604
|
{
|
|
1556
|
-
className: d(
|
|
1557
|
-
disabled:
|
|
1558
|
-
"data-testid":
|
|
1605
|
+
className: d(pe.rating, r && pe["rating--disabled"], s),
|
|
1606
|
+
disabled: r,
|
|
1607
|
+
"data-testid": c,
|
|
1559
1608
|
children: [
|
|
1560
|
-
/* @__PURE__ */ a("legend", { className:
|
|
1561
|
-
/* @__PURE__ */ a("div", { className:
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
children: [
|
|
1570
|
-
/* @__PURE__ */ a(
|
|
1571
|
-
"input",
|
|
1572
|
-
{
|
|
1573
|
-
type: "radio",
|
|
1574
|
-
name: u,
|
|
1575
|
-
value: c,
|
|
1576
|
-
checked: e === c,
|
|
1577
|
-
onChange: () => n(c),
|
|
1578
|
-
className: le.rating__input
|
|
1579
|
-
}
|
|
1609
|
+
/* @__PURE__ */ a("legend", { className: pe.rating__legend, children: t }),
|
|
1610
|
+
/* @__PURE__ */ a("div", { className: pe.rating__stars, onMouseLeave: () => h(null), children: _o.map((m) => {
|
|
1611
|
+
var f;
|
|
1612
|
+
return /* @__PURE__ */ _(
|
|
1613
|
+
"label",
|
|
1614
|
+
{
|
|
1615
|
+
className: d(
|
|
1616
|
+
pe.rating__star,
|
|
1617
|
+
p !== null && m <= p && pe["rating__star--filled"]
|
|
1580
1618
|
),
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1619
|
+
onMouseEnter: () => h(m),
|
|
1620
|
+
children: [
|
|
1621
|
+
/* @__PURE__ */ a(
|
|
1622
|
+
"input",
|
|
1623
|
+
{
|
|
1624
|
+
type: "radio",
|
|
1625
|
+
name: b,
|
|
1626
|
+
value: m,
|
|
1627
|
+
checked: e === m,
|
|
1628
|
+
onChange: () => n(m),
|
|
1629
|
+
className: pe.rating__input
|
|
1630
|
+
}
|
|
1631
|
+
),
|
|
1632
|
+
/* @__PURE__ */ a(qa, {}),
|
|
1633
|
+
/* @__PURE__ */ _("span", { className: pe.rating__srOnly, children: [
|
|
1634
|
+
qe(
|
|
1635
|
+
"RatingInput.formatStarCount",
|
|
1636
|
+
i ?? ((f = l == null ? void 0 : l.rating) == null ? void 0 : f.starCount),
|
|
1637
|
+
m
|
|
1638
|
+
),
|
|
1639
|
+
" ",
|
|
1640
|
+
"— ",
|
|
1641
|
+
(u == null ? void 0 : u[m]) ?? ""
|
|
1642
|
+
] })
|
|
1643
|
+
]
|
|
1644
|
+
},
|
|
1645
|
+
m
|
|
1646
|
+
);
|
|
1647
|
+
}) }),
|
|
1648
|
+
p !== null && /* @__PURE__ */ a("span", { className: pe.rating__caption, "aria-hidden": !0, children: (u == null ? void 0 : u[p]) ?? "" })
|
|
1592
1649
|
]
|
|
1593
1650
|
}
|
|
1594
1651
|
);
|
|
1595
|
-
},
|
|
1596
|
-
stepper:
|
|
1597
|
-
stepper__button:
|
|
1598
|
-
stepper__input:
|
|
1652
|
+
}, tc = v(uo), ho = "hanui-stepper-8s5Ih", po = "hanui-stepper__button-h6g7d", bo = "hanui-stepper__input-OQh5v", Ze = {
|
|
1653
|
+
stepper: ho,
|
|
1654
|
+
stepper__button: po,
|
|
1655
|
+
stepper__input: bo,
|
|
1599
1656
|
"stepper--sm": "hanui-stepper--sm-RvrBP",
|
|
1600
1657
|
"stepper--md": "hanui-stepper--md-Cnjei"
|
|
1601
|
-
},
|
|
1658
|
+
}, mo = ({
|
|
1602
1659
|
value: e,
|
|
1603
1660
|
onChange: n,
|
|
1604
1661
|
label: t,
|
|
1605
1662
|
decreaseLabel: o,
|
|
1606
|
-
increaseLabel:
|
|
1607
|
-
min:
|
|
1663
|
+
increaseLabel: i,
|
|
1664
|
+
min: r = 1,
|
|
1608
1665
|
max: s = 99,
|
|
1609
|
-
isDisabled:
|
|
1610
|
-
size:
|
|
1611
|
-
className:
|
|
1612
|
-
testId:
|
|
1666
|
+
isDisabled: c,
|
|
1667
|
+
size: l = "md",
|
|
1668
|
+
className: u,
|
|
1669
|
+
testId: b
|
|
1613
1670
|
}) => {
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1671
|
+
var f, D, x;
|
|
1672
|
+
const { labels: g } = P(), h = I("QuantityStepper.label", t, (f = g == null ? void 0 : g.quantity) == null ? void 0 : f.label), [p, N] = Z(null), m = (L) => {
|
|
1673
|
+
N(null);
|
|
1674
|
+
const E = Number(L.replace(/\D/g, ""));
|
|
1675
|
+
E && n(Math.min(Math.max(E, r), s));
|
|
1618
1676
|
};
|
|
1619
1677
|
return /* @__PURE__ */ _(
|
|
1620
1678
|
"div",
|
|
1621
1679
|
{
|
|
1622
|
-
className: d(
|
|
1680
|
+
className: d(Ze.stepper, Ze[`stepper--${l}`], u),
|
|
1623
1681
|
role: "group",
|
|
1624
|
-
"aria-label":
|
|
1625
|
-
"data-testid":
|
|
1682
|
+
"aria-label": h,
|
|
1683
|
+
"data-testid": b,
|
|
1626
1684
|
children: [
|
|
1627
1685
|
/* @__PURE__ */ a(
|
|
1628
1686
|
"button",
|
|
1629
1687
|
{
|
|
1630
1688
|
type: "button",
|
|
1631
|
-
className:
|
|
1632
|
-
onClick: () => n(Math.max(e - 1,
|
|
1633
|
-
disabled:
|
|
1634
|
-
"aria-label":
|
|
1635
|
-
|
|
1689
|
+
className: Ze.stepper__button,
|
|
1690
|
+
onClick: () => n(Math.max(e - 1, r)),
|
|
1691
|
+
disabled: c || e <= r,
|
|
1692
|
+
"aria-label": I(
|
|
1693
|
+
"QuantityStepper.decreaseLabel",
|
|
1694
|
+
o,
|
|
1695
|
+
(D = g == null ? void 0 : g.quantity) == null ? void 0 : D.decrease
|
|
1696
|
+
),
|
|
1697
|
+
children: /* @__PURE__ */ a(Ln, {})
|
|
1636
1698
|
}
|
|
1637
1699
|
),
|
|
1638
1700
|
/* @__PURE__ */ a(
|
|
1639
1701
|
"input",
|
|
1640
1702
|
{
|
|
1641
|
-
className:
|
|
1642
|
-
value:
|
|
1643
|
-
onChange: (
|
|
1644
|
-
onBlur: (
|
|
1645
|
-
onKeyDown: (
|
|
1646
|
-
|
|
1703
|
+
className: Ze.stepper__input,
|
|
1704
|
+
value: p ?? String(e),
|
|
1705
|
+
onChange: (L) => N(L.target.value.replace(/\D/g, "").slice(0, 2)),
|
|
1706
|
+
onBlur: (L) => m(L.target.value),
|
|
1707
|
+
onKeyDown: (L) => {
|
|
1708
|
+
L.key === "Enter" && (L.preventDefault(), m(L.target.value));
|
|
1647
1709
|
},
|
|
1648
1710
|
inputMode: "numeric",
|
|
1649
|
-
disabled:
|
|
1650
|
-
"aria-label": `${
|
|
1711
|
+
disabled: c,
|
|
1712
|
+
"aria-label": `${h} (${r}-${s})`
|
|
1651
1713
|
}
|
|
1652
1714
|
),
|
|
1653
1715
|
/* @__PURE__ */ a(
|
|
1654
1716
|
"button",
|
|
1655
1717
|
{
|
|
1656
1718
|
type: "button",
|
|
1657
|
-
className:
|
|
1719
|
+
className: Ze.stepper__button,
|
|
1658
1720
|
onClick: () => n(Math.min(e + 1, s)),
|
|
1659
|
-
disabled:
|
|
1660
|
-
"aria-label":
|
|
1661
|
-
|
|
1721
|
+
disabled: c || e >= s,
|
|
1722
|
+
"aria-label": I(
|
|
1723
|
+
"QuantityStepper.increaseLabel",
|
|
1724
|
+
i,
|
|
1725
|
+
(x = g == null ? void 0 : g.quantity) == null ? void 0 : x.increase
|
|
1726
|
+
),
|
|
1727
|
+
children: /* @__PURE__ */ a(Dn, {})
|
|
1662
1728
|
}
|
|
1663
1729
|
)
|
|
1664
1730
|
]
|
|
1665
1731
|
}
|
|
1666
1732
|
);
|
|
1667
|
-
},
|
|
1668
|
-
checkbox:
|
|
1669
|
-
},
|
|
1670
|
-
({ label: e, className: n, testId: t, ...o },
|
|
1733
|
+
}, oc = v(mo), go = "hanui-checkbox--dvpB", fo = {
|
|
1734
|
+
checkbox: go
|
|
1735
|
+
}, Ya = xe(
|
|
1736
|
+
({ label: e, className: n, testId: t, ...o }, i) => /* @__PURE__ */ a(
|
|
1671
1737
|
"input",
|
|
1672
1738
|
{
|
|
1673
|
-
ref:
|
|
1739
|
+
ref: i,
|
|
1674
1740
|
type: "checkbox",
|
|
1675
1741
|
"aria-label": e,
|
|
1676
|
-
className: d(
|
|
1742
|
+
className: d(fo.checkbox, n),
|
|
1677
1743
|
"data-testid": t,
|
|
1678
1744
|
...o
|
|
1679
1745
|
}
|
|
1680
1746
|
)
|
|
1681
1747
|
);
|
|
1682
|
-
|
|
1683
|
-
const
|
|
1684
|
-
wrapper:
|
|
1685
|
-
wrapper__prefix:
|
|
1686
|
-
wrapper__suffix:
|
|
1687
|
-
input:
|
|
1748
|
+
Ya.displayName = "TableCheckbox";
|
|
1749
|
+
const rc = v(Ya), yo = "hanui-wrapper-IAI4E", vo = "hanui-wrapper__prefix-XKDlV", xo = "hanui-wrapper__suffix-lT35q", ko = "hanui-input-pIS2u", Ne = {
|
|
1750
|
+
wrapper: yo,
|
|
1751
|
+
wrapper__prefix: vo,
|
|
1752
|
+
wrapper__suffix: xo,
|
|
1753
|
+
input: ko,
|
|
1688
1754
|
"input--hasPrefix": "hanui-input--hasPrefix-nsrWh",
|
|
1689
1755
|
"input--hasSuffix": "hanui-input--hasSuffix-OrE5A",
|
|
1690
1756
|
"input--technical": "hanui-input--technical---DCD"
|
|
1691
|
-
},
|
|
1692
|
-
({ prefix: e, suffix: n, isTechnical: t, className: o, testId:
|
|
1693
|
-
e && /* @__PURE__ */ a("span", { className:
|
|
1757
|
+
}, Za = xe(
|
|
1758
|
+
({ prefix: e, suffix: n, isTechnical: t, className: o, testId: i, ...r }, s) => /* @__PURE__ */ _("span", { className: d(Ne.wrapper, o), children: [
|
|
1759
|
+
e && /* @__PURE__ */ a("span", { className: Ne.wrapper__prefix, "aria-hidden": !0, children: e }),
|
|
1694
1760
|
/* @__PURE__ */ a(
|
|
1695
1761
|
"input",
|
|
1696
1762
|
{
|
|
1697
1763
|
ref: s,
|
|
1698
1764
|
className: d(
|
|
1699
|
-
|
|
1765
|
+
Ne.input,
|
|
1700
1766
|
/* `Boolean(...)`: `prefix` bir `ReactNode` ve `0` da gecerli bir
|
|
1701
1767
|
deger — `prefix &&` ifadesi o durumda dize degil sayi donuyordu. */
|
|
1702
|
-
!!e &&
|
|
1703
|
-
!!n &&
|
|
1704
|
-
t &&
|
|
1768
|
+
!!e && Ne["input--hasPrefix"],
|
|
1769
|
+
!!n && Ne["input--hasSuffix"],
|
|
1770
|
+
t && Ne["input--technical"]
|
|
1705
1771
|
),
|
|
1706
|
-
"data-testid":
|
|
1707
|
-
...
|
|
1772
|
+
"data-testid": i,
|
|
1773
|
+
...r
|
|
1708
1774
|
}
|
|
1709
1775
|
),
|
|
1710
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
1776
|
+
n && /* @__PURE__ */ a("span", { className: Ne.wrapper__suffix, "aria-hidden": !0, children: n })
|
|
1711
1777
|
] })
|
|
1712
1778
|
);
|
|
1713
|
-
|
|
1714
|
-
const
|
|
1715
|
-
textarea:
|
|
1716
|
-
},
|
|
1717
|
-
({ className: e, rows: n = 4, testId: t, ...o },
|
|
1779
|
+
Za.displayName = "Input";
|
|
1780
|
+
const No = v(Za), wo = "hanui-textarea-zwJcB", $o = {
|
|
1781
|
+
textarea: wo
|
|
1782
|
+
}, Ja = xe(
|
|
1783
|
+
({ className: e, rows: n = 4, testId: t, ...o }, i) => /* @__PURE__ */ a(
|
|
1718
1784
|
"textarea",
|
|
1719
1785
|
{
|
|
1720
|
-
ref:
|
|
1786
|
+
ref: i,
|
|
1721
1787
|
rows: n,
|
|
1722
|
-
className: d(
|
|
1788
|
+
className: d($o.textarea, e),
|
|
1723
1789
|
"data-testid": t,
|
|
1724
1790
|
...o
|
|
1725
1791
|
}
|
|
1726
1792
|
)
|
|
1727
1793
|
);
|
|
1728
|
-
|
|
1729
|
-
const
|
|
1730
|
-
field:
|
|
1731
|
-
field__label:
|
|
1794
|
+
Ja.displayName = "Textarea";
|
|
1795
|
+
const Do = v(Ja), Lo = "hanui-field-KKvre", Co = "hanui-field__label-9dlYd", Io = "hanui-field__required-hbDJk", Eo = "hanui-field__srOnly-2WQFH", Mo = "hanui-field__hint-SQPiL", To = "hanui-field__error-gLlZ-", we = {
|
|
1796
|
+
field: Lo,
|
|
1797
|
+
field__label: Co,
|
|
1732
1798
|
"field__label--hidden": "hanui-field__label--hidden-ufuVt",
|
|
1733
|
-
field__required:
|
|
1734
|
-
field__srOnly:
|
|
1735
|
-
field__hint:
|
|
1736
|
-
field__error:
|
|
1737
|
-
},
|
|
1799
|
+
field__required: Io,
|
|
1800
|
+
field__srOnly: Eo,
|
|
1801
|
+
field__hint: Mo,
|
|
1802
|
+
field__error: To
|
|
1803
|
+
}, Ro = ({
|
|
1738
1804
|
label: e,
|
|
1739
1805
|
children: n,
|
|
1740
1806
|
hint: t,
|
|
1741
1807
|
error: o,
|
|
1742
|
-
isRequired:
|
|
1743
|
-
requiredLabel:
|
|
1808
|
+
isRequired: i,
|
|
1809
|
+
requiredLabel: r,
|
|
1744
1810
|
isLabelHidden: s,
|
|
1745
|
-
className:
|
|
1811
|
+
className: c
|
|
1746
1812
|
}) => {
|
|
1747
|
-
const u =
|
|
1748
|
-
return /* @__PURE__ */ _("div", { className: d(
|
|
1813
|
+
const { labels: l } = P(), u = ce(), b = `${u}-error`, g = `${u}-hint`;
|
|
1814
|
+
return /* @__PURE__ */ _("div", { className: d(we.field, c), children: [
|
|
1749
1815
|
/* @__PURE__ */ _(
|
|
1750
1816
|
"label",
|
|
1751
1817
|
{
|
|
1752
1818
|
htmlFor: u,
|
|
1753
|
-
className: d(
|
|
1819
|
+
className: d(we.field__label, s && we["field__label--hidden"]),
|
|
1754
1820
|
children: [
|
|
1755
1821
|
e,
|
|
1756
|
-
|
|
1757
|
-
/* @__PURE__ */ a("span", { className:
|
|
1758
|
-
/* @__PURE__ */ a("span", { className:
|
|
1822
|
+
i && /* @__PURE__ */ _(aa, { children: [
|
|
1823
|
+
/* @__PURE__ */ a("span", { className: we.field__required, "aria-hidden": !0, children: "*" }),
|
|
1824
|
+
/* @__PURE__ */ a("span", { className: we.field__srOnly, children: I("Field.requiredLabel", r, l == null ? void 0 : l.required) })
|
|
1759
1825
|
] })
|
|
1760
1826
|
]
|
|
1761
1827
|
}
|
|
1762
1828
|
),
|
|
1763
1829
|
n({
|
|
1764
1830
|
id: u,
|
|
1765
|
-
required:
|
|
1831
|
+
required: i || void 0,
|
|
1766
1832
|
"aria-invalid": o ? !0 : void 0,
|
|
1767
|
-
"aria-describedby": o ?
|
|
1833
|
+
"aria-describedby": o ? b : t ? g : void 0
|
|
1768
1834
|
}),
|
|
1769
|
-
o ? /* @__PURE__ */ _("p", { id:
|
|
1770
|
-
/* @__PURE__ */ a(
|
|
1835
|
+
o ? /* @__PURE__ */ _("p", { id: b, className: we.field__error, role: "alert", children: [
|
|
1836
|
+
/* @__PURE__ */ a(Ka, {}),
|
|
1771
1837
|
o
|
|
1772
|
-
] }) : t && /* @__PURE__ */ a("p", { id:
|
|
1838
|
+
] }) : t && /* @__PURE__ */ a("p", { id: g, className: we.field__hint, children: t })
|
|
1773
1839
|
] });
|
|
1774
|
-
},
|
|
1775
|
-
alert:
|
|
1776
|
-
alert__icon:
|
|
1777
|
-
alert__body:
|
|
1778
|
-
alert__title:
|
|
1779
|
-
alert__content:
|
|
1780
|
-
alert__action:
|
|
1840
|
+
}, Ao = v(Ro), Bo = "hanui-alert-gHI-9", So = "hanui-alert__icon-DhiCT", Fo = "hanui-alert__body-52-z2", Po = "hanui-alert__title-I8BAh", Oo = "hanui-alert__content-lhBEo", Ho = "hanui-alert__action-1mTje", $e = {
|
|
1841
|
+
alert: Bo,
|
|
1842
|
+
alert__icon: So,
|
|
1843
|
+
alert__body: Fo,
|
|
1844
|
+
alert__title: Po,
|
|
1845
|
+
alert__content: Oo,
|
|
1846
|
+
alert__action: Ho,
|
|
1781
1847
|
"alert--info": "hanui-alert--info-lsAVw",
|
|
1782
1848
|
"alert--success": "hanui-alert--success-RMJR6",
|
|
1783
1849
|
"alert--warning": "hanui-alert--warning-Rkgln",
|
|
1784
1850
|
"alert--danger": "hanui-alert--danger-9ei0Y"
|
|
1785
|
-
},
|
|
1786
|
-
info: /* @__PURE__ */ a(
|
|
1787
|
-
success: /* @__PURE__ */ a(
|
|
1788
|
-
warning: /* @__PURE__ */ a(
|
|
1789
|
-
danger: /* @__PURE__ */ a(
|
|
1790
|
-
},
|
|
1851
|
+
}, zo = {
|
|
1852
|
+
info: /* @__PURE__ */ a(In, {}),
|
|
1853
|
+
success: /* @__PURE__ */ a(En, {}),
|
|
1854
|
+
warning: /* @__PURE__ */ a(za, {}),
|
|
1855
|
+
danger: /* @__PURE__ */ a(Mn, {})
|
|
1856
|
+
}, Ko = ({ children: e, tone: n = "info", title: t, action: o, className: i, testId: r }) => /* @__PURE__ */ _(
|
|
1791
1857
|
"div",
|
|
1792
1858
|
{
|
|
1793
|
-
className: d(
|
|
1859
|
+
className: d($e.alert, $e[`alert--${n}`], i),
|
|
1794
1860
|
role: n === "danger" || n === "warning" ? "alert" : void 0,
|
|
1795
|
-
"data-testid":
|
|
1861
|
+
"data-testid": r,
|
|
1796
1862
|
children: [
|
|
1797
|
-
/* @__PURE__ */ a("span", { className:
|
|
1798
|
-
/* @__PURE__ */ _("div", { className:
|
|
1799
|
-
t && /* @__PURE__ */ a("strong", { className:
|
|
1800
|
-
/* @__PURE__ */ a("div", { className:
|
|
1863
|
+
/* @__PURE__ */ a("span", { className: $e.alert__icon, children: zo[n] }),
|
|
1864
|
+
/* @__PURE__ */ _("div", { className: $e.alert__body, children: [
|
|
1865
|
+
t && /* @__PURE__ */ a("strong", { className: $e.alert__title, children: t }),
|
|
1866
|
+
/* @__PURE__ */ a("div", { className: $e.alert__content, children: e })
|
|
1801
1867
|
] }),
|
|
1802
|
-
o && /* @__PURE__ */ a("div", { className:
|
|
1868
|
+
o && /* @__PURE__ */ a("div", { className: $e.alert__action, children: o })
|
|
1803
1869
|
]
|
|
1804
1870
|
}
|
|
1805
|
-
),
|
|
1806
|
-
avatar:
|
|
1807
|
-
avatar__image:
|
|
1871
|
+
), ic = v(Ko), qo = "hanui-avatar-qoh3P", jo = "hanui-avatar__image-uAyAX", ua = {
|
|
1872
|
+
avatar: qo,
|
|
1873
|
+
avatar__image: jo,
|
|
1808
1874
|
"avatar--sm": "hanui-avatar--sm-GGjU4",
|
|
1809
1875
|
"avatar--md": "hanui-avatar--md-xhXnK",
|
|
1810
1876
|
"avatar--lg": "hanui-avatar--lg-ULP-r"
|
|
1811
|
-
},
|
|
1877
|
+
}, Go = (e, n) => {
|
|
1812
1878
|
const t = e.trim().split(/\s+/).filter(Boolean);
|
|
1813
1879
|
if (t.length === 0) return "?";
|
|
1814
1880
|
const o = t.length === 1 ? t[0].slice(0, 2) : `${t[0][0]}${t[t.length - 1][0]}`;
|
|
1815
1881
|
return n ? o.toLocaleUpperCase(n) : o.toLocaleUpperCase();
|
|
1816
|
-
},
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1882
|
+
}, Uo = ({ name: e, imageUrl: n, locale: t, size: o = "md", className: i, testId: r }) => {
|
|
1883
|
+
const { labels: s } = P();
|
|
1884
|
+
return /* @__PURE__ */ a(
|
|
1885
|
+
"span",
|
|
1886
|
+
{
|
|
1887
|
+
className: d(ua.avatar, ua[`avatar--${o}`], i),
|
|
1888
|
+
"aria-hidden": !0,
|
|
1889
|
+
"data-testid": r,
|
|
1890
|
+
children: n ? /* @__PURE__ */ a("img", { className: ua.avatar__image, src: n, alt: "" }) : Go(e, t ?? (s == null ? void 0 : s.locale))
|
|
1891
|
+
}
|
|
1892
|
+
);
|
|
1893
|
+
}, sc = v(Uo), Xo = "hanui-badge-uLAaI", Yo = "hanui-badge__icon-R2goZ", oa = {
|
|
1894
|
+
badge: Xo,
|
|
1895
|
+
badge__icon: Yo,
|
|
1827
1896
|
"badge--neutral": "hanui-badge--neutral-6kddt",
|
|
1828
1897
|
"badge--soft": "hanui-badge--soft-gFeRF",
|
|
1829
1898
|
"badge--solid": "hanui-badge--solid-rtdHI",
|
|
@@ -1837,76 +1906,87 @@ const ko = h(Ua), No = "hanui-field-KKvre", wo = "hanui-field__label-9dlYd", $o
|
|
|
1837
1906
|
"badge--sale": "hanui-badge--sale-Li1tG",
|
|
1838
1907
|
"badge--action": "hanui-badge--action-7pUio",
|
|
1839
1908
|
"badge--link": "hanui-badge--link-zcNJZ"
|
|
1840
|
-
},
|
|
1909
|
+
}, Zo = ({
|
|
1841
1910
|
children: e,
|
|
1842
1911
|
tone: n = "neutral",
|
|
1843
1912
|
variant: t = "soft",
|
|
1844
1913
|
icon: o,
|
|
1845
|
-
className:
|
|
1846
|
-
testId:
|
|
1914
|
+
className: i,
|
|
1915
|
+
testId: r
|
|
1847
1916
|
}) => /* @__PURE__ */ _(
|
|
1848
1917
|
"span",
|
|
1849
1918
|
{
|
|
1850
|
-
className: d(
|
|
1851
|
-
"data-testid":
|
|
1919
|
+
className: d(oa.badge, oa[`badge--${n}`], oa[`badge--${t}`], i),
|
|
1920
|
+
"data-testid": r,
|
|
1852
1921
|
children: [
|
|
1853
|
-
o && /* @__PURE__ */ a("span", { className:
|
|
1922
|
+
o && /* @__PURE__ */ a("span", { className: oa.badge__icon, children: o }),
|
|
1854
1923
|
e
|
|
1855
1924
|
]
|
|
1856
1925
|
}
|
|
1857
|
-
),
|
|
1858
|
-
breadcrumb:
|
|
1859
|
-
breadcrumb__item:
|
|
1860
|
-
breadcrumb__link:
|
|
1861
|
-
breadcrumb__current:
|
|
1862
|
-
breadcrumb__separator:
|
|
1863
|
-
},
|
|
1864
|
-
const
|
|
1865
|
-
return /* @__PURE__ */
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1926
|
+
), cc = v(Zo), Jo = "hanui-breadcrumb-amB9n", Qo = "hanui-breadcrumb__item-Icv1S", Vo = "hanui-breadcrumb__link-eVkPq", Wo = "hanui-breadcrumb__current-8XjhU", er = "hanui-breadcrumb__separator-vvaUi", Je = {
|
|
1927
|
+
breadcrumb: Jo,
|
|
1928
|
+
breadcrumb__item: Qo,
|
|
1929
|
+
breadcrumb__link: Vo,
|
|
1930
|
+
breadcrumb__current: Wo,
|
|
1931
|
+
breadcrumb__separator: er
|
|
1932
|
+
}, ar = ({ items: e, label: n, linkProps: t, className: o, testId: i }) => {
|
|
1933
|
+
const { labels: r } = P();
|
|
1934
|
+
return /* @__PURE__ */ a(
|
|
1935
|
+
"nav",
|
|
1936
|
+
{
|
|
1937
|
+
className: o,
|
|
1938
|
+
"aria-label": I("Breadcrumb.label", n, r == null ? void 0 : r.breadcrumb),
|
|
1939
|
+
"data-testid": i,
|
|
1940
|
+
children: /* @__PURE__ */ a("ol", { className: d(Je.breadcrumb), children: e.map((s, c) => {
|
|
1941
|
+
const l = c === e.length - 1;
|
|
1942
|
+
return /* @__PURE__ */ _("li", { className: Je.breadcrumb__item, children: [
|
|
1943
|
+
s.href && !l ? /* @__PURE__ */ a(le, { href: s.href, className: Je.breadcrumb__link, ...t, children: s.label }) : /* @__PURE__ */ a("span", { className: Je.breadcrumb__current, "aria-current": "page", children: s.label }),
|
|
1944
|
+
!l && /* @__PURE__ */ a(Ha, { className: Je.breadcrumb__separator })
|
|
1945
|
+
] }, `${s.label}-${c}`);
|
|
1946
|
+
}) })
|
|
1947
|
+
}
|
|
1948
|
+
);
|
|
1949
|
+
}, lc = v(ar), nr = "hanui-card-CaHUG", tr = "hanui-media__frame-eBv-s", or = "hanui-media-eggk5", rr = "hanui-media__link-ujyVV", ir = "hanui-overlay-AVMTX", sr = "hanui-body-DyI-6", cr = "hanui-footer-2WNCZ", se = {
|
|
1950
|
+
card: nr,
|
|
1871
1951
|
"card--interactive": "hanui-card--interactive-C1pXZ",
|
|
1872
|
-
media__frame:
|
|
1873
|
-
media:
|
|
1874
|
-
media__link:
|
|
1952
|
+
media__frame: tr,
|
|
1953
|
+
media: or,
|
|
1954
|
+
media__link: rr,
|
|
1875
1955
|
"media__frame--contained": "hanui-media__frame--contained-Nv9gh",
|
|
1876
|
-
overlay:
|
|
1956
|
+
overlay: ir,
|
|
1877
1957
|
"overlay--top-left": "hanui-overlay--top-left-td1xA",
|
|
1878
1958
|
"overlay--top-right": "hanui-overlay--top-right-GqD9H",
|
|
1879
1959
|
"overlay--bottom-left": "hanui-overlay--bottom-left-T5Quw",
|
|
1880
1960
|
"overlay--bottom-right": "hanui-overlay--bottom-right-za3z3",
|
|
1881
|
-
body:
|
|
1882
|
-
footer:
|
|
1883
|
-
},
|
|
1961
|
+
body: sr,
|
|
1962
|
+
footer: cr
|
|
1963
|
+
}, lr = ({ children: e, isInteractive: n, as: t = "div", className: o, testId: i }) => /* @__PURE__ */ a(
|
|
1884
1964
|
t,
|
|
1885
1965
|
{
|
|
1886
|
-
className: d(
|
|
1887
|
-
"data-testid":
|
|
1966
|
+
className: d(se.card, n && se["card--interactive"], o),
|
|
1967
|
+
"data-testid": i,
|
|
1888
1968
|
children: e
|
|
1889
1969
|
}
|
|
1890
|
-
),
|
|
1891
|
-
({ children: e, ratio: n = 1, href: t, linkProps: o, isContained:
|
|
1970
|
+
), dr = v(
|
|
1971
|
+
({ children: e, ratio: n = 1, href: t, linkProps: o, isContained: i = !0, className: r }) => {
|
|
1892
1972
|
const s = /* @__PURE__ */ a(
|
|
1893
1973
|
"span",
|
|
1894
1974
|
{
|
|
1895
|
-
className: d(
|
|
1975
|
+
className: d(se.media__frame, i && se["media__frame--contained"]),
|
|
1896
1976
|
style: { aspectRatio: n },
|
|
1897
1977
|
children: e
|
|
1898
1978
|
}
|
|
1899
1979
|
);
|
|
1900
|
-
return /* @__PURE__ */ a("div", { className: d(
|
|
1980
|
+
return /* @__PURE__ */ a("div", { className: d(se.media, r), children: t ? (
|
|
1901
1981
|
// `tabIndex={-1}` + `aria-hidden`: aynı hedefe giden başlık bağlantısı
|
|
1902
1982
|
// zaten sekme sırasında. Görseli ikinci bir durak yapmak klavye
|
|
1903
1983
|
// gezinmesini iki katına çıkarıyor, ekran okuyucuda da aynı kayıt
|
|
1904
1984
|
// arka arkaya iki kez duyuruluyordu.
|
|
1905
1985
|
/* @__PURE__ */ a(
|
|
1906
|
-
|
|
1986
|
+
le,
|
|
1907
1987
|
{
|
|
1908
1988
|
href: t,
|
|
1909
|
-
className:
|
|
1989
|
+
className: se.media__link,
|
|
1910
1990
|
tabIndex: -1,
|
|
1911
1991
|
"aria-hidden": !0,
|
|
1912
1992
|
...o,
|
|
@@ -1916,960 +1996,1004 @@ const ko = h(Ua), No = "hanui-field-KKvre", wo = "hanui-field__label-9dlYd", $o
|
|
|
1916
1996
|
) : s });
|
|
1917
1997
|
}
|
|
1918
1998
|
);
|
|
1919
|
-
|
|
1920
|
-
const
|
|
1921
|
-
({ children: e, position: n = "top-left", className: t }) => /* @__PURE__ */ a("div", { className: d(
|
|
1999
|
+
dr.displayName = "CardMedia";
|
|
2000
|
+
const _r = v(
|
|
2001
|
+
({ children: e, position: n = "top-left", className: t }) => /* @__PURE__ */ a("div", { className: d(se.overlay, se[`overlay--${n}`], t), children: e })
|
|
1922
2002
|
);
|
|
1923
|
-
|
|
1924
|
-
const
|
|
1925
|
-
|
|
1926
|
-
const
|
|
1927
|
-
|
|
1928
|
-
const
|
|
1929
|
-
copy:
|
|
2003
|
+
_r.displayName = "CardOverlay";
|
|
2004
|
+
const ur = v(({ children: e, className: n }) => /* @__PURE__ */ a("div", { className: d(se.body, n), children: e }));
|
|
2005
|
+
ur.displayName = "CardBody";
|
|
2006
|
+
const hr = v(({ children: e, className: n }) => /* @__PURE__ */ a("div", { className: d(se.footer, n), children: e }));
|
|
2007
|
+
hr.displayName = "CardFooter";
|
|
2008
|
+
const dc = v(lr), pr = "hanui-copy-Yht5s", br = "hanui-copy__code-CYlCA", mr = "hanui-copy__button-GDdH6", gr = "hanui-copy__srOnly-WMTNN", Oe = {
|
|
2009
|
+
copy: pr,
|
|
1930
2010
|
"copy--sm": "hanui-copy--sm-Tjqws",
|
|
1931
|
-
copy__code:
|
|
2011
|
+
copy__code: br,
|
|
1932
2012
|
"copy--md": "hanui-copy--md-00rhU",
|
|
1933
|
-
copy__button:
|
|
2013
|
+
copy__button: mr,
|
|
1934
2014
|
"copy__button--done": "hanui-copy__button--done-MujUR",
|
|
1935
|
-
copy__srOnly:
|
|
1936
|
-
},
|
|
2015
|
+
copy__srOnly: gr
|
|
2016
|
+
}, fr = 1600, yr = ({
|
|
1937
2017
|
value: e,
|
|
1938
2018
|
copyLabel: n,
|
|
1939
2019
|
copiedLabel: t,
|
|
1940
2020
|
copiedAnnouncement: o,
|
|
1941
|
-
size:
|
|
1942
|
-
isReadOnly:
|
|
2021
|
+
size: i = "sm",
|
|
2022
|
+
isReadOnly: r,
|
|
1943
2023
|
className: s,
|
|
1944
|
-
testId:
|
|
2024
|
+
testId: c
|
|
1945
2025
|
}) => {
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
2026
|
+
var m, f, D, x, L;
|
|
2027
|
+
const { labels: l } = P(), [u, b] = Z(!1), g = Y(null), h = Y(void 0);
|
|
2028
|
+
F(() => () => window.clearTimeout(h.current), []);
|
|
2029
|
+
const p = Q(() => {
|
|
2030
|
+
const E = g.current;
|
|
2031
|
+
if (!E) return;
|
|
2032
|
+
const S = document.createRange();
|
|
2033
|
+
S.selectNodeContents(E);
|
|
2034
|
+
const j = window.getSelection();
|
|
2035
|
+
j == null || j.removeAllRanges(), j == null || j.addRange(S);
|
|
2036
|
+
}, []), N = Q(async () => {
|
|
1956
2037
|
try {
|
|
1957
|
-
await navigator.clipboard.writeText(e),
|
|
2038
|
+
await navigator.clipboard.writeText(e), b(!0), h.current = window.setTimeout(() => b(!1), fr);
|
|
1958
2039
|
} catch {
|
|
1959
|
-
|
|
2040
|
+
p();
|
|
1960
2041
|
}
|
|
1961
|
-
}, [e,
|
|
1962
|
-
return /* @__PURE__ */ _("span", { className: d(
|
|
1963
|
-
/* @__PURE__ */ a("span", { className:
|
|
1964
|
-
!
|
|
2042
|
+
}, [e, p]);
|
|
2043
|
+
return /* @__PURE__ */ _("span", { className: d(Oe.copy, Oe[`copy--${i}`], s), "data-testid": c, children: [
|
|
2044
|
+
/* @__PURE__ */ a("span", { className: Oe.copy__code, ref: g, children: e }),
|
|
2045
|
+
!r && /* @__PURE__ */ a(
|
|
1965
2046
|
"button",
|
|
1966
2047
|
{
|
|
1967
2048
|
type: "button",
|
|
1968
|
-
className: d(
|
|
1969
|
-
onClick:
|
|
1970
|
-
"aria-label": u ? t : n,
|
|
1971
|
-
title: u ? t : n,
|
|
1972
|
-
children: u ? /* @__PURE__ */ a(
|
|
2049
|
+
className: d(Oe.copy__button, u && Oe["copy__button--done"]),
|
|
2050
|
+
onClick: N,
|
|
2051
|
+
"aria-label": u ? t ?? qe("CopyField.copiedLabel", (m = l == null ? void 0 : l.copyField) == null ? void 0 : m.copied, e) : n ?? qe("CopyField.copyLabel", (f = l == null ? void 0 : l.copyField) == null ? void 0 : f.copy, e),
|
|
2052
|
+
title: u ? t ?? qe("CopyField.copiedLabel", (D = l == null ? void 0 : l.copyField) == null ? void 0 : D.copied, e) : n ?? qe("CopyField.copyLabel", (x = l == null ? void 0 : l.copyField) == null ? void 0 : x.copy, e),
|
|
2053
|
+
children: u ? /* @__PURE__ */ a(kn, {}) : /* @__PURE__ */ a(Cn, {})
|
|
1973
2054
|
}
|
|
1974
2055
|
),
|
|
1975
|
-
/* @__PURE__ */ a("span", { "aria-live": "polite", className:
|
|
2056
|
+
/* @__PURE__ */ a("span", { "aria-live": "polite", className: Oe.copy__srOnly, children: u ? I(
|
|
2057
|
+
"CopyField.copiedAnnouncement",
|
|
2058
|
+
o,
|
|
2059
|
+
(L = l == null ? void 0 : l.copyField) == null ? void 0 : L.announcement
|
|
2060
|
+
) : "" })
|
|
1976
2061
|
] });
|
|
1977
|
-
},
|
|
1978
|
-
divider:
|
|
2062
|
+
}, _c = v(yr), vr = "hanui-divider-RJqCw", xr = "hanui-divider__label-M8sBA", ra = {
|
|
2063
|
+
divider: vr,
|
|
1979
2064
|
"divider--labelled": "hanui-divider--labelled-jZH1-",
|
|
1980
|
-
divider__label:
|
|
1981
|
-
},
|
|
1982
|
-
directory:
|
|
1983
|
-
group:
|
|
1984
|
-
group__header:
|
|
1985
|
-
group__label:
|
|
1986
|
-
group__link:
|
|
1987
|
-
group__meta:
|
|
1988
|
-
group__list:
|
|
1989
|
-
row:
|
|
1990
|
-
row__name:
|
|
1991
|
-
row__media:
|
|
1992
|
-
row__marker:
|
|
1993
|
-
jump:
|
|
1994
|
-
jump__link:
|
|
1995
|
-
},
|
|
1996
|
-
({ label: e, href: n, linkProps: t, meta: o, children:
|
|
1997
|
-
/* @__PURE__ */ _("header", { className:
|
|
1998
|
-
/* @__PURE__ */ a("h2", { className:
|
|
1999
|
-
o && /* @__PURE__ */ a("span", { className:
|
|
2065
|
+
divider__label: xr
|
|
2066
|
+
}, kr = ({ label: e, className: n }) => e ? /* @__PURE__ */ a("div", { className: d(ra.divider, ra["divider--labelled"], n), children: /* @__PURE__ */ a("span", { className: ra.divider__label, children: e }) }) : /* @__PURE__ */ a("hr", { className: d(ra.divider, n) }), uc = v(kr), Nr = "hanui-directory-badEd", wr = "hanui-group-i6An9", $r = "hanui-group__header-rc19c", Dr = "hanui-group__label-vQTcs", Lr = "hanui-group__link-es5V7", Cr = "hanui-group__meta-LtC-u", Ir = "hanui-group__list-YxBCG", Er = "hanui-row-3LH7X", Mr = "hanui-row__name-75Wbq", Tr = "hanui-row__media-AxZEh", Rr = "hanui-row__marker-RYHb-", Ar = "hanui-jump-vpGwB", Br = "hanui-jump__link-rRnT6", W = {
|
|
2067
|
+
directory: Nr,
|
|
2068
|
+
group: wr,
|
|
2069
|
+
group__header: $r,
|
|
2070
|
+
group__label: Dr,
|
|
2071
|
+
group__link: Lr,
|
|
2072
|
+
group__meta: Cr,
|
|
2073
|
+
group__list: Ir,
|
|
2074
|
+
row: Er,
|
|
2075
|
+
row__name: Mr,
|
|
2076
|
+
row__media: Tr,
|
|
2077
|
+
row__marker: Rr,
|
|
2078
|
+
jump: Ar,
|
|
2079
|
+
jump__link: Br
|
|
2080
|
+
}, Sr = ({ children: e, className: n }) => /* @__PURE__ */ a("div", { className: d(W.directory, n), children: e }), Fr = v(
|
|
2081
|
+
({ label: e, href: n, linkProps: t, meta: o, children: i, id: r }) => /* @__PURE__ */ _("section", { className: W.group, id: r, children: [
|
|
2082
|
+
/* @__PURE__ */ _("header", { className: W.group__header, children: [
|
|
2083
|
+
/* @__PURE__ */ a("h2", { className: W.group__label, children: n ? /* @__PURE__ */ a(le, { href: n, className: W.group__link, ...t, children: e }) : e }),
|
|
2084
|
+
o && /* @__PURE__ */ a("span", { className: W.group__meta, children: o })
|
|
2000
2085
|
] }),
|
|
2001
|
-
/* @__PURE__ */ a("ul", { className:
|
|
2086
|
+
/* @__PURE__ */ a("ul", { className: W.group__list, children: i })
|
|
2002
2087
|
] })
|
|
2003
2088
|
);
|
|
2004
|
-
|
|
2005
|
-
const
|
|
2006
|
-
({ href: e, name: n, media: t, marker: o, linkProps:
|
|
2007
|
-
t && /* @__PURE__ */ a("span", { className:
|
|
2008
|
-
/* @__PURE__ */ a("span", { className:
|
|
2009
|
-
o && /* @__PURE__ */ a("span", { className:
|
|
2089
|
+
Fr.displayName = "DirectoryGroup";
|
|
2090
|
+
const Pr = v(
|
|
2091
|
+
({ href: e, name: n, media: t, marker: o, linkProps: i, className: r }) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ _(le, { href: e, className: d(W.row, r), ...i, children: [
|
|
2092
|
+
t && /* @__PURE__ */ a("span", { className: W.row__media, children: t }),
|
|
2093
|
+
/* @__PURE__ */ a("span", { className: W.row__name, children: n }),
|
|
2094
|
+
o && /* @__PURE__ */ a("span", { className: W.row__marker, children: o })
|
|
2010
2095
|
] }) })
|
|
2011
2096
|
);
|
|
2012
|
-
|
|
2013
|
-
const
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2097
|
+
Pr.displayName = "DirectoryRow";
|
|
2098
|
+
const Or = v(({ labels: e, toId: n, label: t }) => {
|
|
2099
|
+
const { labels: o } = P();
|
|
2100
|
+
return /* @__PURE__ */ a(
|
|
2101
|
+
"nav",
|
|
2102
|
+
{
|
|
2103
|
+
className: W.jump,
|
|
2104
|
+
"aria-label": I("DirectoryJump.label", t, o == null ? void 0 : o.directoryJump),
|
|
2105
|
+
children: e.map((i) => /* @__PURE__ */ a("a", { href: `#${n(i)}`, className: W.jump__link, children: i }, i))
|
|
2106
|
+
}
|
|
2107
|
+
);
|
|
2108
|
+
});
|
|
2109
|
+
Or.displayName = "DirectoryJump";
|
|
2110
|
+
const hc = v(Sr), Hr = "hanui-empty-47qZR", zr = "hanui-empty__icon-okfEc", Kr = "hanui-empty__title-Z7Dzd", qr = "hanui-empty__description-6BoCk", jr = "hanui-empty__actions-ARk-k", He = {
|
|
2111
|
+
empty: Hr,
|
|
2112
|
+
empty__icon: zr,
|
|
2113
|
+
empty__title: Kr,
|
|
2114
|
+
empty__description: qr,
|
|
2115
|
+
empty__actions: jr,
|
|
2021
2116
|
"empty--sm": "hanui-empty--sm-QXaXx"
|
|
2022
|
-
},
|
|
2117
|
+
}, Gr = ({
|
|
2023
2118
|
title: e,
|
|
2024
2119
|
description: n,
|
|
2025
2120
|
icon: t,
|
|
2026
2121
|
action: o,
|
|
2027
|
-
secondaryAction:
|
|
2028
|
-
size:
|
|
2122
|
+
secondaryAction: i,
|
|
2123
|
+
size: r = "md",
|
|
2029
2124
|
className: s,
|
|
2030
|
-
testId:
|
|
2031
|
-
}) => /* @__PURE__ */ _("div", { className: d(
|
|
2032
|
-
t && /* @__PURE__ */ a("span", { className:
|
|
2033
|
-
/* @__PURE__ */ a("h3", { className:
|
|
2034
|
-
n && /* @__PURE__ */ a("p", { className:
|
|
2035
|
-
(o ||
|
|
2125
|
+
testId: c
|
|
2126
|
+
}) => /* @__PURE__ */ _("div", { className: d(He.empty, He[`empty--${r}`], s), "data-testid": c, children: [
|
|
2127
|
+
t && /* @__PURE__ */ a("span", { className: He.empty__icon, children: t }),
|
|
2128
|
+
/* @__PURE__ */ a("h3", { className: He.empty__title, children: e }),
|
|
2129
|
+
n && /* @__PURE__ */ a("p", { className: He.empty__description, children: n }),
|
|
2130
|
+
(o || i) && /* @__PURE__ */ _("div", { className: He.empty__actions, children: [
|
|
2036
2131
|
o,
|
|
2037
|
-
|
|
2132
|
+
i
|
|
2038
2133
|
] })
|
|
2039
|
-
] }),
|
|
2040
|
-
header:
|
|
2041
|
-
header__top:
|
|
2042
|
-
header__text:
|
|
2043
|
-
header__eyebrow:
|
|
2044
|
-
header__titleRow:
|
|
2045
|
-
header__title:
|
|
2046
|
-
header__meta:
|
|
2047
|
-
header__description:
|
|
2048
|
-
header__actions:
|
|
2049
|
-
},
|
|
2134
|
+
] }), pc = v(Gr), Ur = "hanui-header-yJwus", Xr = "hanui-header__top-UK4si", Yr = "hanui-header__text-HIo8U", Zr = "hanui-header__eyebrow-dZ9Zc", Jr = "hanui-header__titleRow-KgDZj", Qr = "hanui-header__title-s1giF", Vr = "hanui-header__meta-UxuaD", Wr = "hanui-header__description-NXbbC", ei = "hanui-header__actions-aShpt", be = {
|
|
2135
|
+
header: Ur,
|
|
2136
|
+
header__top: Xr,
|
|
2137
|
+
header__text: Yr,
|
|
2138
|
+
header__eyebrow: Zr,
|
|
2139
|
+
header__titleRow: Jr,
|
|
2140
|
+
header__title: Qr,
|
|
2141
|
+
header__meta: Vr,
|
|
2142
|
+
header__description: Wr,
|
|
2143
|
+
header__actions: ei
|
|
2144
|
+
}, ai = ({
|
|
2050
2145
|
title: e,
|
|
2051
2146
|
eyebrow: n,
|
|
2052
2147
|
description: t,
|
|
2053
2148
|
actions: o,
|
|
2054
|
-
breadcrumb:
|
|
2055
|
-
meta:
|
|
2149
|
+
breadcrumb: i,
|
|
2150
|
+
meta: r,
|
|
2056
2151
|
children: s,
|
|
2057
|
-
as:
|
|
2058
|
-
className:
|
|
2059
|
-
testId:
|
|
2060
|
-
}) => /* @__PURE__ */ _("header", { className: d(
|
|
2061
|
-
|
|
2062
|
-
/* @__PURE__ */ _("div", { className:
|
|
2063
|
-
/* @__PURE__ */ _("div", { className:
|
|
2064
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
2065
|
-
/* @__PURE__ */ _("div", { className:
|
|
2066
|
-
/* @__PURE__ */ a(
|
|
2067
|
-
|
|
2152
|
+
as: c = "h1",
|
|
2153
|
+
className: l,
|
|
2154
|
+
testId: u
|
|
2155
|
+
}) => /* @__PURE__ */ _("header", { className: d(be.header, l), "data-testid": u, children: [
|
|
2156
|
+
i,
|
|
2157
|
+
/* @__PURE__ */ _("div", { className: be.header__top, children: [
|
|
2158
|
+
/* @__PURE__ */ _("div", { className: be.header__text, children: [
|
|
2159
|
+
n && /* @__PURE__ */ a("span", { className: be.header__eyebrow, children: n }),
|
|
2160
|
+
/* @__PURE__ */ _("div", { className: be.header__titleRow, children: [
|
|
2161
|
+
/* @__PURE__ */ a(c, { className: be.header__title, children: e }),
|
|
2162
|
+
r && /* @__PURE__ */ a("span", { className: be.header__meta, children: r })
|
|
2068
2163
|
] }),
|
|
2069
|
-
t && /* @__PURE__ */ a("p", { className:
|
|
2164
|
+
t && /* @__PURE__ */ a("p", { className: be.header__description, children: t })
|
|
2070
2165
|
] }),
|
|
2071
|
-
o && /* @__PURE__ */ a("div", { className:
|
|
2166
|
+
o && /* @__PURE__ */ a("div", { className: be.header__actions, children: o })
|
|
2072
2167
|
] }),
|
|
2073
2168
|
s
|
|
2074
|
-
] }),
|
|
2075
|
-
panel:
|
|
2076
|
-
panel__header:
|
|
2077
|
-
panel__heading:
|
|
2078
|
-
panel__icon:
|
|
2079
|
-
panel__headingText:
|
|
2080
|
-
panel__title:
|
|
2081
|
-
panel__description:
|
|
2082
|
-
panel__actions:
|
|
2083
|
-
panel__body:
|
|
2169
|
+
] }), bc = v(ai), ni = "hanui-panel-Sv-1m", ti = "hanui-panel__header-ysexh", oi = "hanui-panel__heading-xLCsB", ri = "hanui-panel__icon--yPQT", ii = "hanui-panel__headingText--XqxW", si = "hanui-panel__title-6-6uC", ci = "hanui-panel__description-qXTSM", li = "hanui-panel__actions-Ra-zy", di = "hanui-panel__body-lo5aX", _i = "hanui-panel__footer-qLpR1", ui = "hanui-form-o9UqJ", hi = "hanui-row-vUGpa", J = {
|
|
2170
|
+
panel: ni,
|
|
2171
|
+
panel__header: ti,
|
|
2172
|
+
panel__heading: oi,
|
|
2173
|
+
panel__icon: ri,
|
|
2174
|
+
panel__headingText: ii,
|
|
2175
|
+
panel__title: si,
|
|
2176
|
+
panel__description: ci,
|
|
2177
|
+
panel__actions: li,
|
|
2178
|
+
panel__body: di,
|
|
2084
2179
|
"panel__body--sm": "hanui-panel__body--sm-6XP6W",
|
|
2085
2180
|
"panel__body--lg": "hanui-panel__body--lg-RTK5B",
|
|
2086
2181
|
"panel__body--flush": "hanui-panel__body--flush-iK75R",
|
|
2087
|
-
panel__footer:
|
|
2088
|
-
form:
|
|
2182
|
+
panel__footer: _i,
|
|
2183
|
+
form: ui,
|
|
2089
2184
|
"form--2": "hanui-form--2-HdwDc",
|
|
2090
|
-
row:
|
|
2091
|
-
},
|
|
2185
|
+
row: hi
|
|
2186
|
+
}, pi = ({
|
|
2092
2187
|
children: e,
|
|
2093
2188
|
title: n,
|
|
2094
2189
|
description: t,
|
|
2095
2190
|
actions: o,
|
|
2096
|
-
icon:
|
|
2097
|
-
isFlush:
|
|
2191
|
+
icon: i,
|
|
2192
|
+
isFlush: r,
|
|
2098
2193
|
gap: s = "md",
|
|
2099
|
-
footer:
|
|
2100
|
-
as:
|
|
2101
|
-
className:
|
|
2102
|
-
bodyClassName:
|
|
2103
|
-
testId:
|
|
2104
|
-
}) => /* @__PURE__ */ _(
|
|
2105
|
-
(n || o) && /* @__PURE__ */ _("div", { className:
|
|
2106
|
-
/* @__PURE__ */ _("div", { className:
|
|
2107
|
-
|
|
2108
|
-
/* @__PURE__ */ _("div", { className:
|
|
2109
|
-
n && /* @__PURE__ */ a("h2", { className:
|
|
2110
|
-
t && /* @__PURE__ */ a("p", { className:
|
|
2194
|
+
footer: c,
|
|
2195
|
+
as: l = "section",
|
|
2196
|
+
className: u,
|
|
2197
|
+
bodyClassName: b,
|
|
2198
|
+
testId: g
|
|
2199
|
+
}) => /* @__PURE__ */ _(l, { className: d(J.panel, u), "data-testid": g, children: [
|
|
2200
|
+
(n || o) && /* @__PURE__ */ _("div", { className: J.panel__header, children: [
|
|
2201
|
+
/* @__PURE__ */ _("div", { className: J.panel__heading, children: [
|
|
2202
|
+
i && /* @__PURE__ */ a("span", { className: J.panel__icon, children: i }),
|
|
2203
|
+
/* @__PURE__ */ _("div", { className: J.panel__headingText, children: [
|
|
2204
|
+
n && /* @__PURE__ */ a("h2", { className: J.panel__title, children: n }),
|
|
2205
|
+
t && /* @__PURE__ */ a("p", { className: J.panel__description, children: t })
|
|
2111
2206
|
] })
|
|
2112
2207
|
] }),
|
|
2113
|
-
o && /* @__PURE__ */ a("div", { className:
|
|
2208
|
+
o && /* @__PURE__ */ a("div", { className: J.panel__actions, children: o })
|
|
2114
2209
|
] }),
|
|
2115
2210
|
/* @__PURE__ */ a(
|
|
2116
2211
|
"div",
|
|
2117
2212
|
{
|
|
2118
2213
|
className: d(
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2214
|
+
J.panel__body,
|
|
2215
|
+
J[`panel__body--${s}`],
|
|
2216
|
+
r && J["panel__body--flush"],
|
|
2217
|
+
b
|
|
2123
2218
|
),
|
|
2124
2219
|
children: e
|
|
2125
2220
|
}
|
|
2126
2221
|
),
|
|
2127
|
-
|
|
2128
|
-
] }),
|
|
2129
|
-
|
|
2130
|
-
const
|
|
2131
|
-
|
|
2132
|
-
const
|
|
2133
|
-
price:
|
|
2134
|
-
price__current:
|
|
2135
|
-
price__currency:
|
|
2136
|
-
price__list:
|
|
2137
|
-
price__discount:
|
|
2222
|
+
c && /* @__PURE__ */ a("div", { className: J.panel__footer, children: c })
|
|
2223
|
+
] }), bi = v(({ children: e, columns: n = 1, className: t }) => /* @__PURE__ */ a("div", { className: d(J.form, J[`form--${n}`], t), children: e }));
|
|
2224
|
+
bi.displayName = "PanelForm";
|
|
2225
|
+
const mi = v(({ children: e, className: n }) => /* @__PURE__ */ a("div", { className: d(J.row, n), children: e }));
|
|
2226
|
+
mi.displayName = "PanelRow";
|
|
2227
|
+
const mc = v(pi), gi = "hanui-price-Oc5Nr", fi = "hanui-price__current-2Xup2", yi = "hanui-price__currency-32NLN", vi = "hanui-price__list-MlQgT", xi = "hanui-price__discount-5Yc6W", De = {
|
|
2228
|
+
price: gi,
|
|
2229
|
+
price__current: fi,
|
|
2230
|
+
price__currency: yi,
|
|
2231
|
+
price__list: vi,
|
|
2232
|
+
price__discount: xi,
|
|
2138
2233
|
"price--sm": "hanui-price--sm-Hd8Oe",
|
|
2139
2234
|
"price--md": "hanui-price--md-JMxlK",
|
|
2140
2235
|
"price--lg": "hanui-price--lg-TFqIF",
|
|
2141
2236
|
"price--xl": "hanui-price--xl-EJBYq"
|
|
2142
|
-
},
|
|
2237
|
+
}, ki = ({
|
|
2143
2238
|
value: e,
|
|
2144
2239
|
currency: n,
|
|
2145
2240
|
listValue: t,
|
|
2146
2241
|
discountPercent: o,
|
|
2147
|
-
formatDiscount:
|
|
2148
|
-
size:
|
|
2242
|
+
formatDiscount: i = (l) => `%${l}`,
|
|
2243
|
+
size: r = "md",
|
|
2149
2244
|
className: s,
|
|
2150
|
-
testId:
|
|
2151
|
-
}) =>
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
/* @__PURE__ */
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
/* @__PURE__ */
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
] }),
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2245
|
+
testId: c
|
|
2246
|
+
}) => {
|
|
2247
|
+
const { labels: l } = P(), u = I("Price.currency", n, l == null ? void 0 : l.currency);
|
|
2248
|
+
return /* @__PURE__ */ _("span", { className: d(De.price, De[`price--${r}`], s), "data-testid": c, children: [
|
|
2249
|
+
/* @__PURE__ */ _("span", { className: De.price__current, children: [
|
|
2250
|
+
e,
|
|
2251
|
+
/* @__PURE__ */ a("span", { className: De.price__currency, children: u })
|
|
2252
|
+
] }),
|
|
2253
|
+
t && /* @__PURE__ */ _("s", { className: De.price__list, children: [
|
|
2254
|
+
t,
|
|
2255
|
+
/* @__PURE__ */ a("span", { className: De.price__currency, children: u })
|
|
2256
|
+
] }),
|
|
2257
|
+
o !== void 0 && o > 0 && /* @__PURE__ */ a("span", { className: De.price__discount, children: i(o) })
|
|
2258
|
+
] });
|
|
2259
|
+
}, gc = v(ki), Ni = "hanui-rating-94dke", wi = "hanui-rating__stars-QkpVU", $i = "hanui-rating__empty-Wf6-K", Di = "hanui-rating__count-pIoEs", Li = "hanui-rating__srOnly-E9h0d", ze = {
|
|
2260
|
+
rating: Ni,
|
|
2261
|
+
rating__stars: wi,
|
|
2262
|
+
rating__empty: $i,
|
|
2263
|
+
rating__count: Di,
|
|
2264
|
+
rating__srOnly: Li,
|
|
2167
2265
|
"rating--sm": "hanui-rating--sm-AtY7U",
|
|
2168
2266
|
"rating--md": "hanui-rating--md-Q0nxN"
|
|
2169
|
-
},
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2267
|
+
}, Ci = ({ value: e, count: n, srLabel: t, size: o = "sm", className: i, testId: r }) => {
|
|
2268
|
+
var l;
|
|
2269
|
+
const { labels: s } = P(), c = Math.round(e * 2) / 2;
|
|
2270
|
+
return /* @__PURE__ */ _("span", { className: d(ze.rating, ze[`rating--${o}`], i), "data-testid": r, children: [
|
|
2271
|
+
/* @__PURE__ */ a("span", { className: ze.rating__stars, "aria-hidden": !0, children: Array.from({ length: 5 }, (u, b) => {
|
|
2272
|
+
const g = b + 1;
|
|
2273
|
+
return c >= g ? /* @__PURE__ */ a(qa, {}, b) : c >= g - 0.5 ? /* @__PURE__ */ a(Bn, {}, b) : /* @__PURE__ */ a(An, { className: ze.rating__empty }, b);
|
|
2175
2274
|
}) }),
|
|
2176
|
-
/* @__PURE__ */ a("span", { className:
|
|
2177
|
-
|
|
2275
|
+
/* @__PURE__ */ a("span", { className: ze.rating__srOnly, children: t ?? qe("Rating.srLabel", (l = s == null ? void 0 : s.rating) == null ? void 0 : l.srLabel, e, n) }),
|
|
2276
|
+
Ge(n) && /* @__PURE__ */ _("span", { className: ze.rating__count, "aria-hidden": !0, children: [
|
|
2178
2277
|
"(",
|
|
2179
2278
|
n,
|
|
2180
2279
|
")"
|
|
2181
2280
|
] })
|
|
2182
2281
|
] });
|
|
2183
|
-
},
|
|
2184
|
-
header:
|
|
2185
|
-
header__text:
|
|
2186
|
-
header__overline:
|
|
2187
|
-
header__title:
|
|
2188
|
-
header__description:
|
|
2189
|
-
header__action:
|
|
2282
|
+
}, fc = v(Ci), Ii = "hanui-header-a08Jh", Ei = "hanui-header__text-ArJkA", Mi = "hanui-header__overline-X5Epo", Ti = "hanui-header__title-nQQQJ", Ri = "hanui-header__description-08oCr", Ai = "hanui-header__action-xsxQF", Le = {
|
|
2283
|
+
header: Ii,
|
|
2284
|
+
header__text: Ei,
|
|
2285
|
+
header__overline: Mi,
|
|
2286
|
+
header__title: Ti,
|
|
2287
|
+
header__description: Ri,
|
|
2288
|
+
header__action: Ai,
|
|
2190
2289
|
"header--sm": "hanui-header--sm-mIJWZ",
|
|
2191
2290
|
"header--lg": "hanui-header--lg-QBLIz"
|
|
2192
|
-
},
|
|
2291
|
+
}, Bi = ({
|
|
2193
2292
|
title: e,
|
|
2194
2293
|
description: n,
|
|
2195
2294
|
overline: t,
|
|
2196
2295
|
action: o,
|
|
2197
|
-
as:
|
|
2198
|
-
size:
|
|
2296
|
+
as: i = "h2",
|
|
2297
|
+
size: r = "md",
|
|
2199
2298
|
className: s,
|
|
2200
|
-
testId:
|
|
2201
|
-
}) => /* @__PURE__ */ _("header", { className: d(
|
|
2202
|
-
/* @__PURE__ */ _("div", { className:
|
|
2203
|
-
t && /* @__PURE__ */ a("span", { className:
|
|
2204
|
-
/* @__PURE__ */ a(
|
|
2205
|
-
n && /* @__PURE__ */ a("p", { className:
|
|
2299
|
+
testId: c
|
|
2300
|
+
}) => /* @__PURE__ */ _("header", { className: d(Le.header, Le[`header--${r}`], s), "data-testid": c, children: [
|
|
2301
|
+
/* @__PURE__ */ _("div", { className: Le.header__text, children: [
|
|
2302
|
+
t && /* @__PURE__ */ a("span", { className: Le.header__overline, children: t }),
|
|
2303
|
+
/* @__PURE__ */ a(i, { className: Le.header__title, children: e }),
|
|
2304
|
+
n && /* @__PURE__ */ a("p", { className: Le.header__description, children: n })
|
|
2206
2305
|
] }),
|
|
2207
|
-
o && /* @__PURE__ */ a("div", { className:
|
|
2208
|
-
] }),
|
|
2209
|
-
skeleton:
|
|
2306
|
+
o && /* @__PURE__ */ a("div", { className: Le.header__action, children: o })
|
|
2307
|
+
] }), yc = v(Bi), Si = "hanui-skeleton-n92if", Fi = "hanui-group-YMfwa", Qe = {
|
|
2308
|
+
skeleton: Si,
|
|
2210
2309
|
"hanui-shimmer": "hanui-hanui-shimmer-6yd48",
|
|
2211
2310
|
"skeleton--block": "hanui-skeleton--block-tOZ-a",
|
|
2212
2311
|
"skeleton--text": "hanui-skeleton--text-k-ROi",
|
|
2213
2312
|
"skeleton--circle": "hanui-skeleton--circle-x-mX3",
|
|
2214
|
-
group:
|
|
2215
|
-
},
|
|
2216
|
-
const
|
|
2217
|
-
width:
|
|
2218
|
-
height:
|
|
2313
|
+
group: Fi
|
|
2314
|
+
}, Pi = ({ width: e, height: n, variant: t = "block", lines: o = 1, className: i }) => {
|
|
2315
|
+
const r = {
|
|
2316
|
+
width: ya(e) ? `${e}px` : e,
|
|
2317
|
+
height: ya(n) ? `${n}px` : n
|
|
2219
2318
|
};
|
|
2220
|
-
return t === "text" && o > 1 ? /* @__PURE__ */ a("span", { className: d(
|
|
2319
|
+
return t === "text" && o > 1 ? /* @__PURE__ */ a("span", { className: d(Qe.group, i), "aria-hidden": !0, children: Array.from({ length: o }, (s, c) => /* @__PURE__ */ a(
|
|
2221
2320
|
"span",
|
|
2222
2321
|
{
|
|
2223
|
-
className: d(
|
|
2224
|
-
style:
|
|
2322
|
+
className: d(Qe.skeleton, Qe["skeleton--text"]),
|
|
2323
|
+
style: c === o - 1 ? { width: "60%" } : void 0
|
|
2225
2324
|
},
|
|
2226
|
-
|
|
2325
|
+
c
|
|
2227
2326
|
)) }) : /* @__PURE__ */ a(
|
|
2228
2327
|
"span",
|
|
2229
2328
|
{
|
|
2230
|
-
className: d(
|
|
2231
|
-
style:
|
|
2329
|
+
className: d(Qe.skeleton, Qe[`skeleton--${t}`], i),
|
|
2330
|
+
style: r,
|
|
2232
2331
|
"aria-hidden": !0
|
|
2233
2332
|
}
|
|
2234
2333
|
);
|
|
2235
|
-
},
|
|
2236
|
-
tabs:
|
|
2237
|
-
tabs__list:
|
|
2238
|
-
tabs__tab:
|
|
2334
|
+
}, vc = v(Pi), Oi = "hanui-tabs-l4dFE", Hi = "hanui-tabs__list-HJvR8", zi = "hanui-tabs__tab-7gDW7", Ki = "hanui-tabs__count-8JX8s", qi = "hanui-tabs__panel-CPklY", Ke = {
|
|
2335
|
+
tabs: Oi,
|
|
2336
|
+
tabs__list: Hi,
|
|
2337
|
+
tabs__tab: zi,
|
|
2239
2338
|
"tabs__tab--active": "hanui-tabs__tab--active-riqNp",
|
|
2240
|
-
tabs__count:
|
|
2241
|
-
tabs__panel:
|
|
2242
|
-
},
|
|
2339
|
+
tabs__count: Ki,
|
|
2340
|
+
tabs__panel: qi
|
|
2341
|
+
}, ji = ({
|
|
2243
2342
|
items: e,
|
|
2244
2343
|
defaultTabId: n,
|
|
2245
2344
|
activeId: t,
|
|
2246
2345
|
onChange: o,
|
|
2247
|
-
ariaLabel:
|
|
2248
|
-
className:
|
|
2346
|
+
ariaLabel: i,
|
|
2347
|
+
className: r,
|
|
2249
2348
|
testId: s
|
|
2250
2349
|
}) => {
|
|
2251
|
-
var
|
|
2252
|
-
const
|
|
2253
|
-
|
|
2254
|
-
},
|
|
2255
|
-
var
|
|
2256
|
-
const
|
|
2257
|
-
if (
|
|
2258
|
-
|
|
2259
|
-
const
|
|
2260
|
-
|
|
2350
|
+
var D;
|
|
2351
|
+
const c = ce(), [l, u] = Z(n ?? ((D = e[0]) == null ? void 0 : D.id)), b = Ge(t), g = b ? t : l, h = e.findIndex((x) => x.id === g), p = e[h] ?? e[0], N = (x) => {
|
|
2352
|
+
b || u(x), o == null || o(x);
|
|
2353
|
+
}, m = (x) => {
|
|
2354
|
+
var S;
|
|
2355
|
+
const L = x.key === "ArrowRight" ? 1 : x.key === "ArrowLeft" ? -1 : 0;
|
|
2356
|
+
if (L === 0) return;
|
|
2357
|
+
x.preventDefault();
|
|
2358
|
+
const E = (h + L + e.length) % e.length;
|
|
2359
|
+
N(e[E].id), (S = document.getElementById(`${c}-tab-${e[E].id}`)) == null || S.focus();
|
|
2261
2360
|
};
|
|
2262
2361
|
if (e.length === 0) return null;
|
|
2263
|
-
const
|
|
2264
|
-
return /* @__PURE__ */ _("div", { className: d(
|
|
2362
|
+
const f = Ge(p == null ? void 0 : p.content);
|
|
2363
|
+
return /* @__PURE__ */ _("div", { className: d(Ke.tabs, r), "data-testid": s, children: [
|
|
2265
2364
|
/* @__PURE__ */ a(
|
|
2266
2365
|
"div",
|
|
2267
2366
|
{
|
|
2268
|
-
className:
|
|
2367
|
+
className: Ke.tabs__list,
|
|
2269
2368
|
role: "tablist",
|
|
2270
|
-
"aria-label":
|
|
2271
|
-
onKeyDown:
|
|
2272
|
-
children: e.map((
|
|
2273
|
-
const
|
|
2369
|
+
"aria-label": i,
|
|
2370
|
+
onKeyDown: m,
|
|
2371
|
+
children: e.map((x) => {
|
|
2372
|
+
const L = x.id === p.id;
|
|
2274
2373
|
return /* @__PURE__ */ _(
|
|
2275
2374
|
"button",
|
|
2276
2375
|
{
|
|
2277
|
-
id: `${
|
|
2376
|
+
id: `${c}-tab-${x.id}`,
|
|
2278
2377
|
type: "button",
|
|
2279
2378
|
role: "tab",
|
|
2280
|
-
"aria-selected":
|
|
2281
|
-
"aria-controls":
|
|
2282
|
-
tabIndex:
|
|
2283
|
-
className: d(
|
|
2284
|
-
onClick: () =>
|
|
2379
|
+
"aria-selected": L,
|
|
2380
|
+
"aria-controls": f ? `${c}-panel-${x.id}` : void 0,
|
|
2381
|
+
tabIndex: L ? 0 : -1,
|
|
2382
|
+
className: d(Ke.tabs__tab, L && Ke["tabs__tab--active"]),
|
|
2383
|
+
onClick: () => N(x.id),
|
|
2285
2384
|
children: [
|
|
2286
|
-
|
|
2287
|
-
|
|
2385
|
+
x.label,
|
|
2386
|
+
Ge(x.count) && /* @__PURE__ */ a("span", { className: Ke.tabs__count, children: x.count })
|
|
2288
2387
|
]
|
|
2289
2388
|
},
|
|
2290
|
-
|
|
2389
|
+
x.id
|
|
2291
2390
|
);
|
|
2292
2391
|
})
|
|
2293
2392
|
}
|
|
2294
2393
|
),
|
|
2295
|
-
|
|
2394
|
+
f && /* @__PURE__ */ a(
|
|
2296
2395
|
"div",
|
|
2297
2396
|
{
|
|
2298
|
-
id: `${
|
|
2397
|
+
id: `${c}-panel-${p.id}`,
|
|
2299
2398
|
role: "tabpanel",
|
|
2300
|
-
"aria-labelledby": `${
|
|
2301
|
-
className:
|
|
2399
|
+
"aria-labelledby": `${c}-tab-${p.id}`,
|
|
2400
|
+
className: Ke.tabs__panel,
|
|
2302
2401
|
tabIndex: 0,
|
|
2303
|
-
children:
|
|
2402
|
+
children: p.content
|
|
2304
2403
|
}
|
|
2305
2404
|
)
|
|
2306
2405
|
] });
|
|
2307
|
-
},
|
|
2308
|
-
tile:
|
|
2309
|
-
tile__medallion:
|
|
2310
|
-
tile__label:
|
|
2311
|
-
tile__meta:
|
|
2406
|
+
}, xc = v(ji), Gi = "hanui-tile-TGur-", Ui = "hanui-tile__medallion--Y0pz", Xi = "hanui-tile__label-mI1OQ", Yi = "hanui-tile__meta-22qnR", Ve = {
|
|
2407
|
+
tile: Gi,
|
|
2408
|
+
tile__medallion: Ui,
|
|
2409
|
+
tile__label: Xi,
|
|
2410
|
+
tile__meta: Yi,
|
|
2312
2411
|
"tile--active": "hanui-tile--active-z0F2M"
|
|
2313
|
-
},
|
|
2314
|
-
|
|
2412
|
+
}, Zi = ({ label: e, icon: n, href: t, meta: o, isActive: i, linkProps: r, className: s, testId: c }) => /* @__PURE__ */ _(
|
|
2413
|
+
le,
|
|
2315
2414
|
{
|
|
2316
2415
|
href: t,
|
|
2317
|
-
className: d(
|
|
2318
|
-
"aria-current":
|
|
2319
|
-
"data-testid":
|
|
2320
|
-
...
|
|
2416
|
+
className: d(Ve.tile, i && Ve["tile--active"], s),
|
|
2417
|
+
"aria-current": i ? "page" : void 0,
|
|
2418
|
+
"data-testid": c,
|
|
2419
|
+
...r,
|
|
2321
2420
|
children: [
|
|
2322
|
-
/* @__PURE__ */ a("span", { className:
|
|
2323
|
-
/* @__PURE__ */ a("span", { className:
|
|
2324
|
-
o && /* @__PURE__ */ a("span", { className:
|
|
2421
|
+
/* @__PURE__ */ a("span", { className: Ve.tile__medallion, "aria-hidden": !0, children: n }),
|
|
2422
|
+
/* @__PURE__ */ a("span", { className: Ve.tile__label, children: e }),
|
|
2423
|
+
o && /* @__PURE__ */ a("span", { className: Ve.tile__meta, children: o })
|
|
2325
2424
|
]
|
|
2326
2425
|
}
|
|
2327
|
-
),
|
|
2328
|
-
modal:
|
|
2426
|
+
), kc = v(Zi), Ji = "hanui-modal-3IDi9", Qi = "hanui-modal__panel--qLSz", Vi = "hanui-modal__header-meWm6", Wi = "hanui-modal__icon-df2dd", es = "hanui-modal__heading-PwDS8", as = "hanui-modal__title-80Sh6", ns = "hanui-modal__description-fsCHI", ts = "hanui-modal__close-vFPbw", os = "hanui-modal__body-PDF12", rs = "hanui-modal__footer-CCCkx", ae = {
|
|
2427
|
+
modal: Ji,
|
|
2329
2428
|
"modal--sm": "hanui-modal--sm-A7WsS",
|
|
2330
2429
|
"modal--lg": "hanui-modal--lg-z99Em",
|
|
2331
2430
|
"hanui-fade-in": "hanui-hanui-fade-in-oHUfh",
|
|
2332
2431
|
"hanui-fade-in-up": "hanui-hanui-fade-in-up-RF4Hl",
|
|
2333
2432
|
"hanui-slide-up": "hanui-hanui-slide-up-ibKAg",
|
|
2334
|
-
modal__panel:
|
|
2335
|
-
modal__header:
|
|
2336
|
-
modal__icon:
|
|
2433
|
+
modal__panel: Qi,
|
|
2434
|
+
modal__header: Vi,
|
|
2435
|
+
modal__icon: Wi,
|
|
2337
2436
|
"modal__icon--neutral": "hanui-modal__icon--neutral-QSL7c",
|
|
2338
2437
|
"modal__icon--danger": "hanui-modal__icon--danger-6V90a",
|
|
2339
2438
|
"modal__icon--warning": "hanui-modal__icon--warning-a--FX",
|
|
2340
2439
|
"modal__icon--success": "hanui-modal__icon--success-YWxZs",
|
|
2341
2440
|
"modal__icon--info": "hanui-modal__icon--info-WRLah",
|
|
2342
|
-
modal__heading:
|
|
2343
|
-
modal__title:
|
|
2344
|
-
modal__description:
|
|
2345
|
-
modal__close:
|
|
2346
|
-
modal__body:
|
|
2347
|
-
modal__footer:
|
|
2348
|
-
},
|
|
2441
|
+
modal__heading: es,
|
|
2442
|
+
modal__title: as,
|
|
2443
|
+
modal__description: ns,
|
|
2444
|
+
modal__close: ts,
|
|
2445
|
+
modal__body: os,
|
|
2446
|
+
modal__footer: rs
|
|
2447
|
+
}, is = ({
|
|
2349
2448
|
isOpen: e,
|
|
2350
2449
|
onClose: n,
|
|
2351
2450
|
title: t,
|
|
2352
2451
|
closeLabel: o,
|
|
2353
|
-
children:
|
|
2354
|
-
description:
|
|
2452
|
+
children: i,
|
|
2453
|
+
description: r,
|
|
2355
2454
|
footer: s,
|
|
2356
|
-
icon:
|
|
2357
|
-
tone:
|
|
2358
|
-
size:
|
|
2359
|
-
isDismissable:
|
|
2360
|
-
className:
|
|
2361
|
-
testId:
|
|
2455
|
+
icon: c,
|
|
2456
|
+
tone: l = "neutral",
|
|
2457
|
+
size: u = "md",
|
|
2458
|
+
isDismissable: b = !0,
|
|
2459
|
+
className: g,
|
|
2460
|
+
testId: h
|
|
2362
2461
|
}) => {
|
|
2363
|
-
const
|
|
2364
|
-
|
|
2365
|
-
const
|
|
2366
|
-
|
|
2367
|
-
}, [e]),
|
|
2462
|
+
const { labels: p } = P(), N = Y(null), m = ce(), f = ce();
|
|
2463
|
+
F(() => {
|
|
2464
|
+
const x = N.current;
|
|
2465
|
+
x && (e && !x.open && (x.showModal(), Aa(x)), !e && x.open && x.close());
|
|
2466
|
+
}, [e]), F(() => {
|
|
2368
2467
|
if (!e) return;
|
|
2369
|
-
const
|
|
2468
|
+
const x = document.body.style.overflow;
|
|
2370
2469
|
return document.body.style.overflow = "hidden", () => {
|
|
2371
|
-
document.body.style.overflow =
|
|
2470
|
+
document.body.style.overflow = x;
|
|
2372
2471
|
};
|
|
2373
|
-
}, [e]),
|
|
2374
|
-
const
|
|
2375
|
-
if (
|
|
2376
|
-
const
|
|
2377
|
-
E.preventDefault(),
|
|
2472
|
+
}, [e]), F(() => {
|
|
2473
|
+
const x = N.current;
|
|
2474
|
+
if (!x) return;
|
|
2475
|
+
const L = (E) => {
|
|
2476
|
+
E.preventDefault(), b && n();
|
|
2378
2477
|
};
|
|
2379
|
-
return
|
|
2380
|
-
}, [n,
|
|
2381
|
-
const D =
|
|
2382
|
-
(
|
|
2383
|
-
|
|
2478
|
+
return x.addEventListener("cancel", L), () => x.removeEventListener("cancel", L);
|
|
2479
|
+
}, [n, b]);
|
|
2480
|
+
const D = Q(
|
|
2481
|
+
(x) => {
|
|
2482
|
+
b && x.target === N.current && n();
|
|
2384
2483
|
},
|
|
2385
|
-
[
|
|
2484
|
+
[b, n]
|
|
2386
2485
|
);
|
|
2387
2486
|
return /* @__PURE__ */ a(
|
|
2388
2487
|
"dialog",
|
|
2389
2488
|
{
|
|
2390
|
-
ref:
|
|
2391
|
-
className: d(
|
|
2392
|
-
"aria-labelledby":
|
|
2393
|
-
"aria-describedby":
|
|
2394
|
-
"data-testid":
|
|
2489
|
+
ref: N,
|
|
2490
|
+
className: d(ae.modal, ae[`modal--${u}`], g),
|
|
2491
|
+
"aria-labelledby": m,
|
|
2492
|
+
"aria-describedby": r ? f : void 0,
|
|
2493
|
+
"data-testid": h,
|
|
2395
2494
|
onClick: D,
|
|
2396
|
-
children: /* @__PURE__ */ _("div", { className:
|
|
2397
|
-
/* @__PURE__ */ _("header", { className:
|
|
2398
|
-
|
|
2399
|
-
/* @__PURE__ */ _("div", { className:
|
|
2400
|
-
/* @__PURE__ */ a("h2", { id:
|
|
2401
|
-
|
|
2495
|
+
children: /* @__PURE__ */ _("div", { className: ae.modal__panel, children: [
|
|
2496
|
+
/* @__PURE__ */ _("header", { className: ae.modal__header, children: [
|
|
2497
|
+
c && /* @__PURE__ */ a("span", { className: d(ae.modal__icon, ae[`modal__icon--${l}`]), children: c }),
|
|
2498
|
+
/* @__PURE__ */ _("div", { className: ae.modal__heading, children: [
|
|
2499
|
+
/* @__PURE__ */ a("h2", { id: m, className: ae.modal__title, children: t }),
|
|
2500
|
+
r && /* @__PURE__ */ a("p", { id: f, className: ae.modal__description, children: r })
|
|
2402
2501
|
] }),
|
|
2403
|
-
|
|
2404
|
-
|
|
2502
|
+
b && /* @__PURE__ */ a(
|
|
2503
|
+
ca,
|
|
2405
2504
|
{
|
|
2406
|
-
icon: /* @__PURE__ */ a(
|
|
2407
|
-
label: o,
|
|
2505
|
+
icon: /* @__PURE__ */ a(pa, {}),
|
|
2506
|
+
label: I("Modal.closeLabel", o, p == null ? void 0 : p.close),
|
|
2408
2507
|
variant: "ghost",
|
|
2409
2508
|
size: "sm",
|
|
2410
|
-
className:
|
|
2509
|
+
className: ae.modal__close,
|
|
2411
2510
|
onClick: n
|
|
2412
2511
|
}
|
|
2413
2512
|
)
|
|
2414
2513
|
] }),
|
|
2415
|
-
|
|
2416
|
-
s && /* @__PURE__ */ a("footer", { className:
|
|
2514
|
+
i && /* @__PURE__ */ a("div", { className: ae.modal__body, children: i }),
|
|
2515
|
+
s && /* @__PURE__ */ a("footer", { className: ae.modal__footer, children: s })
|
|
2417
2516
|
] })
|
|
2418
2517
|
}
|
|
2419
2518
|
);
|
|
2420
|
-
},
|
|
2421
|
-
destructive: /* @__PURE__ */ a(
|
|
2422
|
-
warning: /* @__PURE__ */ a(
|
|
2423
|
-
neutral: /* @__PURE__ */ a(
|
|
2424
|
-
},
|
|
2519
|
+
}, Qa = v(is), ss = {
|
|
2520
|
+
destructive: /* @__PURE__ */ a(Rn, {}),
|
|
2521
|
+
warning: /* @__PURE__ */ a(za, {}),
|
|
2522
|
+
neutral: /* @__PURE__ */ a(Tn, {})
|
|
2523
|
+
}, cs = {
|
|
2425
2524
|
destructive: "danger",
|
|
2426
2525
|
warning: "warning",
|
|
2427
2526
|
neutral: "info"
|
|
2428
|
-
},
|
|
2429
|
-
destructive:
|
|
2430
|
-
warning:
|
|
2431
|
-
neutral:
|
|
2432
|
-
},
|
|
2527
|
+
}, ls = {
|
|
2528
|
+
destructive: ge.DANGER,
|
|
2529
|
+
warning: ge.PRIMARY,
|
|
2530
|
+
neutral: ge.PRIMARY
|
|
2531
|
+
}, ds = ({
|
|
2433
2532
|
isOpen: e,
|
|
2434
2533
|
onClose: n,
|
|
2435
2534
|
onConfirm: t,
|
|
2436
2535
|
title: o,
|
|
2437
|
-
description:
|
|
2438
|
-
confirmLabel:
|
|
2536
|
+
description: i,
|
|
2537
|
+
confirmLabel: r,
|
|
2439
2538
|
cancelLabel: s,
|
|
2440
|
-
closeLabel:
|
|
2441
|
-
kind:
|
|
2442
|
-
children:
|
|
2539
|
+
closeLabel: c,
|
|
2540
|
+
kind: l = "neutral",
|
|
2541
|
+
children: u
|
|
2443
2542
|
}) => {
|
|
2444
|
-
const [
|
|
2445
|
-
|
|
2543
|
+
const { labels: b } = P(), [g, h] = Z(!1), p = async () => {
|
|
2544
|
+
h(!0);
|
|
2446
2545
|
try {
|
|
2447
2546
|
await t();
|
|
2448
2547
|
} finally {
|
|
2449
|
-
|
|
2548
|
+
h(!1);
|
|
2450
2549
|
}
|
|
2451
2550
|
};
|
|
2452
2551
|
return /* @__PURE__ */ a(
|
|
2453
|
-
|
|
2552
|
+
Qa,
|
|
2454
2553
|
{
|
|
2455
2554
|
isOpen: e,
|
|
2456
2555
|
onClose: n,
|
|
2457
2556
|
title: o,
|
|
2458
|
-
closeLabel:
|
|
2459
|
-
description:
|
|
2460
|
-
icon:
|
|
2461
|
-
tone:
|
|
2557
|
+
closeLabel: c ?? (b == null ? void 0 : b.close),
|
|
2558
|
+
description: i,
|
|
2559
|
+
icon: ss[l],
|
|
2560
|
+
tone: cs[l],
|
|
2462
2561
|
size: "sm",
|
|
2463
|
-
isDismissable: !
|
|
2464
|
-
footer: /* @__PURE__ */ _(
|
|
2562
|
+
isDismissable: !g,
|
|
2563
|
+
footer: /* @__PURE__ */ _(aa, { children: [
|
|
2465
2564
|
/* @__PURE__ */ a(
|
|
2466
|
-
|
|
2565
|
+
ea,
|
|
2467
2566
|
{
|
|
2468
|
-
variant:
|
|
2469
|
-
size:
|
|
2567
|
+
variant: ge.SECONDARY,
|
|
2568
|
+
size: Te.MEDIUM,
|
|
2470
2569
|
onClick: n,
|
|
2471
|
-
disabled:
|
|
2472
|
-
children: s
|
|
2570
|
+
disabled: g,
|
|
2571
|
+
children: I("ConfirmDialog.cancelLabel", s, b == null ? void 0 : b.cancel)
|
|
2473
2572
|
}
|
|
2474
2573
|
),
|
|
2475
2574
|
/* @__PURE__ */ a(
|
|
2476
|
-
|
|
2575
|
+
ea,
|
|
2477
2576
|
{
|
|
2478
|
-
variant:
|
|
2479
|
-
size:
|
|
2480
|
-
onClick:
|
|
2481
|
-
isLoading:
|
|
2482
|
-
children:
|
|
2577
|
+
variant: ls[l],
|
|
2578
|
+
size: Te.MEDIUM,
|
|
2579
|
+
onClick: p,
|
|
2580
|
+
isLoading: g,
|
|
2581
|
+
children: r
|
|
2483
2582
|
}
|
|
2484
2583
|
)
|
|
2485
2584
|
] }),
|
|
2486
|
-
children:
|
|
2585
|
+
children: u
|
|
2487
2586
|
}
|
|
2488
2587
|
);
|
|
2489
|
-
},
|
|
2490
|
-
form:
|
|
2491
|
-
},
|
|
2588
|
+
}, Nc = v(ds), _s = "hanui-form-zpZn4", us = {
|
|
2589
|
+
form: _s
|
|
2590
|
+
}, hs = ({
|
|
2492
2591
|
isOpen: e,
|
|
2493
2592
|
onClose: n,
|
|
2494
2593
|
onSubmit: t,
|
|
2495
2594
|
title: o,
|
|
2496
|
-
label:
|
|
2497
|
-
submitLabel:
|
|
2595
|
+
label: i,
|
|
2596
|
+
submitLabel: r,
|
|
2498
2597
|
cancelLabel: s,
|
|
2499
|
-
closeLabel:
|
|
2500
|
-
description:
|
|
2501
|
-
hint:
|
|
2502
|
-
placeholder:
|
|
2503
|
-
defaultValue:
|
|
2504
|
-
isRequired:
|
|
2505
|
-
requiredLabel:
|
|
2506
|
-
inputMode:
|
|
2507
|
-
maxLength:
|
|
2508
|
-
rows:
|
|
2598
|
+
closeLabel: c,
|
|
2599
|
+
description: l,
|
|
2600
|
+
hint: u,
|
|
2601
|
+
placeholder: b,
|
|
2602
|
+
defaultValue: g = "",
|
|
2603
|
+
isRequired: h,
|
|
2604
|
+
requiredLabel: p,
|
|
2605
|
+
inputMode: N = "text",
|
|
2606
|
+
maxLength: m,
|
|
2607
|
+
rows: f = 4
|
|
2509
2608
|
}) => {
|
|
2510
|
-
const
|
|
2511
|
-
|
|
2512
|
-
e && !
|
|
2513
|
-
}, [e,
|
|
2514
|
-
const
|
|
2515
|
-
|
|
2609
|
+
const { labels: D } = P(), x = ce(), [L, E] = Z(g), [S, j] = Z(!1), te = Y(!1);
|
|
2610
|
+
F(() => {
|
|
2611
|
+
e && !te.current && E(g), te.current = e;
|
|
2612
|
+
}, [e, g]);
|
|
2613
|
+
const B = L.trim(), oe = !!h && B === "", M = (H) => N === "multiline" ? /* @__PURE__ */ a(
|
|
2614
|
+
Do,
|
|
2516
2615
|
{
|
|
2517
2616
|
...H,
|
|
2518
|
-
value:
|
|
2519
|
-
onChange: (
|
|
2520
|
-
placeholder:
|
|
2521
|
-
maxLength:
|
|
2522
|
-
rows:
|
|
2617
|
+
value: L,
|
|
2618
|
+
onChange: (U) => E(U.target.value),
|
|
2619
|
+
placeholder: b,
|
|
2620
|
+
maxLength: m,
|
|
2621
|
+
rows: f
|
|
2523
2622
|
}
|
|
2524
2623
|
) : /* @__PURE__ */ a(
|
|
2525
|
-
|
|
2624
|
+
No,
|
|
2526
2625
|
{
|
|
2527
2626
|
...H,
|
|
2528
|
-
type:
|
|
2529
|
-
value:
|
|
2530
|
-
onChange: (
|
|
2531
|
-
placeholder:
|
|
2532
|
-
maxLength:
|
|
2627
|
+
type: N === "number" ? "number" : "text",
|
|
2628
|
+
value: L,
|
|
2629
|
+
onChange: (U) => E(U.target.value),
|
|
2630
|
+
placeholder: b,
|
|
2631
|
+
maxLength: m
|
|
2533
2632
|
}
|
|
2534
|
-
),
|
|
2535
|
-
if (!(
|
|
2536
|
-
|
|
2633
|
+
), A = async () => {
|
|
2634
|
+
if (!(oe || S)) {
|
|
2635
|
+
j(!0);
|
|
2537
2636
|
try {
|
|
2538
|
-
await t(
|
|
2637
|
+
await t(B), n();
|
|
2539
2638
|
} catch {
|
|
2540
2639
|
} finally {
|
|
2541
|
-
|
|
2640
|
+
j(!1);
|
|
2542
2641
|
}
|
|
2543
2642
|
}
|
|
2544
2643
|
};
|
|
2545
2644
|
return /* @__PURE__ */ a(
|
|
2546
|
-
|
|
2645
|
+
Qa,
|
|
2547
2646
|
{
|
|
2548
2647
|
isOpen: e,
|
|
2549
2648
|
onClose: n,
|
|
2550
2649
|
title: o,
|
|
2551
|
-
closeLabel:
|
|
2552
|
-
description:
|
|
2650
|
+
closeLabel: c ?? (D == null ? void 0 : D.close),
|
|
2651
|
+
description: l,
|
|
2553
2652
|
size: "sm",
|
|
2554
|
-
isDismissable: !
|
|
2555
|
-
footer: /* @__PURE__ */ _(
|
|
2653
|
+
isDismissable: !S,
|
|
2654
|
+
footer: /* @__PURE__ */ _(aa, { children: [
|
|
2556
2655
|
/* @__PURE__ */ a(
|
|
2557
|
-
|
|
2656
|
+
ea,
|
|
2558
2657
|
{
|
|
2559
|
-
variant:
|
|
2560
|
-
size:
|
|
2658
|
+
variant: ge.SECONDARY,
|
|
2659
|
+
size: Te.MEDIUM,
|
|
2561
2660
|
onClick: n,
|
|
2562
|
-
disabled:
|
|
2563
|
-
children: s
|
|
2661
|
+
disabled: S,
|
|
2662
|
+
children: I("PromptDialog.cancelLabel", s, D == null ? void 0 : D.cancel)
|
|
2564
2663
|
}
|
|
2565
2664
|
),
|
|
2566
2665
|
/* @__PURE__ */ a(
|
|
2567
|
-
|
|
2666
|
+
ea,
|
|
2568
2667
|
{
|
|
2569
2668
|
type: "submit",
|
|
2570
|
-
form:
|
|
2571
|
-
variant:
|
|
2572
|
-
size:
|
|
2573
|
-
disabled:
|
|
2574
|
-
isLoading:
|
|
2575
|
-
children:
|
|
2669
|
+
form: x,
|
|
2670
|
+
variant: ge.PRIMARY,
|
|
2671
|
+
size: Te.MEDIUM,
|
|
2672
|
+
disabled: oe,
|
|
2673
|
+
isLoading: S,
|
|
2674
|
+
children: I("PromptDialog.submitLabel", r, D == null ? void 0 : D.submit)
|
|
2576
2675
|
}
|
|
2577
2676
|
)
|
|
2578
2677
|
] }),
|
|
2579
2678
|
children: /* @__PURE__ */ a(
|
|
2580
2679
|
"form",
|
|
2581
2680
|
{
|
|
2582
|
-
id:
|
|
2583
|
-
className:
|
|
2681
|
+
id: x,
|
|
2682
|
+
className: us.form,
|
|
2584
2683
|
onSubmit: (H) => {
|
|
2585
|
-
H.preventDefault(),
|
|
2684
|
+
H.preventDefault(), A();
|
|
2586
2685
|
},
|
|
2587
|
-
children:
|
|
2686
|
+
children: /* @__PURE__ */ a(Ao, { label: i, hint: u, isRequired: h, requiredLabel: p, children: M })
|
|
2588
2687
|
}
|
|
2589
2688
|
)
|
|
2590
2689
|
}
|
|
2591
2690
|
);
|
|
2592
|
-
},
|
|
2593
|
-
scroller:
|
|
2691
|
+
}, wc = v(hs), ps = "hanui-scroller-EtDmS", bs = "hanui-table-uCv4q", je = {
|
|
2692
|
+
scroller: ps,
|
|
2594
2693
|
"scroller--frame": "hanui-scroller--frame-84zz6",
|
|
2595
|
-
table:
|
|
2694
|
+
table: bs,
|
|
2596
2695
|
"table--compact": "hanui-table--compact-4KCVl",
|
|
2597
2696
|
"table--regular": "hanui-table--regular-hsA3-",
|
|
2598
2697
|
"table--spacious": "hanui-table--spacious-BBUX-",
|
|
2599
2698
|
"table--sticky-head": "hanui-table--sticky-head-FO2L4",
|
|
2600
2699
|
"table--row-hover": "hanui-table--row-hover--MAoe"
|
|
2601
|
-
},
|
|
2700
|
+
}, ms = v(
|
|
2602
2701
|
({ hasFrame: e = !0, className: n, children: t, ...o }) => /* @__PURE__ */ a(
|
|
2603
2702
|
"div",
|
|
2604
2703
|
{
|
|
2605
|
-
className: d(
|
|
2704
|
+
className: d(je.scroller, e && je["scroller--frame"], n),
|
|
2606
2705
|
...o,
|
|
2607
2706
|
children: t
|
|
2608
2707
|
}
|
|
2609
2708
|
)
|
|
2610
2709
|
);
|
|
2611
|
-
|
|
2612
|
-
const
|
|
2710
|
+
ms.displayName = "TableScroller";
|
|
2711
|
+
const gs = ({
|
|
2613
2712
|
density: e = "regular",
|
|
2614
2713
|
hasStickyHead: n,
|
|
2615
2714
|
hasRowHover: t,
|
|
2616
2715
|
className: o,
|
|
2617
|
-
children:
|
|
2618
|
-
...
|
|
2716
|
+
children: i,
|
|
2717
|
+
...r
|
|
2619
2718
|
}) => /* @__PURE__ */ a(
|
|
2620
2719
|
"table",
|
|
2621
2720
|
{
|
|
2622
2721
|
className: d(
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
n &&
|
|
2626
|
-
t &&
|
|
2722
|
+
je.table,
|
|
2723
|
+
je[`table--${e}`],
|
|
2724
|
+
n && je["table--sticky-head"],
|
|
2725
|
+
t && je["table--row-hover"],
|
|
2627
2726
|
o
|
|
2628
2727
|
),
|
|
2629
|
-
...
|
|
2630
|
-
children:
|
|
2728
|
+
...r,
|
|
2729
|
+
children: i
|
|
2631
2730
|
}
|
|
2632
|
-
),
|
|
2633
|
-
wrapper:
|
|
2731
|
+
), $c = v(gs), fs = "hanui-wrapper-KXCZg", ys = "hanui-table-LF5Ow", vs = "hanui-state-YPPb0", xs = "hanui-state__message-wwbIW", Ce = {
|
|
2732
|
+
wrapper: fs,
|
|
2634
2733
|
"wrapper--capped": "hanui-wrapper--capped-M2QUJ",
|
|
2635
|
-
table:
|
|
2636
|
-
state:
|
|
2734
|
+
table: ys,
|
|
2735
|
+
state: vs,
|
|
2637
2736
|
"state--error": "hanui-state--error-A492d",
|
|
2638
|
-
state__message:
|
|
2737
|
+
state__message: xs,
|
|
2639
2738
|
"row--warning": "hanui-row--warning-BAUN2"
|
|
2640
|
-
},
|
|
2739
|
+
}, ks = ({
|
|
2641
2740
|
columns: e,
|
|
2642
2741
|
children: n,
|
|
2643
2742
|
isLoading: t,
|
|
2644
2743
|
error: o,
|
|
2645
|
-
emptyMessage:
|
|
2646
|
-
loadingMessage:
|
|
2744
|
+
emptyMessage: i,
|
|
2745
|
+
loadingMessage: r,
|
|
2647
2746
|
hasViewportCap: s,
|
|
2648
|
-
className:
|
|
2649
|
-
testId:
|
|
2747
|
+
className: c,
|
|
2748
|
+
testId: l
|
|
2650
2749
|
}) => {
|
|
2651
|
-
|
|
2750
|
+
var h, p;
|
|
2751
|
+
const { labels: u } = P(), b = nn.count(n), g = (N, m) => /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a(
|
|
2652
2752
|
"td",
|
|
2653
2753
|
{
|
|
2654
2754
|
colSpan: e.length,
|
|
2655
|
-
className: d(
|
|
2656
|
-
children:
|
|
2755
|
+
className: d(Ce.state, m && Ce[`state--${m}`]),
|
|
2756
|
+
children: N
|
|
2657
2757
|
}
|
|
2658
2758
|
) });
|
|
2659
2759
|
return /* @__PURE__ */ a(
|
|
2660
2760
|
"div",
|
|
2661
2761
|
{
|
|
2662
|
-
className: d(
|
|
2663
|
-
"data-testid":
|
|
2664
|
-
children: /* @__PURE__ */ _("table", { className:
|
|
2665
|
-
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ a("tr", { children: e.map((
|
|
2762
|
+
className: d(Ce.wrapper, s && Ce["wrapper--capped"], c),
|
|
2763
|
+
"data-testid": l,
|
|
2764
|
+
children: /* @__PURE__ */ _("table", { className: Ce.table, children: [
|
|
2765
|
+
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ a("tr", { children: e.map((N) => /* @__PURE__ */ a(
|
|
2666
2766
|
"th",
|
|
2667
2767
|
{
|
|
2668
2768
|
scope: "col",
|
|
2669
|
-
"aria-label":
|
|
2670
|
-
"aria-sort":
|
|
2671
|
-
className:
|
|
2672
|
-
children:
|
|
2769
|
+
"aria-label": N.srLabel,
|
|
2770
|
+
"aria-sort": N.ariaSort,
|
|
2771
|
+
className: N.className,
|
|
2772
|
+
children: N.label
|
|
2673
2773
|
},
|
|
2674
|
-
|
|
2774
|
+
N.key
|
|
2675
2775
|
)) }) }),
|
|
2676
|
-
/* @__PURE__ */ a("tbody", { children: o ?
|
|
2677
|
-
/* @__PURE__ */ _("span", { role: "alert", className:
|
|
2678
|
-
/* @__PURE__ */ a(
|
|
2776
|
+
/* @__PURE__ */ a("tbody", { children: o ? g(
|
|
2777
|
+
/* @__PURE__ */ _("span", { role: "alert", className: Ce.state__message, children: [
|
|
2778
|
+
/* @__PURE__ */ a(Ka, {}),
|
|
2679
2779
|
o
|
|
2680
2780
|
] }),
|
|
2681
2781
|
"error"
|
|
2682
|
-
) : t ?
|
|
2782
|
+
) : t ? g(
|
|
2783
|
+
I(
|
|
2784
|
+
"DataTable.loadingMessage",
|
|
2785
|
+
r,
|
|
2786
|
+
(h = u == null ? void 0 : u.dataTable) == null ? void 0 : h.loading
|
|
2787
|
+
)
|
|
2788
|
+
) : b === 0 ? g(
|
|
2789
|
+
I("DataTable.emptyMessage", i, (p = u == null ? void 0 : u.dataTable) == null ? void 0 : p.empty)
|
|
2790
|
+
) : n })
|
|
2683
2791
|
] })
|
|
2684
2792
|
}
|
|
2685
2793
|
);
|
|
2686
|
-
},
|
|
2687
|
-
|
|
2688
|
-
const
|
|
2689
|
-
bar:
|
|
2690
|
-
bar__hiddenSubmit:
|
|
2691
|
-
bar__actions:
|
|
2692
|
-
field:
|
|
2794
|
+
}, Ns = v(({ isWarning: e, className: n, children: t, ...o }) => /* @__PURE__ */ a("tr", { className: d(e && Ce["row--warning"], n), ...o, children: t }));
|
|
2795
|
+
Ns.displayName = "DataTableRow";
|
|
2796
|
+
const Dc = v(ks), ws = "hanui-bar-b4PP4", $s = "hanui-bar__hiddenSubmit-jeCyX", Ds = "hanui-bar__actions-rG69L", Ls = "hanui-field-f-rvu", We = {
|
|
2797
|
+
bar: ws,
|
|
2798
|
+
bar__hiddenSubmit: $s,
|
|
2799
|
+
bar__actions: Ds,
|
|
2800
|
+
field: Ls,
|
|
2693
2801
|
"field--wide": "hanui-field--wide-FA5gf"
|
|
2694
|
-
},
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2802
|
+
}, Cs = ({ onSubmit: e, children: n, actions: t, label: o, className: i, testId: r }) => {
|
|
2803
|
+
const { labels: s } = P();
|
|
2804
|
+
return /* @__PURE__ */ _(
|
|
2805
|
+
"form",
|
|
2806
|
+
{
|
|
2807
|
+
className: d(We.bar, i),
|
|
2808
|
+
"aria-label": I("FilterBar.label", o, s == null ? void 0 : s.filters),
|
|
2809
|
+
"data-testid": r,
|
|
2810
|
+
onSubmit: (c) => {
|
|
2811
|
+
c.preventDefault(), e();
|
|
2812
|
+
},
|
|
2813
|
+
children: [
|
|
2814
|
+
n,
|
|
2815
|
+
/* @__PURE__ */ a("button", { type: "submit", className: We.bar__hiddenSubmit, tabIndex: -1, "aria-hidden": !0 }),
|
|
2816
|
+
t && /* @__PURE__ */ a("div", { className: We.bar__actions, children: t })
|
|
2817
|
+
]
|
|
2818
|
+
}
|
|
2819
|
+
);
|
|
2820
|
+
}, Is = v(({ children: e, isWide: n, className: t }) => /* @__PURE__ */ a("div", { className: d(We.field, n && We["field--wide"], t), children: e }));
|
|
2821
|
+
Is.displayName = "FilterBarField";
|
|
2822
|
+
const Lc = v(Cs), Es = "hanui-pagination-K-L20", Ms = "hanui-pagination__list--9HqC", Ts = "hanui-pagination__arrow-XIgoX", Rs = "hanui-pagination__page-TpoJM", As = "hanui-pagination__gap-qoDyI", me = {
|
|
2823
|
+
pagination: Es,
|
|
2824
|
+
pagination__list: Ms,
|
|
2825
|
+
pagination__arrow: Ts,
|
|
2826
|
+
pagination__page: Rs,
|
|
2716
2827
|
"pagination__page--active": "hanui-pagination__page--active-XHeaz",
|
|
2717
|
-
pagination__gap:
|
|
2718
|
-
},
|
|
2719
|
-
if (n <= 7) return Array.from({ length: n }, (
|
|
2828
|
+
pagination__gap: As
|
|
2829
|
+
}, Bs = (e, n) => {
|
|
2830
|
+
if (n <= 7) return Array.from({ length: n }, (r, s) => s + 1);
|
|
2720
2831
|
const t = /* @__PURE__ */ new Set([1, n, e]);
|
|
2721
2832
|
e - 1 > 1 && t.add(e - 1), e + 1 < n && t.add(e + 1);
|
|
2722
|
-
const o = [...t].sort((
|
|
2723
|
-
return o.forEach((
|
|
2724
|
-
s > 0 &&
|
|
2725
|
-
}),
|
|
2726
|
-
},
|
|
2833
|
+
const o = [...t].sort((r, s) => r - s), i = [];
|
|
2834
|
+
return o.forEach((r, s) => {
|
|
2835
|
+
s > 0 && r - o[s - 1] > 1 && i.push("gap"), i.push(r);
|
|
2836
|
+
}), i;
|
|
2837
|
+
}, Ss = ({
|
|
2727
2838
|
page: e,
|
|
2728
2839
|
totalPages: n,
|
|
2729
2840
|
label: t,
|
|
2730
2841
|
previousLabel: o,
|
|
2731
|
-
nextLabel:
|
|
2732
|
-
buildHref:
|
|
2842
|
+
nextLabel: i,
|
|
2843
|
+
buildHref: r,
|
|
2733
2844
|
onPageChange: s,
|
|
2734
|
-
linkProps:
|
|
2735
|
-
className:
|
|
2736
|
-
testId:
|
|
2845
|
+
linkProps: c,
|
|
2846
|
+
className: l,
|
|
2847
|
+
testId: u
|
|
2737
2848
|
}) => {
|
|
2738
|
-
|
|
2849
|
+
var p, N, m;
|
|
2850
|
+
const { labels: b } = P(), g = ia(() => Bs(e, n), [e, n]);
|
|
2739
2851
|
if (n <= 1) return null;
|
|
2740
|
-
const
|
|
2741
|
-
s && s(
|
|
2852
|
+
const h = (f) => {
|
|
2853
|
+
s && s(f);
|
|
2742
2854
|
};
|
|
2743
|
-
return /* @__PURE__ */ _(
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
children:
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2855
|
+
return /* @__PURE__ */ _(
|
|
2856
|
+
"nav",
|
|
2857
|
+
{
|
|
2858
|
+
className: d(me.pagination, l),
|
|
2859
|
+
"aria-label": I("Pagination.label", t, (p = b == null ? void 0 : b.pagination) == null ? void 0 : p.label),
|
|
2860
|
+
"data-testid": u,
|
|
2861
|
+
children: [
|
|
2862
|
+
/* @__PURE__ */ a(
|
|
2863
|
+
ca,
|
|
2864
|
+
{
|
|
2865
|
+
className: me.pagination__arrow,
|
|
2866
|
+
icon: /* @__PURE__ */ a(Nn, {}),
|
|
2867
|
+
label: I(
|
|
2868
|
+
"Pagination.previousLabel",
|
|
2869
|
+
o,
|
|
2870
|
+
(N = b == null ? void 0 : b.pagination) == null ? void 0 : N.previous
|
|
2871
|
+
),
|
|
2872
|
+
variant: "outline",
|
|
2873
|
+
disabled: e <= 1,
|
|
2874
|
+
onClick: () => h(e - 1)
|
|
2875
|
+
}
|
|
2876
|
+
),
|
|
2877
|
+
/* @__PURE__ */ a("ul", { className: me.pagination__list, children: g.map(
|
|
2878
|
+
(f, D) => f === "gap" ? /* @__PURE__ */ a("li", { className: me.pagination__gap, "aria-hidden": !0, children: "…" }, `gap-${D}`) : /* @__PURE__ */ a("li", { children: r ? /* @__PURE__ */ a(
|
|
2879
|
+
le,
|
|
2880
|
+
{
|
|
2881
|
+
href: r(f),
|
|
2882
|
+
className: d(
|
|
2883
|
+
me.pagination__page,
|
|
2884
|
+
f === e && me["pagination__page--active"]
|
|
2885
|
+
),
|
|
2886
|
+
"aria-current": f === e ? "page" : void 0,
|
|
2887
|
+
...c,
|
|
2888
|
+
children: f
|
|
2889
|
+
}
|
|
2890
|
+
) : /* @__PURE__ */ a(
|
|
2891
|
+
ea,
|
|
2892
|
+
{
|
|
2893
|
+
variant: ge.SECONDARY,
|
|
2894
|
+
size: Te.SMALL,
|
|
2895
|
+
className: d(
|
|
2896
|
+
me.pagination__page,
|
|
2897
|
+
f === e && me["pagination__page--active"]
|
|
2898
|
+
),
|
|
2899
|
+
"aria-current": f === e ? "page" : void 0,
|
|
2900
|
+
onClick: () => h(f),
|
|
2901
|
+
children: f
|
|
2902
|
+
}
|
|
2903
|
+
) }, f)
|
|
2904
|
+
) }),
|
|
2905
|
+
/* @__PURE__ */ a(
|
|
2906
|
+
ca,
|
|
2907
|
+
{
|
|
2908
|
+
className: me.pagination__arrow,
|
|
2909
|
+
icon: /* @__PURE__ */ a(Ha, {}),
|
|
2910
|
+
label: I("Pagination.nextLabel", i, (m = b == null ? void 0 : b.pagination) == null ? void 0 : m.next),
|
|
2911
|
+
variant: "outline",
|
|
2912
|
+
disabled: e >= n,
|
|
2913
|
+
onClick: () => h(e + 1)
|
|
2914
|
+
}
|
|
2915
|
+
)
|
|
2916
|
+
]
|
|
2917
|
+
}
|
|
2918
|
+
);
|
|
2919
|
+
}, Cc = v(Ss);
|
|
2796
2920
|
export {
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2921
|
+
ha as ABOVE_MOBILE_MEDIA_QUERY,
|
|
2922
|
+
Xs as ABOVE_TABLET_MEDIA_QUERY,
|
|
2923
|
+
ic as Alert,
|
|
2924
|
+
sc as Avatar,
|
|
2925
|
+
cc as Badge,
|
|
2926
|
+
Ga as BottomSheet,
|
|
2927
|
+
lc as Breadcrumb,
|
|
2928
|
+
ea as Button,
|
|
2929
|
+
dc as Card,
|
|
2930
|
+
ur as CardBody,
|
|
2931
|
+
hr as CardFooter,
|
|
2932
|
+
dr as CardMedia,
|
|
2933
|
+
_r as CardOverlay,
|
|
2934
|
+
Ws as Checkbox,
|
|
2935
|
+
Yn as Chip,
|
|
2936
|
+
Js as ChipGroup,
|
|
2937
|
+
Qs as Combobox,
|
|
2938
|
+
Nc as ConfirmDialog,
|
|
2939
|
+
_c as CopyField,
|
|
2940
|
+
rn as DARK_THEME,
|
|
2941
|
+
zs as DEFAULT_FONTS,
|
|
2942
|
+
Dc as DataTable,
|
|
2943
|
+
Ns as DataTableRow,
|
|
2944
|
+
hc as Directory,
|
|
2945
|
+
Fr as DirectoryGroup,
|
|
2946
|
+
Or as DirectoryJump,
|
|
2947
|
+
Pr as DirectoryRow,
|
|
2948
|
+
uc as Divider,
|
|
2949
|
+
pc as EmptyState,
|
|
2950
|
+
Ao as Field,
|
|
2951
|
+
Lc as FilterBar,
|
|
2952
|
+
Is as FilterBarField,
|
|
2953
|
+
qs as HanuiProvider,
|
|
2954
|
+
ca as IconButton,
|
|
2955
|
+
No as Input,
|
|
2956
|
+
on as LIGHT_THEME,
|
|
2957
|
+
dn as MOBILE_BREAKPOINT,
|
|
2958
|
+
Qa as Modal,
|
|
2959
|
+
bc as PageHeader,
|
|
2960
|
+
Cc as Pagination,
|
|
2961
|
+
mc as Panel,
|
|
2962
|
+
bi as PanelForm,
|
|
2963
|
+
mi as PanelRow,
|
|
2964
|
+
gc as Price,
|
|
2965
|
+
wc as PromptDialog,
|
|
2966
|
+
oc as QuantityStepper,
|
|
2967
|
+
ec as Radio,
|
|
2968
|
+
ac as RadioCard,
|
|
2969
|
+
nc as RangeSlider,
|
|
2970
|
+
fc as Rating,
|
|
2971
|
+
tc as RatingInput,
|
|
2972
|
+
yc as SectionHeader,
|
|
2973
|
+
Vs as Select,
|
|
2974
|
+
vc as Skeleton,
|
|
2975
|
+
Ba as Spinner,
|
|
2976
|
+
_n as TABLET_BREAKPOINT,
|
|
2977
|
+
Us as TABLET_PORTRAIT_BREAKPOINT,
|
|
2978
|
+
$c as Table,
|
|
2979
|
+
rc as TableCheckbox,
|
|
2980
|
+
ms as TableScroller,
|
|
2981
|
+
xc as Tabs,
|
|
2982
|
+
Ys as TextLink,
|
|
2983
|
+
Do as Textarea,
|
|
2984
|
+
kc as Tile,
|
|
2985
|
+
Zs as Tooltip,
|
|
2986
|
+
Te as UISize,
|
|
2987
|
+
ge as UIVariant,
|
|
2988
|
+
sn as buildThemeCss,
|
|
2989
|
+
js as initHanui,
|
|
2990
|
+
hn as isKeyboardOpeningElement,
|
|
2991
|
+
wa as matchesSearch,
|
|
2992
|
+
Na as normalizeSearchTerm,
|
|
2993
|
+
Aa as preventAutoKeyboard,
|
|
2994
|
+
Ks as resolveTokens,
|
|
2995
|
+
P as useHanui,
|
|
2996
|
+
Gs as useHanuiTheme,
|
|
2997
|
+
ln as useSheetViewport
|
|
2874
2998
|
};
|
|
2875
2999
|
//# sourceMappingURL=index.js.map
|