@ranixxd/saju-design-system 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/dist/index.cjs +1 -0
- package/dist/index.mjs +1157 -0
- package/dist/style.css +1 -0
- package/dist/types/components/Avatar/Avatar.d.ts +10 -0
- package/dist/types/components/Avatar/index.d.ts +2 -0
- package/dist/types/components/Badge/Badge.d.ts +11 -0
- package/dist/types/components/Badge/index.d.ts +2 -0
- package/dist/types/components/Button/Button.d.ts +12 -0
- package/dist/types/components/Button/index.d.ts +2 -0
- package/dist/types/components/Card/Card.d.ts +11 -0
- package/dist/types/components/Card/index.d.ts +2 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +9 -0
- package/dist/types/components/Checkbox/index.d.ts +2 -0
- package/dist/types/components/Divider/Divider.d.ts +8 -0
- package/dist/types/components/Divider/index.d.ts +2 -0
- package/dist/types/components/Input/Input.d.ts +14 -0
- package/dist/types/components/Input/index.d.ts +2 -0
- package/dist/types/components/Modal/Modal.d.ts +14 -0
- package/dist/types/components/Modal/index.d.ts +2 -0
- package/dist/types/components/Radio/Radio.d.ts +21 -0
- package/dist/types/components/Radio/index.d.ts +2 -0
- package/dist/types/components/Select/Select.d.ts +18 -0
- package/dist/types/components/Select/index.d.ts +2 -0
- package/dist/types/components/Spinner/Spinner.d.ts +10 -0
- package/dist/types/components/Spinner/index.d.ts +2 -0
- package/dist/types/components/Tag/Tag.d.ts +9 -0
- package/dist/types/components/Tag/index.d.ts +2 -0
- package/dist/types/components/Textarea/Textarea.d.ts +10 -0
- package/dist/types/components/Textarea/index.d.ts +2 -0
- package/dist/types/components/Toast/Toast.d.ts +22 -0
- package/dist/types/components/Toast/index.d.ts +2 -0
- package/dist/types/components/Toggle/Toggle.d.ts +8 -0
- package/dist/types/components/Toggle/index.d.ts +2 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +10 -0
- package/dist/types/components/Tooltip/index.d.ts +2 -0
- package/dist/types/components/Typography/Typography.d.ts +17 -0
- package/dist/types/components/Typography/index.d.ts +2 -0
- package/dist/types/components/index.d.ts +17 -0
- package/dist/types/foundations/breakpoints.d.ts +19 -0
- package/dist/types/foundations/colors.d.ts +116 -0
- package/dist/types/foundations/index.d.ts +5 -0
- package/dist/types/foundations/shadows.d.ts +11 -0
- package/dist/types/foundations/spacing.d.ts +33 -0
- package/dist/types/foundations/typography.d.ts +37 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +75 -0
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
|
9
|
+
|
|
10
|
+
## React Compiler
|
|
11
|
+
|
|
12
|
+
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
|
13
|
+
|
|
14
|
+
## Expanding the ESLint configuration
|
|
15
|
+
|
|
16
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
export default defineConfig([
|
|
20
|
+
globalIgnores(['dist']),
|
|
21
|
+
{
|
|
22
|
+
files: ['**/*.{ts,tsx}'],
|
|
23
|
+
extends: [
|
|
24
|
+
// Other configs...
|
|
25
|
+
|
|
26
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
27
|
+
tseslint.configs.recommendedTypeChecked,
|
|
28
|
+
// Alternatively, use this for stricter rules
|
|
29
|
+
tseslint.configs.strictTypeChecked,
|
|
30
|
+
// Optionally, add this for stylistic rules
|
|
31
|
+
tseslint.configs.stylisticTypeChecked,
|
|
32
|
+
|
|
33
|
+
// Other configs...
|
|
34
|
+
],
|
|
35
|
+
languageOptions: {
|
|
36
|
+
parserOptions: {
|
|
37
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
+
tsconfigRootDir: import.meta.dirname,
|
|
39
|
+
},
|
|
40
|
+
// other options...
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
])
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
// eslint.config.js
|
|
50
|
+
import reactX from 'eslint-plugin-react-x'
|
|
51
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
52
|
+
|
|
53
|
+
export default defineConfig([
|
|
54
|
+
globalIgnores(['dist']),
|
|
55
|
+
{
|
|
56
|
+
files: ['**/*.{ts,tsx}'],
|
|
57
|
+
extends: [
|
|
58
|
+
// Other configs...
|
|
59
|
+
// Enable lint rules for React
|
|
60
|
+
reactX.configs['recommended-typescript'],
|
|
61
|
+
// Enable lint rules for React DOM
|
|
62
|
+
reactDom.configs.recommended,
|
|
63
|
+
],
|
|
64
|
+
languageOptions: {
|
|
65
|
+
parserOptions: {
|
|
66
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
67
|
+
tsconfigRootDir: import.meta.dirname,
|
|
68
|
+
},
|
|
69
|
+
// other options...
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
])
|
|
73
|
+
```
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),K="_button_1sr1u_1",V="_sm_1sr1u_31",J="_md_1sr1u_38",Q="_lg_1sr1u_45",X="_primary_1sr1u_53",Y="_secondary_1sr1u_67",Z="_outline_1sr1u_80",O="_ghost_1sr1u_92",ee="_danger_1sr1u_104",se="_fullWidth_1sr1u_120",te="_loading_1sr1u_125",re="_icon_1sr1u_130",oe="_label_1sr1u_136",ne="_spinner_1sr1u_142",ae="_spin_1sr1u_142",j={button:K,sm:V,md:J,lg:Q,primary:X,secondary:Y,outline:Z,ghost:O,danger:ee,fullWidth:se,loading:te,icon:re,label:oe,spinner:ne,spin:ae},I=p.forwardRef(({variant:r="primary",size:t="md",loading:s=!1,leftIcon:o,rightIcon:n,fullWidth:a=!1,disabled:i,children:l,className:_,...d},m)=>{const b=i||s;return e.jsxs("button",{ref:m,className:[j.button,j[r],j[t],a?j.fullWidth:"",s?j.loading:"",_??""].filter(Boolean).join(" "),disabled:b,"aria-busy":s,...d,children:[s&&e.jsx("span",{className:j.spinner,"aria-hidden":"true"}),!s&&o&&e.jsx("span",{className:j.icon,children:o}),e.jsx("span",{className:j.label,children:l}),!s&&n&&e.jsx("span",{className:j.icon,children:n})]})});I.displayName="Button";const le="_wrapper_1g7vq_1",ie="_fullWidth_1g7vq_7",ce="_label_1g7vq_11",_e="_inputWrapper_1g7vq_18",de="_error_1g7vq_33",pe="_success_1g7vq_41",me="_disabled_1g7vq_45",ue="_sm_1g7vq_51",xe="_input_1g7vq_18",he="_md_1g7vq_60",ge="_lg_1g7vq_69",be="_addon_1g7vq_98",fe="_helperText_1g7vq_106",je="_errorText_1g7vq_113",x={wrapper:le,fullWidth:ie,label:ce,inputWrapper:_e,error:de,success:pe,disabled:me,sm:ue,input:xe,md:he,lg:ge,addon:be,helperText:fe,errorText:je},A=p.forwardRef(({size:r="md",label:t,helperText:s,errorMessage:o,leftAddon:n,rightAddon:a,isError:i=!1,isSuccess:l=!1,fullWidth:_=!1,id:d,disabled:m,className:b,...f},F)=>{const u=d??(t?`input-${t.toLowerCase().replace(/\s+/g,"-")}`:void 0),q=i||!!o;return e.jsxs("div",{className:[x.wrapper,_?x.fullWidth:""].filter(Boolean).join(" "),children:[t&&e.jsx("label",{htmlFor:u,className:x.label,children:t}),e.jsxs("div",{className:[x.inputWrapper,x[r],q?x.error:"",l?x.success:"",m?x.disabled:""].filter(Boolean).join(" "),children:[n&&e.jsx("span",{className:x.addon,children:n}),e.jsx("input",{ref:F,id:u,disabled:m,"aria-invalid":q,"aria-describedby":o?`${u}-error`:s?`${u}-helper`:void 0,className:[x.input,b??""].filter(Boolean).join(" "),...f}),a&&e.jsx("span",{className:x.addon,children:a})]}),o&&e.jsx("p",{id:`${u}-error`,className:x.errorText,role:"alert",children:o}),!o&&s&&e.jsx("p",{id:`${u}-helper`,className:x.helperText,children:s})]})});A.displayName="Input";const ve="_wrapper_19m1u_1",we="_fullWidth_19m1u_7",ye="_textarea_19m1u_10",$e="_label_19m1u_14",Ne="_error_19m1u_44",Be="_disabled_19m1u_51",Fe="_helperText_19m1u_57",Te="_errorText_19m1u_63",y={wrapper:ve,fullWidth:we,textarea:ye,label:$e,error:Ne,disabled:Be,helperText:Fe,errorText:Te},S=p.forwardRef(({label:r,helperText:t,errorMessage:s,isError:o=!1,fullWidth:n=!1,resize:a="vertical",id:i,disabled:l,className:_,...d},m)=>{const b=i??(r?`textarea-${r.toLowerCase().replace(/\s+/g,"-")}`:void 0),f=o||!!s;return e.jsxs("div",{className:[y.wrapper,n?y.fullWidth:""].filter(Boolean).join(" "),children:[r&&e.jsx("label",{htmlFor:b,className:y.label,children:r}),e.jsx("textarea",{ref:m,id:b,disabled:l,"aria-invalid":f,className:[y.textarea,f?y.error:"",l?y.disabled:"",_??""].filter(Boolean).join(" "),style:{resize:a},...d}),s&&e.jsx("p",{className:y.errorText,role:"alert",children:s}),!s&&t&&e.jsx("p",{className:y.helperText,children:t})]})});S.displayName="Textarea";const ke="_wrapper_15dy7_1",qe="_fullWidth_15dy7_7",Ce="_selectWrapper_15dy7_10",Ee="_label_15dy7_14",ze="_error_15dy7_36",We="_disabled_15dy7_43",Le="_sm_15dy7_49",De="_select_15dy7_10",Re="_md_15dy7_50",Ie="_lg_15dy7_51",Ae="_chevron_15dy7_71",Se="_helperText_15dy7_80",Me="_errorText_15dy7_86",g={wrapper:ke,fullWidth:qe,selectWrapper:Ce,label:Ee,error:ze,disabled:We,sm:Le,select:De,md:Re,lg:Ie,chevron:Ae,helperText:Se,errorText:Me},M=p.forwardRef(({size:r="md",label:t,helperText:s,errorMessage:o,isError:n=!1,fullWidth:a=!1,options:i=[],placeholder:l,id:_,disabled:d,className:m,children:b,...f},F)=>{const u=_??(t?`select-${t.toLowerCase().replace(/\s+/g,"-")}`:void 0),q=n||!!o;return e.jsxs("div",{className:[g.wrapper,a?g.fullWidth:""].filter(Boolean).join(" "),children:[t&&e.jsx("label",{htmlFor:u,className:g.label,children:t}),e.jsxs("div",{className:[g.selectWrapper,g[r],q?g.error:"",d?g.disabled:""].filter(Boolean).join(" "),children:[e.jsxs("select",{ref:F,id:u,disabled:d,"aria-invalid":q,className:[g.select,m??""].filter(Boolean).join(" "),...f,children:[l&&e.jsx("option",{value:"",disabled:!0,children:l}),b??i.map(E=>e.jsx("option",{value:E.value,disabled:E.disabled,children:E.label},E.value))]}),e.jsx("span",{className:g.chevron,"aria-hidden":"true",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),o&&e.jsx("p",{className:g.errorText,role:"alert",children:o}),!o&&s&&e.jsx("p",{className:g.helperText,children:s})]})});M.displayName="Select";const He="_wrapper_19mpw_1",Pe="_label_19mpw_7",Ue="_disabled_19mpw_15",Ge="_input_19mpw_20",Ke="_checkmark_19mpw_27",Ve="_error_19mpw_71",Je="_labelText_19mpw_75",Qe="_helperText_19mpw_81",Xe="_errorText_19mpw_88",v={wrapper:He,label:Pe,disabled:Ue,input:Ge,checkmark:Ke,error:Ve,labelText:Je,helperText:Qe,errorText:Xe},H=p.forwardRef(({label:r,helperText:t,errorMessage:s,isError:o=!1,indeterminate:n=!1,id:a,disabled:i,className:l,..._},d)=>{const m=p.useRef(null),b=u=>{m.current=u,typeof d=="function"?d(u):d&&(d.current=u)};p.useEffect(()=>{m.current&&(m.current.indeterminate=n)},[n]);const f=a??(r?`checkbox-${r.toLowerCase().replace(/\s+/g,"-")}`:void 0),F=o||!!s;return e.jsxs("div",{className:v.wrapper,children:[e.jsxs("label",{htmlFor:f,className:[v.label,i?v.disabled:""].filter(Boolean).join(" "),children:[e.jsx("input",{ref:b,type:"checkbox",id:f,disabled:i,"aria-invalid":F,className:[v.input,F?v.error:"",l??""].filter(Boolean).join(" "),..._}),e.jsx("span",{className:v.checkmark,"aria-hidden":"true"}),r&&e.jsx("span",{className:v.labelText,children:r})]}),s&&e.jsx("p",{className:v.errorText,role:"alert",children:s}),!s&&t&&e.jsx("p",{className:v.helperText,children:t})]})});H.displayName="Checkbox";const Ye="_wrapper_t377s_1",Ze="_label_t377s_7",Oe="_disabled_t377s_15",es="_input_t377s_20",ss="_dot_t377s_27",ts="_error_t377s_58",rs="_labelText_t377s_62",os="_helperText_t377s_68",ns="_group_t377s_76",as="_groupLabel_t377s_85",ls="_options_t377s_92",is="_errorText_t377s_98",h={wrapper:Ye,label:Ze,disabled:Oe,input:es,dot:ss,error:ts,labelText:rs,helperText:os,group:ns,groupLabel:as,options:ls,errorText:is},R=p.forwardRef(({label:r,helperText:t,isError:s=!1,id:o,disabled:n,className:a,...i},l)=>{const _=o??(r?`radio-${r.toLowerCase().replace(/\s+/g,"-")}`:void 0);return e.jsxs("div",{className:h.wrapper,children:[e.jsxs("label",{htmlFor:_,className:[h.label,n?h.disabled:""].filter(Boolean).join(" "),children:[e.jsx("input",{ref:l,type:"radio",id:_,disabled:n,"aria-invalid":s,className:[h.input,s?h.error:"",a??""].filter(Boolean).join(" "),...i}),e.jsx("span",{className:h.dot,"aria-hidden":"true"}),r&&e.jsx("span",{className:h.labelText,children:r})]}),t&&e.jsx("p",{className:h.helperText,children:t})]})});R.displayName="Radio";const cs=({name:r,label:t,options:s,value:o,onChange:n,isError:a=!1,errorMessage:i})=>e.jsxs("fieldset",{className:h.group,children:[t&&e.jsx("legend",{className:h.groupLabel,children:t}),e.jsx("div",{className:h.options,children:s.map(l=>e.jsx(R,{name:r,label:l.label,value:l.value,checked:o===l.value,disabled:l.disabled,isError:a,onChange:()=>n==null?void 0:n(l.value)},l.value))}),i&&e.jsx("p",{className:h.errorText,role:"alert",children:i})]}),_s="_wrapper_dgzcf_1",ds="_label_dgzcf_7",ps="_disabled_dgzcf_15",ms="_input_dgzcf_20",us="_track_dgzcf_27",xs="_sm_dgzcf_38",hs="_md_dgzcf_39",gs="_lg_dgzcf_40",bs="_thumb_dgzcf_42",fs="_labelText_dgzcf_75",js="_helperText_dgzcf_81",w={wrapper:_s,label:ds,disabled:ps,input:ms,track:us,sm:xs,md:hs,lg:gs,thumb:bs,labelText:fs,helperText:js},P=p.forwardRef(({size:r="md",label:t,helperText:s,id:o,disabled:n,className:a,...i},l)=>{const _=o??(t?`toggle-${t.toLowerCase().replace(/\s+/g,"-")}`:void 0);return e.jsxs("div",{className:w.wrapper,children:[e.jsxs("label",{htmlFor:_,className:[w.label,n?w.disabled:""].filter(Boolean).join(" "),children:[e.jsx("input",{ref:l,type:"checkbox",role:"switch",id:_,disabled:n,className:[w.input,a??""].filter(Boolean).join(" "),...i}),e.jsx("span",{className:[w.track,w[r]].join(" "),"aria-hidden":"true",children:e.jsx("span",{className:w.thumb})}),t&&e.jsx("span",{className:w.labelText,children:t})]}),s&&e.jsx("p",{className:w.helperText,children:s})]})});P.displayName="Toggle";const vs="_badge_1mczn_1",ws="_sm_1mczn_11",ys="_md_1mczn_12",$s="_neutral_1mczn_15",Ns="_primary_1mczn_16",Bs="_success_1mczn_17",Fs="_warning_1mczn_18",Ts="_danger_1mczn_19",ks="_info_1mczn_20",qs="_dotIndicator_1mczn_23",C={badge:vs,sm:ws,md:ys,neutral:$s,primary:Ns,success:Bs,warning:Fs,danger:Ts,info:ks,dotIndicator:qs},Cs=({variant:r="neutral",size:t="md",dot:s=!1,children:o,className:n})=>e.jsxs("span",{className:[C.badge,C[r],C[t],s?C.dot:"",n??""].filter(Boolean).join(" "),children:[s&&e.jsx("span",{className:C.dotIndicator,"aria-hidden":"true"}),o]}),Es="_tag_2pfl6_1",zs="_primary_2pfl6_14",Ws="_success_2pfl6_15",Ls="_warning_2pfl6_16",Ds="_danger_2pfl6_17",Rs="_label_2pfl6_19",Is="_removeBtn_2pfl6_21",z={tag:Es,default:"_default_2pfl6_13",primary:zs,success:Ws,warning:Ls,danger:Ds,label:Rs,removeBtn:Is},As=({variant:r="default",onRemove:t,children:s,className:o})=>e.jsxs("span",{className:[z.tag,z[r],o??""].filter(Boolean).join(" "),children:[e.jsx("span",{className:z.label,children:s}),t&&e.jsx("button",{type:"button",className:z.removeBtn,onClick:t,"aria-label":"Remove tag",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),Ss="_avatar_1ggx9_1",Ms="_xs_1ggx9_14",Hs="_sm_1ggx9_15",Ps="_md_1ggx9_16",Us="_lg_1ggx9_17",Gs="_xl_1ggx9_18",Ks="_img_1ggx9_20",Vs="_initials_1ggx9_26",W={avatar:Ss,xs:Ms,sm:Hs,md:Ps,lg:Us,xl:Gs,img:Ks,initials:Vs};function Js(r){return r.split(" ").map(t=>t[0]).slice(0,2).join("").toUpperCase()}function Qs(r){const t=["#3B82F6","#8B5CF6","#EC4899","#F59E0B","#10B981","#06B6D4","#EF4444","#F97316"];let s=0;for(let o=0;o<r.length;o++)s=r.charCodeAt(o)+((s<<5)-s);return t[Math.abs(s)%t.length]}const Xs=({src:r,alt:t,name:s,size:o="md",className:n})=>{const[a,i]=p.useState(!1),l=!r||a,_=s?Js(s):"?",d=s?Qs(s):"#9CA3AF";return e.jsx("span",{className:[W.avatar,W[o],n??""].filter(Boolean).join(" "),style:l?{backgroundColor:d}:void 0,"aria-label":t??s,role:"img",children:l?e.jsx("span",{className:W.initials,"aria-hidden":"true",children:_}):e.jsx("img",{src:r,alt:t??s??"",className:W.img,onError:()=>i(!0)})})},Ys="_card_tmi9g_1",Zs="_padding_none_tmi9g_8",Os="_padding_sm_tmi9g_9",et="_padding_md_tmi9g_10",st="_padding_lg_tmi9g_11",tt="_shadow_none_tmi9g_14",rt="_shadow_sm_tmi9g_15",ot="_shadow_md_tmi9g_16",nt="_shadow_lg_tmi9g_17",at="_bordered_tmi9g_20",lt="_hoverable_tmi9g_25",it="_header_tmi9g_35",ct="_body_tmi9g_41",_t="_footer_tmi9g_45",B={card:Ys,padding_none:Zs,padding_sm:Os,padding_md:et,padding_lg:st,shadow_none:tt,shadow_sm:rt,shadow_md:ot,shadow_lg:nt,bordered:at,hoverable:lt,header:it,body:ct,footer:_t},dt=({padding:r="md",shadow:t="sm",bordered:s=!0,hoverable:o=!1,className:n,children:a,...i})=>e.jsx("div",{className:[B.card,B[`padding_${r}`],B[`shadow_${t}`],s?B.bordered:"",o?B.hoverable:"",n??""].filter(Boolean).join(" "),...i,children:a}),pt=({className:r,children:t,...s})=>e.jsx("div",{className:[B.header,r??""].filter(Boolean).join(" "),...s,children:t}),mt=({className:r,children:t,...s})=>e.jsx("div",{className:[B.body,r??""].filter(Boolean).join(" "),...s,children:t}),ut=({className:r,children:t,...s})=>e.jsx("div",{className:[B.footer,r??""].filter(Boolean).join(" "),...s,children:t}),xt="_overlay_1eqx2_1",ht="_fadeIn_1eqx2_1",gt="_modal_1eqx2_13",bt="_slideUp_1eqx2_1",ft="_sm_1eqx2_26",jt="_md_1eqx2_27",vt="_lg_1eqx2_28",wt="_xl_1eqx2_29",yt="_full_1eqx2_30",$t="_header_1eqx2_32",Nt="_title_1eqx2_41",Bt="_closeBtn_1eqx2_48",Ft="_body_1eqx2_68",Tt="_footer_1eqx2_74",$={overlay:xt,fadeIn:ht,modal:gt,slideUp:bt,sm:ft,md:jt,lg:vt,xl:wt,full:yt,header:$t,title:Nt,closeBtn:Bt,body:Ft,footer:Tt},kt=({isOpen:r,onClose:t,title:s,size:o="md",closeOnOverlayClick:n=!0,closeOnEscape:a=!0,children:i,footer:l,className:_})=>(p.useEffect(()=>{if(!a)return;const d=m=>{m.key==="Escape"&&r&&t()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[r,t,a]),p.useEffect(()=>(r?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[r]),r?e.jsx("div",{className:$.overlay,onClick:n?t:void 0,"aria-modal":"true",role:"dialog","aria-labelledby":s?"modal-title":void 0,children:e.jsxs("div",{className:[$.modal,$[o],_??""].filter(Boolean).join(" "),onClick:d=>d.stopPropagation(),children:[s&&e.jsxs("div",{className:$.header,children:[e.jsx("h2",{id:"modal-title",className:$.title,children:s}),e.jsx("button",{type:"button",className:$.closeBtn,onClick:t,"aria-label":"Close modal",children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M15 5L5 15M5 5l10 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),e.jsx("div",{className:$.body,children:i}),l&&e.jsx("div",{className:$.footer,children:l})]})}):null),qt="_container_7pb5x_1",Ct="_toast_7pb5x_12",Et="_slideInRight_7pb5x_1",zt="_info_7pb5x_28",Wt="_success_7pb5x_29",Lt="_warning_7pb5x_30",Dt="_danger_7pb5x_31",Rt="_icon_7pb5x_33",It="_content_7pb5x_45",At="_title_7pb5x_50",St="_message_7pb5x_57",Mt="_closeBtn_7pb5x_64",N={container:qt,toast:Ct,slideInRight:Et,info:zt,success:Wt,warning:Lt,danger:Dt,icon:Rt,content:It,title:At,message:St,closeBtn:Mt},Ht={info:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M8 5v1M8 8v3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),success:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M5 8l2 2 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),warning:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M8 2L15 14H1L8 2z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),e.jsx("path",{d:"M8 6v3M8 11v1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),danger:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M5.5 5.5l5 5M10.5 5.5l-5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})},U=({id:r,variant:t="info",title:s,message:o,duration:n=4e3,onDismiss:a})=>(p.useEffect(()=>{if(n<=0)return;const i=setTimeout(()=>a(r),n);return()=>clearTimeout(i)},[r,n,a]),e.jsxs("div",{role:"alert","aria-live":"polite",className:[N.toast,N[t]].join(" "),children:[e.jsx("span",{className:N.icon,children:Ht[t]}),e.jsxs("div",{className:N.content,children:[s&&e.jsx("p",{className:N.title,children:s}),e.jsx("p",{className:N.message,children:o})]}),e.jsx("button",{type:"button",className:N.closeBtn,onClick:()=>a(r),"aria-label":"Dismiss notification",children:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M11 3L3 11M3 3l8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})),G=p.createContext(null),Pt=({children:r})=>{const[t,s]=p.useState([]),o=p.useCallback(a=>{const i=Math.random().toString(36).slice(2);s(l=>[...l,{...a,id:i}])},[]),n=p.useCallback(a=>{s(i=>i.filter(l=>l.id!==a))},[]);return e.jsxs(G.Provider,{value:{addToast:o,removeToast:n},children:[r,e.jsx("div",{className:N.container,"aria-live":"polite","aria-label":"Notifications",children:t.map(a=>e.jsx(U,{...a,onDismiss:n},a.id))})]})};function Ut(){const r=p.useContext(G);if(!r)throw new Error("useToast must be used within ToastProvider");return r}const Gt="_wrapper_mtqtk_1",Kt="_tooltip_mtqtk_6",Vt="_fadeIn_mtqtk_1",Jt="_top_mtqtk_25",Qt="_bottom_mtqtk_26",Xt="_left_mtqtk_27",Yt="_right_mtqtk_28",Zt="_arrow_mtqtk_31",L={wrapper:Gt,tooltip:Kt,fadeIn:Vt,top:Jt,bottom:Qt,left:Xt,right:Yt,arrow:Zt},Ot=({content:r,placement:t="top",delay:s=300,children:o,className:n})=>{const[a,i]=p.useState(!1),l=p.useRef(void 0),_=()=>{l.current=setTimeout(()=>i(!0),s)},d=()=>{clearTimeout(l.current),i(!1)};return e.jsxs("span",{className:L.wrapper,onMouseEnter:_,onMouseLeave:d,onFocus:_,onBlur:d,children:[o,a&&e.jsxs("span",{role:"tooltip",className:[L.tooltip,L[t],n??""].filter(Boolean).join(" "),children:[r,e.jsx("span",{className:L.arrow,"aria-hidden":"true"})]})]})},er="_spinner_zltzo_1",sr="_spin_zltzo_1",tr="_sm_zltzo_10",rr="_md_zltzo_11",or="_lg_zltzo_12",nr="_xl_zltzo_13",ar="_primary_zltzo_16",lr="_white_zltzo_17",ir="_neutral_zltzo_18",D={spinner:er,spin:sr,sm:tr,md:rr,lg:or,xl:nr,primary:ar,white:lr,neutral:ir},cr=({size:r="md",variant:t="primary",label:s="Loading...",className:o})=>e.jsx("span",{role:"status","aria-label":s,className:[D.spinner,D[r],D[t],o??""].filter(Boolean).join(" "),children:e.jsx("span",{className:"sr-only",children:s})}),_r="_h1_7jlcq_2",dr="_h2_7jlcq_3",pr="_h3_7jlcq_4",mr="_h4_7jlcq_5",ur="_h5_7jlcq_6",xr="_h6_7jlcq_7",hr="_text_7jlcq_10",gr="_body_7jlcq_11",br="_body_sm_7jlcq_12",fr="_caption_7jlcq_13",jr="_overline_7jlcq_14",vr="_color_primary_7jlcq_17",wr="_color_secondary_7jlcq_18",yr="_color_tertiary_7jlcq_19",$r="_color_inverse_7jlcq_20",Nr="_color_danger_7jlcq_21",Br="_color_success_7jlcq_22",Fr="_weight_regular_7jlcq_25",Tr="_weight_medium_7jlcq_26",kr="_weight_semibold_7jlcq_27",qr="_weight_bold_7jlcq_28",Cr="_truncate_7jlcq_31",k={h1:_r,h2:dr,h3:pr,h4:mr,h5:ur,h6:xr,text:hr,body:gr,body_sm:br,caption:fr,overline:jr,color_primary:vr,color_secondary:wr,color_tertiary:yr,color_inverse:$r,color_danger:Nr,color_success:Br,weight_regular:Fr,weight_medium:Tr,weight_semibold:kr,weight_bold:qr,truncate:Cr},Er=({as:r,level:t="h2",className:s,children:o,...n})=>{const a=r??t;return e.jsx(a,{className:[k[t],s??""].filter(Boolean).join(" "),...n,children:o})},zr=({as:r="p",variant:t="body",color:s="primary",weight:o,truncate:n=!1,className:a,children:i,...l})=>{const _=r;return e.jsx(_,{className:[k.text,k[t.replace("-","_")],k[`color_${s}`],o?k[`weight_${o}`]:"",n?k.truncate:"",a??""].filter(Boolean).join(" "),...l,children:i})},Wr="_horizontal_190o0_1",Lr="_vertical_190o0_8",Dr="_withLabel_190o0_17",Rr="_line_190o0_23",Ir="_labelText_190o0_29",T={horizontal:Wr,vertical:Lr,withLabel:Dr,line:Rr,labelText:Ir},Ar=({orientation:r="horizontal",label:t,className:s})=>r==="vertical"?e.jsx("span",{role:"separator","aria-orientation":"vertical",className:[T.vertical,s??""].filter(Boolean).join(" ")}):t?e.jsxs("div",{role:"separator",className:[T.withLabel,s??""].filter(Boolean).join(" "),children:[e.jsx("span",{className:T.line}),e.jsx("span",{className:T.labelText,children:t}),e.jsx("span",{className:T.line})]}):e.jsx("hr",{role:"separator",className:[T.horizontal,s??""].filter(Boolean).join(" ")}),c={white:"#FFFFFF",black:"#000000",neutral:{50:"#F9FAFB",100:"#F3F4F6",200:"#E5E7EB",300:"#D1D5DB",400:"#9CA3AF",500:"#6B7280",600:"#4B5563",700:"#374151",800:"#1F2937",900:"#111827",950:"#030712"},primary:{50:"#EFF6FF",100:"#DBEAFE",200:"#BFDBFE",300:"#93C5FD",400:"#60A5FA",500:"#3B82F6",600:"#2563EB",700:"#1D4ED8",800:"#1E40AF",900:"#1E3A8A"},success:{50:"#F0FDF4",100:"#DCFCE7",200:"#BBF7D0",300:"#86EFAC",400:"#4ADE80",500:"#22C55E",600:"#16A34A",700:"#15803D",800:"#166534",900:"#14532D"},warning:{50:"#FFFBEB",100:"#FEF3C7",200:"#FDE68A",300:"#FCD34D",400:"#FBBF24",500:"#F59E0B",600:"#D97706",700:"#B45309",800:"#92400E",900:"#78350F"},danger:{50:"#FFF1F2",100:"#FFE4E6",200:"#FECDD3",300:"#FDA4AF",400:"#FB7185",500:"#F43F5E",600:"#E11D48",700:"#BE123C",800:"#9F1239",900:"#881337"},info:{50:"#ECFEFF",100:"#CFFAFE",200:"#A5F3FC",300:"#67E8F9",400:"#22D3EE",500:"#06B6D4",600:"#0891B2",700:"#0E7490",800:"#155E75",900:"#164E63"}},Sr={text:{primary:c.neutral[900],secondary:c.neutral[600],tertiary:c.neutral[400],disabled:c.neutral[300],inverse:c.white,link:c.primary[600],linkHover:c.primary[700]},background:{primary:c.white,secondary:c.neutral[50],tertiary:c.neutral[100],overlay:"rgba(0, 0, 0, 0.5)",inverse:c.neutral[900]},border:{default:c.neutral[200],strong:c.neutral[300],focus:c.primary[500]},action:{primary:c.primary[600],primaryHover:c.primary[700],primaryActive:c.primary[800],primaryDisabled:c.primary[200]},status:{success:c.success[500],successBg:c.success[50],warning:c.warning[500],warningBg:c.warning[50],danger:c.danger[500],dangerBg:c.danger[50],info:c.info[500],infoBg:c.info[50]}},Mr={sans:["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans KR"',"sans-serif"].join(", "),mono:['"SFMono-Regular"',"Consolas",'"Liberation Mono"',"Menlo","monospace"].join(", ")},Hr={xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem"},Pr={regular:400,medium:500,semibold:600,bold:700},Ur={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},Gr={tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},Kr={0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",32:"8rem"},Vr={none:"0px",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Jr={none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",inner:"inset 0 2px 4px 0 rgba(0, 0, 0, 0.05)",focus:"0 0 0 3px rgba(59, 130, 246, 0.4)",focusDanger:"0 0 0 3px rgba(244, 63, 94, 0.4)"},Qr={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},Xr={hide:-1,base:0,raised:1,dropdown:1e3,sticky:1100,overlay:1200,modal:1300,popover:1400,toast:1500,tooltip:1600};exports.Avatar=Xs;exports.Badge=Cs;exports.Button=I;exports.Card=dt;exports.CardBody=mt;exports.CardFooter=ut;exports.CardHeader=pt;exports.Checkbox=H;exports.Divider=Ar;exports.Heading=Er;exports.Input=A;exports.Modal=kt;exports.Radio=R;exports.RadioGroup=cs;exports.Select=M;exports.Spinner=cr;exports.Tag=As;exports.Text=zr;exports.Textarea=S;exports.Toast=U;exports.ToastProvider=Pt;exports.Toggle=P;exports.Tooltip=Ot;exports.borderRadius=Vr;exports.breakpoints=Qr;exports.fontFamily=Mr;exports.fontSize=Hr;exports.fontWeight=Pr;exports.letterSpacing=Gr;exports.lineHeight=Ur;exports.palette=c;exports.semanticColors=Sr;exports.shadows=Jr;exports.spacing=Kr;exports.useToast=Ut;exports.zIndex=Xr;
|