@xanui/ui 1.1.69 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Autocomplete/index.cjs +1 -0
- package/Autocomplete/index.cjs.map +1 -1
- package/Autocomplete/index.js +1 -0
- package/Autocomplete/index.js.map +1 -1
- package/Avatar/index.cjs +1 -0
- package/Avatar/index.cjs.map +1 -1
- package/Avatar/index.js +1 -0
- package/Avatar/index.js.map +1 -1
- package/Badge/index.cjs +1 -0
- package/Badge/index.cjs.map +1 -1
- package/Badge/index.js +1 -0
- package/Badge/index.js.map +1 -1
- package/Box/index.cjs +1 -0
- package/Box/index.cjs.map +1 -1
- package/Box/index.js +1 -0
- package/Box/index.js.map +1 -1
- package/ButtonGroup/index.cjs +1 -0
- package/ButtonGroup/index.cjs.map +1 -1
- package/ButtonGroup/index.js +1 -0
- package/ButtonGroup/index.js.map +1 -1
- package/Chip/index.cjs +1 -0
- package/Chip/index.cjs.map +1 -1
- package/Chip/index.js +1 -0
- package/Chip/index.js.map +1 -1
- package/Collaps/index.cjs +1 -0
- package/Collaps/index.cjs.map +1 -1
- package/Collaps/index.js +1 -0
- package/Collaps/index.js.map +1 -1
- package/Container/index.cjs +1 -0
- package/Container/index.cjs.map +1 -1
- package/Container/index.js +1 -0
- package/Container/index.js.map +1 -1
- package/Datatable/SelectedBox.cjs +1 -0
- package/Datatable/SelectedBox.cjs.map +1 -1
- package/Datatable/SelectedBox.js +1 -0
- package/Datatable/SelectedBox.js.map +1 -1
- package/Datatable/Table.cjs.map +1 -1
- package/Datatable/Table.js.map +1 -1
- package/Divider/index.cjs +1 -0
- package/Divider/index.cjs.map +1 -1
- package/Divider/index.js +1 -0
- package/Divider/index.js.map +1 -1
- package/GridContainer/index.cjs +1 -0
- package/GridContainer/index.cjs.map +1 -1
- package/GridContainer/index.js +1 -0
- package/GridContainer/index.js.map +1 -1
- package/GridItem/index.cjs +1 -0
- package/GridItem/index.cjs.map +1 -1
- package/GridItem/index.js +1 -0
- package/GridItem/index.js.map +1 -1
- package/Image/index.cjs.map +1 -1
- package/Image/index.js.map +1 -1
- package/Label/index.cjs +1 -0
- package/Label/index.cjs.map +1 -1
- package/Label/index.js +1 -0
- package/Label/index.js.map +1 -1
- package/List/index.cjs +1 -0
- package/List/index.cjs.map +1 -1
- package/List/index.js +1 -0
- package/List/index.js.map +1 -1
- package/ListItem/index.cjs +1 -0
- package/ListItem/index.cjs.map +1 -1
- package/ListItem/index.js +1 -0
- package/ListItem/index.js.map +1 -1
- package/LoadingBox/index.cjs +1 -0
- package/LoadingBox/index.cjs.map +1 -1
- package/LoadingBox/index.js +1 -0
- package/LoadingBox/index.js.map +1 -1
- package/Option/index.cjs +1 -0
- package/Option/index.cjs.map +1 -1
- package/Option/index.js +1 -0
- package/Option/index.js.map +1 -1
- package/Paper/index.cjs +1 -0
- package/Paper/index.cjs.map +1 -1
- package/Paper/index.js +1 -0
- package/Paper/index.js.map +1 -1
- package/Radio/index.cjs +1 -0
- package/Radio/index.cjs.map +1 -1
- package/Radio/index.js +1 -0
- package/Radio/index.js.map +1 -1
- package/Scrollbar/index.cjs.map +1 -1
- package/Scrollbar/index.js.map +1 -1
- package/Select/index.cjs.map +1 -1
- package/Select/index.js.map +1 -1
- package/Skeleton/index.cjs +1 -0
- package/Skeleton/index.cjs.map +1 -1
- package/Skeleton/index.js +1 -0
- package/Skeleton/index.js.map +1 -1
- package/Stack/index.cjs +1 -0
- package/Stack/index.cjs.map +1 -1
- package/Stack/index.js +1 -0
- package/Stack/index.js.map +1 -1
- package/Switch/index.cjs.map +1 -1
- package/Switch/index.js.map +1 -1
- package/Tab/index.cjs.map +1 -1
- package/Tab/index.js.map +1 -1
- package/Table/index.cjs +1 -0
- package/Table/index.cjs.map +1 -1
- package/Table/index.js +1 -0
- package/Table/index.js.map +1 -1
- package/TableBody/index.cjs +1 -0
- package/TableBody/index.cjs.map +1 -1
- package/TableBody/index.js +1 -0
- package/TableBody/index.js.map +1 -1
- package/TableCell/index.cjs +1 -0
- package/TableCell/index.cjs.map +1 -1
- package/TableCell/index.js +1 -0
- package/TableCell/index.js.map +1 -1
- package/TableFooter/index.cjs +1 -0
- package/TableFooter/index.cjs.map +1 -1
- package/TableFooter/index.js +1 -0
- package/TableFooter/index.js.map +1 -1
- package/TableHead/index.cjs +1 -0
- package/TableHead/index.cjs.map +1 -1
- package/TableHead/index.js +1 -0
- package/TableHead/index.js.map +1 -1
- package/TablePagination/index.cjs.map +1 -1
- package/TablePagination/index.js.map +1 -1
- package/TableRow/index.cjs +1 -0
- package/TableRow/index.cjs.map +1 -1
- package/TableRow/index.js +1 -0
- package/TableRow/index.js.map +1 -1
- package/Tabs/index.cjs.map +1 -1
- package/Tabs/index.js.map +1 -1
- package/Text/index.cjs +1 -0
- package/Text/index.cjs.map +1 -1
- package/Text/index.js +1 -0
- package/Text/index.js.map +1 -1
- package/Toast/index.cjs.map +1 -1
- package/Toast/index.js.map +1 -1
- package/Tooltip/index.cjs.map +1 -1
- package/Tooltip/index.js.map +1 -1
- package/ViewBox/index.cjs +1 -0
- package/ViewBox/index.cjs.map +1 -1
- package/ViewBox/index.js +1 -0
- package/ViewBox/index.js.map +1 -1
- package/package.json +1 -1
- package/useBlurCss/index.cjs +1 -0
- package/useBlurCss/index.cjs.map +1 -1
- package/useBlurCss/index.js +1 -0
- package/useBlurCss/index.js.map +1 -1
- package/useContextMenu/index.cjs +1 -0
- package/useContextMenu/index.cjs.map +1 -1
- package/useContextMenu/index.js +1 -0
- package/useContextMenu/index.js.map +1 -1
- package/useCorner/index.cjs +1 -0
- package/useCorner/index.cjs.map +1 -1
- package/useCorner/index.js +1 -0
- package/useCorner/index.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectedBox.js","sources":["../../src/Datatable/SelectedBox.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"SelectedBox.js","sources":["../../src/Datatable/SelectedBox.tsx"],"sourcesContent":["\"use client\"\nimport IconButton from '../IconButton'\nimport Stack from '../Stack'\nimport Text from '../Text'\nimport { DatatablePropsWithState } from './types'\n\nconst SelectedBox = (props: DatatablePropsWithState) => {\n let {\n state,\n rowAction\n } = props\n\n let checked = state.selectAll || !!state.selected.length\n if (!checked) return <></>\n\n return (\n <Stack\n bgcolor=\"background.secondary\"\n direction=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n zIndex={1}\n radius={1}\n mb={1}\n height={50}\n width=\"100%\"\n px={1.5}\n >\n <Text fontWeight={600}>Selected: {state.selected.length}</Text>\n <Stack\n flexRow\n gap={1}\n >\n {rowAction && rowAction({ row: null, state }).map(({ label, icon, ...bprops }) => {\n return (\n <IconButton\n key={label}\n variant=\"soft\"\n color=\"brand\"\n {...bprops}\n >\n {icon}\n </IconButton>\n )\n })}\n </Stack>\n </Stack>\n )\n}\n\nexport default SelectedBox"],"names":[],"mappings":";;;;;;;AAMA;AACG;AAKA;AACA;AAAc;AAEd;;AAmBY;AAUH;AAIZ;;"}
|
package/Datatable/Table.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.cjs","sources":["../../src/Datatable/Table.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"Table.cjs","sources":["../../src/Datatable/Table.tsx"],"sourcesContent":["\"use client\";\nimport TableHead from './TableHead'\nimport Table from '../Table'\nimport TableBody from '../TableBody'\nimport Row from './Row'\nimport { DatatablePropsWithState } from './types';\n\nconst TableArea = (props: DatatablePropsWithState) => {\n let {\n rows,\n compact,\n renderRow,\n state,\n update,\n slotProps\n } = props\n\n return (\n <Table width=\"100%\" size={compact ? \"small\" : \"medium\"} border=\"1px solid\" borderColor=\"divider\" {...slotProps?.table}>\n <TableHead {...props} update={update} state={state} />\n <TableBody\n sx={{\n '& tr:last-child td': {\n borderBottom: 0\n }\n }}\n >\n {\n rows?.map((row: any, idx) => {\n let _row = renderRow ? renderRow(structuredClone(row), state) : row\n return <Row\n key={`dt-row-${row.id}-${idx}`}\n rawRow={row}\n row={_row}\n {...props}\n update={update}\n state={state}\n />\n })\n }\n </TableBody>\n </Table>\n )\n}\n\nexport default TableArea"],"names":[],"mappings":";;;;;;;;;AAOA;AACG;;AAcY;AACG;AACF;AACH;AAIK;AACA;AAQH;AAKf;;"}
|
package/Datatable/Table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sources":["../../src/Datatable/Table.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../src/Datatable/Table.tsx"],"sourcesContent":["\"use client\";\nimport TableHead from './TableHead'\nimport Table from '../Table'\nimport TableBody from '../TableBody'\nimport Row from './Row'\nimport { DatatablePropsWithState } from './types';\n\nconst TableArea = (props: DatatablePropsWithState) => {\n let {\n rows,\n compact,\n renderRow,\n state,\n update,\n slotProps\n } = props\n\n return (\n <Table width=\"100%\" size={compact ? \"small\" : \"medium\"} border=\"1px solid\" borderColor=\"divider\" {...slotProps?.table}>\n <TableHead {...props} update={update} state={state} />\n <TableBody\n sx={{\n '& tr:last-child td': {\n borderBottom: 0\n }\n }}\n >\n {\n rows?.map((row: any, idx) => {\n let _row = renderRow ? renderRow(structuredClone(row), state) : row\n return <Row\n key={`dt-row-${row.id}-${idx}`}\n rawRow={row}\n row={_row}\n {...props}\n update={update}\n state={state}\n />\n })\n }\n </TableBody>\n </Table>\n )\n}\n\nexport default TableArea"],"names":[],"mappings":";;;;;;;AAOA;AACG;;AAcY;AACG;AACF;AACH;AAIK;AACA;AAQH;AAKf;;"}
|
package/Divider/index.cjs
CHANGED
package/Divider/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Divider/index.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Divider/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, UseColorTemplateColor, useBreakpointProps, useBreakpointPropsType } from '@xanui/core';\n\n\nexport type DividerProps<T extends TagComponentType = \"div\"> = Omit<TagProps<T>, \"color\"> & {\n direction?: useBreakpointPropsType<\"verticle\" | \"horizental\">;\n color?: useBreakpointPropsType<UseColorTemplateColor>;\n size?: useBreakpointPropsType<number>;\n}\n\nconst Divider = React.forwardRef(<T extends TagComponentType = \"div\">({ children, direction, color, size, ...rest }: DividerProps<T>, ref: React.Ref<any>) => {\n const _p: any = {}\n if (direction) _p.direction = direction\n if (color) _p.color = color\n if (size) _p.size = size\n const p: any = useBreakpointProps(_p)\n direction = p.direction ?? \"horizental\"\n color = p.color ?? \"default\"\n size = p.size ?? 1\n\n let isHori = direction === 'horizental'\n\n return (\n <Tag\n {...rest}\n baseClass='divider'\n sxr={{\n width: isHori ? \"100%\" : size,\n height: isHori ? size : \"100%\",\n bgcolor: color === 'default' ? `background.secondary` : `${color}.secondary`,\n }}\n ref={ref}\n >{children}</Tag>\n )\n})\n\nexport default Divider\n\n"],"names":[],"mappings":";;;;;;;;AAWA;;AAAsE;;AAElE;AAAe;AACf;AAAW;AACX;AAAU;AACV;AACA;AACA;AACA;AAEA;;;;AASY;AACH;AAIb;;"}
|
package/Divider/index.js
CHANGED
package/Divider/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Divider/index.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Divider/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, UseColorTemplateColor, useBreakpointProps, useBreakpointPropsType } from '@xanui/core';\n\n\nexport type DividerProps<T extends TagComponentType = \"div\"> = Omit<TagProps<T>, \"color\"> & {\n direction?: useBreakpointPropsType<\"verticle\" | \"horizental\">;\n color?: useBreakpointPropsType<UseColorTemplateColor>;\n size?: useBreakpointPropsType<number>;\n}\n\nconst Divider = React.forwardRef(<T extends TagComponentType = \"div\">({ children, direction, color, size, ...rest }: DividerProps<T>, ref: React.Ref<any>) => {\n const _p: any = {}\n if (direction) _p.direction = direction\n if (color) _p.color = color\n if (size) _p.size = size\n const p: any = useBreakpointProps(_p)\n direction = p.direction ?? \"horizental\"\n color = p.color ?? \"default\"\n size = p.size ?? 1\n\n let isHori = direction === 'horizental'\n\n return (\n <Tag\n {...rest}\n baseClass='divider'\n sxr={{\n width: isHori ? \"100%\" : size,\n height: isHori ? size : \"100%\",\n bgcolor: color === 'default' ? `background.secondary` : `${color}.secondary`,\n }}\n ref={ref}\n >{children}</Tag>\n )\n})\n\nexport default Divider\n\n"],"names":[],"mappings":";;;;;;AAWA;;AAAsE;;AAElE;AAAe;AACf;AAAW;AACX;AAAU;AACV;AACA;AACA;AACA;AAEA;;;;AASY;AACH;AAIb;;"}
|
package/GridContainer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/GridContainer/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type GridContainerProps<T extends TagComponentType = \"div\"> = TagProps<T>\nconst GridContainer = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...rest }: GridContainerProps<T>, ref?: React.Ref<any>) => {\n return (\n <Tag\n {...rest}\n sxr={{\n display: \"flex\",\n flexDirection: 'row',\n flexWrap: 'wrap',\n width: '100%',\n }}\n baseClass='grid-container'\n ref={ref}\n >\n {children}\n </Tag>\n )\n})\n\nexport default GridContainer"],"names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/GridContainer/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type GridContainerProps<T extends TagComponentType = \"div\"> = TagProps<T>\nconst GridContainer = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...rest }: GridContainerProps<T>, ref?: React.Ref<any>) => {\n return (\n <Tag\n {...rest}\n sxr={{\n display: \"flex\",\n flexDirection: 'row',\n flexWrap: 'wrap',\n width: '100%',\n }}\n baseClass='grid-container'\n ref={ref}\n >\n {children}\n </Tag>\n )\n})\n\nexport default GridContainer"],"names":[],"mappings":";;;;;;;;AAKA;AAA4E;AACxE;AAIY;AACA;AACA;AACA;;AAQhB;;"}
|
package/GridContainer/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/GridContainer/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type GridContainerProps<T extends TagComponentType = \"div\"> = TagProps<T>\nconst GridContainer = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...rest }: GridContainerProps<T>, ref?: React.Ref<any>) => {\n return (\n <Tag\n {...rest}\n sxr={{\n display: \"flex\",\n flexDirection: 'row',\n flexWrap: 'wrap',\n width: '100%',\n }}\n baseClass='grid-container'\n ref={ref}\n >\n {children}\n </Tag>\n )\n})\n\nexport default GridContainer"],"names":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/GridContainer/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type GridContainerProps<T extends TagComponentType = \"div\"> = TagProps<T>\nconst GridContainer = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...rest }: GridContainerProps<T>, ref?: React.Ref<any>) => {\n return (\n <Tag\n {...rest}\n sxr={{\n display: \"flex\",\n flexDirection: 'row',\n flexWrap: 'wrap',\n width: '100%',\n }}\n baseClass='grid-container'\n ref={ref}\n >\n {children}\n </Tag>\n )\n})\n\nexport default GridContainer"],"names":[],"mappings":";;;;;;AAKA;AAA4E;AACxE;AAIY;AACA;AACA;AACA;;AAQhB;;"}
|
package/GridItem/index.cjs
CHANGED
package/GridItem/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/GridItem/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type GridItemProps<T extends TagComponentType = \"div\"> = TagProps<T> & {\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n}\n\nconst GridItem = React.forwardRef(<T extends TagComponentType = \"div\">({ children, xs, sm, md, lg, xl, ...rest }: GridItemProps<T>, ref?: React.Ref<any>) => {\n\n let w: any = {}\n\n xs && (w.xs = (100 / 12 * xs) + \"%\")\n sm && (w.sm = (100 / 12 * sm) + \"%\")\n md && (w.md = (100 / 12 * md) + \"%\")\n lg && (w.lg = (100 / 12 * lg) + \"%\")\n xl && (w.xl = (100 / 12 * xl) + \"%\")\n\n return (\n <Tag\n ref={ref}\n {...rest}\n maxWidth={w}\n flexBasis={w}\n flexGrow={0}\n baseClass=\"grid-item\"\n >\n {children}\n </Tag>\n )\n})\n\nexport default GridItem"],"names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/GridItem/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type GridItemProps<T extends TagComponentType = \"div\"> = TagProps<T> & {\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n}\n\nconst GridItem = React.forwardRef(<T extends TagComponentType = \"div\">({ children, xs, sm, md, lg, xl, ...rest }: GridItemProps<T>, ref?: React.Ref<any>) => {\n\n let w: any = {}\n\n xs && (w.xs = (100 / 12 * xs) + \"%\")\n sm && (w.sm = (100 / 12 * sm) + \"%\")\n md && (w.md = (100 / 12 * md) + \"%\")\n lg && (w.lg = (100 / 12 * lg) + \"%\")\n xl && (w.xl = (100 / 12 * xl) + \"%\")\n\n return (\n <Tag\n ref={ref}\n {...rest}\n maxWidth={w}\n flexBasis={w}\n flexGrow={0}\n baseClass=\"grid-item\"\n >\n {children}\n </Tag>\n )\n})\n\nexport default GridItem"],"names":[],"mappings":";;;;;;;;AAYA;AAAuE;;AAInE;AACA;AACA;AACA;AACA;AAEA;AAYJ;;"}
|
package/GridItem/index.js
CHANGED
package/GridItem/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/GridItem/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type GridItemProps<T extends TagComponentType = \"div\"> = TagProps<T> & {\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n}\n\nconst GridItem = React.forwardRef(<T extends TagComponentType = \"div\">({ children, xs, sm, md, lg, xl, ...rest }: GridItemProps<T>, ref?: React.Ref<any>) => {\n\n let w: any = {}\n\n xs && (w.xs = (100 / 12 * xs) + \"%\")\n sm && (w.sm = (100 / 12 * sm) + \"%\")\n md && (w.md = (100 / 12 * md) + \"%\")\n lg && (w.lg = (100 / 12 * lg) + \"%\")\n xl && (w.xl = (100 / 12 * xl) + \"%\")\n\n return (\n <Tag\n ref={ref}\n {...rest}\n maxWidth={w}\n flexBasis={w}\n flexGrow={0}\n baseClass=\"grid-item\"\n >\n {children}\n </Tag>\n )\n})\n\nexport default GridItem"],"names":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/GridItem/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type GridItemProps<T extends TagComponentType = \"div\"> = TagProps<T> & {\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n}\n\nconst GridItem = React.forwardRef(<T extends TagComponentType = \"div\">({ children, xs, sm, md, lg, xl, ...rest }: GridItemProps<T>, ref?: React.Ref<any>) => {\n\n let w: any = {}\n\n xs && (w.xs = (100 / 12 * xs) + \"%\")\n sm && (w.sm = (100 / 12 * sm) + \"%\")\n md && (w.md = (100 / 12 * md) + \"%\")\n lg && (w.lg = (100 / 12 * lg) + \"%\")\n xl && (w.xl = (100 / 12 * xl) + \"%\")\n\n return (\n <Tag\n ref={ref}\n {...rest}\n maxWidth={w}\n flexBasis={w}\n flexGrow={0}\n baseClass=\"grid-item\"\n >\n {children}\n </Tag>\n )\n})\n\nexport default GridItem"],"names":[],"mappings":";;;;;;AAYA;AAAuE;;AAInE;AACA;AACA;AACA;AACA;AAEA;AAYJ;;"}
|
package/Image/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Image/index.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Image/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { ReactElement, useState } from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type ImageProps<T extends TagComponentType = \"img\"> = TagProps<T> & {\n errorView?: ReactElement\n}\n\nconst Image = React.forwardRef(<T extends TagComponentType = \"img\">({ children, src, alt, errorView, ...rest }: ImageProps<T>, ref: any) => {\n const [faild, setFaild] = useState<boolean>()\n\n if (faild === false) {\n let t = errorView || alt?.charAt(0).toUpperCase() || children\n return (\n <Tag\n src={src}\n {...rest as any}\n sxr={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n component=\"div\"\n baseClass='image'\n ref={ref}\n >{t}</Tag>\n )\n }\n return (\n <Tag\n objectFit=\"cover\"\n {...rest as any}\n component=\"img\"\n alt={alt}\n src={src}\n baseClass='image'\n onError={(e) => {\n setFaild(false)\n rest.onError && rest.onError(e as any)\n }}\n ref={ref}\n />\n )\n})\n\nexport default Image\n\n\n"],"names":[],"mappings":";;;;;;;;AAQA;AAAoE;;AAGhE;AACI;;AAMY;AACA;AACA;AACH;;AAOb;;;AAWQ;AAIZ;;"}
|
package/Image/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Image/index.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Image/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { ReactElement, useState } from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type ImageProps<T extends TagComponentType = \"img\"> = TagProps<T> & {\n errorView?: ReactElement\n}\n\nconst Image = React.forwardRef(<T extends TagComponentType = \"img\">({ children, src, alt, errorView, ...rest }: ImageProps<T>, ref: any) => {\n const [faild, setFaild] = useState<boolean>()\n\n if (faild === false) {\n let t = errorView || alt?.charAt(0).toUpperCase() || children\n return (\n <Tag\n src={src}\n {...rest as any}\n sxr={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n component=\"div\"\n baseClass='image'\n ref={ref}\n >{t}</Tag>\n )\n }\n return (\n <Tag\n objectFit=\"cover\"\n {...rest as any}\n component=\"img\"\n alt={alt}\n src={src}\n baseClass='image'\n onError={(e) => {\n setFaild(false)\n rest.onError && rest.onError(e as any)\n }}\n ref={ref}\n />\n )\n})\n\nexport default Image\n\n\n"],"names":[],"mappings":";;;;;;AAQA;AAAoE;;AAGhE;AACI;;AAMY;AACA;AACA;AACH;;AAOb;;;AAWQ;AAIZ;;"}
|
package/Label/index.cjs
CHANGED
package/Label/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Label/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type LabelProps<T extends TagComponentType = \"label\"> = TagProps<T>\n\nconst Label = React.forwardRef(<T extends TagComponentType = \"label\">({ children, ...rest }: LabelProps<T>, ref: React.Ref<any>) => {\n return <Tag\n component='label'\n {...rest}\n sxr={{\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"middle\",\n fontSize: \"text\",\n gap: .4,\n color: \"text.primary\",\n userSelect: \"none\",\n cursor: \"pointer\",\n fontWeight: \"500\",\n }}\n baseClass='label'\n ref={ref}\n >{children}</Tag>\n})\n\nexport default Label"],"names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Label/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type LabelProps<T extends TagComponentType = \"label\"> = TagProps<T>\n\nconst Label = React.forwardRef(<T extends TagComponentType = \"label\">({ children, ...rest }: LabelProps<T>, ref: React.Ref<any>) => {\n return <Tag\n component='label'\n {...rest}\n sxr={{\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"middle\",\n fontSize: \"text\",\n gap: .4,\n color: \"text.primary\",\n userSelect: \"none\",\n cursor: \"pointer\",\n fontWeight: \"500\",\n }}\n baseClass='label'\n ref={ref}\n >{children}</Tag>\n})\n\nexport default Label"],"names":[],"mappings":";;;;;;;;AAMA;AAAsE;;AAK1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKZ;;"}
|
package/Label/index.js
CHANGED
package/Label/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Label/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type LabelProps<T extends TagComponentType = \"label\"> = TagProps<T>\n\nconst Label = React.forwardRef(<T extends TagComponentType = \"label\">({ children, ...rest }: LabelProps<T>, ref: React.Ref<any>) => {\n return <Tag\n component='label'\n {...rest}\n sxr={{\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"middle\",\n fontSize: \"text\",\n gap: .4,\n color: \"text.primary\",\n userSelect: \"none\",\n cursor: \"pointer\",\n fontWeight: \"500\",\n }}\n baseClass='label'\n ref={ref}\n >{children}</Tag>\n})\n\nexport default Label"],"names":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Label/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type LabelProps<T extends TagComponentType = \"label\"> = TagProps<T>\n\nconst Label = React.forwardRef(<T extends TagComponentType = \"label\">({ children, ...rest }: LabelProps<T>, ref: React.Ref<any>) => {\n return <Tag\n component='label'\n {...rest}\n sxr={{\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"middle\",\n fontSize: \"text\",\n gap: .4,\n color: \"text.primary\",\n userSelect: \"none\",\n cursor: \"pointer\",\n fontWeight: \"500\",\n }}\n baseClass='label'\n ref={ref}\n >{children}</Tag>\n})\n\nexport default Label"],"names":[],"mappings":";;;;;;AAMA;AAAsE;;AAK1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKZ;;"}
|
package/List/index.cjs
CHANGED
package/List/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/List/index.tsx"],"sourcesContent":["\nimport React from 'react'\nimport { Tag, TagProps, TagComponentType, useInterface, useColorTemplate, UseColorTemplateType, UseColorTemplateColor, useBreakpointProps, useBreakpointPropsType } from '@xanui/core'\nimport { ListContext } from './ListContext';\n\nexport type ListProps<T extends TagComponentType = \"ul\"> = Omit<TagProps<T>, 'color' | \"size\"> & {\n color?: useBreakpointPropsType<UseColorTemplateColor>;\n variant?: Omit<useBreakpointPropsType<UseColorTemplateType>, \"outline\">;\n size?: useBreakpointPropsType<\"small\" | \"medium\" | \"large\">;\n}\n\n\nconst List = React.forwardRef(<T extends TagComponentType = \"ul\">({ children, ...rest }: ListProps<T>, ref: React.Ref<any>) => {\n let [{ sx, color, variant, hoverColor, hoverVariant, size, ...props }] = useInterface<any>(\"List\", rest, {})\n const _p: any = {}\n if (color) _p.color = color\n if (variant) _p.variant = variant\n if (hoverColor) _p.hoverColor = hoverColor\n if (hoverVariant) _p.hoverVariant = hoverVariant\n if (size) _p.size = size\n const p: any = useBreakpointProps(_p)\n\n color = p.color ?? \"brand\"\n variant = p.variant ?? \"fill\"\n size = p.size ?? \"medium\"\n\n const template = useColorTemplate(color, variant)\n const defaultTemplate = useColorTemplate(\"default\", \"text\")\n const hoverTemplate = useColorTemplate('default', \"soft\")\n\n\n return (\n <ListContext.Provider value={{ size }}>\n <Tag\n component='ul'\n {...props}\n baseClass='list'\n sxr={{\n listStyle: \"none\",\n p: 0,\n m: 0,\n \"& .list-item-icon\": {\n color: \"text.secondary\"\n },\n \"& .list-item-text\": {\n color: \"text.primary\"\n },\n \"& .list-item-subtitle\": {\n color: \"text.secondary\"\n },\n\n \"& .xui-list-item\": {\n ...defaultTemplate.primary,\n \"& .list-item-icon\": {\n color: defaultTemplate.primary.color\n },\n \"& .list-item-text\": {\n color: defaultTemplate.primary.color\n },\n \"& .list-item-subtitle\": {\n color: hoverColor === 'default' ? \"text.secondary\" : defaultTemplate.primary.color\n },\n\n },\n \"& .xui-list-item:not(.list-item-selected):hover\": {\n ...hoverTemplate.primary,\n \"& .list-item-icon\": {\n color: hoverTemplate.primary.color\n },\n \"& .list-item-text\": {\n color: hoverTemplate.primary.color\n },\n \"& .list-item-subtitle\": {\n color: hoverTemplate.primary.color\n },\n },\n \"& .xui-list-item.list-item-selected\": {\n ...template.primary,\n \"& .list-item-icon\": {\n color: template.primary.color\n },\n \"& .list-item-text\": {\n color: template.primary.color\n },\n \"& .list-item-subtitle\": {\n color: template.primary.color\n },\n border: \"0\"\n },\n ...(sx || {} as any)\n }}\n ref={ref}\n >\n {children}\n </Tag>\n </ListContext.Provider>\n )\n})\n\nexport default List"],"names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/List/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react'\nimport { Tag, TagProps, TagComponentType, useInterface, useColorTemplate, UseColorTemplateType, UseColorTemplateColor, useBreakpointProps, useBreakpointPropsType } from '@xanui/core'\nimport { ListContext } from './ListContext';\n\nexport type ListProps<T extends TagComponentType = \"ul\"> = Omit<TagProps<T>, 'color' | \"size\"> & {\n color?: useBreakpointPropsType<UseColorTemplateColor>;\n variant?: Omit<useBreakpointPropsType<UseColorTemplateType>, \"outline\">;\n size?: useBreakpointPropsType<\"small\" | \"medium\" | \"large\">;\n}\n\n\nconst List = React.forwardRef(<T extends TagComponentType = \"ul\">({ children, ...rest }: ListProps<T>, ref: React.Ref<any>) => {\n let [{ sx, color, variant, hoverColor, hoverVariant, size, ...props }] = useInterface<any>(\"List\", rest, {})\n const _p: any = {}\n if (color) _p.color = color\n if (variant) _p.variant = variant\n if (hoverColor) _p.hoverColor = hoverColor\n if (hoverVariant) _p.hoverVariant = hoverVariant\n if (size) _p.size = size\n const p: any = useBreakpointProps(_p)\n\n color = p.color ?? \"brand\"\n variant = p.variant ?? \"fill\"\n size = p.size ?? \"medium\"\n\n const template = useColorTemplate(color, variant)\n const defaultTemplate = useColorTemplate(\"default\", \"text\")\n const hoverTemplate = useColorTemplate('default', \"soft\")\n\n\n return (\n <ListContext.Provider value={{ size }}>\n <Tag\n component='ul'\n {...props}\n baseClass='list'\n sxr={{\n listStyle: \"none\",\n p: 0,\n m: 0,\n \"& .list-item-icon\": {\n color: \"text.secondary\"\n },\n \"& .list-item-text\": {\n color: \"text.primary\"\n },\n \"& .list-item-subtitle\": {\n color: \"text.secondary\"\n },\n\n \"& .xui-list-item\": {\n ...defaultTemplate.primary,\n \"& .list-item-icon\": {\n color: defaultTemplate.primary.color\n },\n \"& .list-item-text\": {\n color: defaultTemplate.primary.color\n },\n \"& .list-item-subtitle\": {\n color: hoverColor === 'default' ? \"text.secondary\" : defaultTemplate.primary.color\n },\n\n },\n \"& .xui-list-item:not(.list-item-selected):hover\": {\n ...hoverTemplate.primary,\n \"& .list-item-icon\": {\n color: hoverTemplate.primary.color\n },\n \"& .list-item-text\": {\n color: hoverTemplate.primary.color\n },\n \"& .list-item-subtitle\": {\n color: hoverTemplate.primary.color\n },\n },\n \"& .xui-list-item.list-item-selected\": {\n ...template.primary,\n \"& .list-item-icon\": {\n color: template.primary.color\n },\n \"& .list-item-text\": {\n color: template.primary.color\n },\n \"& .list-item-subtitle\": {\n color: template.primary.color\n },\n border: \"0\"\n },\n ...(sx || {} as any)\n }}\n ref={ref}\n >\n {children}\n </Tag>\n </ListContext.Provider>\n )\n})\n\nexport default List"],"names":[],"mappings":";;;;;;;;;AAYA;;AAAkE;AAC9D;;AAEA;AAAW;AACX;AAAa;AACb;AAAgB;AAChB;AAAkB;AAClB;AAAU;AACV;AAEA;AACA;AACA;;;;AAOA;AAWoB;AACH;AAEG;AACH;AAEG;AACH;AAKO;AACH;AAEG;AACH;AAEG;AACH;AAMG;AACH;AAEG;AACH;AAEG;AACH;AAKG;AACH;AAEG;AACH;AAEG;AACH;AAWzB;;"}
|
package/List/index.js
CHANGED
package/List/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/List/index.tsx"],"sourcesContent":["\nimport React from 'react'\nimport { Tag, TagProps, TagComponentType, useInterface, useColorTemplate, UseColorTemplateType, UseColorTemplateColor, useBreakpointProps, useBreakpointPropsType } from '@xanui/core'\nimport { ListContext } from './ListContext';\n\nexport type ListProps<T extends TagComponentType = \"ul\"> = Omit<TagProps<T>, 'color' | \"size\"> & {\n color?: useBreakpointPropsType<UseColorTemplateColor>;\n variant?: Omit<useBreakpointPropsType<UseColorTemplateType>, \"outline\">;\n size?: useBreakpointPropsType<\"small\" | \"medium\" | \"large\">;\n}\n\n\nconst List = React.forwardRef(<T extends TagComponentType = \"ul\">({ children, ...rest }: ListProps<T>, ref: React.Ref<any>) => {\n let [{ sx, color, variant, hoverColor, hoverVariant, size, ...props }] = useInterface<any>(\"List\", rest, {})\n const _p: any = {}\n if (color) _p.color = color\n if (variant) _p.variant = variant\n if (hoverColor) _p.hoverColor = hoverColor\n if (hoverVariant) _p.hoverVariant = hoverVariant\n if (size) _p.size = size\n const p: any = useBreakpointProps(_p)\n\n color = p.color ?? \"brand\"\n variant = p.variant ?? \"fill\"\n size = p.size ?? \"medium\"\n\n const template = useColorTemplate(color, variant)\n const defaultTemplate = useColorTemplate(\"default\", \"text\")\n const hoverTemplate = useColorTemplate('default', \"soft\")\n\n\n return (\n <ListContext.Provider value={{ size }}>\n <Tag\n component='ul'\n {...props}\n baseClass='list'\n sxr={{\n listStyle: \"none\",\n p: 0,\n m: 0,\n \"& .list-item-icon\": {\n color: \"text.secondary\"\n },\n \"& .list-item-text\": {\n color: \"text.primary\"\n },\n \"& .list-item-subtitle\": {\n color: \"text.secondary\"\n },\n\n \"& .xui-list-item\": {\n ...defaultTemplate.primary,\n \"& .list-item-icon\": {\n color: defaultTemplate.primary.color\n },\n \"& .list-item-text\": {\n color: defaultTemplate.primary.color\n },\n \"& .list-item-subtitle\": {\n color: hoverColor === 'default' ? \"text.secondary\" : defaultTemplate.primary.color\n },\n\n },\n \"& .xui-list-item:not(.list-item-selected):hover\": {\n ...hoverTemplate.primary,\n \"& .list-item-icon\": {\n color: hoverTemplate.primary.color\n },\n \"& .list-item-text\": {\n color: hoverTemplate.primary.color\n },\n \"& .list-item-subtitle\": {\n color: hoverTemplate.primary.color\n },\n },\n \"& .xui-list-item.list-item-selected\": {\n ...template.primary,\n \"& .list-item-icon\": {\n color: template.primary.color\n },\n \"& .list-item-text\": {\n color: template.primary.color\n },\n \"& .list-item-subtitle\": {\n color: template.primary.color\n },\n border: \"0\"\n },\n ...(sx || {} as any)\n }}\n ref={ref}\n >\n {children}\n </Tag>\n </ListContext.Provider>\n )\n})\n\nexport default List"],"names":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/List/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react'\nimport { Tag, TagProps, TagComponentType, useInterface, useColorTemplate, UseColorTemplateType, UseColorTemplateColor, useBreakpointProps, useBreakpointPropsType } from '@xanui/core'\nimport { ListContext } from './ListContext';\n\nexport type ListProps<T extends TagComponentType = \"ul\"> = Omit<TagProps<T>, 'color' | \"size\"> & {\n color?: useBreakpointPropsType<UseColorTemplateColor>;\n variant?: Omit<useBreakpointPropsType<UseColorTemplateType>, \"outline\">;\n size?: useBreakpointPropsType<\"small\" | \"medium\" | \"large\">;\n}\n\n\nconst List = React.forwardRef(<T extends TagComponentType = \"ul\">({ children, ...rest }: ListProps<T>, ref: React.Ref<any>) => {\n let [{ sx, color, variant, hoverColor, hoverVariant, size, ...props }] = useInterface<any>(\"List\", rest, {})\n const _p: any = {}\n if (color) _p.color = color\n if (variant) _p.variant = variant\n if (hoverColor) _p.hoverColor = hoverColor\n if (hoverVariant) _p.hoverVariant = hoverVariant\n if (size) _p.size = size\n const p: any = useBreakpointProps(_p)\n\n color = p.color ?? \"brand\"\n variant = p.variant ?? \"fill\"\n size = p.size ?? \"medium\"\n\n const template = useColorTemplate(color, variant)\n const defaultTemplate = useColorTemplate(\"default\", \"text\")\n const hoverTemplate = useColorTemplate('default', \"soft\")\n\n\n return (\n <ListContext.Provider value={{ size }}>\n <Tag\n component='ul'\n {...props}\n baseClass='list'\n sxr={{\n listStyle: \"none\",\n p: 0,\n m: 0,\n \"& .list-item-icon\": {\n color: \"text.secondary\"\n },\n \"& .list-item-text\": {\n color: \"text.primary\"\n },\n \"& .list-item-subtitle\": {\n color: \"text.secondary\"\n },\n\n \"& .xui-list-item\": {\n ...defaultTemplate.primary,\n \"& .list-item-icon\": {\n color: defaultTemplate.primary.color\n },\n \"& .list-item-text\": {\n color: defaultTemplate.primary.color\n },\n \"& .list-item-subtitle\": {\n color: hoverColor === 'default' ? \"text.secondary\" : defaultTemplate.primary.color\n },\n\n },\n \"& .xui-list-item:not(.list-item-selected):hover\": {\n ...hoverTemplate.primary,\n \"& .list-item-icon\": {\n color: hoverTemplate.primary.color\n },\n \"& .list-item-text\": {\n color: hoverTemplate.primary.color\n },\n \"& .list-item-subtitle\": {\n color: hoverTemplate.primary.color\n },\n },\n \"& .xui-list-item.list-item-selected\": {\n ...template.primary,\n \"& .list-item-icon\": {\n color: template.primary.color\n },\n \"& .list-item-text\": {\n color: template.primary.color\n },\n \"& .list-item-subtitle\": {\n color: template.primary.color\n },\n border: \"0\"\n },\n ...(sx || {} as any)\n }}\n ref={ref}\n >\n {children}\n </Tag>\n </ListContext.Provider>\n )\n})\n\nexport default List"],"names":[],"mappings":";;;;;;;AAYA;;AAAkE;AAC9D;;AAEA;AAAW;AACX;AAAa;AACb;AAAgB;AAChB;AAAkB;AAClB;AAAU;AACV;AAEA;AACA;AACA;;;;AAOA;AAWoB;AACH;AAEG;AACH;AAEG;AACH;AAKO;AACH;AAEG;AACH;AAEG;AACH;AAMG;AACH;AAEG;AACH;AAEG;AACH;AAKG;AACH;AAEG;AACH;AAEG;AACH;AAWzB;;"}
|
package/ListItem/index.cjs
CHANGED
package/ListItem/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/ListItem/index.tsx"],"sourcesContent":["\nimport React, { ReactElement } from 'react'\nimport { Tag, TagProps, TagComponentType, useInterface, useBreakpointProps, useBreakpointPropsType } from '@xanui/core'\nimport Text from '../Text';\nimport { useListContext } from '../List/ListContext';\n\n\nexport type ListItemProps<T extends TagComponentType = \"li\"> = TagProps<T> & {\n selected?: boolean;\n subtitle?: useBreakpointPropsType<string | ReactElement>;\n startIcon?: useBreakpointPropsType<ReactElement>;\n endIcon?: useBreakpointPropsType<ReactElement>;\n size?: useBreakpointPropsType<\"small\" | \"medium\" | \"large\">;\n}\n\nconst ListItem = React.forwardRef(<T extends TagComponentType = \"li\">({ children, startIcon, endIcon, subtitle, size, ...rest }: ListItemProps<T>, ref: React.Ref<any>) => {\n let [{ selected, ...props }] = useInterface<any>(\"ListItem\", rest, {})\n const _p: any = {}\n if (subtitle) _p.subtitle = subtitle\n if (startIcon) _p.startIcon = startIcon\n if (endIcon) _p.endIcon = endIcon\n if (size) _p.size = size\n const p: any = useBreakpointProps(_p)\n const ctx = useListContext()\n\n subtitle = p.subtitle\n startIcon = p.startIcon\n endIcon = p.endIcon\n size = p.size ?? ctx?.size ?? \"medium\"\n\n let sizes: any = {\n small: {\n fontSize: \"button\",\n py: 0.5,\n px: 1,\n minHeight: 32,\n },\n medium: {\n fontSize: \"text\",\n py: 1,\n px: 1.5,\n minHeight: 40,\n },\n large: {\n fontSize: \"h6\",\n py: 1.5,\n px: 2,\n minHeight: 48,\n }\n }\n\n return (\n <Tag\n component='li'\n {...props}\n sxr={{\n alignItems: \"center\",\n display: \"flex\",\n flexDirection: \"row\",\n userSelect: \"none\",\n cursor: \"pointer\",\n lineHeight: 1.4,\n whiteSpace: \"nowrap\",\n flexShrink: \"0\",\n ...sizes[size as any]\n }}\n baseClass='list-item'\n classNames={[{ \"list-item-selected\": selected as boolean }, ...(props.classNames || [])]}\n ref={ref}\n >\n {startIcon && <Tag mr={1} component=\"span\" display=\"inline-block\" className='list-item-icon'>{startIcon as any}</Tag>}\n <Tag flex={1}>\n <Text\n variant=\"text\"\n className='list-item-text'\n component={typeof children === \"string\" || typeof children === \"number\" ? \"p\" : \"div\"}\n >\n {children}\n </Text>\n {\n subtitle && <Text\n variant=\"text\"\n fontSize=\"button\"\n className='list-item-subtitle'\n component={typeof subtitle === \"string\" || typeof subtitle === \"number\" ? \"p\" : \"div\"}\n >{subtitle as any}</Text>\n }\n </Tag>\n {endIcon && <Tag ml={1} component=\"span\" display=\"inline-block\" className='list-item-icon'>{endIcon as any}</Tag>}\n </Tag>\n )\n})\n\nListItem.displayName = \"ListItem\"\n\nexport default ListItem"],"names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/ListItem/index.tsx"],"sourcesContent":["\"use client\"\nimport React, { ReactElement } from 'react'\nimport { Tag, TagProps, TagComponentType, useInterface, useBreakpointProps, useBreakpointPropsType } from '@xanui/core'\nimport Text from '../Text';\nimport { useListContext } from '../List/ListContext';\n\n\nexport type ListItemProps<T extends TagComponentType = \"li\"> = TagProps<T> & {\n selected?: boolean;\n subtitle?: useBreakpointPropsType<string | ReactElement>;\n startIcon?: useBreakpointPropsType<ReactElement>;\n endIcon?: useBreakpointPropsType<ReactElement>;\n size?: useBreakpointPropsType<\"small\" | \"medium\" | \"large\">;\n}\n\nconst ListItem = React.forwardRef(<T extends TagComponentType = \"li\">({ children, startIcon, endIcon, subtitle, size, ...rest }: ListItemProps<T>, ref: React.Ref<any>) => {\n let [{ selected, ...props }] = useInterface<any>(\"ListItem\", rest, {})\n const _p: any = {}\n if (subtitle) _p.subtitle = subtitle\n if (startIcon) _p.startIcon = startIcon\n if (endIcon) _p.endIcon = endIcon\n if (size) _p.size = size\n const p: any = useBreakpointProps(_p)\n const ctx = useListContext()\n\n subtitle = p.subtitle\n startIcon = p.startIcon\n endIcon = p.endIcon\n size = p.size ?? ctx?.size ?? \"medium\"\n\n let sizes: any = {\n small: {\n fontSize: \"button\",\n py: 0.5,\n px: 1,\n minHeight: 32,\n },\n medium: {\n fontSize: \"text\",\n py: 1,\n px: 1.5,\n minHeight: 40,\n },\n large: {\n fontSize: \"h6\",\n py: 1.5,\n px: 2,\n minHeight: 48,\n }\n }\n\n return (\n <Tag\n component='li'\n {...props}\n sxr={{\n alignItems: \"center\",\n display: \"flex\",\n flexDirection: \"row\",\n userSelect: \"none\",\n cursor: \"pointer\",\n lineHeight: 1.4,\n whiteSpace: \"nowrap\",\n flexShrink: \"0\",\n ...sizes[size as any]\n }}\n baseClass='list-item'\n classNames={[{ \"list-item-selected\": selected as boolean }, ...(props.classNames || [])]}\n ref={ref}\n >\n {startIcon && <Tag mr={1} component=\"span\" display=\"inline-block\" className='list-item-icon'>{startIcon as any}</Tag>}\n <Tag flex={1}>\n <Text\n variant=\"text\"\n className='list-item-text'\n component={typeof children === \"string\" || typeof children === \"number\" ? \"p\" : \"div\"}\n >\n {children}\n </Text>\n {\n subtitle && <Text\n variant=\"text\"\n fontSize=\"button\"\n className='list-item-subtitle'\n component={typeof subtitle === \"string\" || typeof subtitle === \"number\" ? \"p\" : \"div\"}\n >{subtitle as any}</Text>\n }\n </Tag>\n {endIcon && <Tag ml={1} component=\"span\" display=\"inline-block\" className='list-item-icon'>{endIcon as any}</Tag>}\n </Tag>\n )\n})\n\nListItem.displayName = \"ListItem\"\n\nexport default ListItem"],"names":[],"mappings":";;;;;;;;;;AAeA;;AAAsE;AAClE;;AAEA;AAAc;AACd;AAAe;AACf;AAAa;AACb;AAAU;AACV;AACA;AAEA;AACA;AACA;AACA;AAEA;AACI;AACI;AACA;AACA;AACA;AACH;AACD;AACI;AACA;AACA;AACA;AACH;AACD;AACI;AACA;AACA;AACA;AACH;;;AA2CT;AAEA;;"}
|
package/ListItem/index.js
CHANGED
package/ListItem/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/ListItem/index.tsx"],"sourcesContent":["\nimport React, { ReactElement } from 'react'\nimport { Tag, TagProps, TagComponentType, useInterface, useBreakpointProps, useBreakpointPropsType } from '@xanui/core'\nimport Text from '../Text';\nimport { useListContext } from '../List/ListContext';\n\n\nexport type ListItemProps<T extends TagComponentType = \"li\"> = TagProps<T> & {\n selected?: boolean;\n subtitle?: useBreakpointPropsType<string | ReactElement>;\n startIcon?: useBreakpointPropsType<ReactElement>;\n endIcon?: useBreakpointPropsType<ReactElement>;\n size?: useBreakpointPropsType<\"small\" | \"medium\" | \"large\">;\n}\n\nconst ListItem = React.forwardRef(<T extends TagComponentType = \"li\">({ children, startIcon, endIcon, subtitle, size, ...rest }: ListItemProps<T>, ref: React.Ref<any>) => {\n let [{ selected, ...props }] = useInterface<any>(\"ListItem\", rest, {})\n const _p: any = {}\n if (subtitle) _p.subtitle = subtitle\n if (startIcon) _p.startIcon = startIcon\n if (endIcon) _p.endIcon = endIcon\n if (size) _p.size = size\n const p: any = useBreakpointProps(_p)\n const ctx = useListContext()\n\n subtitle = p.subtitle\n startIcon = p.startIcon\n endIcon = p.endIcon\n size = p.size ?? ctx?.size ?? \"medium\"\n\n let sizes: any = {\n small: {\n fontSize: \"button\",\n py: 0.5,\n px: 1,\n minHeight: 32,\n },\n medium: {\n fontSize: \"text\",\n py: 1,\n px: 1.5,\n minHeight: 40,\n },\n large: {\n fontSize: \"h6\",\n py: 1.5,\n px: 2,\n minHeight: 48,\n }\n }\n\n return (\n <Tag\n component='li'\n {...props}\n sxr={{\n alignItems: \"center\",\n display: \"flex\",\n flexDirection: \"row\",\n userSelect: \"none\",\n cursor: \"pointer\",\n lineHeight: 1.4,\n whiteSpace: \"nowrap\",\n flexShrink: \"0\",\n ...sizes[size as any]\n }}\n baseClass='list-item'\n classNames={[{ \"list-item-selected\": selected as boolean }, ...(props.classNames || [])]}\n ref={ref}\n >\n {startIcon && <Tag mr={1} component=\"span\" display=\"inline-block\" className='list-item-icon'>{startIcon as any}</Tag>}\n <Tag flex={1}>\n <Text\n variant=\"text\"\n className='list-item-text'\n component={typeof children === \"string\" || typeof children === \"number\" ? \"p\" : \"div\"}\n >\n {children}\n </Text>\n {\n subtitle && <Text\n variant=\"text\"\n fontSize=\"button\"\n className='list-item-subtitle'\n component={typeof subtitle === \"string\" || typeof subtitle === \"number\" ? \"p\" : \"div\"}\n >{subtitle as any}</Text>\n }\n </Tag>\n {endIcon && <Tag ml={1} component=\"span\" display=\"inline-block\" className='list-item-icon'>{endIcon as any}</Tag>}\n </Tag>\n )\n})\n\nListItem.displayName = \"ListItem\"\n\nexport default ListItem"],"names":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/ListItem/index.tsx"],"sourcesContent":["\"use client\"\nimport React, { ReactElement } from 'react'\nimport { Tag, TagProps, TagComponentType, useInterface, useBreakpointProps, useBreakpointPropsType } from '@xanui/core'\nimport Text from '../Text';\nimport { useListContext } from '../List/ListContext';\n\n\nexport type ListItemProps<T extends TagComponentType = \"li\"> = TagProps<T> & {\n selected?: boolean;\n subtitle?: useBreakpointPropsType<string | ReactElement>;\n startIcon?: useBreakpointPropsType<ReactElement>;\n endIcon?: useBreakpointPropsType<ReactElement>;\n size?: useBreakpointPropsType<\"small\" | \"medium\" | \"large\">;\n}\n\nconst ListItem = React.forwardRef(<T extends TagComponentType = \"li\">({ children, startIcon, endIcon, subtitle, size, ...rest }: ListItemProps<T>, ref: React.Ref<any>) => {\n let [{ selected, ...props }] = useInterface<any>(\"ListItem\", rest, {})\n const _p: any = {}\n if (subtitle) _p.subtitle = subtitle\n if (startIcon) _p.startIcon = startIcon\n if (endIcon) _p.endIcon = endIcon\n if (size) _p.size = size\n const p: any = useBreakpointProps(_p)\n const ctx = useListContext()\n\n subtitle = p.subtitle\n startIcon = p.startIcon\n endIcon = p.endIcon\n size = p.size ?? ctx?.size ?? \"medium\"\n\n let sizes: any = {\n small: {\n fontSize: \"button\",\n py: 0.5,\n px: 1,\n minHeight: 32,\n },\n medium: {\n fontSize: \"text\",\n py: 1,\n px: 1.5,\n minHeight: 40,\n },\n large: {\n fontSize: \"h6\",\n py: 1.5,\n px: 2,\n minHeight: 48,\n }\n }\n\n return (\n <Tag\n component='li'\n {...props}\n sxr={{\n alignItems: \"center\",\n display: \"flex\",\n flexDirection: \"row\",\n userSelect: \"none\",\n cursor: \"pointer\",\n lineHeight: 1.4,\n whiteSpace: \"nowrap\",\n flexShrink: \"0\",\n ...sizes[size as any]\n }}\n baseClass='list-item'\n classNames={[{ \"list-item-selected\": selected as boolean }, ...(props.classNames || [])]}\n ref={ref}\n >\n {startIcon && <Tag mr={1} component=\"span\" display=\"inline-block\" className='list-item-icon'>{startIcon as any}</Tag>}\n <Tag flex={1}>\n <Text\n variant=\"text\"\n className='list-item-text'\n component={typeof children === \"string\" || typeof children === \"number\" ? \"p\" : \"div\"}\n >\n {children}\n </Text>\n {\n subtitle && <Text\n variant=\"text\"\n fontSize=\"button\"\n className='list-item-subtitle'\n component={typeof subtitle === \"string\" || typeof subtitle === \"number\" ? \"p\" : \"div\"}\n >{subtitle as any}</Text>\n }\n </Tag>\n {endIcon && <Tag ml={1} component=\"span\" display=\"inline-block\" className='list-item-icon'>{endIcon as any}</Tag>}\n </Tag>\n )\n})\n\nListItem.displayName = \"ListItem\"\n\nexport default ListItem"],"names":[],"mappings":";;;;;;;;AAeA;;AAAsE;AAClE;;AAEA;AAAc;AACd;AAAe;AACf;AAAa;AACb;AAAU;AACV;AACA;AAEA;AACA;AACA;AACA;AAEA;AACI;AACI;AACA;AACA;AACA;AACH;AACD;AACI;AACA;AACA;AACA;AACH;AACD;AACI;AACA;AACA;AACA;AACH;;;AA2CT;AAEA;;"}
|
package/LoadingBox/index.cjs
CHANGED
package/LoadingBox/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/LoadingBox/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, UseColorTemplateColor, useInterface, useBreakpointProps, useBreakpointPropsType } from '@xanui/core';\nimport CircleProgress, { CircleProgressProps } from '../CircleProgress';\n\n\nexport type LoadingBoxProps<T extends TagComponentType = \"div\"> = Omit<TagProps<T>, \"color\"> & {\n loading?: boolean;\n color?: useBreakpointPropsType<UseColorTemplateColor>;\n slotProps?: {\n CircleProgress?: Omit<CircleProgressProps, \"value\">\n }\n\n}\n\nconst LoadingBox = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...props }: LoadingBoxProps<T>, ref: React.Ref<any>) => {\n let [{ loading, color, slotProps, ...rest }] = useInterface<any>(\"LoadingBox\", props, {})\n const _p: any = {}\n if (color) _p.color = color\n const p: any = useBreakpointProps(_p)\n color = p.color ?? \"brand\"\n\n return (\n <Tag\n baseClass='loading-box'\n {...rest}\n sxr={{\n position: \"relative\",\n display: \"inline-block\",\n overflow: \"hidden\",\n ...((rest as any).sx || {})\n }}\n ref={ref}\n >\n {loading && <Tag\n baseClass=\"loading-box-container\"\n sxr={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n zIndex: 1,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n >\n <CircleProgress\n color=\"brand\"\n hideTrack\n {...slotProps?.CircleProgress}\n />\n </Tag>}\n <Tag\n disabled={loading}\n >\n {children}\n </Tag>\n </Tag>\n )\n})\n\nexport default LoadingBox\n\n"],"names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/LoadingBox/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, UseColorTemplateColor, useInterface, useBreakpointProps, useBreakpointPropsType } from '@xanui/core';\nimport CircleProgress, { CircleProgressProps } from '../CircleProgress';\n\n\nexport type LoadingBoxProps<T extends TagComponentType = \"div\"> = Omit<TagProps<T>, \"color\"> & {\n loading?: boolean;\n color?: useBreakpointPropsType<UseColorTemplateColor>;\n slotProps?: {\n CircleProgress?: Omit<CircleProgressProps, \"value\">\n }\n\n}\n\nconst LoadingBox = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...props }: LoadingBoxProps<T>, ref: React.Ref<any>) => {\n let [{ loading, color, slotProps, ...rest }] = useInterface<any>(\"LoadingBox\", props, {})\n const _p: any = {}\n if (color) _p.color = color\n const p: any = useBreakpointProps(_p)\n color = p.color ?? \"brand\"\n\n return (\n <Tag\n baseClass='loading-box'\n {...rest}\n sxr={{\n position: \"relative\",\n display: \"inline-block\",\n overflow: \"hidden\",\n ...((rest as any).sx || {})\n }}\n ref={ref}\n >\n {loading && <Tag\n baseClass=\"loading-box-container\"\n sxr={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n zIndex: 1,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n >\n <CircleProgress\n color=\"brand\"\n hideTrack\n {...slotProps?.CircleProgress}\n />\n </Tag>}\n <Tag\n disabled={loading}\n >\n {children}\n </Tag>\n </Tag>\n )\n})\n\nexport default LoadingBox\n\n"],"names":[],"mappings":";;;;;;;;;AAeA;;AAAyE;;;AAGrE;AAAW;AACX;AACA;;AAiBgB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACH;AAejB;;"}
|
package/LoadingBox/index.js
CHANGED
package/LoadingBox/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/LoadingBox/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, UseColorTemplateColor, useInterface, useBreakpointProps, useBreakpointPropsType } from '@xanui/core';\nimport CircleProgress, { CircleProgressProps } from '../CircleProgress';\n\n\nexport type LoadingBoxProps<T extends TagComponentType = \"div\"> = Omit<TagProps<T>, \"color\"> & {\n loading?: boolean;\n color?: useBreakpointPropsType<UseColorTemplateColor>;\n slotProps?: {\n CircleProgress?: Omit<CircleProgressProps, \"value\">\n }\n\n}\n\nconst LoadingBox = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...props }: LoadingBoxProps<T>, ref: React.Ref<any>) => {\n let [{ loading, color, slotProps, ...rest }] = useInterface<any>(\"LoadingBox\", props, {})\n const _p: any = {}\n if (color) _p.color = color\n const p: any = useBreakpointProps(_p)\n color = p.color ?? \"brand\"\n\n return (\n <Tag\n baseClass='loading-box'\n {...rest}\n sxr={{\n position: \"relative\",\n display: \"inline-block\",\n overflow: \"hidden\",\n ...((rest as any).sx || {})\n }}\n ref={ref}\n >\n {loading && <Tag\n baseClass=\"loading-box-container\"\n sxr={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n zIndex: 1,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n >\n <CircleProgress\n color=\"brand\"\n hideTrack\n {...slotProps?.CircleProgress}\n />\n </Tag>}\n <Tag\n disabled={loading}\n >\n {children}\n </Tag>\n </Tag>\n )\n})\n\nexport default LoadingBox\n\n"],"names":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/LoadingBox/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, UseColorTemplateColor, useInterface, useBreakpointProps, useBreakpointPropsType } from '@xanui/core';\nimport CircleProgress, { CircleProgressProps } from '../CircleProgress';\n\n\nexport type LoadingBoxProps<T extends TagComponentType = \"div\"> = Omit<TagProps<T>, \"color\"> & {\n loading?: boolean;\n color?: useBreakpointPropsType<UseColorTemplateColor>;\n slotProps?: {\n CircleProgress?: Omit<CircleProgressProps, \"value\">\n }\n\n}\n\nconst LoadingBox = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...props }: LoadingBoxProps<T>, ref: React.Ref<any>) => {\n let [{ loading, color, slotProps, ...rest }] = useInterface<any>(\"LoadingBox\", props, {})\n const _p: any = {}\n if (color) _p.color = color\n const p: any = useBreakpointProps(_p)\n color = p.color ?? \"brand\"\n\n return (\n <Tag\n baseClass='loading-box'\n {...rest}\n sxr={{\n position: \"relative\",\n display: \"inline-block\",\n overflow: \"hidden\",\n ...((rest as any).sx || {})\n }}\n ref={ref}\n >\n {loading && <Tag\n baseClass=\"loading-box-container\"\n sxr={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n zIndex: 1,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n >\n <CircleProgress\n color=\"brand\"\n hideTrack\n {...slotProps?.CircleProgress}\n />\n </Tag>}\n <Tag\n disabled={loading}\n >\n {children}\n </Tag>\n </Tag>\n )\n})\n\nexport default LoadingBox\n\n"],"names":[],"mappings":";;;;;;;AAeA;;AAAyE;;;AAGrE;AAAW;AACX;AACA;;AAiBgB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACH;AAejB;;"}
|
package/Option/index.cjs
CHANGED
package/Option/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Option/index.tsx"],"sourcesContent":["\nimport React from 'react'\nimport ListItem, { ListItemProps } from '../ListItem'\n\nexport type OptionProps = ListItemProps & {\n value: string | number;\n}\n\nconst Option = React.forwardRef(({ value, children, ...props }: OptionProps, ref: React.Ref<any>) => {\n return (\n <ListItem {...props} ref={ref}>{children}</ListItem>\n )\n})\n\nexport default Option"],"names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Option/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react'\nimport ListItem, { ListItemProps } from '../ListItem'\n\nexport type OptionProps = ListItemProps & {\n value: string | number;\n}\n\nconst Option = React.forwardRef(({ value, children, ...props }: OptionProps, ref: React.Ref<any>) => {\n return (\n <ListItem {...props} ref={ref}>{children}</ListItem>\n )\n})\n\nexport default Option"],"names":[],"mappings":";;;;;;;;AAQA;;AACI;AAGJ;;"}
|
package/Option/index.js
CHANGED
package/Option/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Option/index.tsx"],"sourcesContent":["\nimport React from 'react'\nimport ListItem, { ListItemProps } from '../ListItem'\n\nexport type OptionProps = ListItemProps & {\n value: string | number;\n}\n\nconst Option = React.forwardRef(({ value, children, ...props }: OptionProps, ref: React.Ref<any>) => {\n return (\n <ListItem {...props} ref={ref}>{children}</ListItem>\n )\n})\n\nexport default Option"],"names":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Option/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react'\nimport ListItem, { ListItemProps } from '../ListItem'\n\nexport type OptionProps = ListItemProps & {\n value: string | number;\n}\n\nconst Option = React.forwardRef(({ value, children, ...props }: OptionProps, ref: React.Ref<any>) => {\n return (\n <ListItem {...props} ref={ref}>{children}</ListItem>\n )\n})\n\nexport default Option"],"names":[],"mappings":";;;;;;AAQA;;AACI;AAGJ;;"}
|
package/Paper/index.cjs
CHANGED
package/Paper/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Paper/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, useInterface } from '@xanui/core';\n\nexport type PaperProps<T extends TagComponentType = \"div\"> = TagProps<T>\n\nconst Paper = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...rest }: PaperProps<T>, ref?: React.Ref<any>) => {\n let [props] = useInterface<any>(\"Paper\", rest, {})\n return (\n <Tag\n {...props}\n sxr={{\n shadow: 1,\n radius: 1,\n p: 1.5,\n bgcolor: \"background.secondary\",\n color: \"text.primary\",\n ...props?.sx\n }}\n baseClass='paper'\n ref={ref}\n >{children}</Tag>\n )\n})\n\nexport default Paper\n"],"names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Paper/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, useInterface } from '@xanui/core';\n\nexport type PaperProps<T extends TagComponentType = \"div\"> = TagProps<T>\n\nconst Paper = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...rest }: PaperProps<T>, ref?: React.Ref<any>) => {\n let [props] = useInterface<any>(\"Paper\", rest, {})\n return (\n <Tag\n {...props}\n sxr={{\n shadow: 1,\n radius: 1,\n p: 1.5,\n bgcolor: \"background.secondary\",\n color: \"text.primary\",\n ...props?.sx\n }}\n baseClass='paper'\n ref={ref}\n >{children}</Tag>\n )\n})\n\nexport default Paper\n"],"names":[],"mappings":";;;;;;;;AAMA;AAAoE;AAChE;;AAgBJ;;"}
|
package/Paper/index.js
CHANGED
package/Paper/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Paper/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, useInterface } from '@xanui/core';\n\nexport type PaperProps<T extends TagComponentType = \"div\"> = TagProps<T>\n\nconst Paper = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...rest }: PaperProps<T>, ref?: React.Ref<any>) => {\n let [props] = useInterface<any>(\"Paper\", rest, {})\n return (\n <Tag\n {...props}\n sxr={{\n shadow: 1,\n radius: 1,\n p: 1.5,\n bgcolor: \"background.secondary\",\n color: \"text.primary\",\n ...props?.sx\n }}\n baseClass='paper'\n ref={ref}\n >{children}</Tag>\n )\n})\n\nexport default Paper\n"],"names":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Paper/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, useInterface } from '@xanui/core';\n\nexport type PaperProps<T extends TagComponentType = \"div\"> = TagProps<T>\n\nconst Paper = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...rest }: PaperProps<T>, ref?: React.Ref<any>) => {\n let [props] = useInterface<any>(\"Paper\", rest, {})\n return (\n <Tag\n {...props}\n sxr={{\n shadow: 1,\n radius: 1,\n p: 1.5,\n bgcolor: \"background.secondary\",\n color: \"text.primary\",\n ...props?.sx\n }}\n baseClass='paper'\n ref={ref}\n >{children}</Tag>\n )\n})\n\nexport default Paper\n"],"names":[],"mappings":";;;;;;AAMA;AAAoE;AAChE;;AAgBJ;;"}
|
package/Radio/index.cjs
CHANGED
package/Radio/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Radio/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { useInterface } from '@xanui/core';\nimport CheckIcon from '@xanui/icons/RadioButtonChecked'\nimport UnCheckIcon from '@xanui/icons/RadioButtonUnchecked'\nimport Checkbox, { CheckboxProps } from '../Checkbox';\n\nexport type RadioProps = CheckboxProps\nconst Radio = React.forwardRef((props: RadioProps, ref?: React.Ref<any>) => {\n let [rest] = useInterface<any>(\"Radio\", props, {})\n return <Checkbox\n checkIcon={<CheckIcon />}\n uncheckIcon={<UnCheckIcon />}\n {...rest}\n type=\"radio\"\n ref={ref}\n classNames={['radio', ...(rest?.classNames || [])]}\n />\n})\n\nexport default Radio\n"],"names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Radio/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { useInterface } from '@xanui/core';\nimport CheckIcon from '@xanui/icons/RadioButtonChecked'\nimport UnCheckIcon from '@xanui/icons/RadioButtonUnchecked'\nimport Checkbox, { CheckboxProps } from '../Checkbox';\n\nexport type RadioProps = CheckboxProps\nconst Radio = React.forwardRef((props: RadioProps, ref?: React.Ref<any>) => {\n let [rest] = useInterface<any>(\"Radio\", props, {})\n return <Checkbox\n checkIcon={<CheckIcon />}\n uncheckIcon={<UnCheckIcon />}\n {...rest}\n type=\"radio\"\n ref={ref}\n classNames={['radio', ...(rest?.classNames || [])]}\n />\n})\n\nexport default Radio\n"],"names":[],"mappings":";;;;;;;;;;AAQA;AACI;;AASJ;;"}
|
package/Radio/index.js
CHANGED
package/Radio/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Radio/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { useInterface } from '@xanui/core';\nimport CheckIcon from '@xanui/icons/RadioButtonChecked'\nimport UnCheckIcon from '@xanui/icons/RadioButtonUnchecked'\nimport Checkbox, { CheckboxProps } from '../Checkbox';\n\nexport type RadioProps = CheckboxProps\nconst Radio = React.forwardRef((props: RadioProps, ref?: React.Ref<any>) => {\n let [rest] = useInterface<any>(\"Radio\", props, {})\n return <Checkbox\n checkIcon={<CheckIcon />}\n uncheckIcon={<UnCheckIcon />}\n {...rest}\n type=\"radio\"\n ref={ref}\n classNames={['radio', ...(rest?.classNames || [])]}\n />\n})\n\nexport default Radio\n"],"names":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Radio/index.tsx"],"sourcesContent":["\"use client\"\nimport React from 'react';\nimport { useInterface } from '@xanui/core';\nimport CheckIcon from '@xanui/icons/RadioButtonChecked'\nimport UnCheckIcon from '@xanui/icons/RadioButtonUnchecked'\nimport Checkbox, { CheckboxProps } from '../Checkbox';\n\nexport type RadioProps = CheckboxProps\nconst Radio = React.forwardRef((props: RadioProps, ref?: React.Ref<any>) => {\n let [rest] = useInterface<any>(\"Radio\", props, {})\n return <Checkbox\n checkIcon={<CheckIcon />}\n uncheckIcon={<UnCheckIcon />}\n {...rest}\n type=\"radio\"\n ref={ref}\n classNames={['radio', ...(rest?.classNames || [])]}\n />\n})\n\nexport default Radio\n"],"names":[],"mappings":";;;;;;;;AAQA;AACI;;AASJ;;"}
|
package/Scrollbar/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Scrollbar/index.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Scrollbar/index.tsx"],"sourcesContent":["\"use client\";\nimport { Tag, TagComponentType, TagProps, useInterface } from '@xanui/core';\nimport React, { ReactNode, UIEvent, useImperativeHandle, useRef } from 'react'\n\nexport type ScrollbarProps<T extends TagComponentType = \"div\"> = TagProps<T> & {\n thumbSize?: number;\n thumbColor?: TagProps['color'];\n trackColor?: TagProps['color'];\n children?: ReactNode;\n onScrollEnd?: (e: UIEvent<HTMLDivElement>) => void;\n}\n\nexport type ScrollbarHandle = {\n scrollTo: (pos: number) => void;\n scrollToBottom: () => void;\n scrollToTop: () => void;\n};\n\nconst Scrollbar = React.forwardRef(<T extends TagComponentType = \"div\">({ children, thumbSize, thumbColor, trackColor, ...rest }: ScrollbarProps<T>, ref: React.Ref<ScrollbarHandle>) => {\n let [{ onScroll, onScrollEnd, ...props }] = useInterface<any>(\"Scrollbar\", rest, {})\n const innerRef = useRef<HTMLDivElement>(null);\n\n useImperativeHandle(ref, () => ({\n scrollTo(pos: number) {\n innerRef.current?.scrollTo({\n top: pos,\n behavior: \"smooth\"\n });\n },\n scrollToBottom() {\n if (!innerRef.current) return;\n const ele = innerRef.current;\n ele.scrollTo({\n top: ele.scrollHeight,\n behavior: \"smooth\"\n });\n },\n scrollToTop() {\n innerRef.current?.scrollTo({\n top: 0,\n behavior: \"smooth\"\n });\n }\n }));\n\n if (onScroll || onScrollEnd) {\n props.onScroll = (e: UIEvent<HTMLDivElement>) => {\n if (onScrollEnd) {\n const ele: any = e.target\n const scrollTop = ele.scrollTop\n const scrollHeight = ele.scrollHeight\n const clientHeight = ele.clientHeight\n const isScrollDown = scrollHeight - scrollTop <= clientHeight + 1\n isScrollDown && onScrollEnd(e)\n }\n onScroll && onScroll(e)\n }\n }\n\n let sxr: any = {}\n\n if (thumbSize) {\n sxr['&::-webkit-scrollbar'] = {\n width: thumbSize,\n height: thumbSize,\n }\n }\n if (thumbColor) {\n sxr['&::-webkit-scrollbar-thumb'] = {\n backgroundColor: thumbColor,\n borderRadius: \"6px\",\n opacity: 0.6,\n }\n sxr['&::-webkit-scrollbar-thumb:hover'] = {\n backgroundColor: thumbColor,\n opacity: 0.0,\n }\n }\n\n if (trackColor) {\n sxr['&::-webkit-scrollbar-track'] = {\n backgroundColor: trackColor,\n borderRadius: \"6px\",\n }\n }\n\n return (\n <Tag\n {...props}\n ref={innerRef}\n baseClass='scrollbar'\n sxr={{\n height: \"100%\",\n width: \"100%\",\n overflow: \"auto\",\n ...sxr,\n }}\n >\n {children}\n </Tag>\n )\n})\n\nexport default Scrollbar "],"names":[],"mappings":";;;;;;;;AAkBA;AAAwE;;AAEpE;AAEA;AACI;;AACI;AACI;AACA;AACH;;;;;AAID;;;AAGI;AACH;;;;AAGD;AACI;AACA;AACH;;AAER;AAED;AACI;;AAEQ;AACA;AACA;AACA;;AAEA;;AAEJ;AACJ;;;;;AAOI;AACA;;;;;AAKA;AACA;AACA;;;AAGA;AACA;;;;;AAMA;AACA;;;AAIR;AAeJ;;"}
|
package/Scrollbar/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Scrollbar/index.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Scrollbar/index.tsx"],"sourcesContent":["\"use client\";\nimport { Tag, TagComponentType, TagProps, useInterface } from '@xanui/core';\nimport React, { ReactNode, UIEvent, useImperativeHandle, useRef } from 'react'\n\nexport type ScrollbarProps<T extends TagComponentType = \"div\"> = TagProps<T> & {\n thumbSize?: number;\n thumbColor?: TagProps['color'];\n trackColor?: TagProps['color'];\n children?: ReactNode;\n onScrollEnd?: (e: UIEvent<HTMLDivElement>) => void;\n}\n\nexport type ScrollbarHandle = {\n scrollTo: (pos: number) => void;\n scrollToBottom: () => void;\n scrollToTop: () => void;\n};\n\nconst Scrollbar = React.forwardRef(<T extends TagComponentType = \"div\">({ children, thumbSize, thumbColor, trackColor, ...rest }: ScrollbarProps<T>, ref: React.Ref<ScrollbarHandle>) => {\n let [{ onScroll, onScrollEnd, ...props }] = useInterface<any>(\"Scrollbar\", rest, {})\n const innerRef = useRef<HTMLDivElement>(null);\n\n useImperativeHandle(ref, () => ({\n scrollTo(pos: number) {\n innerRef.current?.scrollTo({\n top: pos,\n behavior: \"smooth\"\n });\n },\n scrollToBottom() {\n if (!innerRef.current) return;\n const ele = innerRef.current;\n ele.scrollTo({\n top: ele.scrollHeight,\n behavior: \"smooth\"\n });\n },\n scrollToTop() {\n innerRef.current?.scrollTo({\n top: 0,\n behavior: \"smooth\"\n });\n }\n }));\n\n if (onScroll || onScrollEnd) {\n props.onScroll = (e: UIEvent<HTMLDivElement>) => {\n if (onScrollEnd) {\n const ele: any = e.target\n const scrollTop = ele.scrollTop\n const scrollHeight = ele.scrollHeight\n const clientHeight = ele.clientHeight\n const isScrollDown = scrollHeight - scrollTop <= clientHeight + 1\n isScrollDown && onScrollEnd(e)\n }\n onScroll && onScroll(e)\n }\n }\n\n let sxr: any = {}\n\n if (thumbSize) {\n sxr['&::-webkit-scrollbar'] = {\n width: thumbSize,\n height: thumbSize,\n }\n }\n if (thumbColor) {\n sxr['&::-webkit-scrollbar-thumb'] = {\n backgroundColor: thumbColor,\n borderRadius: \"6px\",\n opacity: 0.6,\n }\n sxr['&::-webkit-scrollbar-thumb:hover'] = {\n backgroundColor: thumbColor,\n opacity: 0.0,\n }\n }\n\n if (trackColor) {\n sxr['&::-webkit-scrollbar-track'] = {\n backgroundColor: trackColor,\n borderRadius: \"6px\",\n }\n }\n\n return (\n <Tag\n {...props}\n ref={innerRef}\n baseClass='scrollbar'\n sxr={{\n height: \"100%\",\n width: \"100%\",\n overflow: \"auto\",\n ...sxr,\n }}\n >\n {children}\n </Tag>\n )\n})\n\nexport default Scrollbar "],"names":[],"mappings":";;;;;;AAkBA;AAAwE;;AAEpE;AAEA;AACI;;AACI;AACI;AACA;AACH;;;;;AAID;;;AAGI;AACH;;;;AAGD;AACI;AACA;AACH;;AAER;AAED;AACI;;AAEQ;AACA;AACA;AACA;;AAEA;;AAEJ;AACJ;;;;;AAOI;AACA;;;;;AAKA;AACA;AACA;;;AAGA;AACA;;;;;AAMA;AACA;;;AAIR;AAeJ;;"}
|