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