@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/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @ahmetilhn/hanui
|
|
2
2
|
|
|
3
3
|
Erişilebilir, tema güdümlü React bileşen kütüphanesi. SCSS Modules üzerine
|
|
4
|
-
kurulu; çalışma
|
|
4
|
+
kurulu; tek çalışma zamanı bağımlılığı ikon seti (`react-bootstrap-icons`).
|
|
5
5
|
|
|
6
6
|
- **Tek CSS dosyası, iki tema.** Açık ve koyu hazır gelir, her token dışarıdan
|
|
7
7
|
ezilebilir.
|
|
@@ -14,10 +14,11 @@ kurulu; çalışma zamanında **hiçbir UI bağımlılığı yok**.
|
|
|
14
14
|
duyurusu tarayıcıdan gelir.
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install @ahmetilhn/hanui @ahmetilhn/handy-utils
|
|
17
|
+
npm install @ahmetilhn/hanui @ahmetilhn/handy-utils react-bootstrap-icons
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
`react`, `react-dom
|
|
20
|
+
`react`, `react-dom`, `@ahmetilhn/handy-utils` ve `react-bootstrap-icons`
|
|
21
|
+
**peer** bağımlılıktır.
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|
|
@@ -292,6 +293,23 @@ işaretle de bildirilir: `Alert`in her tonunun kendi ikonu var, `Field`in zorunl
|
|
|
292
293
|
yıldızının yanında okunabilir bir metin, `RatingInput`in yıldızlarının altında
|
|
293
294
|
açıklama duruyor.
|
|
294
295
|
|
|
296
|
+
**İkonlar `react-bootstrap-icons`ten, DOLU sürümüyle.** Kabuk simgeleri
|
|
297
|
+
(`Modal`ın kapatma çarpısı, `Select`in oku, `Alert`in durum ikonu) bir zamanlar
|
|
298
|
+
kütüphanenin içinde elle çizilmiş yollardı; bir ikon setinin bakımını üstlenmek
|
|
299
|
+
hiçbir şey kazandırmıyordu — tüketici uygulamalar kendi içerik ikonlarını zaten
|
|
300
|
+
aynı setten alıyor ve paket `external`, yani ikinci bir kopya inmiyor. Dolu
|
|
301
|
+
(`*Fill`) sürüm kural: ince konturlu bir simge, tint zeminde ve küçük ölçüde
|
|
302
|
+
tek piksele inip kayboluyor. Fill eşi olmayan simgelerde (`X`, `Check`, `Plus`,
|
|
303
|
+
`Dash`) kalın `*Lg` sürümü kullanılır, chevron yerine dolu `Caret*Fill` —
|
|
304
|
+
böylece bütün kabuk aynı çizgi ağırlığında kalır. İçerik ikonları (kategori
|
|
305
|
+
simgesi, marka logosu) her zaman `ReactNode` prop'u olarak DIŞARIDAN gelir.
|
|
306
|
+
|
|
307
|
+
**İkon ölçüsü metin puntosundan ayrıdır.** İkonlar `1em` ile ölçeklenir ama
|
|
308
|
+
taşındıkları kutunun `font-size` değeri metin için seçilmiştir ve simge için
|
|
309
|
+
küçük kalır: 40 px'lik bir `IconButton`ın ortasındaki 16 px'lik simge tıklanabilir
|
|
310
|
+
görünmüyordu. Ölçek ayrı bir token dizisidir (`$icon-xs` … `$icon-xl`,
|
|
311
|
+
14/16/18/20/24 px) ve ikon taşıyan her kutu puntosunu oradan alır.
|
|
312
|
+
|
|
295
313
|
**"Yüklenemedi" ile "boş" ayrı durumlardır.** `DataTable`da `error` verilmişken
|
|
296
314
|
boş mesajı **asla** çizilmez; bir ağ hatasını "kayıt kalmamış" diye okutmak
|
|
297
315
|
kullanıcıya yanlış karar verdirir.
|
package/build/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),q=require("@ahmetilhn/handy-utils"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),q=require("@ahmetilhn/handy-utils"),D=require("react-bootstrap-icons"),on=require("react-dom"),v={n0:"#ffffff",n25:"#fafbfc",n50:"#f6f7f9",n100:"#eef0f4",n150:"#e7eaef",n200:"#e2e6ec",n250:"#d6dce4",n300:"#c9d0da",n500:"#8a94a3",n550:"#6b7583",n600:"#5a6472",n900:"#11151b"},V={base:"#1f2937",two:"#2b3646",three:"#3a4658",ink:"#12161d",inkTwo:"#1c222b"},ne={base:"#f59e0b",hover:"#d98706",active:"#b87205",soft:"#f8cd80",dark:"#fbbf24",darkHover:"#f0af12",on:"#291500"},O={base:"#2f6fed",hover:"#1d54c4",active:"#17439c",text:"#1d54c4",tint:"#eaf1fe",line:"#bcd2fb",dark:"#5b93ff",darkHover:"#7aa8ff",darkTint:"#16243c",darkLine:"#2a3f63"},C={okBg:"#e8f4eb",okFg:"#1d6e31",okLine:"#a8dcb7",okBgDark:"#122817",okFgDark:"#34c759",okLineDark:"#22542f",warnBg:"#fdf0dd",warnFg:"#7a3e02",warnLine:"#ebc687",warnBgDark:"#2c2008",warnFgDark:"#f5c86b",warnLineDark:"#55401a",offBg:"#f1f2f5",offFg:"#3a424f",offLine:"#ccd2db",offBgDark:"#212630",offFgDark:"#a3adbb",offLineDark:"#333b47",badBg:"#f8ebeb",badFg:"#bb1e1e",badLine:"#e6a6a6",badBgDark:"#310f0f",badFgDark:"#e97575",badLineDark:"#621b1b",oemBg:"#eaf1fe",oemFg:"#16305c",oemLine:"#a9c6f9",oemBgDark:"#152139",oemFgDark:"#9dc0ff",oemLineDark:"#27395c",altBg:"#eeebfa",altFg:"#2e2661",altLine:"#c0b6ea",altBgDark:"#1d1a33",altFgDark:"#bfb3f5",altLineDark:"#332d56"},je={base:"#dc2626",hover:"#bb1e1e",dark:"#e45b5b",darkHover:"#ef7a72",onDark:"#1a0b0a"},be={red:"#dc2626",redDark:"#e35252",green:"#34c759",greenDark:"#4cd76c",greenHover:"#2aae4b",greenHoverDark:"#63e084",onGreen:"#06280f"},Ve={bg:"#e8f4eb",fg:"#1d6e31",bgDark:"#122817",fgDark:"#34c759"},xa={light:"#9a5f04",dark:"#f0b429"},N=(a,n)=>{const t=a.replace("#",""),o=t.length===3?t.split("").map(l=>l+l).join(""):t,i=parseInt(o.slice(0,2),16),r=parseInt(o.slice(2,4),16),c=parseInt(o.slice(4,6),16);return`rgba(${i}, ${r}, ${c}, ${n})`},Y="#000000",fa={page:v.n50,surface:v.n0,"surface-2":v.n100,"surface-3":v.n150,"surface-inset":v.n25,border:v.n250,"border-strong":v.n300,text:v.n900,"text-2":v.n600,"text-3":v.n550,graphite:V.base,"graphite-2":V.two,"graphite-3":V.three,action:V.base,"action-hover":V.two,"action-active":V.three,"on-action":v.n0,"action-soft":v.n300,amber:ne.base,"amber-hover":ne.hover,"amber-active":ne.active,"amber-soft":ne.soft,"on-amber":ne.on,blue:O.base,"blue-hover":O.hover,"blue-active":O.active,"blue-text":O.text,"blue-tint":O.tint,"blue-line":O.line,"ok-bg":C.okBg,"ok-fg":C.okFg,"ok-line":C.okLine,"warn-bg":C.warnBg,"warn-fg":C.warnFg,"warn-line":C.warnLine,"off-bg":C.offBg,"off-fg":C.offFg,"off-line":C.offLine,"bad-bg":C.badBg,"bad-fg":C.badFg,"bad-line":C.badLine,"oem-bg":C.oemBg,"oem-fg":C.oemFg,"oem-line":C.oemLine,"alt-bg":C.altBg,"alt-fg":C.altFg,"alt-line":C.altLine,"sale-bg":Ve.bg,"sale-fg":Ve.fg,"red-accent":be.red,"green-accent":be.green,"green-accent-hover":be.greenHover,"on-green":be.onGreen,star:xa.light,"danger-solid":je.base,"danger-solid-hover":je.hover,"on-danger":v.n0,"nav-bg":v.n0,"nav-bg-2":v.n100,"nav-fg":v.n900,"nav-fg-2":v.n600,"nav-fg-3":v.n500,"nav-line":v.n200,"nav-line-strong":v.n300,"nav-hover":v.n100,"footer-bg":v.n100,"shadow-xs":`0 1px 2px ${N(v.n900,.05)}`,"shadow-sm":`0 1px 2px ${N(v.n900,.05)}, 0 1px 3px ${N(v.n900,.04)}`,"shadow-md":`0 2px 4px ${N(v.n900,.04)}, 0 6px 16px ${N(v.n900,.07)}`,"shadow-lg":`0 4px 8px ${N(v.n900,.05)}, 0 16px 32px ${N(v.n900,.1)}`,"shadow-xl":`0 8px 16px ${N(v.n900,.06)}, 0 28px 56px ${N(v.n900,.13)}`,"shadow-up":`0 -2px 4px ${N(v.n900,.03)}, 0 -8px 24px ${N(v.n900,.08)}`,ring:`0 0 0 3px ${N(O.base,.28)}`,"ring-color":O.base,"ring-danger":`0 0 0 3px ${N(je.base,.24)}`,"ring-ok":`0 0 0 4px ${N(C.okFg,.16)}`,scrim:N(v.n900,.55),"scrim-soft":N(v.n900,.32),glass:N(v.n0,.92),"glass-solid":v.n0,"on-scrim":v.n0,"skeleton-a":v.n100,"skeleton-b":v.n25,track:N(v.n900,.12),"media-bg":v.n100,"glow-1":N(O.base,.1),"glow-2":N(O.base,.06),"glow-amber":N(ne.base,.09)},ya={page:"#0e1116",surface:"#171b22","surface-2":"#1f242d","surface-3":"#262c36","surface-inset":"#13171d",border:"#262c36","border-strong":"#363e4a",text:"#e7eaee","text-2":"#9aa4b2","text-3":"#6b7583",graphite:V.ink,"graphite-2":V.inkTwo,"graphite-3":V.two,action:v.n150,"action-hover":v.n0,"action-active":v.n300,"on-action":v.n900,"action-soft":"#414a58",amber:ne.dark,"amber-hover":ne.darkHover,"amber-active":ne.base,"amber-soft":"#6d5316","on-amber":ne.on,blue:O.dark,"blue-hover":O.darkHover,"blue-active":O.base,"blue-text":O.dark,"blue-tint":O.darkTint,"blue-line":O.darkLine,"ok-bg":C.okBgDark,"ok-fg":C.okFgDark,"ok-line":C.okLineDark,"warn-bg":C.warnBgDark,"warn-fg":C.warnFgDark,"warn-line":C.warnLineDark,"off-bg":C.offBgDark,"off-fg":C.offFgDark,"off-line":C.offLineDark,"bad-bg":C.badBgDark,"bad-fg":C.badFgDark,"bad-line":C.badLineDark,"oem-bg":C.oemBgDark,"oem-fg":C.oemFgDark,"oem-line":C.oemLineDark,"alt-bg":C.altBgDark,"alt-fg":C.altFgDark,"alt-line":C.altLineDark,"sale-bg":Ve.bgDark,"sale-fg":Ve.fgDark,"red-accent":be.redDark,"green-accent":be.greenDark,"green-accent-hover":be.greenHoverDark,"on-green":be.onGreen,star:xa.dark,"danger-solid":je.dark,"danger-solid-hover":je.darkHover,"on-danger":je.onDark,"nav-bg":V.ink,"nav-bg-2":V.inkTwo,"nav-fg":"#e7eaee","nav-fg-2":"#9aa4b2","nav-fg-3":"#6b7583","nav-line":"#262c36","nav-line-strong":"#363e4a","nav-hover":N(v.n0,.07),"footer-bg":V.ink,"shadow-xs":`0 1px 2px ${N(Y,.4)}`,"shadow-sm":`0 1px 2px ${N(Y,.4)}, 0 1px 3px ${N(Y,.3)}`,"shadow-md":`0 2px 4px ${N(Y,.35)}, 0 6px 16px ${N(Y,.45)}`,"shadow-lg":`0 4px 8px ${N(Y,.4)}, 0 16px 32px ${N(Y,.55)}`,"shadow-xl":`0 8px 16px ${N(Y,.45)}, 0 28px 56px ${N(Y,.6)}`,"shadow-up":`0 -2px 4px ${N(Y,.3)}, 0 -8px 24px ${N(Y,.45)}`,ring:`0 0 0 3px ${N(O.dark,.36)}`,"ring-color":O.dark,"ring-danger":`0 0 0 3px ${N(je.dark,.32)}`,"ring-ok":`0 0 0 4px ${N(C.okFgDark,.2)}`,scrim:N(Y,.68),"scrim-soft":N(Y,.45),glass:N("#1f242d",.92),"glass-solid":"#1f242d","on-scrim":v.n0,"skeleton-a":"#1f242d","skeleton-b":"#262c36",track:N(v.n0,.14),"media-bg":"#1f242d","glow-1":N(O.base,.2),"glow-2":N(O.dark,.1),"glow-amber":N(ne.dark,.12)},sn={heading:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",body:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",mono:"ui-monospace, 'SF Mono', Menlo, Consolas, monospace"},ha="--hanui-",ma="hanui-theme-overrides",we="data-hanui-theme",pa="hanui-theme-switching",rn=(a,n)=>{const t=a==="dark"?ya:fa,o=(a==="dark"?n==null?void 0:n.dark:n==null?void 0:n.light)??{};return{...t,...o}},va=a=>{const n=[],t=(r,c=" ")=>Object.entries(r).map(([l,d])=>`${c}${ha}${l}: ${d};`).join(`
|
|
2
2
|
`),o=a.fonts??{},i=Object.entries(o).filter(([,r])=>!!r);if(i.length>0&&n.push(`:root {
|
|
3
|
-
${i.map(([r,c])=>` ${
|
|
3
|
+
${i.map(([r,c])=>` ${ha}font-${r}: ${c};`).join(`
|
|
4
4
|
`)}
|
|
5
5
|
}`),a.light&&Object.keys(a.light).length>0){const r=t(a.light);n.push(`:root {
|
|
6
6
|
${r}
|
|
@@ -14,5 +14,5 @@ ${t(a.dark," ")}
|
|
|
14
14
|
}
|
|
15
15
|
}`)}return n.join(`
|
|
16
16
|
|
|
17
|
-
`)},ka=a=>{if(!q.isClient())return;const n=a?ja(a):"",t=document.getElementById(ma);if(n===""){t==null||t.remove();return}const o=t??document.createElement("style");o.id=ma,o.textContent=n,t||document.head.appendChild(o)},Na=s.createContext({}),A=()=>s.useContext(Na),mn=({children:a,theme:n,linkComponent:t,labels:o})=>{const i=s.useMemo(()=>n?JSON.stringify(n):"",[n]);s.useEffect(()=>{ka(n)},[i]);const r=s.useRef(n);r.current=n;const c=s.useMemo(()=>({theme:r.current,linkComponent:t,labels:o}),[i,t,o]);return e.jsx(Na.Provider,{value:c,children:a})},bn=(a={})=>{ka(a.theme),!(!q.isClient()||!a.colorScheme)&&document.documentElement.setAttribute(we,a.colorScheme)},wa=()=>{var a;return q.isClient()&&((a=window.matchMedia)!=null&&a.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"},gn=()=>{if(!q.isClient())return"light";const a=document.documentElement.getAttribute(we);return a==="dark"||a==="light"?a:wa()},xn=()=>{const[a,n]=s.useState("light"),[t,o]=s.useState(!1);s.useEffect(()=>{n(gn()),o(!0)},[]),s.useEffect(()=>{if(!q.isClient()||!window.matchMedia)return;const c=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>{document.documentElement.hasAttribute(we)||n(wa())};return c.addEventListener("change",l),()=>c.removeEventListener("change",l)},[]);const i=s.useCallback(c=>{if(!q.isClient())return;const l=document.documentElement;l.classList.add(ba),l.setAttribute(we,c),n(c),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>l.classList.remove(ba))})},[]),r=s.useCallback(()=>i(a==="dark"?"light":"dark"),[a,i]);return{scheme:a,setScheme:i,toggle:r,isReady:t}},$a="--hanui-sheet-height",Ca="--hanui-sheet-inset-bottom";let Xe=0,Fe=0;const Da=()=>{const a=window.visualViewport;if(!a)return;const n=window.innerHeight-a.height-a.offsetTop,t=document.documentElement;t.style.setProperty(Ca,`${Math.max(0,Math.round(n))}px`),t.style.setProperty($a,`${Math.round(a.height)}px`)},De=()=>{Fe||(Fe=window.requestAnimationFrame(()=>{Fe=0,Da()}))},Ea=(a=!0)=>{s.useEffect(()=>{if(!a)return;const n=window.visualViewport;if(n)return Xe+=1,Xe===1&&(n.addEventListener("resize",De),n.addEventListener("scroll",De),window.addEventListener("orientationchange",De)),Da(),()=>{Xe-=1,!(Xe>0)&&(n.removeEventListener("resize",De),n.removeEventListener("scroll",De),window.removeEventListener("orientationchange",De),Fe&&(window.cancelAnimationFrame(Fe),Fe=0),document.documentElement.style.removeProperty(Ca),document.documentElement.style.removeProperty($a))}},[a])};var oe=(a=>(a.PRIMARY="PRIMARY",a.CART="CART",a.SECONDARY="SECONDARY",a.OUTLINE="OUTLINE",a.DARK="DARK",a.LIGHT="LIGHT",a.GHOST="GHOST",a.DANGER="DANGER",a))(oe||{}),be=(a=>(a.SMALL="SMALL",a.MEDIUM="MEDIUM",a.LARGE="LARGE",a))(be||{});const La=640,fn=768,Ia=1024,yn=`(min-width: ${Ia+1}px)`,We=`(min-width: ${La+1}px)`,oa=a=>a.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(),sa=(a,n)=>oa(a).includes(oa(n)),vn=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),Ra=a=>{if(!(a instanceof HTMLElement))return!1;if(a.isContentEditable)return!0;const n=a.getAttribute("contenteditable");if(n===""||n==="true"||n==="plaintext-only")return!0;const t=a.tagName;return t==="TEXTAREA"?!0:t!=="INPUT"?!1:!vn.has(a.type)},ra=a=>{const n=a.ownerDocument.activeElement;!a.contains(n)||!Ra(n)||(n.blur(),a.tabIndex=-1,a.focus({preventScroll:!0}))},_=(...a)=>{let n="";for(const t of a)t&&(n=n===""?t:`${n} ${t}`);return n},se=({children:a,...n})=>{const{linkComponent:t}=A();return t?e.jsx(t,{...n,children:a}):e.jsx("a",{...n,children:a})},ga=new Set,D=(a,...n)=>{for(const t of n)if(t!==void 0)return t;return process.env.NODE_ENV!=="production"&&!ga.has(a)&&(ga.add(a),console.error(`[hanui] Eksik metin: ${a}. 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.`)),""},Be=(a,n,...t)=>n?n(...t):D(a),jn="hanui-spinner-7pXwf",kn="hanui-spinner__label-sZvSq",aa={spinner:jn,"hanui-spin":"hanui-hanui-spin-wTV0a",spinner__label:kn,"spinner--sm":"hanui-spinner--sm-uI0wH","spinner--md":"hanui-spinner--md--VmFK","spinner--lg":"hanui-spinner--lg-K9k-Z"},Nn=({size:a="md",label:n,className:t})=>{const{labels:o}=A();return e.jsx("span",{className:_(aa.spinner,aa[`spinner--${a}`],t),role:"status",children:e.jsx("span",{className:aa.spinner__label,children:n??D("Spinner.label",o==null?void 0:o.loading)})})},ia=s.memo(Nn),wn="hanui-button-SRu4R",$n="hanui-button__icon-giom6",Cn="hanui-button__spinner-vexVG",Dn="hanui-button__label-qiMHm",le={button:wn,button__icon:$n,button__spinner:Cn,button__label:Dn,"button--full":"hanui-button--full-CwPHR","button--loading":"hanui-button--loading-O-naJ","button--small":"hanui-button--small-TF9Hz","button--medium":"hanui-button--medium-JDjkH","button--large":"hanui-button--large-btadu","button--primary":"hanui-button--primary-ym7RJ","button--cart":"hanui-button--cart-5DVmR","button--secondary":"hanui-button--secondary-56m1d","button--outline":"hanui-button--outline-ZI8sw","button--dark":"hanui-button--dark-FGZgn","button--light":"hanui-button--light-YzEPs","button--ghost":"hanui-button--ghost-rijnZ","button--danger":"hanui-button--danger-TNGd2"},Ta=s.forwardRef(({variant:a=oe.PRIMARY,size:n=be.MEDIUM,isLoading:t,isFullWidth:o,startIcon:i,endIcon:r,className:c,children:l,disabled:d,href:u,isExternal:m,linkProps:g,testId:h,...p},j)=>{const b=_(le.button,le[`button--${a.toLowerCase()}`],le[`button--${n.toLowerCase()}`],o&&le["button--full"],t&&le["button--loading"],c),x=e.jsxs(e.Fragment,{children:[t&&e.jsx(ia,{size:"sm",className:le.button__spinner,label:""}),!t&&i&&e.jsx("span",{className:le.button__icon,children:i}),e.jsx("span",{className:le.button__label,children:l}),r&&e.jsx("span",{className:le.button__icon,children:r})]});return u&&m?e.jsx("a",{href:u,className:b,target:"_blank",rel:"noopener noreferrer","aria-label":p["aria-label"],"data-testid":h,children:x}):u?e.jsx(se,{href:u,className:b,"data-testid":h,...g,children:x}):e.jsx("button",{ref:j,className:b,disabled:d||t,"aria-busy":t,"data-testid":h,...p,children:x})});Ta.displayName="Button";const Oe=s.memo(Ta),En="hanui-iconButton-JdtwM",na={iconButton:En,"iconButton--sm":"hanui-iconButton--sm-wE6zE","iconButton--md":"hanui-iconButton--md-iTNNS","iconButton--ghost":"hanui-iconButton--ghost-w-8K3","iconButton--outline":"hanui-iconButton--outline-vEhcY","iconButton--solid":"hanui-iconButton--solid-NUszP","iconButton--cart":"hanui-iconButton--cart-nVsH-","iconButton--danger":"hanui-iconButton--danger-xKkEA"},Ma=s.forwardRef(({icon:a,label:n,variant:t="ghost",size:o="md",className:i,type:r="button",href:c,linkProps:l,testId:d,...u},m)=>{const g=_(na.iconButton,na[`iconButton--${t}`],na[`iconButton--${o}`],i);return c?e.jsx(se,{href:c,className:g,"aria-label":n,title:u.title??n,"data-testid":d,...l,children:a}):e.jsx("button",{ref:m,type:r,className:g,"aria-label":n,title:n,"data-testid":d,...u,children:a})});Ma.displayName="IconButton";const Ye=s.memo(Ma),S=({children:a,...n})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":!0,focusable:"false",...n,children:a}),ca=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Aa=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Ln=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Ba=a=>e.jsx(S,{...a,children:e.jsx("path",{fillRule:"evenodd",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"})}),In=a=>e.jsx(S,{...a,children:e.jsx("path",{fillRule:"evenodd",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"})}),Sa=a=>e.jsx(S,{...a,children:e.jsx("path",{fillRule:"evenodd",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"})}),Rn=a=>e.jsx(S,{...a,children:e.jsx("path",{fillRule:"evenodd",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"})}),Tn=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Mn=a=>e.jsx(S,{...a,children:e.jsx("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"})}),An=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Bn=a=>e.jsx(S,{...a,children:e.jsx("path",{fillRule:"evenodd",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"})}),Sn=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Fn=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Fa=a=>e.jsx(S,{...a,children:e.jsx("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"})}),On=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Oa=a=>e.jsxs(S,{...a,children:[e.jsx("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"}),e.jsx("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"})]}),Pn=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Hn=a=>e.jsx(S,{...a,children:e.jsx("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"})}),zn=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Pa=a=>e.jsx(S,{...a,children:e.jsx("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"})}),Kn=a=>e.jsx(S,{...a,children:e.jsx("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"})}),qn="hanui-link-WBmXY",Un="hanui-link__label--OEu-",Gn="hanui-link__arrow-JKXm-",Pe={link:qn,link__label:Un,link__arrow:Gn,"link--sm":"hanui-link--sm-a-3Dz","link--md":"hanui-link--md-lZdYP","link--brand":"hanui-link--brand-vr8sW","link--muted":"hanui-link--muted-EeN6l"},Yn=({href:a,children:n,hasArrow:t,tone:o="brand",size:i="md",className:r,linkProps:c,...l})=>e.jsxs(se,{href:a,className:_(Pe.link,Pe[`link--${o}`],Pe[`link--${i}`],r),...c,...l,children:[e.jsx("span",{className:Pe.link__label,children:n}),t&&e.jsx(Rn,{className:Pe.link__arrow})]}),Xn=s.memo(Yn),Zn="hanui-tooltip-RG1g1",Jn="hanui-tooltip__trigger-nWZtO",Vn="hanui-bubble-bcBNk",Ze={tooltip:Zn,tooltip__trigger:Jn,bubble:Vn,"hanui-fade-in-up":"hanui-hanui-fade-in-up-Fwj3A","bubble--top":"hanui-bubble--top-uWSZy","bubble--bottom":"hanui-bubble--bottom-jKokL"},Qn=({content:a,children:n,position:t="top",className:o})=>{const[i,r]=s.useState(!1),c=s.useId();return e.jsxs("span",{className:_(Ze.tooltip,o),onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onFocus:()=>r(!0),onBlur:()=>r(!1),onKeyDown:l=>{l.key==="Escape"&&r(!1)},children:[e.jsx("span",{"aria-describedby":i?c:void 0,className:Ze.tooltip__trigger,children:n}),i&&e.jsx("span",{id:c,role:"tooltip",className:_(Ze.bubble,Ze[`bubble--${t}`]),children:a})]})},Wn=s.memo(Qn),et="hanui-chip--NLgU",at="hanui-chip__icon-IjjSb",nt="hanui-chip__label-cT4hw",tt="hanui-chip__count-MBGO3",pe={chip:et,chip__icon:at,chip__label:nt,chip__count:tt,"chip--sm":"hanui-chip--sm-60H-S","chip--md":"hanui-chip--md--yAlm","chip--iconOnly":"hanui-chip--iconOnly-5LT1h","chip--selected":"hanui-chip--selected-FdpCr"},Ha=s.forwardRef(({children:a,icon:n,endIcon:t,count:o,isSelected:i,size:r="md",label:c,href:l,linkProps:d,className:u,type:m="button",role:g,testId:h,...p},j)=>{const b=_(pe.chip,pe[`chip--${r}`],i&&pe["chip--selected"],!a&&pe["chip--iconOnly"],u),x=e.jsxs(e.Fragment,{children:[n&&e.jsx("span",{className:pe.chip__icon,"aria-hidden":!0,children:n}),a&&e.jsx("span",{className:pe.chip__label,children:a}),q.isDefined(o)&&e.jsx("span",{className:pe.chip__count,children:o}),t&&e.jsx("span",{className:pe.chip__icon,"aria-hidden":!0,children:t})]});return l?e.jsx(se,{href:l,className:b,"aria-label":a?void 0:c,"aria-current":i?"page":void 0,title:a?void 0:c,"data-testid":h,...d,children:x}):e.jsx("button",{ref:j,type:m,role:g,className:b,"aria-label":a?void 0:c,title:a?void 0:c,"data-testid":h,...g==="radio"?{"aria-checked":!!i}:{"aria-pressed":!!i},...p,children:x})});Ha.displayName="Chip";const za=s.memo(Ha),ot="hanui-group-0tnVf",xa={group:ot,"group--scrollable":"hanui-group--scrollable-PMu6V"},st=({options:a,label:n,size:t="md",isScrollable:o,className:i,...r})=>{var g;const c=s.useRef(null),l=h=>r.isMultiple?r.value.includes(h):r.value===h,d=h=>{if(r.isMultiple){const p=r.value.includes(h)?r.value.filter(j=>j!==h):[...r.value,h];r.onChange(p);return}r.onChange(r.value===h?null:h)},u=h=>{var w,y;if(r.isMultiple)return;const p=h.key==="ArrowRight"||h.key==="ArrowDown"?1:h.key==="ArrowLeft"||h.key==="ArrowUp"?-1:0;if(p===0)return;h.preventDefault();const j=a.filter($=>!$.isDisabled);if(j.length===0)return;const b=j.findIndex($=>$.value===r.value),x=j[(b+p+j.length)%j.length];r.onChange(x.value),(y=(w=c.current)==null?void 0:w.querySelector(`[data-chip-value="${x.value}"]`))==null||y.focus()},m=r.isMultiple?null:r.value??((g=a.find(h=>!h.isDisabled))==null?void 0:g.value)??null;return e.jsx("div",{ref:c,className:_(xa.group,o&&xa["group--scrollable"],i),role:r.isMultiple?"group":"radiogroup","aria-label":n,onKeyDown:u,children:a.map(h=>e.jsx(za,{size:t,icon:h.icon,count:h.count,isSelected:l(h.value),disabled:h.isDisabled,role:r.isMultiple?void 0:"radio",tabIndex:r.isMultiple||h.value===m?0:-1,"data-chip-value":h.value,onClick:()=>d(h.value),children:h.label},h.value))})},rt=s.memo(st),it="hanui-sheet-GEvdE",ct="hanui-sheet__header-NJgw-",lt="hanui-sheet__title-f-b07",dt="hanui-sheet__toolbar-eyhmW",_t="hanui-sheet__body-eJ2KB",ut="hanui-sheet__footer-NpsY5",Ee={sheet:it,sheet__header:ct,sheet__title:lt,sheet__toolbar:dt,sheet__body:_t,sheet__footer:ut},ht=({title:a,closeLabel:n,onClose:t,children:o,toolbar:i,footer:r,closeAbove:c=We,className:l,testId:d})=>{const{labels:u}=A(),m=s.useId();Ea(),s.useEffect(()=>{const p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}},[]),s.useEffect(()=>{const p=window.matchMedia(c);return p.addEventListener("change",t),()=>p.removeEventListener("change",t)},[c,t]);const g=s.useCallback(p=>{!p||p.open||(p.showModal(),ra(p))},[]),h=s.useCallback(p=>{p.target===p.currentTarget&&t()},[t]);return q.isClient()?un.createPortal(e.jsxs("dialog",{ref:g,className:_(Ee.sheet,l),"aria-labelledby":m,"data-testid":d,onCancel:p=>{p.preventDefault(),t()},onClick:h,children:[e.jsxs("header",{className:Ee.sheet__header,children:[e.jsx("h2",{id:m,className:Ee.sheet__title,children:a}),e.jsx(Ye,{icon:e.jsx(ca,{}),label:D("BottomSheet.closeLabel",n,u==null?void 0:u.close),variant:"ghost",size:"sm",onClick:t})]}),i&&e.jsx("div",{className:Ee.sheet__toolbar,children:i}),e.jsx("div",{className:Ee.sheet__body,children:o}),r&&e.jsx("div",{className:Ee.sheet__footer,children:r})]}),document.body):null},la=s.memo(ht),pt="hanui-combobox-NtZoV",mt="hanui-combobox__trigger-2riRR",bt="hanui-combobox__leadingIcon-it2xz",gt="hanui-combobox__value-acDlr",xt="hanui-combobox__clear-EXOsc",ft="hanui-combobox__chevron-g-QzQ",yt="hanui-combobox__panel-srBxl",vt="hanui-combobox__search-THjer",jt="hanui-combobox__searchIcon-vr4Bg",kt="hanui-combobox__searchInput-JPp5h",Nt="hanui-combobox__list-p-eCs",wt="hanui-combobox__option-CLWh-",$t="hanui-combobox__optionText-Zm0D6",Ct="hanui-combobox__optionLabel-WvT4W",Dt="hanui-combobox__optionDescription-8OEzi",Et="hanui-combobox__check-MKlLz",Lt="hanui-combobox__empty-mZwBq",R={combobox:pt,combobox__trigger:mt,"combobox__trigger--empty":"hanui-combobox__trigger--empty-RxwCq","combobox__trigger--open":"hanui-combobox__trigger--open-rw1ZS","combobox__trigger--invalid":"hanui-combobox__trigger--invalid-iZgiN",combobox__leadingIcon:bt,combobox__value:gt,combobox__clear:xt,combobox__chevron:ft,"combobox__chevron--open":"hanui-combobox__chevron--open-9kj1j",combobox__panel:yt,combobox__search:vt,combobox__searchIcon:jt,combobox__searchInput:kt,combobox__list:Nt,"combobox__list--sheet":"hanui-combobox__list--sheet-r3MzB",combobox__option:wt,"combobox__option--active":"hanui-combobox__option--active--75Vq","combobox__option--selected":"hanui-combobox__option--selected-DVFGy","combobox__option--disabled":"hanui-combobox__option--disabled-e6VjI",combobox__optionText:$t,combobox__optionLabel:Ct,combobox__optionDescription:Dt,combobox__check:Et,combobox__empty:Lt},It=({options:a,value:n,onChange:t,labels:o,isSearchHidden:i,onSearch:r,isLoading:c,isDisabled:l,isClearable:d,icon:u,id:m,className:g,testId:h,"aria-describedby":p,"aria-invalid":j})=>{const{labels:b}=A(),x={get search(){var f;return D("Combobox.searchPlaceholder",o.searchPlaceholder,(f=b==null?void 0:b.combobox)==null?void 0:f.searchPlaceholder)},get empty(){var f;return D("Combobox.emptyMessage",o.emptyMessage,(f=b==null?void 0:b.combobox)==null?void 0:f.emptyMessage)},get loading(){var f;return D("Combobox.loadingMessage",o.loadingMessage,(f=b==null?void 0:b.combobox)==null?void 0:f.loadingMessage)},get clear(){var f;return D("Combobox.clearLabel",o.clearLabel,(f=b==null?void 0:b.combobox)==null?void 0:f.clearLabel)}},w=s.useId(),y=m??w,$=`${y}-listbox`,E=s.useRef(null),B=s.useRef(null),z=s.useRef(null),W=s.useRef(null),[M,ee]=s.useState(null),L=M!==null,[T,F]=s.useState(""),[U,J]=s.useState(0),[re,ge]=s.useState(null),ie=s.useMemo(()=>{if(r||T.trim()==="")return a;const f=T.trim();return a.filter(I=>sa(I.label,f)||(I.description?sa(I.description,f):!1))},[a,T,r]),ce=a.find(f=>f.value===n)??null;s.useEffect(()=>{ce?ge(ce.label):n===null&&ge(null)},[ce,n]);const $e=(ce==null?void 0:ce.label)??re,he=s.useRef(r);he.current=r,s.useEffect(()=>{if(!L||!he.current)return;const f=window.setTimeout(()=>{var I;return(I=he.current)==null?void 0:I.call(he,T.trim())},300);return()=>window.clearTimeout(f)},[T,L]);const N=s.useCallback(()=>{ee(null),F("")},[]),K=s.useCallback(()=>{if(l)return;ee(window.matchMedia(We).matches?"popover":"sheet"),F("");const f=a.findIndex(I=>I.value===n);J(f>=0?f:0)},[l,a,n]);s.useEffect(()=>{if(M!=="popover")return;const f=I=>{var G;(G=E.current)!=null&&G.contains(I.target)||N()};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[M,N]),s.useEffect(()=>{var f;M==="popover"&&((f=z.current)==null||f.focus({preventScroll:!0}))},[M]),s.useEffect(()=>{var f,I;L&&((I=(f=W.current)==null?void 0:f.querySelector(`[data-index="${U}"]`))==null||I.scrollIntoView({block:"nearest"}))},[U,L,ie.length]);const P=f=>{f.isDisabled||(ge(f.label),t(f.value),N())},Ce=s.useRef(!1);s.useEffect(()=>{var f;Ce.current&&!L&&((f=B.current)==null||f.focus()),Ce.current=L},[L]);const dn=f=>{const I=ie.length-1;switch(f.key){case"ArrowDown":f.preventDefault(),J(G=>G>=I?0:G+1);break;case"ArrowUp":f.preventDefault(),J(G=>G<=0?I:G-1);break;case"Home":f.preventDefault(),J(0);break;case"End":f.preventDefault(),J(I);break;case"Enter":{f.preventDefault();const G=ie[U];G&&P(G);break}case"Escape":f.preventDefault(),N();break;case"Tab":N();break}},_a=()=>{t(null),ge(null)},ua=i?null:e.jsxs("div",{className:R.combobox__search,children:[e.jsx(Tn,{className:R.combobox__searchIcon}),e.jsx("input",{ref:z,type:"text",role:"combobox",className:R.combobox__searchInput,value:T,placeholder:x.search,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":$,"aria-activedescendant":ie[U]?`${y}-option-${U}`:void 0,"aria-label":x.search,onChange:f=>{F(f.target.value),J(0)},onKeyDown:dn}),c&&e.jsx(ia,{size:"sm",label:""})]}),ha=f=>e.jsxs("ul",{ref:W,id:$,role:"listbox",className:_(R.combobox__list,f&&R["combobox__list--sheet"]),children:[ie.map((I,G)=>{const _n=G===U,ea=I.value===n;return e.jsx("li",{children:e.jsxs("div",{id:`${y}-option-${G}`,role:"option","data-index":G,"aria-selected":ea,"aria-disabled":I.isDisabled,className:_(R.combobox__option,_n&&R["combobox__option--active"],ea&&R["combobox__option--selected"],I.isDisabled&&R["combobox__option--disabled"]),onMouseEnter:()=>J(G),onClick:()=>P(I),children:[e.jsxs("span",{className:R.combobox__optionText,children:[e.jsx("span",{className:R.combobox__optionLabel,children:I.label}),I.description&&e.jsx("span",{className:R.combobox__optionDescription,children:I.description})]}),ea&&e.jsx(Aa,{className:R.combobox__check})]})},I.value)}),ie.length===0&&e.jsx("li",{className:R.combobox__empty,children:c?x.loading:x.empty})]});return e.jsxs("div",{ref:E,className:_(R.combobox,g),"data-testid":h,children:[e.jsxs("button",{ref:B,id:y,type:"button",className:_(R.combobox__trigger,!$e&&R["combobox__trigger--empty"],L&&R["combobox__trigger--open"],j&&R["combobox__trigger--invalid"]),disabled:l,"aria-haspopup":"listbox","aria-expanded":L,"aria-controls":L?$:void 0,"aria-label":o.placeholder,"aria-describedby":p,onClick:()=>L?N():K(),children:[u&&e.jsx("span",{className:R.combobox__leadingIcon,"aria-hidden":!0,children:u}),e.jsx("span",{className:R.combobox__value,children:$e??o.placeholder}),d&&$e&&!l&&e.jsx("span",{role:"button",tabIndex:0,className:R.combobox__clear,"aria-label":x.clear,onClick:f=>{f.stopPropagation(),_a()},onKeyDown:f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.stopPropagation(),_a())},children:e.jsx(ca,{})}),e.jsx(Ba,{className:_(R.combobox__chevron,L&&R["combobox__chevron--open"])})]}),M==="popover"&&e.jsxs("div",{className:R.combobox__panel,children:[ua,ha(!1)]}),M==="sheet"&&e.jsx(la,{title:o.placeholder,closeLabel:o.closeLabel??(b==null?void 0:b.close),onClose:N,toolbar:ua??void 0,children:ha(!0)})]})},Rt=s.memo(It),Tt="hanui-select-tiiPL",Mt="hanui-trigger-rHQJz",At="hanui-trigger__icon-apCcx",Bt="hanui-trigger__value-ioH7K",St="hanui-trigger__chevron-FtsIZ",Ft="hanui-panel-rGOOd",Ot="hanui-list-SOKf8",Pt="hanui-option-ZDPef",Ht="hanui-option__label-SsoYB",zt="hanui-option__check-8CPSG",H={select:Tt,trigger:Mt,"trigger--empty":"hanui-trigger--empty-cuinb","trigger--open":"hanui-trigger--open-1nsvu","trigger--sm":"hanui-trigger--sm-Xnu1C",trigger__icon:At,trigger__value:Bt,trigger__chevron:St,"trigger__chevron--open":"hanui-trigger__chevron--open-1P2P-",panel:Ft,"hanui-fade-in-up":"hanui-hanui-fade-in-up-Lt0Bt","panel--start":"hanui-panel--start-Fotwa","panel--end":"hanui-panel--end-ClVl2",list:Ot,"list--sheet":"hanui-list--sheet-BIjCb",option:Pt,"option--active":"hanui-option--active-R4lLF","option--selected":"hanui-option--selected-glQMj","option--disabled":"hanui-option--disabled-h4rdd",option__label:Ht,option__check:zt},Kt=({options:a,value:n,onChange:t,label:o,placeholder:i,closeLabel:r,icon:c,size:l="md",align:d="start",isDisabled:u,id:m,className:g,testId:h,"aria-describedby":p,"aria-invalid":j})=>{const{labels:b}=A(),x=D("Select.placeholder",i,b==null?void 0:b.selectPlaceholder),w=s.useId(),y=m??w,$=`${y}-listbox`,E=N=>`${y}-option-${N}`,B=s.useRef(null),z=s.useRef(null),W=s.useRef(null),[M,ee]=s.useState(null),[L,T]=s.useState(0),F=M!==null,U=a.findIndex(N=>N.value===n),J=U>=0?a[U]:null,re=s.useCallback(()=>ee(null),[]),ge=s.useCallback(()=>{u||a.length===0||(ee(window.matchMedia(We).matches?"popover":"sheet"),T(U>=0?U:0))},[u,a.length,U]),ie=N=>{N.isDisabled||(t(N.value),re())},ce=s.useRef(!1);s.useEffect(()=>{var N;ce.current&&!F&&((N=z.current)==null||N.focus()),ce.current=F},[F]),s.useEffect(()=>{if(M!=="popover")return;const N=K=>{var P;(P=B.current)!=null&&P.contains(K.target)||re()};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[M,re]),s.useEffect(()=>{var N;M==="sheet"&&((N=W.current)==null||N.focus({preventScroll:!0}))},[M]),s.useEffect(()=>{var N,K;F&&((K=(N=W.current)==null?void 0:N.querySelector(`[data-index="${L}"]`))==null||K.scrollIntoView({block:"nearest"}))},[L,F]);const $e=N=>{const K=a.length-1;if(!F){["ArrowDown","ArrowUp","Enter"," "].includes(N.key)&&(N.preventDefault(),ge());return}switch(N.key){case"ArrowDown":N.preventDefault(),T(P=>P>=K?0:P+1);break;case"ArrowUp":N.preventDefault(),T(P=>P<=0?K:P-1);break;case"Home":N.preventDefault(),T(0);break;case"End":N.preventDefault(),T(K);break;case"Enter":case" ":{N.preventDefault();const P=a[L];P&&ie(P);break}case"Escape":N.preventDefault(),re();break;case"Tab":re();break}},he=N=>e.jsx("ul",{ref:W,id:$,role:"listbox","aria-label":o,"aria-activedescendant":N&&a[L]?E(L):void 0,tabIndex:N?0:-1,className:_(H.list,N&&H["list--sheet"]),onKeyDown:N?$e:void 0,children:a.map((K,P)=>{const Ce=K.value===n;return e.jsxs("li",{id:E(P),role:"option","data-index":P,"aria-selected":Ce,"aria-disabled":K.isDisabled,className:_(H.option,P===L&&H["option--active"],Ce&&H["option--selected"],K.isDisabled&&H["option--disabled"]),onMouseEnter:()=>T(P),onClick:()=>ie(K),children:[e.jsx("span",{className:H.option__label,children:K.label}),Ce&&e.jsx(Aa,{className:H.option__check})]},K.value)})});return e.jsxs("span",{ref:B,className:_(H.select,g),"data-testid":h,children:[e.jsxs("button",{ref:z,id:y,type:"button",role:"combobox",className:_(H.trigger,H[`trigger--${l}`],!J&&H["trigger--empty"],F&&H["trigger--open"]),disabled:u,"aria-haspopup":"listbox","aria-expanded":F,"aria-controls":F?$:void 0,"aria-activedescendant":M==="popover"&&a[L]?E(L):void 0,"aria-label":o,"aria-describedby":p,"aria-invalid":j,onClick:()=>F?re():ge(),onKeyDown:$e,children:[c&&e.jsx("span",{className:H.trigger__icon,"aria-hidden":!0,children:c}),e.jsx("span",{className:H.trigger__value,children:(J==null?void 0:J.label)??x}),e.jsx(Ba,{className:_(H.trigger__chevron,F&&H["trigger__chevron--open"])})]}),M==="popover"&&e.jsx("div",{className:_(H.panel,H[`panel--${d}`]),children:he(!1)}),M==="sheet"&&e.jsx(la,{title:o,closeLabel:r??(b==null?void 0:b.close),onClose:re,children:he(!0)})]})},qt=s.memo(Kt),Ut="hanui-checkbox-FaFCj",Gt="hanui-checkbox__input-nTHne",Yt="hanui-checkbox__body-VAEW2",Xt="hanui-checkbox__label-sSNZY",Zt="hanui-checkbox__hint-ish-J",He={checkbox:Ut,checkbox__input:Gt,checkbox__body:Yt,checkbox__label:Xt,checkbox__hint:Zt},Ka=s.forwardRef(({label:a,hint:n,className:t,testId:o,...i},r)=>e.jsxs("label",{className:_(He.checkbox,t),"data-testid":o,children:[e.jsx("input",{ref:r,type:"checkbox",className:He.checkbox__input,...i}),e.jsxs("span",{className:He.checkbox__body,children:[e.jsx("span",{className:He.checkbox__label,children:a}),n&&e.jsx("span",{className:He.checkbox__hint,children:n})]})]}));Ka.displayName="Checkbox";const Jt=s.memo(Ka),Vt="hanui-radio-KoZak",Qt="hanui-radio__input-gVMgh",Wt="hanui-radio__body-oZWg6",eo="hanui-radio__label-d-5ce",ao="hanui-radio__hint-baVbs",no="hanui-radio__count-OtkUM",Le={radio:Vt,radio__input:Qt,radio__body:Wt,radio__label:eo,radio__hint:ao,radio__count:no},qa=s.forwardRef(({label:a,hint:n,count:t,className:o,testId:i,...r},c)=>e.jsxs("label",{className:_(Le.radio,o),"data-testid":i,children:[e.jsx("input",{ref:c,type:"radio",className:Le.radio__input,...r}),e.jsxs("span",{className:Le.radio__body,children:[e.jsx("span",{className:Le.radio__label,children:a}),n&&e.jsx("span",{className:Le.radio__hint,children:n})]}),q.isDefined(t)&&e.jsx("span",{className:Le.radio__count,children:t})]}));qa.displayName="Radio";const to=s.memo(qa),oo="hanui-radioCard-sndiC",so="hanui-radioCard__input-6vuoD",ro="hanui-radioCard__indicator--x9LT",io="hanui-radioCard__body-CFqoi",Ie={radioCard:oo,radioCard__input:so,"radioCard--selected":"hanui-radioCard--selected-Mi7ee",radioCard__indicator:ro,"radioCard--disabled":"hanui-radioCard--disabled-YlYee",radioCard__body:io},co=({name:a,value:n,isSelected:t,isDisabled:o,onChange:i,children:r,className:c,id:l,testId:d})=>e.jsxs("label",{className:_(Ie.radioCard,t&&Ie["radioCard--selected"],o&&Ie["radioCard--disabled"],c),"data-testid":d,children:[e.jsx("input",{type:"radio",id:l,name:a,value:n,checked:t,disabled:o,onChange:()=>i(n),className:Ie.radioCard__input}),e.jsx("span",{className:Ie.radioCard__indicator,"aria-hidden":!0}),e.jsx("span",{className:Ie.radioCard__body,children:r})]}),lo=s.memo(co),_o="hanui-range-RpDPh",uo="hanui-range__readout-itDMd",ho="hanui-range__separator-u-ZJX",po="hanui-range__track-bCh5Y",mo="hanui-range__fill-VXMCE",bo="hanui-range__input-TAN2I",go="hanui-range__bounds-GIhFd",ae={range:_o,"range--disabled":"hanui-range--disabled-13hlc",range__readout:uo,range__separator:ho,range__track:po,range__fill:mo,range__input:bo,range__bounds:go},xo=({min:a,max:n,step:t=1,value:o,onChange:i,onCommit:r,formatValue:c=String,label:l,minLabel:d,maxLabel:u,isDisabled:m,className:g,testId:h})=>{var ee,L;const{labels:p}=A(),j=D("RangeSlider.minLabel",d,(ee=p==null?void 0:p.range)==null?void 0:ee.min),b=D("RangeSlider.maxLabel",u,(L=p==null?void 0:p.range)==null?void 0:L.max),[x,w]=o,y=s.useCallback(T=>i([Math.min(T,w),w]),[w,i]),$=s.useCallback(T=>i([x,Math.max(T,x)]),[x,i]),E=s.useCallback(()=>r==null?void 0:r([x,w]),[x,w,r]),B=n-a,z=B===0?0:q.normalize(x-a,B),W=B===0?0:q.normalize(w-a,B),M=z>50;return e.jsxs("div",{className:_(ae.range,m&&ae["range--disabled"],g),role:"group","aria-label":l,"data-testid":h,children:[e.jsxs("div",{className:ae.range__readout,children:[e.jsx("span",{className:ae.range__value,children:c(x)}),e.jsx("span",{className:ae.range__separator,"aria-hidden":!0,children:"—"}),e.jsx("span",{className:ae.range__value,children:c(w)})]}),e.jsxs("div",{className:ae.range__track,children:[e.jsx("span",{className:ae.range__fill,style:{left:`${z}%`,right:`${100-W}%`},"aria-hidden":!0}),e.jsx("input",{type:"range",className:ae.range__input,style:{zIndex:M?4:3},min:a,max:n,step:t,value:x,disabled:m,"aria-label":`${l} — ${j}`,"aria-valuetext":c(x),onChange:T=>y(Number(T.target.value)),onPointerUp:E,onKeyUp:E}),e.jsx("input",{type:"range",className:ae.range__input,style:{zIndex:M?3:4},min:a,max:n,step:t,value:w,disabled:m,"aria-label":`${l} — ${b}`,"aria-valuetext":c(w),onChange:T=>$(Number(T.target.value)),onPointerUp:E,onKeyUp:E})]}),e.jsxs("div",{className:ae.range__bounds,"aria-hidden":!0,children:[e.jsx("span",{children:c(a)}),e.jsx("span",{children:c(n)})]})]})},fo=s.memo(xo),yo="hanui-rating-neNnF",vo="hanui-rating__legend-uYvFS",jo="hanui-rating__stars-vJFLk",ko="hanui-rating__star-BANFJ",No="hanui-rating__input-s2iiO",wo="hanui-rating__srOnly-iSCoz",$o="hanui-rating__caption-13KFX",de={rating:yo,"rating--disabled":"hanui-rating--disabled-ZKjHa",rating__legend:vo,rating__stars:jo,rating__star:ko,"rating__star--filled":"hanui-rating__star--filled-L3AkT",rating__input:No,rating__srOnly:wo,rating__caption:$o},Co=[1,2,3,4,5],Do=({value:a,onChange:n,label:t,ratingLabels:o,formatStarCount:i,isDisabled:r,className:c,testId:l})=>{var j;const{labels:d}=A(),u=o??((j=d==null?void 0:d.rating)==null?void 0:j.scale),m=s.useId(),[g,h]=s.useState(null),p=g??a;return e.jsxs("fieldset",{className:_(de.rating,r&&de["rating--disabled"],c),disabled:r,"data-testid":l,children:[e.jsx("legend",{className:de.rating__legend,children:t}),e.jsx("div",{className:de.rating__stars,onMouseLeave:()=>h(null),children:Co.map(b=>{var x;return e.jsxs("label",{className:_(de.rating__star,p!==null&&b<=p&&de["rating__star--filled"]),onMouseEnter:()=>h(b),children:[e.jsx("input",{type:"radio",name:m,value:b,checked:a===b,onChange:()=>n(b),className:de.rating__input}),e.jsx(Pa,{}),e.jsxs("span",{className:de.rating__srOnly,children:[Be("RatingInput.formatStarCount",i??((x=d==null?void 0:d.rating)==null?void 0:x.starCount),b)," ","— ",(u==null?void 0:u[b])??""]})]},b)})}),p!==null&&e.jsx("span",{className:de.rating__caption,"aria-hidden":!0,children:(u==null?void 0:u[p])??""})]})},Eo=s.memo(Do),Lo="hanui-stepper-8s5Ih",Io="hanui-stepper__button-h6g7d",Ro="hanui-stepper__input-OQh5v",ze={stepper:Lo,stepper__button:Io,stepper__input:Ro,"stepper--sm":"hanui-stepper--sm-RvrBP","stepper--md":"hanui-stepper--md-Cnjei"},To=({value:a,onChange:n,label:t,decreaseLabel:o,increaseLabel:i,min:r=1,max:c=99,isDisabled:l,size:d="md",className:u,testId:m})=>{var x,w,y;const{labels:g}=A(),h=D("QuantityStepper.label",t,(x=g==null?void 0:g.quantity)==null?void 0:x.label),[p,j]=s.useState(null),b=$=>{j(null);const E=Number($.replace(/\D/g,""));E&&n(Math.min(Math.max(E,r),c))};return e.jsxs("div",{className:_(ze.stepper,ze[`stepper--${d}`],u),role:"group","aria-label":h,"data-testid":m,children:[e.jsx("button",{type:"button",className:ze.stepper__button,onClick:()=>n(Math.max(a-1,r)),disabled:l||a<=r,"aria-label":D("QuantityStepper.decreaseLabel",o,(w=g==null?void 0:g.quantity)==null?void 0:w.decrease),children:e.jsx(An,{})}),e.jsx("input",{className:ze.stepper__input,value:p??String(a),onChange:$=>j($.target.value.replace(/\D/g,"").slice(0,2)),onBlur:$=>b($.target.value),onKeyDown:$=>{$.key==="Enter"&&($.preventDefault(),b($.target.value))},inputMode:"numeric",disabled:l,"aria-label":`${h} (${r}-${c})`}),e.jsx("button",{type:"button",className:ze.stepper__button,onClick:()=>n(Math.min(a+1,c)),disabled:l||a>=c,"aria-label":D("QuantityStepper.increaseLabel",i,(y=g==null?void 0:g.quantity)==null?void 0:y.increase),children:e.jsx(Mn,{})})]})},Mo=s.memo(To),Ao="hanui-checkbox--dvpB",Bo={checkbox:Ao},Ua=s.forwardRef(({label:a,className:n,testId:t,...o},i)=>e.jsx("input",{ref:i,type:"checkbox","aria-label":a,className:_(Bo.checkbox,n),"data-testid":t,...o}));Ua.displayName="TableCheckbox";const So=s.memo(Ua),Fo="hanui-wrapper-IAI4E",Oo="hanui-wrapper__prefix-XKDlV",Po="hanui-wrapper__suffix-lT35q",Ho="hanui-input-pIS2u",xe={wrapper:Fo,wrapper__prefix:Oo,wrapper__suffix:Po,input:Ho,"input--hasPrefix":"hanui-input--hasPrefix-nsrWh","input--hasSuffix":"hanui-input--hasSuffix-OrE5A","input--technical":"hanui-input--technical---DCD"},Ga=s.forwardRef(({prefix:a,suffix:n,isTechnical:t,className:o,testId:i,...r},c)=>e.jsxs("span",{className:_(xe.wrapper,o),children:[a&&e.jsx("span",{className:xe.wrapper__prefix,"aria-hidden":!0,children:a}),e.jsx("input",{ref:c,className:_(xe.input,!!a&&xe["input--hasPrefix"],!!n&&xe["input--hasSuffix"],t&&xe["input--technical"]),"data-testid":i,...r}),n&&e.jsx("span",{className:xe.wrapper__suffix,"aria-hidden":!0,children:n})]}));Ga.displayName="Input";const Ya=s.memo(Ga),zo="hanui-textarea-zwJcB",Ko={textarea:zo},Xa=s.forwardRef(({className:a,rows:n=4,testId:t,...o},i)=>e.jsx("textarea",{ref:i,rows:n,className:_(Ko.textarea,a),"data-testid":t,...o}));Xa.displayName="Textarea";const Za=s.memo(Xa),qo="hanui-field-KKvre",Uo="hanui-field__label-9dlYd",Go="hanui-field__required-hbDJk",Yo="hanui-field__srOnly-2WQFH",Xo="hanui-field__hint-SQPiL",Zo="hanui-field__error-gLlZ-",fe={field:qo,field__label:Uo,"field__label--hidden":"hanui-field__label--hidden-ufuVt",field__required:Go,field__srOnly:Yo,field__hint:Xo,field__error:Zo},Jo=({label:a,children:n,hint:t,error:o,isRequired:i,requiredLabel:r,isLabelHidden:c,className:l})=>{const{labels:d}=A(),u=s.useId(),m=`${u}-error`,g=`${u}-hint`;return e.jsxs("div",{className:_(fe.field,l),children:[e.jsxs("label",{htmlFor:u,className:_(fe.field__label,c&&fe["field__label--hidden"]),children:[a,i&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:fe.field__required,"aria-hidden":!0,children:"*"}),e.jsx("span",{className:fe.field__srOnly,children:D("Field.requiredLabel",r,d==null?void 0:d.required)})]})]}),n({id:u,required:i||void 0,"aria-invalid":o?!0:void 0,"aria-describedby":o?m:t?g:void 0}),o?e.jsxs("p",{id:m,className:fe.field__error,role:"alert",children:[e.jsx(Oa,{}),o]}):t&&e.jsx("p",{id:g,className:fe.field__hint,children:t})]})},Ja=s.memo(Jo),Vo="hanui-alert-gHI-9",Qo="hanui-alert__icon-DhiCT",Wo="hanui-alert__body-52-z2",es="hanui-alert__title-I8BAh",as="hanui-alert__content-lhBEo",ns="hanui-alert__action-1mTje",ye={alert:Vo,alert__icon:Qo,alert__body:Wo,alert__title:es,alert__content:as,alert__action:ns,"alert--info":"hanui-alert--info-lsAVw","alert--success":"hanui-alert--success-RMJR6","alert--warning":"hanui-alert--warning-Rkgln","alert--danger":"hanui-alert--danger-9ei0Y"},ts={info:e.jsx(Sn,{}),success:e.jsx(Fn,{}),warning:e.jsx(Fa,{}),danger:e.jsx(On,{})},os=({children:a,tone:n="info",title:t,action:o,className:i,testId:r})=>e.jsxs("div",{className:_(ye.alert,ye[`alert--${n}`],i),role:n==="danger"||n==="warning"?"alert":void 0,"data-testid":r,children:[e.jsx("span",{className:ye.alert__icon,children:ts[n]}),e.jsxs("div",{className:ye.alert__body,children:[t&&e.jsx("strong",{className:ye.alert__title,children:t}),e.jsx("div",{className:ye.alert__content,children:a})]}),o&&e.jsx("div",{className:ye.alert__action,children:o})]}),ss=s.memo(os),rs="hanui-avatar-qoh3P",is="hanui-avatar__image-uAyAX",ta={avatar:rs,avatar__image:is,"avatar--sm":"hanui-avatar--sm-GGjU4","avatar--md":"hanui-avatar--md-xhXnK","avatar--lg":"hanui-avatar--lg-ULP-r"},cs=(a,n)=>{const t=a.trim().split(/\s+/).filter(Boolean);if(t.length===0)return"?";const o=t.length===1?t[0].slice(0,2):`${t[0][0]}${t[t.length-1][0]}`;return n?o.toLocaleUpperCase(n):o.toLocaleUpperCase()},ls=({name:a,imageUrl:n,locale:t,size:o="md",className:i,testId:r})=>{const{labels:c}=A();return e.jsx("span",{className:_(ta.avatar,ta[`avatar--${o}`],i),"aria-hidden":!0,"data-testid":r,children:n?e.jsx("img",{className:ta.avatar__image,src:n,alt:""}):cs(a,t??(c==null?void 0:c.locale))})},ds=s.memo(ls),_s="hanui-badge-uLAaI",us="hanui-badge__icon-R2goZ",Je={badge:_s,badge__icon:us,"badge--neutral":"hanui-badge--neutral-6kddt","badge--soft":"hanui-badge--soft-gFeRF","badge--solid":"hanui-badge--solid-rtdHI","badge--outline":"hanui-badge--outline-QiAAz","badge--success":"hanui-badge--success-Oj11F","badge--danger":"hanui-badge--danger-X3nV0","badge--warning":"hanui-badge--warning-vAsx2","badge--info":"hanui-badge--info-mHOwk","badge--oem":"hanui-badge--oem-Nl-VX","badge--alt":"hanui-badge--alt-gQkww","badge--sale":"hanui-badge--sale-Li1tG","badge--action":"hanui-badge--action-7pUio","badge--link":"hanui-badge--link-zcNJZ"},hs=({children:a,tone:n="neutral",variant:t="soft",icon:o,className:i,testId:r})=>e.jsxs("span",{className:_(Je.badge,Je[`badge--${n}`],Je[`badge--${t}`],i),"data-testid":r,children:[o&&e.jsx("span",{className:Je.badge__icon,children:o}),a]}),ps=s.memo(hs),ms="hanui-breadcrumb-amB9n",bs="hanui-breadcrumb__item-Icv1S",gs="hanui-breadcrumb__link-eVkPq",xs="hanui-breadcrumb__current-8XjhU",fs="hanui-breadcrumb__separator-vvaUi",Ke={breadcrumb:ms,breadcrumb__item:bs,breadcrumb__link:gs,breadcrumb__current:xs,breadcrumb__separator:fs},ys=({items:a,label:n,linkProps:t,className:o,testId:i})=>{const{labels:r}=A();return e.jsx("nav",{className:o,"aria-label":D("Breadcrumb.label",n,r==null?void 0:r.breadcrumb),"data-testid":i,children:e.jsx("ol",{className:_(Ke.breadcrumb),children:a.map((c,l)=>{const d=l===a.length-1;return e.jsxs("li",{className:Ke.breadcrumb__item,children:[c.href&&!d?e.jsx(se,{href:c.href,className:Ke.breadcrumb__link,...t,children:c.label}):e.jsx("span",{className:Ke.breadcrumb__current,"aria-current":"page",children:c.label}),!d&&e.jsx(Sa,{className:Ke.breadcrumb__separator})]},`${c.label}-${l}`)})})})},vs=s.memo(ys),js="hanui-card-CaHUG",ks="hanui-media__frame-eBv-s",Ns="hanui-media-eggk5",ws="hanui-media__link-ujyVV",$s="hanui-overlay-AVMTX",Cs="hanui-body-DyI-6",Ds="hanui-footer-2WNCZ",te={card:js,"card--interactive":"hanui-card--interactive-C1pXZ",media__frame:ks,media:Ns,media__link:ws,"media__frame--contained":"hanui-media__frame--contained-Nv9gh",overlay:$s,"overlay--top-left":"hanui-overlay--top-left-td1xA","overlay--top-right":"hanui-overlay--top-right-GqD9H","overlay--bottom-left":"hanui-overlay--bottom-left-T5Quw","overlay--bottom-right":"hanui-overlay--bottom-right-za3z3",body:Cs,footer:Ds},Es=({children:a,isInteractive:n,as:t="div",className:o,testId:i})=>e.jsx(t,{className:_(te.card,n&&te["card--interactive"],o),"data-testid":i,children:a}),Va=s.memo(({children:a,ratio:n=1,href:t,linkProps:o,isContained:i=!0,className:r})=>{const c=e.jsx("span",{className:_(te.media__frame,i&&te["media__frame--contained"]),style:{aspectRatio:n},children:a});return e.jsx("div",{className:_(te.media,r),children:t?e.jsx(se,{href:t,className:te.media__link,tabIndex:-1,"aria-hidden":!0,...o,children:c}):c})});Va.displayName="CardMedia";const Qa=s.memo(({children:a,position:n="top-left",className:t})=>e.jsx("div",{className:_(te.overlay,te[`overlay--${n}`],t),children:a}));Qa.displayName="CardOverlay";const Wa=s.memo(({children:a,className:n})=>e.jsx("div",{className:_(te.body,n),children:a}));Wa.displayName="CardBody";const en=s.memo(({children:a,className:n})=>e.jsx("div",{className:_(te.footer,n),children:a}));en.displayName="CardFooter";const Ls=s.memo(Es),Is="hanui-copy-Yht5s",Rs="hanui-copy__code-CYlCA",Ts="hanui-copy__button-GDdH6",Ms="hanui-copy__srOnly-WMTNN",Re={copy:Is,"copy--sm":"hanui-copy--sm-Tjqws",copy__code:Rs,"copy--md":"hanui-copy--md-00rhU",copy__button:Ts,"copy__button--done":"hanui-copy__button--done-MujUR",copy__srOnly:Ms},As=1600,Bs=({value:a,copyLabel:n,copiedLabel:t,copiedAnnouncement:o,size:i="sm",isReadOnly:r,className:c,testId:l})=>{var b,x,w,y,$;const{labels:d}=A(),[u,m]=s.useState(!1),g=s.useRef(null),h=s.useRef(void 0);s.useEffect(()=>()=>window.clearTimeout(h.current),[]);const p=s.useCallback(()=>{const E=g.current;if(!E)return;const B=document.createRange();B.selectNodeContents(E);const z=window.getSelection();z==null||z.removeAllRanges(),z==null||z.addRange(B)},[]),j=s.useCallback(async()=>{try{await navigator.clipboard.writeText(a),m(!0),h.current=window.setTimeout(()=>m(!1),As)}catch{p()}},[a,p]);return e.jsxs("span",{className:_(Re.copy,Re[`copy--${i}`],c),"data-testid":l,children:[e.jsx("span",{className:Re.copy__code,ref:g,children:a}),!r&&e.jsx("button",{type:"button",className:_(Re.copy__button,u&&Re["copy__button--done"]),onClick:j,"aria-label":u?t??Be("CopyField.copiedLabel",(b=d==null?void 0:d.copyField)==null?void 0:b.copied,a):n??Be("CopyField.copyLabel",(x=d==null?void 0:d.copyField)==null?void 0:x.copy,a),title:u?t??Be("CopyField.copiedLabel",(w=d==null?void 0:d.copyField)==null?void 0:w.copied,a):n??Be("CopyField.copyLabel",(y=d==null?void 0:d.copyField)==null?void 0:y.copy,a),children:u?e.jsx(Ln,{}):e.jsx(Bn,{})}),e.jsx("span",{"aria-live":"polite",className:Re.copy__srOnly,children:u?D("CopyField.copiedAnnouncement",o,($=d==null?void 0:d.copyField)==null?void 0:$.announcement):""})]})},Ss=s.memo(Bs),Fs="hanui-divider-RJqCw",Os="hanui-divider__label-M8sBA",Ve={divider:Fs,"divider--labelled":"hanui-divider--labelled-jZH1-",divider__label:Os},Ps=({label:a,className:n})=>a?e.jsx("div",{className:_(Ve.divider,Ve["divider--labelled"],n),children:e.jsx("span",{className:Ve.divider__label,children:a})}):e.jsx("hr",{className:_(Ve.divider,n)}),Hs=s.memo(Ps),zs="hanui-directory-badEd",Ks="hanui-group-i6An9",qs="hanui-group__header-rc19c",Us="hanui-group__label-vQTcs",Gs="hanui-group__link-es5V7",Ys="hanui-group__meta-LtC-u",Xs="hanui-group__list-YxBCG",Zs="hanui-row-3LH7X",Js="hanui-row__name-75Wbq",Vs="hanui-row__media-AxZEh",Qs="hanui-row__marker-RYHb-",Ws="hanui-jump-vpGwB",er="hanui-jump__link-rRnT6",Z={directory:zs,group:Ks,group__header:qs,group__label:Us,group__link:Gs,group__meta:Ys,group__list:Xs,row:Zs,row__name:Js,row__media:Vs,row__marker:Qs,jump:Ws,jump__link:er},ar=({children:a,className:n})=>e.jsx("div",{className:_(Z.directory,n),children:a}),an=s.memo(({label:a,href:n,linkProps:t,meta:o,children:i,id:r})=>e.jsxs("section",{className:Z.group,id:r,children:[e.jsxs("header",{className:Z.group__header,children:[e.jsx("h2",{className:Z.group__label,children:n?e.jsx(se,{href:n,className:Z.group__link,...t,children:a}):a}),o&&e.jsx("span",{className:Z.group__meta,children:o})]}),e.jsx("ul",{className:Z.group__list,children:i})]}));an.displayName="DirectoryGroup";const nn=s.memo(({href:a,name:n,media:t,marker:o,linkProps:i,className:r})=>e.jsx("li",{children:e.jsxs(se,{href:a,className:_(Z.row,r),...i,children:[t&&e.jsx("span",{className:Z.row__media,children:t}),e.jsx("span",{className:Z.row__name,children:n}),o&&e.jsx("span",{className:Z.row__marker,children:o})]})}));nn.displayName="DirectoryRow";const tn=s.memo(({labels:a,toId:n,label:t})=>{const{labels:o}=A();return e.jsx("nav",{className:Z.jump,"aria-label":D("DirectoryJump.label",t,o==null?void 0:o.directoryJump),children:a.map(i=>e.jsx("a",{href:`#${n(i)}`,className:Z.jump__link,children:i},i))})});tn.displayName="DirectoryJump";const nr=s.memo(ar),tr="hanui-empty-47qZR",or="hanui-empty__icon-okfEc",sr="hanui-empty__title-Z7Dzd",rr="hanui-empty__description-6BoCk",ir="hanui-empty__actions-ARk-k",Te={empty:tr,empty__icon:or,empty__title:sr,empty__description:rr,empty__actions:ir,"empty--sm":"hanui-empty--sm-QXaXx"},cr=({title:a,description:n,icon:t,action:o,secondaryAction:i,size:r="md",className:c,testId:l})=>e.jsxs("div",{className:_(Te.empty,Te[`empty--${r}`],c),"data-testid":l,children:[t&&e.jsx("span",{className:Te.empty__icon,children:t}),e.jsx("h3",{className:Te.empty__title,children:a}),n&&e.jsx("p",{className:Te.empty__description,children:n}),(o||i)&&e.jsxs("div",{className:Te.empty__actions,children:[o,i]})]}),lr=s.memo(cr),dr="hanui-header-yJwus",_r="hanui-header__top-UK4si",ur="hanui-header__text-HIo8U",hr="hanui-header__eyebrow-dZ9Zc",pr="hanui-header__titleRow-KgDZj",mr="hanui-header__title-s1giF",br="hanui-header__meta-UxuaD",gr="hanui-header__description-NXbbC",xr="hanui-header__actions-aShpt",_e={header:dr,header__top:_r,header__text:ur,header__eyebrow:hr,header__titleRow:pr,header__title:mr,header__meta:br,header__description:gr,header__actions:xr},fr=({title:a,eyebrow:n,description:t,actions:o,breadcrumb:i,meta:r,children:c,as:l="h1",className:d,testId:u})=>e.jsxs("header",{className:_(_e.header,d),"data-testid":u,children:[i,e.jsxs("div",{className:_e.header__top,children:[e.jsxs("div",{className:_e.header__text,children:[n&&e.jsx("span",{className:_e.header__eyebrow,children:n}),e.jsxs("div",{className:_e.header__titleRow,children:[e.jsx(l,{className:_e.header__title,children:a}),r&&e.jsx("span",{className:_e.header__meta,children:r})]}),t&&e.jsx("p",{className:_e.header__description,children:t})]}),o&&e.jsx("div",{className:_e.header__actions,children:o})]}),c]}),yr=s.memo(fr),vr="hanui-panel-Sv-1m",jr="hanui-panel__header-ysexh",kr="hanui-panel__heading-xLCsB",Nr="hanui-panel__icon--yPQT",wr="hanui-panel__headingText--XqxW",$r="hanui-panel__title-6-6uC",Cr="hanui-panel__description-qXTSM",Dr="hanui-panel__actions-Ra-zy",Er="hanui-panel__body-lo5aX",Lr="hanui-panel__footer-qLpR1",Ir="hanui-form-o9UqJ",Rr="hanui-row-vUGpa",Y={panel:vr,panel__header:jr,panel__heading:kr,panel__icon:Nr,panel__headingText:wr,panel__title:$r,panel__description:Cr,panel__actions:Dr,panel__body:Er,"panel__body--sm":"hanui-panel__body--sm-6XP6W","panel__body--lg":"hanui-panel__body--lg-RTK5B","panel__body--flush":"hanui-panel__body--flush-iK75R",panel__footer:Lr,form:Ir,"form--2":"hanui-form--2-HdwDc",row:Rr},Tr=({children:a,title:n,description:t,actions:o,icon:i,isFlush:r,gap:c="md",footer:l,as:d="section",className:u,bodyClassName:m,testId:g})=>e.jsxs(d,{className:_(Y.panel,u),"data-testid":g,children:[(n||o)&&e.jsxs("div",{className:Y.panel__header,children:[e.jsxs("div",{className:Y.panel__heading,children:[i&&e.jsx("span",{className:Y.panel__icon,children:i}),e.jsxs("div",{className:Y.panel__headingText,children:[n&&e.jsx("h2",{className:Y.panel__title,children:n}),t&&e.jsx("p",{className:Y.panel__description,children:t})]})]}),o&&e.jsx("div",{className:Y.panel__actions,children:o})]}),e.jsx("div",{className:_(Y.panel__body,Y[`panel__body--${c}`],r&&Y["panel__body--flush"],m),children:a}),l&&e.jsx("div",{className:Y.panel__footer,children:l})]}),on=s.memo(({children:a,columns:n=1,className:t})=>e.jsx("div",{className:_(Y.form,Y[`form--${n}`],t),children:a}));on.displayName="PanelForm";const sn=s.memo(({children:a,className:n})=>e.jsx("div",{className:_(Y.row,n),children:a}));sn.displayName="PanelRow";const Mr=s.memo(Tr),Ar="hanui-price-Oc5Nr",Br="hanui-price__current-2Xup2",Sr="hanui-price__currency-32NLN",Fr="hanui-price__list-MlQgT",Or="hanui-price__discount-5Yc6W",ve={price:Ar,price__current:Br,price__currency:Sr,price__list:Fr,price__discount:Or,"price--sm":"hanui-price--sm-Hd8Oe","price--md":"hanui-price--md-JMxlK","price--lg":"hanui-price--lg-TFqIF","price--xl":"hanui-price--xl-EJBYq"},Pr=({value:a,currency:n,listValue:t,discountPercent:o,formatDiscount:i=d=>`%${d}`,size:r="md",className:c,testId:l})=>{const{labels:d}=A(),u=D("Price.currency",n,d==null?void 0:d.currency);return e.jsxs("span",{className:_(ve.price,ve[`price--${r}`],c),"data-testid":l,children:[e.jsxs("span",{className:ve.price__current,children:[a,e.jsx("span",{className:ve.price__currency,children:u})]}),t&&e.jsxs("s",{className:ve.price__list,children:[t,e.jsx("span",{className:ve.price__currency,children:u})]}),o!==void 0&&o>0&&e.jsx("span",{className:ve.price__discount,children:i(o)})]})},Hr=s.memo(Pr),zr="hanui-rating-94dke",Kr="hanui-rating__stars-QkpVU",qr="hanui-rating__empty-Wf6-K",Ur="hanui-rating__count-pIoEs",Gr="hanui-rating__srOnly-E9h0d",Me={rating:zr,rating__stars:Kr,rating__empty:qr,rating__count:Ur,rating__srOnly:Gr,"rating--sm":"hanui-rating--sm-AtY7U","rating--md":"hanui-rating--md-Q0nxN"},Yr=({value:a,count:n,srLabel:t,size:o="sm",className:i,testId:r})=>{var d;const{labels:c}=A(),l=Math.round(a*2)/2;return e.jsxs("span",{className:_(Me.rating,Me[`rating--${o}`],i),"data-testid":r,children:[e.jsx("span",{className:Me.rating__stars,"aria-hidden":!0,children:Array.from({length:5},(u,m)=>{const g=m+1;return l>=g?e.jsx(Pa,{},m):l>=g-.5?e.jsx(Kn,{},m):e.jsx(zn,{className:Me.rating__empty},m)})}),e.jsx("span",{className:Me.rating__srOnly,children:t??Be("Rating.srLabel",(d=c==null?void 0:c.rating)==null?void 0:d.srLabel,a,n)}),q.isDefined(n)&&e.jsxs("span",{className:Me.rating__count,"aria-hidden":!0,children:["(",n,")"]})]})},Xr=s.memo(Yr),Zr="hanui-header-a08Jh",Jr="hanui-header__text-ArJkA",Vr="hanui-header__overline-X5Epo",Qr="hanui-header__title-nQQQJ",Wr="hanui-header__description-08oCr",ei="hanui-header__action-xsxQF",je={header:Zr,header__text:Jr,header__overline:Vr,header__title:Qr,header__description:Wr,header__action:ei,"header--sm":"hanui-header--sm-mIJWZ","header--lg":"hanui-header--lg-QBLIz"},ai=({title:a,description:n,overline:t,action:o,as:i="h2",size:r="md",className:c,testId:l})=>e.jsxs("header",{className:_(je.header,je[`header--${r}`],c),"data-testid":l,children:[e.jsxs("div",{className:je.header__text,children:[t&&e.jsx("span",{className:je.header__overline,children:t}),e.jsx(i,{className:je.header__title,children:a}),n&&e.jsx("p",{className:je.header__description,children:n})]}),o&&e.jsx("div",{className:je.header__action,children:o})]}),ni=s.memo(ai),ti="hanui-skeleton-n92if",oi="hanui-group-YMfwa",qe={skeleton:ti,"hanui-shimmer":"hanui-hanui-shimmer-6yd48","skeleton--block":"hanui-skeleton--block-tOZ-a","skeleton--text":"hanui-skeleton--text-k-ROi","skeleton--circle":"hanui-skeleton--circle-x-mX3",group:oi},si=({width:a,height:n,variant:t="block",lines:o=1,className:i})=>{const r={width:q.isNumber(a)?`${a}px`:a,height:q.isNumber(n)?`${n}px`:n};return t==="text"&&o>1?e.jsx("span",{className:_(qe.group,i),"aria-hidden":!0,children:Array.from({length:o},(c,l)=>e.jsx("span",{className:_(qe.skeleton,qe["skeleton--text"]),style:l===o-1?{width:"60%"}:void 0},l))}):e.jsx("span",{className:_(qe.skeleton,qe[`skeleton--${t}`],i),style:r,"aria-hidden":!0})},ri=s.memo(si),ii="hanui-tabs-l4dFE",ci="hanui-tabs__list-HJvR8",li="hanui-tabs__tab-7gDW7",di="hanui-tabs__count-8JX8s",_i="hanui-tabs__panel-CPklY",Ae={tabs:ii,tabs__list:ci,tabs__tab:li,"tabs__tab--active":"hanui-tabs__tab--active-riqNp",tabs__count:di,tabs__panel:_i},ui=({items:a,defaultTabId:n,activeId:t,onChange:o,ariaLabel:i,className:r,testId:c})=>{var w;const l=s.useId(),[d,u]=s.useState(n??((w=a[0])==null?void 0:w.id)),m=q.isDefined(t),g=m?t:d,h=a.findIndex(y=>y.id===g),p=a[h]??a[0],j=y=>{m||u(y),o==null||o(y)},b=y=>{var B;const $=y.key==="ArrowRight"?1:y.key==="ArrowLeft"?-1:0;if($===0)return;y.preventDefault();const E=(h+$+a.length)%a.length;j(a[E].id),(B=document.getElementById(`${l}-tab-${a[E].id}`))==null||B.focus()};if(a.length===0)return null;const x=q.isDefined(p==null?void 0:p.content);return e.jsxs("div",{className:_(Ae.tabs,r),"data-testid":c,children:[e.jsx("div",{className:Ae.tabs__list,role:"tablist","aria-label":i,onKeyDown:b,children:a.map(y=>{const $=y.id===p.id;return e.jsxs("button",{id:`${l}-tab-${y.id}`,type:"button",role:"tab","aria-selected":$,"aria-controls":x?`${l}-panel-${y.id}`:void 0,tabIndex:$?0:-1,className:_(Ae.tabs__tab,$&&Ae["tabs__tab--active"]),onClick:()=>j(y.id),children:[y.label,q.isDefined(y.count)&&e.jsx("span",{className:Ae.tabs__count,children:y.count})]},y.id)})}),x&&e.jsx("div",{id:`${l}-panel-${p.id}`,role:"tabpanel","aria-labelledby":`${l}-tab-${p.id}`,className:Ae.tabs__panel,tabIndex:0,children:p.content})]})},hi=s.memo(ui),pi="hanui-tile-TGur-",mi="hanui-tile__medallion--Y0pz",bi="hanui-tile__label-mI1OQ",gi="hanui-tile__meta-22qnR",Ue={tile:pi,tile__medallion:mi,tile__label:bi,tile__meta:gi,"tile--active":"hanui-tile--active-z0F2M"},xi=({label:a,icon:n,href:t,meta:o,isActive:i,linkProps:r,className:c,testId:l})=>e.jsxs(se,{href:t,className:_(Ue.tile,i&&Ue["tile--active"],c),"aria-current":i?"page":void 0,"data-testid":l,...r,children:[e.jsx("span",{className:Ue.tile__medallion,"aria-hidden":!0,children:n}),e.jsx("span",{className:Ue.tile__label,children:a}),o&&e.jsx("span",{className:Ue.tile__meta,children:o})]}),fi=s.memo(xi),yi="hanui-modal-3IDi9",vi="hanui-modal__panel--qLSz",ji="hanui-modal__header-meWm6",ki="hanui-modal__icon-df2dd",Ni="hanui-modal__heading-PwDS8",wi="hanui-modal__title-80Sh6",$i="hanui-modal__description-fsCHI",Ci="hanui-modal__close-vFPbw",Di="hanui-modal__body-PDF12",Ei="hanui-modal__footer-CCCkx",V={modal:yi,"modal--sm":"hanui-modal--sm-A7WsS","modal--lg":"hanui-modal--lg-z99Em","hanui-fade-in":"hanui-hanui-fade-in-oHUfh","hanui-fade-in-up":"hanui-hanui-fade-in-up-RF4Hl","hanui-slide-up":"hanui-hanui-slide-up-ibKAg",modal__panel:vi,modal__header:ji,modal__icon:ki,"modal__icon--neutral":"hanui-modal__icon--neutral-QSL7c","modal__icon--danger":"hanui-modal__icon--danger-6V90a","modal__icon--warning":"hanui-modal__icon--warning-a--FX","modal__icon--success":"hanui-modal__icon--success-YWxZs","modal__icon--info":"hanui-modal__icon--info-WRLah",modal__heading:Ni,modal__title:wi,modal__description:$i,modal__close:Ci,modal__body:Di,modal__footer:Ei},Li=({isOpen:a,onClose:n,title:t,closeLabel:o,children:i,description:r,footer:c,icon:l,tone:d="neutral",size:u="md",isDismissable:m=!0,className:g,testId:h})=>{const{labels:p}=A(),j=s.useRef(null),b=s.useId(),x=s.useId();s.useEffect(()=>{const y=j.current;y&&(a&&!y.open&&(y.showModal(),ra(y)),!a&&y.open&&y.close())},[a]),s.useEffect(()=>{if(!a)return;const y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=y}},[a]),s.useEffect(()=>{const y=j.current;if(!y)return;const $=E=>{E.preventDefault(),m&&n()};return y.addEventListener("cancel",$),()=>y.removeEventListener("cancel",$)},[n,m]);const w=s.useCallback(y=>{m&&y.target===j.current&&n()},[m,n]);return e.jsx("dialog",{ref:j,className:_(V.modal,V[`modal--${u}`],g),"aria-labelledby":b,"aria-describedby":r?x:void 0,"data-testid":h,onClick:w,children:e.jsxs("div",{className:V.modal__panel,children:[e.jsxs("header",{className:V.modal__header,children:[l&&e.jsx("span",{className:_(V.modal__icon,V[`modal__icon--${d}`]),children:l}),e.jsxs("div",{className:V.modal__heading,children:[e.jsx("h2",{id:b,className:V.modal__title,children:t}),r&&e.jsx("p",{id:x,className:V.modal__description,children:r})]}),m&&e.jsx(Ye,{icon:e.jsx(ca,{}),label:D("Modal.closeLabel",o,p==null?void 0:p.close),variant:"ghost",size:"sm",className:V.modal__close,onClick:n})]}),i&&e.jsx("div",{className:V.modal__body,children:i}),c&&e.jsx("footer",{className:V.modal__footer,children:c})]})})},da=s.memo(Li),Ii={destructive:e.jsx(Hn,{}),warning:e.jsx(Fa,{}),neutral:e.jsx(Pn,{})},Ri={destructive:"danger",warning:"warning",neutral:"info"},Ti={destructive:oe.DANGER,warning:oe.PRIMARY,neutral:oe.PRIMARY},Mi=({isOpen:a,onClose:n,onConfirm:t,title:o,description:i,confirmLabel:r,cancelLabel:c,closeLabel:l,kind:d="neutral",children:u})=>{const{labels:m}=A(),[g,h]=s.useState(!1),p=async()=>{h(!0);try{await t()}finally{h(!1)}};return e.jsx(da,{isOpen:a,onClose:n,title:o,closeLabel:l??(m==null?void 0:m.close),description:i,icon:Ii[d],tone:Ri[d],size:"sm",isDismissable:!g,footer:e.jsxs(e.Fragment,{children:[e.jsx(Oe,{variant:oe.SECONDARY,size:be.MEDIUM,onClick:n,disabled:g,children:D("ConfirmDialog.cancelLabel",c,m==null?void 0:m.cancel)}),e.jsx(Oe,{variant:Ti[d],size:be.MEDIUM,onClick:p,isLoading:g,children:r})]}),children:u})},Ai=s.memo(Mi),Bi="hanui-form-zpZn4",Si={form:Bi},Fi=({isOpen:a,onClose:n,onSubmit:t,title:o,label:i,submitLabel:r,cancelLabel:c,closeLabel:l,description:d,hint:u,placeholder:m,defaultValue:g="",isRequired:h,requiredLabel:p,inputMode:j="text",maxLength:b,rows:x=4})=>{const{labels:w}=A(),y=s.useId(),[$,E]=s.useState(g),[B,z]=s.useState(!1),W=s.useRef(!1);s.useEffect(()=>{a&&!W.current&&E(g),W.current=a},[a,g]);const M=$.trim(),ee=!!h&&M==="",L=F=>j==="multiline"?e.jsx(Za,{...F,value:$,onChange:U=>E(U.target.value),placeholder:m,maxLength:b,rows:x}):e.jsx(Ya,{...F,type:j==="number"?"number":"text",value:$,onChange:U=>E(U.target.value),placeholder:m,maxLength:b}),T=async()=>{if(!(ee||B)){z(!0);try{await t(M),n()}catch{}finally{z(!1)}}};return e.jsx(da,{isOpen:a,onClose:n,title:o,closeLabel:l??(w==null?void 0:w.close),description:d,size:"sm",isDismissable:!B,footer:e.jsxs(e.Fragment,{children:[e.jsx(Oe,{variant:oe.SECONDARY,size:be.MEDIUM,onClick:n,disabled:B,children:D("PromptDialog.cancelLabel",c,w==null?void 0:w.cancel)}),e.jsx(Oe,{type:"submit",form:y,variant:oe.PRIMARY,size:be.MEDIUM,disabled:ee,isLoading:B,children:D("PromptDialog.submitLabel",r,w==null?void 0:w.submit)})]}),children:e.jsx("form",{id:y,className:Si.form,onSubmit:F=>{F.preventDefault(),T()},children:e.jsx(Ja,{label:i,hint:u,isRequired:h,requiredLabel:p,children:L})})})},Oi=s.memo(Fi),Pi="hanui-scroller-EtDmS",Hi="hanui-table-uCv4q",Se={scroller:Pi,"scroller--frame":"hanui-scroller--frame-84zz6",table:Hi,"table--compact":"hanui-table--compact-4KCVl","table--regular":"hanui-table--regular-hsA3-","table--spacious":"hanui-table--spacious-BBUX-","table--sticky-head":"hanui-table--sticky-head-FO2L4","table--row-hover":"hanui-table--row-hover--MAoe"},rn=s.memo(({hasFrame:a=!0,className:n,children:t,...o})=>e.jsx("div",{className:_(Se.scroller,a&&Se["scroller--frame"],n),...o,children:t}));rn.displayName="TableScroller";const zi=({density:a="regular",hasStickyHead:n,hasRowHover:t,className:o,children:i,...r})=>e.jsx("table",{className:_(Se.table,Se[`table--${a}`],n&&Se["table--sticky-head"],t&&Se["table--row-hover"],o),...r,children:i}),Ki=s.memo(zi),qi="hanui-wrapper-KXCZg",Ui="hanui-table-LF5Ow",Gi="hanui-state-YPPb0",Yi="hanui-state__message-wwbIW",ke={wrapper:qi,"wrapper--capped":"hanui-wrapper--capped-M2QUJ",table:Ui,state:Gi,"state--error":"hanui-state--error-A492d",state__message:Yi,"row--warning":"hanui-row--warning-BAUN2"},Xi=({columns:a,children:n,isLoading:t,error:o,emptyMessage:i,loadingMessage:r,hasViewportCap:c,className:l,testId:d})=>{var h,p;const{labels:u}=A(),m=s.Children.count(n),g=(j,b)=>e.jsx("tr",{children:e.jsx("td",{colSpan:a.length,className:_(ke.state,b&&ke[`state--${b}`]),children:j})});return e.jsx("div",{className:_(ke.wrapper,c&&ke["wrapper--capped"],l),"data-testid":d,children:e.jsxs("table",{className:ke.table,children:[e.jsx("thead",{children:e.jsx("tr",{children:a.map(j=>e.jsx("th",{scope:"col","aria-label":j.srLabel,"aria-sort":j.ariaSort,className:j.className,children:j.label},j.key))})}),e.jsx("tbody",{children:o?g(e.jsxs("span",{role:"alert",className:ke.state__message,children:[e.jsx(Oa,{}),o]}),"error"):t?g(D("DataTable.loadingMessage",r,(h=u==null?void 0:u.dataTable)==null?void 0:h.loading)):m===0?g(D("DataTable.emptyMessage",i,(p=u==null?void 0:u.dataTable)==null?void 0:p.empty)):n})]})})},cn=s.memo(({isWarning:a,className:n,children:t,...o})=>e.jsx("tr",{className:_(a&&ke["row--warning"],n),...o,children:t}));cn.displayName="DataTableRow";const Zi=s.memo(Xi),Ji="hanui-bar-b4PP4",Vi="hanui-bar__hiddenSubmit-jeCyX",Qi="hanui-bar__actions-rG69L",Wi="hanui-field-f-rvu",Ge={bar:Ji,bar__hiddenSubmit:Vi,bar__actions:Qi,field:Wi,"field--wide":"hanui-field--wide-FA5gf"},ec=({onSubmit:a,children:n,actions:t,label:o,className:i,testId:r})=>{const{labels:c}=A();return e.jsxs("form",{className:_(Ge.bar,i),"aria-label":D("FilterBar.label",o,c==null?void 0:c.filters),"data-testid":r,onSubmit:l=>{l.preventDefault(),a()},children:[n,e.jsx("button",{type:"submit",className:Ge.bar__hiddenSubmit,tabIndex:-1,"aria-hidden":!0}),t&&e.jsx("div",{className:Ge.bar__actions,children:t})]})},ln=s.memo(({children:a,isWide:n,className:t})=>e.jsx("div",{className:_(Ge.field,n&&Ge["field--wide"],t),children:a}));ln.displayName="FilterBarField";const ac=s.memo(ec),nc="hanui-pagination-K-L20",tc="hanui-pagination__list--9HqC",oc="hanui-pagination__arrow-XIgoX",sc="hanui-pagination__page-TpoJM",rc="hanui-pagination__gap-qoDyI",ue={pagination:nc,pagination__list:tc,pagination__arrow:oc,pagination__page:sc,"pagination__page--active":"hanui-pagination__page--active-XHeaz",pagination__gap:rc},ic=(a,n)=>{if(n<=7)return Array.from({length:n},(r,c)=>c+1);const t=new Set([1,n,a]);a-1>1&&t.add(a-1),a+1<n&&t.add(a+1);const o=[...t].sort((r,c)=>r-c),i=[];return o.forEach((r,c)=>{c>0&&r-o[c-1]>1&&i.push("gap"),i.push(r)}),i},cc=({page:a,totalPages:n,label:t,previousLabel:o,nextLabel:i,buildHref:r,onPageChange:c,linkProps:l,className:d,testId:u})=>{var p,j,b;const{labels:m}=A(),g=s.useMemo(()=>ic(a,n),[a,n]);if(n<=1)return null;const h=x=>{c&&c(x)};return e.jsxs("nav",{className:_(ue.pagination,d),"aria-label":D("Pagination.label",t,(p=m==null?void 0:m.pagination)==null?void 0:p.label),"data-testid":u,children:[e.jsx(Ye,{className:ue.pagination__arrow,icon:e.jsx(In,{}),label:D("Pagination.previousLabel",o,(j=m==null?void 0:m.pagination)==null?void 0:j.previous),variant:"outline",disabled:a<=1,onClick:()=>h(a-1)}),e.jsx("ul",{className:ue.pagination__list,children:g.map((x,w)=>x==="gap"?e.jsx("li",{className:ue.pagination__gap,"aria-hidden":!0,children:"…"},`gap-${w}`):e.jsx("li",{children:r?e.jsx(se,{href:r(x),className:_(ue.pagination__page,x===a&&ue["pagination__page--active"]),"aria-current":x===a?"page":void 0,...l,children:x}):e.jsx(Oe,{variant:oe.SECONDARY,size:be.SMALL,className:_(ue.pagination__page,x===a&&ue["pagination__page--active"]),"aria-current":x===a?"page":void 0,onClick:()=>h(x),children:x})},x))}),e.jsx(Ye,{className:ue.pagination__arrow,icon:e.jsx(Sa,{}),label:D("Pagination.nextLabel",i,(b=m==null?void 0:m.pagination)==null?void 0:b.next),variant:"outline",disabled:a>=n,onClick:()=>h(a+1)})]})},lc=s.memo(cc);exports.ABOVE_MOBILE_MEDIA_QUERY=We;exports.ABOVE_TABLET_MEDIA_QUERY=yn;exports.Alert=ss;exports.Avatar=ds;exports.Badge=ps;exports.BottomSheet=la;exports.Breadcrumb=vs;exports.Button=Oe;exports.Card=Ls;exports.CardBody=Wa;exports.CardFooter=en;exports.CardMedia=Va;exports.CardOverlay=Qa;exports.Checkbox=Jt;exports.Chip=za;exports.ChipGroup=rt;exports.Combobox=Rt;exports.ConfirmDialog=Ai;exports.CopyField=Ss;exports.DARK_THEME=va;exports.DEFAULT_FONTS=hn;exports.DataTable=Zi;exports.DataTableRow=cn;exports.Directory=nr;exports.DirectoryGroup=an;exports.DirectoryJump=tn;exports.DirectoryRow=nn;exports.Divider=Hs;exports.EmptyState=lr;exports.Field=Ja;exports.FilterBar=ac;exports.FilterBarField=ln;exports.HanuiProvider=mn;exports.IconButton=Ye;exports.Input=Ya;exports.LIGHT_THEME=ya;exports.MOBILE_BREAKPOINT=La;exports.Modal=da;exports.PageHeader=yr;exports.Pagination=lc;exports.Panel=Mr;exports.PanelForm=on;exports.PanelRow=sn;exports.Price=Hr;exports.PromptDialog=Oi;exports.QuantityStepper=Mo;exports.Radio=to;exports.RadioCard=lo;exports.RangeSlider=fo;exports.Rating=Xr;exports.RatingInput=Eo;exports.SectionHeader=ni;exports.Select=qt;exports.Skeleton=ri;exports.Spinner=ia;exports.TABLET_BREAKPOINT=Ia;exports.TABLET_PORTRAIT_BREAKPOINT=fn;exports.Table=Ki;exports.TableCheckbox=So;exports.TableScroller=rn;exports.Tabs=hi;exports.TextLink=Xn;exports.Textarea=Za;exports.Tile=fi;exports.Tooltip=Wn;exports.UISize=be;exports.UIVariant=oe;exports.buildThemeCss=ja;exports.initHanui=bn;exports.isKeyboardOpeningElement=Ra;exports.matchesSearch=sa;exports.normalizeSearchTerm=oa;exports.preventAutoKeyboard=ra;exports.resolveTokens=pn;exports.useHanui=A;exports.useHanuiTheme=xn;exports.useSheetViewport=Ea;
|
|
17
|
+
`)},ka=a=>{if(!q.isClient())return;const n=a?va(a):"",t=document.getElementById(ma);if(n===""){t==null||t.remove();return}const o=t??document.createElement("style");o.id=ma,o.textContent=n,t||document.head.appendChild(o)},Na=s.createContext({}),A=()=>s.useContext(Na),cn=({children:a,theme:n,linkComponent:t,labels:o})=>{const i=s.useMemo(()=>n?JSON.stringify(n):"",[n]);s.useEffect(()=>{ka(n)},[i]);const r=s.useRef(n);r.current=n;const c=s.useMemo(()=>({theme:r.current,linkComponent:t,labels:o}),[i,t,o]);return e.jsx(Na.Provider,{value:c,children:a})},ln=(a={})=>{ka(a.theme),!(!q.isClient()||!a.colorScheme)&&document.documentElement.setAttribute(we,a.colorScheme)},ja=()=>{var a;return q.isClient()&&((a=window.matchMedia)!=null&&a.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"},dn=()=>{if(!q.isClient())return"light";const a=document.documentElement.getAttribute(we);return a==="dark"||a==="light"?a:ja()},_n=()=>{const[a,n]=s.useState("light"),[t,o]=s.useState(!1);s.useEffect(()=>{n(dn()),o(!0)},[]),s.useEffect(()=>{if(!q.isClient()||!window.matchMedia)return;const c=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>{document.documentElement.hasAttribute(we)||n(ja())};return c.addEventListener("change",l),()=>c.removeEventListener("change",l)},[]);const i=s.useCallback(c=>{if(!q.isClient())return;const l=document.documentElement;l.classList.add(pa),l.setAttribute(we,c),n(c),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>l.classList.remove(pa))})},[]),r=s.useCallback(()=>i(a==="dark"?"light":"dark"),[a,i]);return{scheme:a,setScheme:i,toggle:r,isReady:t}},wa="--hanui-sheet-height",$a="--hanui-sheet-inset-bottom";let Ye=0,Me=0;const Ca=()=>{const a=window.visualViewport;if(!a)return;const n=window.innerHeight-a.height-a.offsetTop,t=document.documentElement;t.style.setProperty($a,`${Math.max(0,Math.round(n))}px`),t.style.setProperty(wa,`${Math.round(a.height)}px`)},De=()=>{Me||(Me=window.requestAnimationFrame(()=>{Me=0,Ca()}))},Da=(a=!0)=>{s.useEffect(()=>{if(!a)return;const n=window.visualViewport;if(n)return Ye+=1,Ye===1&&(n.addEventListener("resize",De),n.addEventListener("scroll",De),window.addEventListener("orientationchange",De)),Ca(),()=>{Ye-=1,!(Ye>0)&&(n.removeEventListener("resize",De),n.removeEventListener("scroll",De),window.removeEventListener("orientationchange",De),Me&&(window.cancelAnimationFrame(Me),Me=0),document.documentElement.style.removeProperty($a),document.documentElement.style.removeProperty(wa))}},[a])};var oe=(a=>(a.PRIMARY="PRIMARY",a.CART="CART",a.SECONDARY="SECONDARY",a.OUTLINE="OUTLINE",a.DARK="DARK",a.LIGHT="LIGHT",a.GHOST="GHOST",a.DANGER="DANGER",a))(oe||{}),ge=(a=>(a.SMALL="SMALL",a.MEDIUM="MEDIUM",a.LARGE="LARGE",a))(ge||{});const Ea=640,un=768,Ra=1024,hn=`(min-width: ${Ra+1}px)`,We=`(min-width: ${Ea+1}px)`,oa=a=>a.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(),sa=(a,n)=>oa(a).includes(oa(n)),mn=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),Ia=a=>{if(!(a instanceof HTMLElement))return!1;if(a.isContentEditable)return!0;const n=a.getAttribute("contenteditable");if(n===""||n==="true"||n==="plaintext-only")return!0;const t=a.tagName;return t==="TEXTAREA"?!0:t!=="INPUT"?!1:!mn.has(a.type)},ra=a=>{const n=a.ownerDocument.activeElement;!a.contains(n)||!Ia(n)||(n.blur(),a.tabIndex=-1,a.focus({preventScroll:!0}))},_=(...a)=>{let n="";for(const t of a)t&&(n=n===""?t:`${n} ${t}`);return n},se=({children:a,...n})=>{const{linkComponent:t}=A();return t?e.jsx(t,{...n,children:a}):e.jsx("a",{...n,children:a})},ba=new Set,E=(a,...n)=>{for(const t of n)if(t!==void 0)return t;return process.env.NODE_ENV!=="production"&&!ba.has(a)&&(ba.add(a),console.error(`[hanui] Eksik metin: ${a}. 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.`)),""},Ae=(a,n,...t)=>n?n(...t):E(a),pn="hanui-spinner-7pXwf",bn="hanui-spinner__label-sZvSq",aa={spinner:pn,"hanui-spin":"hanui-hanui-spin-wTV0a",spinner__label:bn,"spinner--sm":"hanui-spinner--sm-uI0wH","spinner--md":"hanui-spinner--md--VmFK","spinner--lg":"hanui-spinner--lg-K9k-Z"},gn=({size:a="md",label:n,className:t})=>{const{labels:o}=A();return e.jsx("span",{className:_(aa.spinner,aa[`spinner--${a}`],t),role:"status",children:e.jsx("span",{className:aa.spinner__label,children:n??E("Spinner.label",o==null?void 0:o.loading)})})},ia=s.memo(gn),xn="hanui-button-SRu4R",fn="hanui-button__icon-giom6",yn="hanui-button__spinner-vexVG",vn="hanui-button__label-qiMHm",le={button:xn,button__icon:fn,button__spinner:yn,button__label:vn,"button--full":"hanui-button--full-CwPHR","button--loading":"hanui-button--loading-O-naJ","button--small":"hanui-button--small-TF9Hz","button--medium":"hanui-button--medium-JDjkH","button--large":"hanui-button--large-btadu","button--primary":"hanui-button--primary-ym7RJ","button--cart":"hanui-button--cart-5DVmR","button--secondary":"hanui-button--secondary-56m1d","button--outline":"hanui-button--outline-ZI8sw","button--dark":"hanui-button--dark-FGZgn","button--light":"hanui-button--light-YzEPs","button--ghost":"hanui-button--ghost-rijnZ","button--danger":"hanui-button--danger-TNGd2"},La=s.forwardRef(({variant:a=oe.PRIMARY,size:n=ge.MEDIUM,isLoading:t,isFullWidth:o,startIcon:i,endIcon:r,className:c,children:l,disabled:d,href:u,isExternal:p,linkProps:g,testId:h,...m},k)=>{const b=_(le.button,le[`button--${a.toLowerCase()}`],le[`button--${n.toLowerCase()}`],o&&le["button--full"],t&&le["button--loading"],c),x=e.jsxs(e.Fragment,{children:[t&&e.jsx(ia,{size:"sm",className:le.button__spinner,label:""}),!t&&i&&e.jsx("span",{className:le.button__icon,children:i}),e.jsx("span",{className:le.button__label,children:l}),r&&e.jsx("span",{className:le.button__icon,children:r})]});return u&&p?e.jsx("a",{href:u,className:b,target:"_blank",rel:"noopener noreferrer","aria-label":m["aria-label"],"data-testid":h,children:x}):u?e.jsx(se,{href:u,className:b,"data-testid":h,...g,children:x}):e.jsx("button",{ref:k,className:b,disabled:d||t,"aria-busy":t,"data-testid":h,...m,children:x})});La.displayName="Button";const Oe=s.memo(La),kn="hanui-iconButton-JdtwM",na={iconButton:kn,"iconButton--sm":"hanui-iconButton--sm-wE6zE","iconButton--md":"hanui-iconButton--md-iTNNS","iconButton--ghost":"hanui-iconButton--ghost-w-8K3","iconButton--outline":"hanui-iconButton--outline-vEhcY","iconButton--solid":"hanui-iconButton--solid-NUszP","iconButton--cart":"hanui-iconButton--cart-nVsH-","iconButton--danger":"hanui-iconButton--danger-xKkEA"},Ta=s.forwardRef(({icon:a,label:n,variant:t="ghost",size:o="md",className:i,type:r="button",href:c,linkProps:l,testId:d,...u},p)=>{const g=_(na.iconButton,na[`iconButton--${t}`],na[`iconButton--${o}`],i);return c?e.jsx(se,{href:c,className:g,"aria-label":n,title:u.title??n,"data-testid":d,...l,children:a}):e.jsx("button",{ref:p,type:r,className:g,"aria-label":n,title:n,"data-testid":d,...u,children:a})});Ta.displayName="IconButton";const Xe=s.memo(Ta),Nn="hanui-link-WBmXY",jn="hanui-link__label--OEu-",wn="hanui-link__arrow-JKXm-",Pe={link:Nn,link__label:jn,link__arrow:wn,"link--sm":"hanui-link--sm-a-3Dz","link--md":"hanui-link--md-lZdYP","link--brand":"hanui-link--brand-vr8sW","link--muted":"hanui-link--muted-EeN6l"},$n=({href:a,children:n,hasArrow:t,tone:o="brand",size:i="md",className:r,linkProps:c,...l})=>e.jsxs(se,{href:a,className:_(Pe.link,Pe[`link--${o}`],Pe[`link--${i}`],r),...c,...l,children:[e.jsx("span",{className:Pe.link__label,children:n}),t&&e.jsx(D.ArrowRight,{"aria-hidden":!0,className:Pe.link__arrow})]}),Cn=s.memo($n),Dn="hanui-tooltip-RG1g1",En="hanui-tooltip__trigger-nWZtO",Rn="hanui-bubble-bcBNk",Ze={tooltip:Dn,tooltip__trigger:En,bubble:Rn,"hanui-fade-in-up":"hanui-hanui-fade-in-up-Fwj3A","bubble--top":"hanui-bubble--top-uWSZy","bubble--bottom":"hanui-bubble--bottom-jKokL"},In=({content:a,children:n,position:t="top",className:o})=>{const[i,r]=s.useState(!1),c=s.useId();return e.jsxs("span",{className:_(Ze.tooltip,o),onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onFocus:()=>r(!0),onBlur:()=>r(!1),onKeyDown:l=>{l.key==="Escape"&&r(!1)},children:[e.jsx("span",{"aria-describedby":i?c:void 0,className:Ze.tooltip__trigger,children:n}),i&&e.jsx("span",{id:c,role:"tooltip",className:_(Ze.bubble,Ze[`bubble--${t}`]),children:a})]})},Ln=s.memo(In),Tn="hanui-chip--NLgU",Bn="hanui-chip__icon-IjjSb",Sn="hanui-chip__label-cT4hw",An="hanui-chip__count-MBGO3",me={chip:Tn,chip__icon:Bn,chip__label:Sn,chip__count:An,"chip--sm":"hanui-chip--sm-60H-S","chip--md":"hanui-chip--md--yAlm","chip--iconOnly":"hanui-chip--iconOnly-5LT1h","chip--selected":"hanui-chip--selected-FdpCr"},Ba=s.forwardRef(({children:a,icon:n,endIcon:t,count:o,isSelected:i,size:r="md",label:c,href:l,linkProps:d,className:u,type:p="button",role:g,testId:h,...m},k)=>{const b=_(me.chip,me[`chip--${r}`],i&&me["chip--selected"],!a&&me["chip--iconOnly"],u),x=e.jsxs(e.Fragment,{children:[n&&e.jsx("span",{className:me.chip__icon,"aria-hidden":!0,children:n}),a&&e.jsx("span",{className:me.chip__label,children:a}),q.isDefined(o)&&e.jsx("span",{className:me.chip__count,children:o}),t&&e.jsx("span",{className:me.chip__icon,"aria-hidden":!0,children:t})]});return l?e.jsx(se,{href:l,className:b,"aria-label":a?void 0:c,"aria-current":i?"page":void 0,title:a?void 0:c,"data-testid":h,...d,children:x}):e.jsx("button",{ref:k,type:p,role:g,className:b,"aria-label":a?void 0:c,title:a?void 0:c,"data-testid":h,...g==="radio"?{"aria-checked":!!i}:{"aria-pressed":!!i},...m,children:x})});Ba.displayName="Chip";const Sa=s.memo(Ba),Fn="hanui-group-0tnVf",ga={group:Fn,"group--scrollable":"hanui-group--scrollable-PMu6V"},Mn=({options:a,label:n,size:t="md",isScrollable:o,className:i,...r})=>{var g;const c=s.useRef(null),l=h=>r.isMultiple?r.value.includes(h):r.value===h,d=h=>{if(r.isMultiple){const m=r.value.includes(h)?r.value.filter(k=>k!==h):[...r.value,h];r.onChange(m);return}r.onChange(r.value===h?null:h)},u=h=>{var w,y;if(r.isMultiple)return;const m=h.key==="ArrowRight"||h.key==="ArrowDown"?1:h.key==="ArrowLeft"||h.key==="ArrowUp"?-1:0;if(m===0)return;h.preventDefault();const k=a.filter($=>!$.isDisabled);if(k.length===0)return;const b=k.findIndex($=>$.value===r.value),x=k[(b+m+k.length)%k.length];r.onChange(x.value),(y=(w=c.current)==null?void 0:w.querySelector(`[data-chip-value="${x.value}"]`))==null||y.focus()},p=r.isMultiple?null:r.value??((g=a.find(h=>!h.isDisabled))==null?void 0:g.value)??null;return e.jsx("div",{ref:c,className:_(ga.group,o&&ga["group--scrollable"],i),role:r.isMultiple?"group":"radiogroup","aria-label":n,onKeyDown:u,children:a.map(h=>e.jsx(Sa,{size:t,icon:h.icon,count:h.count,isSelected:l(h.value),disabled:h.isDisabled,role:r.isMultiple?void 0:"radio",tabIndex:r.isMultiple||h.value===p?0:-1,"data-chip-value":h.value,onClick:()=>d(h.value),children:h.label},h.value))})},On=s.memo(Mn),Pn="hanui-sheet-GEvdE",Hn="hanui-sheet__header-NJgw-",Kn="hanui-sheet__title-f-b07",zn="hanui-sheet__toolbar-eyhmW",qn="hanui-sheet__body-eJ2KB",Un="hanui-sheet__footer-NpsY5",Ee={sheet:Pn,sheet__header:Hn,sheet__title:Kn,sheet__toolbar:zn,sheet__body:qn,sheet__footer:Un},Gn=({title:a,closeLabel:n,onClose:t,children:o,toolbar:i,footer:r,closeAbove:c=We,className:l,testId:d})=>{const{labels:u}=A(),p=s.useId();Da(),s.useEffect(()=>{const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=m}},[]),s.useEffect(()=>{const m=window.matchMedia(c);return m.addEventListener("change",t),()=>m.removeEventListener("change",t)},[c,t]);const g=s.useCallback(m=>{!m||m.open||(m.showModal(),ra(m))},[]),h=s.useCallback(m=>{m.target===m.currentTarget&&t()},[t]);return q.isClient()?on.createPortal(e.jsxs("dialog",{ref:g,className:_(Ee.sheet,l),"aria-labelledby":p,"data-testid":d,onCancel:m=>{m.preventDefault(),t()},onClick:h,children:[e.jsxs("header",{className:Ee.sheet__header,children:[e.jsx("h2",{id:p,className:Ee.sheet__title,children:a}),e.jsx(Xe,{icon:e.jsx(D.XLg,{"aria-hidden":!0}),label:E("BottomSheet.closeLabel",n,u==null?void 0:u.close),variant:"ghost",size:"sm",onClick:t})]}),i&&e.jsx("div",{className:Ee.sheet__toolbar,children:i}),e.jsx("div",{className:Ee.sheet__body,children:o}),r&&e.jsx("div",{className:Ee.sheet__footer,children:r})]}),document.body):null},ca=s.memo(Gn),Xn="hanui-combobox-NtZoV",Yn="hanui-combobox__trigger-2riRR",Zn="hanui-combobox__leadingIcon-it2xz",Jn="hanui-combobox__value-acDlr",Qn="hanui-combobox__clear-EXOsc",Vn="hanui-combobox__chevron-g-QzQ",Wn="hanui-combobox__panel-srBxl",et="hanui-combobox__search-THjer",at="hanui-combobox__searchIcon-vr4Bg",nt="hanui-combobox__searchInput-JPp5h",tt="hanui-combobox__list-p-eCs",ot="hanui-combobox__option-CLWh-",st="hanui-combobox__optionText-Zm0D6",rt="hanui-combobox__optionLabel-WvT4W",it="hanui-combobox__optionDescription-8OEzi",ct="hanui-combobox__check-MKlLz",lt="hanui-combobox__empty-mZwBq",T={combobox:Xn,combobox__trigger:Yn,"combobox__trigger--empty":"hanui-combobox__trigger--empty-RxwCq","combobox__trigger--open":"hanui-combobox__trigger--open-rw1ZS","combobox__trigger--invalid":"hanui-combobox__trigger--invalid-iZgiN",combobox__leadingIcon:Zn,combobox__value:Jn,combobox__clear:Qn,combobox__chevron:Vn,"combobox__chevron--open":"hanui-combobox__chevron--open-9kj1j",combobox__panel:Wn,combobox__search:et,combobox__searchIcon:at,combobox__searchInput:nt,combobox__list:tt,"combobox__list--sheet":"hanui-combobox__list--sheet-r3MzB",combobox__option:ot,"combobox__option--active":"hanui-combobox__option--active--75Vq","combobox__option--selected":"hanui-combobox__option--selected-DVFGy","combobox__option--disabled":"hanui-combobox__option--disabled-e6VjI",combobox__optionText:st,combobox__optionLabel:rt,combobox__optionDescription:it,combobox__check:ct,combobox__empty:lt},dt=({options:a,value:n,onChange:t,labels:o,isSearchHidden:i,onSearch:r,isLoading:c,isDisabled:l,isClearable:d,icon:u,id:p,className:g,testId:h,"aria-describedby":m,"aria-invalid":k})=>{const{labels:b}=A(),x={get search(){var f;return E("Combobox.searchPlaceholder",o.searchPlaceholder,(f=b==null?void 0:b.combobox)==null?void 0:f.searchPlaceholder)},get empty(){var f;return E("Combobox.emptyMessage",o.emptyMessage,(f=b==null?void 0:b.combobox)==null?void 0:f.emptyMessage)},get loading(){var f;return E("Combobox.loadingMessage",o.loadingMessage,(f=b==null?void 0:b.combobox)==null?void 0:f.loadingMessage)},get clear(){var f;return E("Combobox.clearLabel",o.clearLabel,(f=b==null?void 0:b.combobox)==null?void 0:f.clearLabel)}},w=s.useId(),y=p??w,$=`${y}-listbox`,R=s.useRef(null),F=s.useRef(null),K=s.useRef(null),W=s.useRef(null),[S,ee]=s.useState(null),I=S!==null,[B,M]=s.useState(""),[U,J]=s.useState(0),[re,xe]=s.useState(null),ie=s.useMemo(()=>{if(r||B.trim()==="")return a;const f=B.trim();return a.filter(L=>sa(L.label,f)||(L.description?sa(L.description,f):!1))},[a,B,r]),ce=a.find(f=>f.value===n)??null;s.useEffect(()=>{ce?xe(ce.label):n===null&&xe(null)},[ce,n]);const $e=(ce==null?void 0:ce.label)??re,he=s.useRef(r);he.current=r,s.useEffect(()=>{if(!I||!he.current)return;const f=window.setTimeout(()=>{var L;return(L=he.current)==null?void 0:L.call(he,B.trim())},300);return()=>window.clearTimeout(f)},[B,I]);const j=s.useCallback(()=>{ee(null),M("")},[]),z=s.useCallback(()=>{if(l)return;ee(window.matchMedia(We).matches?"popover":"sheet"),M("");const f=a.findIndex(L=>L.value===n);J(f>=0?f:0)},[l,a,n]);s.useEffect(()=>{if(S!=="popover")return;const f=L=>{var G;(G=R.current)!=null&&G.contains(L.target)||j()};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[S,j]),s.useEffect(()=>{var f;S==="popover"&&((f=K.current)==null||f.focus({preventScroll:!0}))},[S]),s.useEffect(()=>{var f,L;I&&((L=(f=W.current)==null?void 0:f.querySelector(`[data-index="${U}"]`))==null||L.scrollIntoView({block:"nearest"}))},[U,I,ie.length]);const P=f=>{f.isDisabled||(xe(f.label),t(f.value),j())},Ce=s.useRef(!1);s.useEffect(()=>{var f;Ce.current&&!I&&((f=F.current)==null||f.focus()),Ce.current=I},[I]);const nn=f=>{const L=ie.length-1;switch(f.key){case"ArrowDown":f.preventDefault(),J(G=>G>=L?0:G+1);break;case"ArrowUp":f.preventDefault(),J(G=>G<=0?L:G-1);break;case"Home":f.preventDefault(),J(0);break;case"End":f.preventDefault(),J(L);break;case"Enter":{f.preventDefault();const G=ie[U];G&&P(G);break}case"Escape":f.preventDefault(),j();break;case"Tab":j();break}},da=()=>{t(null),xe(null)},_a=i?null:e.jsxs("div",{className:T.combobox__search,children:[e.jsx(D.Search,{"aria-hidden":!0,className:T.combobox__searchIcon}),e.jsx("input",{ref:K,type:"text",role:"combobox",className:T.combobox__searchInput,value:B,placeholder:x.search,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":$,"aria-activedescendant":ie[U]?`${y}-option-${U}`:void 0,"aria-label":x.search,onChange:f=>{M(f.target.value),J(0)},onKeyDown:nn}),c&&e.jsx(ia,{size:"sm",label:""})]}),ua=f=>e.jsxs("ul",{ref:W,id:$,role:"listbox",className:_(T.combobox__list,f&&T["combobox__list--sheet"]),children:[ie.map((L,G)=>{const tn=G===U,ea=L.value===n;return e.jsx("li",{children:e.jsxs("div",{id:`${y}-option-${G}`,role:"option","data-index":G,"aria-selected":ea,"aria-disabled":L.isDisabled,className:_(T.combobox__option,tn&&T["combobox__option--active"],ea&&T["combobox__option--selected"],L.isDisabled&&T["combobox__option--disabled"]),onMouseEnter:()=>J(G),onClick:()=>P(L),children:[e.jsxs("span",{className:T.combobox__optionText,children:[e.jsx("span",{className:T.combobox__optionLabel,children:L.label}),L.description&&e.jsx("span",{className:T.combobox__optionDescription,children:L.description})]}),ea&&e.jsx(D.CheckLg,{"aria-hidden":!0,className:T.combobox__check})]})},L.value)}),ie.length===0&&e.jsx("li",{className:T.combobox__empty,children:c?x.loading:x.empty})]});return e.jsxs("div",{ref:R,className:_(T.combobox,g),"data-testid":h,children:[e.jsxs("button",{ref:F,id:y,type:"button",className:_(T.combobox__trigger,!$e&&T["combobox__trigger--empty"],I&&T["combobox__trigger--open"],k&&T["combobox__trigger--invalid"]),disabled:l,"aria-haspopup":"listbox","aria-expanded":I,"aria-controls":I?$:void 0,"aria-label":o.placeholder,"aria-describedby":m,onClick:()=>I?j():z(),children:[u&&e.jsx("span",{className:T.combobox__leadingIcon,"aria-hidden":!0,children:u}),e.jsx("span",{className:T.combobox__value,children:$e??o.placeholder}),d&&$e&&!l&&e.jsx("span",{role:"button",tabIndex:0,className:T.combobox__clear,"aria-label":x.clear,onClick:f=>{f.stopPropagation(),da()},onKeyDown:f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.stopPropagation(),da())},children:e.jsx(D.XLg,{"aria-hidden":!0})}),e.jsx(D.CaretDownFill,{"aria-hidden":!0,className:_(T.combobox__chevron,I&&T["combobox__chevron--open"])})]}),S==="popover"&&e.jsxs("div",{className:T.combobox__panel,children:[_a,ua(!1)]}),S==="sheet"&&e.jsx(ca,{title:o.placeholder,closeLabel:o.closeLabel??(b==null?void 0:b.close),onClose:j,toolbar:_a??void 0,children:ua(!0)})]})},_t=s.memo(dt),ut="hanui-select-tiiPL",ht="hanui-trigger-rHQJz",mt="hanui-trigger__icon-apCcx",pt="hanui-trigger__value-ioH7K",bt="hanui-trigger__chevron-FtsIZ",gt="hanui-panel-rGOOd",xt="hanui-list-SOKf8",ft="hanui-option-ZDPef",yt="hanui-option__label-SsoYB",vt="hanui-option__check-8CPSG",H={select:ut,trigger:ht,"trigger--empty":"hanui-trigger--empty-cuinb","trigger--open":"hanui-trigger--open-1nsvu","trigger--sm":"hanui-trigger--sm-Xnu1C",trigger__icon:mt,trigger__value:pt,trigger__chevron:bt,"trigger__chevron--open":"hanui-trigger__chevron--open-1P2P-",panel:gt,"hanui-fade-in-up":"hanui-hanui-fade-in-up-Lt0Bt","panel--start":"hanui-panel--start-Fotwa","panel--end":"hanui-panel--end-ClVl2",list:xt,"list--sheet":"hanui-list--sheet-BIjCb",option:ft,"option--active":"hanui-option--active-R4lLF","option--selected":"hanui-option--selected-glQMj","option--disabled":"hanui-option--disabled-h4rdd",option__label:yt,option__check:vt},kt=({options:a,value:n,onChange:t,label:o,placeholder:i,closeLabel:r,icon:c,size:l="md",align:d="start",isDisabled:u,id:p,className:g,testId:h,"aria-describedby":m,"aria-invalid":k})=>{const{labels:b}=A(),x=E("Select.placeholder",i,b==null?void 0:b.selectPlaceholder),w=s.useId(),y=p??w,$=`${y}-listbox`,R=j=>`${y}-option-${j}`,F=s.useRef(null),K=s.useRef(null),W=s.useRef(null),[S,ee]=s.useState(null),[I,B]=s.useState(0),M=S!==null,U=a.findIndex(j=>j.value===n),J=U>=0?a[U]:null,re=s.useCallback(()=>ee(null),[]),xe=s.useCallback(()=>{u||a.length===0||(ee(window.matchMedia(We).matches?"popover":"sheet"),B(U>=0?U:0))},[u,a.length,U]),ie=j=>{j.isDisabled||(t(j.value),re())},ce=s.useRef(!1);s.useEffect(()=>{var j;ce.current&&!M&&((j=K.current)==null||j.focus()),ce.current=M},[M]),s.useEffect(()=>{if(S!=="popover")return;const j=z=>{var P;(P=F.current)!=null&&P.contains(z.target)||re()};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[S,re]),s.useEffect(()=>{var j;S==="sheet"&&((j=W.current)==null||j.focus({preventScroll:!0}))},[S]),s.useEffect(()=>{var j,z;M&&((z=(j=W.current)==null?void 0:j.querySelector(`[data-index="${I}"]`))==null||z.scrollIntoView({block:"nearest"}))},[I,M]);const $e=j=>{const z=a.length-1;if(!M){["ArrowDown","ArrowUp","Enter"," "].includes(j.key)&&(j.preventDefault(),xe());return}switch(j.key){case"ArrowDown":j.preventDefault(),B(P=>P>=z?0:P+1);break;case"ArrowUp":j.preventDefault(),B(P=>P<=0?z:P-1);break;case"Home":j.preventDefault(),B(0);break;case"End":j.preventDefault(),B(z);break;case"Enter":case" ":{j.preventDefault();const P=a[I];P&&ie(P);break}case"Escape":j.preventDefault(),re();break;case"Tab":re();break}},he=j=>e.jsx("ul",{ref:W,id:$,role:"listbox","aria-label":o,"aria-activedescendant":j&&a[I]?R(I):void 0,tabIndex:j?0:-1,className:_(H.list,j&&H["list--sheet"]),onKeyDown:j?$e:void 0,children:a.map((z,P)=>{const Ce=z.value===n;return e.jsxs("li",{id:R(P),role:"option","data-index":P,"aria-selected":Ce,"aria-disabled":z.isDisabled,className:_(H.option,P===I&&H["option--active"],Ce&&H["option--selected"],z.isDisabled&&H["option--disabled"]),onMouseEnter:()=>B(P),onClick:()=>ie(z),children:[e.jsx("span",{className:H.option__label,children:z.label}),Ce&&e.jsx(D.CheckLg,{"aria-hidden":!0,className:H.option__check})]},z.value)})});return e.jsxs("span",{ref:F,className:_(H.select,g),"data-testid":h,children:[e.jsxs("button",{ref:K,id:y,type:"button",role:"combobox",className:_(H.trigger,H[`trigger--${l}`],!J&&H["trigger--empty"],M&&H["trigger--open"]),disabled:u,"aria-haspopup":"listbox","aria-expanded":M,"aria-controls":M?$:void 0,"aria-activedescendant":S==="popover"&&a[I]?R(I):void 0,"aria-label":o,"aria-describedby":m,"aria-invalid":k,onClick:()=>M?re():xe(),onKeyDown:$e,children:[c&&e.jsx("span",{className:H.trigger__icon,"aria-hidden":!0,children:c}),e.jsx("span",{className:H.trigger__value,children:(J==null?void 0:J.label)??x}),e.jsx(D.CaretDownFill,{"aria-hidden":!0,className:_(H.trigger__chevron,M&&H["trigger__chevron--open"])})]}),S==="popover"&&e.jsx("div",{className:_(H.panel,H[`panel--${d}`]),children:he(!1)}),S==="sheet"&&e.jsx(ca,{title:o,closeLabel:r??(b==null?void 0:b.close),onClose:re,children:he(!0)})]})},Nt=s.memo(kt),jt="hanui-checkbox-FaFCj",wt="hanui-checkbox__input-nTHne",$t="hanui-checkbox__body-VAEW2",Ct="hanui-checkbox__label-sSNZY",Dt="hanui-checkbox__hint-ish-J",He={checkbox:jt,checkbox__input:wt,checkbox__body:$t,checkbox__label:Ct,checkbox__hint:Dt},Aa=s.forwardRef(({label:a,hint:n,className:t,testId:o,...i},r)=>e.jsxs("label",{className:_(He.checkbox,t),"data-testid":o,children:[e.jsx("input",{ref:r,type:"checkbox",className:He.checkbox__input,...i}),e.jsxs("span",{className:He.checkbox__body,children:[e.jsx("span",{className:He.checkbox__label,children:a}),n&&e.jsx("span",{className:He.checkbox__hint,children:n})]})]}));Aa.displayName="Checkbox";const Et=s.memo(Aa),Rt="hanui-radio-KoZak",It="hanui-radio__input-gVMgh",Lt="hanui-radio__body-oZWg6",Tt="hanui-radio__label-d-5ce",Bt="hanui-radio__hint-baVbs",St="hanui-radio__count-OtkUM",Re={radio:Rt,radio__input:It,radio__body:Lt,radio__label:Tt,radio__hint:Bt,radio__count:St},Fa=s.forwardRef(({label:a,hint:n,count:t,className:o,testId:i,...r},c)=>e.jsxs("label",{className:_(Re.radio,o),"data-testid":i,children:[e.jsx("input",{ref:c,type:"radio",className:Re.radio__input,...r}),e.jsxs("span",{className:Re.radio__body,children:[e.jsx("span",{className:Re.radio__label,children:a}),n&&e.jsx("span",{className:Re.radio__hint,children:n})]}),q.isDefined(t)&&e.jsx("span",{className:Re.radio__count,children:t})]}));Fa.displayName="Radio";const At=s.memo(Fa),Ft="hanui-radioCard-sndiC",Mt="hanui-radioCard__input-6vuoD",Ot="hanui-radioCard__indicator--x9LT",Pt="hanui-radioCard__body-CFqoi",Ie={radioCard:Ft,radioCard__input:Mt,"radioCard--selected":"hanui-radioCard--selected-Mi7ee",radioCard__indicator:Ot,"radioCard--disabled":"hanui-radioCard--disabled-YlYee",radioCard__body:Pt},Ht=({name:a,value:n,isSelected:t,isDisabled:o,onChange:i,children:r,className:c,id:l,testId:d})=>e.jsxs("label",{className:_(Ie.radioCard,t&&Ie["radioCard--selected"],o&&Ie["radioCard--disabled"],c),"data-testid":d,children:[e.jsx("input",{type:"radio",id:l,name:a,value:n,checked:t,disabled:o,onChange:()=>i(n),className:Ie.radioCard__input}),e.jsx("span",{className:Ie.radioCard__indicator,"aria-hidden":!0}),e.jsx("span",{className:Ie.radioCard__body,children:r})]}),Kt=s.memo(Ht),zt="hanui-range-RpDPh",qt="hanui-range__readout-itDMd",Ut="hanui-range__separator-u-ZJX",Gt="hanui-range__track-bCh5Y",Xt="hanui-range__fill-VXMCE",Yt="hanui-range__input-TAN2I",Zt="hanui-range__bounds-GIhFd",ae={range:zt,"range--disabled":"hanui-range--disabled-13hlc",range__readout:qt,range__separator:Ut,range__track:Gt,range__fill:Xt,range__input:Yt,range__bounds:Zt},Jt=({min:a,max:n,step:t=1,value:o,onChange:i,onCommit:r,formatValue:c=String,label:l,minLabel:d,maxLabel:u,isDisabled:p,className:g,testId:h})=>{var ee,I;const{labels:m}=A(),k=E("RangeSlider.minLabel",d,(ee=m==null?void 0:m.range)==null?void 0:ee.min),b=E("RangeSlider.maxLabel",u,(I=m==null?void 0:m.range)==null?void 0:I.max),[x,w]=o,y=s.useCallback(B=>i([Math.min(B,w),w]),[w,i]),$=s.useCallback(B=>i([x,Math.max(B,x)]),[x,i]),R=s.useCallback(()=>r==null?void 0:r([x,w]),[x,w,r]),F=n-a,K=F===0?0:q.normalize(x-a,F),W=F===0?0:q.normalize(w-a,F),S=K>50;return e.jsxs("div",{className:_(ae.range,p&&ae["range--disabled"],g),role:"group","aria-label":l,"data-testid":h,children:[e.jsxs("div",{className:ae.range__readout,children:[e.jsx("span",{className:ae.range__value,children:c(x)}),e.jsx("span",{className:ae.range__separator,"aria-hidden":!0,children:"—"}),e.jsx("span",{className:ae.range__value,children:c(w)})]}),e.jsxs("div",{className:ae.range__track,children:[e.jsx("span",{className:ae.range__fill,style:{left:`${K}%`,right:`${100-W}%`},"aria-hidden":!0}),e.jsx("input",{type:"range",className:ae.range__input,style:{zIndex:S?4:3},min:a,max:n,step:t,value:x,disabled:p,"aria-label":`${l} — ${k}`,"aria-valuetext":c(x),onChange:B=>y(Number(B.target.value)),onPointerUp:R,onKeyUp:R}),e.jsx("input",{type:"range",className:ae.range__input,style:{zIndex:S?3:4},min:a,max:n,step:t,value:w,disabled:p,"aria-label":`${l} — ${b}`,"aria-valuetext":c(w),onChange:B=>$(Number(B.target.value)),onPointerUp:R,onKeyUp:R})]}),e.jsxs("div",{className:ae.range__bounds,"aria-hidden":!0,children:[e.jsx("span",{children:c(a)}),e.jsx("span",{children:c(n)})]})]})},Qt=s.memo(Jt),Vt="hanui-rating-neNnF",Wt="hanui-rating__legend-uYvFS",eo="hanui-rating__stars-vJFLk",ao="hanui-rating__star-BANFJ",no="hanui-rating__input-s2iiO",to="hanui-rating__srOnly-iSCoz",oo="hanui-rating__caption-13KFX",de={rating:Vt,"rating--disabled":"hanui-rating--disabled-ZKjHa",rating__legend:Wt,rating__stars:eo,rating__star:ao,"rating__star--filled":"hanui-rating__star--filled-L3AkT",rating__input:no,rating__srOnly:to,rating__caption:oo},so=[1,2,3,4,5],ro=({value:a,onChange:n,label:t,ratingLabels:o,formatStarCount:i,isDisabled:r,className:c,testId:l})=>{var k;const{labels:d}=A(),u=o??((k=d==null?void 0:d.rating)==null?void 0:k.scale),p=s.useId(),[g,h]=s.useState(null),m=g??a;return e.jsxs("fieldset",{className:_(de.rating,r&&de["rating--disabled"],c),disabled:r,"data-testid":l,children:[e.jsx("legend",{className:de.rating__legend,children:t}),e.jsx("div",{className:de.rating__stars,onMouseLeave:()=>h(null),children:so.map(b=>{var x;return e.jsxs("label",{className:_(de.rating__star,m!==null&&b<=m&&de["rating__star--filled"]),onMouseEnter:()=>h(b),children:[e.jsx("input",{type:"radio",name:p,value:b,checked:a===b,onChange:()=>n(b),className:de.rating__input}),e.jsx(D.StarFill,{"aria-hidden":!0}),e.jsxs("span",{className:de.rating__srOnly,children:[Ae("RatingInput.formatStarCount",i??((x=d==null?void 0:d.rating)==null?void 0:x.starCount),b)," ","— ",(u==null?void 0:u[b])??""]})]},b)})}),m!==null&&e.jsx("span",{className:de.rating__caption,"aria-hidden":!0,children:(u==null?void 0:u[m])??""})]})},io=s.memo(ro),co="hanui-stepper-8s5Ih",lo="hanui-stepper__button-h6g7d",_o="hanui-stepper__input-OQh5v",Ke={stepper:co,stepper__button:lo,stepper__input:_o,"stepper--sm":"hanui-stepper--sm-RvrBP","stepper--md":"hanui-stepper--md-Cnjei"},uo=({value:a,onChange:n,label:t,decreaseLabel:o,increaseLabel:i,min:r=1,max:c=99,isDisabled:l,size:d="md",className:u,testId:p})=>{var x,w,y;const{labels:g}=A(),h=E("QuantityStepper.label",t,(x=g==null?void 0:g.quantity)==null?void 0:x.label),[m,k]=s.useState(null),b=$=>{k(null);const R=Number($.replace(/\D/g,""));R&&n(Math.min(Math.max(R,r),c))};return e.jsxs("div",{className:_(Ke.stepper,Ke[`stepper--${d}`],u),role:"group","aria-label":h,"data-testid":p,children:[e.jsx("button",{type:"button",className:Ke.stepper__button,onClick:()=>n(Math.max(a-1,r)),disabled:l||a<=r,"aria-label":E("QuantityStepper.decreaseLabel",o,(w=g==null?void 0:g.quantity)==null?void 0:w.decrease),children:e.jsx(D.DashLg,{"aria-hidden":!0})}),e.jsx("input",{className:Ke.stepper__input,value:m??String(a),onChange:$=>k($.target.value.replace(/\D/g,"").slice(0,2)),onBlur:$=>b($.target.value),onKeyDown:$=>{$.key==="Enter"&&($.preventDefault(),b($.target.value))},inputMode:"numeric",disabled:l,"aria-label":`${h} (${r}-${c})`}),e.jsx("button",{type:"button",className:Ke.stepper__button,onClick:()=>n(Math.min(a+1,c)),disabled:l||a>=c,"aria-label":E("QuantityStepper.increaseLabel",i,(y=g==null?void 0:g.quantity)==null?void 0:y.increase),children:e.jsx(D.PlusLg,{"aria-hidden":!0})})]})},ho=s.memo(uo),mo="hanui-checkbox--dvpB",po={checkbox:mo},Ma=s.forwardRef(({label:a,className:n,testId:t,...o},i)=>e.jsx("input",{ref:i,type:"checkbox","aria-label":a,className:_(po.checkbox,n),"data-testid":t,...o}));Ma.displayName="TableCheckbox";const bo=s.memo(Ma),go="hanui-wrapper-IAI4E",xo="hanui-wrapper__prefix-XKDlV",fo="hanui-wrapper__suffix-lT35q",yo="hanui-input-pIS2u",fe={wrapper:go,wrapper__prefix:xo,wrapper__suffix:fo,input:yo,"input--hasPrefix":"hanui-input--hasPrefix-nsrWh","input--hasSuffix":"hanui-input--hasSuffix-OrE5A","input--technical":"hanui-input--technical---DCD"},Oa=s.forwardRef(({prefix:a,suffix:n,isTechnical:t,className:o,testId:i,...r},c)=>e.jsxs("span",{className:_(fe.wrapper,o),children:[a&&e.jsx("span",{className:fe.wrapper__prefix,"aria-hidden":!0,children:a}),e.jsx("input",{ref:c,className:_(fe.input,!!a&&fe["input--hasPrefix"],!!n&&fe["input--hasSuffix"],t&&fe["input--technical"]),"data-testid":i,...r}),n&&e.jsx("span",{className:fe.wrapper__suffix,"aria-hidden":!0,children:n})]}));Oa.displayName="Input";const Pa=s.memo(Oa),vo="hanui-textarea-zwJcB",ko={textarea:vo},Ha=s.forwardRef(({className:a,rows:n=4,testId:t,...o},i)=>e.jsx("textarea",{ref:i,rows:n,className:_(ko.textarea,a),"data-testid":t,...o}));Ha.displayName="Textarea";const Ka=s.memo(Ha),No="hanui-field-KKvre",jo="hanui-field__label-9dlYd",wo="hanui-field__required-hbDJk",$o="hanui-field__srOnly-2WQFH",Co="hanui-field__hint-SQPiL",Do="hanui-field__error-gLlZ-",Eo="hanui-field__errorIcon-uA3o8",pe={field:No,field__label:jo,"field__label--hidden":"hanui-field__label--hidden-ufuVt",field__required:wo,field__srOnly:$o,field__hint:Co,field__error:Do,field__errorIcon:Eo},Ro=({label:a,children:n,hint:t,error:o,isRequired:i,requiredLabel:r,isLabelHidden:c,className:l})=>{const{labels:d}=A(),u=s.useId(),p=`${u}-error`,g=`${u}-hint`;return e.jsxs("div",{className:_(pe.field,l),children:[e.jsxs("label",{htmlFor:u,className:_(pe.field__label,c&&pe["field__label--hidden"]),children:[a,i&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:pe.field__required,"aria-hidden":!0,children:"*"}),e.jsx("span",{className:pe.field__srOnly,children:E("Field.requiredLabel",r,d==null?void 0:d.required)})]})]}),n({id:u,required:i||void 0,"aria-invalid":o?!0:void 0,"aria-describedby":o?p:t?g:void 0}),o?e.jsxs("p",{id:p,className:pe.field__error,role:"alert",children:[e.jsx(D.ExclamationCircleFill,{"aria-hidden":!0,className:pe.field__errorIcon}),o]}):t&&e.jsx("p",{id:g,className:pe.field__hint,children:t})]})},za=s.memo(Ro),Io="hanui-alert-gHI-9",Lo="hanui-alert__icon-DhiCT",To="hanui-alert__body-52-z2",Bo="hanui-alert__title-I8BAh",So="hanui-alert__content-lhBEo",Ao="hanui-alert__action-1mTje",ye={alert:Io,alert__icon:Lo,alert__body:To,alert__title:Bo,alert__content:So,alert__action:Ao,"alert--info":"hanui-alert--info-lsAVw","alert--success":"hanui-alert--success-RMJR6","alert--warning":"hanui-alert--warning-Rkgln","alert--danger":"hanui-alert--danger-9ei0Y"},Fo={info:e.jsx(D.InfoCircleFill,{"aria-hidden":!0}),success:e.jsx(D.CheckCircleFill,{"aria-hidden":!0}),warning:e.jsx(D.ExclamationTriangleFill,{"aria-hidden":!0}),danger:e.jsx(D.XCircleFill,{"aria-hidden":!0})},Mo=({children:a,tone:n="info",title:t,action:o,className:i,testId:r})=>e.jsxs("div",{className:_(ye.alert,ye[`alert--${n}`],i),role:n==="danger"||n==="warning"?"alert":void 0,"data-testid":r,children:[e.jsx("span",{className:ye.alert__icon,children:Fo[n]}),e.jsxs("div",{className:ye.alert__body,children:[t&&e.jsx("strong",{className:ye.alert__title,children:t}),e.jsx("div",{className:ye.alert__content,children:a})]}),o&&e.jsx("div",{className:ye.alert__action,children:o})]}),Oo=s.memo(Mo),Po="hanui-avatar-qoh3P",Ho="hanui-avatar__image-uAyAX",ta={avatar:Po,avatar__image:Ho,"avatar--sm":"hanui-avatar--sm-GGjU4","avatar--md":"hanui-avatar--md-xhXnK","avatar--lg":"hanui-avatar--lg-ULP-r"},Ko=(a,n)=>{const t=a.trim().split(/\s+/).filter(Boolean);if(t.length===0)return"?";const o=t.length===1?t[0].slice(0,2):`${t[0][0]}${t[t.length-1][0]}`;return n?o.toLocaleUpperCase(n):o.toLocaleUpperCase()},zo=({name:a,imageUrl:n,locale:t,size:o="md",className:i,testId:r})=>{const{labels:c}=A();return e.jsx("span",{className:_(ta.avatar,ta[`avatar--${o}`],i),"aria-hidden":!0,"data-testid":r,children:n?e.jsx("img",{className:ta.avatar__image,src:n,alt:""}):Ko(a,t??(c==null?void 0:c.locale))})},qo=s.memo(zo),Uo="hanui-badge-uLAaI",Go="hanui-badge__icon-R2goZ",Je={badge:Uo,badge__icon:Go,"badge--neutral":"hanui-badge--neutral-6kddt","badge--soft":"hanui-badge--soft-gFeRF","badge--solid":"hanui-badge--solid-rtdHI","badge--outline":"hanui-badge--outline-QiAAz","badge--success":"hanui-badge--success-Oj11F","badge--danger":"hanui-badge--danger-X3nV0","badge--warning":"hanui-badge--warning-vAsx2","badge--info":"hanui-badge--info-mHOwk","badge--oem":"hanui-badge--oem-Nl-VX","badge--alt":"hanui-badge--alt-gQkww","badge--sale":"hanui-badge--sale-Li1tG","badge--action":"hanui-badge--action-7pUio","badge--link":"hanui-badge--link-zcNJZ"},Xo=({children:a,tone:n="neutral",variant:t="soft",icon:o,className:i,testId:r})=>e.jsxs("span",{className:_(Je.badge,Je[`badge--${n}`],Je[`badge--${t}`],i),"data-testid":r,children:[o&&e.jsx("span",{className:Je.badge__icon,children:o}),a]}),Yo=s.memo(Xo),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={breadcrumb:Zo,breadcrumb__item:Jo,breadcrumb__link:Qo,breadcrumb__current:Vo,breadcrumb__separator:Wo},es=({items:a,label:n,linkProps:t,className:o,testId:i})=>{const{labels:r}=A();return e.jsx("nav",{className:o,"aria-label":E("Breadcrumb.label",n,r==null?void 0:r.breadcrumb),"data-testid":i,children:e.jsx("ol",{className:_(ze.breadcrumb),children:a.map((c,l)=>{const d=l===a.length-1;return e.jsxs("li",{className:ze.breadcrumb__item,children:[c.href&&!d?e.jsx(se,{href:c.href,className:ze.breadcrumb__link,...t,children:c.label}):e.jsx("span",{className:ze.breadcrumb__current,"aria-current":"page",children:c.label}),!d&&e.jsx(D.CaretRightFill,{"aria-hidden":!0,className:ze.breadcrumb__separator})]},`${c.label}-${l}`)})})})},as=s.memo(es),ns="hanui-card-CaHUG",ts="hanui-media__frame-eBv-s",os="hanui-media-eggk5",ss="hanui-media__link-ujyVV",rs="hanui-overlay-AVMTX",is="hanui-body-DyI-6",cs="hanui-footer-2WNCZ",te={card:ns,"card--interactive":"hanui-card--interactive-C1pXZ",media__frame:ts,media:os,media__link:ss,"media__frame--contained":"hanui-media__frame--contained-Nv9gh",overlay:rs,"overlay--top-left":"hanui-overlay--top-left-td1xA","overlay--top-right":"hanui-overlay--top-right-GqD9H","overlay--bottom-left":"hanui-overlay--bottom-left-T5Quw","overlay--bottom-right":"hanui-overlay--bottom-right-za3z3",body:is,footer:cs},ls=({children:a,isInteractive:n,as:t="div",className:o,testId:i})=>e.jsx(t,{className:_(te.card,n&&te["card--interactive"],o),"data-testid":i,children:a}),qa=s.memo(({children:a,ratio:n=1,href:t,linkProps:o,isContained:i=!0,className:r})=>{const c=e.jsx("span",{className:_(te.media__frame,i&&te["media__frame--contained"]),style:{aspectRatio:n},children:a});return e.jsx("div",{className:_(te.media,r),children:t?e.jsx(se,{href:t,className:te.media__link,tabIndex:-1,"aria-hidden":!0,...o,children:c}):c})});qa.displayName="CardMedia";const Ua=s.memo(({children:a,position:n="top-left",className:t})=>e.jsx("div",{className:_(te.overlay,te[`overlay--${n}`],t),children:a}));Ua.displayName="CardOverlay";const Ga=s.memo(({children:a,className:n})=>e.jsx("div",{className:_(te.body,n),children:a}));Ga.displayName="CardBody";const Xa=s.memo(({children:a,className:n})=>e.jsx("div",{className:_(te.footer,n),children:a}));Xa.displayName="CardFooter";const ds=s.memo(ls),_s="hanui-copy-Yht5s",us="hanui-copy__code-CYlCA",hs="hanui-copy__button-GDdH6",ms="hanui-copy__srOnly-WMTNN",Le={copy:_s,"copy--sm":"hanui-copy--sm-Tjqws",copy__code:us,"copy--md":"hanui-copy--md-00rhU",copy__button:hs,"copy__button--done":"hanui-copy__button--done-MujUR",copy__srOnly:ms},ps=1600,bs=({value:a,copyLabel:n,copiedLabel:t,copiedAnnouncement:o,size:i="sm",isReadOnly:r,className:c,testId:l})=>{var b,x,w,y,$;const{labels:d}=A(),[u,p]=s.useState(!1),g=s.useRef(null),h=s.useRef(void 0);s.useEffect(()=>()=>window.clearTimeout(h.current),[]);const m=s.useCallback(()=>{const R=g.current;if(!R)return;const F=document.createRange();F.selectNodeContents(R);const K=window.getSelection();K==null||K.removeAllRanges(),K==null||K.addRange(F)},[]),k=s.useCallback(async()=>{try{await navigator.clipboard.writeText(a),p(!0),h.current=window.setTimeout(()=>p(!1),ps)}catch{m()}},[a,m]);return e.jsxs("span",{className:_(Le.copy,Le[`copy--${i}`],c),"data-testid":l,children:[e.jsx("span",{className:Le.copy__code,ref:g,children:a}),!r&&e.jsx("button",{type:"button",className:_(Le.copy__button,u&&Le["copy__button--done"]),onClick:k,"aria-label":u?t??Ae("CopyField.copiedLabel",(b=d==null?void 0:d.copyField)==null?void 0:b.copied,a):n??Ae("CopyField.copyLabel",(x=d==null?void 0:d.copyField)==null?void 0:x.copy,a),title:u?t??Ae("CopyField.copiedLabel",(w=d==null?void 0:d.copyField)==null?void 0:w.copied,a):n??Ae("CopyField.copyLabel",(y=d==null?void 0:d.copyField)==null?void 0:y.copy,a),children:u?e.jsx(D.ClipboardCheckFill,{"aria-hidden":!0}):e.jsx(D.ClipboardFill,{"aria-hidden":!0})}),e.jsx("span",{"aria-live":"polite",className:Le.copy__srOnly,children:u?E("CopyField.copiedAnnouncement",o,($=d==null?void 0:d.copyField)==null?void 0:$.announcement):""})]})},gs=s.memo(bs),xs="hanui-divider-RJqCw",fs="hanui-divider__label-M8sBA",Qe={divider:xs,"divider--labelled":"hanui-divider--labelled-jZH1-",divider__label:fs},ys=({label:a,className:n})=>a?e.jsx("div",{className:_(Qe.divider,Qe["divider--labelled"],n),children:e.jsx("span",{className:Qe.divider__label,children:a})}):e.jsx("hr",{className:_(Qe.divider,n)}),vs=s.memo(ys),ks="hanui-directory-badEd",Ns="hanui-group-i6An9",js="hanui-group__header-rc19c",ws="hanui-group__label-vQTcs",$s="hanui-group__link-es5V7",Cs="hanui-group__meta-LtC-u",Ds="hanui-group__list-YxBCG",Es="hanui-row-3LH7X",Rs="hanui-row__name-75Wbq",Is="hanui-row__media-AxZEh",Ls="hanui-row__marker-RYHb-",Ts="hanui-jump-vpGwB",Bs="hanui-jump__link-rRnT6",Z={directory:ks,group:Ns,group__header:js,group__label:ws,group__link:$s,group__meta:Cs,group__list:Ds,row:Es,row__name:Rs,row__media:Is,row__marker:Ls,jump:Ts,jump__link:Bs},Ss=({children:a,className:n})=>e.jsx("div",{className:_(Z.directory,n),children:a}),Ya=s.memo(({label:a,href:n,linkProps:t,meta:o,children:i,id:r})=>e.jsxs("section",{className:Z.group,id:r,children:[e.jsxs("header",{className:Z.group__header,children:[e.jsx("h2",{className:Z.group__label,children:n?e.jsx(se,{href:n,className:Z.group__link,...t,children:a}):a}),o&&e.jsx("span",{className:Z.group__meta,children:o})]}),e.jsx("ul",{className:Z.group__list,children:i})]}));Ya.displayName="DirectoryGroup";const Za=s.memo(({href:a,name:n,media:t,marker:o,linkProps:i,className:r})=>e.jsx("li",{children:e.jsxs(se,{href:a,className:_(Z.row,r),...i,children:[t&&e.jsx("span",{className:Z.row__media,children:t}),e.jsx("span",{className:Z.row__name,children:n}),o&&e.jsx("span",{className:Z.row__marker,children:o})]})}));Za.displayName="DirectoryRow";const Ja=s.memo(({labels:a,toId:n,label:t})=>{const{labels:o}=A();return e.jsx("nav",{className:Z.jump,"aria-label":E("DirectoryJump.label",t,o==null?void 0:o.directoryJump),children:a.map(i=>e.jsx("a",{href:`#${n(i)}`,className:Z.jump__link,children:i},i))})});Ja.displayName="DirectoryJump";const As=s.memo(Ss),Fs="hanui-empty-47qZR",Ms="hanui-empty__icon-okfEc",Os="hanui-empty__title-Z7Dzd",Ps="hanui-empty__description-6BoCk",Hs="hanui-empty__actions-ARk-k",Te={empty:Fs,empty__icon:Ms,empty__title:Os,empty__description:Ps,empty__actions:Hs,"empty--sm":"hanui-empty--sm-QXaXx"},Ks=({title:a,description:n,icon:t,action:o,secondaryAction:i,size:r="md",className:c,testId:l})=>e.jsxs("div",{className:_(Te.empty,Te[`empty--${r}`],c),"data-testid":l,children:[t&&e.jsx("span",{className:Te.empty__icon,children:t}),e.jsx("h3",{className:Te.empty__title,children:a}),n&&e.jsx("p",{className:Te.empty__description,children:n}),(o||i)&&e.jsxs("div",{className:Te.empty__actions,children:[o,i]})]}),zs=s.memo(Ks),qs="hanui-header-yJwus",Us="hanui-header__top-UK4si",Gs="hanui-header__text-HIo8U",Xs="hanui-header__eyebrow-dZ9Zc",Ys="hanui-header__titleRow-KgDZj",Zs="hanui-header__title-s1giF",Js="hanui-header__meta-UxuaD",Qs="hanui-header__description-NXbbC",Vs="hanui-header__actions-aShpt",_e={header:qs,header__top:Us,header__text:Gs,header__eyebrow:Xs,header__titleRow:Ys,header__title:Zs,header__meta:Js,header__description:Qs,header__actions:Vs},Ws=({title:a,eyebrow:n,description:t,actions:o,breadcrumb:i,meta:r,children:c,as:l="h1",className:d,testId:u})=>e.jsxs("header",{className:_(_e.header,d),"data-testid":u,children:[i,e.jsxs("div",{className:_e.header__top,children:[e.jsxs("div",{className:_e.header__text,children:[n&&e.jsx("span",{className:_e.header__eyebrow,children:n}),e.jsxs("div",{className:_e.header__titleRow,children:[e.jsx(l,{className:_e.header__title,children:a}),r&&e.jsx("span",{className:_e.header__meta,children:r})]}),t&&e.jsx("p",{className:_e.header__description,children:t})]}),o&&e.jsx("div",{className:_e.header__actions,children:o})]}),c]}),er=s.memo(Ws),ar="hanui-panel-Sv-1m",nr="hanui-panel__header-ysexh",tr="hanui-panel__heading-xLCsB",or="hanui-panel__icon--yPQT",sr="hanui-panel__headingText--XqxW",rr="hanui-panel__title-6-6uC",ir="hanui-panel__description-qXTSM",cr="hanui-panel__actions-Ra-zy",lr="hanui-panel__body-lo5aX",dr="hanui-panel__footer-qLpR1",_r="hanui-form-o9UqJ",ur="hanui-row-vUGpa",X={panel:ar,panel__header:nr,panel__heading:tr,panel__icon:or,panel__headingText:sr,panel__title:rr,panel__description:ir,panel__actions:cr,panel__body:lr,"panel__body--sm":"hanui-panel__body--sm-6XP6W","panel__body--lg":"hanui-panel__body--lg-RTK5B","panel__body--flush":"hanui-panel__body--flush-iK75R",panel__footer:dr,form:_r,"form--2":"hanui-form--2-HdwDc",row:ur},hr=({children:a,title:n,description:t,actions:o,icon:i,isFlush:r,gap:c="md",footer:l,as:d="section",className:u,bodyClassName:p,testId:g})=>e.jsxs(d,{className:_(X.panel,u),"data-testid":g,children:[(n||o)&&e.jsxs("div",{className:X.panel__header,children:[e.jsxs("div",{className:X.panel__heading,children:[i&&e.jsx("span",{className:X.panel__icon,children:i}),e.jsxs("div",{className:X.panel__headingText,children:[n&&e.jsx("h2",{className:X.panel__title,children:n}),t&&e.jsx("p",{className:X.panel__description,children:t})]})]}),o&&e.jsx("div",{className:X.panel__actions,children:o})]}),e.jsx("div",{className:_(X.panel__body,X[`panel__body--${c}`],r&&X["panel__body--flush"],p),children:a}),l&&e.jsx("div",{className:X.panel__footer,children:l})]}),Qa=s.memo(({children:a,columns:n=1,className:t})=>e.jsx("div",{className:_(X.form,X[`form--${n}`],t),children:a}));Qa.displayName="PanelForm";const Va=s.memo(({children:a,className:n})=>e.jsx("div",{className:_(X.row,n),children:a}));Va.displayName="PanelRow";const mr=s.memo(hr),pr="hanui-price-Oc5Nr",br="hanui-price__current-2Xup2",gr="hanui-price__currency-32NLN",xr="hanui-price__list-MlQgT",fr="hanui-price__discount-5Yc6W",ve={price:pr,price__current:br,price__currency:gr,price__list:xr,price__discount:fr,"price--sm":"hanui-price--sm-Hd8Oe","price--md":"hanui-price--md-JMxlK","price--lg":"hanui-price--lg-TFqIF","price--xl":"hanui-price--xl-EJBYq"},yr=({value:a,currency:n,listValue:t,discountPercent:o,formatDiscount:i=d=>`%${d}`,size:r="md",className:c,testId:l})=>{const{labels:d}=A(),u=E("Price.currency",n,d==null?void 0:d.currency);return e.jsxs("span",{className:_(ve.price,ve[`price--${r}`],c),"data-testid":l,children:[e.jsxs("span",{className:ve.price__current,children:[a,e.jsx("span",{className:ve.price__currency,children:u})]}),t&&e.jsxs("s",{className:ve.price__list,children:[t,e.jsx("span",{className:ve.price__currency,children:u})]}),o!==void 0&&o>0&&e.jsx("span",{className:ve.price__discount,children:i(o)})]})},vr=s.memo(yr),kr="hanui-rating-94dke",Nr="hanui-rating__stars-QkpVU",jr="hanui-rating__empty-Wf6-K",wr="hanui-rating__count-pIoEs",$r="hanui-rating__srOnly-E9h0d",Be={rating:kr,rating__stars:Nr,rating__empty:jr,rating__count:wr,rating__srOnly:$r,"rating--sm":"hanui-rating--sm-AtY7U","rating--md":"hanui-rating--md-Q0nxN"},Cr=({value:a,count:n,srLabel:t,size:o="sm",className:i,testId:r})=>{var d;const{labels:c}=A(),l=Math.round(a*2)/2;return e.jsxs("span",{className:_(Be.rating,Be[`rating--${o}`],i),"data-testid":r,children:[e.jsx("span",{className:Be.rating__stars,"aria-hidden":!0,children:Array.from({length:5},(u,p)=>{const g=p+1;return l>=g?e.jsx(D.StarFill,{},p):l>=g-.5?e.jsx(D.StarHalf,{},p):e.jsx(D.StarFill,{className:Be.rating__empty},p)})}),e.jsx("span",{className:Be.rating__srOnly,children:t??Ae("Rating.srLabel",(d=c==null?void 0:c.rating)==null?void 0:d.srLabel,a,n)}),q.isDefined(n)&&e.jsxs("span",{className:Be.rating__count,"aria-hidden":!0,children:["(",n,")"]})]})},Dr=s.memo(Cr),Er="hanui-header-a08Jh",Rr="hanui-header__text-ArJkA",Ir="hanui-header__overline-X5Epo",Lr="hanui-header__title-nQQQJ",Tr="hanui-header__description-08oCr",Br="hanui-header__action-xsxQF",ke={header:Er,header__text:Rr,header__overline:Ir,header__title:Lr,header__description:Tr,header__action:Br,"header--sm":"hanui-header--sm-mIJWZ","header--lg":"hanui-header--lg-QBLIz"},Sr=({title:a,description:n,overline:t,action:o,as:i="h2",size:r="md",className:c,testId:l})=>e.jsxs("header",{className:_(ke.header,ke[`header--${r}`],c),"data-testid":l,children:[e.jsxs("div",{className:ke.header__text,children:[t&&e.jsx("span",{className:ke.header__overline,children:t}),e.jsx(i,{className:ke.header__title,children:a}),n&&e.jsx("p",{className:ke.header__description,children:n})]}),o&&e.jsx("div",{className:ke.header__action,children:o})]}),Ar=s.memo(Sr),Fr="hanui-skeleton-n92if",Mr="hanui-group-YMfwa",qe={skeleton:Fr,"hanui-shimmer":"hanui-hanui-shimmer-6yd48","skeleton--block":"hanui-skeleton--block-tOZ-a","skeleton--text":"hanui-skeleton--text-k-ROi","skeleton--circle":"hanui-skeleton--circle-x-mX3",group:Mr},Or=({width:a,height:n,variant:t="block",lines:o=1,className:i})=>{const r={width:q.isNumber(a)?`${a}px`:a,height:q.isNumber(n)?`${n}px`:n};return t==="text"&&o>1?e.jsx("span",{className:_(qe.group,i),"aria-hidden":!0,children:Array.from({length:o},(c,l)=>e.jsx("span",{className:_(qe.skeleton,qe["skeleton--text"]),style:l===o-1?{width:"60%"}:void 0},l))}):e.jsx("span",{className:_(qe.skeleton,qe[`skeleton--${t}`],i),style:r,"aria-hidden":!0})},Pr=s.memo(Or),Hr="hanui-tabs-l4dFE",Kr="hanui-tabs__list-HJvR8",zr="hanui-tabs__tab-7gDW7",qr="hanui-tabs__count-8JX8s",Ur="hanui-tabs__panel-CPklY",Se={tabs:Hr,tabs__list:Kr,tabs__tab:zr,"tabs__tab--active":"hanui-tabs__tab--active-riqNp",tabs__count:qr,tabs__panel:Ur},Gr=({items:a,defaultTabId:n,activeId:t,onChange:o,ariaLabel:i,className:r,testId:c})=>{var w;const l=s.useId(),[d,u]=s.useState(n??((w=a[0])==null?void 0:w.id)),p=q.isDefined(t),g=p?t:d,h=a.findIndex(y=>y.id===g),m=a[h]??a[0],k=y=>{p||u(y),o==null||o(y)},b=y=>{var F;const $=y.key==="ArrowRight"?1:y.key==="ArrowLeft"?-1:0;if($===0)return;y.preventDefault();const R=(h+$+a.length)%a.length;k(a[R].id),(F=document.getElementById(`${l}-tab-${a[R].id}`))==null||F.focus()};if(a.length===0)return null;const x=q.isDefined(m==null?void 0:m.content);return e.jsxs("div",{className:_(Se.tabs,r),"data-testid":c,children:[e.jsx("div",{className:Se.tabs__list,role:"tablist","aria-label":i,onKeyDown:b,children:a.map(y=>{const $=y.id===m.id;return e.jsxs("button",{id:`${l}-tab-${y.id}`,type:"button",role:"tab","aria-selected":$,"aria-controls":x?`${l}-panel-${y.id}`:void 0,tabIndex:$?0:-1,className:_(Se.tabs__tab,$&&Se["tabs__tab--active"]),onClick:()=>k(y.id),children:[y.label,q.isDefined(y.count)&&e.jsx("span",{className:Se.tabs__count,children:y.count})]},y.id)})}),x&&e.jsx("div",{id:`${l}-panel-${m.id}`,role:"tabpanel","aria-labelledby":`${l}-tab-${m.id}`,className:Se.tabs__panel,tabIndex:0,children:m.content})]})},Xr=s.memo(Gr),Yr="hanui-tile-TGur-",Zr="hanui-tile__medallion--Y0pz",Jr="hanui-tile__label-mI1OQ",Qr="hanui-tile__meta-22qnR",Ue={tile:Yr,tile__medallion:Zr,tile__label:Jr,tile__meta:Qr,"tile--active":"hanui-tile--active-z0F2M"},Vr=({label:a,icon:n,href:t,meta:o,isActive:i,linkProps:r,className:c,testId:l})=>e.jsxs(se,{href:t,className:_(Ue.tile,i&&Ue["tile--active"],c),"aria-current":i?"page":void 0,"data-testid":l,...r,children:[e.jsx("span",{className:Ue.tile__medallion,"aria-hidden":!0,children:n}),e.jsx("span",{className:Ue.tile__label,children:a}),o&&e.jsx("span",{className:Ue.tile__meta,children:o})]}),Wr=s.memo(Vr),ei="hanui-modal-3IDi9",ai="hanui-modal__panel--qLSz",ni="hanui-modal__header-meWm6",ti="hanui-modal__icon-df2dd",oi="hanui-modal__heading-PwDS8",si="hanui-modal__title-80Sh6",ri="hanui-modal__description-fsCHI",ii="hanui-modal__close-vFPbw",ci="hanui-modal__body-PDF12",li="hanui-modal__footer-CCCkx",Q={modal:ei,"modal--sm":"hanui-modal--sm-A7WsS","modal--lg":"hanui-modal--lg-z99Em","hanui-fade-in":"hanui-hanui-fade-in-oHUfh","hanui-fade-in-up":"hanui-hanui-fade-in-up-RF4Hl","hanui-slide-up":"hanui-hanui-slide-up-ibKAg",modal__panel:ai,modal__header:ni,modal__icon:ti,"modal__icon--neutral":"hanui-modal__icon--neutral-QSL7c","modal__icon--danger":"hanui-modal__icon--danger-6V90a","modal__icon--warning":"hanui-modal__icon--warning-a--FX","modal__icon--success":"hanui-modal__icon--success-YWxZs","modal__icon--info":"hanui-modal__icon--info-WRLah",modal__heading:oi,modal__title:si,modal__description:ri,modal__close:ii,modal__body:ci,modal__footer:li},di=({isOpen:a,onClose:n,title:t,closeLabel:o,children:i,description:r,footer:c,icon:l,tone:d="neutral",size:u="md",isDismissable:p=!0,className:g,testId:h})=>{const{labels:m}=A(),k=s.useRef(null),b=s.useId(),x=s.useId();s.useEffect(()=>{const y=k.current;y&&(a&&!y.open&&(y.showModal(),ra(y)),!a&&y.open&&y.close())},[a]),s.useEffect(()=>{if(!a)return;const y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=y}},[a]),s.useEffect(()=>{const y=k.current;if(!y)return;const $=R=>{R.preventDefault(),p&&n()};return y.addEventListener("cancel",$),()=>y.removeEventListener("cancel",$)},[n,p]);const w=s.useCallback(y=>{p&&y.target===k.current&&n()},[p,n]);return e.jsx("dialog",{ref:k,className:_(Q.modal,Q[`modal--${u}`],g),"aria-labelledby":b,"aria-describedby":r?x:void 0,"data-testid":h,onClick:w,children:e.jsxs("div",{className:Q.modal__panel,children:[e.jsxs("header",{className:Q.modal__header,children:[l&&e.jsx("span",{className:_(Q.modal__icon,Q[`modal__icon--${d}`]),children:l}),e.jsxs("div",{className:Q.modal__heading,children:[e.jsx("h2",{id:b,className:Q.modal__title,children:t}),r&&e.jsx("p",{id:x,className:Q.modal__description,children:r})]}),p&&e.jsx(Xe,{icon:e.jsx(D.XLg,{"aria-hidden":!0}),label:E("Modal.closeLabel",o,m==null?void 0:m.close),variant:"ghost",size:"sm",className:Q.modal__close,onClick:n})]}),i&&e.jsx("div",{className:Q.modal__body,children:i}),c&&e.jsx("footer",{className:Q.modal__footer,children:c})]})})},la=s.memo(di),_i={destructive:e.jsx(D.TrashFill,{"aria-hidden":!0}),warning:e.jsx(D.ExclamationTriangleFill,{"aria-hidden":!0}),neutral:e.jsx(D.QuestionCircleFill,{"aria-hidden":!0})},ui={destructive:"danger",warning:"warning",neutral:"info"},hi={destructive:oe.DANGER,warning:oe.PRIMARY,neutral:oe.PRIMARY},mi=({isOpen:a,onClose:n,onConfirm:t,title:o,description:i,confirmLabel:r,cancelLabel:c,closeLabel:l,kind:d="neutral",children:u})=>{const{labels:p}=A(),[g,h]=s.useState(!1),m=async()=>{h(!0);try{await t()}finally{h(!1)}};return e.jsx(la,{isOpen:a,onClose:n,title:o,closeLabel:l??(p==null?void 0:p.close),description:i,icon:_i[d],tone:ui[d],size:"sm",isDismissable:!g,footer:e.jsxs(e.Fragment,{children:[e.jsx(Oe,{variant:oe.SECONDARY,size:ge.MEDIUM,onClick:n,disabled:g,children:E("ConfirmDialog.cancelLabel",c,p==null?void 0:p.cancel)}),e.jsx(Oe,{variant:hi[d],size:ge.MEDIUM,onClick:m,isLoading:g,children:r})]}),children:u})},pi=s.memo(mi),bi="hanui-form-zpZn4",gi={form:bi},xi=({isOpen:a,onClose:n,onSubmit:t,title:o,label:i,submitLabel:r,cancelLabel:c,closeLabel:l,description:d,hint:u,placeholder:p,defaultValue:g="",isRequired:h,requiredLabel:m,inputMode:k="text",maxLength:b,rows:x=4})=>{const{labels:w}=A(),y=s.useId(),[$,R]=s.useState(g),[F,K]=s.useState(!1),W=s.useRef(!1);s.useEffect(()=>{a&&!W.current&&R(g),W.current=a},[a,g]);const S=$.trim(),ee=!!h&&S==="",I=M=>k==="multiline"?e.jsx(Ka,{...M,value:$,onChange:U=>R(U.target.value),placeholder:p,maxLength:b,rows:x}):e.jsx(Pa,{...M,type:k==="number"?"number":"text",value:$,onChange:U=>R(U.target.value),placeholder:p,maxLength:b}),B=async()=>{if(!(ee||F)){K(!0);try{await t(S),n()}catch{}finally{K(!1)}}};return e.jsx(la,{isOpen:a,onClose:n,title:o,closeLabel:l??(w==null?void 0:w.close),description:d,size:"sm",isDismissable:!F,footer:e.jsxs(e.Fragment,{children:[e.jsx(Oe,{variant:oe.SECONDARY,size:ge.MEDIUM,onClick:n,disabled:F,children:E("PromptDialog.cancelLabel",c,w==null?void 0:w.cancel)}),e.jsx(Oe,{type:"submit",form:y,variant:oe.PRIMARY,size:ge.MEDIUM,disabled:ee,isLoading:F,children:E("PromptDialog.submitLabel",r,w==null?void 0:w.submit)})]}),children:e.jsx("form",{id:y,className:gi.form,onSubmit:M=>{M.preventDefault(),B()},children:e.jsx(za,{label:i,hint:u,isRequired:h,requiredLabel:m,children:I})})})},fi=s.memo(xi),yi="hanui-scroller-EtDmS",vi="hanui-table-uCv4q",Fe={scroller:yi,"scroller--frame":"hanui-scroller--frame-84zz6",table:vi,"table--compact":"hanui-table--compact-4KCVl","table--regular":"hanui-table--regular-hsA3-","table--spacious":"hanui-table--spacious-BBUX-","table--sticky-head":"hanui-table--sticky-head-FO2L4","table--row-hover":"hanui-table--row-hover--MAoe"},Wa=s.memo(({hasFrame:a=!0,className:n,children:t,...o})=>e.jsx("div",{className:_(Fe.scroller,a&&Fe["scroller--frame"],n),...o,children:t}));Wa.displayName="TableScroller";const ki=({density:a="regular",hasStickyHead:n,hasRowHover:t,className:o,children:i,...r})=>e.jsx("table",{className:_(Fe.table,Fe[`table--${a}`],n&&Fe["table--sticky-head"],t&&Fe["table--row-hover"],o),...r,children:i}),Ni=s.memo(ki),ji="hanui-wrapper-KXCZg",wi="hanui-table-LF5Ow",$i="hanui-state-YPPb0",Ci="hanui-state__message-wwbIW",Ne={wrapper:ji,"wrapper--capped":"hanui-wrapper--capped-M2QUJ",table:wi,state:$i,"state--error":"hanui-state--error-A492d",state__message:Ci,"row--warning":"hanui-row--warning-BAUN2"},Di=({columns:a,children:n,isLoading:t,error:o,emptyMessage:i,loadingMessage:r,hasViewportCap:c,className:l,testId:d})=>{var h,m;const{labels:u}=A(),p=s.Children.count(n),g=(k,b)=>e.jsx("tr",{children:e.jsx("td",{colSpan:a.length,className:_(Ne.state,b&&Ne[`state--${b}`]),children:k})});return e.jsx("div",{className:_(Ne.wrapper,c&&Ne["wrapper--capped"],l),"data-testid":d,children:e.jsxs("table",{className:Ne.table,children:[e.jsx("thead",{children:e.jsx("tr",{children:a.map(k=>e.jsx("th",{scope:"col","aria-label":k.srLabel,"aria-sort":k.ariaSort,className:k.className,children:k.label},k.key))})}),e.jsx("tbody",{children:o?g(e.jsxs("span",{role:"alert",className:Ne.state__message,children:[e.jsx(D.ExclamationCircleFill,{"aria-hidden":!0}),o]}),"error"):t?g(E("DataTable.loadingMessage",r,(h=u==null?void 0:u.dataTable)==null?void 0:h.loading)):p===0?g(E("DataTable.emptyMessage",i,(m=u==null?void 0:u.dataTable)==null?void 0:m.empty)):n})]})})},en=s.memo(({isWarning:a,className:n,children:t,...o})=>e.jsx("tr",{className:_(a&&Ne["row--warning"],n),...o,children:t}));en.displayName="DataTableRow";const Ei=s.memo(Di),Ri="hanui-bar-b4PP4",Ii="hanui-bar__hiddenSubmit-jeCyX",Li="hanui-bar__actions-rG69L",Ti="hanui-field-f-rvu",Ge={bar:Ri,bar__hiddenSubmit:Ii,bar__actions:Li,field:Ti,"field--wide":"hanui-field--wide-FA5gf"},Bi=({onSubmit:a,children:n,actions:t,label:o,className:i,testId:r})=>{const{labels:c}=A();return e.jsxs("form",{className:_(Ge.bar,i),"aria-label":E("FilterBar.label",o,c==null?void 0:c.filters),"data-testid":r,onSubmit:l=>{l.preventDefault(),a()},children:[n,e.jsx("button",{type:"submit",className:Ge.bar__hiddenSubmit,tabIndex:-1,"aria-hidden":!0}),t&&e.jsx("div",{className:Ge.bar__actions,children:t})]})},an=s.memo(({children:a,isWide:n,className:t})=>e.jsx("div",{className:_(Ge.field,n&&Ge["field--wide"],t),children:a}));an.displayName="FilterBarField";const Si=s.memo(Bi),Ai="hanui-pagination-K-L20",Fi="hanui-pagination__list--9HqC",Mi="hanui-pagination__arrow-XIgoX",Oi="hanui-pagination__page-TpoJM",Pi="hanui-pagination__gap-qoDyI",ue={pagination:Ai,pagination__list:Fi,pagination__arrow:Mi,pagination__page:Oi,"pagination__page--active":"hanui-pagination__page--active-XHeaz",pagination__gap:Pi},Hi=(a,n)=>{if(n<=7)return Array.from({length:n},(r,c)=>c+1);const t=new Set([1,n,a]);a-1>1&&t.add(a-1),a+1<n&&t.add(a+1);const o=[...t].sort((r,c)=>r-c),i=[];return o.forEach((r,c)=>{c>0&&r-o[c-1]>1&&i.push("gap"),i.push(r)}),i},Ki=({page:a,totalPages:n,label:t,previousLabel:o,nextLabel:i,buildHref:r,onPageChange:c,linkProps:l,className:d,testId:u})=>{var m,k,b;const{labels:p}=A(),g=s.useMemo(()=>Hi(a,n),[a,n]);if(n<=1)return null;const h=x=>{c&&c(x)};return e.jsxs("nav",{className:_(ue.pagination,d),"aria-label":E("Pagination.label",t,(m=p==null?void 0:p.pagination)==null?void 0:m.label),"data-testid":u,children:[e.jsx(Xe,{className:ue.pagination__arrow,icon:e.jsx(D.CaretLeftFill,{"aria-hidden":!0}),label:E("Pagination.previousLabel",o,(k=p==null?void 0:p.pagination)==null?void 0:k.previous),variant:"outline",disabled:a<=1,onClick:()=>h(a-1)}),e.jsx("ul",{className:ue.pagination__list,children:g.map((x,w)=>x==="gap"?e.jsx("li",{className:ue.pagination__gap,"aria-hidden":!0,children:"…"},`gap-${w}`):e.jsx("li",{children:r?e.jsx(se,{href:r(x),className:_(ue.pagination__page,x===a&&ue["pagination__page--active"]),"aria-current":x===a?"page":void 0,...l,children:x}):e.jsx(Oe,{variant:oe.SECONDARY,size:ge.SMALL,className:_(ue.pagination__page,x===a&&ue["pagination__page--active"]),"aria-current":x===a?"page":void 0,onClick:()=>h(x),children:x})},x))}),e.jsx(Xe,{className:ue.pagination__arrow,icon:e.jsx(D.CaretRightFill,{"aria-hidden":!0}),label:E("Pagination.nextLabel",i,(b=p==null?void 0:p.pagination)==null?void 0:b.next),variant:"outline",disabled:a>=n,onClick:()=>h(a+1)})]})},zi=s.memo(Ki);exports.ABOVE_MOBILE_MEDIA_QUERY=We;exports.ABOVE_TABLET_MEDIA_QUERY=hn;exports.Alert=Oo;exports.Avatar=qo;exports.Badge=Yo;exports.BottomSheet=ca;exports.Breadcrumb=as;exports.Button=Oe;exports.Card=ds;exports.CardBody=Ga;exports.CardFooter=Xa;exports.CardMedia=qa;exports.CardOverlay=Ua;exports.Checkbox=Et;exports.Chip=Sa;exports.ChipGroup=On;exports.Combobox=_t;exports.ConfirmDialog=pi;exports.CopyField=gs;exports.DARK_THEME=ya;exports.DEFAULT_FONTS=sn;exports.DataTable=Ei;exports.DataTableRow=en;exports.Directory=As;exports.DirectoryGroup=Ya;exports.DirectoryJump=Ja;exports.DirectoryRow=Za;exports.Divider=vs;exports.EmptyState=zs;exports.Field=za;exports.FilterBar=Si;exports.FilterBarField=an;exports.HanuiProvider=cn;exports.IconButton=Xe;exports.Input=Pa;exports.LIGHT_THEME=fa;exports.MOBILE_BREAKPOINT=Ea;exports.Modal=la;exports.PageHeader=er;exports.Pagination=zi;exports.Panel=mr;exports.PanelForm=Qa;exports.PanelRow=Va;exports.Price=vr;exports.PromptDialog=fi;exports.QuantityStepper=ho;exports.Radio=At;exports.RadioCard=Kt;exports.RangeSlider=Qt;exports.Rating=Dr;exports.RatingInput=io;exports.SectionHeader=Ar;exports.Select=Nt;exports.Skeleton=Pr;exports.Spinner=ia;exports.TABLET_BREAKPOINT=Ra;exports.TABLET_PORTRAIT_BREAKPOINT=un;exports.Table=Ni;exports.TableCheckbox=bo;exports.TableScroller=Wa;exports.Tabs=Xr;exports.TextLink=Cn;exports.Textarea=Ka;exports.Tile=Wr;exports.Tooltip=Ln;exports.UISize=ge;exports.UIVariant=oe;exports.buildThemeCss=va;exports.initHanui=ln;exports.isKeyboardOpeningElement=Ia;exports.matchesSearch=sa;exports.normalizeSearchTerm=oa;exports.preventAutoKeyboard=ra;exports.resolveTokens=rn;exports.useHanui=A;exports.useHanuiTheme=_n;exports.useSheetViewport=Da;
|
|
18
18
|
//# sourceMappingURL=index.cjs.map
|