@solibo/solibo-ui 0.4.10 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -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/index2.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/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/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/_avatar/index.cjs +1 -1
- package/dist/components/_avatar/index.cjs.map +1 -1
- package/dist/components/_avatar/index.js +9 -9
- package/dist/components/_avatar/index.js.map +1 -1
- package/dist/components/_card/index.cjs +1 -1
- package/dist/components/_card/index.js +12 -12
- 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 +175 -175
- package/dist/components/_dropdown/index.cjs +1 -1
- package/dist/components/_dropdown/index.cjs.map +1 -1
- package/dist/components/_dropdown/index.js +87 -87
- package/dist/components/_dropdown/index.js.map +1 -1
- package/dist/components/_dropzone/index.cjs +1 -1
- package/dist/components/_dropzone/index.js +34 -34
- package/dist/components/_editor/index.cjs +16 -16
- package/dist/components/_editor/index.cjs.map +1 -1
- package/dist/components/_editor/index.js +19 -19
- package/dist/components/_editor/index.js.map +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 +15 -15
- package/dist/components/_messages/index.js.map +1 -1
- 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/_sortable/index.cjs +1 -1
- package/dist/components/_sortable/index.cjs.map +1 -1
- package/dist/components/_sortable/index.js +64 -33
- package/dist/components/_sortable/index.js.map +1 -1
- package/dist/components/_widget/index.cjs +1 -1
- package/dist/components/_widget/index.js +3 -3
- package/dist/components/accordion/index.cjs +1 -1
- package/dist/components/accordion/index.cjs.map +1 -1
- package/dist/components/accordion/index.js +16 -10
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.cjs.map +1 -1
- package/dist/components/app-link/index.js +9 -9
- package/dist/components/app-link/index.js.map +1 -1
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +6 -6
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.cjs.map +1 -1
- package/dist/components/badge/index.js +19 -18
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +9 -9
- package/dist/components/branding/index.cjs +1 -1
- package/dist/components/branding/index.js +12 -12
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +12 -12
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +7 -7
- package/dist/components/controls/index.cjs +1 -1
- package/dist/components/controls/index.cjs.map +1 -1
- package/dist/components/controls/index.js +21 -10
- package/dist/components/controls/index.js.map +1 -1
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +3 -3
- package/dist/components/figure/index.cjs +1 -1
- package/dist/components/figure/index.cjs.map +1 -1
- package/dist/components/figure/index.js +11 -11
- 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 +14 -13
- package/dist/components/file/index.js.map +1 -1
- package/dist/components/footer/index.cjs +1 -1
- package/dist/components/footer/index.js +3 -3
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +11 -11
- package/dist/components/graph/index.cjs +1 -1
- package/dist/components/graph/index.cjs.map +1 -1
- package/dist/components/graph/index.js +31 -31
- package/dist/components/graph/index.js.map +1 -1
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.js +3 -3
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.cjs.map +1 -1
- package/dist/components/icon/index.js +26 -26
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/image/index.cjs +1 -1
- package/dist/components/image/index.js +9 -9
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.cjs.map +1 -1
- package/dist/components/input/index.js +34 -33
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +11 -11
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +7 -7
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +13 -13
- 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 +23 -23
- package/dist/components/object/index.cjs +2 -0
- package/dist/components/object/index.cjs.map +1 -0
- package/dist/components/object/index.js +16 -0
- package/dist/components/object/index.js.map +1 -0
- 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.cjs.map +1 -1
- package/dist/components/table/index.js +22 -22
- package/dist/components/table/index.js.map +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 +23 -23
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/toast/index.cjs +1 -1
- package/dist/components/toast/index.cjs.map +1 -1
- package/dist/components/toast/index.js +23 -24
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/toggle/index.cjs +1 -1
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +9 -9
- package/dist/index-CiEbbnD6.js +42 -0
- package/dist/index-CiEbbnD6.js.map +1 -0
- package/dist/index-ClrKYsAQ.cjs +2 -0
- package/dist/index-ClrKYsAQ.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +28 -22
- package/dist/index.js +33 -33
- package/dist/styles.module-BOTEBJ0C.js +9 -0
- package/dist/styles.module-BOTEBJ0C.js.map +1 -0
- package/dist/styles.module-BPvMQa_x.cjs +2 -0
- package/dist/styles.module-BPvMQa_x.cjs.map +1 -0
- package/dist/tokens.css +44 -12
- package/dist/tokens.json +541 -68
- package/package.json +1 -1
- package/dist/components/layout/index.cjs +0 -2
- package/dist/components/layout/index.cjs.map +0 -1
- package/dist/components/layout/index.js +0 -18
- package/dist/components/layout/index.js.map +0 -1
- package/dist/index-BpUboRfJ.cjs +0 -2
- package/dist/index-BpUboRfJ.cjs.map +0 -1
- package/dist/index-ChKhFyp8.js +0 -40
- package/dist/index-ChKhFyp8.js.map +0 -1
- package/dist/styles.module-DZXAP_eP.js +0 -8
- package/dist/styles.module-DZXAP_eP.js.map +0 -1
- package/dist/styles.module-Vt6mmlsz.cjs +0 -2
- package/dist/styles.module-Vt6mmlsz.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/table/index.tsx"],"sourcesContent":["import { Children, cloneElement, isValidElement, useCallback, useRef } from 'react';\n\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type TableProps = React.TableHTMLAttributes<HTMLTableElement> & {\n children?: React.ReactNode;\n locale?: string | string[];\n};\n\ntype SortType = 'date' | 'number' | 'text';\n\ntype TableChildProps = {\n children?: React.ReactNode;\n colSpan?: number;\n 'data-span'?: string;\n 'data-type'?: SortType;\n};\n\nconst isTableElement = (child: React.ReactNode): child is React.ReactElement<TableChildProps> =>\n isValidElement<TableChildProps>(child);\n\nconst countCells = (children: React.ReactNode): number =>\n Children.toArray(children).reduce<number>((count, child) => {\n if (!isTableElement(child)) return count;\n return (\n count + (child.type === 'td' || child.type === 'th' ? 1 : countCells(child.props.children))\n );\n }, 0);\n\nconst getFirstRowCellCount = (children: React.ReactNode): number | null => {\n for (const child of Children.toArray(children)) {\n if (!isTableElement(child)) continue;\n\n if (child.type === 'tr') return countCells(child.props.children);\n\n const nestedCount = getFirstRowCellCount(child.props.children);\n if (nestedCount !== null) return nestedCount;\n }\n\n return null;\n};\n\nconst normalizeChildren = (children: React.ReactNode, columnCount: number): React.ReactNode =>\n Children.map(children, (child) => {\n if (!isTableElement(child)) return child;\n\n let nextChildren =\n child.props.children === undefined\n ? child.props.children\n : normalizeChildren(child.props.children, columnCount);\n let nextProps: Partial<TableChildProps> | undefined;\n\n if (child.type === 'td' && child.props['data-span'] === 'all') {\n nextProps = { colSpan: columnCount };\n }\n\n if (child.type === 'th' && child.props['data-type']) {\n nextChildren = (\n <span className={styles.sortable}>\n {nextChildren}\n <Icon\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/table/index.tsx"],"sourcesContent":["import { Children, cloneElement, isValidElement, useCallback, useRef } from 'react';\n\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type TableProps = React.TableHTMLAttributes<HTMLTableElement> & {\n children?: React.ReactNode;\n locale?: string | string[];\n};\n\ntype SortType = 'date' | 'number' | 'text';\n\ntype TableChildProps = {\n children?: React.ReactNode;\n colSpan?: number;\n 'data-span'?: string;\n 'data-type'?: SortType;\n};\n\nconst isTableElement = (child: React.ReactNode): child is React.ReactElement<TableChildProps> =>\n isValidElement<TableChildProps>(child);\n\nconst countCells = (children: React.ReactNode): number =>\n Children.toArray(children).reduce<number>((count, child) => {\n if (!isTableElement(child)) return count;\n return (\n count + (child.type === 'td' || child.type === 'th' ? 1 : countCells(child.props.children))\n );\n }, 0);\n\nconst getFirstRowCellCount = (children: React.ReactNode): number | null => {\n for (const child of Children.toArray(children)) {\n if (!isTableElement(child)) continue;\n\n if (child.type === 'tr') return countCells(child.props.children);\n\n const nestedCount = getFirstRowCellCount(child.props.children);\n if (nestedCount !== null) return nestedCount;\n }\n\n return null;\n};\n\nconst normalizeChildren = (children: React.ReactNode, columnCount: number): React.ReactNode =>\n Children.map(children, (child) => {\n if (!isTableElement(child)) return child;\n\n let nextChildren =\n child.props.children === undefined\n ? child.props.children\n : normalizeChildren(child.props.children, columnCount);\n let nextProps: Partial<TableChildProps> | undefined;\n\n if (child.type === 'td' && child.props['data-span'] === 'all') {\n nextProps = { colSpan: columnCount };\n }\n\n if (child.type === 'th' && child.props['data-type']) {\n nextChildren = (\n <span className={styles.sortable}>\n {nextChildren}\n <Icon\n name='updown'\n variant='primary'\n />\n </span>\n );\n }\n\n return nextProps || nextChildren !== child.props.children\n ? cloneElement(child, nextProps, nextChildren)\n : child;\n });\n\n/**\n * Sortable columns must provide data-type (text, number, or date) in the `th` element.\n */\n\nconst compare = (a: string, b: string, type: SortType, locale?: string | string[], dir = 1) => {\n if (type === 'text') {\n return a.localeCompare(b, locale, { sensitivity: 'base' }) * dir;\n }\n\n const left = type === 'date' ? Date.parse(a) : Number.parseFloat(a);\n const right = type === 'date' ? Date.parse(b) : Number.parseFloat(b);\n\n if (Number.isNaN(left) && Number.isNaN(right)) return 0;\n if (Number.isNaN(left)) return 1;\n if (Number.isNaN(right)) return -1;\n return (left - right) * dir;\n};\n\nexport const Table = ({ children, locale, ...props }: TableProps) => {\n const ref = useRef<HTMLTableElement | null>(null);\n const columnCount = getFirstRowCellCount(children);\n const normalizedChildren =\n columnCount && columnCount > 0 ? normalizeChildren(children, columnCount) : children;\n\n const setSortState = (\n thead: HTMLTableSectionElement,\n active: HTMLTableCellElement,\n dir: 'asc' | 'desc'\n ) => {\n const ths = thead.querySelectorAll<HTMLTableCellElement>('th[data-type]');\n\n ths.forEach((th) => {\n if (th === active) {\n th.dataset.dir = dir;\n th.setAttribute('aria-sort', dir === 'asc' ? 'ascending' : 'descending');\n } else {\n delete th.dataset.dir;\n th.setAttribute('aria-sort', 'none');\n }\n });\n };\n\n const onClick = useCallback(\n (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 col = th.cellIndex;\n if (col < 0) return;\n\n const tbody = table.tBodies?.[0];\n if (!tbody) return;\n\n const type = th.getAttribute('data-type') as SortType | null;\n if (!type) return;\n\n const direction = th.dataset.dir === 'asc' ? 'desc' : 'asc';\n setSortState(thead, th, direction);\n const dir = direction === '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 return compare(av, bv, type, locale, dir);\n });\n\n tbody.append(...rows);\n },\n [locale]\n );\n\n return (\n <table\n className={styles.table}\n onClick={onClick}\n ref={ref}\n {...props}\n >\n {normalizedChildren}\n </table>\n );\n};\n"],"names":["isTableElement","child","isValidElement","countCells","children","Children","toArray","reduce","count","type","props","getFirstRowCellCount","nestedCount","normalizeChildren","columnCount","map","nextChildren","undefined","nextProps","colSpan","jsxs","styles","sortable","jsx","Icon","cloneElement","compare","a","b","locale","dir","localeCompare","sensitivity","left","Date","parse","Number","parseFloat","right","isNaN","Table","ref","useRef","normalizedChildren","setSortState","thead","active","ths","querySelectorAll","forEach","th","dataset","setAttribute","onClick","useCallback","e","table","current","target","closest","tHead","contains","col","cellIndex","tbody","tBodies","getAttribute","direction","rows","Array","from","sort","av","cells","textContent","trim","bv","append"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const e=require("react/jsx-runtime"),n=require("../../classix-5H4IWnMA.cjs"),x=require("../../utils-DBzf7CFq.cjs"),t=require("../../styles.module-BPvMQa_x.cjs"),d="_textarea_19s8w_5",m={textarea:d},y=({label:s,maxRows:o=12,minRows:c=3,required:r,value:a,...u})=>{const{touched:i,onBlur:l}=x.useTouched(a==="");return e.jsxs("label",{"data-component":"textarea",children:[s&&e.jsx("span",{className:n.t(r&&t.inputStyles.required),children:s}),e.jsx("textarea",{className:n.t(t.inputStyles.input,m.textarea,i&&t.inputStyles.touched),onBlur:l,...u,required:r,style:{"--min-rows":c,"--max-rows":o},value:a})]})};exports.Textarea=y;
|
|
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 = Omit<React.ComponentPropsWithoutRef<'textarea'>, 'children'> & {\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>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched &&
|
|
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 = Omit<React.ComponentPropsWithoutRef<'textarea'>, 'children'> & {\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(required && inputStyles.required)}>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched && inputStyles.touched)}\n onBlur={onBlur}\n {...props}\n required={required}\n style={\n {\n '--min-rows': minRows,\n '--max-rows': maxRows,\n } as React.CSSProperties\n }\n value={value}\n />\n </label>\n );\n};\n"],"names":["Textarea","label","maxRows","minRows","required","value","props","touched","onBlur","useTouched","jsxs","jsx","cx","inputStyles","input","styles","textarea"],"mappings":"sRAaaA,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,iBAAA,WACHT,SAAAA,CAAAA,GAASU,EAAAA,IAAC,QAAK,UAAWC,EAAAA,EAAGR,GAAYS,EAAAA,YAAYT,QAAQ,EAAIH,SAAAA,CAAAA,CAAM,QACvE,WAAA,CACC,UAAWW,EAAAA,EAAGC,EAAAA,YAAYC,MAAOC,EAAOC,SAAUT,GAAWM,EAAAA,YAAYN,OAAO,EAChF,OAAAC,EACA,GAAIF,EACJ,SAAAF,EACA,MACE,CACE,aAAcD,EACd,aAAcD,CAAAA,EAGlB,MAAAG,CAAA,CAAa,CAAA,EAEjB,CAEJ"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { u
|
|
4
|
-
import { i as
|
|
5
|
-
import '../../assets/index42.css';const
|
|
6
|
-
textarea:
|
|
7
|
-
},
|
|
8
|
-
label:
|
|
9
|
-
maxRows:
|
|
10
|
-
minRows:
|
|
11
|
-
required:
|
|
12
|
-
value:
|
|
13
|
-
...
|
|
1
|
+
import { jsxs as p, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { t as o } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { u } from "../../utils--n2yqjCy.js";
|
|
4
|
+
import { i as t } from "../../styles.module-BOTEBJ0C.js";
|
|
5
|
+
import '../../assets/index42.css';const l = "_textarea_19s8w_5", d = {
|
|
6
|
+
textarea: l
|
|
7
|
+
}, _ = ({
|
|
8
|
+
label: e,
|
|
9
|
+
maxRows: n = 12,
|
|
10
|
+
minRows: m = 3,
|
|
11
|
+
required: a,
|
|
12
|
+
value: r,
|
|
13
|
+
...c
|
|
14
14
|
}) => {
|
|
15
15
|
const {
|
|
16
|
-
touched:
|
|
17
|
-
onBlur:
|
|
18
|
-
} =
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
"--min-rows":
|
|
23
|
-
"--max-rows":
|
|
24
|
-
}, value:
|
|
16
|
+
touched: x,
|
|
17
|
+
onBlur: i
|
|
18
|
+
} = u(r === "");
|
|
19
|
+
return /* @__PURE__ */ p("label", { "data-component": "textarea", children: [
|
|
20
|
+
e && /* @__PURE__ */ s("span", { className: o(a && t.required), children: e }),
|
|
21
|
+
/* @__PURE__ */ s("textarea", { className: o(t.input, d.textarea, x && t.touched), onBlur: i, ...c, required: a, style: {
|
|
22
|
+
"--min-rows": m,
|
|
23
|
+
"--max-rows": n
|
|
24
|
+
}, value: r })
|
|
25
25
|
] });
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
_ as Textarea
|
|
29
29
|
};
|
|
30
30
|
//# 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 = Omit<React.ComponentPropsWithoutRef<'textarea'>, 'children'> & {\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>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched &&
|
|
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 = Omit<React.ComponentPropsWithoutRef<'textarea'>, 'children'> & {\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(required && inputStyles.required)}>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched && inputStyles.touched)}\n onBlur={onBlur}\n {...props}\n required={required}\n style={\n {\n '--min-rows': minRows,\n '--max-rows': maxRows,\n } as React.CSSProperties\n }\n value={value}\n />\n </label>\n );\n};\n"],"names":["Textarea","label","maxRows","minRows","required","value","props","touched","onBlur","useTouched","jsxs","jsx","cx","inputStyles","input","styles","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,UAAK,WAAWC,EAAGR,KAAYS,EAAYT,QAAQ,GAAIH,UAAAA,EAAAA,CAAM;AAAA,sBACvE,YAAA,EACC,WAAWW,EAAGC,EAAYC,OAAOC,EAAOC,UAAUT,KAAWM,EAAYN,OAAO,GAChF,QAAAC,GACA,GAAIF,GACJ,UAAAF,GACA,OACE;AAAA,MACE,cAAcD;AAAAA,MACd,cAAcD;AAAAA,IAAAA,GAGlB,OAAAG,EAAA,CAAa;AAAA,EAAA,GAEjB;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index43.css');const o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index43.css');const o=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),n=require("react"),q=require("../icon/index.cjs"),d="_toast_12yql_1",f="_active_12yql_21",m="_error_12yql_27",y="_success_12yql_36",c={toast:d,active:f,error:m,success:y},v=({label:i,type:t="success",onClick:u,onExitComplete:e,open:r=!0})=>{const[_,a]=n.useState(!1);return n.useEffect(()=>{if(!r)return a(!1);const s=requestAnimationFrame(()=>a(!0));return()=>cancelAnimationFrame(s)},[r]),o.jsxs("div",{"aria-live":t==="error"?"assertive":"polite",className:l.t(c.toast,c[t],_&&c.active),onClick:u,onTransitionEnd:s=>{r||s.propertyName!=="opacity"||s.currentTarget!==s.target||e==null||e()},"data-component":"toast",children:[o.jsx(q.Icon,{name:t}),i]})};exports.Toast=v;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/toast/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useEffect, useState } from 'react';\n\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type ToastOptions = {\n durationMs?: number;\n label: string;\n type?: 'error' | '
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/toast/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useEffect, useState } from 'react';\n\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type ToastOptions = {\n durationMs?: number;\n label: string;\n type?: 'error' | 'success';\n};\n\nexport type ToastProps = ToastOptions & {\n onClick?: () => void;\n onExitComplete?: () => void;\n open?: boolean;\n};\n\nexport const Toast = ({\n label,\n type = 'success',\n onClick,\n onExitComplete,\n open = true,\n}: ToastProps) => {\n const [show, setShow] = useState(false);\n\n useEffect(() => {\n if (!open) return setShow(false);\n\n const enter = requestAnimationFrame(() => setShow(true));\n return () => cancelAnimationFrame(enter);\n }, [open]);\n\n return (\n <div\n aria-live={type === 'error' ? 'assertive' : 'polite'}\n className={cx(styles.toast, styles[type], show && styles.active)}\n onClick={onClick}\n onTransitionEnd={(event) => {\n if (open || event.propertyName !== 'opacity' || event.currentTarget !== event.target)\n return;\n onExitComplete?.();\n }}\n >\n <Icon name={type} />\n {label}\n </div>\n );\n};\n"],"names":["Toast","label","type","onClick","onExitComplete","open","show","setShow","useState","useEffect","enter","requestAnimationFrame","cancelAnimationFrame","jsxs","cx","styles","toast","active","event","propertyName","currentTarget","target","jsx","Icon"],"mappings":"wUAkBaA,EAAQA,CAAC,CACpBC,MAAAA,EACAC,KAAAA,EAAO,UACPC,QAAAA,EACAC,eAAAA,EACAC,KAAAA,EAAO,EACG,IAAM,CAChB,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAEtCC,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAI,CAACJ,EAAM,OAAOE,EAAQ,EAAK,EAE/B,MAAMG,EAAQC,sBAAsB,IAAMJ,EAAQ,EAAI,CAAC,EACvD,MAAO,IAAMK,qBAAqBF,CAAK,CACzC,EAAG,CAACL,CAAI,CAAC,EAGPQ,EAAAA,KAAC,OACC,YAAWX,IAAS,QAAU,YAAc,SAC5C,UAAWY,IAAGC,EAAOC,MAAOD,EAAOb,CAAI,EAAGI,GAAQS,EAAOE,MAAM,EAC/D,QAAAd,EACA,gBAAkBe,GAAU,CACtBb,GAAQa,EAAMC,eAAiB,WAAaD,EAAME,gBAAkBF,EAAMG,QAE9EjB,GAAAA,MAAAA,GACF,EAAE,iBAAA,QAEF,SAAA,CAAAkB,EAAAA,IAACC,EAAAA,KAAA,CAAK,KAAMrB,CAAAA,CAAK,EAChBD,CAAAA,EACH,CAEJ"}
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import '../../assets/index43.css';const
|
|
6
|
-
toast:
|
|
7
|
-
active:
|
|
8
|
-
error:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type: r = "success",
|
|
1
|
+
import { jsxs as u, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { t as _ } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { useState as f, useEffect as l } from "react";
|
|
4
|
+
import { Icon as q } from "../icon/index.js";
|
|
5
|
+
import '../../assets/index43.css';const v = "_toast_12yql_1", y = "_active_12yql_21", d = "_error_12yql_27", h = "_success_12yql_36", e = {
|
|
6
|
+
toast: v,
|
|
7
|
+
active: y,
|
|
8
|
+
error: d,
|
|
9
|
+
success: h
|
|
10
|
+
}, w = ({
|
|
11
|
+
label: o,
|
|
12
|
+
type: s = "success",
|
|
14
13
|
onClick: n,
|
|
15
|
-
onExitComplete:
|
|
14
|
+
onExitComplete: t,
|
|
16
15
|
open: a = !0
|
|
17
16
|
}) => {
|
|
18
|
-
const [i,
|
|
19
|
-
return
|
|
20
|
-
if (!a) return
|
|
21
|
-
const
|
|
22
|
-
return () => cancelAnimationFrame(
|
|
23
|
-
}, [a]), /* @__PURE__ */
|
|
24
|
-
a ||
|
|
17
|
+
const [i, c] = f(!1);
|
|
18
|
+
return l(() => {
|
|
19
|
+
if (!a) return c(!1);
|
|
20
|
+
const r = requestAnimationFrame(() => c(!0));
|
|
21
|
+
return () => cancelAnimationFrame(r);
|
|
22
|
+
}, [a]), /* @__PURE__ */ u("div", { "aria-live": s === "error" ? "assertive" : "polite", className: _(e.toast, e[s], i && e.active), onClick: n, onTransitionEnd: (r) => {
|
|
23
|
+
a || r.propertyName !== "opacity" || r.currentTarget !== r.target || t == null || t();
|
|
25
24
|
}, "data-component": "toast", children: [
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
25
|
+
/* @__PURE__ */ m(q, { name: s }),
|
|
26
|
+
o
|
|
28
27
|
] });
|
|
29
28
|
};
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
w as Toast
|
|
32
31
|
};
|
|
33
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/toast/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useEffect, useState } from 'react';\n\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type ToastOptions = {\n durationMs?: number;\n label: string;\n type?: 'error' | '
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/toast/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useEffect, useState } from 'react';\n\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type ToastOptions = {\n durationMs?: number;\n label: string;\n type?: 'error' | 'success';\n};\n\nexport type ToastProps = ToastOptions & {\n onClick?: () => void;\n onExitComplete?: () => void;\n open?: boolean;\n};\n\nexport const Toast = ({\n label,\n type = 'success',\n onClick,\n onExitComplete,\n open = true,\n}: ToastProps) => {\n const [show, setShow] = useState(false);\n\n useEffect(() => {\n if (!open) return setShow(false);\n\n const enter = requestAnimationFrame(() => setShow(true));\n return () => cancelAnimationFrame(enter);\n }, [open]);\n\n return (\n <div\n aria-live={type === 'error' ? 'assertive' : 'polite'}\n className={cx(styles.toast, styles[type], show && styles.active)}\n onClick={onClick}\n onTransitionEnd={(event) => {\n if (open || event.propertyName !== 'opacity' || event.currentTarget !== event.target)\n return;\n onExitComplete?.();\n }}\n >\n <Icon name={type} />\n {label}\n </div>\n );\n};\n"],"names":["Toast","label","type","onClick","onExitComplete","open","show","setShow","useState","useEffect","enter","requestAnimationFrame","cancelAnimationFrame","jsxs","cx","styles","toast","active","event","propertyName","currentTarget","target","jsx","Icon"],"mappings":";;;;;;;;;GAkBaA,IAAQA,CAAC;AAAA,EACpBC,OAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACPC,SAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,MAAAA,IAAO;AACG,MAAM;AAChB,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK;AAEtCC,SAAAA,EAAU,MAAM;AACd,QAAI,CAACJ,EAAM,QAAOE,EAAQ,EAAK;AAE/B,UAAMG,IAAQC,sBAAsB,MAAMJ,EAAQ,EAAI,CAAC;AACvD,WAAO,MAAMK,qBAAqBF,CAAK;AAAA,EACzC,GAAG,CAACL,CAAI,CAAC,GAGP,gBAAAQ,EAAC,SACC,aAAWX,MAAS,UAAU,cAAc,UAC5C,WAAWY,EAAGC,EAAOC,OAAOD,EAAOb,CAAI,GAAGI,KAAQS,EAAOE,MAAM,GAC/D,SAAAd,GACA,iBAAkBe,CAAAA,MAAU;AAC1B,IAAIb,KAAQa,EAAMC,iBAAiB,aAAaD,EAAME,kBAAkBF,EAAMG,UAE9EjB,KAAAA,QAAAA;AAAAA,EACF,GAAE,kBAAA,SAEF,UAAA;AAAA,IAAA,gBAAAkB,EAACC,GAAA,EAAK,MAAMrB,EAAAA,CAAK;AAAA,IAChBD;AAAAA,EAAAA,GACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index2.css');const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index2.css');const t=require("react/jsx-runtime"),i=require("../loading/index.cjs"),g="_toggle_81frv_1",d="_thumb_81frv_15",u="_track_81frv_26",e={toggle:g,thumb:d,track:u},m=({checked:s,disabled:c,isLoading:o,label:n,onChange:a})=>{const l=s!==void 0&&a===void 0;return t.jsxs("label",{className:e.toggle,onClick:r=>r.stopPropagation(),"data-component":"toggle",children:[t.jsx("input",{checked:s,disabled:c||o,onChange:a,readOnly:l,type:"checkbox"}),t.jsx("span",{"aria-hidden":"true",className:e.track,children:o?t.jsx(i.Loading,{size:24}):t.jsx("span",{className:e.thumb})}),n&&t.jsx("span",{className:"toggle",children:n})]})};exports.Toggle=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { Loading as i } from "../loading/index.js";
|
|
3
|
-
import '../../assets/index2.css';const m = "
|
|
3
|
+
import '../../assets/index2.css';const m = "_toggle_81frv_1", d = "_thumb_81frv_15", p = "_track_81frv_26", o = {
|
|
4
4
|
toggle: m,
|
|
5
5
|
thumb: d,
|
|
6
6
|
track: p
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index44.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index44.css');const s=require("react/jsx-runtime"),a=require("../../classix-5H4IWnMA.cjs"),l="_toolbar_ju6sc_1",c="_editor_ju6sc_33",o={toolbar:l,default:"_default_ju6sc_26",editor:c},n=({children:t,variant:e="default"})=>s.jsx("div",{className:a.t(o.toolbar,o[e]),onClick:r=>r.stopPropagation(),"data-component":"toolbar",children:t});exports.Toolbar=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import '../../assets/index44.css';const
|
|
4
|
-
toolbar:
|
|
5
|
-
default: "
|
|
6
|
-
editor:
|
|
7
|
-
},
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { t as l } from "../../classix-DG18itHa.js";
|
|
3
|
+
import '../../assets/index44.css';const e = "_toolbar_ju6sc_1", c = "_editor_ju6sc_33", o = {
|
|
4
|
+
toolbar: e,
|
|
5
|
+
default: "_default_ju6sc_26",
|
|
6
|
+
editor: c
|
|
7
|
+
}, d = ({
|
|
8
8
|
children: t,
|
|
9
9
|
variant: r = "default"
|
|
10
|
-
}) => /* @__PURE__ */
|
|
10
|
+
}) => /* @__PURE__ */ s("div", { className: l(o.toolbar, o[r]), onClick: (a) => a.stopPropagation(), "data-component": "toolbar", children: t });
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
d as Toolbar
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { t as l } from "./classix-DG18itHa.js";
|
|
3
|
+
import { i as b } from "./icons-DfmpRbxE.js";
|
|
4
|
+
import { u as _, r as f } from "./utils--n2yqjCy.js";
|
|
5
|
+
import './assets/index41.css';const v = /* @__PURE__ */ new Set(["aria-activedescendant", "aria-autocomplete", "aria-busy", "aria-controls", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-required", "aria-roledescription", "autoComplete", "autoFocus", "className", "defaultValue", "dir", "disabled", "form", "id", "multiple", "name", "onBlur", "onChange", "onClick", "onFocus", "onInput", "onInvalid", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", "required", "role", "size", "style", "tabIndex", "title", "value"]);
|
|
6
|
+
function y(r) {
|
|
7
|
+
return Object.fromEntries(Object.entries(r).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-") || v.has(e)));
|
|
8
|
+
}
|
|
9
|
+
const q = "_select_8a7r8_1", w = "_touched_8a7r8_25", S = "_label_8a7r8_31", x = "_required_8a7r8_35", a = {
|
|
10
|
+
select: q,
|
|
11
|
+
touched: w,
|
|
12
|
+
label: S,
|
|
13
|
+
required: x
|
|
14
|
+
}, D = ({
|
|
15
|
+
children: r,
|
|
16
|
+
label: e,
|
|
17
|
+
placeholder: o,
|
|
18
|
+
...t
|
|
19
|
+
}) => {
|
|
20
|
+
const {
|
|
21
|
+
touched: c,
|
|
22
|
+
onBlur: d
|
|
23
|
+
} = _(t.value === ""), u = y(t), {
|
|
24
|
+
style: m,
|
|
25
|
+
...h
|
|
26
|
+
} = u, p = {
|
|
27
|
+
...m,
|
|
28
|
+
"--icon-svg": b("chevron").replace("currentColor", f("--colors-semantic-content-secondary"))
|
|
29
|
+
}, s = /* @__PURE__ */ i("select", { className: l(a.select, c && a.touched), onBlur: d, style: p, ...h, children: [
|
|
30
|
+
o && /* @__PURE__ */ n("option", { value: "", hidden: !0, children: o }, "placeholder"),
|
|
31
|
+
r
|
|
32
|
+
] });
|
|
33
|
+
return e ? /* @__PURE__ */ i("label", { "data-component": "select", children: [
|
|
34
|
+
/* @__PURE__ */ n("span", { className: l(a.label, t.required && a.required), children: e }),
|
|
35
|
+
s
|
|
36
|
+
] }) : s;
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
D as S,
|
|
40
|
+
y as s
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=index-CiEbbnD6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CiEbbnD6.js","sources":["../src/components/select/sanitizeSelectProps.ts","../src/components/select/index.tsx"],"sourcesContent":["const selectKeys = new Set([\n 'aria-activedescendant',\n 'aria-autocomplete',\n 'aria-busy',\n 'aria-controls',\n 'aria-describedby',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-live',\n 'aria-owns',\n 'aria-required',\n 'aria-roledescription',\n 'autoComplete',\n 'autoFocus',\n 'className',\n 'defaultValue',\n 'dir',\n 'disabled',\n 'form',\n 'id',\n 'multiple',\n 'name',\n 'onBlur',\n 'onChange',\n 'onClick',\n 'onFocus',\n 'onInput',\n 'onInvalid',\n 'onKeyDown',\n 'onKeyUp',\n 'onMouseDown',\n 'onMouseUp',\n 'onPointerDown',\n 'onPointerUp',\n 'required',\n 'role',\n 'size',\n 'style',\n 'tabIndex',\n 'title',\n 'value',\n]);\n\nexport function sanitizeSelectProps<T extends Record<string, unknown>>(props: T) {\n return Object.fromEntries(\n Object.entries(props).filter(\n ([key]) => key.startsWith('data-') || key.startsWith('aria-') || selectKeys.has(key)\n )\n ) as Partial<T>;\n}\n","import cx from 'classix';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\nimport { resolveColor, useTouched } from '@/utils.ts';\n\nimport { sanitizeSelectProps } from './sanitizeSelectProps';\nimport styles from './styles.module.css';\n\nexport type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {\n children: React.ReactNode;\n label?: string;\n placeholder?: string;\n};\n\ntype withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n};\n\nexport const Select = ({ children, label, placeholder, ...props }: SelectProps) => {\n const { touched, onBlur } = useTouched(props.value === '');\n const selectProps = sanitizeSelectProps(props);\n const { style, ...restSelectProps } = selectProps;\n const withVars = {\n ...style,\n '--icon-svg': iconSVG('chevron').replace(\n 'currentColor',\n resolveColor('--colors-semantic-content-secondary')\n ),\n } satisfies withVars;\n\n const selectElement = (\n <select\n className={cx(styles.select, touched && styles.touched)}\n onBlur={onBlur}\n style={withVars}\n {...restSelectProps}\n >\n {placeholder && (\n <option\n key='placeholder'\n value={''}\n hidden\n >\n {placeholder}\n </option>\n )}\n {children}\n </select>\n );\n\n if (!label) {\n return selectElement;\n }\n\n return (\n <label>\n <span className={cx(styles.label, props.required && styles.required)}>{label}</span>\n {selectElement}\n </label>\n );\n};\n"],"names":["selectKeys","Set","sanitizeSelectProps","props","Object","fromEntries","entries","filter","key","startsWith","has","Select","children","label","placeholder","touched","onBlur","useTouched","value","selectProps","style","restSelectProps","withVars","iconSVG","replace","resolveColor","selectElement","jsxs","cx","styles","select","jsx","required"],"mappings":";;;;AAAA,MAAMA,IAAa,oBAAIC,IAAI,CACzB,yBACA,qBACA,aACA,iBACA,oBACA,gBACA,iBACA,qBACA,iBACA,iBACA,eACA,gBACA,qBACA,cACA,mBACA,aACA,aACA,iBACA,wBACA,gBACA,aACA,aACA,gBACA,OACA,YACA,QACA,MACA,YACA,QACA,UACA,YACA,WACA,WACA,WACA,aACA,aACA,WACA,eACA,aACA,iBACA,eACA,YACA,QACA,QACA,SACA,YACA,SACA,OAAO,CACR;AAEM,SAASC,EAAuDC,GAAU;AAC/E,SAAOC,OAAOC,YACZD,OAAOE,QAAQH,CAAK,EAAEI,OACpB,CAAC,CAACC,CAAG,MAAMA,EAAIC,WAAW,OAAO,KAAKD,EAAIC,WAAW,OAAO,KAAKT,EAAWU,IAAIF,CAAG,CACrF,CACF;AACF;;;;;;GCvCaG,IAASA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,OAAAA;AAAAA,EAAOC,aAAAA;AAAAA,EAAa,GAAGX;AAAmB,MAAM;AACjF,QAAM;AAAA,IAAEY,SAAAA;AAAAA,IAASC,QAAAA;AAAAA,EAAAA,IAAWC,EAAWd,EAAMe,UAAU,EAAE,GACnDC,IAAcjB,EAAoBC,CAAK,GACvC;AAAA,IAAEiB,OAAAA;AAAAA,IAAO,GAAGC;AAAAA,EAAAA,IAAoBF,GAChCG,IAAW;AAAA,IACf,GAAGF;AAAAA,IACH,cAAcG,EAAQ,SAAS,EAAEC,QAC/B,gBACAC,EAAa,qCAAqC,CACpD;AAAA,EAAA,GAGIC,IACJ,gBAAAC,EAAC,UAAA,EACC,WAAWC,EAAGC,EAAOC,QAAQf,KAAWc,EAAOd,OAAO,GACtD,QAAAC,GACA,OAAOM,GACP,GAAID,GAEHP,UAAAA;AAAAA,IAAAA,uBACE,UAAA,EAEC,OAAO,IACP,QAAM,IAELA,eAJG,aAKN;AAAA,IAEDF;AAAAA,EAAAA,GACH;AAGF,SAAKC,IAKH,gBAAAc,EAAC,SAAA,EAAK,kBAAA,UACJ,UAAA;AAAA,IAAA,gBAAAI,EAAC,QAAA,EAAK,WAAWH,EAAGC,EAAOhB,OAAOV,EAAM6B,YAAYH,EAAOG,QAAQ,GAAInB,UAAAA,EAAAA,CAAM;AAAA,IAC5Ea;AAAAA,EAAAA,GACH,IAPOA;AASX;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";require('./assets/index41.css');const t=require("react/jsx-runtime"),n=require("./classix-5H4IWnMA.cjs"),_=require("./icons-C_cX1FYp.cjs"),c=require("./utils-DBzf7CFq.cjs"),q=new Set(["aria-activedescendant","aria-autocomplete","aria-busy","aria-controls","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-required","aria-roledescription","autoComplete","autoFocus","className","defaultValue","dir","disabled","form","id","multiple","name","onBlur","onChange","onClick","onFocus","onInput","onInvalid","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","required","role","size","style","tabIndex","title","value"]);function l(r){return Object.fromEntries(Object.entries(r).filter(([e])=>e.startsWith("data-")||e.startsWith("aria-")||q.has(e)))}const v="_select_8a7r8_1",y="_touched_8a7r8_25",x="_label_8a7r8_31",j="_required_8a7r8_35",a={select:v,touched:y,label:x,required:j},S=({children:r,label:e,placeholder:o,...s})=>{const{touched:u,onBlur:d}=c.useTouched(s.value===""),h=l(s),{style:p,...b}=h,m={...p,"--icon-svg":_.iconSVG("chevron").replace("currentColor",c.resolveColor("--colors-semantic-content-secondary"))},i=t.jsxs("select",{className:n.t(a.select,u&&a.touched),onBlur:d,style:m,...b,children:[o&&t.jsx("option",{value:"",hidden:!0,children:o},"placeholder"),r]});return e?t.jsxs("label",{"data-component":"select",children:[t.jsx("span",{className:n.t(a.label,s.required&&a.required),children:e}),i]}):i};exports.Select=S;exports.sanitizeSelectProps=l;
|
|
2
|
+
//# sourceMappingURL=index-ClrKYsAQ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-ClrKYsAQ.cjs","sources":["../src/components/select/sanitizeSelectProps.ts","../src/components/select/index.tsx"],"sourcesContent":["const selectKeys = new Set([\n 'aria-activedescendant',\n 'aria-autocomplete',\n 'aria-busy',\n 'aria-controls',\n 'aria-describedby',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-live',\n 'aria-owns',\n 'aria-required',\n 'aria-roledescription',\n 'autoComplete',\n 'autoFocus',\n 'className',\n 'defaultValue',\n 'dir',\n 'disabled',\n 'form',\n 'id',\n 'multiple',\n 'name',\n 'onBlur',\n 'onChange',\n 'onClick',\n 'onFocus',\n 'onInput',\n 'onInvalid',\n 'onKeyDown',\n 'onKeyUp',\n 'onMouseDown',\n 'onMouseUp',\n 'onPointerDown',\n 'onPointerUp',\n 'required',\n 'role',\n 'size',\n 'style',\n 'tabIndex',\n 'title',\n 'value',\n]);\n\nexport function sanitizeSelectProps<T extends Record<string, unknown>>(props: T) {\n return Object.fromEntries(\n Object.entries(props).filter(\n ([key]) => key.startsWith('data-') || key.startsWith('aria-') || selectKeys.has(key)\n )\n ) as Partial<T>;\n}\n","import cx from 'classix';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\nimport { resolveColor, useTouched } from '@/utils.ts';\n\nimport { sanitizeSelectProps } from './sanitizeSelectProps';\nimport styles from './styles.module.css';\n\nexport type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {\n children: React.ReactNode;\n label?: string;\n placeholder?: string;\n};\n\ntype withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n};\n\nexport const Select = ({ children, label, placeholder, ...props }: SelectProps) => {\n const { touched, onBlur } = useTouched(props.value === '');\n const selectProps = sanitizeSelectProps(props);\n const { style, ...restSelectProps } = selectProps;\n const withVars = {\n ...style,\n '--icon-svg': iconSVG('chevron').replace(\n 'currentColor',\n resolveColor('--colors-semantic-content-secondary')\n ),\n } satisfies withVars;\n\n const selectElement = (\n <select\n className={cx(styles.select, touched && styles.touched)}\n onBlur={onBlur}\n style={withVars}\n {...restSelectProps}\n >\n {placeholder && (\n <option\n key='placeholder'\n value={''}\n hidden\n >\n {placeholder}\n </option>\n )}\n {children}\n </select>\n );\n\n if (!label) {\n return selectElement;\n }\n\n return (\n <label>\n <span className={cx(styles.label, props.required && styles.required)}>{label}</span>\n {selectElement}\n </label>\n );\n};\n"],"names":["selectKeys","Set","sanitizeSelectProps","props","Object","fromEntries","entries","filter","key","startsWith","has","Select","children","label","placeholder","touched","onBlur","useTouched","value","selectProps","style","restSelectProps","withVars","iconSVG","replace","resolveColor","selectElement","jsxs","cx","styles","select","jsx","required"],"mappings":"0JAAMA,EAAa,IAAIC,IAAI,CACzB,wBACA,oBACA,YACA,gBACA,mBACA,eACA,gBACA,oBACA,gBACA,gBACA,cACA,eACA,oBACA,aACA,kBACA,YACA,YACA,gBACA,uBACA,eACA,YACA,YACA,eACA,MACA,WACA,OACA,KACA,WACA,OACA,SACA,WACA,UACA,UACA,UACA,YACA,YACA,UACA,cACA,YACA,gBACA,cACA,WACA,OACA,OACA,QACA,WACA,QACA,OAAO,CACR,EAEM,SAASC,EAAuDC,EAAU,CAC/E,OAAOC,OAAOC,YACZD,OAAOE,QAAQH,CAAK,EAAEI,OACpB,CAAC,CAACC,CAAG,IAAMA,EAAIC,WAAW,OAAO,GAAKD,EAAIC,WAAW,OAAO,GAAKT,EAAWU,IAAIF,CAAG,CACrF,CACF,CACF,sICvCaG,EAASA,CAAC,CAAEC,SAAAA,EAAUC,MAAAA,EAAOC,YAAAA,EAAa,GAAGX,CAAmB,IAAM,CACjF,KAAM,CAAEY,QAAAA,EAASC,OAAAA,CAAAA,EAAWC,aAAWd,EAAMe,QAAU,EAAE,EACnDC,EAAcjB,EAAoBC,CAAK,EACvC,CAAEiB,MAAAA,EAAO,GAAGC,CAAAA,EAAoBF,EAChCG,EAAW,CACf,GAAGF,EACH,aAAcG,EAAAA,QAAQ,SAAS,EAAEC,QAC/B,eACAC,EAAAA,aAAa,qCAAqC,CACpD,CAAA,EAGIC,EACJC,EAAAA,KAAC,SAAA,CACC,UAAWC,EAAAA,EAAGC,EAAOC,OAAQf,GAAWc,EAAOd,OAAO,EACtD,OAAAC,EACA,MAAOM,EACP,GAAID,EAEHP,SAAAA,CAAAA,SACE,SAAA,CAEC,MAAO,GACP,OAAM,GAELA,YAJG,aAKN,EAEDF,CAAAA,EACH,EAGF,OAAKC,EAKHc,EAAAA,KAAC,QAAA,CAAK,iBAAA,SACJ,SAAA,CAAAI,EAAAA,IAAC,OAAA,CAAK,UAAWH,EAAAA,EAAGC,EAAOhB,MAAOV,EAAM6B,UAAYH,EAAOG,QAAQ,EAAInB,SAAAA,CAAAA,CAAM,EAC5Ea,CAAAA,EACH,EAPOA,CASX"}
|
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"),r=require("./components/_croppable/index.cjs"),t=require("./components/_dropdown/index.cjs"),i=require("./components/_dropzone/index.cjs"),s=require("./components/_editor/index.cjs"),c=require("./components/_messages/index.cjs"),_=require("./components/_portal/index.cjs"),
|
|
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"),r=require("./components/_croppable/index.cjs"),t=require("./components/_dropdown/index.cjs"),i=require("./components/_dropzone/index.cjs"),s=require("./components/_editor/index.cjs"),c=require("./components/_messages/index.cjs"),_=require("./components/_portal/index.cjs"),d=require("./components/_sortable/index.cjs"),a=require("./components/_toasts/index.cjs"),p=require("./components/_widget/index.cjs"),u=require("./components/accordion/index.cjs"),m=require("./components/app-link/index.cjs"),x=require("./components/aside/index.cjs"),l=require("./components/badge/index.cjs"),q=require("./components/banner/index.cjs"),g=require("./components/branding/index.cjs"),b=require("./components/button/index.cjs"),T=require("./components/checkbox/index.cjs"),C=require("./components/controls/index.cjs"),k=require("./components/dialog/index.cjs"),L=require("./components/figure/index.cjs"),A=require("./components/file/index.cjs"),B=require("./components/footer/index.cjs"),F=require("./components/form/index.cjs"),h=require("./components/graph/index.cjs"),v=require("./components/group/index.cjs"),D=require("./components/header/index.cjs"),I=require("./components/icon/index.cjs"),S=require("./components/image/index.cjs"),f=require("./components/input/index.cjs"),M=require("./components/link/index.cjs"),j=require("./components/list/index.cjs"),w=require("./components/loading/index.cjs"),G=require("./components/message/index.cjs"),z=require("./components/nav/index.cjs"),O=require("./components/object/index.cjs"),P=require("./index-ClrKYsAQ.cjs"),y=require("./components/table/index.cjs"),E=require("./components/textarea/index.cjs"),H=require("./components/toast/index.cjs"),N=require("./components/toggle/index.cjs"),W=require("./components/toolbar/index.cjs");exports.Avatar=e.Avatar;exports.Card=n.Card;exports.Collapsible=o.Collapsible;exports.Croppable=r.Croppable;exports.Dropdown=t.Dropdown;exports.Dropzone=i.Dropzone;exports.Editor=s.Editor;exports.Messages=c.Messages;exports.Portal=_.Portal;exports.Sortable=d.Sortable;exports.Toasts=a.Toasts;exports.Widget=p.Widget;exports.Accordion=u.Accordion;exports.AppLink=m.AppLink;exports.Aside=x.Aside;exports.Badge=l.Badge;exports.Banner=q.Banner;exports.Branding=g.Branding;exports.Button=b.Button;exports.Checkbox=T.Checkbox;exports.Controls=C.Controls;exports.Dialog=k.Dialog;exports.Figure=L.Figure;exports.File=A.File;exports.Footer=B.Footer;exports.Form=F.Form;exports.Graph=h.Graph;exports.Group=v.Group;exports.Header=D.Header;exports.Icon=I.Icon;exports.Image=S.Image;exports.Input=f.Input;exports.Link=M.Link;exports.List=j.List;exports.Loading=w.Loading;exports.Message=G.Message;exports.Nav=z.Nav;exports.Object=O.Object;exports.Select=P.Select;exports.Table=y.Table;exports.Textarea=E.Textarea;exports.Toast=H.Toast;exports.Toggle=N.Toggle;exports.Toolbar=W.Toolbar;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
3
|
import { default as default_2 } from 'react';
|
|
3
4
|
import { ImgHTMLAttributes } from 'react';
|
|
4
5
|
import { JSX } from 'react/jsx-runtime';
|
|
@@ -29,18 +30,19 @@ declare type AsideProps = {
|
|
|
29
30
|
variant?: keyof typeof variants;
|
|
30
31
|
};
|
|
31
32
|
|
|
32
|
-
export declare const Avatar: ({
|
|
33
|
+
export declare const Avatar: ({ accessibleLabel, imageUrl, link }: AvatarProps) => JSX.Element;
|
|
33
34
|
|
|
34
35
|
declare type AvatarProps = {
|
|
36
|
+
accessibleLabel?: string;
|
|
35
37
|
imageUrl?: string;
|
|
36
|
-
label?: string;
|
|
37
38
|
link?: string;
|
|
38
39
|
};
|
|
39
40
|
|
|
40
|
-
export declare const Badge: ({ children, onDelete, variant }: BadgeProps) => JSX.Element;
|
|
41
|
+
export declare const Badge: ({ children, deleteAccessibleLabel, onDelete, variant, }: BadgeProps) => JSX.Element;
|
|
41
42
|
|
|
42
43
|
declare type BadgeProps = {
|
|
43
44
|
children?: React.ReactNode;
|
|
45
|
+
deleteAccessibleLabel?: string;
|
|
44
46
|
onDelete?: () => void;
|
|
45
47
|
variant?: keyof typeof variants_2;
|
|
46
48
|
};
|
|
@@ -106,9 +108,11 @@ declare type CollapsibleProps = {
|
|
|
106
108
|
label?: default_2.ReactNode;
|
|
107
109
|
};
|
|
108
110
|
|
|
109
|
-
export declare const Controls: ({ children, ...props }: ControlsProps) => JSX.Element;
|
|
111
|
+
export declare const Controls: ({ children, onSaveShortcut, ...props }: ControlsProps) => JSX.Element;
|
|
110
112
|
|
|
111
|
-
declare type ControlsProps = React.ComponentPropsWithoutRef<'menu'> & {
|
|
113
|
+
declare type ControlsProps = React.ComponentPropsWithoutRef<'menu'> & {
|
|
114
|
+
onSaveShortcut?: () => void;
|
|
115
|
+
};
|
|
112
116
|
|
|
113
117
|
export declare const Croppable: ({ children, fill, height, image, label, onCroppableChange, onFileChange, onImageChange, onTransformChange, transform, standalone, }: CroppableProps) => JSX.Element;
|
|
114
118
|
|
|
@@ -174,19 +178,20 @@ declare type EditorProps = {
|
|
|
174
178
|
onChange?: (html: string) => void;
|
|
175
179
|
};
|
|
176
180
|
|
|
177
|
-
export declare const Figure: ({ children, className,
|
|
181
|
+
export declare const Figure: ({ accessibleLabel, children, className, offset }: FigureProps) => JSX.Element;
|
|
178
182
|
|
|
179
183
|
declare type FigureProps = {
|
|
184
|
+
accessibleLabel?: string;
|
|
180
185
|
children?: React.ReactNode;
|
|
181
186
|
className?: string;
|
|
182
|
-
label?: string;
|
|
183
187
|
offset?: 'left' | 'right';
|
|
184
188
|
};
|
|
185
189
|
|
|
186
|
-
declare const File_2: ({ name, onClick, onDelete, ref, url }: FileProps) => JSX.Element;
|
|
190
|
+
declare const File_2: ({ deleteAccessibleLabel, name, onClick, onDelete, ref, url }: FileProps) => JSX.Element;
|
|
187
191
|
export { File_2 as File }
|
|
188
192
|
|
|
189
193
|
declare type FileProps = React.ComponentPropsWithRef<'div'> & {
|
|
194
|
+
deleteAccessibleLabel?: string;
|
|
190
195
|
name: string;
|
|
191
196
|
onClick?: () => void;
|
|
192
197
|
onDelete?: () => void;
|
|
@@ -209,7 +214,7 @@ declare type FormProps = React.FormHTMLAttributes<HTMLFormElement> & {
|
|
|
209
214
|
inline?: boolean;
|
|
210
215
|
};
|
|
211
216
|
|
|
212
|
-
export declare const Graph: ({ className, height, items,
|
|
217
|
+
export declare const Graph: ({ accessibleLabel, className, height, items, style, valueFormatter, ...props }: GraphProps) => JSX.Element;
|
|
213
218
|
|
|
214
219
|
declare type GraphItem = {
|
|
215
220
|
color?: string;
|
|
@@ -218,9 +223,9 @@ declare type GraphItem = {
|
|
|
218
223
|
};
|
|
219
224
|
|
|
220
225
|
declare type GraphProps = Omit<React.ComponentPropsWithoutRef<'figure'>, 'children'> & {
|
|
226
|
+
accessibleLabel?: string;
|
|
221
227
|
height?: string;
|
|
222
228
|
items?: GraphItem[];
|
|
223
|
-
label?: string;
|
|
224
229
|
valueFormatter?: (value: number) => string;
|
|
225
230
|
};
|
|
226
231
|
|
|
@@ -301,7 +306,7 @@ declare type ImageProps = ImgHTMLAttributes<HTMLImageElement> & {
|
|
|
301
306
|
showOnError?: boolean;
|
|
302
307
|
};
|
|
303
308
|
|
|
304
|
-
export declare function Input({ className, defaultCountryCode, disabled, icon, label, placeholder, ref, type, ...props }: InputProps): JSX.Element;
|
|
309
|
+
export declare function Input({ className, defaultCountryCode, disabled, icon, label, placeholder, ref, required, type, ...props }: InputProps): JSX.Element;
|
|
305
310
|
|
|
306
311
|
declare type InputProps = React.ComponentPropsWithRef<'input'> & {
|
|
307
312
|
defaultCountryCode?: string;
|
|
@@ -313,14 +318,6 @@ declare type InputProps = React.ComponentPropsWithRef<'input'> & {
|
|
|
313
318
|
type?: 'date' | 'datetime-local' | 'email' | 'number' | 'password' | 'radio' | 'search' | 'tel' | 'text';
|
|
314
319
|
};
|
|
315
320
|
|
|
316
|
-
export declare const Layout: ({ children, isLoading, feature, ...props }: LayoutProps) => JSX.Element;
|
|
317
|
-
|
|
318
|
-
declare type LayoutProps = {
|
|
319
|
-
children: React.ReactNode;
|
|
320
|
-
feature: string;
|
|
321
|
-
isLoading?: boolean;
|
|
322
|
-
};
|
|
323
|
-
|
|
324
321
|
export declare const Link: ({ children, className, to, variant, ...props }: LinkProps) => JSX.Element;
|
|
325
322
|
|
|
326
323
|
declare type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
@@ -389,9 +386,18 @@ declare type NavProps = React.HTMLAttributes<HTMLElement> & {
|
|
|
389
386
|
variant?: keyof typeof variants_7;
|
|
390
387
|
};
|
|
391
388
|
|
|
392
|
-
|
|
389
|
+
declare const Object_2: ({ accessibleLabel, url, ...props }: ObjectProps) => JSX.Element;
|
|
390
|
+
export { Object_2 as Object }
|
|
391
|
+
|
|
392
|
+
declare type ObjectProps = Omit<ComponentPropsWithoutRef<'object'>, 'data' | 'type'> & {
|
|
393
|
+
accessibleLabel: string;
|
|
394
|
+
url: string;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
export declare const Portal: ({ accessibleLabel, children, portals, open, }: PortalProps) => JSX.Element;
|
|
393
398
|
|
|
394
399
|
declare type PortalProps = {
|
|
400
|
+
accessibleLabel?: string;
|
|
395
401
|
children?: React.ReactNode;
|
|
396
402
|
portals?: React.ReactNode;
|
|
397
403
|
open?: boolean;
|
|
@@ -418,7 +424,7 @@ export declare function Sortable({ children, className, columns, onChangeOrder,
|
|
|
418
424
|
|
|
419
425
|
declare type SortableProps = default_2.ComponentPropsWithoutRef<'ol'> & {
|
|
420
426
|
columns?: number;
|
|
421
|
-
onChangeOrder
|
|
427
|
+
onChangeOrder: (order: SortItem[]) => void;
|
|
422
428
|
};
|
|
423
429
|
|
|
424
430
|
declare type SortItem = {
|
|
@@ -450,7 +456,7 @@ declare type ToastItem = ToastOptions & {
|
|
|
450
456
|
export declare type ToastOptions = {
|
|
451
457
|
durationMs?: number;
|
|
452
458
|
label: string;
|
|
453
|
-
type?: 'error' | '
|
|
459
|
+
type?: 'error' | 'success';
|
|
454
460
|
};
|
|
455
461
|
|
|
456
462
|
declare type ToastProps = ToastOptions & {
|