@solibo/solibo-ui 0.3.21 → 0.3.22
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 +1 -1
- package/dist/assets/index11.css +1 -0
- 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 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.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 +0 -1
- package/dist/assets/index9.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 +1 -1
- package/dist/components/_collapsible/index.cjs +1 -1
- package/dist/components/_collapsible/index.js +1 -1
- package/dist/components/_croppable/index.cjs +1 -1
- package/dist/components/_croppable/index.js +1 -1
- package/dist/components/_dropzone/index.cjs +1 -1
- package/dist/components/_dropzone/index.cjs.map +1 -1
- package/dist/components/_dropzone/index.js +28 -28
- package/dist/components/_dropzone/index.js.map +1 -1
- package/dist/components/_editor/index.cjs +1 -1
- package/dist/components/_editor/index.js +1 -1
- package/dist/components/_messages/index.cjs +1 -1
- package/dist/components/_messages/index.cjs.map +1 -1
- package/dist/components/_messages/index.js +34 -8
- package/dist/components/_messages/index.js.map +1 -1
- package/dist/components/_portal/index.cjs +1 -1
- package/dist/components/_portal/index.js +1 -1
- package/dist/components/_sortable/index.cjs +2 -0
- package/dist/components/_sortable/index.cjs.map +1 -0
- package/dist/components/_sortable/index.js +40 -0
- package/dist/components/_sortable/index.js.map +1 -0
- package/dist/components/_toasts/index.cjs +1 -1
- package/dist/components/_toasts/index.js +1 -1
- package/dist/components/_widget/index.cjs +1 -1
- package/dist/components/_widget/index.js +1 -1
- 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 +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +1 -1
- 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 +2 -2
- package/dist/components/controls/index.cjs +1 -1
- package/dist/components/controls/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.js +1 -1
- package/dist/components/file/index.cjs +1 -1
- package/dist/components/file/index.js +1 -1
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/graph/index.cjs +1 -1
- package/dist/components/graph/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 +1 -1
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.cjs.map +1 -1
- package/dist/components/icon/index.js +27 -26
- 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/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +4 -4
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +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 +19 -16
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +7 -7
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/table/index.cjs +1 -1
- package/dist/components/table/index.js +1 -1
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.cjs.map +1 -1
- package/dist/components/textarea/index.js +14 -14
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/{icons-BKi-xxXA.cjs → icons-R4Ufm_3V.cjs} +2 -2
- package/dist/{icons-BKi-xxXA.cjs.map → icons-R4Ufm_3V.cjs.map} +1 -1
- package/dist/{icons-BSp58j2P.js → icons-VE52iqR8.js} +14 -9
- package/dist/{icons-BSp58j2P.js.map → icons-VE52iqR8.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -6
- package/dist/index.js +58 -58
- package/package.json +1 -1
- package/dist/components/sortable/index.cjs +0 -2
- package/dist/components/sortable/index.cjs.map +0 -1
- package/dist/components/sortable/index.js +0 -44
- package/dist/components/sortable/index.js.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsxs as x, jsx as
|
|
2
|
-
import { t as
|
|
1
|
+
import { jsxs as x, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { t as r } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { u } from "../../utils-DXIJVVzz.js";
|
|
4
|
-
import { i as
|
|
5
|
-
import '../../assets/
|
|
4
|
+
import { i as o } from "../../styles.module-y5zmJBcz.js";
|
|
5
|
+
import '../../assets/index40.css';const d = "_label_33pzt_1", _ = "_textarea_33pzt_5", s = {
|
|
6
6
|
label: d,
|
|
7
7
|
textarea: _
|
|
8
8
|
}, j = ({
|
|
9
9
|
label: t,
|
|
10
|
-
maxRows:
|
|
11
|
-
minRows:
|
|
12
|
-
required:
|
|
13
|
-
value:
|
|
10
|
+
maxRows: l = 12,
|
|
11
|
+
minRows: n = 3,
|
|
12
|
+
required: c,
|
|
13
|
+
value: e,
|
|
14
14
|
...m
|
|
15
15
|
}) => {
|
|
16
16
|
const {
|
|
17
17
|
touched: i,
|
|
18
18
|
onBlur: p
|
|
19
|
-
} = u(
|
|
19
|
+
} = u(e === "");
|
|
20
20
|
return /* @__PURE__ */ x("label", { "data-component": "textarea", children: [
|
|
21
|
-
t && /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
"--min-rows":
|
|
24
|
-
"--max-rows":
|
|
25
|
-
} })
|
|
21
|
+
t && /* @__PURE__ */ a("span", { className: r(s.label, c && o.required), children: t }),
|
|
22
|
+
/* @__PURE__ */ a("textarea", { className: r(o.input, s.textarea, i && "touched"), onBlur: p, ...m, style: {
|
|
23
|
+
"--min-rows": n,
|
|
24
|
+
"--max-rows": l
|
|
25
|
+
}, value: e })
|
|
26
26
|
] });
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
@@ -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 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,kBAAA,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,
|
|
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 value={value}\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,kBAAA,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,GAGlB,OAAAG,EAAA,CACD;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
2
|
-
//# sourceMappingURL=icons-
|
|
1
|
+
"use strict";const M={bold:"M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z",buildings:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z",card:"M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z",check:"m4.5 12.75 6 6 9-13.5",chevron:"m19.5 8.25-7.5 7.5-7.5-7.5",clipboard:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75",document:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z",error:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z",gear:"M2.3 11.2C2.3 16.2 6.4 20.3 11.4 20.3C16.4 20.3 20.4 16.2 20.4 11.2M2.3 11.2C2.3 6.2 6.4 2.1 11.4 2.1C16.4 2.1 20.4 6.2 20.4 11.2M2.3 11.2L0.5 11.2M20.4 11.2L22.2 11.2M20.4 11.2L11.4 11.2M1.2 14.9L2.9 14.3M19.9 8.1L21.6 7.5M3 18.2L4.4 17M18.3 5.4L19.7 4.2M5.9 20.6L6.8 19.1M15.9 3.4L16.8 1.8M9.5 21.9L9.8 20.1M12.9 2.3L13.3 0.5M13.3 21.9L12.9 20.1M9.8 2.3L9.5 0.5M16.8 20.6L15.9 19.1M5.9 1.8L11.4 11.2M19.7 18.2L18.3 17M4.4 5.4L3 4.2M21.6 14.9L19.9 14.3M2.9 8.1L1.2 7.5M11.4 11.2L6.8 19.1",goTo:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25",home:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25",image:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z",info:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z",italic:"M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803",link:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244",list:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z",menu:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5",mobile:"M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3",pencil:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z",people:"M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z",phone:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z",plane:{filled:"M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z",outline:"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5"},plus:"M12 4.5v15m7.5-7.5h-15",search:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z",success:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z",trash:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0",updown:"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9",upload:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5",user:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z",x:"M6 18 18 6M6 6l12 12"};function l(a,h){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${h?"currentColor":"none"}' viewBox='0 0 24 24' stroke-width='1.5' stroke='${h?"none":"currentColor"}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${a}' /%3E%3C/svg%3E%0A")`}const o=(a,h=!1)=>{const m=M[a],c=typeof m=="string"?m:h?m.filled:m.outline,v=h&&typeof m=="object"&&!!m.filled;return l(c,v)};exports.iconPaths=M;exports.iconSVG=o;
|
|
2
|
+
//# sourceMappingURL=icons-R4Ufm_3V.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons-
|
|
1
|
+
{"version":3,"file":"icons-R4Ufm_3V.cjs","sources":["../src/components/icon/icons.ts"],"sourcesContent":["export type IconName = keyof typeof iconPaths;\n\nexport const iconPaths = {\n bold: 'M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z',\n buildings:\n 'M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z',\n card: 'M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z',\n check: 'm4.5 12.75 6 6 9-13.5',\n chevron: 'm19.5 8.25-7.5 7.5-7.5-7.5',\n clipboard:\n 'M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75',\n document:\n 'M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z',\n error:\n 'M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z',\n gear: 'M2.3 11.2C2.3 16.2 6.4 20.3 11.4 20.3C16.4 20.3 20.4 16.2 20.4 11.2M2.3 11.2C2.3 6.2 6.4 2.1 11.4 2.1C16.4 2.1 20.4 6.2 20.4 11.2M2.3 11.2L0.5 11.2M20.4 11.2L22.2 11.2M20.4 11.2L11.4 11.2M1.2 14.9L2.9 14.3M19.9 8.1L21.6 7.5M3 18.2L4.4 17M18.3 5.4L19.7 4.2M5.9 20.6L6.8 19.1M15.9 3.4L16.8 1.8M9.5 21.9L9.8 20.1M12.9 2.3L13.3 0.5M13.3 21.9L12.9 20.1M9.8 2.3L9.5 0.5M16.8 20.6L15.9 19.1M5.9 1.8L11.4 11.2M19.7 18.2L18.3 17M4.4 5.4L3 4.2M21.6 14.9L19.9 14.3M2.9 8.1L1.2 7.5M11.4 11.2L6.8 19.1',\n goTo: 'M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25',\n home: 'm2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25',\n image:\n 'm2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z',\n info: 'm11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z',\n italic: 'M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803',\n link: 'M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244',\n list: 'M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z',\n menu: 'M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5',\n mobile:\n 'M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3',\n pencil:\n 'M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z',\n people:\n 'M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z',\n phone:\n 'M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z',\n plane: {\n filled:\n 'M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z',\n outline:\n 'M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5',\n },\n plus: 'M12 4.5v15m7.5-7.5h-15',\n search: 'm21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z',\n success: 'M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z',\n trash:\n 'm14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0',\n updown: 'M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9',\n upload:\n 'M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5',\n user: 'M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z',\n x: 'M6 18 18 6M6 6l12 12',\n};\n\nexport function embedSVG(iconPath: string, fill?: boolean): string {\n return `url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${fill ? 'currentColor' : 'none'}' viewBox='0 0 24 24' stroke-width='1.5' stroke='${fill ? 'none' : 'currentColor'}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${iconPath}' /%3E%3C/svg%3E%0A\")`;\n}\n\nexport const iconSVG = (name: IconName, fill = false) => {\n const icon = iconPaths[name];\n const path = typeof icon === 'string' ? icon : fill ? icon.filled : icon.outline;\n const hasFilled = fill && typeof icon === 'object' && !!icon.filled;\n\n return embedSVG(path, hasFilled);\n};\n"],"names":["iconPaths","bold","buildings","card","check","chevron","clipboard","document","error","gear","goTo","home","image","info","italic","link","list","menu","mobile","pencil","people","phone","plane","filled","outline","plus","search","success","trash","updown","upload","user","x","embedSVG","iconPath","fill","iconSVG","name","icon","path","hasFilled"],"mappings":"aAEO,MAAMA,EAAY,CACvBC,KAAM,uUACNC,UACE,6SACFC,KAAM,+TACNC,MAAO,wBACPC,QAAS,6BACTC,UACE,iiBACFC,SACE,oQACFC,MACE,mLACFC,KAAM,2eACNC,KAAM,uIACNC,KAAM,6OACNC,MACE,0TACFC,KAAM,2JACNC,OAAQ,8EACRC,KAAM,4KACNC,KAAM,wRACNC,KAAM,+CACNC,OACE,uKACFC,OACE,2PACFC,OACE,4XACFC,MACE,oWACFC,MAAO,CACLC,OACE,uMACFC,QACE,mGAAA,EAEJC,KAAM,yBACNC,OAAQ,gFACRC,QAAS,iEACTC,MACE,gaACFC,OAAQ,oDACRC,OACE,6GACFC,KAAM,0JACNC,EAAG,sBACL,EAEO,SAASC,EAASC,EAAkBC,EAAwB,CACjE,MAAO,2EAA2EA,EAAO,eAAiB,MAAM,oDAAoDA,EAAO,OAAS,cAAc,iEAAiED,CAAQ,uBAC7Q,CAEO,MAAME,EAAUA,CAACC,EAAgBF,EAAO,KAAU,CACvD,MAAMG,EAAOtC,EAAUqC,CAAI,EACrBE,EAAO,OAAOD,GAAS,SAAWA,EAAOH,EAAOG,EAAKf,OAASe,EAAKd,QACnEgB,EAAYL,GAAQ,OAAOG,GAAS,UAAY,CAAC,CAACA,EAAKf,OAE7D,OAAOU,EAASM,EAAMC,CAAS,CACjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const v = {
|
|
2
2
|
bold: "M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z",
|
|
3
3
|
buildings: "M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z",
|
|
4
4
|
card: "M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z",
|
|
@@ -20,7 +20,10 @@ const h = {
|
|
|
20
20
|
pencil: "M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z",
|
|
21
21
|
people: "M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z",
|
|
22
22
|
phone: "M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z",
|
|
23
|
-
plane:
|
|
23
|
+
plane: {
|
|
24
|
+
filled: "M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z",
|
|
25
|
+
outline: "M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5"
|
|
26
|
+
},
|
|
24
27
|
plus: "M12 4.5v15m7.5-7.5h-15",
|
|
25
28
|
search: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z",
|
|
26
29
|
success: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z",
|
|
@@ -30,13 +33,15 @@ const h = {
|
|
|
30
33
|
user: "M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z",
|
|
31
34
|
x: "M6 18 18 6M6 6l12 12"
|
|
32
35
|
};
|
|
33
|
-
function a
|
|
34
|
-
return `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='
|
|
36
|
+
function l(a, h) {
|
|
37
|
+
return `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${h ? "currentColor" : "none"}' viewBox='0 0 24 24' stroke-width='1.5' stroke='${h ? "none" : "currentColor"}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${a}' /%3E%3C/svg%3E%0A")`;
|
|
35
38
|
}
|
|
36
|
-
const
|
|
39
|
+
const e = (a, h = !1) => {
|
|
40
|
+
const m = v[a], M = typeof m == "string" ? m : h ? m.filled : m.outline, c = h && typeof m == "object" && !!m.filled;
|
|
41
|
+
return l(M, c);
|
|
42
|
+
};
|
|
37
43
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
M as i
|
|
44
|
+
v as a,
|
|
45
|
+
e as i
|
|
41
46
|
};
|
|
42
|
-
//# sourceMappingURL=icons-
|
|
47
|
+
//# sourceMappingURL=icons-VE52iqR8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons-
|
|
1
|
+
{"version":3,"file":"icons-VE52iqR8.js","sources":["../src/components/icon/icons.ts"],"sourcesContent":["export type IconName = keyof typeof iconPaths;\n\nexport const iconPaths = {\n bold: 'M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z',\n buildings:\n 'M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z',\n card: 'M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z',\n check: 'm4.5 12.75 6 6 9-13.5',\n chevron: 'm19.5 8.25-7.5 7.5-7.5-7.5',\n clipboard:\n 'M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75',\n document:\n 'M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z',\n error:\n 'M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z',\n gear: 'M2.3 11.2C2.3 16.2 6.4 20.3 11.4 20.3C16.4 20.3 20.4 16.2 20.4 11.2M2.3 11.2C2.3 6.2 6.4 2.1 11.4 2.1C16.4 2.1 20.4 6.2 20.4 11.2M2.3 11.2L0.5 11.2M20.4 11.2L22.2 11.2M20.4 11.2L11.4 11.2M1.2 14.9L2.9 14.3M19.9 8.1L21.6 7.5M3 18.2L4.4 17M18.3 5.4L19.7 4.2M5.9 20.6L6.8 19.1M15.9 3.4L16.8 1.8M9.5 21.9L9.8 20.1M12.9 2.3L13.3 0.5M13.3 21.9L12.9 20.1M9.8 2.3L9.5 0.5M16.8 20.6L15.9 19.1M5.9 1.8L11.4 11.2M19.7 18.2L18.3 17M4.4 5.4L3 4.2M21.6 14.9L19.9 14.3M2.9 8.1L1.2 7.5M11.4 11.2L6.8 19.1',\n goTo: 'M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25',\n home: 'm2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25',\n image:\n 'm2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z',\n info: 'm11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z',\n italic: 'M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803',\n link: 'M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244',\n list: 'M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z',\n menu: 'M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5',\n mobile:\n 'M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3',\n pencil:\n 'M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z',\n people:\n 'M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z',\n phone:\n 'M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z',\n plane: {\n filled:\n 'M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z',\n outline:\n 'M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5',\n },\n plus: 'M12 4.5v15m7.5-7.5h-15',\n search: 'm21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z',\n success: 'M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z',\n trash:\n 'm14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0',\n updown: 'M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9',\n upload:\n 'M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5',\n user: 'M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z',\n x: 'M6 18 18 6M6 6l12 12',\n};\n\nexport function embedSVG(iconPath: string, fill?: boolean): string {\n return `url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${fill ? 'currentColor' : 'none'}' viewBox='0 0 24 24' stroke-width='1.5' stroke='${fill ? 'none' : 'currentColor'}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${iconPath}' /%3E%3C/svg%3E%0A\")`;\n}\n\nexport const iconSVG = (name: IconName, fill = false) => {\n const icon = iconPaths[name];\n const path = typeof icon === 'string' ? icon : fill ? icon.filled : icon.outline;\n const hasFilled = fill && typeof icon === 'object' && !!icon.filled;\n\n return embedSVG(path, hasFilled);\n};\n"],"names":["iconPaths","bold","buildings","card","check","chevron","clipboard","document","error","gear","goTo","home","image","info","italic","link","list","menu","mobile","pencil","people","phone","plane","filled","outline","plus","search","success","trash","updown","upload","user","x","embedSVG","iconPath","fill","iconSVG","name","icon","path","hasFilled"],"mappings":"AAEO,MAAMA,IAAY;AAAA,EACvBC,MAAM;AAAA,EACNC,WACE;AAAA,EACFC,MAAM;AAAA,EACNC,OAAO;AAAA,EACPC,SAAS;AAAA,EACTC,WACE;AAAA,EACFC,UACE;AAAA,EACFC,OACE;AAAA,EACFC,MAAM;AAAA,EACNC,MAAM;AAAA,EACNC,MAAM;AAAA,EACNC,OACE;AAAA,EACFC,MAAM;AAAA,EACNC,QAAQ;AAAA,EACRC,MAAM;AAAA,EACNC,MAAM;AAAA,EACNC,MAAM;AAAA,EACNC,QACE;AAAA,EACFC,QACE;AAAA,EACFC,QACE;AAAA,EACFC,OACE;AAAA,EACFC,OAAO;AAAA,IACLC,QACE;AAAA,IACFC,SACE;AAAA,EAAA;AAAA,EAEJC,MAAM;AAAA,EACNC,QAAQ;AAAA,EACRC,SAAS;AAAA,EACTC,OACE;AAAA,EACFC,QAAQ;AAAA,EACRC,QACE;AAAA,EACFC,MAAM;AAAA,EACNC,GAAG;AACL;AAEO,SAASC,EAASC,GAAkBC,GAAwB;AACjE,SAAO,2EAA2EA,IAAO,iBAAiB,MAAM,oDAAoDA,IAAO,SAAS,cAAc,iEAAiED,CAAQ;AAC7Q;AAEO,MAAME,IAAUA,CAACC,GAAgBF,IAAO,OAAU;AACvD,QAAMG,IAAOtC,EAAUqC,CAAI,GACrBE,IAAO,OAAOD,KAAS,WAAWA,IAAOH,IAAOG,EAAKf,SAASe,EAAKd,SACnEgB,IAAYL,KAAQ,OAAOG,KAAS,YAAY,CAAC,CAACA,EAAKf;AAE7D,SAAOU,EAASM,GAAMC,CAAS;AACjC;"}
|
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/_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/
|
|
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/_sortable/index.cjs"),a=require("./components/_toasts/index.cjs"),d=require("./components/_widget/index.cjs"),p=require("./components/accordion/index.cjs"),u=require("./components/app-link/index.cjs"),m=require("./components/aside/index.cjs"),x=require("./components/badge/index.cjs"),l=require("./components/banner/index.cjs"),q=require("./components/branding/index.cjs"),g=require("./components/button/index.cjs"),b=require("./components/checkbox/index.cjs"),L=require("./components/controls/index.cjs"),T=require("./components/dialog/index.cjs"),C=require("./components/figure/index.cjs"),k=require("./components/file/index.cjs"),A=require("./components/form/index.cjs"),B=require("./components/graph/index.cjs"),h=require("./components/group/index.cjs"),v=require("./components/header/index.cjs"),F=require("./components/icon/index.cjs"),I=require("./components/image/index.cjs"),S=require("./components/input/index.cjs"),y=require("./components/layout/index.cjs"),M=require("./components/link/index.cjs"),f=require("./components/list/index.cjs"),D=require("./components/loading/index.cjs"),G=require("./components/message/index.cjs"),z=require("./components/nav/index.cjs"),P=require("./components/select/index.cjs"),E=require("./components/table/index.cjs"),H=require("./components/textarea/index.cjs"),N=require("./components/toast/index.cjs"),W=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.Sortable=_.Sortable;exports.Toasts=a.Toasts;exports.Widget=d.Widget;exports.Accordion=p.Accordion;exports.AppLink=u.AppLink;exports.Aside=m.Aside;exports.Badge=x.Badge;exports.Banner=l.Banner;exports.Branding=q.Branding;exports.Button=g.Button;exports.Checkbox=b.Checkbox;exports.Controls=L.Controls;exports.Dialog=T.Dialog;exports.Figure=C.Figure;exports.File=k.File;exports.Form=A.Form;exports.Graph=B.Graph;exports.Group=h.Group;exports.Header=v.Header;exports.Icon=F.Icon;exports.Image=I.Image;exports.Input=S.Input;exports.Layout=y.Layout;exports.Link=M.Link;exports.List=f.List;exports.Loading=D.Loading;exports.Message=G.Message;exports.Nav=z.Nav;exports.Select=P.Select;exports.Table=E.Table;exports.Textarea=H.Textarea;exports.Toast=N.Toast;exports.Toggle=W.Toggle;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
1
2
|
import { default as default_2 } from 'react';
|
|
2
3
|
import { DetailedHTMLProps } from 'react';
|
|
3
4
|
import { ForwardRefExoticComponent } from 'react';
|
|
@@ -216,7 +217,7 @@ declare type HeaderProps = {
|
|
|
216
217
|
variant?: keyof typeof variants_5;
|
|
217
218
|
};
|
|
218
219
|
|
|
219
|
-
export declare const Icon: ({ gap, name, size, variant }: IconProps) => JSX.Element;
|
|
220
|
+
export declare const Icon: ({ fill, gap, name, size, variant, }: IconProps) => JSX.Element;
|
|
220
221
|
|
|
221
222
|
declare type IconName = keyof typeof iconPaths;
|
|
222
223
|
|
|
@@ -242,7 +243,10 @@ declare const iconPaths: {
|
|
|
242
243
|
pencil: string;
|
|
243
244
|
people: string;
|
|
244
245
|
phone: string;
|
|
245
|
-
plane:
|
|
246
|
+
plane: {
|
|
247
|
+
filled: string;
|
|
248
|
+
outline: string;
|
|
249
|
+
};
|
|
246
250
|
plus: string;
|
|
247
251
|
search: string;
|
|
248
252
|
success: string;
|
|
@@ -254,11 +258,11 @@ declare const iconPaths: {
|
|
|
254
258
|
};
|
|
255
259
|
|
|
256
260
|
declare type IconProps = {
|
|
261
|
+
fill?: boolean;
|
|
257
262
|
gap?: 'left' | 'none' | 'right';
|
|
258
263
|
name: IconName;
|
|
259
264
|
size?: keyof typeof sizes;
|
|
260
265
|
variant?: keyof typeof variants_6;
|
|
261
|
-
loading?: boolean;
|
|
262
266
|
};
|
|
263
267
|
|
|
264
268
|
declare function Image_2({ fadeDurationMs, showOnError, onLoad, onError, style, ...props }: ImageProps): JSX.Element;
|
|
@@ -294,10 +298,12 @@ declare type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
|
294
298
|
variant?: 'danger' | 'minimal' | 'primary';
|
|
295
299
|
};
|
|
296
300
|
|
|
297
|
-
export declare function List({ children, className, columns, style, ...props }: ListProps): JSX.Element;
|
|
301
|
+
export declare function List({ children, className, columns, horizontal, ordered, style, ...props }: ListProps): JSX.Element;
|
|
298
302
|
|
|
299
303
|
declare type ListProps = React.ComponentPropsWithoutRef<'ul'> & {
|
|
300
304
|
columns?: number;
|
|
305
|
+
horizontal?: boolean;
|
|
306
|
+
ordered?: boolean;
|
|
301
307
|
};
|
|
302
308
|
|
|
303
309
|
/**
|
|
@@ -322,10 +328,16 @@ export declare type MessageOptions = {
|
|
|
322
328
|
type?: 'default' | 'minimal' | 'system' | 'user';
|
|
323
329
|
};
|
|
324
330
|
|
|
325
|
-
export declare const Messages: ({ messages }: MessagesProps) => JSX.Element
|
|
331
|
+
export declare const Messages: ({ handleUpload, message, messages, onChange, onSubmit, placeholder, sending, }: MessagesProps) => JSX.Element;
|
|
326
332
|
|
|
327
333
|
declare type MessagesProps = {
|
|
334
|
+
handleUpload: (files: FileList) => void;
|
|
335
|
+
message: string;
|
|
328
336
|
messages: MessageItem[];
|
|
337
|
+
onSubmit: () => void;
|
|
338
|
+
onChange: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
339
|
+
placeholder?: string;
|
|
340
|
+
sending: boolean;
|
|
329
341
|
};
|
|
330
342
|
|
|
331
343
|
export declare const Nav: ({ animation, children, className, horizontal, variant, ...props }: NavProps) => JSX.Element;
|
|
@@ -363,7 +375,7 @@ declare const sizes: {
|
|
|
363
375
|
/**
|
|
364
376
|
* Children must provide a stable `data-id` for emits `{ id, weight }` and `key` (reconciliation).
|
|
365
377
|
*/
|
|
366
|
-
export declare function Sortable({ children, className, columns, onChangeOrder,
|
|
378
|
+
export declare function Sortable({ children, className, columns, onChangeOrder, ...props }: SortableProps): JSX.Element;
|
|
367
379
|
|
|
368
380
|
declare type SortableProps = default_2.ComponentPropsWithoutRef<'ol'> & {
|
|
369
381
|
columns?: number;
|
package/dist/index.js
CHANGED
|
@@ -6,80 +6,80 @@ import { Dropzone as n } from "./components/_dropzone/index.js";
|
|
|
6
6
|
import { Editor as s } from "./components/_editor/index.js";
|
|
7
7
|
import { Messages as d } from "./components/_messages/index.js";
|
|
8
8
|
import { Portal as c } from "./components/_portal/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
9
|
+
import { Sortable as C } from "./components/_sortable/index.js";
|
|
10
|
+
import { Toasts as T } from "./components/_toasts/index.js";
|
|
11
|
+
import { Widget as B } from "./components/_widget/index.js";
|
|
12
|
+
import { Accordion as F } from "./components/accordion/index.js";
|
|
13
|
+
import { AppLink as h } from "./components/app-link/index.js";
|
|
14
|
+
import { Aside as D } from "./components/aside/index.js";
|
|
15
|
+
import { Badge as M } from "./components/badge/index.js";
|
|
16
|
+
import { Banner as y } from "./components/banner/index.js";
|
|
17
|
+
import { Branding as E } from "./components/branding/index.js";
|
|
18
|
+
import { Button as N } from "./components/button/index.js";
|
|
19
|
+
import { Checkbox as W } from "./components/checkbox/index.js";
|
|
20
|
+
import { Controls as q } from "./components/controls/index.js";
|
|
21
|
+
import { Dialog as J } from "./components/dialog/index.js";
|
|
22
|
+
import { Figure as O } from "./components/figure/index.js";
|
|
23
|
+
import { File as R } from "./components/file/index.js";
|
|
24
|
+
import { Form as V } from "./components/form/index.js";
|
|
25
|
+
import { Graph as Y } from "./components/graph/index.js";
|
|
26
|
+
import { Group as _ } from "./components/group/index.js";
|
|
27
|
+
import { Header as oo } from "./components/header/index.js";
|
|
28
|
+
import { Icon as eo } from "./components/icon/index.js";
|
|
29
|
+
import { Image as po } from "./components/image/index.js";
|
|
30
|
+
import { Input as xo } from "./components/input/index.js";
|
|
31
|
+
import { Layout as ao } from "./components/layout/index.js";
|
|
32
|
+
import { Link as no } from "./components/link/index.js";
|
|
33
|
+
import { List as so } from "./components/list/index.js";
|
|
34
|
+
import { Loading as bo } from "./components/loading/index.js";
|
|
35
|
+
import { Message as uo } from "./components/message/index.js";
|
|
36
|
+
import { Nav as Lo } from "./components/nav/index.js";
|
|
37
|
+
import { Select as Ao } from "./components/select/index.js";
|
|
38
38
|
import { Table as ko } from "./components/table/index.js";
|
|
39
39
|
import { Textarea as Io } from "./components/textarea/index.js";
|
|
40
40
|
import { Toast as vo } from "./components/toast/index.js";
|
|
41
41
|
import { Toggle as Go } from "./components/toggle/index.js";
|
|
42
42
|
import './assets/index.css';export {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
F as Accordion,
|
|
44
|
+
h as AppLink,
|
|
45
|
+
D as Aside,
|
|
46
46
|
e as Avatar,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
M as Badge,
|
|
48
|
+
y as Banner,
|
|
49
|
+
E as Branding,
|
|
50
|
+
N as Button,
|
|
51
51
|
p as Card,
|
|
52
|
-
|
|
52
|
+
W as Checkbox,
|
|
53
53
|
x as Collapsible,
|
|
54
|
-
|
|
54
|
+
q as Controls,
|
|
55
55
|
a as Croppable,
|
|
56
|
-
|
|
56
|
+
J as Dialog,
|
|
57
57
|
n as Dropzone,
|
|
58
58
|
s as Editor,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
59
|
+
O as Figure,
|
|
60
|
+
R as File,
|
|
61
|
+
V as Form,
|
|
62
|
+
Y as Graph,
|
|
63
|
+
_ as Group,
|
|
64
|
+
oo as Header,
|
|
65
|
+
eo as Icon,
|
|
66
|
+
po as Image,
|
|
67
|
+
xo as Input,
|
|
68
|
+
ao as Layout,
|
|
69
|
+
no as Link,
|
|
70
|
+
so as List,
|
|
71
|
+
bo as Loading,
|
|
72
|
+
uo as Message,
|
|
73
73
|
d as Messages,
|
|
74
|
-
|
|
74
|
+
Lo as Nav,
|
|
75
75
|
c as Portal,
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
Ao as Select,
|
|
77
|
+
C as Sortable,
|
|
78
78
|
ko as Table,
|
|
79
79
|
Io as Textarea,
|
|
80
80
|
vo as Toast,
|
|
81
|
-
|
|
81
|
+
T as Toasts,
|
|
82
82
|
Go as Toggle,
|
|
83
|
-
|
|
83
|
+
B as Widget
|
|
84
84
|
};
|
|
85
85
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index5.css');const d=require("react/jsx-runtime"),j=require("../../classix-5H4IWnMA.cjs"),e=require("react"),M="_sortable_t2bo2_1",T="_columns_t2bo2_7",g={sortable:M,columns:T};function q({children:i,className:x,columns:m=1,onChangeOrder:a,style:y,...D}){const f=Number.isFinite(m)?Math.max(1,Math.floor(m)):1,n=e.useMemo(()=>e.Children.toArray(i),[i]),[S,b]=e.useState(n),s=e.useRef(-1),v={...y,"--sortable-columns":f};return e.useEffect(()=>b(n),[n]),d.jsx("ol",{className:j.t(x,g.sortable,f>1&&g.columns),style:v,...D,"data-component":"sortable",children:S.map((l,o)=>{const _=e.isValidElement(l)?l.key:null;return d.jsx("li",{draggable:!0,onDragStart:t=>{s.current=o,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===o||(b(E=>{const r=E.slice();return r.splice(o,0,r.splice(c,1)[0]),a==null||a(r.map((p,u)=>({id:String(e.isValidElement(p)?p.props["data-id"]??`idx-${u}`:`idx-${u}`),weight:r.length-1-u}))),r}),s.current=-1)},onDragEnd:()=>{s.current=-1},"data-component":"sortable",children:l},_??o)})})}exports.Sortable=q;
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/sortable/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\n\nimport styles from './styles.module.css';\n\ntype SortItem = { id: string; weight: number };\n\ntype SortableProps = React.ComponentPropsWithoutRef<'ol'> & {\n columns?: number;\n onChangeOrder?: (order: SortItem[]) => void;\n};\n\n/**\n * Children must provide a stable `data-id` for emits `{ id, weight }` and `key` (reconciliation).\n */\n\nexport function Sortable({\n children,\n className,\n columns = 1,\n onChangeOrder,\n style,\n ...props\n}: SortableProps) {\n const cols = Number.isFinite(columns) ? Math.max(1, Math.floor(columns)) : 1;\n const arr = useMemo(() => React.Children.toArray(children), [children]);\n const [items, setItems] = useState<React.ReactNode[]>(arr);\n const drag = useRef(-1);\n\n type WithVars = React.CSSProperties & {\n '--sortable-columns'?: number;\n };\n\n const withVars: WithVars = {\n ...style,\n '--sortable-columns': cols,\n };\n\n useEffect(() => setItems(arr), [arr]);\n\n return (\n <ol\n className={cx(className, styles.sortable, cols > 1 && styles.columns)}\n style={withVars}\n {...props}\n >\n {items.map((child, i) => {\n const key = React.isValidElement(child) ? child.key : null;\n\n return (\n <li\n key={key ?? i}\n draggable\n onDragStart={(e) => {\n drag.current = i;\n e.dataTransfer.setData('text/plain', '');\n e.dataTransfer.effectAllowed = 'move';\n }}\n onDragOver={(e) => {\n e.preventDefault();\n e.dataTransfer.dropEffect = 'move';\n }}\n onDrop={(e) => {\n e.preventDefault();\n const from = drag.current;\n if (from < 0 || from === i) return;\n\n setItems((prev) => {\n const next = prev.slice();\n next.splice(i, 0, next.splice(from, 1)[0]);\n\n onChangeOrder?.(\n next.map((c, idx) => ({\n id: String(\n React.isValidElement(c)\n ? ((c.props as { 'data-id'?: string })['data-id'] ?? `idx-${idx}`)\n : `idx-${idx}`\n ),\n weight: next.length - 1 - idx,\n }))\n );\n\n return next;\n });\n\n drag.current = -1;\n }}\n onDragEnd={() => {\n drag.current = -1;\n }}\n >\n {child}\n </li>\n );\n })}\n </ol>\n );\n}\n"],"names":["Sortable","children","className","columns","onChangeOrder","style","props","cols","Number","isFinite","Math","max","floor","arr","useMemo","React","Children","toArray","items","setItems","useState","drag","useRef","withVars","useEffect","jsx","cx","styles","sortable","map","child","i","key","isValidElement","e","current","dataTransfer","setData","effectAllowed","preventDefault","dropEffect","from","prev","next","slice","splice","c","idx","id","String","weight","length"],"mappings":"oPAgBO,SAASA,EAAS,CACvBC,SAAAA,EACAC,UAAAA,EACAC,QAAAA,EAAU,EACVC,cAAAA,EACAC,MAAAA,EACA,GAAGC,CACU,EAAG,CAChB,MAAMC,EAAOC,OAAOC,SAASN,CAAO,EAAIO,KAAKC,IAAI,EAAGD,KAAKE,MAAMT,CAAO,CAAC,EAAI,EACrEU,EAAMC,UAAQ,IAAMC,EAAMC,SAASC,QAAQhB,CAAQ,EAAG,CAACA,CAAQ,CAAC,EAChE,CAACiB,EAAOC,CAAQ,EAAIC,EAAAA,SAA4BP,CAAG,EACnDQ,EAAOC,EAAAA,OAAO,EAAE,EAMhBC,EAAqB,CACzB,GAAGlB,EACH,qBAAsBE,CAAAA,EAGxBiB,OAAAA,EAAAA,UAAU,IAAML,EAASN,CAAG,EAAG,CAACA,CAAG,CAAC,EAGlCY,MAAC,MACC,UAAWC,EAAAA,EAAGxB,EAAWyB,EAAOC,SAAUrB,EAAO,GAAKoB,EAAOxB,OAAO,EACpE,MAAOoB,EACP,GAAIjB,EAAM,iBAAA,WAETY,SAAAA,EAAMW,IAAI,CAACC,EAAOC,IAAM,CACvB,MAAMC,EAAMjB,EAAMkB,eAAeH,CAAK,EAAIA,EAAME,IAAM,KAEtD,OACEP,EAAAA,IAAC,KAAA,CAEC,UAAS,GACT,YAAcS,GAAM,CAClBb,EAAKc,QAAUJ,EACfG,EAAEE,aAAaC,QAAQ,aAAc,EAAE,EACvCH,EAAEE,aAAaE,cAAgB,MACjC,EACA,WAAaJ,GAAM,CACjBA,EAAEK,eAAAA,EACFL,EAAEE,aAAaI,WAAa,MAC9B,EACA,OAASN,GAAM,CACbA,EAAEK,eAAAA,EACF,MAAME,EAAOpB,EAAKc,QACdM,EAAO,GAAKA,IAASV,IAEzBZ,EAAUuB,GAAS,CACjB,MAAMC,EAAOD,EAAKE,MAAAA,EAClBD,OAAAA,EAAKE,OAAOd,EAAG,EAAGY,EAAKE,OAAOJ,EAAM,CAAC,EAAE,CAAC,CAAC,EAEzCrC,GAAAA,MAAAA,EACEuC,EAAKd,IAAI,CAACiB,EAAGC,KAAS,CACpBC,GAAIC,OACFlC,EAAMkB,eAAea,CAAC,EAChBA,EAAExC,MAAiC,SAAS,GAAK,OAAOyC,CAAG,GAC7D,OAAOA,CAAG,EAChB,EACAG,OAAQP,EAAKQ,OAAS,EAAIJ,CAAAA,EAC1B,GAGGJ,CACT,CAAC,EAEDtB,EAAKc,QAAU,GACjB,EACA,UAAW,IAAM,CACfd,EAAKc,QAAU,EACjB,EAAE,iBAAA,WAEDL,SAAAA,CAAAA,EAxCIE,GAAOD,CAyCd,CAEJ,CAAC,CAAA,CACH,CAEJ"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { t as w } from "../../classix-DG18itHa.js";
|
|
3
|
-
import m, { useMemo as M, useState as T, useRef as V, useEffect as k } from "react";
|
|
4
|
-
import '../../assets/index5.css';const A = "_sortable_t2bo2_1", N = "_columns_t2bo2_7", _ = {
|
|
5
|
-
sortable: A,
|
|
6
|
-
columns: N
|
|
7
|
-
};
|
|
8
|
-
function j({
|
|
9
|
-
children: u,
|
|
10
|
-
className: D,
|
|
11
|
-
columns: f = 1,
|
|
12
|
-
onChangeOrder: s,
|
|
13
|
-
style: g,
|
|
14
|
-
...v
|
|
15
|
-
}) {
|
|
16
|
-
const i = Number.isFinite(f) ? Math.max(1, Math.floor(f)) : 1, a = M(() => m.Children.toArray(u), [u]), [x, p] = T(a), r = V(-1), y = {
|
|
17
|
-
...g,
|
|
18
|
-
"--sortable-columns": i
|
|
19
|
-
};
|
|
20
|
-
return k(() => p(a), [a]), /* @__PURE__ */ d("ol", { className: w(D, _.sortable, i > 1 && _.columns), style: y, ...v, "data-component": "sortable", children: x.map((n, o) => {
|
|
21
|
-
const E = m.isValidElement(n) ? n.key : null;
|
|
22
|
-
return /* @__PURE__ */ d("li", { draggable: !0, onDragStart: (t) => {
|
|
23
|
-
r.current = o, t.dataTransfer.setData("text/plain", ""), t.dataTransfer.effectAllowed = "move";
|
|
24
|
-
}, onDragOver: (t) => {
|
|
25
|
-
t.preventDefault(), t.dataTransfer.dropEffect = "move";
|
|
26
|
-
}, onDrop: (t) => {
|
|
27
|
-
t.preventDefault();
|
|
28
|
-
const l = r.current;
|
|
29
|
-
l < 0 || l === o || (p((S) => {
|
|
30
|
-
const e = S.slice();
|
|
31
|
-
return e.splice(o, 0, e.splice(l, 1)[0]), s == null || s(e.map((b, c) => ({
|
|
32
|
-
id: String(m.isValidElement(b) ? b.props["data-id"] ?? `idx-${c}` : `idx-${c}`),
|
|
33
|
-
weight: e.length - 1 - c
|
|
34
|
-
}))), e;
|
|
35
|
-
}), r.current = -1);
|
|
36
|
-
}, onDragEnd: () => {
|
|
37
|
-
r.current = -1;
|
|
38
|
-
}, "data-component": "sortable", children: n }, E ?? o);
|
|
39
|
-
}) });
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
j as Sortable
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/sortable/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\n\nimport styles from './styles.module.css';\n\ntype SortItem = { id: string; weight: number };\n\ntype SortableProps = React.ComponentPropsWithoutRef<'ol'> & {\n columns?: number;\n onChangeOrder?: (order: SortItem[]) => void;\n};\n\n/**\n * Children must provide a stable `data-id` for emits `{ id, weight }` and `key` (reconciliation).\n */\n\nexport function Sortable({\n children,\n className,\n columns = 1,\n onChangeOrder,\n style,\n ...props\n}: SortableProps) {\n const cols = Number.isFinite(columns) ? Math.max(1, Math.floor(columns)) : 1;\n const arr = useMemo(() => React.Children.toArray(children), [children]);\n const [items, setItems] = useState<React.ReactNode[]>(arr);\n const drag = useRef(-1);\n\n type WithVars = React.CSSProperties & {\n '--sortable-columns'?: number;\n };\n\n const withVars: WithVars = {\n ...style,\n '--sortable-columns': cols,\n };\n\n useEffect(() => setItems(arr), [arr]);\n\n return (\n <ol\n className={cx(className, styles.sortable, cols > 1 && styles.columns)}\n style={withVars}\n {...props}\n >\n {items.map((child, i) => {\n const key = React.isValidElement(child) ? child.key : null;\n\n return (\n <li\n key={key ?? i}\n draggable\n onDragStart={(e) => {\n drag.current = i;\n e.dataTransfer.setData('text/plain', '');\n e.dataTransfer.effectAllowed = 'move';\n }}\n onDragOver={(e) => {\n e.preventDefault();\n e.dataTransfer.dropEffect = 'move';\n }}\n onDrop={(e) => {\n e.preventDefault();\n const from = drag.current;\n if (from < 0 || from === i) return;\n\n setItems((prev) => {\n const next = prev.slice();\n next.splice(i, 0, next.splice(from, 1)[0]);\n\n onChangeOrder?.(\n next.map((c, idx) => ({\n id: String(\n React.isValidElement(c)\n ? ((c.props as { 'data-id'?: string })['data-id'] ?? `idx-${idx}`)\n : `idx-${idx}`\n ),\n weight: next.length - 1 - idx,\n }))\n );\n\n return next;\n });\n\n drag.current = -1;\n }}\n onDragEnd={() => {\n drag.current = -1;\n }}\n >\n {child}\n </li>\n );\n })}\n </ol>\n );\n}\n"],"names":["Sortable","children","className","columns","onChangeOrder","style","props","cols","Number","isFinite","Math","max","floor","arr","useMemo","React","Children","toArray","items","setItems","useState","drag","useRef","withVars","useEffect","jsx","cx","styles","sortable","map","child","i","key","isValidElement","e","current","dataTransfer","setData","effectAllowed","preventDefault","dropEffect","from","prev","next","slice","splice","c","idx","id","String","weight","length"],"mappings":";;;;;;;AAgBO,SAASA,EAAS;AAAA,EACvBC,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACVC,eAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACA,GAAGC;AACU,GAAG;AAChB,QAAMC,IAAOC,OAAOC,SAASN,CAAO,IAAIO,KAAKC,IAAI,GAAGD,KAAKE,MAAMT,CAAO,CAAC,IAAI,GACrEU,IAAMC,EAAQ,MAAMC,EAAMC,SAASC,QAAQhB,CAAQ,GAAG,CAACA,CAAQ,CAAC,GAChE,CAACiB,GAAOC,CAAQ,IAAIC,EAA4BP,CAAG,GACnDQ,IAAOC,EAAO,EAAE,GAMhBC,IAAqB;AAAA,IACzB,GAAGlB;AAAAA,IACH,sBAAsBE;AAAAA,EAAAA;AAGxBiB,SAAAA,EAAU,MAAML,EAASN,CAAG,GAAG,CAACA,CAAG,CAAC,GAGlC,gBAAAY,EAAC,QACC,WAAWC,EAAGxB,GAAWyB,EAAOC,UAAUrB,IAAO,KAAKoB,EAAOxB,OAAO,GACpE,OAAOoB,GACP,GAAIjB,GAAM,kBAAA,YAETY,UAAAA,EAAMW,IAAI,CAACC,GAAOC,MAAM;AACvB,UAAMC,IAAMjB,EAAMkB,eAAeH,CAAK,IAAIA,EAAME,MAAM;AAEtD,WACE,gBAAAP,EAAC,MAAA,EAEC,WAAS,IACT,aAAcS,CAAAA,MAAM;AAClBb,MAAAA,EAAKc,UAAUJ,GACfG,EAAEE,aAAaC,QAAQ,cAAc,EAAE,GACvCH,EAAEE,aAAaE,gBAAgB;AAAA,IACjC,GACA,YAAaJ,CAAAA,MAAM;AACjBA,MAAAA,EAAEK,eAAAA,GACFL,EAAEE,aAAaI,aAAa;AAAA,IAC9B,GACA,QAASN,CAAAA,MAAM;AACbA,MAAAA,EAAEK,eAAAA;AACF,YAAME,IAAOpB,EAAKc;AAClB,MAAIM,IAAO,KAAKA,MAASV,MAEzBZ,EAAUuB,CAAAA,MAAS;AACjB,cAAMC,IAAOD,EAAKE,MAAAA;AAClBD,eAAAA,EAAKE,OAAOd,GAAG,GAAGY,EAAKE,OAAOJ,GAAM,CAAC,EAAE,CAAC,CAAC,GAEzCrC,KAAAA,QAAAA,EACEuC,EAAKd,IAAI,CAACiB,GAAGC,OAAS;AAAA,UACpBC,IAAIC,OACFlC,EAAMkB,eAAea,CAAC,IAChBA,EAAExC,MAAiC,SAAS,KAAK,OAAOyC,CAAG,KAC7D,OAAOA,CAAG,EAChB;AAAA,UACAG,QAAQP,EAAKQ,SAAS,IAAIJ;AAAAA,QAAAA,EAC1B,IAGGJ;AAAAA,MACT,CAAC,GAEDtB,EAAKc,UAAU;AAAA,IACjB,GACA,WAAW,MAAM;AACfd,MAAAA,EAAKc,UAAU;AAAA,IACjB,GAAE,kBAAA,YAEDL,UAAAA,EAAAA,GAxCIE,KAAOD,CAyCd;AAAA,EAEJ,CAAC,EAAA,CACH;AAEJ;"}
|