@solibo/solibo-ui 0.3.14 → 0.3.17
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/index.css +1 -1
- package/dist/assets/index10.css +0 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -0
- package/dist/assets/index36.css +1 -0
- package/dist/assets/index37.css +1 -0
- package/dist/assets/index38.css +1 -0
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -0
- package/dist/assets/styles.css +1 -1
- package/dist/components/_avatar/index.cjs +1 -1
- package/dist/components/_avatar/index.js +1 -1
- package/dist/components/_card/index.cjs +1 -1
- package/dist/components/_card/index.js +9 -9
- package/dist/components/_collapsible/index.cjs +1 -1
- package/dist/components/_collapsible/index.js +1 -1
- package/dist/components/_croppable/index.cjs +2 -0
- package/dist/components/_croppable/index.cjs.map +1 -0
- package/dist/components/_croppable/index.js +244 -0
- package/dist/components/_croppable/index.js.map +1 -0
- package/dist/components/_dropzone/index.cjs +1 -1
- package/dist/components/_dropzone/index.cjs.map +1 -1
- package/dist/components/_dropzone/index.js +45 -21
- package/dist/components/_dropzone/index.js.map +1 -1
- package/dist/components/_editor/index.cjs +26 -26
- package/dist/components/_editor/index.cjs.map +1 -1
- package/dist/components/_editor/index.js +3076 -2873
- package/dist/components/_editor/index.js.map +1 -1
- package/dist/components/_messages/index.cjs +1 -1
- package/dist/components/_messages/index.js +5 -5
- package/dist/components/_portal/index.cjs +1 -1
- package/dist/components/_portal/index.cjs.map +1 -1
- package/dist/components/_portal/index.js +17 -16
- package/dist/components/_portal/index.js.map +1 -1
- package/dist/components/_toasts/index.cjs +1 -1
- package/dist/components/_toasts/index.js +1 -1
- package/dist/components/_widget/index.cjs +2 -0
- package/dist/components/_widget/index.cjs.map +1 -0
- package/dist/components/_widget/index.js +11 -0
- package/dist/components/_widget/index.js.map +1 -0
- package/dist/components/accordion/index.cjs +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.js +1 -1
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +1 -1
- package/dist/components/badge/index.cjs +2 -0
- package/dist/components/badge/index.cjs.map +1 -0
- package/dist/components/badge/index.js +18 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +12 -12
- package/dist/components/branding/index.cjs +1 -1
- package/dist/components/branding/index.js +1 -1
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/figure/index.cjs +1 -1
- package/dist/components/figure/index.cjs.map +1 -1
- package/dist/components/figure/index.js +11 -13
- package/dist/components/figure/index.js.map +1 -1
- package/dist/components/file/index.cjs +1 -1
- package/dist/components/file/index.cjs.map +1 -1
- package/dist/components/file/index.js +19 -17
- package/dist/components/file/index.js.map +1 -1
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/group/index.cjs +1 -1
- package/dist/components/group/index.js +1 -1
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.js +8 -8
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.cjs.map +1 -1
- package/dist/components/icon/index.js +67 -33
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/image/index.cjs +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.cjs.map +1 -1
- package/dist/components/layout/index.js +12 -11
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.cjs.map +1 -1
- package/dist/components/link/index.js +13 -11
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.cjs.map +1 -1
- package/dist/components/list/index.js +20 -19
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.cjs.map +1 -1
- package/dist/components/message/index.js +15 -12
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +15 -15
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sortable/index.cjs +1 -1
- package/dist/components/sortable/index.js +1 -1
- package/dist/components/table/index.cjs +2 -0
- package/dist/components/table/index.cjs.map +1 -0
- package/dist/components/table/index.js +43 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.cjs.map +1 -1
- package/dist/components/textarea/index.js +22 -15
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/toast/index.cjs +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +75 -25
- package/dist/index.js +68 -60
- package/dist/index.js.map +1 -1
- package/dist/styles.module-BBfw-M3O.cjs +2 -0
- package/dist/styles.module-BBfw-M3O.cjs.map +1 -0
- package/dist/styles.module-BUHdj3im.js +10 -0
- package/dist/styles.module-BUHdj3im.js.map +1 -0
- package/package.json +1 -1
- package/dist/icons-LUDXnYZb.cjs +0 -2
- package/dist/icons-LUDXnYZb.cjs.map +0 -1
- package/dist/icons-S3H6wxpA.js +0 -38
- package/dist/icons-S3H6wxpA.js.map +0 -1
- package/dist/styles.module-Cr05rVxs.cjs +0 -2
- package/dist/styles.module-Cr05rVxs.cjs.map +0 -1
- package/dist/styles.module-Dep_cSM2.js +0 -10
- package/dist/styles.module-Dep_cSM2.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/message/index.tsx"],"sourcesContent":["import { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type MessageOptions = {\n content: React.ReactNode;\n id: string;\n type?: 'default' | 'system' | 'user';\n};\n\nexport const Message = ({ content, id, type = 'default' }: MessageOptions) => {\n return (\n <div\n className={styles.message}\n data-id={id}\n data-type={type}\n >\n {type == 'system' && <Icon name='info' />}\n {content}\n </div>\n );\n};\n"],"names":["Message","content","id","type","jsxs","styles","message","jsx","Icon"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/message/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type MessageOptions = {\n content: React.ReactNode;\n id: string;\n preview?: boolean;\n type?: 'default' | 'minimal' | 'system' | 'user';\n};\n\nexport const Message = ({ content, id, preview, type = 'default' }: MessageOptions) => {\n return (\n <div\n className={cx(styles.message, preview && styles.preview)}\n data-id={id}\n data-type={type}\n >\n {type == 'system' && <Icon name='info' />}\n {content}\n </div>\n );\n};\n"],"names":["Message","content","id","preview","type","jsxs","cx","styles","message","jsx","Icon"],"mappings":";;;;;;GAYaA,IAAUA,CAAC;AAAA,EAAEC,SAAAA;AAAAA,EAASC,IAAAA;AAAAA,EAAIC,SAAAA;AAAAA,EAASC,MAAAA,IAAO;AAA0B,MAE7E,gBAAAC,EAAC,OAAA,EACC,WAAWC,EAAGC,EAAOC,SAASL,KAAWI,EAAOJ,OAAO,GACvD,WAASD,GACT,aAAWE,GAAK,WAAA,WAEfA,UAAAA;AAAAA,EAAAA,KAAQ,YAAY,gBAAAK,EAACC,GAAA,EAAK,MAAK,QAAM;AAAA,EACrCT;AAAAA,GACH;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index23.css');const o=require("react/jsx-runtime"),e=require("../../classix-5H4IWnMA.cjs"),i="_nav_8nmuv_1",r="_horizontal_8nmuv_7",c="_tabs_8nmuv_17",v="_pills_8nmuv_38",t={nav:i,horizontal:r,tabs:c,pills:v},u={default:t.default,pills:t.pills,tabs:t.tabs},_=({animation:a,children:n,horizontal:s=!1,variant:l="default"})=>o.jsx("nav",{className:e.t(a&&a,s&&t.horizontal,t.nav,u[l]),"data-orientation":s?"horizontal":"vertical","data-cy":"Nav",children:n});exports.Nav=_;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { t as r } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index23.css';const i = "_nav_8nmuv_1", v = "_horizontal_8nmuv_7", _ = "_tabs_8nmuv_17", c = "_pills_8nmuv_38", t = {
|
|
4
4
|
nav: i,
|
|
5
|
-
horizontal:
|
|
6
|
-
tabs:
|
|
7
|
-
pills:
|
|
8
|
-
},
|
|
9
|
-
default:
|
|
10
|
-
pills:
|
|
11
|
-
tabs:
|
|
12
|
-
},
|
|
13
|
-
animation:
|
|
14
|
-
children:
|
|
5
|
+
horizontal: v,
|
|
6
|
+
tabs: _,
|
|
7
|
+
pills: c
|
|
8
|
+
}, e = {
|
|
9
|
+
default: t.default,
|
|
10
|
+
pills: t.pills,
|
|
11
|
+
tabs: t.tabs
|
|
12
|
+
}, u = ({
|
|
13
|
+
animation: a,
|
|
14
|
+
children: n,
|
|
15
15
|
horizontal: s = !1,
|
|
16
|
-
variant:
|
|
17
|
-
}) => /* @__PURE__ */
|
|
16
|
+
variant: l = "default"
|
|
17
|
+
}) => /* @__PURE__ */ o("nav", { className: r(a && a, s && t.horizontal, t.nav, e[l]), "data-orientation": s ? "horizontal" : "vertical", "data-cy": "Nav", children: n });
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
u as Nav
|
|
20
20
|
};
|
|
21
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index6.css');const e=require("react/jsx-runtime"),n=require("../../classix-5H4IWnMA.cjs"),d=require("../../utils-D_TJ8wDc.cjs"),a="_select_kvjzq_1",q="_label_kvjzq_21",j="_required_kvjzq_25",s={select:a,label:q,required:j},_=({children:u,label:c,placeholder:l,...t})=>{const{touched:i,onBlur:o}=d.useTouched(t.value===""),r=e.jsxs("select",{className:n.t(s.select,i&&"touched"),onBlur:o,...t,children:[l&&e.jsx("option",{value:"",hidden:!0,children:l}),u]});return c?e.jsxs("label",{"data-cy":"Select",children:[e.jsx("span",{className:n.t(s.label,t.required&&s.required),children:c}),r]}):r};exports.Select=_;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { t as o } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { u as a } from "../../utils-DXIJVVzz.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index6.css';const m = "_select_kvjzq_1", _ = "_label_kvjzq_21", q = "_required_kvjzq_25", t = {
|
|
5
5
|
select: m,
|
|
6
6
|
label: _,
|
|
7
7
|
required: q
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index5.css');const d=require("react/jsx-runtime"),D=require("../../classix-5H4IWnMA.cjs"),e=require("react"),v="_sortable_z6sff_1",x="_columns_z6sff_7",p={sortable:v,columns:x};function _({children:i,onChangeOrder:n,twoColumns:b}){const o=e.useMemo(()=>e.Children.toArray(i),[i]),[S,f]=e.useState(o),s=e.useRef(-1);return e.useEffect(()=>f(o),[o]),d.jsx("ol",{className:D.t(p.sortable,b&&p.columns),"data-cy":"Sortable",children:S.map((l,a)=>{const y=e.isValidElement(l)?l.key:null;return d.jsx("li",{draggable:!0,onDragStart:t=>{s.current=a,t.dataTransfer.setData("text/plain",""),t.dataTransfer.effectAllowed="move"},onDragOver:t=>{t.preventDefault(),t.dataTransfer.dropEffect="move"},onDrop:t=>{t.preventDefault();const c=s.current;c<0||c===a||(f(g=>{const r=g.slice();return r.splice(a,0,r.splice(c,1)[0]),n==null||n(r.map((m,u)=>({id:String(e.isValidElement(m)?m.props["data-id"]??`idx-${u}`:`idx-${u}`),weight:r.length-1-u}))),r}),s.current=-1)},onDragEnd:()=>{s.current=-1},"data-cy":"Sortable",children:l},y??a)})})}exports.Sortable=_;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { t as S } from "../../classix-DG18itHa.js";
|
|
3
3
|
import f, { useMemo as g, useState as v, useRef as E, useEffect as x } from "react";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index5.css';const T = "_sortable_z6sff_1", k = "_columns_z6sff_7", d = {
|
|
5
5
|
sortable: T,
|
|
6
6
|
columns: k
|
|
7
7
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index4.css');const R=require("react/jsx-runtime"),x=require("react"),_="_table_121xc_1",k={table:_},q=({children:h,...C})=>{const o=x.useRef(null),g=x.useCallback(v=>{var d,m;const e=o.current;if(!e)return;const t=(d=v.target)==null?void 0:d.closest("th");if(!t)return;const c=e.tHead;if(!c||!c.contains(t))return;const i=t.parentElement;if(!i)return;const r=Array.from(i.children).indexOf(t);if(r<0)return;const s=(m=e.tBodies)==null?void 0:m[0];if(!s)return;const T=t.getAttribute("data-type")??"text",l=t.dataset.dir==="asc"?"desc":"asc";t.dataset.dir=l;const u=l==="asc"?1:-1,b=Array.from(s.rows);b.sort((j,A)=>{var y,p;const f=(((y=j.cells[r])==null?void 0:y.textContent)??"").trim(),N=(((p=A.cells[r])==null?void 0:p.textContent)??"").trim();if(T==="number"){const n=Number.parseFloat(f),a=Number.parseFloat(N);return Number.isNaN(n)&&Number.isNaN(a)?0:Number.isNaN(n)?1:Number.isNaN(a)?-1:(n-a)*u}return f.localeCompare(N,"no",{sensitivity:"base"})*u}),s.append(...b)},[]);return R.jsx("table",{className:k.table,onClick:g,ref:o,...C,"data-cy":"Table",children:h})};exports.Table=q;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/table/index.tsx"],"sourcesContent":["import { useCallback, useRef } from 'react';\n\nimport styles from './styles.module.css';\n\nexport type TableProps = React.TableHTMLAttributes<HTMLTableElement> & {\n children?: React.ReactNode;\n};\n\nexport const Table = ({ children, ...props }: TableProps) => {\n const ref = useRef<HTMLTableElement | null>(null);\n\n const onClick = useCallback((e: React.MouseEvent<HTMLTableElement>) => {\n const table = ref.current;\n if (!table) return;\n\n const th = (e.target as HTMLElement | null)?.closest('th');\n if (!th) return;\n\n const thead = table.tHead;\n if (!thead || !thead.contains(th)) return;\n\n const tr = th.parentElement;\n if (!tr) return;\n\n const headers = Array.from(tr.children);\n const col = headers.indexOf(th);\n if (col < 0) return;\n\n const tbody = table.tBodies?.[0];\n if (!tbody) return;\n\n const type = th.getAttribute('data-type') ?? 'text';\n\n const dir = th.dataset.dir === 'asc' ? 'desc' : 'asc';\n th.dataset.dir = dir;\n const mult = dir === 'asc' ? 1 : -1;\n\n const rows = Array.from(tbody.rows);\n\n rows.sort((a, b) => {\n const av = (a.cells[col]?.textContent ?? '').trim();\n const bv = (b.cells[col]?.textContent ?? '').trim();\n\n if (type === 'number') {\n const an = Number.parseFloat(av);\n const bn = Number.parseFloat(bv);\n\n if (Number.isNaN(an) && Number.isNaN(bn)) return 0;\n if (Number.isNaN(an)) return 1;\n if (Number.isNaN(bn)) return -1;\n return (an - bn) * mult;\n }\n\n return av.localeCompare(bv, 'no', { sensitivity: 'base' }) * mult;\n });\n\n tbody.append(...rows);\n }, []);\n\n return (\n <table\n className={styles.table}\n onClick={onClick}\n ref={ref}\n {...props}\n >\n {children}\n </table>\n );\n};\n"],"names":["Table","children","props","ref","useRef","onClick","useCallback","e","table","current","th","target","closest","thead","tHead","contains","tr","parentElement","col","Array","from","indexOf","tbody","tBodies","type","getAttribute","dir","dataset","mult","rows","sort","a","b","av","cells","textContent","trim","bv","an","Number","parseFloat","bn","isNaN","localeCompare","sensitivity","append","jsx","styles"],"mappings":"uKAQaA,EAAQA,CAAC,CAAEC,SAAAA,EAAU,GAAGC,CAAkB,IAAM,CAC3D,MAAMC,EAAMC,EAAAA,OAAgC,IAAI,EAE1CC,EAAUC,cAAaC,GAA0C,SACrE,MAAMC,EAAQL,EAAIM,QAClB,GAAI,CAACD,EAAO,OAEZ,MAAME,GAAMH,EAAAA,EAAEI,SAAFJ,YAAAA,EAAiCK,QAAQ,MACrD,GAAI,CAACF,EAAI,OAET,MAAMG,EAAQL,EAAMM,MACpB,GAAI,CAACD,GAAS,CAACA,EAAME,SAASL,CAAE,EAAG,OAEnC,MAAMM,EAAKN,EAAGO,cACd,GAAI,CAACD,EAAI,OAGT,MAAME,EADUC,MAAMC,KAAKJ,EAAGf,QAAQ,EAClBoB,QAAQX,CAAE,EAC9B,GAAIQ,EAAM,EAAG,OAEb,MAAMI,GAAQd,EAAAA,EAAMe,UAANf,YAAAA,EAAgB,GAC9B,GAAI,CAACc,EAAO,OAEZ,MAAME,EAAOd,EAAGe,aAAa,WAAW,GAAK,OAEvCC,EAAMhB,EAAGiB,QAAQD,MAAQ,MAAQ,OAAS,MAChDhB,EAAGiB,QAAQD,IAAMA,EACjB,MAAME,EAAOF,IAAQ,MAAQ,EAAI,GAE3BG,EAAOV,MAAMC,KAAKE,EAAMO,IAAI,EAElCA,EAAKC,KAAK,CAACC,EAAGC,IAAM,SAClB,MAAMC,KAAMF,EAAAA,EAAEG,MAAMhB,CAAG,IAAXa,YAAAA,EAAcI,cAAe,IAAIC,KAAAA,EACvCC,KAAML,EAAAA,EAAEE,MAAMhB,CAAG,IAAXc,YAAAA,EAAcG,cAAe,IAAIC,KAAAA,EAE7C,GAAIZ,IAAS,SAAU,CACrB,MAAMc,EAAKC,OAAOC,WAAWP,CAAE,EACzBQ,EAAKF,OAAOC,WAAWH,CAAE,EAE/B,OAAIE,OAAOG,MAAMJ,CAAE,GAAKC,OAAOG,MAAMD,CAAE,EAAU,EAC7CF,OAAOG,MAAMJ,CAAE,EAAU,EACzBC,OAAOG,MAAMD,CAAE,EAAU,IACrBH,EAAKG,GAAMb,CACrB,CAEA,OAAOK,EAAGU,cAAcN,EAAI,KAAM,CAAEO,YAAa,MAAA,CAAQ,EAAIhB,CAC/D,CAAC,EAEDN,EAAMuB,OAAO,GAAGhB,CAAI,CACtB,EAAG,CAAA,CAAE,EAEL,OACEiB,EAAAA,IAAC,QAAA,CACC,UAAWC,EAAOvC,MAClB,QAAAH,EACA,IAAAF,EACA,GAAID,EAAM,UAAA,QAETD,SAAAA,CAAAA,CACH,CAEJ"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as k } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as w, useCallback as F } from "react";
|
|
3
|
+
import '../../assets/index4.css';const T = "_table_121xc_1", j = {
|
|
4
|
+
table: T
|
|
5
|
+
}, O = ({
|
|
6
|
+
children: x,
|
|
7
|
+
...h
|
|
8
|
+
}) => {
|
|
9
|
+
const o = w(null), C = F((v) => {
|
|
10
|
+
var m, d;
|
|
11
|
+
const e = o.current;
|
|
12
|
+
if (!e) return;
|
|
13
|
+
const t = (m = v.target) == null ? void 0 : m.closest("th");
|
|
14
|
+
if (!t) return;
|
|
15
|
+
const c = e.tHead;
|
|
16
|
+
if (!c || !c.contains(t)) return;
|
|
17
|
+
const i = t.parentElement;
|
|
18
|
+
if (!i) return;
|
|
19
|
+
const r = Array.from(i.children).indexOf(t);
|
|
20
|
+
if (r < 0) return;
|
|
21
|
+
const s = (d = e.tBodies) == null ? void 0 : d[0];
|
|
22
|
+
if (!s) return;
|
|
23
|
+
const A = t.getAttribute("data-type") ?? "text", l = t.dataset.dir === "asc" ? "desc" : "asc";
|
|
24
|
+
t.dataset.dir = l;
|
|
25
|
+
const u = l === "asc" ? 1 : -1, b = Array.from(s.rows);
|
|
26
|
+
b.sort((_, g) => {
|
|
27
|
+
var p, y;
|
|
28
|
+
const f = (((p = _.cells[r]) == null ? void 0 : p.textContent) ?? "").trim(), N = (((y = g.cells[r]) == null ? void 0 : y.textContent) ?? "").trim();
|
|
29
|
+
if (A === "number") {
|
|
30
|
+
const n = Number.parseFloat(f), a = Number.parseFloat(N);
|
|
31
|
+
return Number.isNaN(n) && Number.isNaN(a) ? 0 : Number.isNaN(n) ? 1 : Number.isNaN(a) ? -1 : (n - a) * u;
|
|
32
|
+
}
|
|
33
|
+
return f.localeCompare(N, "no", {
|
|
34
|
+
sensitivity: "base"
|
|
35
|
+
}) * u;
|
|
36
|
+
}), s.append(...b);
|
|
37
|
+
}, []);
|
|
38
|
+
return /* @__PURE__ */ k("table", { className: j.table, onClick: C, ref: o, ...h, "data-cy": "Table", children: x });
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
O as Table
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/table/index.tsx"],"sourcesContent":["import { useCallback, useRef } from 'react';\n\nimport styles from './styles.module.css';\n\nexport type TableProps = React.TableHTMLAttributes<HTMLTableElement> & {\n children?: React.ReactNode;\n};\n\nexport const Table = ({ children, ...props }: TableProps) => {\n const ref = useRef<HTMLTableElement | null>(null);\n\n const onClick = useCallback((e: React.MouseEvent<HTMLTableElement>) => {\n const table = ref.current;\n if (!table) return;\n\n const th = (e.target as HTMLElement | null)?.closest('th');\n if (!th) return;\n\n const thead = table.tHead;\n if (!thead || !thead.contains(th)) return;\n\n const tr = th.parentElement;\n if (!tr) return;\n\n const headers = Array.from(tr.children);\n const col = headers.indexOf(th);\n if (col < 0) return;\n\n const tbody = table.tBodies?.[0];\n if (!tbody) return;\n\n const type = th.getAttribute('data-type') ?? 'text';\n\n const dir = th.dataset.dir === 'asc' ? 'desc' : 'asc';\n th.dataset.dir = dir;\n const mult = dir === 'asc' ? 1 : -1;\n\n const rows = Array.from(tbody.rows);\n\n rows.sort((a, b) => {\n const av = (a.cells[col]?.textContent ?? '').trim();\n const bv = (b.cells[col]?.textContent ?? '').trim();\n\n if (type === 'number') {\n const an = Number.parseFloat(av);\n const bn = Number.parseFloat(bv);\n\n if (Number.isNaN(an) && Number.isNaN(bn)) return 0;\n if (Number.isNaN(an)) return 1;\n if (Number.isNaN(bn)) return -1;\n return (an - bn) * mult;\n }\n\n return av.localeCompare(bv, 'no', { sensitivity: 'base' }) * mult;\n });\n\n tbody.append(...rows);\n }, []);\n\n return (\n <table\n className={styles.table}\n onClick={onClick}\n ref={ref}\n {...props}\n >\n {children}\n </table>\n );\n};\n"],"names":["Table","children","props","ref","useRef","onClick","useCallback","e","table","current","th","target","closest","thead","tHead","contains","tr","parentElement","col","Array","from","indexOf","tbody","tBodies","type","getAttribute","dir","dataset","mult","rows","sort","a","b","av","cells","textContent","trim","bv","an","Number","parseFloat","bn","isNaN","localeCompare","sensitivity","append","jsx","styles"],"mappings":";;;;GAQaA,IAAQA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAU,GAAGC;AAAkB,MAAM;AAC3D,QAAMC,IAAMC,EAAgC,IAAI,GAE1CC,IAAUC,EAAY,CAACC,MAA0C;;AACrE,UAAMC,IAAQL,EAAIM;AAClB,QAAI,CAACD,EAAO;AAEZ,UAAME,KAAMH,IAAAA,EAAEI,WAAFJ,gBAAAA,EAAiCK,QAAQ;AACrD,QAAI,CAACF,EAAI;AAET,UAAMG,IAAQL,EAAMM;AACpB,QAAI,CAACD,KAAS,CAACA,EAAME,SAASL,CAAE,EAAG;AAEnC,UAAMM,IAAKN,EAAGO;AACd,QAAI,CAACD,EAAI;AAGT,UAAME,IADUC,MAAMC,KAAKJ,EAAGf,QAAQ,EAClBoB,QAAQX,CAAE;AAC9B,QAAIQ,IAAM,EAAG;AAEb,UAAMI,KAAQd,IAAAA,EAAMe,YAANf,gBAAAA,EAAgB;AAC9B,QAAI,CAACc,EAAO;AAEZ,UAAME,IAAOd,EAAGe,aAAa,WAAW,KAAK,QAEvCC,IAAMhB,EAAGiB,QAAQD,QAAQ,QAAQ,SAAS;AAChDhB,IAAAA,EAAGiB,QAAQD,MAAMA;AACjB,UAAME,IAAOF,MAAQ,QAAQ,IAAI,IAE3BG,IAAOV,MAAMC,KAAKE,EAAMO,IAAI;AAElCA,IAAAA,EAAKC,KAAK,CAACC,GAAGC,MAAM;;AAClB,YAAMC,OAAMF,IAAAA,EAAEG,MAAMhB,CAAG,MAAXa,gBAAAA,EAAcI,gBAAe,IAAIC,KAAAA,GACvCC,OAAML,IAAAA,EAAEE,MAAMhB,CAAG,MAAXc,gBAAAA,EAAcG,gBAAe,IAAIC,KAAAA;AAE7C,UAAIZ,MAAS,UAAU;AACrB,cAAMc,IAAKC,OAAOC,WAAWP,CAAE,GACzBQ,IAAKF,OAAOC,WAAWH,CAAE;AAE/B,eAAIE,OAAOG,MAAMJ,CAAE,KAAKC,OAAOG,MAAMD,CAAE,IAAU,IAC7CF,OAAOG,MAAMJ,CAAE,IAAU,IACzBC,OAAOG,MAAMD,CAAE,IAAU,MACrBH,IAAKG,KAAMb;AAAAA,MACrB;AAEA,aAAOK,EAAGU,cAAcN,GAAI,MAAM;AAAA,QAAEO,aAAa;AAAA,MAAA,CAAQ,IAAIhB;AAAAA,IAC/D,CAAC,GAEDN,EAAMuB,OAAO,GAAGhB,CAAI;AAAA,EACtB,GAAG,CAAA,CAAE;AAEL,SACE,gBAAAiB,EAAC,SAAA,EACC,WAAWC,EAAOvC,OAClB,SAAAH,GACA,KAAAF,GACA,GAAID,GAAM,WAAA,SAETD,UAAAA,EAAAA,CACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index3.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index3.css');const e=require("react/jsx-runtime"),s=require("../../classix-5H4IWnMA.cjs"),d=require("../../utils-D_TJ8wDc.cjs"),a=require("../../styles.module-BBfw-M3O.cjs"),y="_label_33pzt_1",m="_textarea_33pzt_5",r={label:y,textarea:m},p=({label:t,maxRows:l=12,minRows:n=3,required:c,value:o,...u})=>{const{touched:i,onBlur:x}=d.useTouched(o==="");return e.jsxs("label",{"data-cy":"Textarea",children:[t&&e.jsx("span",{className:s.t(r.label,c&&a.inputStyles.required),children:t}),e.jsx("textarea",{className:s.t(a.inputStyles.input,r.textarea,i&&"touched"),onBlur:x,...u,style:{"--min-rows":n,"--max-rows":l}})]})};exports.Textarea=p;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & {\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & {\n label?: string;\n maxRows?: number;\n minRows?: number;\n};\n\nexport const Textarea = ({\n label,\n maxRows = 12,\n minRows = 3,\n required,\n value,\n ...props\n}: TextareaProps) => {\n const { touched, onBlur } = useTouched(value === '');\n\n return (\n <label>\n {label && <span className={cx(styles.label, required && inputStyles.required)}>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched && 'touched')}\n onBlur={onBlur}\n {...props}\n style={\n {\n '--min-rows': minRows,\n '--max-rows': maxRows,\n } as React.CSSProperties\n }\n ></textarea>\n </label>\n );\n};\n"],"names":["Textarea","label","maxRows","minRows","required","value","props","touched","onBlur","useTouched","jsxs","jsx","cx","styles","inputStyles","input","textarea"],"mappings":"iTAaaA,EAAWA,CAAC,CACvBC,MAAAA,EACAC,QAAAA,EAAU,GACVC,QAAAA,EAAU,EACVC,SAAAA,EACAC,MAAAA,EACA,GAAGC,CACU,IAAM,CACnB,KAAM,CAAEC,QAAAA,EAASC,OAAAA,CAAAA,EAAWC,EAAAA,WAAWJ,IAAU,EAAE,EAEnD,OACEK,EAAAA,KAAC,QAAA,CAAK,UAAA,WACHT,SAAAA,CAAAA,GAASU,EAAAA,IAAC,OAAA,CAAK,UAAWC,EAAAA,EAAGC,EAAOZ,MAAOG,GAAYU,EAAAA,YAAYV,QAAQ,EAAIH,SAAAA,CAAAA,CAAM,EACtFU,EAAAA,IAAC,WAAA,CACC,UAAWC,EAAAA,EAAGE,EAAAA,YAAYC,MAAOF,EAAOG,SAAUT,GAAW,SAAS,EACtE,OAAAC,KACIF,EACJ,MACE,CACE,aAAcH,EACd,aAAcD,CAAAA,CAChB,CAEH,CAAA,EACH,CAEJ"}
|
|
@@ -1,24 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { t as a } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { u } from "../../utils-DXIJVVzz.js";
|
|
4
|
-
import { i as
|
|
5
|
-
import '../../assets/index3.css';const
|
|
6
|
-
label:
|
|
7
|
-
textarea:
|
|
8
|
-
},
|
|
4
|
+
import { i as r } from "../../styles.module-BUHdj3im.js";
|
|
5
|
+
import '../../assets/index3.css';const d = "_label_33pzt_1", _ = "_textarea_33pzt_5", s = {
|
|
6
|
+
label: d,
|
|
7
|
+
textarea: _
|
|
8
|
+
}, T = ({
|
|
9
9
|
label: t,
|
|
10
|
-
|
|
10
|
+
maxRows: o = 12,
|
|
11
|
+
minRows: l = 3,
|
|
12
|
+
required: c,
|
|
13
|
+
value: n,
|
|
14
|
+
...m
|
|
11
15
|
}) => {
|
|
12
16
|
const {
|
|
13
|
-
touched:
|
|
14
|
-
onBlur:
|
|
15
|
-
} = u(
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
t && /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
17
|
+
touched: i,
|
|
18
|
+
onBlur: x
|
|
19
|
+
} = u(n === "");
|
|
20
|
+
return /* @__PURE__ */ p("label", { "data-cy": "Textarea", children: [
|
|
21
|
+
t && /* @__PURE__ */ e("span", { className: a(s.label, c && r.required), children: t }),
|
|
22
|
+
/* @__PURE__ */ e("textarea", { className: a(r.input, s.textarea, i && "touched"), onBlur: x, ...m, style: {
|
|
23
|
+
"--min-rows": l,
|
|
24
|
+
"--max-rows": o
|
|
25
|
+
} })
|
|
19
26
|
] });
|
|
20
27
|
};
|
|
21
28
|
export {
|
|
22
|
-
|
|
29
|
+
T as Textarea
|
|
23
30
|
};
|
|
24
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & {\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & {\n label?: string;\n maxRows?: number;\n minRows?: number;\n};\n\nexport const Textarea = ({\n label,\n maxRows = 12,\n minRows = 3,\n required,\n value,\n ...props\n}: TextareaProps) => {\n const { touched, onBlur } = useTouched(value === '');\n\n return (\n <label>\n {label && <span className={cx(styles.label, required && inputStyles.required)}>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched && 'touched')}\n onBlur={onBlur}\n {...props}\n style={\n {\n '--min-rows': minRows,\n '--max-rows': maxRows,\n } as React.CSSProperties\n }\n ></textarea>\n </label>\n );\n};\n"],"names":["Textarea","label","maxRows","minRows","required","value","props","touched","onBlur","useTouched","jsxs","jsx","cx","styles","inputStyles","input","textarea"],"mappings":";;;;;;;GAaaA,IAAWA,CAAC;AAAA,EACvBC,OAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACVC,SAAAA,IAAU;AAAA,EACVC,UAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACA,GAAGC;AACU,MAAM;AACnB,QAAM;AAAA,IAAEC,SAAAA;AAAAA,IAASC,QAAAA;AAAAA,EAAAA,IAAWC,EAAWJ,MAAU,EAAE;AAEnD,SACE,gBAAAK,EAAC,SAAA,EAAK,WAAA,YACHT,UAAAA;AAAAA,IAAAA,KAAS,gBAAAU,EAAC,QAAA,EAAK,WAAWC,EAAGC,EAAOZ,OAAOG,KAAYU,EAAYV,QAAQ,GAAIH,UAAAA,EAAAA,CAAM;AAAA,IACtF,gBAAAU,EAAC,YAAA,EACC,WAAWC,EAAGE,EAAYC,OAAOF,EAAOG,UAAUT,KAAW,SAAS,GACtE,QAAAC,MACIF,GACJ,OACE;AAAA,MACE,cAAcH;AAAAA,MACd,cAAcD;AAAAA,IAAAA,EAChB,CAEH;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index21.css');const a=require("react/jsx-runtime"),f=require("../../classix-5H4IWnMA.cjs"),n=require("react"),j=require("../icon/index.cjs"),h="_toast_h2jok_1",l="_active_h2jok_18",d="_error_h2jok_24",m="_info_h2jok_28",v="_success_h2jok_33",c={toast:h,active:l,error:d,info:m,success:v},T=({label:i,type:t="success",onClick:u,onExitComplete:e,open:r=!0})=>{const[_,o]=n.useState(!1);return n.useEffect(()=>{if(!r)return o(!1);const s=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(s)},[r]),a.jsxs("div",{"aria-live":t==="error"?"assertive":"polite",className:f.t(c.toast,c[t],_&&c.active),onClick:u,onTransitionEnd:s=>{r||s.propertyName!=="opacity"||s.currentTarget!==s.target||e==null||e()},"data-cy":"Toast",children:[a.jsx(j.Icon,{name:t}),i]})};exports.Toast=T;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as _, jsx as u } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as f } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { useState as m, useEffect as h } from "react";
|
|
4
4
|
import { Icon as j } from "../icon/index.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index21.css';const k = "_toast_h2jok_1", v = "_active_h2jok_18", d = "_error_h2jok_24", l = "_info_h2jok_28", T = "_success_h2jok_33", a = {
|
|
6
6
|
toast: k,
|
|
7
7
|
active: v,
|
|
8
8
|
error: d,
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const e=require("./components/_avatar/index.cjs"),n=require("./components/_card/index.cjs"),o=require("./components/_collapsible/index.cjs"),t=require("./components/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const e=require("./components/_avatar/index.cjs"),n=require("./components/_card/index.cjs"),o=require("./components/_collapsible/index.cjs"),t=require("./components/_croppable/index.cjs"),r=require("./components/_dropzone/index.cjs"),i=require("./components/_editor/index.cjs"),s=require("./components/_messages/index.cjs"),c=require("./components/_portal/index.cjs"),_=require("./components/_toasts/index.cjs"),a=require("./components/_widget/index.cjs"),d=require("./components/accordion/index.cjs"),p=require("./components/app-link/index.cjs"),u=require("./components/aside/index.cjs"),m=require("./components/badge/index.cjs"),x=require("./components/banner/index.cjs"),l=require("./components/branding/index.cjs"),q=require("./components/button/index.cjs"),g=require("./components/checkbox/index.cjs"),b=require("./components/dialog/index.cjs"),T=require("./components/figure/index.cjs"),k=require("./components/file/index.cjs"),L=require("./components/form/index.cjs"),A=require("./components/group/index.cjs"),B=require("./components/header/index.cjs"),C=require("./components/icon/index.cjs"),v=require("./components/image/index.cjs"),F=require("./components/input/index.cjs"),I=require("./components/layout/index.cjs"),S=require("./components/link/index.cjs"),y=require("./components/list/index.cjs"),M=require("./components/message/index.cjs"),f=require("./components/nav/index.cjs"),h=require("./components/select/index.cjs"),D=require("./components/sortable/index.cjs"),z=require("./components/table/index.cjs"),P=require("./components/textarea/index.cjs"),E=require("./components/toast/index.cjs"),G=require("./components/toggle/index.cjs");exports.Avatar=e.Avatar;exports.Card=n.Card;exports.Collapsible=o.Collapsible;exports.Croppable=t.Croppable;exports.Dropzone=r.Dropzone;exports.Editor=i.Editor;exports.Messages=s.Messages;exports.Portal=c.Portal;exports.Toasts=_.Toasts;exports.Widget=a.Widget;exports.Accordion=d.Accordion;exports.AppLink=p.AppLink;exports.Aside=u.Aside;exports.Badge=m.Badge;exports.Banner=x.Banner;exports.Branding=l.Branding;exports.Button=q.Button;exports.Checkbox=g.Checkbox;exports.Dialog=b.Dialog;exports.Figure=T.Figure;exports.File=k.File;exports.Form=L.Form;exports.Group=A.Group;exports.Header=B.Header;exports.Icon=C.Icon;exports.Image=v.Image;exports.Input=F.Input;exports.Layout=I.Layout;exports.Link=S.Link;exports.List=y.List;exports.Message=M.Message;exports.Nav=f.Nav;exports.Select=h.Select;exports.Sortable=D.Sortable;exports.Table=z.Table;exports.Textarea=P.Textarea;exports.Toast=E.Toast;exports.Toggle=G.Toggle;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,13 @@ declare type AvatarProps = {
|
|
|
42
42
|
link?: string;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
export declare const Badge: ({ children, variant }: BadgeProps) => JSX.Element;
|
|
46
|
+
|
|
47
|
+
declare type BadgeProps = {
|
|
48
|
+
children?: React.ReactNode;
|
|
49
|
+
variant?: keyof typeof variants_2;
|
|
50
|
+
};
|
|
51
|
+
|
|
45
52
|
export declare const Banner: ({ button, message, onClick, onDismiss, visible }: BannerProps) => JSX.Element;
|
|
46
53
|
|
|
47
54
|
declare type BannerProps = {
|
|
@@ -57,7 +64,7 @@ export declare const Branding: ({ name, size, variant }: BrandingProps) => JSX.E
|
|
|
57
64
|
declare type BrandingProps = {
|
|
58
65
|
name: keyof typeof brandingSVG;
|
|
59
66
|
size?: number | string;
|
|
60
|
-
variant?: keyof typeof
|
|
67
|
+
variant?: keyof typeof variants_3;
|
|
61
68
|
};
|
|
62
69
|
|
|
63
70
|
declare const brandingSVG: {
|
|
@@ -71,7 +78,7 @@ declare type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
|
71
78
|
className?: string;
|
|
72
79
|
disabled?: boolean;
|
|
73
80
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
74
|
-
variant?: keyof typeof
|
|
81
|
+
variant?: keyof typeof variants_4;
|
|
75
82
|
};
|
|
76
83
|
|
|
77
84
|
export declare const Card: ({ children, draft, image, onClick, scheduled }: CardProps) => JSX.Element;
|
|
@@ -102,6 +109,26 @@ declare type CollapsibleProps = {
|
|
|
102
109
|
summary: default_2.ReactNode;
|
|
103
110
|
};
|
|
104
111
|
|
|
112
|
+
export declare const Croppable: ({ children, fill, height, onCroppableChange, onFileChange, onTransformChange, transform, }: CroppableProps) => JSX.Element;
|
|
113
|
+
|
|
114
|
+
declare type CroppableProps = {
|
|
115
|
+
children?: default_2.ReactNode;
|
|
116
|
+
fill?: 'width' | 'height' | 'none';
|
|
117
|
+
height?: number;
|
|
118
|
+
onCroppableChange?: (rect: DOMRect) => void;
|
|
119
|
+
onFileChange?: (file: File | null) => void;
|
|
120
|
+
onTransformChange?: (transform: CroppableTransform) => void;
|
|
121
|
+
transform?: CroppableTransform;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
declare type CroppableTransform = {
|
|
125
|
+
offset: {
|
|
126
|
+
x: number;
|
|
127
|
+
y: number;
|
|
128
|
+
};
|
|
129
|
+
zoom: number;
|
|
130
|
+
};
|
|
131
|
+
|
|
105
132
|
export declare const Dialog: ({ children, setOpen, ...props }: DialogProps) => JSX.Element;
|
|
106
133
|
|
|
107
134
|
declare type DialogProps = default_2.DialogHTMLAttributes<HTMLDialogElement> & {
|
|
@@ -109,13 +136,14 @@ declare type DialogProps = default_2.DialogHTMLAttributes<HTMLDialogElement> & {
|
|
|
109
136
|
setOpen?: default_2.Dispatch<default_2.SetStateAction<boolean>>;
|
|
110
137
|
};
|
|
111
138
|
|
|
112
|
-
export declare const Dropzone: ({ accepts, label, multiple, onChange, ...props }: DropzoneProps) => JSX.Element;
|
|
139
|
+
export declare const Dropzone: ({ accepts, label, multiple, onChange, variant, ...props }: DropzoneProps) => JSX.Element;
|
|
113
140
|
|
|
114
141
|
declare type DropzoneProps = {
|
|
115
142
|
accepts?: string;
|
|
116
143
|
label: string;
|
|
117
144
|
multiple?: boolean;
|
|
118
145
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
146
|
+
variant?: 'default' | 'minimal';
|
|
119
147
|
};
|
|
120
148
|
|
|
121
149
|
export declare const Editor: ({ autofocus, autolink, content, inline, onChange, }: EditorProps) => JSX.Element;
|
|
@@ -136,14 +164,14 @@ declare type FigureProps = {
|
|
|
136
164
|
offset?: 'left' | 'right';
|
|
137
165
|
};
|
|
138
166
|
|
|
139
|
-
declare const File_2: ({ name, onClick,
|
|
167
|
+
declare const File_2: ({ name, onClick, onDelete, url }: FileProps) => JSX.Element;
|
|
140
168
|
export { File_2 as File }
|
|
141
169
|
|
|
142
170
|
declare type FileProps = {
|
|
143
171
|
name: string;
|
|
144
172
|
onClick?: () => void;
|
|
173
|
+
onDelete?: () => void;
|
|
145
174
|
url?: string;
|
|
146
|
-
variant?: 'primary' | 'danger';
|
|
147
175
|
};
|
|
148
176
|
|
|
149
177
|
export declare const Form: ({ animation, children, inline, ...props }: FormProps) => JSX.Element;
|
|
@@ -166,7 +194,7 @@ export declare const Header: ({ children, variant }: HeaderProps) => JSX.Element
|
|
|
166
194
|
|
|
167
195
|
declare type HeaderProps = {
|
|
168
196
|
children: React.ReactNode;
|
|
169
|
-
variant?: keyof typeof
|
|
197
|
+
variant?: keyof typeof variants_5;
|
|
170
198
|
};
|
|
171
199
|
|
|
172
200
|
export declare const Icon: ({ gap, name, size, variant }: IconProps) => JSX.Element;
|
|
@@ -177,11 +205,13 @@ declare const iconPaths: {
|
|
|
177
205
|
bold: string;
|
|
178
206
|
buildings: string;
|
|
179
207
|
card: string;
|
|
208
|
+
check: string;
|
|
180
209
|
chevron: string;
|
|
181
210
|
clipboard: string;
|
|
182
211
|
document: string;
|
|
183
212
|
error: string;
|
|
184
213
|
gear: string;
|
|
214
|
+
goTo: string;
|
|
185
215
|
home: string;
|
|
186
216
|
image: string;
|
|
187
217
|
info: string;
|
|
@@ -193,10 +223,12 @@ declare const iconPaths: {
|
|
|
193
223
|
pencil: string;
|
|
194
224
|
people: string;
|
|
195
225
|
phone: string;
|
|
226
|
+
plane: string;
|
|
196
227
|
plus: string;
|
|
197
228
|
search: string;
|
|
198
229
|
success: string;
|
|
199
230
|
trash: string;
|
|
231
|
+
updown: string;
|
|
200
232
|
upload: string;
|
|
201
233
|
user: string;
|
|
202
234
|
x: string;
|
|
@@ -206,7 +238,7 @@ declare type IconProps = {
|
|
|
206
238
|
gap?: 'left' | 'none' | 'right';
|
|
207
239
|
name: IconName;
|
|
208
240
|
size?: keyof typeof sizes;
|
|
209
|
-
variant?: keyof typeof
|
|
241
|
+
variant?: keyof typeof variants_6;
|
|
210
242
|
loading?: boolean;
|
|
211
243
|
};
|
|
212
244
|
|
|
@@ -230,7 +262,7 @@ export declare const Layout: ({ children, isLoading, feature, ...props }: Layout
|
|
|
230
262
|
|
|
231
263
|
declare type LayoutProps = {
|
|
232
264
|
children: React.ReactNode;
|
|
233
|
-
feature: 'home';
|
|
265
|
+
feature: 'dashboard' | 'home';
|
|
234
266
|
isLoading?: boolean;
|
|
235
267
|
};
|
|
236
268
|
|
|
@@ -240,25 +272,24 @@ declare type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
|
240
272
|
children: React.ReactNode;
|
|
241
273
|
className?: string;
|
|
242
274
|
to?: string;
|
|
243
|
-
variant?: '
|
|
275
|
+
variant?: 'danger' | 'minimal' | 'primary';
|
|
244
276
|
};
|
|
245
277
|
|
|
246
|
-
export declare
|
|
278
|
+
export declare function List({ children, className, columns, style, ...props }: ListProps): JSX.Element;
|
|
247
279
|
|
|
248
|
-
declare type ListProps = {
|
|
249
|
-
|
|
250
|
-
className?: string;
|
|
251
|
-
twoColumns?: boolean;
|
|
280
|
+
declare type ListProps = default_2.ComponentPropsWithoutRef<'ul'> & {
|
|
281
|
+
columns?: number;
|
|
252
282
|
};
|
|
253
283
|
|
|
254
|
-
export declare const Message: ({ content, id, type }: MessageOptions) => JSX.Element;
|
|
284
|
+
export declare const Message: ({ content, id, preview, type }: MessageOptions) => JSX.Element;
|
|
255
285
|
|
|
256
286
|
declare type MessageItem = MessageOptions;
|
|
257
287
|
|
|
258
288
|
export declare type MessageOptions = {
|
|
259
289
|
content: React.ReactNode;
|
|
260
290
|
id: string;
|
|
261
|
-
|
|
291
|
+
preview?: boolean;
|
|
292
|
+
type?: 'default' | 'minimal' | 'system' | 'user';
|
|
262
293
|
};
|
|
263
294
|
|
|
264
295
|
export declare const Messages: ({ messages }: MessagesProps) => JSX.Element | null;
|
|
@@ -273,14 +304,15 @@ declare type NavProps = {
|
|
|
273
304
|
animation?: AnimationName;
|
|
274
305
|
children?: React.ReactNode;
|
|
275
306
|
horizontal?: boolean;
|
|
276
|
-
variant?: keyof typeof
|
|
307
|
+
variant?: keyof typeof variants_7;
|
|
277
308
|
};
|
|
278
309
|
|
|
279
|
-
export declare const Portal: ({ children, portals }: PortalProps) => JSX.Element;
|
|
310
|
+
export declare const Portal: ({ children, portals, open }: PortalProps) => JSX.Element;
|
|
280
311
|
|
|
281
312
|
declare type PortalProps = {
|
|
282
313
|
children?: React.ReactNode;
|
|
283
314
|
portals?: React.ReactNode;
|
|
315
|
+
open?: boolean;
|
|
284
316
|
};
|
|
285
317
|
|
|
286
318
|
export declare const Select: ({ children, label, placeholder, ...props }: SelectProps) => JSX.Element;
|
|
@@ -313,12 +345,18 @@ declare type SortItem = {
|
|
|
313
345
|
weight: number;
|
|
314
346
|
};
|
|
315
347
|
|
|
316
|
-
export declare const
|
|
348
|
+
export declare const Table: ({ children, ...props }: TableProps) => JSX.Element;
|
|
349
|
+
|
|
350
|
+
declare type TableProps = React.TableHTMLAttributes<HTMLTableElement> & {
|
|
351
|
+
children?: React.ReactNode;
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
export declare const Textarea: ({ label, maxRows, minRows, required, value, ...props }: TextareaProps) => JSX.Element;
|
|
317
355
|
|
|
318
356
|
declare type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & {
|
|
319
|
-
disabled?: boolean;
|
|
320
357
|
label?: string;
|
|
321
|
-
|
|
358
|
+
maxRows?: number;
|
|
359
|
+
minRows?: number;
|
|
322
360
|
};
|
|
323
361
|
|
|
324
362
|
export declare const Toast: ({ label, type, onClick, onExitComplete, open, }: ToastProps) => JSX.Element;
|
|
@@ -364,32 +402,44 @@ declare const variants: {
|
|
|
364
402
|
|
|
365
403
|
declare const variants_2: {
|
|
366
404
|
default: string;
|
|
367
|
-
|
|
405
|
+
primary: string;
|
|
406
|
+
info: string;
|
|
368
407
|
};
|
|
369
408
|
|
|
370
409
|
declare const variants_3: {
|
|
410
|
+
default: string;
|
|
411
|
+
white: string;
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
declare const variants_4: {
|
|
371
415
|
danger: string;
|
|
372
416
|
default: string;
|
|
373
417
|
minimal: string;
|
|
374
418
|
primary: string;
|
|
375
419
|
};
|
|
376
420
|
|
|
377
|
-
declare const
|
|
421
|
+
declare const variants_5: {
|
|
378
422
|
default: string;
|
|
379
423
|
jumbo: string;
|
|
380
424
|
};
|
|
381
425
|
|
|
382
|
-
declare const
|
|
426
|
+
declare const variants_6: {
|
|
383
427
|
danger: string;
|
|
384
428
|
default: string;
|
|
385
429
|
primary: string;
|
|
386
430
|
white: string;
|
|
387
431
|
};
|
|
388
432
|
|
|
389
|
-
declare const
|
|
433
|
+
declare const variants_7: {
|
|
390
434
|
default: string;
|
|
391
435
|
pills: string;
|
|
392
436
|
tabs: string;
|
|
393
437
|
};
|
|
394
438
|
|
|
439
|
+
export declare const Widget: ({ children }: WidgetProps) => JSX.Element;
|
|
440
|
+
|
|
441
|
+
declare type WidgetProps = {
|
|
442
|
+
children: React.ReactNode;
|
|
443
|
+
};
|
|
444
|
+
|
|
395
445
|
export { }
|