@treeal/ds 0.1.1 → 0.1.3
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/dist/assets/style.css +1 -1
- package/dist/components/Input/Input.d.ts +13 -2
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +24 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Tab/Tab.d.ts +22 -0
- package/dist/components/Tab/Tab.d.ts.map +1 -0
- package/dist/components/Tab/index.d.ts +3 -0
- package/dist/components/Tab/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs10.js +1 -1
- package/dist/index.cjs11.js +1 -1
- package/dist/index.cjs12.js +1 -1
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs13.js.map +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs14.js.map +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs15.js.map +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs16.js.map +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs18.js +1 -1
- package/dist/index.cjs20.js +1 -1
- package/dist/index.cjs21.js +1 -1
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs23.js +1 -1
- package/dist/index.cjs25.js +2 -0
- package/dist/index.cjs25.js.map +1 -0
- package/dist/index.cjs26.js +2 -0
- package/dist/index.cjs26.js.map +1 -0
- package/dist/index.cjs27.js +2 -0
- package/dist/index.cjs27.js.map +1 -0
- package/dist/index.cjs28.js +2 -0
- package/dist/index.cjs28.js.map +1 -0
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs6.js +1 -1
- package/dist/index.cjs7.js +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.cjs9.js.map +1 -1
- package/dist/index.esm.js +15 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm10.js +1 -1
- package/dist/index.esm11.js +1 -1
- package/dist/index.esm12.js +1 -1
- package/dist/index.esm13.js +58 -84
- package/dist/index.esm13.js.map +1 -1
- package/dist/index.esm14.js +83 -212
- package/dist/index.esm14.js.map +1 -1
- package/dist/index.esm15.js +35 -23
- package/dist/index.esm15.js.map +1 -1
- package/dist/index.esm16.js +219 -39
- package/dist/index.esm16.js.map +1 -1
- package/dist/index.esm17.js +22 -30
- package/dist/index.esm17.js.map +1 -1
- package/dist/index.esm18.js +102 -22
- package/dist/index.esm18.js.map +1 -1
- package/dist/index.esm20.js +60 -20
- package/dist/index.esm20.js.map +1 -1
- package/dist/index.esm21.js +22 -102
- package/dist/index.esm21.js.map +1 -1
- package/dist/index.esm22.js +12 -22
- package/dist/index.esm22.js.map +1 -1
- package/dist/index.esm23.js +20 -60
- package/dist/index.esm23.js.map +1 -1
- package/dist/index.esm25.js +26 -0
- package/dist/index.esm25.js.map +1 -0
- package/dist/index.esm26.js +26 -0
- package/dist/index.esm26.js.map +1 -0
- package/dist/index.esm27.js +40 -0
- package/dist/index.esm27.js.map +1 -0
- package/dist/index.esm28.js +42 -0
- package/dist/index.esm28.js.map +1 -0
- package/dist/index.esm5.js +1 -1
- package/dist/index.esm6.js +1 -1
- package/dist/index.esm7.js +1 -1
- package/dist/index.esm9.js +104 -44
- package/dist/index.esm9.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs15.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs15.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs15.js","sources":["../components/Tab/Tab.tsx"],"sourcesContent":["import React from 'react';\nimport styles from './Tab.module.css';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport interface TabItem {\n /** Unique identifier for the tab */\n id: string;\n /** Label displayed inside the tab */\n label: string;\n /** Optional icon rendered before the label */\n icon?: React.ReactNode;\n /** Whether this tab is disabled */\n disabled?: boolean;\n}\n\nexport interface TabProps {\n /** List of tab items */\n items: TabItem[];\n /** ID of the currently active tab */\n activeId: string;\n /** Called when a tab is clicked */\n onChange: (id: string) => void;\n className?: string;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport function Tab({ items, activeId, onChange, className }: TabProps) {\n return (\n <div\n className={[styles.tabList, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n >\n {items.map((item) => {\n const isActive = item.id === activeId;\n const isDisabled = item.disabled ?? false;\n\n const tabClass = [\n styles.tab,\n isActive ? styles.active : '',\n isDisabled ? styles.disabled : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button\n key={item.id}\n role=\"tab\"\n aria-selected={isActive}\n aria-disabled={isDisabled}\n disabled={isDisabled}\n className={tabClass}\n onClick={() => !isDisabled && onChange(item.id)}\n >\n {item.icon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {item.icon}\n </span>\n )}\n {item.label}\n </button>\n );\n })}\n </div>\n );\n}\n"],"names":["Tab","items","activeId","onChange","className","jsx","styles","item","isActive","isDisabled","tabClass","jsxs"],"mappings":"mJA4BO,SAASA,EAAI,CAAE,MAAAC,EAAO,SAAAC,EAAU,SAAAC,EAAU,UAAAC,GAAuB,CACtE,OACEC,EAAAA,IAAC,MAAA,CACC,UAAW,CAACC,UAAO,QAASF,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC/D,KAAK,UAEJ,SAAAH,EAAM,IAAKM,GAAS,CACnB,MAAMC,EAAWD,EAAK,KAAOL,EACvBO,EAAaF,EAAK,UAAY,GAE9BG,EAAW,CACfJ,EAAAA,QAAO,IACPE,EAAWF,EAAAA,QAAO,OAAS,GAC3BG,EAAaH,EAAAA,QAAO,SAAW,EAAA,EAE9B,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEK,EAAAA,KAAC,SAAA,CAEC,KAAK,MACL,gBAAeH,EACf,gBAAeC,EACf,SAAUA,EACV,UAAWC,EACX,QAAS,IAAM,CAACD,GAAcN,EAASI,EAAK,EAAE,EAE7C,SAAA,CAAAA,EAAK,YACH,OAAA,CAAK,UAAWD,EAAAA,QAAO,KAAM,cAAY,OACvC,SAAAC,EAAK,IAAA,CACR,EAEDA,EAAK,KAAA,CAAA,EAbDA,EAAK,EAAA,CAgBhB,CAAC,CAAA,CAAA,CAGP"}
|
package/dist/index.cjs16.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),t=require("./index.cjs20.js"),C=()=>e.jsxs("svg",{viewBox:"0 0 12 12",width:"12",height:"12","aria-hidden":"true",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"fileGrad",x1:"0%",y1:"100%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#2970FF"}),e.jsx("stop",{offset:"100%",stopColor:"#0040C1"})]})}),e.jsx("path",{fill:"url(#fileGrad)",d:"M2 0h5.5L10 2.5V12H2V0zm5 0v3h3L7 0zM3 5h6v1H3V5zm0 2h6v1H3V7zm0 2h4v1H3V9z"})]}),L=()=>e.jsx("svg",{viewBox:"0 0 12 12",width:"12",height:"12",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M8.707.293a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414L9.414 5.1 6.9 2.586 8.707.293zM0 9.5V12h2.5l7-7L7 2.5l-7 7zM1.5 10.5v-.793l5.5-5.5.793.793-5.5 5.5H1.5z"})}),w=()=>e.jsx("svg",{viewBox:"0 0 12 12",width:"12",height:"12",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M6 2C3.27 2 1 4 1 6s2.27 4 5 4 5-2 5-4-2.27-4-5-4zm0 7a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0-5a2 2 0 1 0 0 4 2 2 0 0 0 0-4z"})}),y=()=>e.jsx("svg",{viewBox:"0 0 12 12",width:"12",height:"12",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M4 1V0h4v1h3v1H1V1h3zM2 3h8l-.8 8H2.8L2 3zm2 1v6h1V4H4zm2 0v6h1V4H6z"})}),b=()=>e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",children:[e.jsx("rect",{x:"18",y:"10",width:"10",height:"13",rx:"1.5",fill:"#DBE8FF",stroke:"#B2C9FF",strokeWidth:"0.5",transform:"rotate(12 18 10)"}),e.jsx("rect",{x:"4",y:"10",width:"10",height:"13",rx:"1.5",fill:"#DBE8FF",stroke:"#B2C9FF",strokeWidth:"0.5",transform:"rotate(-12 4 10)"}),e.jsx("rect",{x:"10",y:"7",width:"12",height:"16",rx:"1.5",fill:"#FFFFFF",stroke:"#B2C9FF",strokeWidth:"1"}),e.jsx("path",{d:"M13 12h6M13 15h6M13 18h4",stroke:"#B2C9FF",strokeWidth:"1",strokeLinecap:"round"}),e.jsx("circle",{cx:"23",cy:"23",r:"5",fill:"#2970FF"}),e.jsx("path",{d:"M23 26v-6M20.5 22.5L23 20l2.5 2.5",stroke:"#FFF",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),D=()=>e.jsxs("svg",{width:"96",height:"64",viewBox:"0 0 96 64",fill:"none","aria-hidden":"true",children:[e.jsxs("g",{transform:"rotate(15 70 35)",children:[e.jsx("rect",{x:"55",y:"18",width:"28",height:"36",rx:"3",fill:"#DBE8FF",stroke:"#B2C9FF",strokeWidth:"1"}),e.jsx("path",{d:"M61 28h16M61 34h16M61 40h10",stroke:"#B2C9FF",strokeWidth:"1.5",strokeLinecap:"round"})]}),e.jsxs("g",{transform:"rotate(-15 26 35)",children:[e.jsx("rect",{x:"13",y:"18",width:"28",height:"36",rx:"3",fill:"#DBE8FF",stroke:"#B2C9FF",strokeWidth:"1"}),e.jsx("path",{d:"M19 28h16M19 34h16M19 40h10",stroke:"#B2C9FF",strokeWidth:"1.5",strokeLinecap:"round"})]}),e.jsx("rect",{x:"30",y:"8",width:"36",height:"48",rx:"3",fill:"#FFFFFF",stroke:"#B2C9FF",strokeWidth:"1.5"}),e.jsx("path",{d:"M38 22h20M38 30h20M38 38h14",stroke:"#B2C9FF",strokeWidth:"1.5",strokeLinecap:"round"}),e.jsx("circle",{cx:"76",cy:"50",r:"10",fill:"#2970FF"}),e.jsx("path",{d:"M76 55v-10M71 48l5-5 5 5",stroke:"#FFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});function I({file:s,size:i,onEdit:d,onPreview:l,onRemove:a}){const o=s.state==="loading"||s.indicator==="loader",h=i==="LG"&&s.indicator!=="loader";return e.jsxs("div",{className:[t.default.fileItem,i==="LG"?t.default.fileItemLg:t.default.fileItemMd].join(" "),children:[e.jsx("div",{className:t.default.fileBadge,children:e.jsx(C,{})}),e.jsxs("div",{className:t.default.fileContent,children:[e.jsxs("div",{className:t.default.fileHeader,children:[e.jsxs("div",{className:t.default.fileTexts,children:[e.jsx("p",{className:t.default.fileName,children:s.name}),e.jsx("p",{className:t.default.fileSize,children:s.size})]}),o?e.jsx("div",{className:t.default.spinner,role:"status","aria-label":"Uploading…"}):e.jsxs("div",{className:t.default.actions,children:[e.jsx("button",{className:t.default.actionBtn,onClick:()=>d==null?void 0:d(s.id),"aria-label":`Edit ${s.name}`,type:"button",children:e.jsx(L,{})}),e.jsx("button",{className:t.default.actionBtn,onClick:()=>l==null?void 0:l(s.id),"aria-label":`Preview ${s.name}`,type:"button",children:e.jsx(w,{})}),e.jsx("button",{className:t.default.actionBtn,onClick:()=>a==null?void 0:a(s.id),"aria-label":`Remove ${s.name}`,type:"button",children:e.jsx(y,{})})]})]}),h&&e.jsxs("div",{className:t.default.progressRow,children:[e.jsx("div",{className:t.default.progressTrack,children:e.jsx("div",{className:t.default.progressFill,style:{width:`${Math.min(100,Math.max(0,s.progress))}%`},role:"progressbar","aria-valuenow":s.progress,"aria-valuemin":0,"aria-valuemax":100})}),e.jsxs("p",{className:t.default.progressLabel,children:[s.progress,"%"]})]})]})]})}function W({size:s="LG",type:i="multiple",status:d="default",files:l=[],onDrop:a,onRemove:o,onEdit:h,onPreview:p,accept:g,className:m}){const x=j.useRef(null),[F,c]=j.useState(!1),v=r=>{r.preventDefault(),c(!0)},k=r=>{r.preventDefault(),c(!1)},M=r=>{r.preventDefault(),c(!1);const n=Array.from(r.dataTransfer.files);n.length&&(a==null||a(n))},N=r=>{const n=Array.from(r.target.files??[]);n.length&&(a==null||a(n)),r.target.value=""},u=()=>{var r;return(r=x.current)==null?void 0:r.click()},B=i==="single"&&d==="active"&&l.length>0,z=[t.default.dropzone,s==="MD"?t.default.dropzoneMd:t.default.dropzoneLg,F?t.default.dropzoneDragging:""].filter(Boolean).join(" "),f=i==="multiple"?"Drop your files here, or":"Drop your file here, or";return e.jsxs("div",{className:[t.default.wrapper,m].filter(Boolean).join(" "),children:[e.jsx("input",{ref:x,type:"file",multiple:i==="multiple",accept:g,onChange:N,style:{display:"none"},"aria-hidden":"true",tabIndex:-1}),!B&&e.jsxs("div",{className:z,onClick:u,onDragOver:v,onDragLeave:k,onDrop:M,role:"button",tabIndex:0,"aria-label":`${f} browse`,onKeyDown:r=>{(r.key===" "||r.key==="Enter")&&u()},children:[s==="MD"?e.jsx("div",{className:t.default.dropzoneIconMd,children:e.jsx(b,{})}):e.jsx("div",{className:t.default.dropzoneIconLg,children:e.jsx(D,{})}),e.jsxs("div",{className:t.default.dropzoneContent,children:[e.jsxs("div",{className:t.default.dropzoneTitleRow,children:[e.jsx("p",{className:t.default.dropzoneTitle,children:f}),e.jsx("span",{className:t.default.dropzoneBrowse,"aria-hidden":"true",children:"browse"})]}),e.jsx("p",{className:t.default.dropzoneSubtitle,children:"JPG, PNG, PDF (Max 800×400px – 2Mo)"})]})]}),d==="active"&&l.length>0&&e.jsx("div",{className:t.default.fileList,children:l.map(r=>e.jsx(I,{file:r,size:s,onEdit:h,onPreview:p,onRemove:o},r.id))})]})}exports.Upload=W;
|
|
2
2
|
//# sourceMappingURL=index.cjs16.js.map
|
package/dist/index.cjs16.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs16.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs16.js","sources":["../components/Upload/Upload.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\nimport styles from './Upload.module.css';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type UploadSize = 'MD' | 'LG';\nexport type UploadType = 'single' | 'multiple';\nexport type UploadStatus = 'default' | 'active';\nexport type UploadFileState = 'loading' | 'loaded' | 'error';\nexport type UploadIndicator = 'loader' | 'progress-bar';\n\nexport interface UploadFile {\n id: string;\n name: string;\n size: string;\n /** 0–100 */\n progress: number;\n state: UploadFileState;\n /** 'loader' shows spinner · 'progress-bar' shows progress (LG only) */\n indicator?: UploadIndicator;\n}\n\nexport interface UploadProps {\n size?: UploadSize;\n type?: UploadType;\n /** 'default' = drop area only · 'active' = files listed */\n status?: UploadStatus;\n files?: UploadFile[];\n onDrop?: (files: File[]) => void;\n onRemove?: (id: string) => void;\n onEdit?: (id: string) => void;\n onPreview?: (id: string) => void;\n /** Native accept attribute, e.g. \".pdf,.png,.jpg\" */\n accept?: string;\n /** Max file size in bytes */\n maxSize?: number;\n className?: string;\n}\n\n// ─── SVG icons (inline, no external dependency) ──────────────────────────────\n\nconst IconFile = () => (\n <svg viewBox=\"0 0 12 12\" width=\"12\" height=\"12\" aria-hidden=\"true\">\n <defs>\n <linearGradient id=\"fileGrad\" x1=\"0%\" y1=\"100%\" x2=\"100%\" y2=\"0%\">\n {/* Figma: linear-gradient(63.88deg, #2970FF 0.2%, #0040C1 99.99%) */}\n <stop offset=\"0%\" stopColor=\"#2970FF\" />\n <stop offset=\"100%\" stopColor=\"#0040C1\" />\n </linearGradient>\n </defs>\n <path\n fill=\"url(#fileGrad)\"\n d=\"M2 0h5.5L10 2.5V12H2V0zm5 0v3h3L7 0zM3 5h6v1H3V5zm0 2h6v1H3V7zm0 2h4v1H3V9z\"\n />\n </svg>\n);\n\nconst IconPen = () => (\n <svg viewBox=\"0 0 12 12\" width=\"12\" height=\"12\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M8.707.293a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414L9.414 5.1 6.9 2.586 8.707.293zM0 9.5V12h2.5l7-7L7 2.5l-7 7zM1.5 10.5v-.793l5.5-5.5.793.793-5.5 5.5H1.5z\" />\n </svg>\n);\n\nconst IconEye = () => (\n <svg viewBox=\"0 0 12 12\" width=\"12\" height=\"12\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M6 2C3.27 2 1 4 1 6s2.27 4 5 4 5-2 5-4-2.27-4-5-4zm0 7a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0-5a2 2 0 1 0 0 4 2 2 0 0 0 0-4z\" />\n </svg>\n);\n\nconst IconTrash = () => (\n <svg viewBox=\"0 0 12 12\" width=\"12\" height=\"12\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M4 1V0h4v1h3v1H1V1h3zM2 3h8l-.8 8H2.8L2 3zm2 1v6h1V4H4zm2 0v6h1V4H6z\" />\n </svg>\n);\n\n// SVG illustration for MD drop zone (32×32 stacked files)\nconst DropIconMd = () => (\n <svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" aria-hidden=\"true\">\n {/* back-right file */}\n <rect x=\"18\" y=\"10\" width=\"10\" height=\"13\" rx=\"1.5\" fill=\"#DBE8FF\" stroke=\"#B2C9FF\" strokeWidth=\"0.5\"\n transform=\"rotate(12 18 10)\" />\n {/* back-left file */}\n <rect x=\"4\" y=\"10\" width=\"10\" height=\"13\" rx=\"1.5\" fill=\"#DBE8FF\" stroke=\"#B2C9FF\" strokeWidth=\"0.5\"\n transform=\"rotate(-12 4 10)\" />\n {/* center file */}\n <rect x=\"10\" y=\"7\" width=\"12\" height=\"16\" rx=\"1.5\" fill=\"#FFFFFF\" stroke=\"#B2C9FF\" strokeWidth=\"1\" />\n <path d=\"M13 12h6M13 15h6M13 18h4\" stroke=\"#B2C9FF\" strokeWidth=\"1\" strokeLinecap=\"round\" />\n {/* upload arrow */}\n <circle cx=\"23\" cy=\"23\" r=\"5\" fill=\"#2970FF\" />\n <path d=\"M23 26v-6M20.5 22.5L23 20l2.5 2.5\" stroke=\"#FFF\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\n// SVG illustration for LG drop zone (96×64 stacked files)\nconst DropIconLg = () => (\n <svg width=\"96\" height=\"64\" viewBox=\"0 0 96 64\" fill=\"none\" aria-hidden=\"true\">\n {/* right file — rotated 15deg */}\n <g transform=\"rotate(15 70 35)\">\n <rect x=\"55\" y=\"18\" width=\"28\" height=\"36\" rx=\"3\" fill=\"#DBE8FF\" stroke=\"#B2C9FF\" strokeWidth=\"1\" />\n <path d=\"M61 28h16M61 34h16M61 40h10\" stroke=\"#B2C9FF\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </g>\n {/* left file — rotated -15deg */}\n <g transform=\"rotate(-15 26 35)\">\n <rect x=\"13\" y=\"18\" width=\"28\" height=\"36\" rx=\"3\" fill=\"#DBE8FF\" stroke=\"#B2C9FF\" strokeWidth=\"1\" />\n <path d=\"M19 28h16M19 34h16M19 40h10\" stroke=\"#B2C9FF\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </g>\n {/* center file */}\n <rect x=\"30\" y=\"8\" width=\"36\" height=\"48\" rx=\"3\" fill=\"#FFFFFF\" stroke=\"#B2C9FF\" strokeWidth=\"1.5\" />\n <path d=\"M38 22h20M38 30h20M38 38h14\" stroke=\"#B2C9FF\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n {/* upload arrow overlay */}\n <circle cx=\"76\" cy=\"50\" r=\"10\" fill=\"#2970FF\" />\n <path d=\"M76 55v-10M71 48l5-5 5 5\" stroke=\"#FFF\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\n// ─── Sub-components ───────────────────────────────────────────────────────────\n\ninterface UploadItemProps {\n file: UploadFile;\n size: UploadSize;\n onEdit?: (id: string) => void;\n onPreview?: (id: string) => void;\n onRemove?: (id: string) => void;\n}\n\nfunction UploadItem({ file, size, onEdit, onPreview, onRemove }: UploadItemProps) {\n const isLoading = file.state === 'loading' || file.indicator === 'loader';\n const showProgress = size === 'LG' && file.indicator !== 'loader';\n\n return (\n <div\n className={[\n styles.fileItem,\n size === 'LG' ? styles.fileItemLg : styles.fileItemMd,\n ].join(' ')}\n >\n {/* Badge */}\n <div className={styles.fileBadge}>\n <IconFile />\n </div>\n\n {/* Content */}\n <div className={styles.fileContent}>\n <div className={styles.fileHeader}>\n {/* Name + size */}\n <div className={styles.fileTexts}>\n <p className={styles.fileName}>{file.name}</p>\n <p className={styles.fileSize}>{file.size}</p>\n </div>\n\n {/* Actions or spinner */}\n {isLoading ? (\n <div className={styles.spinner} role=\"status\" aria-label=\"Uploading…\" />\n ) : (\n <div className={styles.actions}>\n <button\n className={styles.actionBtn}\n onClick={() => onEdit?.(file.id)}\n aria-label={`Edit ${file.name}`}\n type=\"button\"\n >\n <IconPen />\n </button>\n <button\n className={styles.actionBtn}\n onClick={() => onPreview?.(file.id)}\n aria-label={`Preview ${file.name}`}\n type=\"button\"\n >\n <IconEye />\n </button>\n <button\n className={styles.actionBtn}\n onClick={() => onRemove?.(file.id)}\n aria-label={`Remove ${file.name}`}\n type=\"button\"\n >\n <IconTrash />\n </button>\n </div>\n )}\n </div>\n\n {/* Progress bar — LG only, not during loader */}\n {showProgress && (\n <div className={styles.progressRow}>\n <div className={styles.progressTrack}>\n <div\n className={styles.progressFill}\n style={{ width: `${Math.min(100, Math.max(0, file.progress))}%` }}\n role=\"progressbar\"\n aria-valuenow={file.progress}\n aria-valuemin={0}\n aria-valuemax={100}\n />\n </div>\n <p className={styles.progressLabel}>{file.progress}%</p>\n </div>\n )}\n </div>\n </div>\n );\n}\n\n// ─── Main component ───────────────────────────────────────────────────────────\n\nexport function Upload({\n size = 'LG',\n type = 'multiple',\n status = 'default',\n files = [],\n onDrop,\n onRemove,\n onEdit,\n onPreview,\n accept,\n className,\n}: UploadProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n const [dragging, setDragging] = useState(false);\n\n const handleDragOver = (e: React.DragEvent) => {\n e.preventDefault();\n setDragging(true);\n };\n\n const handleDragLeave = (e: React.DragEvent) => {\n e.preventDefault();\n setDragging(false);\n };\n\n const handleDrop = (e: React.DragEvent) => {\n e.preventDefault();\n setDragging(false);\n const dropped = Array.from(e.dataTransfer.files);\n if (dropped.length) onDrop?.(dropped);\n };\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const selected = Array.from(e.target.files ?? []);\n if (selected.length) onDrop?.(selected);\n // reset so same file can be re-selected\n e.target.value = '';\n };\n\n const openFilePicker = () => inputRef.current?.click();\n\n // LG single active / MD single active: hide drop zone when a file is loaded\n const hideDrop = type === 'single' && status === 'active' && files.length > 0;\n\n const dropzoneClass = [\n styles.dropzone,\n size === 'MD' ? styles.dropzoneMd : styles.dropzoneLg,\n dragging ? styles.dropzoneDragging : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const titleText =\n type === 'multiple' ? 'Drop your files here, or' : 'Drop your file here, or';\n\n return (\n <div className={[styles.wrapper, className].filter(Boolean).join(' ')}>\n {/* Hidden file input */}\n <input\n ref={inputRef}\n type=\"file\"\n multiple={type === 'multiple'}\n accept={accept}\n onChange={handleInputChange}\n style={{ display: 'none' }}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n\n {/* Drop zone */}\n {!hideDrop && (\n <div\n className={dropzoneClass}\n onClick={openFilePicker}\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={handleDrop}\n role=\"button\"\n tabIndex={0}\n aria-label={`${titleText} browse`}\n onKeyDown={(e) => {\n if (e.key === ' ' || e.key === 'Enter') openFilePicker();\n }}\n >\n {/* Icon */}\n {size === 'MD' ? (\n <div className={styles.dropzoneIconMd}>\n <DropIconMd />\n </div>\n ) : (\n <div className={styles.dropzoneIconLg}>\n <DropIconLg />\n </div>\n )}\n\n {/* Text content */}\n <div className={styles.dropzoneContent}>\n <div className={styles.dropzoneTitleRow}>\n <p className={styles.dropzoneTitle}>{titleText}</p>\n <span className={styles.dropzoneBrowse} aria-hidden=\"true\">\n browse\n </span>\n </div>\n <p className={styles.dropzoneSubtitle}>\n JPG, PNG, PDF (Max 800×400px – 2Mo)\n </p>\n </div>\n </div>\n )}\n\n {/* File list */}\n {status === 'active' && files.length > 0 && (\n <div className={styles.fileList}>\n {files.map((file) => (\n <UploadItem\n key={file.id}\n file={file}\n size={size}\n onEdit={onEdit}\n onPreview={onPreview}\n onRemove={onRemove}\n />\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"names":["IconFile","jsxs","jsx","IconPen","IconEye","IconTrash","DropIconMd","DropIconLg","UploadItem","file","size","onEdit","onPreview","onRemove","isLoading","showProgress","styles","Upload","type","status","files","onDrop","accept","className","inputRef","useRef","dragging","setDragging","useState","handleDragOver","e","handleDragLeave","handleDrop","dropped","handleInputChange","selected","openFilePicker","_a","hideDrop","dropzoneClass","titleText"],"mappings":"sKAyCMA,EAAW,IACfC,EAAAA,KAAC,MAAA,CAAI,QAAQ,YAAY,MAAM,KAAK,OAAO,KAAK,cAAY,OAC1D,SAAA,CAAAC,EAAAA,IAAC,OAAA,CACC,SAAAD,EAAAA,KAAC,iBAAA,CAAe,GAAG,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,KAE3D,SAAA,CAAAC,EAAAA,IAAC,OAAA,CAAK,OAAO,KAAK,UAAU,UAAU,EACtCA,EAAAA,IAAC,OAAA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,MAAA,CAAI,UAAWe,EAAAA,QAAO,gBACrB,SAAA,CAAAf,EAAAA,KAAC,MAAA,CAAI,UAAWe,EAAAA,QAAO,iBACrB,SAAA,CAAAd,EAAAA,IAAC,IAAA,CAAE,UAAWc,EAAAA,QAAO,cAAgB,SAAAwB,EAAU,QAC9C,OAAA,CAAK,UAAWxB,EAAAA,QAAO,eAAgB,cAAY,OAAO,SAAA,QAAA,CAE3D,CAAA,EACF,EACAd,EAAAA,IAAC,IAAA,CAAE,UAAWc,EAAAA,QAAO,iBAAkB,SAAA,qCAAA,CAEvC,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,EAKHG,IAAW,UAAYC,EAAM,OAAS,GACrClB,EAAAA,IAAC,MAAA,CAAI,UAAWc,EAAAA,QAAO,SACpB,SAAAI,EAAM,IAAKX,GACVP,EAAAA,IAACM,EAAA,CAEC,KAAAC,EACA,KAAAC,EACA,OAAAC,EACA,UAAAC,EACA,SAAAC,CAAA,EALKJ,EAAK,EAAA,CAOb,CAAA,CACH,CAAA,EAEJ,CAEJ"}
|
package/dist/index.cjs17.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i="_overlay_rzwii_24",t="_modal_rzwii_43",n="_heading_rzwii_64",o="_title_rzwii_72",r="_description_rzwii_81",e="_body_rzwii_92",_="_actions_rzwii_101",s="_btns_rzwii_108",a="_btnSecondary_rzwii_115",c="_btnPrimary_rzwii_137",d={overlay:i,modal:t,heading:n,title:o,description:r,body:e,actions:_,btns:s,btnSecondary:a,btnPrimary:c};exports.actions=_;exports.body=e;exports.btnPrimary=c;exports.btnSecondary=a;exports.btns=s;exports.default=d;exports.description=r;exports.heading=n;exports.modal=t;exports.overlay=i;exports.title=o;
|
|
2
2
|
//# sourceMappingURL=index.cjs17.js.map
|
package/dist/index.cjs18.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_nav_53r24_22",t="_navOpen_53r24_32",o="_navClosed_53r24_33",a="_navMobile_53r24_42",n="_header_53r24_51",l="_headerOpen_53r24_58",i="_headerClosed_53r24_64",_="_headerMobile_53r24_73",s="_logoIcon_53r24_80",c="_logoFull_53r24_87",r="_headerTitle_53r24_93",m="_headerActions_53r24_102",v="_bellBtn_53r24_108",b="_links_53r24_129",d="_linksOpen_53r24_136",p="_linksClosed_53r24_137",I="_linksMobile_53r24_138",h="_section_53r24_142",k="_sectionTitle_53r24_147",M="_sectionItems_53r24_160",C="_item_53r24_168",L="_itemOpen_53r24_181",O="_itemOpenActive_53r24_191",A="_itemClosed_53r24_201",B="_itemClosedActive_53r24_211",f="_itemMobile_53r24_222",w="_itemMobileActive_53r24_231",u="_itemIcon_53r24_237",g="_itemIconDark_53r24_246",T="_itemIconLight_53r24_247",D="_itemLabel_53r24_251",R="_itemLabelDefault_53r24_263",F="_itemLabelActive_53r24_264",N="_itemLabelMobile_53r24_265",y="_chevron_53r24_269",S="_footer_53r24_283",j="_collapseBtn_53r24_289",P="_collapseBtnClosed_53r24_310",q="_collapseBtnIcon_53r24_314",x="_footerMobile_53r24_326",z="_ctaBtn_53r24_335",E="_workspace_53r24_358",G="_workspaceIcon_53r24_372",H="_workspaceLabel_53r24_383",J="_avatarRow_53r24_397",K="_avatar_53r24_397",Q="_avatarInitials_53r24_415",U="_avatarInfo_53r24_422",V="_avatarName_53r24_430",W="_avatarRole_53r24_441",X={nav:e,navOpen:t,navClosed:o,navMobile:a,header:n,headerOpen:l,headerClosed:i,headerMobile:_,logoIcon:s,logoFull:c,headerTitle:r,headerActions:m,bellBtn:v,links:b,linksOpen:d,linksClosed:p,linksMobile:I,section:h,sectionTitle:k,sectionItems:M,item:C,itemOpen:L,itemOpenActive:O,itemClosed:A,itemClosedActive:B,itemMobile:f,itemMobileActive:w,itemIcon:u,itemIconDark:g,itemIconLight:T,itemLabel:D,itemLabelDefault:R,itemLabelActive:F,itemLabelMobile:N,chevron:y,footer:S,collapseBtn:j,collapseBtnClosed:P,collapseBtnIcon:q,footerMobile:x,ctaBtn:z,workspace:E,workspaceIcon:G,workspaceLabel:H,avatarRow:J,avatar:K,avatarInitials:Q,avatarInfo:U,avatarName:V,avatarRole:W};exports.avatar=K;exports.avatarInfo=U;exports.avatarInitials=Q;exports.avatarName=V;exports.avatarRole=W;exports.avatarRow=J;exports.bellBtn=v;exports.chevron=y;exports.collapseBtn=j;exports.collapseBtnClosed=P;exports.collapseBtnIcon=q;exports.ctaBtn=z;exports.default=X;exports.footer=S;exports.footerMobile=x;exports.header=n;exports.headerActions=m;exports.headerClosed=i;exports.headerMobile=_;exports.headerOpen=l;exports.headerTitle=r;exports.item=C;exports.itemClosed=A;exports.itemClosedActive=B;exports.itemIcon=u;exports.itemIconDark=g;exports.itemIconLight=T;exports.itemLabel=D;exports.itemLabelActive=F;exports.itemLabelDefault=R;exports.itemLabelMobile=N;exports.itemMobile=f;exports.itemMobileActive=w;exports.itemOpen=L;exports.itemOpenActive=O;exports.links=b;exports.linksClosed=p;exports.linksMobile=I;exports.linksOpen=d;exports.logoFull=c;exports.logoIcon=s;exports.nav=e;exports.navClosed=o;exports.navMobile=a;exports.navOpen=t;exports.section=h;exports.sectionItems=M;exports.sectionTitle=k;exports.workspace=E;exports.workspaceIcon=G;exports.workspaceLabel=H;
|
|
2
2
|
//# sourceMappingURL=index.cjs18.js.map
|
package/dist/index.cjs20.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_dropzone_19kgn_8",o="_dropzoneMd_19kgn_22",n="_dropzoneLg_19kgn_29",r="_dropzoneDragging_19kgn_39",t="_dropzoneIconMd_19kgn_48",_="_dropzoneIconLg_19kgn_56",s="_dropzoneContent_19kgn_67",i="_dropzoneTitleRow_19kgn_81",g="_dropzoneTitle_19kgn_81",p="_dropzoneBrowse_19kgn_99",l="_dropzoneSubtitle_19kgn_114",d="_fileList_19kgn_128",c="_fileItem_19kgn_137",z="_fileItemLg_19kgn_150",f="_fileItemMd_19kgn_155",a="_fileBadge_19kgn_161",k="_fileContent_19kgn_176",I="_fileHeader_19kgn_186",L="_fileTexts_19kgn_193",m="_fileName_19kgn_202",T="_fileSize_19kgn_216",w="_actions_19kgn_229",M="_actionBtn_19kgn_236",B="_progressRow_19kgn_259",u="_progressTrack_19kgn_267",b="_progressFill_19kgn_277",S="_progressLabel_19kgn_288",C="_spinner_19kgn_301",R="_wrapper_19kgn_317",x={dropzone:e,dropzoneMd:o,dropzoneLg:n,dropzoneDragging:r,dropzoneIconMd:t,dropzoneIconLg:_,dropzoneContent:s,dropzoneTitleRow:i,dropzoneTitle:g,dropzoneBrowse:p,dropzoneSubtitle:l,fileList:d,fileItem:c,fileItemLg:z,fileItemMd:f,fileBadge:a,fileContent:k,fileHeader:I,fileTexts:L,fileName:m,fileSize:T,actions:w,actionBtn:M,progressRow:B,progressTrack:u,progressFill:b,progressLabel:S,spinner:C,wrapper:R};exports.actionBtn=M;exports.actions=w;exports.default=x;exports.dropzone=e;exports.dropzoneBrowse=p;exports.dropzoneContent=s;exports.dropzoneDragging=r;exports.dropzoneIconLg=_;exports.dropzoneIconMd=t;exports.dropzoneLg=n;exports.dropzoneMd=o;exports.dropzoneSubtitle=l;exports.dropzoneTitle=g;exports.dropzoneTitleRow=i;exports.fileBadge=a;exports.fileContent=k;exports.fileHeader=I;exports.fileItem=c;exports.fileItemLg=z;exports.fileItemMd=f;exports.fileList=d;exports.fileName=m;exports.fileSize=T;exports.fileTexts=L;exports.progressFill=b;exports.progressLabel=S;exports.progressRow=B;exports.progressTrack=u;exports.spinner=C;exports.wrapper=R;
|
|
2
2
|
//# sourceMappingURL=index.cjs20.js.map
|
package/dist/index.cjs21.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_base_106pz_9",c="_checkDefault_106pz_18",o="_radioDefault_106pz_19",t="_checkChecked_106pz_40",a="_radioChecked_106pz_41",_="_checkIcon_106pz_64",r="_radioIcon_106pz_86",d="_toggleWrapper_106pz_105",k="_toggleTrack_106pz_113",l="_toggleChecked_106pz_140",g={base:e,checkDefault:c,radioDefault:o,checkChecked:t,radioChecked:a,checkIcon:_,radioIcon:r,toggleWrapper:d,toggleTrack:k,toggleChecked:l};exports.base=e;exports.checkChecked=t;exports.checkDefault=c;exports.checkIcon=_;exports.default=g;exports.radioChecked=a;exports.radioDefault=o;exports.radioIcon=r;exports.toggleChecked=l;exports.toggleTrack=k;exports.toggleWrapper=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs21.js.map
|
package/dist/index.cjs22.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="_tabList_dww9d_3",d="_tab_dww9d_3",e="_active_dww9d_40",a="_disabled_dww9d_40",i="_icon_dww9d_65",s={tabList:t,tab:d,active:e,disabled:a,icon:i};exports.active=e;exports.default=s;exports.disabled=a;exports.icon=i;exports.tab=d;exports.tabList=t;
|
|
2
2
|
//# sourceMappingURL=index.cjs22.js.map
|
package/dist/index.cjs23.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="_pagination_olot7_11",o="_item_olot7_20",_="_xs_olot7_55",i="_md_olot7_63",n="_lg_olot7_71",e="_active_olot7_81",c="_inactive_olot7_88",l="_dots_olot7_102",s="_control_olot7_110",a={pagination:t,item:o,xs:_,md:i,lg:n,active:e,inactive:c,dots:l,control:s};exports.active=e;exports.control=s;exports.default=a;exports.dots=l;exports.inactive=c;exports.item=o;exports.lg=n;exports.md=i;exports.pagination=t;exports.xs=_;
|
|
2
2
|
//# sourceMappingURL=index.cjs23.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="_button_1hwro_8",t="_sm_1hwro_40",e="_md_1hwro_48",_="_outline_1hwro_58",l="_fill_1hwro_74",n="_secondary_1hwro_89",s="_text_1hwro_104",c="_disabled_1hwro_119",d="_label_1hwro_130",i="_icon_1hwro_136",r={button:o,sm:t,md:e,outline:_,fill:l,secondary:n,text:s,disabled:c,label:d,icon:i};exports.button=o;exports.default=r;exports.disabled=c;exports.fill=l;exports.icon=i;exports.label=d;exports.md=e;exports.outline=_;exports.secondary=n;exports.sm=t;exports.text=s;
|
|
2
|
+
//# sourceMappingURL=index.cjs25.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs25.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_wrapper_pivx7_3",r="_label_pivx7_13",l="_labelDisabled_pivx7_23",s="_field_pivx7_29",a="_select_pivx7_36",o="_placeholder_pivx7_75",_="_error_pivx7_81",c="_chevron_pivx7_93",t="_message_pivx7_109",p="_messageError_pivx7_123",i={wrapper:e,label:r,labelDisabled:l,field:s,select:a,placeholder:o,error:_,chevron:c,message:t,messageError:p};exports.chevron=c;exports.default=i;exports.error=_;exports.field=s;exports.label=r;exports.labelDisabled=l;exports.message=t;exports.messageError=p;exports.placeholder=o;exports.select=a;exports.wrapper=e;
|
|
2
|
+
//# sourceMappingURL=index.cjs26.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs26.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_wrapper_39ray_9",a="_labelRow_39ray_19",r="_label_39ray_19",o="_labelDisabled_39ray_37",l="_labelIcon_39ray_41",_="_field_39ray_53",s="_hover_39ray_70",t="_active_39ray_77",n="_disabled_39ray_85",c="_error_39ray_98",i="_icon_39ray_110",b="_input_39ray_122",d="_iconAction_39ray_146",y="_toggleBtn_39ray_153",g="_searchBtn_39ray_172",p="_message_39ray_202",u="_messageError_39ray_217",v={wrapper:e,labelRow:a,label:r,labelDisabled:o,labelIcon:l,field:_,hover:s,active:t,disabled:n,error:c,icon:i,input:b,iconAction:d,toggleBtn:y,searchBtn:g,message:p,messageError:u};exports.active=t;exports.default=v;exports.disabled=n;exports.error=c;exports.field=_;exports.hover=s;exports.icon=i;exports.iconAction=d;exports.input=b;exports.label=r;exports.labelDisabled=o;exports.labelIcon=l;exports.labelRow=a;exports.message=p;exports.messageError=u;exports.searchBtn=g;exports.toggleBtn=y;exports.wrapper=e;
|
|
2
|
+
//# sourceMappingURL=index.cjs27.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs27.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="_alert_p4b5i_21",e="_typeDefault_p4b5i_36",n="_typeInfo_p4b5i_37",i="_typeSuccess_p4b5i_38",o="_typeWarning_p4b5i_39",_="_typeError_p4b5i_40",l="_iconSlot_p4b5i_44",s="_textContent_p4b5i_54",c="_title_p4b5i_63",r="_titleDefault_p4b5i_72",p="_titleInfo_p4b5i_73",a="_titleSuccess_p4b5i_74",u="_titleWarning_p4b5i_75",y="_titleError_p4b5i_76",b="_message_p4b5i_78",f="_rightSlot_p4b5i_90",g="_actionBtn_p4b5i_101",S="_closeBtn_p4b5i_127",B={alert:t,typeDefault:e,typeInfo:n,typeSuccess:i,typeWarning:o,typeError:_,iconSlot:l,textContent:s,title:c,titleDefault:r,titleInfo:p,titleSuccess:a,titleWarning:u,titleError:y,message:b,rightSlot:f,actionBtn:g,closeBtn:S};exports.actionBtn=g;exports.alert=t;exports.closeBtn=S;exports.default=B;exports.iconSlot=l;exports.message=b;exports.rightSlot=f;exports.textContent=s;exports.title=c;exports.titleDefault=r;exports.titleError=y;exports.titleInfo=p;exports.titleSuccess=a;exports.titleWarning=u;exports.typeDefault=e;exports.typeError=_;exports.typeInfo=n;exports.typeSuccess=i;exports.typeWarning=o;
|
|
2
|
+
//# sourceMappingURL=index.cjs28.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs28.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.cjs5.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("./index.cjs28.js"),x={Default:"#9490AC",Info:"#2472BA",Success:"#2C7D56",Warning:"#A36A00",Error:"#DE0000"};function j({color:t}){return e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"10",cy:"10",r:"9",fill:t}),e.jsx("path",{d:"M10 9v5",stroke:"#fff",strokeWidth:"1.75",strokeLinecap:"round"}),e.jsx("circle",{cx:"10",cy:"6.5",r:"1",fill:"#fff"})]})}function g({color:t}){return e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"10",cy:"10",r:"9",fill:t}),e.jsx("path",{d:"M6 10.5l3 3 5-5.5",stroke:"#fff",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}function p({color:t}){return e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M10 2.5L18 17H2L10 2.5Z",fill:t}),e.jsx("path",{d:"M10 8v4",stroke:"#fff",strokeWidth:"1.75",strokeLinecap:"round"}),e.jsx("circle",{cx:"10",cy:"14.5",r:"1",fill:"#fff"})]})}function k({color:t}){return e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"10",cy:"10",r:"9",fill:t}),e.jsx("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"#fff",strokeWidth:"1.75",strokeLinecap:"round"})]})}function v(){return 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.75",strokeLinecap:"round"})})}function S({type:t}){const n=x[t];return t==="Success"?e.jsx(g,{color:n}):t==="Warning"?e.jsx(p,{color:n}):t==="Error"?e.jsx(k,{color:n}):e.jsx(j,{color:n})}const W={Default:r.default.typeDefault,Info:r.default.typeInfo,Success:r.default.typeSuccess,Warning:r.default.typeWarning,Error:r.default.typeError},m={Default:r.default.titleDefault,Info:r.default.titleInfo,Success:r.default.titleSuccess,Warning:r.default.titleWarning,Error:r.default.titleError},I={Default:"status",Info:"status",Success:"status",Warning:"alert",Error:"alert"};function M({type:t="Default",title:n,message:l,addonLeft:o=!0,closeIcon:s=!0,actions:i=!1,actionLabel:a="Ação",onClose:c,onAction:u,className:f}){const d=[r.default.alert,W[t],f].filter(Boolean).join(" "),h=i||s;return e.jsxs("div",{className:d,role:I[t],"aria-live":t==="Warning"||t==="Error"?"assertive":"polite",children:[o&&e.jsx("span",{className:r.default.iconSlot,children:e.jsx(S,{type:t})}),e.jsxs("div",{className:r.default.textContent,children:[n&&e.jsx("p",{className:[r.default.title,m[t]].join(" "),children:n}),e.jsx("p",{className:r.default.message,children:l})]}),h&&e.jsxs("div",{className:r.default.rightSlot,children:[i&&e.jsx("button",{type:"button",className:r.default.actionBtn,onClick:u,children:a}),s&&e.jsx("button",{type:"button",className:r.default.closeBtn,onClick:c,"aria-label":"Fechar alerta",children:e.jsx(v,{})})]})]})}exports.Alert=M;
|
|
2
2
|
//# sourceMappingURL=index.cjs5.js.map
|
package/dist/index.cjs6.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./index.cjs21.js");function f({type:n="Check",status:u="Default",onChange:l,className:i,"aria-label":t,"aria-labelledby":r}){const a=u==="Checked",o=()=>l==null?void 0:l(!a),s=d=>{(d.key===" "||d.key==="Enter")&&(d.preventDefault(),l==null||l(!a))};if(n==="Toggle")return c.jsx("div",{role:"switch","aria-checked":a,"aria-label":t,"aria-labelledby":r,tabIndex:0,onClick:o,onKeyDown:s,className:[e.default.toggleWrapper,a?e.default.toggleChecked:"",i].filter(Boolean).join(" "),children:c.jsx("div",{className:e.default.toggleTrack})});if(n==="Radio"){const d=a?e.default.radioChecked:e.default.radioDefault;return c.jsx("div",{role:"radio","aria-checked":a,"aria-label":t,"aria-labelledby":r,tabIndex:0,onClick:o,onKeyDown:s,className:[e.default.base,d,i].filter(Boolean).join(" "),children:a&&c.jsx("span",{className:e.default.radioIcon,"aria-hidden":"true"})})}const k=a?e.default.checkChecked:e.default.checkDefault;return c.jsx("div",{role:"checkbox","aria-checked":a,"aria-label":t,"aria-labelledby":r,tabIndex:0,onClick:o,onKeyDown:s,className:[e.default.base,k,i].filter(Boolean).join(" "),children:a&&c.jsx("span",{className:e.default.checkIcon,"aria-hidden":"true"})})}exports.BaseCheckRadio=f;
|
|
2
2
|
//# sourceMappingURL=index.cjs6.js.map
|
package/dist/index.cjs7.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("./index.cjs25.js");function m({variant:l="outline",size:u="sm",iconLeft:s,iconRight:n,disabled:a,className:o,children:r,...c}){const i=a?"disabled":l,d=[e.default.button,e.default[u],e.default[i],o].filter(Boolean).join(" ");return t.jsxs("button",{className:d,disabled:a,"aria-disabled":a,...c,children:[s&&t.jsx("span",{className:e.default.icon,children:s}),t.jsx("span",{className:e.default.label,children:r}),n&&t.jsx("span",{className:e.default.icon,children:n})]})}exports.Button=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs7.js.map
|
package/dist/index.cjs9.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("react"),r=require("./index.cjs27.js");function N(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("polyline",{points:"22,6 12,13 2,6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}function j(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),e.jsx("path",{d:"M16.5 16.5L21 21",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function E(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M16 2v4M8 2v4M3 10h18",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}function S(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("rect",{x:"5",y:"11",width:"14",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M8 11V7a4 4 0 0 1 8 0v4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}function y(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"1.75"})]})}function A(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M1 1l22 22",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function D({state:t="Default",inputType:o="text",label:l,placeholder:k,message:n,iconLabel:c,iconLeft:f,iconRight:v,value:w,onChange:p,onSearch:L,id:g,className:b,...m}){const C=x.useId(),s=g??C,[i,I]=x.useState(!1),d=t==="Disabled",a=t==="Error",B=o==="password"?i?"text":"password":o==="search"?"text":o,u=f??(o==="email"?e.jsx(N,{}):o==="password"?e.jsx(S,{}):o==="search"?e.jsx(j,{}):void 0),h=v??(o==="password"?e.jsx("button",{type:"button",className:r.default.toggleBtn,onClick:()=>I(M=>!M),"aria-label":i?"Ocultar senha":"Mostrar senha",tabIndex:-1,children:i?e.jsx(y,{}):e.jsx(A,{})}):o==="date"?e.jsx(E,{}):o==="search"?e.jsx("button",{type:"button",className:r.default.searchBtn,onClick:L,"aria-label":"Buscar",tabIndex:-1,children:e.jsx(j,{})}):void 0),W=[r.default.field,t==="Hover"?r.default.hover:"",t==="Active"?r.default.active:"",d?r.default.disabled:"",a?r.default.error:"",b].filter(Boolean).join(" ");return e.jsxs("div",{className:r.default.wrapper,children:[l&&e.jsxs("div",{className:r.default.labelRow,children:[e.jsx("label",{htmlFor:s,className:[r.default.label,d?r.default.labelDisabled:""].filter(Boolean).join(" "),children:l}),c&&e.jsx("span",{className:r.default.labelIcon,"aria-hidden":"true",children:c})]}),e.jsxs("div",{className:W,children:[u&&e.jsx("span",{className:r.default.icon,"aria-hidden":"true",children:u}),e.jsx("input",{id:s,type:B,className:r.default.input,placeholder:k,disabled:d,value:w,onChange:p,"aria-invalid":a,"aria-describedby":n?`${s}-message`:void 0,...m}),h&&e.jsx("span",{className:[r.default.icon,o==="search"||o==="password"?r.default.iconAction:""].filter(Boolean).join(" "),children:h})]}),n&&e.jsx("p",{id:`${s}-message`,className:[r.default.message,a?r.default.messageError:""].filter(Boolean).join(" "),children:n})]})}exports.Input=D;
|
|
2
2
|
//# sourceMappingURL=index.cjs9.js.map
|
package/dist/index.cjs9.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs9.js","sources":["../components/Input/Input.tsx"],"sourcesContent":["import React, { useId } from 'react';\nimport styles from './Input.module.css';\n\nexport type InputState = 'Default' | 'Hover' | 'Active' | 'Disabled' | 'Error';\n\nexport interface InputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n /** Visual/interaction state. Defaults to 'Default'. */\n state?: InputState;\n /** Label text rendered above the field. */\n label?: string;\n placeholder?: string;\n /** Helper or error message rendered below the field. */\n message?: string;\n /** Info icon rendered beside the label. */\n iconLabel?: React.ReactNode;\n /** Icon rendered inside the field, left side (24×24 slot). */\n iconLeft?: React.ReactNode;\n /** Icon rendered inside the field, right side (24×24 slot). */\n iconRight?: React.ReactNode;\n value?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport function Input({\n state = 'Default',\n label,\n placeholder,\n message,\n iconLabel,\n iconLeft,\n iconRight,\n value,\n onChange,\n id: idProp,\n className,\n ...props\n}: InputProps) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n\n const isDisabled = state === 'Disabled';\n const isError = state === 'Error';\n\n const fieldClass = [\n styles.field,\n state === 'Hover' ? styles.hover : '',\n state === 'Active' ? styles.active : '',\n isDisabled ? styles.disabled : '',\n isError ? styles.error : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={styles.wrapper}>\n {label && (\n <div className={styles.labelRow}>\n <label\n htmlFor={id}\n className={[styles.label, isDisabled ? styles.labelDisabled : '']\n .filter(Boolean)\n .join(' ')}\n >\n {label}\n </label>\n {iconLabel && (\n <span className={styles.labelIcon} aria-hidden=\"true\">\n {iconLabel}\n </span>\n )}\n </div>\n )}\n\n <div className={fieldClass}>\n {iconLeft && (\n <span className={styles.icon} aria-hidden=\"true\">\n {iconLeft}\n </span>\n )}\n <input\n id={id}\n className={styles.input}\n placeholder={placeholder}\n disabled={isDisabled}\n value={value}\n onChange={onChange}\n aria-invalid={isError}\n aria-describedby={message ? `${id}-message` : undefined}\n {...props}\n />\n {iconRight && (\n <span className={styles.icon} aria-hidden=\"true\">\n {iconRight}\n </span>\n )}\n </div>\n\n {message && (\n <p\n id={`${id}-message`}\n className={[styles.message, isError ? styles.messageError : '']\n .filter(Boolean)\n .join(' ')}\n >\n {message}\n </p>\n )}\n </div>\n );\n}\n"],"names":["Input","state","label","placeholder","message","iconLabel","iconLeft","iconRight","value","onChange","idProp","className","props","generatedId","useId","id","isDisabled","isError","fieldClass","styles","jsxs","jsx"],"mappings":"sKAwBO,SAASA,EAAM,CACpB,MAAAC,EAAQ,UACR,MAAAC,EACA,YAAAC,EACA,QAAAC,EACA,UAAAC,EACA,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,GAAIC,EACJ,UAAAC,EACA,GAAGC,CACL,EAAe,CACb,MAAMC,EAAcC,EAAAA,MAAA,EACdC,EAAKL,GAAUG,EAEfG,EAAaf,IAAU,WACvBgB,EAAUhB,IAAU,QAEpBiB,EAAa,CACjBC,EAAAA,QAAO,MACPlB,IAAU,QAAUkB,UAAO,MAAQ,GACnClB,IAAU,SAAWkB,UAAO,OAAS,GACrCH,EAAaG,EAAAA,QAAO,SAAW,GAC/BF,EAAUE,EAAAA,QAAO,MAAQ,GACzBR,CAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACES,EAAAA,KAAC,MAAA,CAAI,UAAWD,EAAAA,QAAO,QACpB,SAAA,CAAAjB,GACCkB,EAAAA,KAAC,MAAA,CAAI,UAAWD,EAAAA,QAAO,SACrB,SAAA,CAAAE,EAAAA,IAAC,QAAA,CACC,QAASN,EACT,UAAW,CAACI,EAAAA,QAAO,MAAOH,EAAaG,EAAAA,QAAO,cAAgB,EAAE,EAC7D,OAAO,OAAO,EACd,KAAK,GAAG,EAEV,SAAAjB,CAAA,CAAA,EAEFG,SACE,OAAA,CAAK,UAAWc,EAAAA,QAAO,UAAW,cAAY,OAC5C,SAAAd,CAAA,CACH,CAAA,EAEJ,EAGFe,EAAAA,KAAC,MAAA,CAAI,UAAWF,EACb,SAAA,CAAAZ,SACE,OAAA,CAAK,UAAWa,EAAAA,QAAO,KAAM,cAAY,OACvC,SAAAb,CAAA,CACH,EAEFe,EAAAA,IAAC,QAAA,CACC,GAAAN,EACA,UAAWI,EAAAA,QAAO,MAClB,YAAAhB,EACA,SAAUa,EACV,MAAAR,EACA,SAAAC,EACA,eAAcQ,EACd,mBAAkBb,EAAU,GAAGW,CAAE,WAAa,OAC7C,GAAGH,CAAA,CAAA,EAELL,SACE,OAAA,CAAK,UAAWY,EAAAA,QAAO,KAAM,cAAY,OACvC,SAAAZ,CAAA,CACH,CAAA,EAEJ,EAECH,GACCiB,EAAAA,IAAC,IAAA,CACC,GAAI,GAAGN,CAAE,WACT,UAAW,CAACI,EAAAA,QAAO,QAASF,EAAUE,EAAAA,QAAO,aAAe,EAAE,EAC3D,OAAO,OAAO,EACd,KAAK,GAAG,EAEV,SAAAf,CAAA,CAAA,CACH,EAEJ,CAEJ"}
|
|
1
|
+
{"version":3,"file":"index.cjs9.js","sources":["../components/Input/Input.tsx"],"sourcesContent":["import React, { useId, useState } from 'react';\nimport styles from './Input.module.css';\n\nexport type InputState = 'Default' | 'Hover' | 'Active' | 'Disabled' | 'Error';\nexport type InputType = 'text' | 'email' | 'password' | 'search' | 'date';\n\n// ─── Built-in SVG icons ───────────────────────────────────────────────────────\n\nfunction IconEmail() {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <polyline points=\"22,6 12,13 2,6\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n );\n}\n\nfunction IconSearch() {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\"/>\n <path d=\"M16.5 16.5L21 21\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\"/>\n </svg>\n );\n}\n\nfunction IconCalendar() {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <path d=\"M16 2v4M8 2v4M3 10h18\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n );\n}\n\nfunction IconLock() {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"5\" y=\"11\" width=\"14\" height=\"11\" rx=\"2\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <path d=\"M8 11V7a4 4 0 0 1 8 0v4\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n );\n}\n\nfunction IconEye() {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7z\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <circle cx=\"12\" cy=\"12\" r=\"3\" stroke=\"currentColor\" strokeWidth=\"1.75\"/>\n </svg>\n );\n}\n\nfunction IconEyeOff() {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <path d=\"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <path d=\"M1 1l22 22\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\"/>\n </svg>\n );\n}\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport interface InputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'type'> {\n /** Visual/interaction state. Defaults to 'Default'. */\n state?: InputState;\n /**\n * Semantic input type. Sets the correct HTML type and auto-adds icons.\n * - email → envelope icon left\n * - password → lock icon left + show/hide toggle right\n * - search → search icon left + green search button right\n * - date → calendar icon right\n */\n inputType?: InputType;\n /** Label text rendered above the field. */\n label?: string;\n placeholder?: string;\n /** Helper or error message rendered below the field. */\n message?: string;\n /** Info icon rendered beside the label. */\n iconLabel?: React.ReactNode;\n /** Icon rendered inside the field, left side (24×24 slot). */\n iconLeft?: React.ReactNode;\n /** Icon rendered inside the field, right side (24×24 slot). */\n iconRight?: React.ReactNode;\n value?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n /** Called when search button is clicked (only for inputType=\"search\") */\n onSearch?: () => void;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport function Input({\n state = 'Default',\n inputType = 'text',\n label,\n placeholder,\n message,\n iconLabel,\n iconLeft,\n iconRight,\n value,\n onChange,\n onSearch,\n id: idProp,\n className,\n ...props\n}: InputProps) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const [showPassword, setShowPassword] = useState(false);\n\n const isDisabled = state === 'Disabled';\n const isError = state === 'Error';\n\n // ── Resolve HTML type ──────────────────────────────────────────────────────\n const htmlType = inputType === 'password'\n ? (showPassword ? 'text' : 'password')\n : inputType === 'search'\n ? 'text'\n : inputType;\n\n // ── Resolve built-in icons ─────────────────────────────────────────────────\n const resolvedIconLeft: React.ReactNode =\n iconLeft ??\n (inputType === 'email' ? <IconEmail /> :\n inputType === 'password' ? <IconLock /> :\n inputType === 'search' ? <IconSearch /> :\n undefined);\n\n const resolvedIconRight: React.ReactNode =\n iconRight ??\n (inputType === 'password'\n ? (\n <button\n type=\"button\"\n className={styles.toggleBtn}\n onClick={() => setShowPassword((v) => !v)}\n aria-label={showPassword ? 'Ocultar senha' : 'Mostrar senha'}\n tabIndex={-1}\n >\n {showPassword ? <IconEye /> : <IconEyeOff />}\n </button>\n )\n : inputType === 'date'\n ? <IconCalendar />\n : inputType === 'search'\n ? (\n <button\n type=\"button\"\n className={styles.searchBtn}\n onClick={onSearch}\n aria-label=\"Buscar\"\n tabIndex={-1}\n >\n <IconSearch />\n </button>\n )\n : undefined);\n\n const fieldClass = [\n styles.field,\n state === 'Hover' ? styles.hover : '',\n state === 'Active' ? styles.active : '',\n isDisabled ? styles.disabled : '',\n isError ? styles.error : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={styles.wrapper}>\n {label && (\n <div className={styles.labelRow}>\n <label\n htmlFor={id}\n className={[styles.label, isDisabled ? styles.labelDisabled : '']\n .filter(Boolean)\n .join(' ')}\n >\n {label}\n </label>\n {iconLabel && (\n <span className={styles.labelIcon} aria-hidden=\"true\">\n {iconLabel}\n </span>\n )}\n </div>\n )}\n\n <div className={fieldClass}>\n {resolvedIconLeft && (\n <span className={styles.icon} aria-hidden=\"true\">\n {resolvedIconLeft}\n </span>\n )}\n <input\n id={id}\n type={htmlType}\n className={styles.input}\n placeholder={placeholder}\n disabled={isDisabled}\n value={value}\n onChange={onChange}\n aria-invalid={isError}\n aria-describedby={message ? `${id}-message` : undefined}\n {...props}\n />\n {resolvedIconRight && (\n <span className={[styles.icon, inputType === 'search' || inputType === 'password' ? styles.iconAction : ''].filter(Boolean).join(' ')}>\n {resolvedIconRight}\n </span>\n )}\n </div>\n\n {message && (\n <p\n id={`${id}-message`}\n className={[styles.message, isError ? styles.messageError : '']\n .filter(Boolean)\n .join(' ')}\n >\n {message}\n </p>\n )}\n </div>\n );\n}\n"],"names":["IconEmail","jsxs","jsx","IconSearch","IconCalendar","IconLock","IconEye","IconEyeOff","Input","state","inputType","label","placeholder","message","iconLabel","iconLeft","iconRight","value","onChange","onSearch","idProp","className","props","generatedId","useId","id","showPassword","setShowPassword","useState","isDisabled","isError","htmlType","resolvedIconLeft","resolvedIconRight","styles","v","fieldClass"],"mappings":"sKAQA,SAASA,GAAY,CACnB,OACEC,EAAAA,KAAC,MAAA,CAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,cAAY,OACtE,SAAA,CAAAC,EAAAA,IAAC,OAAA,CAAK,EAAE,8EAA8E,OAAO,eAAe,YAAY,OAAO,cAAc,QAAQ,eAAe,OAAA,CAAO,EAC3KA,EAAAA,IAAC,WAAA,CAAS,OAAO,iBAAiB,O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M,cAAY,OACvC,SAAAF,CAAA,CACH,EAEF9B,EAAAA,IAAC,QAAA,CACC,GAAAuB,EACA,KAAMM,EACN,UAAWG,EAAAA,QAAO,MAClB,YAAAtB,EACA,SAAUiB,EACV,MAAAZ,EACA,SAAAC,EACA,eAAcY,EACd,mBAAkBjB,EAAU,GAAGY,CAAE,WAAa,OAC7C,GAAGH,CAAA,CAAA,EAELW,SACE,OAAA,CAAK,UAAW,CAACC,EAAAA,QAAO,KAAMxB,IAAc,UAAYA,IAAc,WAAawB,EAAAA,QAAO,WAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EACjI,SAAAD,CAAA,CACH,CAAA,EAEJ,EAECpB,GACCX,EAAAA,IAAC,IAAA,CACC,GAAI,GAAGuB,CAAE,WACT,UAAW,CAACS,EAAAA,QAAO,QAASJ,EAAUI,EAAAA,QAAO,aAAe,EAAE,EAC3D,OAAO,OAAO,EACd,KAAK,GAAG,EAEV,SAAArB,CAAA,CAAA,CACH,EAEJ,CAEJ"}
|
package/dist/index.esm.js
CHANGED
|
@@ -2,26 +2,30 @@
|
|
|
2
2
|
import { colors as e } from "./index.esm3.js";
|
|
3
3
|
import { typography as m } from "./index.esm4.js";
|
|
4
4
|
import { Alert as x } from "./index.esm5.js";
|
|
5
|
-
import { BaseCheckRadio as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Header as
|
|
5
|
+
import { BaseCheckRadio as l } from "./index.esm6.js";
|
|
6
|
+
import { Button as i } from "./index.esm7.js";
|
|
7
|
+
import { Header as c } from "./index.esm8.js";
|
|
8
8
|
import { Input as g } from "./index.esm9.js";
|
|
9
9
|
import { Modal as u } from "./index.esm10.js";
|
|
10
10
|
import { Nav as B } from "./index.esm11.js";
|
|
11
|
-
import { Pagination as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
11
|
+
import { Pagination as b } from "./index.esm12.js";
|
|
12
|
+
import { Select as v } from "./index.esm13.js";
|
|
13
|
+
import { Steps as C } from "./index.esm14.js";
|
|
14
|
+
import { Tab as I } from "./index.esm15.js";
|
|
15
|
+
import { Upload as N } from "./index.esm16.js";
|
|
14
16
|
export {
|
|
15
17
|
x as Alert,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
l as BaseCheckRadio,
|
|
19
|
+
i as Button,
|
|
20
|
+
c as Header,
|
|
19
21
|
g as Input,
|
|
20
22
|
u as Modal,
|
|
21
23
|
B as Nav,
|
|
22
|
-
|
|
24
|
+
b as Pagination,
|
|
25
|
+
v as Select,
|
|
23
26
|
C as Steps,
|
|
24
|
-
I as
|
|
27
|
+
I as Tab,
|
|
28
|
+
N as Upload,
|
|
25
29
|
e as colors,
|
|
26
30
|
m as typography
|
|
27
31
|
};
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
package/dist/index.esm10.js
CHANGED
package/dist/index.esm11.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import e from "./index.
|
|
2
|
+
import e from "./index.esm18.js";
|
|
3
3
|
function m() {
|
|
4
4
|
return /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: "M6 12l4-4-4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
5
5
|
}
|
package/dist/index.esm12.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as a, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import r from "./index.
|
|
2
|
+
import r from "./index.esm23.js";
|
|
3
3
|
const f = { xs: 12, md: 20, lg: 24 }, v = ({ s: i }) => /* @__PURE__ */ a("svg", { width: i, height: i, viewBox: "0 0 12 12", fill: "currentColor", "aria-hidden": "true", children: [
|
|
4
4
|
/* @__PURE__ */ n("circle", { cx: "2", cy: "6", r: "1.25" }),
|
|
5
5
|
/* @__PURE__ */ n("circle", { cx: "6", cy: "6", r: "1.25" }),
|
package/dist/index.esm13.js
CHANGED
|
@@ -1,93 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import e from "./index.
|
|
4
|
-
function
|
|
5
|
-
return
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useId as N } from "react";
|
|
3
|
+
import e from "./index.esm26.js";
|
|
4
|
+
function B() {
|
|
5
|
+
return /* @__PURE__ */ r("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M5 7.5l5 5 5-5", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
6
6
|
}
|
|
7
|
-
function g(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
i === "Complete" ? e.minComplete : ""
|
|
37
|
-
].filter(Boolean).join(" "), r = [
|
|
38
|
-
e.minConnector,
|
|
39
|
-
i === "Complete" ? e.minConnectorComplete : e.minConnectorDefault
|
|
40
|
-
].join(" ");
|
|
41
|
-
return /* @__PURE__ */ d(S.Fragment, { children: [
|
|
7
|
+
function g({
|
|
8
|
+
options: u,
|
|
9
|
+
value: d,
|
|
10
|
+
placeholder: m = "Selecione",
|
|
11
|
+
label: t,
|
|
12
|
+
message: o,
|
|
13
|
+
state: c = "Default",
|
|
14
|
+
onChange: s,
|
|
15
|
+
id: f,
|
|
16
|
+
className: v
|
|
17
|
+
}) {
|
|
18
|
+
const p = N(), i = f ?? p, h = c === "Disabled", a = c === "Error", b = [
|
|
19
|
+
e.field,
|
|
20
|
+
a ? e.error : "",
|
|
21
|
+
v
|
|
22
|
+
].filter(Boolean).join(" "), j = [
|
|
23
|
+
e.select,
|
|
24
|
+
d ? "" : e.placeholder
|
|
25
|
+
].filter(Boolean).join(" ");
|
|
26
|
+
return /* @__PURE__ */ n("div", { className: e.wrapper, children: [
|
|
27
|
+
t && /* @__PURE__ */ r(
|
|
28
|
+
"label",
|
|
29
|
+
{
|
|
30
|
+
htmlFor: i,
|
|
31
|
+
className: [e.label, h ? e.labelDisabled : ""].filter(Boolean).join(" "),
|
|
32
|
+
children: t
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ n("div", { className: b, children: [
|
|
42
36
|
/* @__PURE__ */ n(
|
|
43
|
-
"
|
|
37
|
+
"select",
|
|
44
38
|
{
|
|
45
|
-
|
|
46
|
-
className:
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
id: i,
|
|
40
|
+
className: j,
|
|
41
|
+
value: d ?? "",
|
|
42
|
+
disabled: h,
|
|
43
|
+
"aria-invalid": a,
|
|
44
|
+
"aria-describedby": o ? `${i}-message` : void 0,
|
|
45
|
+
onChange: (l) => s == null ? void 0 : s(l.target.value),
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ r("option", { value: "", disabled: !0, hidden: !0, children: m }),
|
|
48
|
+
u.map((l) => /* @__PURE__ */ r("option", { value: l.value, children: l.label }, l.value))
|
|
49
|
+
]
|
|
49
50
|
}
|
|
50
51
|
),
|
|
51
|
-
|
|
52
|
-
] },
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{
|
|
63
|
-
className: i,
|
|
64
|
-
"aria-label": "Steps",
|
|
65
|
-
children: t.map((c, r) => {
|
|
66
|
-
const l = u(r, o), f = g(r, s), h = l === "Active" || l === "Complete", C = s - r, v = [
|
|
67
|
-
e.item,
|
|
68
|
-
e[`type${f}`],
|
|
69
|
-
e[`state${l}`]
|
|
70
|
-
].join(" "), p = h ? e.textLight : e.textDark;
|
|
71
|
-
return /* @__PURE__ */ d(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
className: v,
|
|
75
|
-
style: { zIndex: C },
|
|
76
|
-
role: "listitem",
|
|
77
|
-
"aria-current": l === "Active" ? "step" : void 0,
|
|
78
|
-
"aria-label": `Step ${r + 1} of ${s}: ${c.label}${l === "Active" ? " (current)" : l === "Complete" ? " (completed)" : ""}`,
|
|
79
|
-
children: [
|
|
80
|
-
/* @__PURE__ */ n("span", { className: [e.label, p].join(" "), children: c.label }),
|
|
81
|
-
l === "Complete" ? /* @__PURE__ */ n("span", { className: [e.checkIcon, p].join(" "), children: /* @__PURE__ */ n(j, {}) }) : /* @__PURE__ */ n("span", { className: [e.num, p].join(" "), children: String(r + 1).padStart(2, "0") })
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
r
|
|
85
|
-
);
|
|
86
|
-
})
|
|
87
|
-
}
|
|
88
|
-
);
|
|
52
|
+
/* @__PURE__ */ r("span", { className: e.chevron, children: /* @__PURE__ */ r(B, {}) })
|
|
53
|
+
] }),
|
|
54
|
+
o && /* @__PURE__ */ r(
|
|
55
|
+
"p",
|
|
56
|
+
{
|
|
57
|
+
id: `${i}-message`,
|
|
58
|
+
className: [e.message, a ? e.messageError : ""].filter(Boolean).join(" "),
|
|
59
|
+
children: o
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
89
63
|
}
|
|
90
64
|
export {
|
|
91
|
-
|
|
65
|
+
g as Select
|
|
92
66
|
};
|
|
93
67
|
//# sourceMappingURL=index.esm13.js.map
|