@inntechcorp/it-design 4.0.0-beta.5 → 4.0.0-beta.6

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.
Files changed (195) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/MIGRATION.md +16 -1
  3. package/dist/cjs/_bundled/@radix-ui/primitive/dist/index.js +1 -1
  4. package/dist/cjs/_bundled/@radix-ui/react-compose-refs/dist/index.js +1 -1
  5. package/dist/cjs/_bundled/@radix-ui/react-context/dist/index.js +1 -1
  6. package/dist/cjs/_bundled/@radix-ui/react-dialog/dist/index.js +1 -1
  7. package/dist/cjs/_bundled/@radix-ui/react-dismissable-layer/dist/index.js +1 -1
  8. package/dist/cjs/_bundled/@radix-ui/react-focus-guards/dist/index.js +1 -1
  9. package/dist/cjs/_bundled/@radix-ui/react-focus-scope/dist/index.js +1 -1
  10. package/dist/cjs/_bundled/@radix-ui/react-id/dist/index.js +1 -1
  11. package/dist/cjs/_bundled/@radix-ui/react-portal/dist/index.js +1 -1
  12. package/dist/cjs/_bundled/@radix-ui/react-presence/dist/index.js +1 -1
  13. package/dist/cjs/_bundled/@radix-ui/react-primitive/dist/index.js +1 -1
  14. package/dist/cjs/_bundled/@radix-ui/react-slot/dist/index.js +1 -1
  15. package/dist/cjs/_bundled/@radix-ui/react-use-callback-ref/dist/index.js +1 -1
  16. package/dist/cjs/_bundled/@radix-ui/react-use-controllable-state/dist/index.js +1 -1
  17. package/dist/cjs/_bundled/@radix-ui/react-use-effect-event/dist/index.js +1 -0
  18. package/dist/cjs/blocks/banner/index.js +1 -1
  19. package/dist/cjs/blocks/game-box/index.js +1 -1
  20. package/dist/cjs/blocks/game-carousel/index.js +1 -1
  21. package/dist/cjs/blocks/game-providers/logos.js +1 -1
  22. package/dist/cjs/blocks/game-shell/useDrawerChrome.js +1 -1
  23. package/dist/cjs/blocks/multiple-jackpots/index.js +1 -1
  24. package/dist/cjs/blocks/slider/index.js +1 -1
  25. package/dist/cjs/blocks/user-hub/bonus.js +1 -1
  26. package/dist/cjs/blocks/user-hub/table.js +1 -1
  27. package/dist/cjs/context/PortalDocumentContext.js +1 -1
  28. package/dist/cjs/context-menu/ContextMenu.js +1 -1
  29. package/dist/cjs/dialog/Dialog.js +1 -1
  30. package/dist/cjs/dropdown-menu/CheckIcon.js +1 -1
  31. package/dist/cjs/dropdown-menu/processChildren.js +1 -1
  32. package/dist/cjs/dropdown-menu/useMenuItemChrome.js +1 -1
  33. package/dist/cjs/dropdown-menu/useSubMenuRegistry.js +1 -1
  34. package/dist/cjs/floating/createFloatingTrigger.js +1 -1
  35. package/dist/cjs/helpers/phone/usePhoneCountry.js +1 -1
  36. package/dist/cjs/helpers/theme/createTheme.js +1 -1
  37. package/dist/cjs/helpers/theme/importShadcnTheme.js +1 -1
  38. package/dist/cjs/hooks/useFocusTrap.js +1 -1
  39. package/dist/cjs/hooks/useLoadMoreSentinel.js +1 -1
  40. package/dist/cjs/hooks/useOnESCKeyDown.js +1 -1
  41. package/dist/cjs/index.js +1 -1
  42. package/dist/cjs/modal/container/ModalContainer.js +1 -1
  43. package/dist/cjs/modal/index.js +1 -1
  44. package/dist/cjs/router/ITDLink.js +1 -1
  45. package/dist/cjs/router/context.js +1 -1
  46. package/dist/cjs/router/matchActive.js +1 -1
  47. package/dist/cjs/toast/index.js +1 -1
  48. package/dist/css/accordion.css +2 -2
  49. package/dist/css/alert.css +1 -1
  50. package/dist/css/announcement-bar.css +1 -1
  51. package/dist/css/auth-page.css +3 -3
  52. package/dist/css/avatar.css +1 -1
  53. package/dist/css/back-top.css +1 -1
  54. package/dist/css/badge.css +85 -81
  55. package/dist/css/base.css +22 -16
  56. package/dist/css/block-form.css +5 -3
  57. package/dist/css/blocks-shared.css +8 -6
  58. package/dist/css/button-group.css +1 -1
  59. package/dist/css/button.css +8 -6
  60. package/dist/css/calendar.css +1 -1
  61. package/dist/css/card.css +1 -1
  62. package/dist/css/casino-featured.css +1 -1
  63. package/dist/css/chart.css +1 -1
  64. package/dist/css/checkbox.css +2 -2
  65. package/dist/css/code-input.css +5 -5
  66. package/dist/css/color-input.css +1 -1
  67. package/dist/css/coming-soon.css +1 -1
  68. package/dist/css/common.css +1 -1
  69. package/dist/css/components.css +1 -1
  70. package/dist/css/cropper.css +10 -6
  71. package/dist/css/datepicker.css +1 -1
  72. package/dist/css/default-avatar.css +1 -1
  73. package/dist/css/dialog.css +1 -1
  74. package/dist/css/dropdown-menu.css +1 -1
  75. package/dist/css/field.css +1 -1
  76. package/dist/css/filter-tabs.css +1 -1
  77. package/dist/css/flex.css +1 -1
  78. package/dist/css/floating.css +1 -1
  79. package/dist/css/footer.css +1 -1
  80. package/dist/css/form.css +1 -1
  81. package/dist/css/game-box.css +3 -3
  82. package/dist/css/game-carousel.css +1 -1
  83. package/dist/css/game-categories.css +1 -1
  84. package/dist/css/game-filter.css +1 -1
  85. package/dist/css/game-navigator.css +1 -1
  86. package/dist/css/game-providers.css +1 -1
  87. package/dist/css/game-search.css +1 -1
  88. package/dist/css/game-shell.css +3 -1
  89. package/dist/css/header.css +3 -3
  90. package/dist/css/help.css +1 -1
  91. package/dist/css/home-sections.css +1 -1
  92. package/dist/css/hovercard.css +1 -1
  93. package/dist/css/hstrip.css +1 -1
  94. package/dist/css/html-header.css +1 -1
  95. package/dist/css/image.css +1 -1
  96. package/dist/css/input.css +1 -1
  97. package/dist/css/label.css +1 -1
  98. package/dist/css/last-winners.css +1 -1
  99. package/dist/css/login.css +1 -1
  100. package/dist/css/mega-menu.css +3 -1
  101. package/dist/css/min-width-gate.css +1 -1
  102. package/dist/css/mobile-bottom-nav.css +1 -1
  103. package/dist/css/modal.css +8 -8
  104. package/dist/css/multiple-jackpots.css +3 -1
  105. package/dist/css/notifications-panel.css +2 -2
  106. package/dist/css/page.css +2 -2
  107. package/dist/css/popover.css +1 -1
  108. package/dist/css/post-viewer.css +1 -1
  109. package/dist/css/progress.css +1 -1
  110. package/dist/css/promotions-grid.css +3 -3
  111. package/dist/css/properties.css +1 -1
  112. package/dist/css/radio.css +1 -1
  113. package/dist/css/raffle.css +1 -1
  114. package/dist/css/rangepicker.css +1 -1
  115. package/dist/css/reset.css +2 -2
  116. package/dist/css/result.css +1 -1
  117. package/dist/css/select.css +1 -1
  118. package/dist/css/separator.css +1 -1
  119. package/dist/css/sheet.css +1 -1
  120. package/dist/css/signup.css +1 -1
  121. package/dist/css/skeleton.css +2 -2
  122. package/dist/css/slider.css +1 -1
  123. package/dist/css/spin.css +1 -1
  124. package/dist/css/stat-card.css +1 -1
  125. package/dist/css/sub-page-header.css +1 -1
  126. package/dist/css/svg-loader.css +1 -1
  127. package/dist/css/switch.css +1 -1
  128. package/dist/css/table.css +6 -4
  129. package/dist/css/tabs.css +1 -1
  130. package/dist/css/textarea.css +1 -1
  131. package/dist/css/toggle-group.css +1 -1
  132. package/dist/css/tooltip.css +1 -1
  133. package/dist/css/tournaments.css +8 -7
  134. package/dist/css/upload.css +1 -1
  135. package/dist/css/user-hub.css +2 -2
  136. package/dist/css/utilities.css +1 -1
  137. package/dist/css/vendor.css +4 -1
  138. package/dist/es/_bundled/@radix-ui/primitive/dist/index.js +1 -1
  139. package/dist/es/_bundled/@radix-ui/react-compose-refs/dist/index.js +1 -1
  140. package/dist/es/_bundled/@radix-ui/react-context/dist/index.js +1 -1
  141. package/dist/es/_bundled/@radix-ui/react-dialog/dist/index.js +1 -1
  142. package/dist/es/_bundled/@radix-ui/react-dismissable-layer/dist/index.js +1 -1
  143. package/dist/es/_bundled/@radix-ui/react-focus-guards/dist/index.js +1 -1
  144. package/dist/es/_bundled/@radix-ui/react-focus-scope/dist/index.js +1 -1
  145. package/dist/es/_bundled/@radix-ui/react-id/dist/index.js +1 -1
  146. package/dist/es/_bundled/@radix-ui/react-portal/dist/index.js +1 -1
  147. package/dist/es/_bundled/@radix-ui/react-presence/dist/index.js +1 -1
  148. package/dist/es/_bundled/@radix-ui/react-primitive/dist/index.js +1 -1
  149. package/dist/es/_bundled/@radix-ui/react-slot/dist/index.js +1 -1
  150. package/dist/es/_bundled/@radix-ui/react-use-callback-ref/dist/index.js +1 -1
  151. package/dist/es/_bundled/@radix-ui/react-use-controllable-state/dist/index.js +1 -1
  152. package/dist/es/_bundled/@radix-ui/react-use-effect-event/dist/index.js +1 -0
  153. package/dist/es/blocks/banner/index.js +1 -1
  154. package/dist/es/blocks/game-box/index.js +1 -1
  155. package/dist/es/blocks/game-carousel/index.js +1 -1
  156. package/dist/es/blocks/game-providers/logos.js +1 -1
  157. package/dist/es/blocks/game-shell/useDrawerChrome.js +1 -1
  158. package/dist/es/blocks/multiple-jackpots/index.js +1 -1
  159. package/dist/es/blocks/slider/index.js +1 -1
  160. package/dist/es/blocks/user-hub/bonus.js +1 -1
  161. package/dist/es/blocks/user-hub/cashier.js +1 -1
  162. package/dist/es/blocks/user-hub/history.js +1 -1
  163. package/dist/es/blocks/user-hub/profile.js +1 -1
  164. package/dist/es/blocks/user-hub/raffles.js +1 -1
  165. package/dist/es/blocks/user-hub/table.js +1 -1
  166. package/dist/es/context/ITDContext.js +1 -1
  167. package/dist/es/context/PortalDocumentContext.js +1 -1
  168. package/dist/es/context-menu/ContextMenu.js +1 -1
  169. package/dist/es/dialog/Dialog.js +1 -1
  170. package/dist/es/dropdown-menu/CheckIcon.js +1 -1
  171. package/dist/es/dropdown-menu/processChildren.js +1 -1
  172. package/dist/es/dropdown-menu/useMenuItemChrome.js +1 -1
  173. package/dist/es/dropdown-menu/useSubMenuRegistry.js +1 -1
  174. package/dist/es/floating/createFloatingTrigger.js +1 -1
  175. package/dist/es/helpers/phone/usePhoneCountry.js +1 -1
  176. package/dist/es/helpers/theme/createTheme.js +1 -1
  177. package/dist/es/helpers/theme/importShadcnTheme.js +1 -1
  178. package/dist/es/hooks/useFocusTrap.js +1 -1
  179. package/dist/es/hooks/useLoadMoreSentinel.js +1 -1
  180. package/dist/es/hooks/useOnESCKeyDown.js +1 -1
  181. package/dist/es/index.js +1 -1
  182. package/dist/es/modal/container/ModalContainer.js +1 -1
  183. package/dist/es/modal/index.js +1 -1
  184. package/dist/es/page/blocks.js +1 -1
  185. package/dist/es/page/blocks.query.js +1 -1
  186. package/dist/es/page/editor/theme.js +1 -1
  187. package/dist/es/router/ITDLink.js +1 -1
  188. package/dist/es/router/context.js +1 -1
  189. package/dist/es/router/matchActive.js +1 -1
  190. package/dist/es/toast/index.js +1 -1
  191. package/dist/global.css +187 -155
  192. package/dist/index.d.ts +186 -187
  193. package/package.json +24 -35
  194. package/dist/cjs/_bundled/@radix-ui/react-use-escape-keydown/dist/index.js +0 -1
  195. package/dist/es/_bundled/@radix-ui/react-use-escape-keydown/dist/index.js +0 -1
@@ -1 +1 @@
1
- import{jsx as a,jsxs as e}from"react/jsx-runtime";import{useState as l}from"react";import{Clock as i,Gauge as n,Star as r,Flame as o}from"lucide-react";import s from"../../button/index.js";import d from"../../input/index.js";import m from"../../select/index.js";import c from"../../textarea/index.js";import t from"../../alert/index.js";import h from"../../badge/index.js";import{FieldLabel as p,Field as u,FieldTitle as b}from"../../field/index.js";import{RadioGroup as _}from"../../radio/RadioGroup.js";import{RadioGroupItem as v}from"../../radio/RadioGroupItem.js";import{GetClassNameByPlatform as y}from"../../helpers/classname/GetClassNameByPlatform.js";import{SelectItem as f}from"../../select/SelectItem.js";import{AlertDescription as g}from"../../alert/Description.js";const N=(a,e)=>y(a)+" "+e,k=a=>a.name??a.label,x=a=>{const[e,i]=l(()=>Object.fromEntries(a.map(a=>[k(a),a.value??""])));return[e,(a,e)=>i(l=>({...l,[k(a)]:e}))]},C=({logo:e})=>a("span",{className:"hub__pay-logo",style:{background:e.color},"aria-hidden":!0,children:e.Icon?a(e.Icon,{size:18}):a("b",{children:e.initials})}),z=({options:l,value:i,onChange:n,idPrefix:r,marker:o})=>a(_,{value:i,onValueChange:n,orientation:"horizontal",className:o?N(o,"hub__pay-filter"):"hub__pay-filter",children:l.map(l=>a(p,{htmlFor:r+"-"+l.value,children:e(u,{orientation:"vertical",className:"hub__pay-tile",children:[a("span",{className:"hub__pay-badge",style:{background:l.color},"aria-hidden":!0,children:l.Icon?a(l.Icon,{size:18}):a("b",{children:l.initials})}),a(b,{children:l.label}),a(v,{value:l.value,id:r+"-"+l.value,className:"sr-only"})]})},l.value))}),j=({f:l,onChange:i})=>e("div",{className:"hub__paymodal-field",children:[a("label",{className:"hub__paymodal-label",children:l.label}),"textarea"===l.kind?a(c,{rows:3,defaultValue:l.value,placeholder:l.placeholder,onUpdate:a=>i?.(String(a??""))}):"select"===l.kind?a(m,{size:"x-large",defaultValue:l.value,locked:!!l.locked,onChange:a=>i?.(String(a??"")),children:l.options.map(e=>a(f,{value:e,children:e},e))}):l.locked?a(d,{size:"x-large",value:l.value,locked:!0}):a(d,{size:"x-large",defaultValue:l.value,placeholder:l.placeholder,onChange:a=>i?.(String(a??""))})]}),S=({logo:l,name:i,side:n})=>e("div",{className:"hub__paymodal-card",children:[a(C,{logo:l}),a("span",{className:"hub__paymodal-name",children:i}),n]}),L=({labels:l,values:r})=>a("div",{className:"hub__paymodal-tiles",children:l.map((l,o)=>a("div",{className:"hub__paymodal-tile",children:e("div",{children:[0===o?a(i,{"aria-hidden":!0}):a(n,{"aria-hidden":!0,style:1===o?{transform:"scale(-1, 1)"}:void 0}),e("span",{className:"hub__paymodal-tile-texts",children:[a("span",{className:"hub__paymodal-tile-label",children:l}),a("span",{className:"hub__paymodal-tile-value",children:r[o]})]})]})},l))}),F=({method:i,personFields:n=[],amountLabel:r="Yatırım Miktarı",submitLabel:o="Yatırım Talebi Gönder",favLabel:m="Favorilere Ekle",unfavLabel:c="Favorilerden Kaldır",onSubmit:t,onFavorite:h})=>{const[p,u]=l(!!i.favorite),[b,_]=l(""),[v,y]=x(n);return e("div",{className:"hub__paymodal",children:[a(S,{logo:i.logo,name:i.name,side:a(s,{variant:p?"default":"outline",size:"medium",onClick:()=>{u(!p),h?.(!p)},children:p?c:m})}),a(L,{labels:["Yatırım Süresi","Min Yatırım","Max Yatırım"],values:[i.time,i.min,i.max]}),a("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-form",children:[n.map(e=>a(j,{f:e,onChange:a=>y(e,a)},e.label)),e("div",{className:"hub__paymodal-field hub__paymodal-amount",children:[a("label",{className:"hub__paymodal-label",children:r}),a(d,{size:"x-large",type:"currency",placeholder:"00.00",addonBefore:a("span",{children:"₺"}),value:b,onChange:a=>_(String(a))})]})]}),a("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-submit",children:a(s,{variant:"default",size:"large",disabled:!b,onClick:()=>t?.({method:i,amount:b,fields:v}),children:o})})]})},I=({account:i,fields:n=[],amountLabel:r="Çekim Miktarı",submitLabel:o="Çekim Talebi Gönder",note:m,onSubmit:c})=>{const[h,p]=l(""),[u,b]=x(n);return e("div",{className:"hub__paymodal",children:[a(S,{logo:i.logo,name:i.name}),a(L,{labels:["Çekim Süresi","Min Çekim","Max Çekim"],values:[i.time,i.min,i.max]}),a("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-form",children:[n.map(e=>a(j,{f:e,onChange:a=>b(e,a)},e.label)),e("div",{className:"hub__paymodal-field hub__paymodal-amount",children:[a("label",{className:"hub__paymodal-label",children:r}),a(d,{size:"x-large",type:"currency",placeholder:"00.00",addonBefore:a("span",{children:"₺"}),value:h,onChange:a=>p(String(a))})]}),m&&a(t,{type:"info",variant:"filled",children:a(g,{children:m})})]}),a("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-submit",children:a(s,{variant:"default",size:"large",disabled:!h,onClick:()=>c?.({account:i,amount:h,fields:u}),children:o})})]})},G=({account:i,accountTypes:n,typeFields:r,personFields:o=[],tcField:m,phoneField:t,nameLabel:h="Çekim Hesabı Adı",descLabel:p="Çekim Hesabı Açıklaması",typeLabel:u="Çekim Hesabı Türü",addLabel:b="Çekim Hesabı Ekle",editLabel:_="Çekim Hesabını Güncelle",onSubmit:v})=>{const y=!!i,[f,g]=l(i?.tags[0]??n[0]?.value??"bank"),[N,k]=l(i?.name??""),[C,L]=l(i?.desc??""),F=n.find(a=>a.value===f)??n[0],I=r[f]??r.default??{pre:[],post:[]},G=a=>y?a:{...a,value:void 0},M=[...I.pre.map(G),...m?[m]:[],...o,...I.post.map(G),...t?[t]:[]],[T,Y]=x(M);return e("div",{className:"hub__paymodal",children:[y&&F?a(S,{logo:{color:F.color,Icon:F.Icon,initials:F.initials},name:F.label}):e("div",{className:"hub__paymodal-field",children:[a("label",{className:"hub__paymodal-label",children:u}),a(z,{options:n,value:f,onChange:g,idPrefix:"acct"})]}),e("div",{className:"hub__paymodal-form",children:[e("div",{className:"hub__paymodal-field",children:[a("label",{className:"hub__paymodal-label",children:h}),a(d,{size:"x-large",value:N,onChange:a=>k(String(a))})]}),e("div",{className:"hub__paymodal-field",children:[a("label",{className:"hub__paymodal-label",children:p}),a(c,{rows:3,value:C,onChange:a=>L("string"==typeof a?a:a?.target?.value??"")})]}),M.map(e=>a(j,{f:e,onChange:a=>Y(e,a)},f+"-"+e.label))]}),a("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-submit",children:a(s,{variant:"default",size:"large",disabled:!N||!C,onClick:()=>v?.({edit:y,type:f,name:N,desc:C,fields:T}),children:y?_:b})})]})},M=({row:l,favTitle:i="Favori",hotTitle:n="Popüler"})=>"group"===l.type?e("span",{className:"hub__pay-name",children:[a("span",{className:"hub__pay-groupname",children:l.name}),a("span",{children:a(h,{variant:"default",color:"blue",size:"medium",pill:!1,className:"hub__pay-chip",children:l.methodCount+" Yöntem"})})]}):a("span",{className:"hub__pay-name",children:e("span",{className:"hub__pay-title",children:[l.name,l.favorite&&a("i",{className:"hub__pay-mark hub__pay-mark--fav",title:i,children:a(r,{size:9})}),l.popular&&a("i",{className:"hub__pay-mark hub__pay-mark--hot",title:n,children:a(o,{size:9})})]})});export{G as HubAccountModal,F as HubDepositModal,j as HubPayFieldRow,z as HubPayFilter,C as HubPayLogoBadge,S as HubPayModalCard,L as HubPayModalTiles,M as HubPayName,I as HubWithdrawModal};
1
+ import{jsxs as a,jsx as e}from"react/jsx-runtime";import{useState as l}from"react";import{Clock as i,Gauge as n,Star as r,Flame as o}from"lucide-react";import s from"../../button/index.js";import d from"../../input/index.js";import m from"../../select/index.js";import c from"../../textarea/index.js";import t from"../../alert/index.js";import h from"../../badge/index.js";import{FieldLabel as p,Field as u,FieldTitle as b}from"../../field/index.js";import{RadioGroup as _}from"../../radio/RadioGroup.js";import{RadioGroupItem as v}from"../../radio/RadioGroupItem.js";import{GetClassNameByPlatform as y}from"../../helpers/classname/GetClassNameByPlatform.js";import{SelectItem as f}from"../../select/SelectItem.js";import{AlertDescription as g}from"../../alert/Description.js";const N=(a,e)=>y(a)+" "+e,k=a=>a.name??a.label,x=a=>{const[e,i]=l(()=>Object.fromEntries(a.map(a=>[k(a),a.value??""])));return[e,(a,e)=>i(l=>({...l,[k(a)]:e}))]},C=({logo:a})=>e("span",{className:"hub__pay-logo",style:{background:a.color},"aria-hidden":!0,children:a.Icon?e(a.Icon,{size:18}):e("b",{children:a.initials})}),z=({options:l,value:i,onChange:n,idPrefix:r,marker:o})=>e(_,{value:i,onValueChange:n,orientation:"horizontal",className:o?N(o,"hub__pay-filter"):"hub__pay-filter",children:l.map(l=>e(p,{htmlFor:r+"-"+l.value,children:a(u,{orientation:"vertical",className:"hub__pay-tile",children:[e("span",{className:"hub__pay-badge",style:{background:l.color},"aria-hidden":!0,children:l.Icon?e(l.Icon,{size:18}):e("b",{children:l.initials})}),e(b,{children:l.label}),e(v,{value:l.value,id:r+"-"+l.value,className:"sr-only"})]})},l.value))}),j=({f:l,onChange:i})=>a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:l.label}),"textarea"===l.kind?e(c,{rows:3,defaultValue:l.value,placeholder:l.placeholder,onUpdate:a=>i?.(String(a??""))}):"select"===l.kind?e(m,{size:"x-large",defaultValue:l.value,locked:!!l.locked,onChange:a=>i?.(String(a??"")),children:l.options.map(a=>e(f,{value:a,children:a},a))}):l.locked?e(d,{size:"x-large",value:l.value,locked:!0}):e(d,{size:"x-large",defaultValue:l.value,placeholder:l.placeholder,onChange:a=>i?.(String(a??""))})]}),S=({logo:l,name:i,side:n})=>a("div",{className:"hub__paymodal-card",children:[e(C,{logo:l}),e("span",{className:"hub__paymodal-name",children:i}),n]}),L=({labels:l,values:r})=>e("div",{className:"hub__paymodal-tiles",children:l.map((l,o)=>e("div",{className:"hub__paymodal-tile",children:a("div",{children:[0===o?e(i,{"aria-hidden":!0}):e(n,{"aria-hidden":!0,style:1===o?{transform:"scale(-1, 1)"}:void 0}),a("span",{className:"hub__paymodal-tile-texts",children:[e("span",{className:"hub__paymodal-tile-label",children:l}),e("span",{className:"hub__paymodal-tile-value",children:r[o]})]})]})},l))}),F=({method:i,personFields:n=[],amountLabel:r="Yatırım Miktarı",submitLabel:o="Yatırım Talebi Gönder",favLabel:m="Favorilere Ekle",unfavLabel:c="Favorilerden Kaldır",onSubmit:t,onFavorite:h})=>{const[p,u]=l(!!i.favorite),[b,_]=l(""),[v,y]=x(n);return a("div",{className:"hub__paymodal",children:[e(S,{logo:i.logo,name:i.name,side:e(s,{variant:p?"default":"outline",size:"medium",onClick:()=>{u(!p),h?.(!p)},children:p?c:m})}),e(L,{labels:["Yatırım Süresi","Min Yatırım","Max Yatırım"],values:[i.time,i.min,i.max]}),e("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-form",children:[n.map(a=>e(j,{f:a,onChange:e=>y(a,e)},a.label)),a("div",{className:"hub__paymodal-field hub__paymodal-amount",children:[e("label",{className:"hub__paymodal-label",children:r}),e(d,{size:"x-large",type:"currency",placeholder:"00.00",addonBefore:e("span",{children:"₺"}),value:b,onChange:a=>_(String(a))})]})]}),e("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-submit",children:e(s,{variant:"default",size:"large",disabled:!b,onClick:()=>t?.({method:i,amount:b,fields:v}),children:o})})]})},I=({account:i,fields:n=[],amountLabel:r="Çekim Miktarı",submitLabel:o="Çekim Talebi Gönder",note:m,onSubmit:c})=>{const[h,p]=l(""),[u,b]=x(n);return a("div",{className:"hub__paymodal",children:[e(S,{logo:i.logo,name:i.name}),e(L,{labels:["Çekim Süresi","Min Çekim","Max Çekim"],values:[i.time,i.min,i.max]}),e("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-form",children:[n.map(a=>e(j,{f:a,onChange:e=>b(a,e)},a.label)),a("div",{className:"hub__paymodal-field hub__paymodal-amount",children:[e("label",{className:"hub__paymodal-label",children:r}),e(d,{size:"x-large",type:"currency",placeholder:"00.00",addonBefore:e("span",{children:"₺"}),value:h,onChange:a=>p(String(a))})]}),m&&e(t,{type:"info",variant:"filled",children:e(g,{children:m})})]}),e("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-submit",children:e(s,{variant:"default",size:"large",disabled:!h,onClick:()=>c?.({account:i,amount:h,fields:u}),children:o})})]})},G=({account:i,accountTypes:n,typeFields:r,personFields:o=[],tcField:m,phoneField:t,nameLabel:h="Çekim Hesabı Adı",descLabel:p="Çekim Hesabı Açıklaması",typeLabel:u="Çekim Hesabı Türü",addLabel:b="Çekim Hesabı Ekle",editLabel:_="Çekim Hesabını Güncelle",onSubmit:v})=>{const y=!!i,[f,g]=l(i?.tags[0]??n[0]?.value??"bank"),[N,k]=l(i?.name??""),[C,L]=l(i?.desc??""),F=n.find(a=>a.value===f)??n[0],I=r[f]??r.default??{pre:[],post:[]},G=a=>y?a:{...a,value:void 0},M=[...I.pre.map(G),...m?[m]:[],...o,...I.post.map(G),...t?[t]:[]],[T,Y]=x(M);return a("div",{className:"hub__paymodal",children:[y&&F?e(S,{logo:{color:F.color,Icon:F.Icon,initials:F.initials},name:F.label}):a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:u}),e(z,{options:n,value:f,onChange:g,idPrefix:"acct"})]}),a("div",{className:"hub__paymodal-form",children:[a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:h}),e(d,{size:"x-large",value:N,onChange:a=>k(String(a))})]}),a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:p}),e(c,{rows:3,value:C,onChange:a=>L("string"==typeof a?a:a?.target?.value??"")})]}),M.map(a=>e(j,{f:a,onChange:e=>Y(a,e)},f+"-"+a.label))]}),e("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-submit",children:e(s,{variant:"default",size:"large",disabled:!N||!C,onClick:()=>v?.({edit:y,type:f,name:N,desc:C,fields:T}),children:y?_:b})})]})},M=({row:l,favTitle:i="Favori",hotTitle:n="Popüler"})=>"group"===l.type?a("span",{className:"hub__pay-name",children:[e("span",{className:"hub__pay-groupname",children:l.name}),e("span",{children:e(h,{variant:"default",color:"blue",size:"medium",pill:!1,className:"hub__pay-chip",children:l.methodCount+" Yöntem"})})]}):e("span",{className:"hub__pay-name",children:a("span",{className:"hub__pay-title",children:[l.name,l.favorite&&e("i",{className:"hub__pay-mark hub__pay-mark--fav",title:i,children:e(r,{size:9})}),l.popular&&e("i",{className:"hub__pay-mark hub__pay-mark--hot",title:n,children:e(o,{size:9})})]})});export{G as HubAccountModal,F as HubDepositModal,j as HubPayFieldRow,z as HubPayFilter,C as HubPayLogoBadge,S as HubPayModalCard,L as HubPayModalTiles,M as HubPayName,I as HubWithdrawModal};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import{useState as a,Fragment as n}from"react";import{Eye as r,Search as d}from"lucide-react";import l from"../../button/index.js";import s from"../../badge/index.js";import o from"../../input/index.js";import m from"../../select/index.js";import h from"../../datepicker/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as p}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as k}from"../../tooltip/TooltipContent.js";import{HubPayFilter as u}from"./cashier.js";import{HubTable as y,HubCopyBtn as g,HubHistName as x,HubDt as w,HubStatusBadge as b}from"./table.js";import{SelectItem as f}from"../../select/SelectItem.js";const I=({cols:t,filters:r,onFilter:d,minPlaceholder:l="Min",maxPlaceholder:s="Maks",startPlaceholder:c="Tarih Başlangıç",endPlaceholder:p="Tarih Bitiş"})=>{const[k,u]=a({}),y=(e,t,i)=>{const a=((e,t)=>e.name??String(t))(e,t),n={...k,[a]:"object"==typeof i&&"object"==typeof k[a]?{...k[a],...i}:i};u(n),d?.(n)};return i("div",{className:"hub__hist-filters hub__hist-filters--"+t,children:r.map((t,a)=>"select"===t.kind?i(m,{size:"x-large",defaultValue:t.options[0],"aria-label":t.ariaLabel,onChange:e=>y(t,a,String(e??"")),children:t.options.map(e=>i(f,{value:e,children:e},e))},a):"minmax"===t.kind?e("div",{className:"hub__hist-minmax",children:[i(o,{size:"x-large",placeholder:l,addonBefore:i("span",{children:"₺"}),onChange:e=>y(t,a,{min:String(e??"")})}),i(o,{size:"x-large",placeholder:s,addonBefore:i("span",{children:"₺"}),onChange:e=>y(t,a,{max:String(e??"")})})]},a):e(n,{children:[i(h,{size:"x-large",placeholder:c,"aria-label":c,onChange:e=>y(t,a,{start:String(e??"")})}),i(h,{size:"x-large",placeholder:p,"aria-label":p,onChange:e=>y(t,a,{end:String(e??"")})})]},a))})},T=({cats:e,idPrefix:t,wide:n})=>{const[r,d]=a(e[0]?.value??"all"),l=i(u,{options:e,value:r,onChange:d,idPrefix:t});return n?i("div",{className:"hub__hist-cats--wide",children:l}):l},v=({children:e})=>i("span",{className:"hub__hist-amount",children:e}),S=({data:a,onFilter:n,cats:d,providers:s,statuses:o,onDetail:m,marker:h={list:"inn-mobile-game-history-list",methods:"inn-mobile-game-history-list-methods",item:"inn-mobile-game-history-list-item"},tokenTitle:c="Fiş",gameTitle:p="Oyun",startTitle:k="Başlangıç",endTitle:u="Bitiş",oldBalTitle:b="Eski Bakiye",newBalTitle:f="Yeni Bakiye",winTitle:S="Kazanma",detailLabel:B="Detay"})=>{const _=[{key:"token",dataIndex:"key",title:c,width:50,render:(e,t)=>i(g,{value:t.key,compact:!0})},{key:"game",dataIndex:"game",title:p,maxWidth:200,render:(e,t)=>i(x,{name:t.game,desc:t.cat})},{key:"start",dataIndex:"start",title:k,width:130,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:u,width:130,render:e=>i(w,{v:String(e)})},{key:"oldBal",dataIndex:"oldBal",title:b,width:130},{key:"newBal",dataIndex:"newBal",title:f,width:130},{key:"win",dataIndex:"win",title:S,width:120,align:"right",render:e=>i(v,{children:String(e)})},{key:"details",dataIndex:"key",title:"",width:100,render:(t,a)=>i("span",{className:"hub__pay-actions",children:e(l,{variant:"solid",size:"medium",onClick:()=>m(a),children:[i(r,{size:13}),B]})})}];return e(t,{children:[i(T,{cats:d,idPrefix:"gh"}),i(I,{onFilter:n,cols:2,filters:[{kind:"select",options:s},{kind:"select",options:o},{kind:"daterange"}]}),i(y,{columns:_,data:a,cellHeight:"54px",marker:h})]})},B=({data:a,onFilter:n,cats:r,methods:d,statuses:l,types:s,marker:o={list:"inn-mobile-payment-history-list",methods:"inn-mobile-payment-history-list-methods",item:"inn-mobile-payment-history-list-item"},idTitle:m="Id",providerTitle:h="Sağlayıcı",statusTitle:c="Durum",dateTitle:p="Tarih",oldBalTitle:k="Eski Bakiye",newBalTitle:u="Yeni Bakiye",amountTitle:f="Miktar"})=>{const S=[{key:"id",dataIndex:"key",title:m,width:50,render:(e,t)=>i(g,{value:t.key,compact:!0})},{key:"name",dataIndex:"name",title:h,maxWidth:200,render:(e,t)=>i(x,{name:t.name,desc:t.sub})},{key:"status",dataIndex:"status",title:c,width:130,render:e=>i(b,{s:String(e)})},{key:"date",dataIndex:"date",title:p,width:130,render:e=>i(w,{v:String(e)})},{key:"oldBal",dataIndex:"oldBal",title:k,width:130},{key:"newBal",dataIndex:"newBal",title:u,width:130},{key:"amount",dataIndex:"amount",title:f,width:120,align:"right",render:e=>i(v,{children:String(e)})}];return e(t,{children:[i(T,{cats:r,idPrefix:"ph"}),i(I,{onFilter:n,cols:3,filters:[{kind:"select",options:d},{kind:"select",options:l},{kind:"select",options:s},{kind:"minmax"},{kind:"daterange"}]}),i(y,{columns:S,data:a,cellHeight:"54px",marker:o})]})},_=({data:a,onFilter:n,cats:r,creators:d,statuses:l,types:s,marker:o={list:"inn-mobile-bonus-history-list",methods:"inn-mobile-bonus-history-list-methods",item:"inn-mobile-bonus-history-list-item"},nameTitle:m="İsim",catTitle:h="Kategori",statusTitle:c="Durum",applyTitle:p="Başvuru Tarihi",finishTitle:k="Tamamlanma",profitTitle:u="Net Kar",cashbackTitle:g="Geri Ödeme",amountTitle:f="Bonus Miktarı",creatorLabel:S="Oluşturan: "})=>{const B=[{key:"name",dataIndex:"name",title:m,maxWidth:200,render:(e,t)=>i(x,{name:t.name,desc:t.sub,creator:t.creator,creatorLabel:S})},{key:"cat",dataIndex:"cat",title:h,width:90},{key:"status",dataIndex:"status",title:c,width:150,render:e=>i(b,{s:String(e)})},{key:"apply",dataIndex:"apply",title:p,width:145,render:e=>i(w,{v:String(e)})},{key:"finish",dataIndex:"finish",title:k,width:145,render:e=>i(w,{v:String(e)})},{key:"profit",dataIndex:"profit",title:u,width:100},{key:"cashback",dataIndex:"cashback",title:g,width:110},{key:"amount",dataIndex:"amount",title:f,width:120,align:"right",render:e=>i(v,{children:String(e)})}];return e(t,{children:[i(T,{cats:r,idPrefix:"bh",wide:!0}),i(I,{onFilter:n,cols:3,filters:[{kind:"select",options:d},{kind:"select",options:l},{kind:"select",options:s},{kind:"minmax"},{kind:"daterange"}]}),i(y,{columns:B,data:a,cellHeight:"54px",marker:o})]})},z=({data:a,onFilter:n,providers:o,statuses:m,onGames:h,marker:u={list:"inn-mobile-free-spin-history-list",methods:"inn-mobile-free-spin-history-list-methods",item:"inn-mobile-free-spin-history-list-item"},idTitle:f="Id",providerTitle:T="Sağlayıcı",winTitle:S="Kazanç",statusTitle:B="Durum",gamesTitle:_="Oyun Sayısı",spinsTitle:z="Spin Sayısı",startTitle:j="Başlangıç",endTitle:C="Bitiş",gamesTooltip:F="Free Spin Oyunları",viewGamesLabel:P="Geçerli Oyunları Görüntüle"})=>{const N=[{key:"id",dataIndex:"key",title:f,width:50,render:(e,t)=>i(g,{value:t.key,compact:!0})},{key:"provider",dataIndex:"provider",title:T,maxWidth:200,render:(e,t)=>i(x,{name:t.provider})},{key:"status",dataIndex:"status",title:S,width:140,render:e=>i(b,{s:String(e)})},{key:"games",dataIndex:"games",title:_,width:120,render:(t,a)=>e("span",{className:"hub__hist-count",children:[i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(t)}),e(c,{children:[i(p,{asChild:!0,children:i(l,{variant:"ghost",size:"icon-sm","aria-label":F,onClick:()=>h(a),children:i(r,{size:13})})}),i(k,{placement:"top",children:F})]})]})},{key:"spins",dataIndex:"spins",title:z,width:110,render:e=>i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(e)})},{key:"start",dataIndex:"start",title:j,width:145,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:C,width:145,render:e=>i(w,{v:String(e)})},{key:"won",dataIndex:"won",title:S,width:110,align:"right",render:e=>i(v,{children:String(e)})}],D=[{key:"id",dataIndex:"key",title:f,width:50,render:(e,t)=>i(g,{value:t.key,compact:!0})},{key:"provider",dataIndex:"provider",title:T,maxWidth:200,render:(e,t)=>i(x,{name:t.provider})},{key:"status",dataIndex:"status",title:B,width:140,render:e=>i(b,{s:String(e)})},{key:"games",dataIndex:"games",title:_,width:120,render:e=>i(v,{children:String(e)})},{key:"spins",dataIndex:"spins",title:z,width:110,render:e=>i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(e)})},{key:"start",dataIndex:"start",title:j,width:145,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:C,width:145,render:e=>i(w,{v:String(e)})},{key:"won",dataIndex:"won",title:S,width:110,render:e=>i(v,{children:String(e)})},{key:"actions",dataIndex:"key",title:"",width:220,render:(t,a)=>i("span",{className:"hub__pay-actions hub__pay-actions--full",children:e(l,{variant:"solid",size:"medium",onClick:()=>h(a),children:[i(d,{size:14}),P]})})}];return e(t,{children:[i(I,{onFilter:n,cols:4,filters:[{kind:"select",options:o},{kind:"select",options:m},{kind:"daterange"}]}),i(y,{columns:N,mobileColumns:D,data:a,cellHeight:"54px",marker:u})]})};export{_ as HubBonusHistory,z as HubFreespinHistory,S as HubGameHistory,B as HubPaymentHistory};
1
+ import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import{useState as a,Fragment as n}from"react";import{Search as r,Eye as d}from"lucide-react";import l from"../../button/index.js";import s from"../../badge/index.js";import o from"../../input/index.js";import m from"../../select/index.js";import h from"../../datepicker/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as p}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as k}from"../../tooltip/TooltipContent.js";import{HubPayFilter as u}from"./cashier.js";import{HubTable as y,HubHistName as g,HubStatusBadge as x,HubDt as w,HubCopyBtn as b}from"./table.js";import{SelectItem as f}from"../../select/SelectItem.js";const I=({cols:t,filters:r,onFilter:d,minPlaceholder:l="Min",maxPlaceholder:s="Maks",startPlaceholder:c="Tarih Başlangıç",endPlaceholder:p="Tarih Bitiş"})=>{const[k,u]=a({}),y=(e,t,i)=>{const a=((e,t)=>e.name??String(t))(e,t),n={...k,[a]:"object"==typeof i&&"object"==typeof k[a]?{...k[a],...i}:i};u(n),d?.(n)};return i("div",{className:"hub__hist-filters hub__hist-filters--"+t,children:r.map((t,a)=>"select"===t.kind?i(m,{size:"x-large",defaultValue:t.options[0],"aria-label":t.ariaLabel,onChange:e=>y(t,a,String(e??"")),children:t.options.map(e=>i(f,{value:e,children:e},e))},a):"minmax"===t.kind?e("div",{className:"hub__hist-minmax",children:[i(o,{size:"x-large",placeholder:l,addonBefore:i("span",{children:"₺"}),onChange:e=>y(t,a,{min:String(e??"")})}),i(o,{size:"x-large",placeholder:s,addonBefore:i("span",{children:"₺"}),onChange:e=>y(t,a,{max:String(e??"")})})]},a):e(n,{children:[i(h,{size:"x-large",placeholder:c,"aria-label":c,onChange:e=>y(t,a,{start:String(e??"")})}),i(h,{size:"x-large",placeholder:p,"aria-label":p,onChange:e=>y(t,a,{end:String(e??"")})})]},a))})},T=({cats:e,idPrefix:t,wide:n})=>{const[r,d]=a(e[0]?.value??"all"),l=i(u,{options:e,value:r,onChange:d,idPrefix:t});return n?i("div",{className:"hub__hist-cats--wide",children:l}):l},v=({children:e})=>i("span",{className:"hub__hist-amount",children:e}),S=({data:a,onFilter:n,cats:r,providers:s,statuses:o,onDetail:m,marker:h={list:"inn-mobile-game-history-list",methods:"inn-mobile-game-history-list-methods",item:"inn-mobile-game-history-list-item"},tokenTitle:c="Fiş",gameTitle:p="Oyun",startTitle:k="Başlangıç",endTitle:u="Bitiş",oldBalTitle:x="Eski Bakiye",newBalTitle:f="Yeni Bakiye",winTitle:S="Kazanma",detailLabel:B="Detay"})=>{const _=[{key:"token",dataIndex:"key",title:c,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"game",dataIndex:"game",title:p,maxWidth:200,render:(e,t)=>i(g,{name:t.game,desc:t.cat})},{key:"start",dataIndex:"start",title:k,width:130,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:u,width:130,render:e=>i(w,{v:String(e)})},{key:"oldBal",dataIndex:"oldBal",title:x,width:130},{key:"newBal",dataIndex:"newBal",title:f,width:130},{key:"win",dataIndex:"win",title:S,width:120,align:"right",render:e=>i(v,{children:String(e)})},{key:"details",dataIndex:"key",title:"",width:100,render:(t,a)=>i("span",{className:"hub__pay-actions",children:e(l,{variant:"solid",size:"medium",onClick:()=>m(a),children:[i(d,{size:13}),B]})})}];return e(t,{children:[i(T,{cats:r,idPrefix:"gh"}),i(I,{onFilter:n,cols:2,filters:[{kind:"select",options:s},{kind:"select",options:o},{kind:"daterange"}]}),i(y,{columns:_,data:a,cellHeight:"54px",marker:h})]})},B=({data:a,onFilter:n,cats:r,methods:d,statuses:l,types:s,marker:o={list:"inn-mobile-payment-history-list",methods:"inn-mobile-payment-history-list-methods",item:"inn-mobile-payment-history-list-item"},idTitle:m="Id",providerTitle:h="Sağlayıcı",statusTitle:c="Durum",dateTitle:p="Tarih",oldBalTitle:k="Eski Bakiye",newBalTitle:u="Yeni Bakiye",amountTitle:f="Miktar"})=>{const S=[{key:"id",dataIndex:"key",title:m,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"name",dataIndex:"name",title:h,maxWidth:200,render:(e,t)=>i(g,{name:t.name,desc:t.sub})},{key:"status",dataIndex:"status",title:c,width:130,render:e=>i(x,{s:String(e)})},{key:"date",dataIndex:"date",title:p,width:130,render:e=>i(w,{v:String(e)})},{key:"oldBal",dataIndex:"oldBal",title:k,width:130},{key:"newBal",dataIndex:"newBal",title:u,width:130},{key:"amount",dataIndex:"amount",title:f,width:120,align:"right",render:e=>i(v,{children:String(e)})}];return e(t,{children:[i(T,{cats:r,idPrefix:"ph"}),i(I,{onFilter:n,cols:3,filters:[{kind:"select",options:d},{kind:"select",options:l},{kind:"select",options:s},{kind:"minmax"},{kind:"daterange"}]}),i(y,{columns:S,data:a,cellHeight:"54px",marker:o})]})},_=({data:a,onFilter:n,cats:r,creators:d,statuses:l,types:s,marker:o={list:"inn-mobile-bonus-history-list",methods:"inn-mobile-bonus-history-list-methods",item:"inn-mobile-bonus-history-list-item"},nameTitle:m="İsim",catTitle:h="Kategori",statusTitle:c="Durum",applyTitle:p="Başvuru Tarihi",finishTitle:k="Tamamlanma",profitTitle:u="Net Kar",cashbackTitle:b="Geri Ödeme",amountTitle:f="Bonus Miktarı",creatorLabel:S="Oluşturan: "})=>{const B=[{key:"name",dataIndex:"name",title:m,maxWidth:200,render:(e,t)=>i(g,{name:t.name,desc:t.sub,creator:t.creator,creatorLabel:S})},{key:"cat",dataIndex:"cat",title:h,width:90},{key:"status",dataIndex:"status",title:c,width:150,render:e=>i(x,{s:String(e)})},{key:"apply",dataIndex:"apply",title:p,width:145,render:e=>i(w,{v:String(e)})},{key:"finish",dataIndex:"finish",title:k,width:145,render:e=>i(w,{v:String(e)})},{key:"profit",dataIndex:"profit",title:u,width:100},{key:"cashback",dataIndex:"cashback",title:b,width:110},{key:"amount",dataIndex:"amount",title:f,width:120,align:"right",render:e=>i(v,{children:String(e)})}];return e(t,{children:[i(T,{cats:r,idPrefix:"bh",wide:!0}),i(I,{onFilter:n,cols:3,filters:[{kind:"select",options:d},{kind:"select",options:l},{kind:"select",options:s},{kind:"minmax"},{kind:"daterange"}]}),i(y,{columns:B,data:a,cellHeight:"54px",marker:o})]})},z=({data:a,onFilter:n,providers:o,statuses:m,onGames:h,marker:u={list:"inn-mobile-free-spin-history-list",methods:"inn-mobile-free-spin-history-list-methods",item:"inn-mobile-free-spin-history-list-item"},idTitle:f="Id",providerTitle:T="Sağlayıcı",winTitle:S="Kazanç",statusTitle:B="Durum",gamesTitle:_="Oyun Sayısı",spinsTitle:z="Spin Sayısı",startTitle:j="Başlangıç",endTitle:C="Bitiş",gamesTooltip:F="Free Spin Oyunları",viewGamesLabel:P="Geçerli Oyunları Görüntüle"})=>{const N=[{key:"id",dataIndex:"key",title:f,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"provider",dataIndex:"provider",title:T,maxWidth:200,render:(e,t)=>i(g,{name:t.provider})},{key:"status",dataIndex:"status",title:S,width:140,render:e=>i(x,{s:String(e)})},{key:"games",dataIndex:"games",title:_,width:120,render:(t,a)=>e("span",{className:"hub__hist-count",children:[i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(t)}),e(c,{children:[i(p,{asChild:!0,children:i(l,{variant:"ghost",size:"icon-sm","aria-label":F,onClick:()=>h(a),children:i(d,{size:13})})}),i(k,{placement:"top",children:F})]})]})},{key:"spins",dataIndex:"spins",title:z,width:110,render:e=>i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(e)})},{key:"start",dataIndex:"start",title:j,width:145,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:C,width:145,render:e=>i(w,{v:String(e)})},{key:"won",dataIndex:"won",title:S,width:110,align:"right",render:e=>i(v,{children:String(e)})}],D=[{key:"id",dataIndex:"key",title:f,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"provider",dataIndex:"provider",title:T,maxWidth:200,render:(e,t)=>i(g,{name:t.provider})},{key:"status",dataIndex:"status",title:B,width:140,render:e=>i(x,{s:String(e)})},{key:"games",dataIndex:"games",title:_,width:120,render:e=>i(v,{children:String(e)})},{key:"spins",dataIndex:"spins",title:z,width:110,render:e=>i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(e)})},{key:"start",dataIndex:"start",title:j,width:145,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:C,width:145,render:e=>i(w,{v:String(e)})},{key:"won",dataIndex:"won",title:S,width:110,render:e=>i(v,{children:String(e)})},{key:"actions",dataIndex:"key",title:"",width:220,render:(t,a)=>i("span",{className:"hub__pay-actions hub__pay-actions--full",children:e(l,{variant:"solid",size:"medium",onClick:()=>h(a),children:[i(r,{size:14}),P]})})}];return e(t,{children:[i(I,{onFilter:n,cols:4,filters:[{kind:"select",options:o},{kind:"select",options:m},{kind:"daterange"}]}),i(y,{columns:N,mobileColumns:D,data:a,cellHeight:"54px",marker:u})]})};export{_ as HubBonusHistory,z as HubFreespinHistory,S as HubGameHistory,B as HubPaymentHistory};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as a,jsx as l}from"react/jsx-runtime";import{useState as i}from"react";import{Crown as n,Medal as r,TrendingUp as s,Gamepad2 as d,Folder as t,Trophy as c,FileQuestion as h,User as m,ChevronRight as o,Info as u}from"lucide-react";import _ from"../../button/index.js";import b from"../../progress/index.js";import p from"../../select/index.js";import v from"../../table/index.js";import{Avatar as g}from"../../avatar/index.js";import{HoverCard as N}from"../../hovercard/HoverCard.js";import{HoverCardTrigger as f}from"../../hovercard/HoverCardTrigger.js";import{HoverCardContent as y}from"../../hovercard/HoverCardContent.js";import{Sheet as w,SheetTrigger as k,SheetContent as x,SheetHeader as L,SheetTitle as C}from"../../dialog/Dialog.js";import{SelectItem as T}from"../../select/SelectItem.js";const S=({Icon:a})=>l("span",{className:"hub__medal-shape","aria-hidden":!0,children:e("span",{className:"hub__medal-hexwrap",children:[e("svg",{className:"hub__medal-hexsvg",viewBox:"0 0 48 54",children:[l("defs",{children:e("linearGradient",{id:"hub-gold",x1:"0",y1:"0",x2:"1",y2:"1",children:[l("stop",{offset:"0",stopColor:"#ffd54d"}),l("stop",{offset:"0.55",stopColor:"#f1ab00"}),l("stop",{offset:"1",stopColor:"#d98e00"})]})}),l("path",{d:"M28.3 3.55 L41.7 11.45 Q46 14 46 19 L46 35 Q46 40 41.7 42.55 L28.3 50.45 Q24 53 19.7 50.45 L6.3 42.55 Q2 40 2 35 L2 19 Q2 14 6.3 11.45 L19.7 3.55 Q24 1 28.3 3.55 Z",fill:"url(#hub-gold)"})]}),l("span",{className:"hub__medal-glyph",children:l(a,{})})]})}),j=({medal:a,onOpen:i})=>e("button",{type:"button",className:"hub__medal"+(a.locked?" hub__medal--locked":""),onClick:()=>i(a),children:[l("span",{className:"hub__medal-visual",children:l(S,{Icon:a.Icon})}),e("span",{className:"hub__medal-bottom",children:[l("span",{className:"hub__medal-name",children:a.name}),l("span",{className:"hub__medal-countwrap",children:e("span",{className:"hub__medal-count",children:[l(m,{"aria-hidden":!0}),a.count]})})]})]}),z=({medal:a,durationLabel:i="Süre",quantityLabel:n="Miktar",earnersLabel:r="Hakeden Sayısı"})=>e("div",{className:"hub__medal-detail",children:[l("span",{className:"hub__medal-visual",children:l(S,{Icon:a.Icon})}),l("div",{className:"hub__medal-detail-name",children:a.name}),l("p",{className:"hub__medal-detail-desc",children:a.description}),e("dl",{className:"hub__medal-detail-rows",children:[e("div",{children:[l("dt",{children:i}),l("dd",{children:a.duration})]}),e("div",{children:[l("dt",{children:n}),l("dd",{children:a.quantity})]}),e("div",{children:[l("dt",{children:r}),l("dd",{children:a.count})]})]})]}),I=({marker:a,icon:i,title:n,titleExtra:r,action:s,children:d})=>e("section",{className:a?a+" hub__box":"hub__box",children:[e("div",{className:"inn-sub-page-header hub__box-head",children:[e("span",{className:"hub__box-title",children:[i,n,r]}),s]}),l("hr",{className:"hub__hairline"}),d]}),O=({stats:a})=>l("div",{className:"hub__stats",children:a.map((a,i)=>e("div",{className:"hub__stat",children:[l("div",{className:"hub__stat-label",children:a.label}),l("div",{className:"hub__stat-value",children:a.value})]},i))}),D=({label:a,onClick:i})=>e(_,{variant:"link",size:"x-small",className:"hub__details",onClick:i,children:[a,l(o,{"aria-hidden":!0})]}),K=({user:i,vip:c,medals:h,stats:m,topSlots:o,onMedalOpen:u,onVipClub:p,onMedalsDetail:v,onStatsDetail:N,vipClubLabel:f="VIP Klübü",medalsTitle:y="Madalyalar",statsTitle:w="İstatistikler",topSlotsTitle:k="En Çok Oynadığınız Slot Oyunları",liveTitle:x="En Çok Oynadığınız Canlı Casino Oyunları",detailsLabel:L="Detaylar",cevrimLabel:C="Çevrim",noDataLabel:T="Veri Yok"})=>e(a,{children:[e("div",{className:"inn-user-profile-summary hub__profile hub__profile--user",children:[i.avatar??l(g,{className:"hub__avatar hub__avatar--user","aria-hidden":!0}),e("div",{children:[l("div",{className:"hub__username",children:i.username}),null!=i.fullname&&l("div",{className:"hub__fullname",children:i.fullname})]})]}),e("section",{className:"inn-vip-level-summary hub__vip",children:[e("div",{className:"hub__vip-head",children:[e("div",{className:"hub__vip-meta",children:[l("div",{className:"inn-vip-level-title hub__vip-title",children:c.title}),l("span",{className:"hub__vip-dp",children:c.dp})]}),e(_,{size:"small",className:"hub__vip-btn",onClick:p,children:[l(n,{"aria-hidden":!0}),f]})]}),e("div",{className:"inn-vip-level-progress hub__vip-progress",children:[l(b,{percent:c.percent,showInfo:!1,status:"success"}),l("span",{className:"hub__vip-next",children:c.nextText})]})]}),l(I,{marker:"inn-medals-summary-box",icon:l(r,{"aria-hidden":!0}),title:y,action:l(D,{label:L,onClick:v}),children:l("div",{className:"inn-medals-summary hub__medals",children:h.slice(0,8).map(e=>l(j,{medal:e,onOpen:u},e.name))})}),l(I,{icon:l(s,{"aria-hidden":!0}),title:w,action:l(D,{label:L,onClick:N}),children:l(O,{stats:m})}),l(I,{marker:"inn-favorite-casino-games-summary-box",icon:l(d,{"aria-hidden":!0}),title:k,children:l("div",{className:"inn-favorite-casino-games-summary hub__games",children:o.map(a=>e("div",{className:"hub__game",children:[l("span",{className:"hub__game-art hub__game-art--"+a.art,"aria-hidden":!0,children:a.emoji}),e("div",{className:"hub__game-info",children:[l("div",{className:"hub__game-name",children:a.name}),e("div",{children:[l("div",{className:"hub__game-amount",children:a.amount}),l("div",{className:"hub__game-cur",children:C})]})]})]},a.name))})}),l(I,{marker:"inn-favorite-live-casino-games-summary-box",icon:l(d,{"aria-hidden":!0}),title:x,children:l("div",{className:"inn-favorite-live-casino-games-summary hub__games",children:[1,2,3].map(a=>e("div",{className:"hub__game hub__game--empty",children:[l(t,{"aria-hidden":!0}),l("span",{className:"hub__empty-text",children:T})]},a))})})]}),M=({tips:a,unitLabel:i="madalya:",winLabel:n="ödül kazan"})=>l("div",{className:"hub__reward-tips",children:a.map(([a,r],s)=>e("span",{className:"hub__reward-tip",children:[a," ",i," ",l("b",{children:r})," ",n]},s))}),Q=({tips:i,sheetTitle:n,unitLabel:r,winLabel:s})=>e(a,{children:[l("span",{className:"hub__reward-info hub__reward-info--hover",children:e(N,{children:[l(f,{children:l(u,{"aria-hidden":!0,className:"hub__reward-info-icon"})}),l(y,{variant:"filled",children:l(M,{tips:i,unitLabel:r,winLabel:s})})]})}),l("span",{className:"hub__reward-info hub__reward-info--sheet",children:e(w,{children:[l(k,{asChild:!0,children:l("button",{type:"button",className:"hub__reward-info-btn","aria-label":"string"==typeof n?n:void 0,children:l(u,{"aria-hidden":!0,className:"hub__reward-info-icon"})})}),e(x,{side:"bottom",children:[l(L,{children:l(C,{children:n})}),l(M,{tips:i,unitLabel:r,winLabel:s})]})]})})]}),E=e=>{const a=e.currentTarget.querySelector(".hub__reward-art");a&&(a.classList.add("shake"),a.addEventListener("animationend",()=>a.classList.remove("shake"),{once:!0}))},H=({medals:i,rewardTiers:n,rewardTips:s,rewardPercent:d=10,onMedalOpen:t,rewardsTitle:h="Ödüller",rewardsSheetTitle:m="Ödül Detayları",rewardUnitLabel:o="madalya:",rewardWinLabel:u="ödül kazan",earnedTitle:_="Kazançlarınız",earnedCountText:p="2 / 20 Hakedildi",awaitingTitle:v="Kilidi Açılması Bekleyenler"})=>e(a,{children:[e(I,{icon:l(c,{"aria-hidden":!0}),title:h,titleExtra:l(Q,{tips:s,sheetTitle:m,unitLabel:o,winLabel:u}),children:[l("div",{className:"hub__rewards",children:n.map(({label:a,emoji:i,lockable:n})=>e("div",{className:"hub__reward"+(n?" hub__reward--lockable":""),...n?{onClick:E}:{},children:[l("span",{className:"hub__reward-art","aria-hidden":!0,children:i}),l("span",{className:"hub__reward-label",children:a})]},a))}),l("div",{className:"hub__rewards-progress",children:l(b,{percent:d,showInfo:!1,status:"success"})})]}),l(I,{marker:"inn-completed-medals",icon:l(r,{"aria-hidden":!0}),title:_,action:l("span",{className:"hub__box-count",children:p}),children:l("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>!e.locked).map(e=>l(j,{medal:e,onOpen:t},e.name))})}),l(I,{marker:"inn-awaiting-unlocking-medals",icon:l(r,{"aria-hidden":!0}),title:v,children:l("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>e.locked).map(e=>l(j,{medal:e,onOpen:t},e.name))})})]}),P="__all__",B=(e,a)=>{const l=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e&&""!==e);if(0===l.length)return[P];const i=a.includes(P),n=l.includes(P);return n&&!i?[P]:n&&l.length>1?l.filter(e=>e!==P):l},V=({gameStats:n,categories:r,providers:d,stats:t,gameTitle:c="Oyun",winTitle:m="Kazanma",betTitle:o="Bahis",wageredTitle:u="Çevrim",statsTitle:_="İstatistikler",categoryPlaceholder:b="Tüm Kategoriler",providerPlaceholder:g="Tüm Sağlayıcılar",gamePlaceholder:N="Tüm Oyunlar",selectionLabel:f="Seçim",casinoRelabel:y="Slotlar",noDataLabel:w="Veri Yok",onStatsFilter:k})=>{const[x,L]=i(""),[C,S]=i([P]),[j,z]=i([P]),D=n.filter(e=>(!x||e.category===x)&&(C.includes(P)||C.includes(e.provider))&&(j.includes(P)||j.includes(e.game))),K=e=>k?.({category:x,providers:C,games:j,...e}),M=[{dataIndex:"game",key:"game",title:c,render:(a,i)=>e("span",{className:"hub__cell-game",children:[l("span",{className:"hub__cell-big",children:String(a)}),l("span",{className:"hub__cell-sub",children:i.category+" / "+i.provider})]})},{dataIndex:"win",key:"win",title:m,render:e=>l("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"bet",key:"bet",title:o,render:e=>l("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"wagered",key:"wagered",title:u,width:"120px",render:e=>l("span",{className:"hub__cell-big hub__cell-cur",children:String(e)})}];return e(a,{children:[e("div",{className:"hub__filterbar",children:[e(p,{size:"x-large",placeholder:b,value:x,onChange:e=>{const a=e?String(e):"";L(a),K({category:a})},"aria-label":"Kategori",children:[l(T,{value:"",children:b}),r.map(e=>l(T,{value:e,children:"Casino"===e?y:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:g,"aria-label":"Sağlayıcı",value:C,label:C.includes(P)?void 0:f+" ("+C.length+")",onChange:e=>{const a=B(e,C);S(a),K({providers:a})},children:[l(T,{value:P,children:g}),d.map(e=>l(T,{value:e,children:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:N,"aria-label":"Oyun",value:j,label:j.includes(P)?void 0:f+" ("+j.length+")",onChange:e=>{const a=B(e,j);z(a),K({games:a})},children:[l(T,{value:P,children:N}),n.map(e=>l(T,{value:e.game,children:e.game},e.key))]})]}),l(I,{icon:l(s,{"aria-hidden":!0}),title:_,children:l(O,{stats:t})}),l("section",{className:"inn-statistics-game-stats-table hub__box hub__box--flush hub__stat-table",children:D.length>0?l(v,{columns:M,data:D,size:"medium",headerBg:!1}):e("div",{className:"hub__nodata",children:[l(h,{"aria-hidden":!0}),l("span",{className:"hub__empty-text",children:w})]})})]})};export{j as HubMedalButton,z as HubMedalDetail,H as HubMedals,K as HubProfileSummary,V as HubStatistics};
1
+ import{jsxs as e,jsx as a,Fragment as l}from"react/jsx-runtime";import{useState as i}from"react";import{User as n,Trophy as r,Medal as s,Crown as d,TrendingUp as t,Gamepad2 as c,Folder as h,FileQuestion as m,Info as o,ChevronRight as u}from"lucide-react";import _ from"../../button/index.js";import b from"../../progress/index.js";import p from"../../select/index.js";import v from"../../table/index.js";import{Avatar as g}from"../../avatar/index.js";import{HoverCard as N}from"../../hovercard/HoverCard.js";import{HoverCardTrigger as f}from"../../hovercard/HoverCardTrigger.js";import{HoverCardContent as y}from"../../hovercard/HoverCardContent.js";import{Sheet as w,SheetTrigger as k,SheetContent as x,SheetHeader as L,SheetTitle as C}from"../../dialog/Dialog.js";import{SelectItem as T}from"../../select/SelectItem.js";const S=({Icon:l})=>a("span",{className:"hub__medal-shape","aria-hidden":!0,children:e("span",{className:"hub__medal-hexwrap",children:[e("svg",{className:"hub__medal-hexsvg",viewBox:"0 0 48 54",children:[a("defs",{children:e("linearGradient",{id:"hub-gold",x1:"0",y1:"0",x2:"1",y2:"1",children:[a("stop",{offset:"0",stopColor:"#ffd54d"}),a("stop",{offset:"0.55",stopColor:"#f1ab00"}),a("stop",{offset:"1",stopColor:"#d98e00"})]})}),a("path",{d:"M28.3 3.55 L41.7 11.45 Q46 14 46 19 L46 35 Q46 40 41.7 42.55 L28.3 50.45 Q24 53 19.7 50.45 L6.3 42.55 Q2 40 2 35 L2 19 Q2 14 6.3 11.45 L19.7 3.55 Q24 1 28.3 3.55 Z",fill:"url(#hub-gold)"})]}),a("span",{className:"hub__medal-glyph",children:a(l,{})})]})}),j=({medal:l,onOpen:i})=>e("button",{type:"button",className:"hub__medal"+(l.locked?" hub__medal--locked":""),onClick:()=>i(l),children:[a("span",{className:"hub__medal-visual",children:a(S,{Icon:l.Icon})}),e("span",{className:"hub__medal-bottom",children:[a("span",{className:"hub__medal-name",children:l.name}),a("span",{className:"hub__medal-countwrap",children:e("span",{className:"hub__medal-count",children:[a(n,{"aria-hidden":!0}),l.count]})})]})]}),z=({medal:l,durationLabel:i="Süre",quantityLabel:n="Miktar",earnersLabel:r="Hakeden Sayısı"})=>e("div",{className:"hub__medal-detail",children:[a("span",{className:"hub__medal-visual",children:a(S,{Icon:l.Icon})}),a("div",{className:"hub__medal-detail-name",children:l.name}),a("p",{className:"hub__medal-detail-desc",children:l.description}),e("dl",{className:"hub__medal-detail-rows",children:[e("div",{children:[a("dt",{children:i}),a("dd",{children:l.duration})]}),e("div",{children:[a("dt",{children:n}),a("dd",{children:l.quantity})]}),e("div",{children:[a("dt",{children:r}),a("dd",{children:l.count})]})]})]}),I=({marker:l,icon:i,title:n,titleExtra:r,action:s,children:d})=>e("section",{className:l?l+" hub__box":"hub__box",children:[e("div",{className:"inn-sub-page-header hub__box-head",children:[e("span",{className:"hub__box-title",children:[i,n,r]}),s]}),a("hr",{className:"hub__hairline"}),d]}),O=({stats:l})=>a("div",{className:"hub__stats",children:l.map((l,i)=>e("div",{className:"hub__stat",children:[a("div",{className:"hub__stat-label",children:l.label}),a("div",{className:"hub__stat-value",children:l.value})]},i))}),D=({label:l,onClick:i})=>e(_,{variant:"link",size:"x-small",className:"hub__details",onClick:i,children:[l,a(u,{"aria-hidden":!0})]}),K=({user:i,vip:n,medals:r,stats:m,topSlots:o,onMedalOpen:u,onVipClub:p,onMedalsDetail:v,onStatsDetail:N,vipClubLabel:f="VIP Klübü",medalsTitle:y="Madalyalar",statsTitle:w="İstatistikler",topSlotsTitle:k="En Çok Oynadığınız Slot Oyunları",liveTitle:x="En Çok Oynadığınız Canlı Casino Oyunları",detailsLabel:L="Detaylar",cevrimLabel:C="Çevrim",noDataLabel:T="Veri Yok"})=>e(l,{children:[e("div",{className:"inn-user-profile-summary hub__profile hub__profile--user",children:[i.avatar??a(g,{className:"hub__avatar hub__avatar--user","aria-hidden":!0}),e("div",{children:[a("div",{className:"hub__username",children:i.username}),null!=i.fullname&&a("div",{className:"hub__fullname",children:i.fullname})]})]}),e("section",{className:"inn-vip-level-summary hub__vip",children:[e("div",{className:"hub__vip-head",children:[e("div",{className:"hub__vip-meta",children:[a("div",{className:"inn-vip-level-title hub__vip-title",children:n.title}),a("span",{className:"hub__vip-dp",children:n.dp})]}),e(_,{size:"small",className:"hub__vip-btn",onClick:p,children:[a(d,{"aria-hidden":!0}),f]})]}),e("div",{className:"inn-vip-level-progress hub__vip-progress",children:[a(b,{percent:n.percent,showInfo:!1,status:"success"}),a("span",{className:"hub__vip-next",children:n.nextText})]})]}),a(I,{marker:"inn-medals-summary-box",icon:a(s,{"aria-hidden":!0}),title:y,action:a(D,{label:L,onClick:v}),children:a("div",{className:"inn-medals-summary hub__medals",children:r.slice(0,8).map(e=>a(j,{medal:e,onOpen:u},e.name))})}),a(I,{icon:a(t,{"aria-hidden":!0}),title:w,action:a(D,{label:L,onClick:N}),children:a(O,{stats:m})}),a(I,{marker:"inn-favorite-casino-games-summary-box",icon:a(c,{"aria-hidden":!0}),title:k,children:a("div",{className:"inn-favorite-casino-games-summary hub__games",children:o.map(l=>e("div",{className:"hub__game",children:[a("span",{className:"hub__game-art hub__game-art--"+l.art,"aria-hidden":!0,children:l.emoji}),e("div",{className:"hub__game-info",children:[a("div",{className:"hub__game-name",children:l.name}),e("div",{children:[a("div",{className:"hub__game-amount",children:l.amount}),a("div",{className:"hub__game-cur",children:C})]})]})]},l.name))})}),a(I,{marker:"inn-favorite-live-casino-games-summary-box",icon:a(c,{"aria-hidden":!0}),title:x,children:a("div",{className:"inn-favorite-live-casino-games-summary hub__games",children:[1,2,3].map(l=>e("div",{className:"hub__game hub__game--empty",children:[a(h,{"aria-hidden":!0}),a("span",{className:"hub__empty-text",children:T})]},l))})})]}),M=({tips:l,unitLabel:i="madalya:",winLabel:n="ödül kazan"})=>a("div",{className:"hub__reward-tips",children:l.map(([l,r],s)=>e("span",{className:"hub__reward-tip",children:[l," ",i," ",a("b",{children:r})," ",n]},s))}),Q=({tips:i,sheetTitle:n,unitLabel:r,winLabel:s})=>e(l,{children:[a("span",{className:"hub__reward-info hub__reward-info--hover",children:e(N,{children:[a(f,{children:a(o,{"aria-hidden":!0,className:"hub__reward-info-icon"})}),a(y,{variant:"filled",children:a(M,{tips:i,unitLabel:r,winLabel:s})})]})}),a("span",{className:"hub__reward-info hub__reward-info--sheet",children:e(w,{children:[a(k,{asChild:!0,children:a("button",{type:"button",className:"hub__reward-info-btn","aria-label":"string"==typeof n?n:void 0,children:a(o,{"aria-hidden":!0,className:"hub__reward-info-icon"})})}),e(x,{side:"bottom",children:[a(L,{children:a(C,{children:n})}),a(M,{tips:i,unitLabel:r,winLabel:s})]})]})})]}),E=e=>{const a=e.currentTarget.querySelector(".hub__reward-art");a&&(a.classList.add("shake"),a.addEventListener("animationend",()=>a.classList.remove("shake"),{once:!0}))},H=({medals:i,rewardTiers:n,rewardTips:d,rewardPercent:t=10,onMedalOpen:c,rewardsTitle:h="Ödüller",rewardsSheetTitle:m="Ödül Detayları",rewardUnitLabel:o="madalya:",rewardWinLabel:u="ödül kazan",earnedTitle:_="Kazançlarınız",earnedCountText:p="2 / 20 Hakedildi",awaitingTitle:v="Kilidi Açılması Bekleyenler"})=>e(l,{children:[e(I,{icon:a(r,{"aria-hidden":!0}),title:h,titleExtra:a(Q,{tips:d,sheetTitle:m,unitLabel:o,winLabel:u}),children:[a("div",{className:"hub__rewards",children:n.map(({label:l,emoji:i,lockable:n})=>e("div",{className:"hub__reward"+(n?" hub__reward--lockable":""),...n?{onClick:E}:{},children:[a("span",{className:"hub__reward-art","aria-hidden":!0,children:i}),a("span",{className:"hub__reward-label",children:l})]},l))}),a("div",{className:"hub__rewards-progress",children:a(b,{percent:t,showInfo:!1,status:"success"})})]}),a(I,{marker:"inn-completed-medals",icon:a(s,{"aria-hidden":!0}),title:_,action:a("span",{className:"hub__box-count",children:p}),children:a("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>!e.locked).map(e=>a(j,{medal:e,onOpen:c},e.name))})}),a(I,{marker:"inn-awaiting-unlocking-medals",icon:a(s,{"aria-hidden":!0}),title:v,children:a("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>e.locked).map(e=>a(j,{medal:e,onOpen:c},e.name))})})]}),P="__all__",B=(e,a)=>{const l=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e&&""!==e);if(0===l.length)return[P];const i=a.includes(P),n=l.includes(P);return n&&!i?[P]:n&&l.length>1?l.filter(e=>e!==P):l},V=({gameStats:n,categories:r,providers:s,stats:d,gameTitle:c="Oyun",winTitle:h="Kazanma",betTitle:o="Bahis",wageredTitle:u="Çevrim",statsTitle:_="İstatistikler",categoryPlaceholder:b="Tüm Kategoriler",providerPlaceholder:g="Tüm Sağlayıcılar",gamePlaceholder:N="Tüm Oyunlar",selectionLabel:f="Seçim",casinoRelabel:y="Slotlar",noDataLabel:w="Veri Yok",onStatsFilter:k})=>{const[x,L]=i(""),[C,S]=i([P]),[j,z]=i([P]),D=n.filter(e=>(!x||e.category===x)&&(C.includes(P)||C.includes(e.provider))&&(j.includes(P)||j.includes(e.game))),K=e=>k?.({category:x,providers:C,games:j,...e}),M=[{dataIndex:"game",key:"game",title:c,render:(l,i)=>e("span",{className:"hub__cell-game",children:[a("span",{className:"hub__cell-big",children:String(l)}),a("span",{className:"hub__cell-sub",children:i.category+" / "+i.provider})]})},{dataIndex:"win",key:"win",title:h,render:e=>a("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"bet",key:"bet",title:o,render:e=>a("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"wagered",key:"wagered",title:u,width:"120px",render:e=>a("span",{className:"hub__cell-big hub__cell-cur",children:String(e)})}];return e(l,{children:[e("div",{className:"hub__filterbar",children:[e(p,{size:"x-large",placeholder:b,value:x,onChange:e=>{const a=e?String(e):"";L(a),K({category:a})},"aria-label":"Kategori",children:[a(T,{value:"",children:b}),r.map(e=>a(T,{value:e,children:"Casino"===e?y:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:g,"aria-label":"Sağlayıcı",value:C,label:C.includes(P)?void 0:f+" ("+C.length+")",onChange:e=>{const a=B(e,C);S(a),K({providers:a})},children:[a(T,{value:P,children:g}),s.map(e=>a(T,{value:e,children:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:N,"aria-label":"Oyun",value:j,label:j.includes(P)?void 0:f+" ("+j.length+")",onChange:e=>{const a=B(e,j);z(a),K({games:a})},children:[a(T,{value:P,children:N}),n.map(e=>a(T,{value:e.game,children:e.game},e.key))]})]}),a(I,{icon:a(t,{"aria-hidden":!0}),title:_,children:a(O,{stats:d})}),a("section",{className:"inn-statistics-game-stats-table hub__box hub__box--flush hub__stat-table",children:D.length>0?a(v,{columns:M,data:D,size:"medium",headerBg:!1}):e("div",{className:"hub__nodata",children:[a(m,{"aria-hidden":!0}),a("span",{className:"hub__empty-text",children:w})]})})]})};export{j as HubMedalButton,z as HubMedalDetail,H as HubMedals,K as HubProfileSummary,V as HubStatistics};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as i,Fragment as t}from"react/jsx-runtime";import{useState as a}from"react";import{ImageOff as n,Clock as l}from"lucide-react";import s from"../../button/index.js";import r from"../../badge/index.js";import d from"../../alert/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as h}from"../../tooltip/TooltipContent.js";import{HubTable as o,HubCopyBtn as p,HubStatusBadge as u,HubDt as b}from"./table.js";import{AlertDescription as k}from"../../alert/Description.js";const _=({children:i})=>i?e(d,{type:"info",variant:"filled",children:e(k,{children:i})}):null,f=({start:t,end:a})=>i("span",{className:"hub__fsact-se",children:[e("span",{children:t}),e("span",{children:a})]}),y=({data:a,intro:n,onGames:r,marker:d={desktop:"inn-free-spin-activation-table",list:"inn-mobile-free-spin-activation-list",methods:"inn-mobile-free-spin-activation-list-items",item:"inn-mobile-freespin-activation-list-item"},idTitle:b="Id",brandTitle:k="Sağlayıcı Adı",datesTitle:y="Başlangıç / Bitiş",statusTitle:v="Durum",spinsTitle:T="Spin Sayısı",daysTitle:x="Geçerlilik",daysSuffix:N=" Gün",createdLabel:z="Oluşturulma Tarihi: ",viewGamesLabel:g="Oyunları Görüntüle"})=>{const I=[{key:"id",dataIndex:"key",title:b,width:44,render:(i,t)=>e(p,{value:t.key,compact:!0})},{key:"brand",dataIndex:"brand",title:k,maxWidth:460,render:(t,a)=>e("span",{className:"hub__pay-name hub__hist-nm",children:i("span",{className:"hub__bonus-name",children:[e("span",{className:"hub__bonus-title",children:a.brand}),i(c,{children:[e(m,{asChild:!0,children:e("i",{className:"hub__hist-creator","aria-label":z,children:e(l,{size:13})})}),e(h,{placement:"top",children:z+a.created})]})]})})},{key:"dates",dataIndex:"start",title:y,maxWidth:170,render:(i,t)=>e(f,{start:t.start,end:t.end})},{key:"status",dataIndex:"status",title:v,width:120,render:i=>e(u,{s:String(i)})},{key:"spins",dataIndex:"spins",title:T,width:90,render:i=>e("span",{className:"hub__fsact-num",children:String(i)})},{key:"days",dataIndex:"days",title:x,width:95,render:i=>e("span",{className:"hub__fsact-num",children:String(i)+N})},{key:"actions",dataIndex:"key",title:"",maxWidth:200,render:(i,t)=>e("span",{className:"hub__pay-actions",children:e(s,{variant:"default",size:"medium",onClick:()=>r(t),children:g})})}];return i(t,{children:[e(_,{children:n}),e(o,{columns:I,data:a,cellHeight:"84px",marker:d})]})},v=({name:t})=>i(c,{children:[e(m,{asChild:!0,children:e("span",{className:"hub__pay-name hub__hist-nm",children:e("span",{className:"hub__hist-name",children:t})})}),e(h,{placement:"top",children:t})]}),T={"Teslim Edildi":"success","Onay Bekliyor":"default",Reddedildi:"purple","Ulaşılamadı":"danger"},x=({s:i,tone:t=T})=>e(r,{variant:"default",color:t[i]??"default",size:"small",pill:!1,children:i}),N=({tickets:t})=>e("div",{className:"hub__tickets",children:t.map(t=>i("div",{className:"hub__ticket",children:[e("span",{children:t}),e(p,{value:t,compact:!0})]},t))}),z=({prizes:t,mainLabel:l="Asıl",reserveLabel:s="Yedek",emptyText:r="Bu listede bilet bulunmuyor.",reserveOrderLabel:d="Yedek Sırası:",ticketLabel:c="Bilet:",tone:m=T})=>{const[h,o]=a("main"),u=t.filter(e=>"reserve"===h?!!e.reserve:!e.reserve);return i("div",{className:"hub__prizes",children:[i("div",{className:"hub__prize-tabs",children:[e("button",{type:"button",className:"main"===h?"is-active":"",onClick:()=>o("main"),children:l}),e("button",{type:"button",className:"reserve"===h?"is-active":"",onClick:()=>o("reserve"),children:s})]}),0===u.length?e("div",{className:"hub__prize-empty",children:r}):e("div",{className:"hub__prize-list",children:u.map((t,a)=>i("div",{className:"hub__prize",children:[e("span",{className:"hub__prize-img",children:e(n,{size:22})}),i("div",{className:"hub__prize-body",children:[e("h4",{className:"hub__prize-title",children:t.name}),e("span",{children:e(x,{s:t.status,tone:m})}),t.reserve&&i("span",{className:"hub__prize-reserve",children:[e("b",{children:d})," ",(t.reserveOrder??0)+1]}),i("span",{className:"hub__prize-ticket",children:[e("b",{children:c}),e("span",{className:"hub__prize-code",children:t.ticket}),e(p,{value:t.ticket,compact:!0})]})]})]},t.ticket+"-"+a))})]})},g=(i,t,a,n,l,s)=>[{key:"id",dataIndex:"key",title:i,width:44,render:(i,t)=>e(p,{value:t.key,compact:!0})},{key:"name",dataIndex:"name",title:t,maxWidth:460,render:(i,t)=>e(v,{name:t.name})},{key:"start",dataIndex:"start",title:a,width:130,render:i=>e(b,{v:String(i)})},{key:"end",dataIndex:"end",title:n,width:130,render:i=>e(b,{v:String(i)})},{key:"status",dataIndex:"status",title:l,width:150,render:i=>e(u,{s:String(i)})},{key:"tickets",dataIndex:"tickets",title:s,width:110,render:(i,t)=>e("span",{className:"hub__fsact-num",children:t.tickets.length})}],I={idTitle:"Id",nameTitle:"İsim",startTitle:"Başlangıç",endTitle:"Bitiş",statusTitle:"Durum",ticketsTitle:"Bilet Sayısı"},j=({data:a,intro:n,onTickets:l,onDeposit:r,marker:d={desktop:"inn-active-raffles-table",list:"inn-mobile-active-raffles-list",methods:"inn-mobile-active-raffles-list-items",item:"inn-mobile-active-raffles-list-item"},ticketsLabel:c="Biletlerim",depositLabel:m="Yatırım Yapın Kazanın",...h})=>{const p={...I,...h},u=[...g(p.idTitle,p.nameTitle,p.startTitle,p.endTitle,p.statusTitle,p.ticketsTitle),{key:"actions",dataIndex:"key",title:"",maxWidth:220,render:(i,t)=>e("span",{className:"hub__pay-actions hub__pay-actions--full",children:t.tickets.length>0?e(s,{variant:"default",size:"medium",onClick:()=>l(t),children:c}):e(s,{variant:"default",size:"medium",onClick:r,children:m})})}];return i(t,{children:[e(_,{children:n}),e(o,{columns:u,data:a,cellHeight:"84px",marker:d})]})},S=({data:a,intro:n,onPrizes:l,onTickets:r,marker:d={desktop:"inn-joined-raffles-table",list:"inn-mobile-joined-raffles-list",methods:"inn-mobile-joined-raffles-list-items",item:"inn-mobile-joined-raffles-list-item"},prizesLabel:c="Ödüllerim",ticketsLabel:m="Biletlerim",...h})=>{const p={...I,...h},u=[...g(p.idTitle,p.nameTitle,p.startTitle,p.endTitle,p.statusTitle,p.ticketsTitle),{key:"actions",dataIndex:"key",title:"",maxWidth:320,render:(t,a)=>i("span",{className:"hub__pay-actions",children:[e(s,{variant:"default",size:"medium",disabled:!a.prizes||0===a.prizes.length,onClick:()=>l(a),children:c}),e(s,{variant:"default",size:"medium",disabled:0===a.tickets.length,onClick:()=>r(a),children:m})]})}];return i(t,{children:[e(_,{children:n}),e(o,{columns:u,data:a,cellHeight:"84px",marker:d})]})};export{T as HUB_PRIZE_TONE,y as HubFreespinActivation,z as HubPrizesModal,j as HubRaffleActive,S as HubRaffleJoined,N as HubTicketsModal};
1
+ import{jsxs as e,Fragment as i,jsx as t}from"react/jsx-runtime";import{useState as a}from"react";import{ImageOff as n,Clock as l}from"lucide-react";import s from"../../button/index.js";import r from"../../badge/index.js";import d from"../../alert/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as h}from"../../tooltip/TooltipContent.js";import{HubTable as o,HubCopyBtn as p,HubStatusBadge as u,HubDt as b}from"./table.js";import{AlertDescription as k}from"../../alert/Description.js";const _=({children:e})=>e?t(d,{type:"info",variant:"filled",children:t(k,{children:e})}):null,f=({start:i,end:a})=>e("span",{className:"hub__fsact-se",children:[t("span",{children:i}),t("span",{children:a})]}),y=({data:a,intro:n,onGames:r,marker:d={desktop:"inn-free-spin-activation-table",list:"inn-mobile-free-spin-activation-list",methods:"inn-mobile-free-spin-activation-list-items",item:"inn-mobile-freespin-activation-list-item"},idTitle:b="Id",brandTitle:k="Sağlayıcı Adı",datesTitle:y="Başlangıç / Bitiş",statusTitle:v="Durum",spinsTitle:T="Spin Sayısı",daysTitle:x="Geçerlilik",daysSuffix:N=" Gün",createdLabel:z="Oluşturulma Tarihi: ",viewGamesLabel:g="Oyunları Görüntüle"})=>{const I=[{key:"id",dataIndex:"key",title:b,width:44,render:(e,i)=>t(p,{value:i.key,compact:!0})},{key:"brand",dataIndex:"brand",title:k,maxWidth:460,render:(i,a)=>t("span",{className:"hub__pay-name hub__hist-nm",children:e("span",{className:"hub__bonus-name",children:[t("span",{className:"hub__bonus-title",children:a.brand}),e(c,{children:[t(m,{asChild:!0,children:t("i",{className:"hub__hist-creator","aria-label":z,children:t(l,{size:13})})}),t(h,{placement:"top",children:z+a.created})]})]})})},{key:"dates",dataIndex:"start",title:y,maxWidth:170,render:(e,i)=>t(f,{start:i.start,end:i.end})},{key:"status",dataIndex:"status",title:v,width:120,render:e=>t(u,{s:String(e)})},{key:"spins",dataIndex:"spins",title:T,width:90,render:e=>t("span",{className:"hub__fsact-num",children:String(e)})},{key:"days",dataIndex:"days",title:x,width:95,render:e=>t("span",{className:"hub__fsact-num",children:String(e)+N})},{key:"actions",dataIndex:"key",title:"",maxWidth:200,render:(e,i)=>t("span",{className:"hub__pay-actions",children:t(s,{variant:"default",size:"medium",onClick:()=>r(i),children:g})})}];return e(i,{children:[t(_,{children:n}),t(o,{columns:I,data:a,cellHeight:"84px",marker:d})]})},v=({name:i})=>e(c,{children:[t(m,{asChild:!0,children:t("span",{className:"hub__pay-name hub__hist-nm",children:t("span",{className:"hub__hist-name",children:i})})}),t(h,{placement:"top",children:i})]}),T={"Teslim Edildi":"success","Onay Bekliyor":"default",Reddedildi:"purple","Ulaşılamadı":"danger"},x=({s:e,tone:i=T})=>t(r,{variant:"default",color:i[e]??"default",size:"small",pill:!1,children:e}),N=({tickets:i})=>t("div",{className:"hub__tickets",children:i.map(i=>e("div",{className:"hub__ticket",children:[t("span",{children:i}),t(p,{value:i,compact:!0})]},i))}),z=({prizes:i,mainLabel:l="Asıl",reserveLabel:s="Yedek",emptyText:r="Bu listede bilet bulunmuyor.",reserveOrderLabel:d="Yedek Sırası:",ticketLabel:c="Bilet:",tone:m=T})=>{const[h,o]=a("main"),u=i.filter(e=>"reserve"===h?!!e.reserve:!e.reserve);return e("div",{className:"hub__prizes",children:[e("div",{className:"hub__prize-tabs",children:[t("button",{type:"button",className:"main"===h?"is-active":"",onClick:()=>o("main"),children:l}),t("button",{type:"button",className:"reserve"===h?"is-active":"",onClick:()=>o("reserve"),children:s})]}),0===u.length?t("div",{className:"hub__prize-empty",children:r}):t("div",{className:"hub__prize-list",children:u.map((i,a)=>e("div",{className:"hub__prize",children:[t("span",{className:"hub__prize-img",children:t(n,{size:22})}),e("div",{className:"hub__prize-body",children:[t("h4",{className:"hub__prize-title",children:i.name}),t("span",{children:t(x,{s:i.status,tone:m})}),i.reserve&&e("span",{className:"hub__prize-reserve",children:[t("b",{children:d})," ",(i.reserveOrder??0)+1]}),e("span",{className:"hub__prize-ticket",children:[t("b",{children:c}),t("span",{className:"hub__prize-code",children:i.ticket}),t(p,{value:i.ticket,compact:!0})]})]})]},i.ticket+"-"+a))})]})},g=(e,i,a,n,l,s)=>[{key:"id",dataIndex:"key",title:e,width:44,render:(e,i)=>t(p,{value:i.key,compact:!0})},{key:"name",dataIndex:"name",title:i,maxWidth:460,render:(e,i)=>t(v,{name:i.name})},{key:"start",dataIndex:"start",title:a,width:130,render:e=>t(b,{v:String(e)})},{key:"end",dataIndex:"end",title:n,width:130,render:e=>t(b,{v:String(e)})},{key:"status",dataIndex:"status",title:l,width:150,render:e=>t(u,{s:String(e)})},{key:"tickets",dataIndex:"tickets",title:s,width:110,render:(e,i)=>t("span",{className:"hub__fsact-num",children:i.tickets.length})}],I={idTitle:"Id",nameTitle:"İsim",startTitle:"Başlangıç",endTitle:"Bitiş",statusTitle:"Durum",ticketsTitle:"Bilet Sayısı"},j=({data:a,intro:n,onTickets:l,onDeposit:r,marker:d={desktop:"inn-active-raffles-table",list:"inn-mobile-active-raffles-list",methods:"inn-mobile-active-raffles-list-items",item:"inn-mobile-active-raffles-list-item"},ticketsLabel:c="Biletlerim",depositLabel:m="Yatırım Yapın Kazanın",...h})=>{const p={...I,...h},u=[...g(p.idTitle,p.nameTitle,p.startTitle,p.endTitle,p.statusTitle,p.ticketsTitle),{key:"actions",dataIndex:"key",title:"",maxWidth:220,render:(e,i)=>t("span",{className:"hub__pay-actions hub__pay-actions--full",children:i.tickets.length>0?t(s,{variant:"default",size:"medium",onClick:()=>l(i),children:c}):t(s,{variant:"default",size:"medium",onClick:r,children:m})})}];return e(i,{children:[t(_,{children:n}),t(o,{columns:u,data:a,cellHeight:"84px",marker:d})]})},S=({data:a,intro:n,onPrizes:l,onTickets:r,marker:d={desktop:"inn-joined-raffles-table",list:"inn-mobile-joined-raffles-list",methods:"inn-mobile-joined-raffles-list-items",item:"inn-mobile-joined-raffles-list-item"},prizesLabel:c="Ödüllerim",ticketsLabel:m="Biletlerim",...h})=>{const p={...I,...h},u=[...g(p.idTitle,p.nameTitle,p.startTitle,p.endTitle,p.statusTitle,p.ticketsTitle),{key:"actions",dataIndex:"key",title:"",maxWidth:320,render:(i,a)=>e("span",{className:"hub__pay-actions",children:[t(s,{variant:"default",size:"medium",disabled:!a.prizes||0===a.prizes.length,onClick:()=>l(a),children:c}),t(s,{variant:"default",size:"medium",disabled:0===a.tickets.length,onClick:()=>r(a),children:m})]})}];return e(i,{children:[t(_,{children:n}),t(o,{columns:u,data:a,cellHeight:"84px",marker:d})]})};export{T as HUB_PRIZE_TONE,y as HubFreespinActivation,z as HubPrizesModal,j as HubRaffleActive,S as HubRaffleJoined,N as HubTicketsModal};
@@ -1 +1 @@
1
- import{jsx as a,jsxs as e}from"react/jsx-runtime";import{useRef as i}from"react";import{Copy as l,User as r}from"lucide-react";import n from"../../button/index.js";import s from"../../badge/index.js";import d from"../../table/index.js";import t from"../../result/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as o}from"../../tooltip/TooltipContent.js";import{useHubMobile as h}from"./platform.js";const u=["name","brand","provider","subject","game"],p=({columns:i,data:l,list:r,methods:n,item:s})=>{const d=i.find(a=>"id"===a.key||"token"===a.key),t=i.find(a=>u.includes(String(a.key)))||i.find(a=>a.maxWidth)||i[1],c=i.find(a=>"status"===a.key),m=i.find(a=>""===a.title),o=i.filter(a=>a!==d&&a!==t&&a!==c&&a!==m),h=(a,e,i)=>a.render?a.render(e[a.dataIndex],e,i):e[a.dataIndex];return a("div",{className:r?r+" hub__mlist":"hub__mlist",children:a("div",{className:n,style:{display:"contents"},children:l.map((i,l)=>e("div",{className:s?s+" hub__mcard":"hub__mcard",children:[e("div",{className:"hub__mcard-head",children:[e("span",{className:"hub__mcard-title",children:[d&&a("span",{className:"hub__mcard-id",children:h(d,i,l)}),t&&a("span",{className:"hub__mcard-name",children:h(t,i,l)})]}),c&&a("span",{className:"hub__mcard-status",children:h(c,i,l)})]}),o.length>0&&a("hr",{className:"hub__mcard-sep"}),o.length>0&&(()=>{const r=i.img,n=i.square,s=a("div",{className:"hub__mcard-body",children:o.map(r=>e("div",{className:"hub__mcard-row",children:[a("span",{className:"hub__mcard-label",children:"string"==typeof r.title?r.title:""}),a("span",{className:"hub__mcard-val",children:h(r,i,l)})]},String(r.key)))});return r?e("div",{className:"hub__mcard-media",children:[a("span",{className:"hub__mcard-img"+(n?" hub__mcard-img--square":""),style:{backgroundImage:r},"aria-hidden":!0}),s]}):s})(),m&&a("div",{className:"hub__mcard-foot",children:h(m,i,l)})]},l))})})},_=({columns:e,data:l,cellHeight:r,mobileColumns:n,marker:s})=>{const t=i(null);return h(t)?a(p,{columns:n??e,data:l,list:s?.list,methods:s?.methods,item:s?.item}):a("div",{ref:t,className:(s?.desktop?s.desktop+" ":"")+"hub__paybox hub__pay-table",children:a(d,{columns:e,data:l,cellHeight:r,headerBg:!1})})},b={"Açık":"purple",Beklemede:"warning","Onaylandı":"success",Reddedildi:"danger","İptal Edildi":"info","Zaman Aşımı":"warning","İşlemde":"orange","Tamamlandı":"success","Kullanıcı Vazgeçti":"danger","Başvuruldu":"purple","Kabul Edildi":"teal","Kazandı":"success",Kaybetti:"danger","Talep Edilebilir":"success","Tekrar Talep Edilebilir":"warning","Talep Edilemez":"default","Uygulandı":"purple",Aktif:"info","Kazananlar Bildirildi":"warning","Yanıtlandı":"info","Kapandı":"default"},f=({s:e,tone:i=b})=>a(s,{variant:"default",color:i[e]??"default",size:"medium",pill:!1,children:e}),g=({value:i,compact:r,label:s="Kopyala"})=>e(c,{children:[a(m,{asChild:!0,children:a(n,{variant:"custom",size:"icon-sm",className:"hub__copybtn rounded-full"+(r?" hub__copybtn--sm":""),"aria-label":s,onClick:()=>navigator.clipboard?.writeText(i),children:a(l,{size:r?10:12})})}),a(o,{placement:"top",children:s})]}),N=({name:i,desc:l,creator:n,creatorLabel:s="Oluşturan: "})=>e("span",{className:"hub__pay-name hub__hist-nm",children:[a("span",{className:"hub__hist-name",children:i}),l&&e("span",{className:"hub__pay-desc hub__hist-desc",children:[l,n&&e(c,{children:[a(m,{asChild:!0,children:a("i",{className:"hub__hist-creator","aria-label":s+n,children:a(r,{size:12})})}),a(o,{placement:"top",children:s+n})]})]})]}),y=({v:i})=>{const[l,r]=i.split(" ");return e("span",{className:"hub__hist-dt",children:[a("span",{children:l}),a("span",{children:r})]})},k=({title:e="ÇOK YAKINDA",description:i="Bu bölüm henüz yapım aşamasındadır ve çok yakında yayında olacaktır.",icon:l="🚧"})=>a(t,{className:"hub__soon",image:a("span",{className:"hub__soon-icon","aria-hidden":!0,children:l}),title:e,description:i});export{u as HUB_NAME_KEYS,b as HUB_STATUS_TONE,k as HubComingSoon,g as HubCopyBtn,y as HubDt,N as HubHistName,f as HubStatusBadge,_ as HubTable,_ as default,h as useHubMobile};
1
+ import{jsx as a,jsxs as e}from"react/jsx-runtime";import{useRef as i}from"react";import{Copy as l,User as r}from"lucide-react";import n from"../../button/index.js";import s from"../../badge/index.js";import d from"../../table/index.js";import t from"../../result/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as o}from"../../tooltip/TooltipContent.js";import{useHubMobile as h}from"./platform.js";const u=["name","brand","provider","subject","game"],p=({columns:i,data:l,list:r,methods:n,item:s})=>{const d=i.find(a=>"id"===a.key||"token"===a.key),t=i.find(a=>u.includes(String(a.key)))||i.find(a=>a.maxWidth)||i[1],c=i.find(a=>"status"===a.key),m=i.find(a=>""===a.title),o=i.filter(a=>a!==d&&a!==t&&a!==c&&a!==m),h=(a,e,i)=>a.render?a.render(e[a.dataIndex],e,i):e[a.dataIndex];return a("div",{className:r?r+" hub__mlist":"hub__mlist",children:a("div",{className:n,style:{display:"contents"},children:l.map((i,l)=>e("div",{className:s?s+" hub__mcard":"hub__mcard",children:[e("div",{className:"hub__mcard-head",children:[e("span",{className:"hub__mcard-title",children:[d&&a("span",{className:"hub__mcard-id",children:h(d,i,l)}),t&&a("span",{className:"hub__mcard-name",children:h(t,i,l)})]}),c&&a("span",{className:"hub__mcard-status",children:h(c,i,l)})]}),o.length>0&&a("hr",{className:"hub__mcard-sep"}),o.length>0&&(()=>{const r=i.img,n=i.square,s=a("div",{className:"hub__mcard-body",children:o.map(r=>e("div",{className:"hub__mcard-row",children:[a("span",{className:"hub__mcard-label",children:"string"==typeof r.title?r.title:""}),a("span",{className:"hub__mcard-val",children:h(r,i,l)})]},String(r.key)))});return r?e("div",{className:"hub__mcard-media",children:[a("span",{className:"hub__mcard-img"+(n?" hub__mcard-img--square":""),style:{backgroundImage:r},"aria-hidden":!0}),s]}):s})(),m&&a("div",{className:"hub__mcard-foot",children:h(m,i,l)})]},l))})})},_=({columns:e,data:l,cellHeight:r,mobileColumns:n,marker:s})=>{const t=i(null);return h(t)?a(p,{columns:n??e,data:l,list:s?.list,methods:s?.methods,item:s?.item}):a("div",{ref:t,className:(s?.desktop?s.desktop+" ":"")+"hub__paybox hub__pay-table",children:a(d,{columns:e,data:l,cellHeight:r,headerBg:!1})})},b={"Açık":"purple",Beklemede:"warning","Onaylandı":"success",Reddedildi:"danger","İptal Edildi":"info","Zaman Aşımı":"warning","İşlemde":"orange","Tamamlandı":"success","Kullanıcı Vazgeçti":"danger","Başvuruldu":"purple","Kabul Edildi":"teal","Kazandı":"success",Kaybetti:"danger","Talep Edilebilir":"success","Tekrar Talep Edilebilir":"warning","Talep Edilemez":"default","Uygulandı":"purple",Aktif:"info","Kazananlar Bildirildi":"warning","Yanıtlandı":"info","Kapandı":"default"},f=({s:e,tone:i=b})=>a(s,{variant:"default",color:i[e]??"default",size:"medium",pill:!1,children:e}),g=({value:i,compact:r,label:s="Kopyala"})=>e(c,{children:[a(m,{asChild:!0,children:a(n,{variant:"custom",size:"icon-sm",className:"hub__copybtn rounded-full"+(r?" hub__copybtn--sm":""),"aria-label":s,onClick:()=>navigator.clipboard?.writeText(i),children:a(l,{size:r?10:12})})}),a(o,{placement:"top",children:s})]}),N=({name:i,desc:l,creator:n,creatorLabel:s="Oluşturan: "})=>e("span",{className:"hub__pay-name hub__hist-nm",children:[a("span",{className:"hub__hist-name",children:i}),l&&e("span",{className:"hub__pay-desc hub__hist-desc",children:[l,n&&e(c,{children:[a(m,{asChild:!0,children:a("i",{className:"hub__hist-creator","aria-label":s+n,children:a(r,{size:12})})}),a(o,{placement:"top",children:s+n})]})]})]}),y=({v:i})=>{const[l,r]=i.split(" ");return e("span",{className:"hub__hist-dt",children:[a("span",{children:l}),a("span",{children:r})]})},k=({title:e="ÇOK YAKINDA",description:i="Bu bölüm henüz yapım aşamasındadır ve çok yakında yayında olacaktır.",icon:l="🚧"})=>a(t,{className:"hub__soon",image:a("span",{className:"hub__soon-icon","aria-hidden":!0,children:l}),title:e,description:i});export{u as HUB_NAME_KEYS,b as HUB_STATUS_TONE,k as HubComingSoon,g as HubCopyBtn,y as HubDt,N as HubHistName,f as HubStatusBadge,_ as HubTable,h as useHubMobile};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{createContext as t,useContext as a,useState as o,useEffect as n,useCallback as i,useRef as m,useMemo as c}from"react";import{ITDRouterContext as d}from"../router/context.js";import{ModalProvider as s}from"../modal/index.js";import{Toaster as l}from"../toast/index.js";import u from"./ITDThemeProvider.js";import{createTranslateFn as h,ITDLocaleContext as g}from"../locale/useITDLocale.js";import{FormDefaultsContext as f}from"./FormDefaultsContext.js";import{applyTouchMode as p}from"../helpers/device/touchDevice.js";const y=e=>"tr"===e?"DD/MM/YYYY":"en"===e?"MM/DD/YYYY":"DD/MM/YYYY",D=t({});D.displayName="ITDContext";const v=t=>{const v=Object.keys(a(D)).length>0,w=t.theme||("undefined"==typeof window?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[M,Y]=o(w),[T,j]=o(t.dateFormat||y(t.language)),[k,x]=o(t.language?t.language:"en"),[F,P]=o("en-US"),[E,L]=o(t.timeZone||"local"),[Z,b]=o(t.country??""),[I,N]=o(t.errorDisplay||"tooltip");n(()=>{t.theme&&Y(t.theme),t.language&&x(t.language),t.dateFormat&&j(t.dateFormat),t.timeZone&&L(t.timeZone),t.country&&b(t.country),t.errorDisplay&&N(t.errorDisplay)},[t.theme,t.language,t.dateFormat,t.timeZone,t.country,t.errorDisplay]),n(()=>{if(t.theme||"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=e=>{Y(e.matches?"dark":"light")};return e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[t.theme]);const B=i(e=>{Y(e)},[]);n(()=>{if(v)return;const e=z.current?.ownerDocument;e&&(e.body?.setAttribute("data-theme",M),e.documentElement.setAttribute("data-theme",M))},[M,v]),n(()=>{const e=z.current?.ownerDocument??("undefined"!=typeof document?document:null);if(e)return p(e)},[]);const C=i(e=>{j(e)},[]),V=i(e=>{L(e)},[]),A=i(e=>{P(e)},[]),O=i(e=>{N(e)},[]),R=i(e=>{b(e)},[]),S=i(e=>{x(e),t.dateFormat||j(y(e))},[t.dateFormat]),U=c(()=>({theme:M,dateFormat:T,timeZone:E,language:k,locale:F,country:Z,errorDisplay:I,changeTheme:B,changeDateFormat:C,changeTimeZone:V,changeLanguage:S,changeLocale:A,changeCountry:R,changeErrorDisplay:O}),[M,T,E,k,F,Z,I,B,C,V,S,A,O]),q=c(()=>({defaultVariant:t.defaultVariant}),[t.defaultVariant]),z=m(null),G=c(()=>({t:h(k,t.messages),language:k}),[k,t.messages]);return e("div",{ref:z,className:"itd-provider","data-theme":M,"data-lang":k,children:e(u,{themeName:"dark"===M?"dark":"light",surfaceBase:t.surfaceBase,primaryBase:t.primaryBase,surfaceLadder:t.surfaceLadder,lightElevation:t.lightElevation,contrastMetric:t.contrastMetric,contrastMin:t.contrastMin,onPrimaryNudge:t.onPrimaryNudge,customTheme:t.customTheme,extensions:t.extensions,shadow:t.shadow,containerRef:z,children:e(f.Provider,{value:q,children:e(g.Provider,{value:G,children:e(D.Provider,{value:U,children:r(d.Provider,{value:t.router??null,children:[e(s,{children:t.children}),e(l,{theme:"dark"===M?"dark":"light",richColors:!0})]})})})})})})},w=()=>{const e=a(D);if(!e)throw new Error("useITD must be used within ITDProvider");return e};export{v as ITDProvider,D as default,w as useITD};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{createContext as t,useContext as a,useState as o,useEffect as n,useCallback as i,useMemo as m,useRef as c}from"react";import{ITDRouterContext as d}from"../router/context.js";import{ModalProvider as s}from"../modal/index.js";import{Toaster as l}from"../toast/index.js";import u from"./ITDThemeProvider.js";import{createTranslateFn as h,ITDLocaleContext as g}from"../locale/useITDLocale.js";import{FormDefaultsContext as f}from"./FormDefaultsContext.js";import{applyTouchMode as p}from"../helpers/device/touchDevice.js";const y=e=>"tr"===e?"DD/MM/YYYY":"en"===e?"MM/DD/YYYY":"DD/MM/YYYY",D=t({});D.displayName="ITDContext";const v=t=>{const v=Object.keys(a(D)).length>0,w=t.theme||("undefined"==typeof window?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[M,Y]=o(w),[T,j]=o(t.dateFormat||y(t.language)),[k,x]=o(t.language?t.language:"en"),[F,P]=o("en-US"),[E,L]=o(t.timeZone||"local"),[Z,b]=o(t.country??""),[I,N]=o(t.errorDisplay||"tooltip");n(()=>{t.theme&&Y(t.theme),t.language&&x(t.language),t.dateFormat&&j(t.dateFormat),t.timeZone&&L(t.timeZone),t.country&&b(t.country),t.errorDisplay&&N(t.errorDisplay)},[t.theme,t.language,t.dateFormat,t.timeZone,t.country,t.errorDisplay]),n(()=>{if(t.theme||"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=e=>{Y(e.matches?"dark":"light")};return e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[t.theme]);const B=i(e=>{Y(e)},[]);n(()=>{if(v)return;const e=z.current?.ownerDocument;e&&(e.body?.setAttribute("data-theme",M),e.documentElement.setAttribute("data-theme",M))},[M,v]),n(()=>{const e=z.current?.ownerDocument??("undefined"!=typeof document?document:null);if(e)return p(e)},[]);const C=i(e=>{j(e)},[]),V=i(e=>{L(e)},[]),A=i(e=>{P(e)},[]),O=i(e=>{N(e)},[]),R=i(e=>{b(e)},[]),S=i(e=>{x(e),t.dateFormat||j(y(e))},[t.dateFormat]),U=m(()=>({theme:M,dateFormat:T,timeZone:E,language:k,locale:F,country:Z,errorDisplay:I,changeTheme:B,changeDateFormat:C,changeTimeZone:V,changeLanguage:S,changeLocale:A,changeCountry:R,changeErrorDisplay:O}),[M,T,E,k,F,Z,I,B,C,V,S,A,O]),q=m(()=>({defaultVariant:t.defaultVariant}),[t.defaultVariant]),z=c(null),G=m(()=>({t:h(k,t.messages),language:k}),[k,t.messages]);return e("div",{ref:z,className:"itd-provider","data-theme":M,"data-lang":k,children:e(u,{themeName:"dark"===M?"dark":"light",surfaceBase:t.surfaceBase,primaryBase:t.primaryBase,surfaceLadder:t.surfaceLadder,lightElevation:t.lightElevation,contrastMetric:t.contrastMetric,contrastMin:t.contrastMin,onPrimaryNudge:t.onPrimaryNudge,customTheme:t.customTheme,extensions:t.extensions,shadow:t.shadow,containerRef:z,children:e(f.Provider,{value:q,children:e(g.Provider,{value:G,children:e(D.Provider,{value:U,children:r(d.Provider,{value:t.router??null,children:[e(s,{children:t.children}),e(l,{theme:"dark"===M?"dark":"light",richColors:!0})]})})})})})})},w=()=>{const e=a(D);if(!e)throw new Error("useITD must be used within ITDProvider");return e};export{v as ITDProvider,D as default,w as useITD};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as t}from"react";const n=r(null),o=({document:r,children:t})=>e(n.Provider,{value:r,children:t}),u=()=>{const e=t(n);return e||("undefined"==typeof document?null:document)};export{o as PortalDocumentProvider,n as default,u as usePortalDocument};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as n}from"react";const t=r(null),o=({document:r,children:n})=>e(t.Provider,{value:r,children:n}),c=()=>{const e=n(t);return e||("undefined"==typeof document?null:document)};export{o as PortalDocumentProvider,c as usePortalDocument};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createContext as r,useId as n,useRef as t,useState as o,useEffect as u,useCallback as i,useContext as c}from"react";import{initFocusModality as l}from"../utils/focusModality.js";import{TriggerTypes as s}from"../enums/enum.js";import{useFloatingTrigger as m}from"../hooks/useFloatingTrigger.js";import{DropdownMenuContext as d}from"../dropdown-menu/DropdownMenu.js";import{lockScroll as p}from"../primitives/scrollLock.js";import{usePortalDocument as f}from"../context/PortalDocumentContext.js";const a=({children:r,onOpenChange:c})=>{const a=n(),h=f()??("undefined"==typeof document?null:document),v=t(null),x=t(null),[j,C]=o(!1);u(()=>{h&&l(h)},[h]);const w=m({trigger:s.MANUAL,closeOnClickOutside:!0,open:j,onOpenChange:i(e=>{C(e),e||(v.current=null,x.current&&(x.current.remove(),x.current=null)),c?.(e)},[c])}),y=i((e,r)=>{x.current&&x.current.remove();const n=h??document,t=n.createElement("div");t.style.cssText=`position:fixed;top:${r}px;left:${e}px;width:0;height:0;pointer-events:none;`,n.body.appendChild(t),x.current=t,w.triggerRef.current=t,v.current=null,C(!0)},[w,h]);u(()=>()=>{x.current&&(x.current.remove(),x.current=null)},[]),u(()=>{if(j)return p(h??document)},[j,h]);const M=i(e=>{v.current=e?"last":"first",C(!0)},[]),O=i(e=>{e(),w.close()},[w]);return e(g.Provider,{value:{openAtPoint:y},children:e(d.Provider,{value:{id:a,trigger:w,pendingFocusRef:v,onItemSelect:O,openWithKeyboard:M},children:r})})};a.displayName="ContextMenu";const g=r(null);function h(e){const r=c(g);if(!r)throw new Error(`<${e}> must be used within <ContextMenu>.`);return r}export{a as ContextMenu,h as useContextMenuInternal};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r,useId as n,useRef as t,useState as o,useEffect as u,useCallback as i,useContext as c}from"react";import{initFocusModality as l}from"../utils/focusModality.js";import{TriggerTypes as s}from"../enums/enum.js";import{useFloatingTrigger as m}from"../hooks/useFloatingTrigger.js";import{DropdownMenuContext as d}from"../dropdown-menu/DropdownMenu.js";import p from"../primitives/scrollLock.js";import{usePortalDocument as f}from"../context/PortalDocumentContext.js";const a=({children:r,onOpenChange:c})=>{const a=n(),h=f()??("undefined"==typeof document?null:document),v=t(null),x=t(null),[j,C]=o(!1);u(()=>{h&&l(h)},[h]);const w=m({trigger:s.MANUAL,closeOnClickOutside:!0,open:j,onOpenChange:i(e=>{C(e),e||(v.current=null,x.current&&(x.current.remove(),x.current=null)),c?.(e)},[c])}),y=i((e,r)=>{x.current&&x.current.remove();const n=h??document,t=n.createElement("div");t.style.cssText=`position:fixed;top:${r}px;left:${e}px;width:0;height:0;pointer-events:none;`,n.body.appendChild(t),x.current=t,w.triggerRef.current=t,v.current=null,C(!0)},[w,h]);u(()=>()=>{x.current&&(x.current.remove(),x.current=null)},[]),u(()=>{if(j)return p(h??document)},[j,h]);const M=i(e=>{v.current=e?"last":"first",C(!0)},[]),O=i(e=>{e(),w.close()},[w]);return e(g.Provider,{value:{openAtPoint:y},children:e(d.Provider,{value:{id:a,trigger:w,pendingFocusRef:v,onItemSelect:O,openWithKeyboard:M},children:r})})};a.displayName="ContextMenu";const g=r(null);function h(e){const r=c(g);if(!r)throw new Error(`<${e}> must be used within <ContextMenu>.`);return r}export{a as ContextMenu,h as useContextMenuInternal};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{createContext as o,useState as i,useId as n,isValidElement as s,useContext as l,useRef as r,useEffect as a,useMemo as d}from"react";import{createPortal as c}from"react-dom";import{CSSTransition as u}from"react-transition-group";import{Drawer as p}from"../_bundled/vaul/dist/index.js";import{X as m}from"lucide-react";import{useFocusTrap as h}from"../hooks/useFocusTrap.js";import b from"../hooks/useOnESCKeyDown.js";import C from"../hooks/useOnClickOutside.js";import v from"../hooks/useMediaQuery.js";import{lockScroll as g}from"../primitives/scrollLock.js";import{dismissTopOverlayLayer as f}from"../primitives/overlayStack.js";import{cn as y}from"../utils/cn.js";import{Slot as N}from"../primitives/Slot.js";import O from"../button/index.js";import{usePortalDocument as k}from"../context/PortalDocumentContext.js";const D=o(null),w=()=>{const e=l(D);if(!e)throw new Error("Dialog sub-components must be used inside a <Dialog> parent.");return e},I=({open:t,defaultOpen:o=!1,onOpenChange:s,children:l})=>{const[r,a]=i(o),d=void 0!==t,c=d?t:r,u=n(),p=n(),m=n(),[h,b]=i(!1);return e(D.Provider,{value:{open:c,setOpen:e=>{d||a(e),s?.(e)},titleId:u,descriptionId:p,contentId:m,hasDescription:h,setHasDescription:b},children:l})},E=({asChild:t,onClick:o,children:i,...n})=>{const{open:l,setOpen:r,contentId:a}=w(),d={...n,onClick:e=>{o?.(e),e.defaultPrevented||r(!0)},"aria-haspopup":"dialog","aria-expanded":l,"aria-controls":a};return t?s(i)?e(N,{...d,children:i}):("production"!==process.env.NODE_ENV&&console.warn("[DialogTrigger]: When `asChild` is set, children must be a single React element, e.g. <DialogTrigger asChild><Button>Open</Button></DialogTrigger>."),null):e("button",{type:"button",...d,children:i})},j=t=>{const{side:o="center",responsive:i=!1,mobileBreakpoint:n=768}=t,s=k(),l=v(`(max-width: ${n-1}px)`,s?.defaultView??null),r=i?l?"bottom":"center":o;return"center"===r?e(x,{...t}):e(A,{...t,side:r})},x=({className:o,children:i,showClose:n=!0,closeAriaLabel:s="Close",closeOnEscape:l=!0,closeOnOutsideClick:d=!0,onEscapeKeyDown:p,onPointerDownOutside:v,responsive:f=!1,side:N,mobileBreakpoint:O,handle:D,...I})=>{const{open:E,setOpen:j,titleId:x,descriptionId:A,contentId:B,hasDescription:F}=w(),P=r(null),R=r(null);h({isActive:E,containerRef:P,trapFocusOutside:!0,autoFocus:!0,restoreFocus:!0});const S=k();return b(()=>{E&&(p?.(),l&&j(!1))},P,{enabled:E}),C(P,()=>{E&&(v?.(),d&&j(!1))},{enabled:E}),a(()=>{if(E&&S)return g(S)},[E,S]),S?c(e(u,{in:E,timeout:200,classNames:"itd-dialog",nodeRef:R,mountOnEnter:!0,unmountOnExit:!0,appear:!0,children:t("div",{ref:R,className:"itd-dialog-portal",children:[e("div",{className:"itd-dialog-overlay","aria-hidden":"true"}),t("div",{ref:P,id:B,role:"dialog","aria-modal":"true","aria-labelledby":x,"aria-describedby":F?A:void 0,tabIndex:-1,"data-responsive":f?"":void 0,...I,className:y("itd-dialog-content",o),children:[n&&e("button",{type:"button",className:"itd-dialog-close","aria-label":s,onClick:()=>j(!1),children:e(m,{size:16,strokeWidth:2})}),i]})]})}),S.body):null},A=({className:o,children:n,showClose:s=!0,closeAriaLabel:l="Close",side:c="bottom",handle:u=!0,closeOnEscape:C=!0,closeOnOutsideClick:v=!0,onEscapeKeyDown:N,onPointerDownOutside:O,responsive:D,mobileBreakpoint:I,...E})=>{const{open:j,setOpen:x,titleId:A,descriptionId:B,contentId:F,hasDescription:P}=w(),R=k(),S=r(null),K="undefined"!=typeof document?document:null,T=!!R&&R!==K;a(()=>{if(j&&R)return g(R)},[j,R]);const[W,H]=i(null),L=d(()=>({current:W}),[W]);h({isActive:j,containerRef:L,trapFocusOutside:!0,autoFocus:!0,restoreFocus:!0});const V=r(null);if(V.current=S.current??R?.body??null,b(()=>{j&&(N?.(),C&&x(!1))},V,{enabled:j}),!R)return null;const _="center"===c?"bottom":c;return e(p.Root,{open:j,onOpenChange:x,direction:_,dismissible:v,modal:!1,noBodyStyles:!0,repositionInputs:!T,children:t(p.Portal,{container:R.body,children:[e("div",{className:"itd-dialog-overlay itd-sheet-overlay","aria-hidden":"true",onClick:()=>{O?.(),v&&x(!1)}}),t(p.Content,{ref:e=>{S.current=e,H(e)},id:F,"aria-labelledby":A,"aria-describedby":P?B:void 0,...E,"data-side":_,className:y("itd-sheet-content",o),onEscapeKeyDown:e=>{e.preventDefault(),f(S.current,e)},children:["bottom"===_&&u&&e(p.Handle,{className:"itd-sheet-handle"}),s&&e("button",{type:"button",className:"itd-dialog-close","aria-label":l,onClick:()=>x(!1),children:e(m,{size:16,strokeWidth:2})}),e("div",{className:"itd-sheet-body",children:n})]})]})})},B=({className:t,variant:o="plain",...i})=>e("div",{...i,"data-variant":o,className:y("itd-dialog-header",t)}),F=({className:t,...o})=>{const{titleId:i}=w();return e("h2",{id:i,...o,className:y("itd-dialog-title",t)})},P=({className:t,...o})=>{const{descriptionId:i,setHasDescription:n}=w();return a(()=>(n(!0),()=>n(!1)),[n]),e("p",{id:i,...o,className:y("itd-dialog-description",t)})},R=({className:t,variant:o="plain",...i})=>e("div",{...i,"data-variant":o,className:y("itd-dialog-footer",t)}),S=({asChild:t,onClick:o,children:i,...n})=>{const{setOpen:l}=w(),r={...n,onClick:e=>{o?.(e),e.defaultPrevented||l(!1)}};return t?s(i)?e(N,{...r,children:i}):("production"!==process.env.NODE_ENV&&console.warn("[DialogClose]: When `asChild` is set, children must be a single React element, e.g. <DialogClose asChild><Button>Cancel</Button></DialogClose>."),null):e("button",{type:"button",...r,children:i})},K=I,T=E,W=({className:t,...o})=>e(j,{showClose:!1,closeOnOutsideClick:!1,className:y("itd-alert-dialog-content",t),...o});W.displayName="AlertDialogContent";const H=B,L=F,V=P,_=R,z=({children:t,onClick:o,...i})=>e(S,{asChild:!0,onClick:o??void 0,children:e(O,{type:"button",variant:"outline",...i,children:t})});z.displayName="AlertDialogCancel";const M=({children:t,onClick:o,...i})=>e(S,{asChild:!0,onClick:o??void 0,children:e(O,{type:"button",...i,children:t})});M.displayName="AlertDialogAction";const Q=I,$=E,q=B,G=F,J=P,U=R,X=S,Y=({side:t="bottom",...o})=>e(j,{side:t,...o});Y.displayName="SheetContent";export{K as AlertDialog,M as AlertDialogAction,z as AlertDialogCancel,W as AlertDialogContent,V as AlertDialogDescription,_ as AlertDialogFooter,H as AlertDialogHeader,L as AlertDialogTitle,T as AlertDialogTrigger,I as Dialog,S as DialogClose,j as DialogContent,P as DialogDescription,R as DialogFooter,B as DialogHeader,F as DialogTitle,E as DialogTrigger,Q as Sheet,X as SheetClose,Y as SheetContent,J as SheetDescription,U as SheetFooter,q as SheetHeader,G as SheetTitle,$ as SheetTrigger};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{createContext as o,useState as i,useId as n,isValidElement as s,useContext as l,useRef as r,useEffect as a,useMemo as d}from"react";import{createPortal as c}from"react-dom";import{CSSTransition as u}from"react-transition-group";import{Drawer as p}from"../_bundled/vaul/dist/index.js";import{X as m}from"lucide-react";import{useFocusTrap as h}from"../hooks/useFocusTrap.js";import b from"../hooks/useOnESCKeyDown.js";import C from"../hooks/useOnClickOutside.js";import v from"../hooks/useMediaQuery.js";import g from"../primitives/scrollLock.js";import{dismissTopOverlayLayer as f}from"../primitives/overlayStack.js";import{cn as y}from"../utils/cn.js";import{Slot as N}from"../primitives/Slot.js";import O from"../button/index.js";import{usePortalDocument as k}from"../context/PortalDocumentContext.js";const D=o(null),w=()=>{const e=l(D);if(!e)throw new Error("Dialog sub-components must be used inside a <Dialog> parent.");return e},I=({open:t,defaultOpen:o=!1,onOpenChange:s,children:l})=>{const[r,a]=i(o),d=void 0!==t,c=d?t:r,u=n(),p=n(),m=n(),[h,b]=i(!1);return e(D.Provider,{value:{open:c,setOpen:e=>{d||a(e),s?.(e)},titleId:u,descriptionId:p,contentId:m,hasDescription:h,setHasDescription:b},children:l})},E=({asChild:t,onClick:o,children:i,...n})=>{const{open:l,setOpen:r,contentId:a}=w(),d={...n,onClick:e=>{o?.(e),e.defaultPrevented||r(!0)},"aria-haspopup":"dialog","aria-expanded":l,"aria-controls":a};return t?s(i)?e(N,{...d,children:i}):("production"!==process.env.NODE_ENV&&console.warn("[DialogTrigger]: When `asChild` is set, children must be a single React element, e.g. <DialogTrigger asChild><Button>Open</Button></DialogTrigger>."),null):e("button",{type:"button",...d,children:i})},j=t=>{const{side:o="center",responsive:i=!1,mobileBreakpoint:n=768}=t,s=k(),l=v(`(max-width: ${n-1}px)`,s?.defaultView??null),r=i?l?"bottom":"center":o;return"center"===r?e(x,{...t}):e(A,{...t,side:r})},x=({className:o,children:i,showClose:n=!0,closeAriaLabel:s="Close",closeOnEscape:l=!0,closeOnOutsideClick:d=!0,onEscapeKeyDown:p,onPointerDownOutside:v,responsive:f=!1,side:N,mobileBreakpoint:O,handle:D,...I})=>{const{open:E,setOpen:j,titleId:x,descriptionId:A,contentId:B,hasDescription:F}=w(),P=r(null),R=r(null);h({isActive:E,containerRef:P,trapFocusOutside:!0,autoFocus:!0,restoreFocus:!0});const S=k();return b(()=>{E&&(p?.(),l&&j(!1))},P,{enabled:E}),C(P,()=>{E&&(v?.(),d&&j(!1))},{enabled:E}),a(()=>{if(E&&S)return g(S)},[E,S]),S?c(e(u,{in:E,timeout:200,classNames:"itd-dialog",nodeRef:R,mountOnEnter:!0,unmountOnExit:!0,appear:!0,children:t("div",{ref:R,className:"itd-dialog-portal",children:[e("div",{className:"itd-dialog-overlay","aria-hidden":"true"}),t("div",{ref:P,id:B,role:"dialog","aria-modal":"true","aria-labelledby":x,"aria-describedby":F?A:void 0,tabIndex:-1,"data-responsive":f?"":void 0,...I,className:y("itd-dialog-content",o),children:[n&&e("button",{type:"button",className:"itd-dialog-close","aria-label":s,onClick:()=>j(!1),children:e(m,{size:16,strokeWidth:2})}),i]})]})}),S.body):null},A=({className:o,children:n,showClose:s=!0,closeAriaLabel:l="Close",side:c="bottom",handle:u=!0,closeOnEscape:C=!0,closeOnOutsideClick:v=!0,onEscapeKeyDown:N,onPointerDownOutside:O,responsive:D,mobileBreakpoint:I,...E})=>{const{open:j,setOpen:x,titleId:A,descriptionId:B,contentId:F,hasDescription:P}=w(),R=k(),S=r(null),K="undefined"!=typeof document?document:null,T=!!R&&R!==K;a(()=>{if(j&&R)return g(R)},[j,R]);const[W,H]=i(null),L=d(()=>({current:W}),[W]);h({isActive:j,containerRef:L,trapFocusOutside:!0,autoFocus:!0,restoreFocus:!0});const V=r(null);if(V.current=S.current??R?.body??null,b(()=>{j&&(N?.(),C&&x(!1))},V,{enabled:j}),!R)return null;const _="center"===c?"bottom":c;return e(p.Root,{open:j,onOpenChange:x,direction:_,dismissible:v,modal:!1,noBodyStyles:!0,repositionInputs:!T,children:t(p.Portal,{container:R.body,children:[e("div",{className:"itd-dialog-overlay itd-sheet-overlay","aria-hidden":"true",onClick:()=>{O?.(),v&&x(!1)}}),t(p.Content,{ref:e=>{S.current=e,H(e)},id:F,"aria-labelledby":A,"aria-describedby":P?B:void 0,...E,"data-side":_,className:y("itd-sheet-content",o),onEscapeKeyDown:e=>{e.preventDefault(),f(S.current,e)},children:["bottom"===_&&u&&e(p.Handle,{className:"itd-sheet-handle"}),s&&e("button",{type:"button",className:"itd-dialog-close","aria-label":l,onClick:()=>x(!1),children:e(m,{size:16,strokeWidth:2})}),e("div",{className:"itd-sheet-body",children:n})]})]})})},B=({className:t,variant:o="plain",...i})=>e("div",{...i,"data-variant":o,className:y("itd-dialog-header",t)}),F=({className:t,...o})=>{const{titleId:i}=w();return e("h2",{id:i,...o,className:y("itd-dialog-title",t)})},P=({className:t,...o})=>{const{descriptionId:i,setHasDescription:n}=w();return a(()=>(n(!0),()=>n(!1)),[n]),e("p",{id:i,...o,className:y("itd-dialog-description",t)})},R=({className:t,variant:o="plain",...i})=>e("div",{...i,"data-variant":o,className:y("itd-dialog-footer",t)}),S=({asChild:t,onClick:o,children:i,...n})=>{const{setOpen:l}=w(),r={...n,onClick:e=>{o?.(e),e.defaultPrevented||l(!1)}};return t?s(i)?e(N,{...r,children:i}):("production"!==process.env.NODE_ENV&&console.warn("[DialogClose]: When `asChild` is set, children must be a single React element, e.g. <DialogClose asChild><Button>Cancel</Button></DialogClose>."),null):e("button",{type:"button",...r,children:i})},K=I,T=E,W=({className:t,...o})=>e(j,{showClose:!1,closeOnOutsideClick:!1,className:y("itd-alert-dialog-content",t),...o});W.displayName="AlertDialogContent";const H=B,L=F,V=P,_=R,z=({children:t,onClick:o,...i})=>e(S,{asChild:!0,onClick:o??void 0,children:e(O,{type:"button",variant:"outline",...i,children:t})});z.displayName="AlertDialogCancel";const M=({children:t,onClick:o,...i})=>e(S,{asChild:!0,onClick:o??void 0,children:e(O,{type:"button",...i,children:t})});M.displayName="AlertDialogAction";const Q=I,$=E,q=B,G=F,J=P,U=R,X=S,Y=({side:t="bottom",...o})=>e(j,{side:t,...o});Y.displayName="SheetContent";export{K as AlertDialog,M as AlertDialogAction,z as AlertDialogCancel,W as AlertDialogContent,V as AlertDialogDescription,_ as AlertDialogFooter,H as AlertDialogHeader,L as AlertDialogTitle,T as AlertDialogTrigger,I as Dialog,S as DialogClose,j as DialogContent,P as DialogDescription,R as DialogFooter,B as DialogHeader,F as DialogTitle,E as DialogTrigger,Q as Sheet,X as SheetClose,Y as SheetContent,J as SheetDescription,U as SheetFooter,q as SheetHeader,G as SheetTitle,$ as SheetTrigger};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";const o=()=>t("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M11.5 3.5L5.5 9.5L2.5 6.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})});export{o as CheckIcon,o as default};
1
+ import{jsx as o}from"react/jsx-runtime";const r=()=>o("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{d:"M11.5 3.5L5.5 9.5L2.5 6.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})});export{r as CheckIcon};
@@ -1 +1 @@
1
- import{Children as e,isValidElement as n,cloneElement as r}from"react";const t=new Set(["DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioItem","DropdownMenuSubTrigger"]);function o(u,d){return e.map(u,e=>{if(!n(e))return e;if(function(e){return t.has(e.type?.displayName)}(e)){const n=d.idx++;return e.props.disabled&&d.disabledSet.add(n),r(e,{_itemId:`${d.menuId}-item-${n}`})}if(function(e){return"DropdownMenuRadioGroup"===e.type?.displayName}(e)||function(e){return"DropdownMenuSub"===e.type?.displayName}(e)){const n=o(e.props.children,d);return r(e,{},n)}return e})}export{o as default,o as processChildren};
1
+ import{Children as e,isValidElement as n,cloneElement as r}from"react";const o=new Set(["DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioItem","DropdownMenuSubTrigger"]);function t(u,d){return e.map(u,e=>{if(!n(e))return e;if(function(e){return o.has(e.type?.displayName)}(e)){const n=d.idx++;return e.props.disabled&&d.disabledSet.add(n),r(e,{_itemId:`${d.menuId}-item-${n}`})}if(function(e){return"DropdownMenuRadioGroup"===e.type?.displayName}(e)||function(e){return"DropdownMenuSub"===e.type?.displayName}(e)){const n=t(e.props.children,d);return r(e,{},n)}return e})}export{t as processChildren};
@@ -1 +1 @@
1
- import{useState as e,useCallback as t}from"react";import{useMenuItemContext as o}from"./MenuItemContext.js";const n=({disabled:n,className:r,itemId:i,componentName:a})=>{const{onItemSelect:s,contentInnerRef:d,closeOpenSubs:c,isPointerInGraceArea:m}=o(a),[l,u]=e(!1),p=t(e=>{"mouse"!==e.pointerType||n||m()||(c(),e.currentTarget.focus({preventScroll:!0}))},[n,c,m]),v=t(e=>{"mouse"===e.pointerType&&(m()||d.current?.focus({preventScroll:!0}))},[d,m]);return{onItemSelect:s,isFocused:l,itemProps:{type:"button",id:i,tabIndex:-1,className:`itd-dropdown-menu-item ${r}`.trim(),"data-highlighted":l?"":void 0,"data-disabled":n?"":void 0,"aria-disabled":n||void 0,onPointerMove:p,onPointerLeave:v,onFocus:()=>u(!0),onBlur:()=>u(!1)}}};export{n as default,n as useMenuItemChrome};
1
+ import{useState as e,useCallback as o}from"react";import{useMenuItemContext as t}from"./MenuItemContext.js";const n=({disabled:n,className:r,itemId:i,componentName:s})=>{const{onItemSelect:a,contentInnerRef:c,closeOpenSubs:d,isPointerInGraceArea:m}=t(s),[l,p]=e(!1),u=o(e=>{"mouse"!==e.pointerType||n||m()||(d(),e.currentTarget.focus({preventScroll:!0}))},[n,d,m]),v=o(e=>{"mouse"===e.pointerType&&(m()||c.current?.focus({preventScroll:!0}))},[c,m]);return{onItemSelect:a,isFocused:l,itemProps:{type:"button",id:i,tabIndex:-1,className:`itd-dropdown-menu-item ${r}`.trim(),"data-highlighted":l?"":void 0,"data-disabled":n?"":void 0,"aria-disabled":n||void 0,onPointerMove:u,onPointerLeave:v,onFocus:()=>p(!0),onBlur:()=>p(!1)}}};export{n as useMenuItemChrome};
@@ -1 +1 @@
1
- import{useRef as e,useCallback as r}from"react";import{usePointerGraceArea as t}from"./usePointerGraceArea.js";const n=n=>{const o=e(new Set),a=r(e=>{o.current.add(e)},[]),s=r(e=>{o.current.delete(e)},[]),u=r(e=>{o.current.forEach(r=>{r!==e&&r()})},[]),c=e(new Set),{setGraceArea:i,updatePointer:l,isPointerInGraceArea:d}=t(n),p=r(e=>{c.current.add(e)},[]),S=r(e=>{c.current.delete(e),i(null)},[i]),b=r(e=>{"mouse"===e.pointerType&&l(e.clientX,e.clientY)},[l]);return{registerSubClose:a,unregisterSubClose:s,closeOpenSubs:u,registerOpenSubContent:p,unregisterOpenSubContent:S,isPointerInGraceArea:d,setGraceArea:i,handleContentPointerMove:b}};export{n as default,n as useSubMenuRegistry};
1
+ import{useRef as e,useCallback as r}from"react";import{usePointerGraceArea as t}from"./usePointerGraceArea.js";const n=n=>{const o=e(new Set),c=r(e=>{o.current.add(e)},[]),s=r(e=>{o.current.delete(e)},[]),u=r(e=>{o.current.forEach(r=>{r!==e&&r()})},[]),a=e(new Set),{setGraceArea:i,updatePointer:l,isPointerInGraceArea:p}=t(n),d=r(e=>{a.current.add(e)},[]),S=r(e=>{a.current.delete(e),i(null)},[i]),b=r(e=>{"mouse"===e.pointerType&&l(e.clientX,e.clientY)},[l]);return{registerSubClose:c,unregisterSubClose:s,closeOpenSubs:u,registerOpenSubContent:d,unregisterOpenSubContent:S,isPointerInGraceArea:p,setGraceArea:i,handleContentPointerMove:b}};export{n as useSubMenuRegistry};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{isValidElement as t}from"react";import{Slot as r}from"../primitives/Slot.js";function n(n){const{name:i,useTriggerContext:o,aria:a,fallback:l}=n,s=({children:n,asChild:s=!0})=>{const c=o(i),u=c.trigger.getTriggerProps(),d={...u,...a(c),tabIndex:u.tabIndex??0};return s?t(n)?e(r,{...d,children:n}):("production"!==process.env.NODE_ENV&&console.warn(`[${i}]: When using \`asChild\`, children must be a single React element. Example: <${i} asChild><Button /></${i}>.`),null):"button"===l?e("button",{type:"button",...d,children:n}):e("span",{role:"button",...d,children:n})};return s.displayName=i,s}export{n as createFloatingTrigger,n as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{isValidElement as t}from"react";import{Slot as r}from"../primitives/Slot.js";function n(n){const{name:i,useTriggerContext:o,aria:a,fallback:l}=n,s=({children:n,asChild:s=!0})=>{const c=o(i),u=c.trigger.getTriggerProps(),m={...u,...a(c),tabIndex:u.tabIndex??0};return s?t(n)?e(r,{...m,children:n}):("production"!==process.env.NODE_ENV&&console.warn(`[${i}]: When using \`asChild\`, children must be a single React element. Example: <${i} asChild><Button /></${i}>.`),null):"button"===l?e("button",{type:"button",...m,children:n}):e("span",{role:"button",...m,children:n})};return s.displayName=i,s}export{n as createFloatingTrigger};
@@ -1 +1 @@
1
- import{useContext as t,useMemo as o}from"react";import r from"../../context/ITDContext.js";import{getPhoneCountry as e}from"./index.js";const n=n=>{const m=t(r),c=n??m?.country;return o(()=>e(c),[c])};export{n as default,n as usePhoneCountry};
1
+ import{useContext as t,useMemo as o}from"react";import r from"../../context/ITDContext.js";import{getPhoneCountry as n}from"./index.js";const e=e=>{const m=t(r),c=e??m?.country;return o(()=>n(c),[c])};export{e as usePhoneCountry};
@@ -1 +1 @@
1
- import{generateSurfaceScale as o,generateColorScaleFromBase as r}from"./GenerateColorScale.js";import{validateSeed as l,parseOklch as c,shadeVal as e,fmt as t,fmtAlpha as a,lerp as n,withAlpha as d,fmtC3 as i}from"./colorOps.js";import{resolveOnColor as h,maxSrgbChroma as u}from"./contrast.js";import{buildShadowScale as s,resolveShadowParams as g}from"./shadowScale.js";const B={ringOffset:"1px",ringWidth:"2px",borderRadius:"0.625rem"},k={transitionDuration:"500ms",transitionTimingFunction:"cubic-bezier(0.075, 0.82, 0.165, 1)",boxShadow:"0px 3px 4px 0px rgba(0, 0, 0, 0.03)"},m={transitionDuration:".15s",transitionTimingFunction:"cubic-bezier(.4,0,.2,1)",boxShadow:"none"},p={colorAlertSuccessBackground:"oklch(0.94 0.08 145 / 0.5)",colorAlertSuccessBorder:"oklch(0.75 0.12 145 / 0.5)",colorAlertSuccessTitle:"oklch(0.57 0.14 145.3)",colorAlertSuccessText:"oklch(0.6 0.09 145.68)",colorProgressSuccessFill:"oklch(0.74 0.19 145.25)",colorAlertWarningBackground:"oklch(0.96 0.05 97.36 / 0.5)",colorAlertWarningBorder:"oklch(0.80 0.12 100 / 0.5)",colorAlertWarningTitle:"oklab(0.67 0.03 0.15)",colorAlertWarningText:"oklch(0.7 0.12 90.34)",colorAlertErrorBackground:"oklch(0.95 0.06 15 / 0.5)",colorAlertErrorBorder:"oklch(0.75 0.08 15 / 0.5)",colorAlertErrorTitle:"oklab(0.58 0.15 0.06)",colorAlertErrorText:"oklab(0.66 0.17 0.07)"},T={colorAlertSuccessBackground:"oklch(0.36 0.03 145.01 / 0.5)",colorAlertSuccessBorder:"oklch(0.53 0.07 145.06 / 0.5)",colorAlertSuccessTitle:"oklch(0.66 0.11 145.62)",colorAlertSuccessText:"oklch(0.6 0.09 145.68)",colorProgressSuccessFill:"oklch(0.66 0.11 145.62)",colorAlertWarningBackground:"oklch(0.38 0.08 108 / 0.5)",colorAlertWarningBorder:"oklch(0.58 0.11 107.83 / 0.5)",colorAlertWarningTitle:"oklch(0.78 0.07 87.96)",colorAlertWarningText:"oklch(0.7 0.07 87.97)",colorAlertErrorBackground:"oklch(0.28 0.06 21.66 / 0.5)",colorAlertErrorBorder:"oklch(0.55 0.1 20.67 / 0.5)",colorAlertErrorTitle:"oklab(0.75 0.18 0.07)",colorAlertErrorText:"oklab(0.65 0.11 0.04)"},A={colorUploadOverlay:"oklch(1.00 0 0 / 0.56)",colorUploadText:"oklch(0.16 0.04 250)",colorUploadOverlayError:"oklch(0.55 0.28 30)",colorUploadErrorText:"oklch(1.00 0 0)",colorUploadOverlayCompleted:"oklch(0.80 0.14 145)",colorUploadCompletedText:"oklch(1.00 0 0)",colorUploadOverlayUploading:"oklch(0.55 0.18 256.43)",colorUploadOverlayUploadingBar:"oklch(0.62 0.18 250)",colorUploadingText:"oklch(1.00 0 0)"},x={colorUploadOverlay:"oklch(0.18 0.05 258.58 / 0.56)",colorUploadText:"oklch(0.85 0 0)",colorUploadOverlayError:"oklch(0.63 0.26 29.23)",colorUploadErrorText:"oklch(1.00 0 0)",colorUploadOverlayCompleted:"oklch(0.82 0.15 139.18)",colorUploadCompletedText:"oklch(1.00 0 0)",colorUploadOverlayUploading:"oklch(0.55 0.18 256.43)",colorUploadOverlayUploadingBar:"oklch(0.62 0.18 250)",colorUploadingText:"oklch(1.00 0 0)"};function v(o,r,l,c,s,g={}){const k=e(o,50),p=e(o,100),A=e(o,200),v=e(o,400),S=e(o,800),b=c.c<.01,y=e(r,900),M=e(r,600),F=y.c>.03?y.c:Math.max(.2*l.c,.008),f=y.c>.03?y.h:l.h,H=b?.65:Math.max(y.l,.3),I=b?r[100]:r[600],E=b?r[200]:r[500],O=h(I,{candidates:[b?t(.15,0,0):t(.2,.01,c.h),"oklch(1.00 0 0)"],metric:g.metric,min:g.min,nudge:g.nudge}).value,U=Math.min(l.c,.06),D=Math.min(2*l.c,.055),W=Math.max(0,Math.cos((l.h-260)*Math.PI/180)),P=Math.min(2*Math.max(0,l.c-.02),.08)*W,w=Math.min(l.c/.06,1),N=(o,r=U)=>{const c=Math.round(100*o)/100,e=((o,r)=>W*r+(1-W)*Math.min(r,Math.max(0,.16*(o-.13))))(c,r),a=Number(e.toFixed(2)),n=u(c,l.h);return a<=n+.005?t(o,e,l.h):i(o,Math.floor(1e3*n)/1e3,l.h)};return{appearance:"dark",...B,...m,background:N(.18-P),foreground:o[50],input:N(.35-P,D),primary:I,primaryScale:r,surfaceScale:o,primaryHover:E,primaryForeground:O,onPrimary:O,secondary:N(.25-P),secondaryHover:N(.34-P),secondaryForeground:t(.86*k.l,0,0),secondaryForegroundHover:b?r[200]:r[500],accent:N(.36-P),accentForeground:o[50],muted:N(.25-P),mutedForeground:t(v.l,0,0),selection:t(.95*p.l,0,0),selectionForeground:o[900],popover:N(.23-P),popoverForeground:o[50],card:N(.21-P),cardForeground:o[50],colorBackgroundFooter:N(.2-P),colorText:t(.86*k.l,0,0),colorTextMuted:a(.86*k.l,0,0,.75),colorTextMutedForeground:t(v.l,0,0),colorPlaceholder:t(.6,.5*S.c,l.h),colorTextNeutral:t(.71,S.c,l.h),colorControlLabel:t(.71,.75*S.c,l.h),cardShadow:s.sm,floatingShadow:s.modal,colorModalShadow:s.modal,colorBorder:N(.29-P,D),colorBorderHover:N(.35-P,D),colorBorderFocus:t(H,.8*F,f),colorBorderFocusRing:a(H,.8*F,f,.5),colorBorderTransparent:a(A.l,A.c,A.h,0),surfaceHairline:"transparent",colorBackgroundAlt:N(.26-P),colorBackgroundAltHover:N(.3-P),colorBackgroundPanel:N(.25-P),colorBackgroundBordered:N(.25-P),colorBackgroundTransparent:"#00000000",colorBackgroundModal:N(.23-P),colorForegroundItemSelected:t(.93*k.l,0,0),colorForegroundItemSelectedText:o[900],colorBackgroundSelect:N(.23-P),colorBackgroundSelectFilled:N(.23-P),colorBackgroundSelectFilledItem:N(.32-P),colorBackgroundSelectItem:N(.26-P),colorBackgroundSelectItemHover:N(.3-P),colorBackgroundSelectItemSelected:N(.34-P),colorDisabledBg:d(N(.21-P),.5),colorDisabledBorder:N(.29-P,D),colorDisabledText:t(.4,.75*S.c,l.h),colorAccentWell:b||l.c>=.03?N(.28-P):t(.28-P,Math.min(.35*M.c,.09,u(.28-P,M.h)),M.h),colorAccentWellInk:b?r[100]:t(Math.max(M.l,.72),Math.min(M.c,.19),M.h),colorIcon:t(.86*k.l,0,0),colorIconMuted:"oklch(0.89 0 0)",colorError:"oklch(0.64 0.24 15.26)",colorErrorText:"oklch(1.00 0 0)",colorErrorBorder:"oklch(0.64 0.24 15.26)",colorSuccess:"oklch(0.67 0.16 150)",colorErrorOutline:"oklch(0.64 0.24 15.26 / 0.5)",colorFocusPrimary:t(H,F,f),colorFocusPrimaryRing:a(H,F,f,.5),colorTextAlpha50:a(.86*k.l,0,0,.5),colorSwitchThumb:o[50],colorSwitchFilledThumb:O,colorTextNeutralAlpha10:a(.61,S.c,l.h,.1),colorTextNeutralAlpha15:a(.61,S.c,l.h,.15),colorTextNeutralAlpha25:a(.61,S.c,l.h,.25),colorTextNeutralAlpha50:a(.61,S.c,l.h,.5),colorBackgroundAltAlpha75:d(N(.21-P),.75),colorBackgroundAltAlpha85:d(N(.21-P),.85),colorUploadTextAlpha50:d(x.colorUploadText,.5),colorCardOverlay:d(N(.23-P),.75),colorOverlay:"oklch(0 0 0 / 0.65)",tooltipBackground:N(.25-P),skeletonBase:N(.21-P),skeletonHighlight:N(.32-P),colorTabActiveBg:N(.31-P),colorTabHoverBg:N(.21-P),colorTabFilledActiveBg:N(.34-P),colorTabFilledTrackBg:N(.21-P),colorButtonOutlineBg:d("oklch(1.00 0 0)",.03),colorButtonOutlineHoverBg:d("oklch(1.00 0 0)",.08),colorButtonGhostHoverBg:d("oklch(1.00 0 0)",.03),colorButtonOutlineAccent:I,colorButtonOutlineAccentHover:E,colorButtonFilledBg:d(I,.1),colorButtonSoftDestructiveBg:"oklch(0.33 0.09 15)",colorButtonSoftDestructiveHoverBg:"oklch(0.39 0.11 15)",scrollbarThumb:d(I,.5),scrollbarThumbHover:I,primaryGradientStart:I,primaryGradientEnd:n(I,E,.5),primaryHoverStart:b?n(r[100],r[200],.3):n(r[600],r[700],.3),primaryHoverEnd:E,primaryContrastText:O,buttonGenericBg:N(.34-P),buttonGenericHoverBg:E,buttonSelectedBorder:E,buttonSelectedBg:E,buttonDisabledBg:N(.21-P),buttonDisabledText:"oklch(1.00 0 0 / 0.3)",...T,colorAlertInfoBackground:a(.29,.06*w,l.h,.5),colorAlertInfoBorder:a(.5,.09*w,l.h,.5),colorAlertInfoTitle:t(.66,.11*w,l.h),colorAlertInfoText:t(.63,.09*w,l.h),...x}}function S(o){const r={};for(const l of Object.keys(o)){const c=Number(l);r[c]=o[c].replace(/oklch\(([\d.]+)%\s/,(o,r)=>`oklch(${(parseFloat(r)/100).toFixed(2)} `)}return r}function b(i,u){l(u.surfaceBase,"surfaceBase"),l(u.primaryBase,"primaryBase");const m=u.surfaceLadder?o(u.surfaceBase,i):r(u.surfaceBase),T=r(u.primaryBase),x=S(m),b=S(T),y=c(u.surfaceBase),M=c(u.primaryBase),F={metric:u.contrastMetric,min:u.contrastMin,nudge:u.onPrimaryNudge},f=s(g(i,u.shadow));return"light"===i?function(o,r,l,c,i,u={},s=!1){const g=e(o,200),m=e(o,900),T=e(o,950),x=Math.max(0,Math.cos((l.h-260)*Math.PI/180)),v=Math.min(Math.max(.85*l.c,.014*x),.045),S=v*(.6+.35*x),b=v,y=1.2*v,M=Math.min(v,.02),F=Math.min(l.c/.06,1),f=(s?.97:.995)-x*v*.65-(1-x)*Math.min(.65*Math.max(0,l.c-.02),.03),H=t(f,S,l.h),I=s?t(Math.min(1,f+.03),S,l.h):H,E=s?I:t(f+.001,S,l.h),O=s?.98:f-.035,U=s?.93:f-.035,D=s?.93:f-.055,W=s?.93:f-.065,P=s?.93:f-.025,w=s?.95:f-.03,N=s?.95:f-.03,C=s?.9:f-.075,G=s?.88:f-.085,j=e(r,300),R=e(r,600),L=j.c>.03?j.c:Math.max(.25*l.c,.01),z=j.c>.03?j.h:l.h,$=Math.min(j.l,.78),q=h(r[600],{candidates:[t(.2,.01,c.h),"oklch(1.00 0 0)"],metric:u.metric,min:u.min,nudge:u.nudge}).value;return{appearance:"light",...B,...k,background:H,foreground:o[950],input:t(C,M,l.h),primary:r[600],primaryScale:r,surfaceScale:o,primaryHover:r[700],primaryForeground:q,onPrimary:q,secondary:t(P,b,l.h),secondaryHover:t(1.03*g.l,.11*c.c,c.h),secondaryForeground:o[950],secondaryForegroundHover:r[600],accent:t(P,b,l.h),accentForeground:o[900],muted:t(P,b,l.h),mutedForeground:o[500],selection:o[950],selectionForeground:"oklch(1.00 0 0)",popover:I,popoverForeground:o[950],card:E,cardForeground:o[950],colorBackgroundFooter:t(N,b,l.h),colorText:o[950],colorTextMuted:t(.52,Math.min(.6*l.c,.04),l.h),colorTextMutedForeground:t(.5,Math.min(.4*l.c,.03),l.h),colorPlaceholder:t(.65,Math.min(.3*l.c,.02),l.h),colorTextNeutral:t(.4,Math.min(.4*l.c,.03),l.h),colorControlLabel:t(.4,Math.min(.5*l.c,.035),l.h),cardShadow:i.sm,floatingShadow:i.lg,colorModalShadow:i["2xl"],colorBorder:t(C,M,l.h),colorBorderHover:a(.5,.17*c.c,c.h,.38),colorBorderFocus:t($,.8*L,z),colorBorderFocusRing:a($,.8*L,z,.5),colorBorderTransparent:d(o[200],0),surfaceHairline:s?"transparent":t(.94,S,l.h),colorBackgroundAlt:t(O,b,l.h),colorBackgroundAltHover:t(D,b,l.h),colorBackgroundPanel:t(W,y,l.h),colorBackgroundBordered:s?I:"transparent",colorBackgroundTransparent:d(H,0),colorBackgroundModal:s?I:n(o[50],H,.5),colorBackgroundInput:s?I:void 0,elevBox:s?"1":void 0,elevNested:s?"0.98":void 0,elevDeep:s?"0.95":void 0,elevationMode:s?"raised":void 0,colorForegroundItemSelected:o[950],colorForegroundItemSelectedText:"oklch(1.00 0 0)",colorBackgroundSelect:I,colorBackgroundSelectFilled:t(W,y,l.h),colorBackgroundSelectFilledItem:I,colorBackgroundSelectItem:I,colorBackgroundSelectItemHover:t(U,b,l.h),colorBackgroundSelectItemSelected:t(D,y,l.h),colorDisabledBg:t(w,b,l.h),colorDisabledBorder:t(G,Math.min(1.6*v,.02),l.h),colorDisabledText:o[400],colorAccentWell:t(.94,Math.min(.15*R.c,.035),R.h),colorAccentWellInk:t(Math.min(R.l,.55),Math.min(R.c,.2),R.h),colorIcon:o[950],colorIconMuted:d(o[700],.5),colorError:"oklch(0.55 0.22 15)",colorErrorText:"oklch(1.00 0 0)",colorErrorBorder:"oklch(0.55 0.22 15)",colorSuccess:"oklch(0.55 0.15 150)",colorErrorOutline:"oklch(0.55 0.22 15 / 0.5)",colorFocusPrimary:r[400],colorFocusPrimaryRing:d(r[400],.5),colorTextAlpha50:d(o[950],.5),colorSwitchThumb:I,colorSwitchFilledThumb:I,colorTextNeutralAlpha10:a(.55,Math.min(.4*l.c,.03),l.h,.1),colorTextNeutralAlpha15:a(.55,Math.min(.4*l.c,.03),l.h,.15),colorTextNeutralAlpha25:a(.55,Math.min(.4*l.c,.03),l.h,.25),colorTextNeutralAlpha50:a(.55,Math.min(.4*l.c,.03),l.h,.5),colorBackgroundAltAlpha75:d(t(w,b,l.h),.75),colorBackgroundAltAlpha85:d(t(w,b,l.h),.85),colorUploadTextAlpha50:d(A.colorUploadText,.5),colorCardOverlay:"oklch(1.00 0 0 / 0.75)",colorOverlay:"oklch(0 0 0 / 0.4)",tooltipBackground:o[900],skeletonBase:t(s?.94:f-.075,b,l.h),skeletonHighlight:t(U,b,l.h),colorTabActiveBg:t(U,b,l.h),colorTabHoverBg:t(U,b,l.h),colorTabFilledActiveBg:I,colorTabFilledTrackBg:t(U,b,l.h),colorButtonOutlineBg:I,colorButtonOutlineHoverBg:t(U,b,l.h),colorButtonGhostHoverBg:t(s?.92:U,b,l.h),colorButtonOutlineAccent:r[700],colorButtonOutlineAccentHover:r[800],colorButtonFilledBg:d(r[600],.1),colorButtonSoftDestructiveBg:"oklch(0.92 0.05 15)",colorButtonSoftDestructiveHoverBg:"oklch(0.88 0.07 15)",scrollbarThumb:d(o[950],.5),scrollbarThumbHover:o[950],primaryGradientStart:n(r[600],r[700],.5),primaryGradientEnd:n(r[600],r[500],.3),primaryHoverStart:n(r[600],r[700],.3),primaryHoverEnd:n(r[500],r[400],.3),primaryContrastText:q,buttonGenericBg:t(m.l,.22*c.c,c.h),buttonGenericHoverBg:r[600],buttonSelectedBorder:r[500],buttonSelectedBg:r[600],buttonDisabledBg:t(T.l,.17*c.c,c.h),buttonDisabledText:"oklch(1.00 0 0 / 0.3)",...p,colorAlertInfoBackground:a(.9,.04*F,l.h,.5),colorAlertInfoBorder:a(.73,.09*F,l.h,.5),colorAlertInfoTitle:t(.56,.11*F,l.h),colorAlertInfoText:t(.63,.09*F,l.h),...A}}(x,b,y,M,f,F,"raised"===u.lightElevation):v(x,b,y,M,f,F)}const y=[["onPrimary","primary"],["primaryForeground","primary"],["primaryContrastText","primary"],["colorAlertInfoTitle","colorAlertInfoBackground"],["colorAlertInfoText","colorAlertInfoBackground"],["colorAlertSuccessTitle","colorAlertSuccessBackground"],["colorAlertSuccessText","colorAlertSuccessBackground"],["colorAlertWarningTitle","colorAlertWarningBackground"],["colorAlertWarningText","colorAlertWarningBackground"],["colorAlertErrorTitle","colorAlertErrorBackground"],["colorAlertErrorText","colorAlertErrorBackground"]];function M(o,r,l={}){let c=null;for(const[e,t]of y){const a=o[t],n=o[e];if("string"!=typeof a||"string"!=typeof n)continue;if(!(o[t]!==r[t]||o[e]!==r[e]))continue;const d=h(a,{override:n,metric:l.metric,min:l.min}).value;d!==n&&(c=c??{...o},c[e]=d)}return c??o}export{b as createTheme,b as default,M as guardOnColors};
1
+ import o,{generateSurfaceScale as r}from"./GenerateColorScale.js";import{validateSeed as l,parseOklch as c,shadeVal as e,fmt as t,fmtAlpha as a,lerp as n,withAlpha as d,fmtC3 as i}from"./colorOps.js";import{resolveOnColor as h,maxSrgbChroma as u}from"./contrast.js";import{buildShadowScale as s,resolveShadowParams as g}from"./shadowScale.js";const B={ringOffset:"1px",ringWidth:"2px",borderRadius:"0.625rem"},k={transitionDuration:"500ms",transitionTimingFunction:"cubic-bezier(0.075, 0.82, 0.165, 1)",boxShadow:"0px 3px 4px 0px rgba(0, 0, 0, 0.03)"},m={transitionDuration:".15s",transitionTimingFunction:"cubic-bezier(.4,0,.2,1)",boxShadow:"none"},p={colorAlertSuccessBackground:"oklch(0.94 0.08 145 / 0.5)",colorAlertSuccessBorder:"oklch(0.75 0.12 145 / 0.5)",colorAlertSuccessTitle:"oklch(0.57 0.14 145.3)",colorAlertSuccessText:"oklch(0.6 0.09 145.68)",colorProgressSuccessFill:"oklch(0.74 0.19 145.25)",colorAlertWarningBackground:"oklch(0.96 0.05 97.36 / 0.5)",colorAlertWarningBorder:"oklch(0.80 0.12 100 / 0.5)",colorAlertWarningTitle:"oklab(0.67 0.03 0.15)",colorAlertWarningText:"oklch(0.7 0.12 90.34)",colorAlertErrorBackground:"oklch(0.95 0.06 15 / 0.5)",colorAlertErrorBorder:"oklch(0.75 0.08 15 / 0.5)",colorAlertErrorTitle:"oklab(0.58 0.15 0.06)",colorAlertErrorText:"oklab(0.66 0.17 0.07)"},T={colorAlertSuccessBackground:"oklch(0.36 0.03 145.01 / 0.5)",colorAlertSuccessBorder:"oklch(0.53 0.07 145.06 / 0.5)",colorAlertSuccessTitle:"oklch(0.66 0.11 145.62)",colorAlertSuccessText:"oklch(0.6 0.09 145.68)",colorProgressSuccessFill:"oklch(0.66 0.11 145.62)",colorAlertWarningBackground:"oklch(0.38 0.08 108 / 0.5)",colorAlertWarningBorder:"oklch(0.58 0.11 107.83 / 0.5)",colorAlertWarningTitle:"oklch(0.78 0.07 87.96)",colorAlertWarningText:"oklch(0.7 0.07 87.97)",colorAlertErrorBackground:"oklch(0.28 0.06 21.66 / 0.5)",colorAlertErrorBorder:"oklch(0.55 0.1 20.67 / 0.5)",colorAlertErrorTitle:"oklab(0.75 0.18 0.07)",colorAlertErrorText:"oklab(0.65 0.11 0.04)"},A={colorUploadOverlay:"oklch(1.00 0 0 / 0.56)",colorUploadText:"oklch(0.16 0.04 250)",colorUploadOverlayError:"oklch(0.55 0.28 30)",colorUploadErrorText:"oklch(1.00 0 0)",colorUploadOverlayCompleted:"oklch(0.80 0.14 145)",colorUploadCompletedText:"oklch(1.00 0 0)",colorUploadOverlayUploading:"oklch(0.55 0.18 256.43)",colorUploadOverlayUploadingBar:"oklch(0.62 0.18 250)",colorUploadingText:"oklch(1.00 0 0)"},x={colorUploadOverlay:"oklch(0.18 0.05 258.58 / 0.56)",colorUploadText:"oklch(0.85 0 0)",colorUploadOverlayError:"oklch(0.63 0.26 29.23)",colorUploadErrorText:"oklch(1.00 0 0)",colorUploadOverlayCompleted:"oklch(0.82 0.15 139.18)",colorUploadCompletedText:"oklch(1.00 0 0)",colorUploadOverlayUploading:"oklch(0.55 0.18 256.43)",colorUploadOverlayUploadingBar:"oklch(0.62 0.18 250)",colorUploadingText:"oklch(1.00 0 0)"};function v(o,r,l,c,s,g={}){const k=e(o,50),p=e(o,100),A=e(o,200),v=e(o,400),S=e(o,800),b=c.c<.01,y=e(r,900),M=e(r,600),F=y.c>.03?y.c:Math.max(.2*l.c,.008),f=y.c>.03?y.h:l.h,H=b?.65:Math.max(y.l,.3),I=b?r[100]:r[600],E=b?r[200]:r[500],O=h(I,{candidates:[b?t(.15,0,0):t(.2,.01,c.h),"oklch(1.00 0 0)"],metric:g.metric,min:g.min,nudge:g.nudge}).value,U=Math.min(l.c,.06),D=Math.min(2*l.c,.055),W=Math.max(0,Math.cos((l.h-260)*Math.PI/180)),P=Math.min(2*Math.max(0,l.c-.02),.08)*W,w=Math.min(l.c/.06,1),N=(o,r=U)=>{const c=Math.round(100*o)/100,e=((o,r)=>W*r+(1-W)*Math.min(r,Math.max(0,.16*(o-.13))))(c,r),a=Number(e.toFixed(2)),n=u(c,l.h);return a<=n+.005?t(o,e,l.h):i(o,Math.floor(1e3*n)/1e3,l.h)};return{appearance:"dark",...B,...m,background:N(.18-P),foreground:o[50],input:N(.35-P,D),primary:I,primaryScale:r,surfaceScale:o,primaryHover:E,primaryForeground:O,onPrimary:O,secondary:N(.25-P),secondaryHover:N(.34-P),secondaryForeground:t(.86*k.l,0,0),secondaryForegroundHover:b?r[200]:r[500],accent:N(.36-P),accentForeground:o[50],muted:N(.25-P),mutedForeground:t(v.l,0,0),selection:t(.95*p.l,0,0),selectionForeground:o[900],popover:N(.23-P),popoverForeground:o[50],card:N(.21-P),cardForeground:o[50],colorBackgroundFooter:N(.2-P),colorText:t(.86*k.l,0,0),colorTextMuted:a(.86*k.l,0,0,.75),colorTextMutedForeground:t(v.l,0,0),colorPlaceholder:t(.6,.5*S.c,l.h),colorTextNeutral:t(.71,S.c,l.h),colorControlLabel:t(.71,.75*S.c,l.h),cardShadow:s.sm,floatingShadow:s.modal,colorModalShadow:s.modal,colorBorder:N(.29-P,D),colorBorderHover:N(.35-P,D),colorBorderFocus:t(H,.8*F,f),colorBorderFocusRing:a(H,.8*F,f,.5),colorBorderTransparent:a(A.l,A.c,A.h,0),surfaceHairline:"transparent",colorBackgroundAlt:N(.26-P),colorBackgroundAltHover:N(.3-P),colorBackgroundPanel:N(.25-P),colorBackgroundBordered:N(.25-P),colorBackgroundTransparent:"#00000000",colorBackgroundModal:N(.23-P),colorForegroundItemSelected:t(.93*k.l,0,0),colorForegroundItemSelectedText:o[900],colorBackgroundSelect:N(.23-P),colorBackgroundSelectFilled:N(.23-P),colorBackgroundSelectFilledItem:N(.32-P),colorBackgroundSelectItem:N(.26-P),colorBackgroundSelectItemHover:N(.3-P),colorBackgroundSelectItemSelected:N(.34-P),colorDisabledBg:d(N(.21-P),.5),colorDisabledBorder:N(.29-P,D),colorDisabledText:t(.4,.75*S.c,l.h),colorAccentWell:b||l.c>=.03?N(.28-P):t(.28-P,Math.min(.35*M.c,.09,u(.28-P,M.h)),M.h),colorAccentWellInk:b?r[100]:t(Math.max(M.l,.72),Math.min(M.c,.19),M.h),colorIcon:t(.86*k.l,0,0),colorIconMuted:"oklch(0.89 0 0)",colorError:"oklch(0.64 0.24 15.26)",colorErrorText:"oklch(1.00 0 0)",colorErrorBorder:"oklch(0.64 0.24 15.26)",colorSuccess:"oklch(0.67 0.16 150)",colorErrorOutline:"oklch(0.64 0.24 15.26 / 0.5)",colorFocusPrimary:t(H,F,f),colorFocusPrimaryRing:a(H,F,f,.5),colorTextAlpha50:a(.86*k.l,0,0,.5),colorSwitchThumb:o[50],colorSwitchFilledThumb:O,colorTextNeutralAlpha10:a(.61,S.c,l.h,.1),colorTextNeutralAlpha15:a(.61,S.c,l.h,.15),colorTextNeutralAlpha25:a(.61,S.c,l.h,.25),colorTextNeutralAlpha50:a(.61,S.c,l.h,.5),colorBackgroundAltAlpha75:d(N(.21-P),.75),colorBackgroundAltAlpha85:d(N(.21-P),.85),colorUploadTextAlpha50:d(x.colorUploadText,.5),colorCardOverlay:d(N(.23-P),.75),colorOverlay:"oklch(0 0 0 / 0.65)",tooltipBackground:N(.25-P),skeletonBase:N(.21-P),skeletonHighlight:N(.32-P),colorTabActiveBg:N(.31-P),colorTabHoverBg:N(.21-P),colorTabFilledActiveBg:N(.34-P),colorTabFilledTrackBg:N(.21-P),colorButtonOutlineBg:d("oklch(1.00 0 0)",.03),colorButtonOutlineHoverBg:d("oklch(1.00 0 0)",.08),colorButtonGhostHoverBg:d("oklch(1.00 0 0)",.03),colorButtonOutlineAccent:I,colorButtonOutlineAccentHover:E,colorButtonFilledBg:d(I,.1),colorButtonSoftDestructiveBg:"oklch(0.33 0.09 15)",colorButtonSoftDestructiveHoverBg:"oklch(0.39 0.11 15)",scrollbarThumb:d(I,.5),scrollbarThumbHover:I,primaryGradientStart:I,primaryGradientEnd:n(I,E,.5),primaryHoverStart:b?n(r[100],r[200],.3):n(r[600],r[700],.3),primaryHoverEnd:E,primaryContrastText:O,buttonGenericBg:N(.34-P),buttonGenericHoverBg:E,buttonSelectedBorder:E,buttonSelectedBg:E,buttonDisabledBg:N(.21-P),buttonDisabledText:"oklch(1.00 0 0 / 0.3)",...T,colorAlertInfoBackground:a(.29,.06*w,l.h,.5),colorAlertInfoBorder:a(.5,.09*w,l.h,.5),colorAlertInfoTitle:t(.66,.11*w,l.h),colorAlertInfoText:t(.63,.09*w,l.h),...x}}function S(o){const r={};for(const l of Object.keys(o)){const c=Number(l);r[c]=o[c].replace(/oklch\(([\d.]+)%\s/,(o,r)=>`oklch(${(parseFloat(r)/100).toFixed(2)} `)}return r}function b(i,u){l(u.surfaceBase,"surfaceBase"),l(u.primaryBase,"primaryBase");const m=u.surfaceLadder?r(u.surfaceBase,i):o(u.surfaceBase),T=o(u.primaryBase),x=S(m),b=S(T),y=c(u.surfaceBase),M=c(u.primaryBase),F={metric:u.contrastMetric,min:u.contrastMin,nudge:u.onPrimaryNudge},f=s(g(i,u.shadow));return"light"===i?function(o,r,l,c,i,u={},s=!1){const g=e(o,200),m=e(o,900),T=e(o,950),x=Math.max(0,Math.cos((l.h-260)*Math.PI/180)),v=Math.min(Math.max(.85*l.c,.014*x),.045),S=v*(.6+.35*x),b=v,y=1.2*v,M=Math.min(v,.02),F=Math.min(l.c/.06,1),f=(s?.97:.995)-x*v*.65-(1-x)*Math.min(.65*Math.max(0,l.c-.02),.03),H=t(f,S,l.h),I=s?t(Math.min(1,f+.03),S,l.h):H,E=s?I:t(f+.001,S,l.h),O=s?.98:f-.035,U=s?.93:f-.035,D=s?.93:f-.055,W=s?.93:f-.065,P=s?.93:f-.025,w=s?.95:f-.03,N=s?.95:f-.03,C=s?.9:f-.075,G=s?.88:f-.085,j=e(r,300),R=e(r,600),L=j.c>.03?j.c:Math.max(.25*l.c,.01),z=j.c>.03?j.h:l.h,$=Math.min(j.l,.78),q=h(r[600],{candidates:[t(.2,.01,c.h),"oklch(1.00 0 0)"],metric:u.metric,min:u.min,nudge:u.nudge}).value;return{appearance:"light",...B,...k,background:H,foreground:o[950],input:t(C,M,l.h),primary:r[600],primaryScale:r,surfaceScale:o,primaryHover:r[700],primaryForeground:q,onPrimary:q,secondary:t(P,b,l.h),secondaryHover:t(1.03*g.l,.11*c.c,c.h),secondaryForeground:o[950],secondaryForegroundHover:r[600],accent:t(P,b,l.h),accentForeground:o[900],muted:t(P,b,l.h),mutedForeground:o[500],selection:o[950],selectionForeground:"oklch(1.00 0 0)",popover:I,popoverForeground:o[950],card:E,cardForeground:o[950],colorBackgroundFooter:t(N,b,l.h),colorText:o[950],colorTextMuted:t(.52,Math.min(.6*l.c,.04),l.h),colorTextMutedForeground:t(.5,Math.min(.4*l.c,.03),l.h),colorPlaceholder:t(.65,Math.min(.3*l.c,.02),l.h),colorTextNeutral:t(.4,Math.min(.4*l.c,.03),l.h),colorControlLabel:t(.4,Math.min(.5*l.c,.035),l.h),cardShadow:i.sm,floatingShadow:i.lg,colorModalShadow:i["2xl"],colorBorder:t(C,M,l.h),colorBorderHover:a(.5,.17*c.c,c.h,.38),colorBorderFocus:t($,.8*L,z),colorBorderFocusRing:a($,.8*L,z,.5),colorBorderTransparent:d(o[200],0),surfaceHairline:s?"transparent":t(.94,S,l.h),colorBackgroundAlt:t(O,b,l.h),colorBackgroundAltHover:t(D,b,l.h),colorBackgroundPanel:t(W,y,l.h),colorBackgroundBordered:s?I:"transparent",colorBackgroundTransparent:d(H,0),colorBackgroundModal:s?I:n(o[50],H,.5),colorBackgroundInput:s?I:void 0,elevBox:s?"1":void 0,elevNested:s?"0.98":void 0,elevDeep:s?"0.95":void 0,elevationMode:s?"raised":void 0,colorForegroundItemSelected:o[950],colorForegroundItemSelectedText:"oklch(1.00 0 0)",colorBackgroundSelect:I,colorBackgroundSelectFilled:t(W,y,l.h),colorBackgroundSelectFilledItem:I,colorBackgroundSelectItem:I,colorBackgroundSelectItemHover:t(U,b,l.h),colorBackgroundSelectItemSelected:t(D,y,l.h),colorDisabledBg:t(w,b,l.h),colorDisabledBorder:t(G,Math.min(1.6*v,.02),l.h),colorDisabledText:o[400],colorAccentWell:t(.94,Math.min(.15*R.c,.035),R.h),colorAccentWellInk:t(Math.min(R.l,.55),Math.min(R.c,.2),R.h),colorIcon:o[950],colorIconMuted:d(o[700],.5),colorError:"oklch(0.55 0.22 15)",colorErrorText:"oklch(1.00 0 0)",colorErrorBorder:"oklch(0.55 0.22 15)",colorSuccess:"oklch(0.55 0.15 150)",colorErrorOutline:"oklch(0.55 0.22 15 / 0.5)",colorFocusPrimary:r[400],colorFocusPrimaryRing:d(r[400],.5),colorTextAlpha50:d(o[950],.5),colorSwitchThumb:I,colorSwitchFilledThumb:I,colorTextNeutralAlpha10:a(.55,Math.min(.4*l.c,.03),l.h,.1),colorTextNeutralAlpha15:a(.55,Math.min(.4*l.c,.03),l.h,.15),colorTextNeutralAlpha25:a(.55,Math.min(.4*l.c,.03),l.h,.25),colorTextNeutralAlpha50:a(.55,Math.min(.4*l.c,.03),l.h,.5),colorBackgroundAltAlpha75:d(t(w,b,l.h),.75),colorBackgroundAltAlpha85:d(t(w,b,l.h),.85),colorUploadTextAlpha50:d(A.colorUploadText,.5),colorCardOverlay:"oklch(1.00 0 0 / 0.75)",colorOverlay:"oklch(0 0 0 / 0.4)",tooltipBackground:o[900],skeletonBase:t(s?.94:f-.075,b,l.h),skeletonHighlight:t(U,b,l.h),colorTabActiveBg:t(U,b,l.h),colorTabHoverBg:t(U,b,l.h),colorTabFilledActiveBg:I,colorTabFilledTrackBg:t(U,b,l.h),colorButtonOutlineBg:I,colorButtonOutlineHoverBg:t(U,b,l.h),colorButtonGhostHoverBg:t(s?.92:U,b,l.h),colorButtonOutlineAccent:r[700],colorButtonOutlineAccentHover:r[800],colorButtonFilledBg:d(r[600],.1),colorButtonSoftDestructiveBg:"oklch(0.92 0.05 15)",colorButtonSoftDestructiveHoverBg:"oklch(0.88 0.07 15)",scrollbarThumb:d(o[950],.5),scrollbarThumbHover:o[950],primaryGradientStart:n(r[600],r[700],.5),primaryGradientEnd:n(r[600],r[500],.3),primaryHoverStart:n(r[600],r[700],.3),primaryHoverEnd:n(r[500],r[400],.3),primaryContrastText:q,buttonGenericBg:t(m.l,.22*c.c,c.h),buttonGenericHoverBg:r[600],buttonSelectedBorder:r[500],buttonSelectedBg:r[600],buttonDisabledBg:t(T.l,.17*c.c,c.h),buttonDisabledText:"oklch(1.00 0 0 / 0.3)",...p,colorAlertInfoBackground:a(.9,.04*F,l.h,.5),colorAlertInfoBorder:a(.73,.09*F,l.h,.5),colorAlertInfoTitle:t(.56,.11*F,l.h),colorAlertInfoText:t(.63,.09*F,l.h),...A}}(x,b,y,M,f,F,"raised"===u.lightElevation):v(x,b,y,M,f,F)}const y=[["onPrimary","primary"],["primaryForeground","primary"],["primaryContrastText","primary"],["colorAlertInfoTitle","colorAlertInfoBackground"],["colorAlertInfoText","colorAlertInfoBackground"],["colorAlertSuccessTitle","colorAlertSuccessBackground"],["colorAlertSuccessText","colorAlertSuccessBackground"],["colorAlertWarningTitle","colorAlertWarningBackground"],["colorAlertWarningText","colorAlertWarningBackground"],["colorAlertErrorTitle","colorAlertErrorBackground"],["colorAlertErrorText","colorAlertErrorBackground"]];function M(o,r,l={}){let c=null;for(const[e,t]of y){const a=o[t],n=o[e];if("string"!=typeof a||"string"!=typeof n)continue;if(!(o[t]!==r[t]||o[e]!==r[e]))continue;const d=h(a,{override:n,metric:l.metric,min:l.min}).value;d!==n&&(c=c??{...o},c[e]=d)}return c??o}export{b as createTheme,M as guardOnColors};
@@ -1 +1 @@
1
- import{parseColorSafe as r}from"./colorOps.js";import{BRAND_PRESETS as o,SURFACE_PRESETS as e}from"./presets.js";const n={background:"background",foreground:"foreground",card:"card","card-foreground":"cardForeground",popover:"popover","popover-foreground":"popoverForeground",primary:"primary","primary-foreground":"primaryForeground",secondary:"secondary","secondary-foreground":"secondaryForeground",muted:"muted","muted-foreground":"mutedForeground",accent:"accent","accent-foreground":"accentForeground",input:"input",border:"colorBorder",destructive:"colorError","destructive-foreground":"colorErrorText",ring:null,"chart-1":null,"chart-2":null,"chart-3":null,"chart-4":null,"chart-5":null,sidebar:null,"sidebar-foreground":null,"sidebar-primary":null,"sidebar-primary-foreground":null,"sidebar-accent":null,"sidebar-accent-foreground":null,"sidebar-border":null,"sidebar-ring":null},u=new Set(["background","card","primary"]),t=e.neutral.base,a=o.blue.base,c=e.neutral.base,d=o.golden.base;function l(r,o){const e="root"===o?/:root\s*\{([\s\S]*?)\}/m:/\.dark\s*\{([\s\S]*?)\}/m,n=r.match(e);return n?n[1]:""}function s(r){const o={},e=/--([\w-]+)\s*:\s*([^;]+);/g;let n;for(;null!==(n=e.exec(r));)o[n[1].trim()]=n[2].trim();return o}function i(o){return o&&null!==r(o)?o:null}function g(o,e,t,a){const c=i(e.background)??i(e.card)??t,d=i(e.primary)??a,l={};for(const[o,t]of Object.entries(e)){if(u.has(o))continue;if(!(o in n))continue;const e=n[o];null!=e&&(null!==r(t)&&(l[e]=t))}return e.destructive&&null!==r(e.destructive)&&(l.colorErrorBorder=e.destructive),{themeName:o,surfaceBase:c,primaryBase:d,customTheme:l}}function f(r){const o=s(l(r,"root")),e=s(l(r,"dark"));return{light:g("light",o,t,a),dark:g("dark",e,c,d)}}export{n as SHADCN_TO_ITD_ALIAS,f as default,f as importShadcnTheme,s as parseCssVars};
1
+ import{parseColorSafe as r}from"./colorOps.js";import{BRAND_PRESETS as o,SURFACE_PRESETS as e}from"./presets.js";const n={background:"background",foreground:"foreground",card:"card","card-foreground":"cardForeground",popover:"popover","popover-foreground":"popoverForeground",primary:"primary","primary-foreground":"primaryForeground",secondary:"secondary","secondary-foreground":"secondaryForeground",muted:"muted","muted-foreground":"mutedForeground",accent:"accent","accent-foreground":"accentForeground",input:"input",border:"colorBorder",destructive:"colorError","destructive-foreground":"colorErrorText",ring:null,"chart-1":null,"chart-2":null,"chart-3":null,"chart-4":null,"chart-5":null,sidebar:null,"sidebar-foreground":null,"sidebar-primary":null,"sidebar-primary-foreground":null,"sidebar-accent":null,"sidebar-accent-foreground":null,"sidebar-border":null,"sidebar-ring":null},u=new Set(["background","card","primary"]),t=e.neutral.base,c=o.blue.base,a=e.neutral.base,d=o.golden.base;function l(r,o){const e="root"===o?/:root\s*\{([\s\S]*?)\}/m:/\.dark\s*\{([\s\S]*?)\}/m,n=r.match(e);return n?n[1]:""}function s(r){const o={},e=/--([\w-]+)\s*:\s*([^;]+);/g;let n;for(;null!==(n=e.exec(r));)o[n[1].trim()]=n[2].trim();return o}function i(o){return o&&null!==r(o)?o:null}function g(o,e,t,c){const a=i(e.background)??i(e.card)??t,d=i(e.primary)??c,l={};for(const[o,t]of Object.entries(e)){if(u.has(o))continue;if(!(o in n))continue;const e=n[o];null!=e&&(null!==r(t)&&(l[e]=t))}return e.destructive&&null!==r(e.destructive)&&(l.colorErrorBorder=e.destructive),{themeName:o,surfaceBase:a,primaryBase:d,customTheme:l}}function m(r){const o=s(l(r,"root")),e=s(l(r,"dark"));return{light:g("light",o,t,c),dark:g("dark",e,a,d)}}export{n as SHADCN_TO_ITD_ALIAS,m as importShadcnTheme,s as parseCssVars};
@@ -1 +1 @@
1
- import{useRef as e,useEffect as t}from"react";import{pushOverlayLayer as n}from"../primitives/overlayStack.js";function r(e){if("undefined"==typeof window)return[];const t=e.ownerDocument.defaultView??window,n=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");return Array.from(e.querySelectorAll(n)).filter(e=>{if("-1"===e.getAttribute("tabindex"))return!1;if(e.hasAttribute("disabled"))return!1;const n=t.getComputedStyle(e);return"none"!==n.display&&"hidden"!==n.visibility&&"0"!==n.opacity&&(null!==e.offsetParent||"fixed"===n.position)})}function o({isActive:o=!1,containerRef:u,initialFocusRef:i,returnFocusRef:c,autoFocus:s=!0,trapFocusOutside:f=!1,restoreFocus:l=!0}){const a=e(null),d=e(null);t(()=>{if("undefined"==typeof document)return;if(!o)return;const e=u.current,t=e?e.ownerDocument:document;if(!e)return;const p=t.activeElement;p&&p!==t.body&&(a.current=p);let y=null;if(f&&(y=n(e,{trapsFocus:!0})),s){const t=r(e);let n=null;n=i?.current&&e.contains(i.current)?i.current:t[0],n&&(n.focus(),d.current=n)}else p&&e.contains(p)&&(d.current=p);const m=n=>{if("Tab"!==n.key||n.altKey||n.ctrlKey||n.metaKey)return;const o=t.activeElement;if(!o||!e.contains(o))return;const u=r(e);if(0===u.length)return;const i=u.indexOf(o);if(n.shiftKey){if(i<=0){n.preventDefault();const e=u[u.length-1];e?.focus(),d.current=e??null}}else if(-1===i||i===u.length-1){n.preventDefault();const e=u[0];e?.focus(),d.current=e??null}},v=t=>{if(!f)return;if(y&&!y.isTopFocusTrap())return;const n=t.target;if(!n)return;if(e.contains(n))return void(d.current=n);const o=r(e),u=d.current&&e.contains(d.current)&&d.current||o[0]||null;u&&(u.focus(),d.current=u)};return t.addEventListener("keydown",m),f&&t.addEventListener("focusin",v),()=>{t.removeEventListener("keydown",m),f&&t.removeEventListener("focusin",v),y?.release(),l&&(c?.current?c.current.focus():a.current&&a.current.focus())}},[o,u,i,c,s,f,l])}export{o as useFocusTrap};
1
+ import{useRef as e,useEffect as t}from"react";import n from"../primitives/overlayStack.js";function r(e){if("undefined"==typeof window)return[];const t=e.ownerDocument.defaultView??window,n=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");return Array.from(e.querySelectorAll(n)).filter(e=>{if("-1"===e.getAttribute("tabindex"))return!1;if(e.hasAttribute("disabled"))return!1;const n=t.getComputedStyle(e);return"none"!==n.display&&"hidden"!==n.visibility&&"0"!==n.opacity&&(null!==e.offsetParent||"fixed"===n.position)})}function o({isActive:o=!1,containerRef:u,initialFocusRef:i,returnFocusRef:c,autoFocus:s=!0,trapFocusOutside:f=!1,restoreFocus:l=!0}){const a=e(null),d=e(null);t(()=>{if("undefined"==typeof document)return;if(!o)return;const e=u.current,t=e?e.ownerDocument:document;if(!e)return;const p=t.activeElement;p&&p!==t.body&&(a.current=p);let y=null;if(f&&(y=n(e,{trapsFocus:!0})),s){const t=r(e);let n=null;n=i?.current&&e.contains(i.current)?i.current:t[0],n&&(n.focus(),d.current=n)}else p&&e.contains(p)&&(d.current=p);const m=n=>{if("Tab"!==n.key||n.altKey||n.ctrlKey||n.metaKey)return;const o=t.activeElement;if(!o||!e.contains(o))return;const u=r(e);if(0===u.length)return;const i=u.indexOf(o);if(n.shiftKey){if(i<=0){n.preventDefault();const e=u[u.length-1];e?.focus(),d.current=e??null}}else if(-1===i||i===u.length-1){n.preventDefault();const e=u[0];e?.focus(),d.current=e??null}},v=t=>{if(!f)return;if(y&&!y.isTopFocusTrap())return;const n=t.target;if(!n)return;if(e.contains(n))return void(d.current=n);const o=r(e),u=d.current&&e.contains(d.current)&&d.current||o[0]||null;u&&(u.focus(),d.current=u)};return t.addEventListener("keydown",m),f&&t.addEventListener("focusin",v),()=>{t.removeEventListener("keydown",m),f&&t.removeEventListener("focusin",v),y?.release(),l&&(c?.current?c.current.focus():a.current&&a.current.focus())}},[o,u,i,c,s,f,l])}export{o as useFocusTrap};
@@ -1 +1 @@
1
- import{useRef as r,useCallback as e}from"react";import{realmOf as t}from"./useRealm.js";const n=(n,o,s)=>{const c=r(null),u=r(o);u.current=o;const i=s?.rootMargin??"120px",a=s?.resetKey;return e(r=>{if(c.current?.disconnect(),c.current=null,!r||!n)return;const e=t(r).win?.IntersectionObserver;if(!e)return;const o=new e(r=>{r.some(r=>r.isIntersecting)&&u.current?.()},{rootMargin:i});o.observe(r),c.current=o},[n,i,a])};export{n as default,n as useLoadMoreSentinel};
1
+ import{useRef as r,useCallback as e}from"react";import{realmOf as n}from"./useRealm.js";const t=(t,o,c)=>{const s=r(null),i=r(o);i.current=o;const u=c?.rootMargin??"120px",m=c?.resetKey;return e(r=>{if(s.current?.disconnect(),s.current=null,!r||!t)return;const e=n(r).win?.IntersectionObserver;if(!e)return;const o=new e(r=>{r.some(r=>r.isIntersecting)&&i.current?.()},{rootMargin:u});o.observe(r),s.current=o},[t,u,m])};export{t as useLoadMoreSentinel};
@@ -1 +1 @@
1
- import{useRef as r,useEffect as e}from"react";import{pushOverlayLayer as t}from"../primitives/overlayStack.js";const n=(n,o,c={})=>{const{enabled:a=!0}=c,s=r(n);s.current=n,e(()=>{if(!a)return;const r=t(o?.current??null,{onEscape:r=>s.current(r)});return()=>r.release()},[a,o])};export{n as default};
1
+ import{useRef as r,useEffect as e}from"react";import t from"../primitives/overlayStack.js";const n=(n,o,c={})=>{const{enabled:a=!0}=c,s=r(n);s.current=n,e(()=>{if(!a)return;const r=t(o?.current??null,{onEscape:r=>s.current(r)});return()=>r.release()},[a,o])};export{n as default};