@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.
Files changed (149) hide show
  1. package/Autocomplete/index.cjs +1 -0
  2. package/Autocomplete/index.cjs.map +1 -1
  3. package/Autocomplete/index.js +1 -0
  4. package/Autocomplete/index.js.map +1 -1
  5. package/Avatar/index.cjs +1 -0
  6. package/Avatar/index.cjs.map +1 -1
  7. package/Avatar/index.js +1 -0
  8. package/Avatar/index.js.map +1 -1
  9. package/Badge/index.cjs +1 -0
  10. package/Badge/index.cjs.map +1 -1
  11. package/Badge/index.js +1 -0
  12. package/Badge/index.js.map +1 -1
  13. package/Box/index.cjs +1 -0
  14. package/Box/index.cjs.map +1 -1
  15. package/Box/index.js +1 -0
  16. package/Box/index.js.map +1 -1
  17. package/ButtonGroup/index.cjs +1 -0
  18. package/ButtonGroup/index.cjs.map +1 -1
  19. package/ButtonGroup/index.js +1 -0
  20. package/ButtonGroup/index.js.map +1 -1
  21. package/Chip/index.cjs +1 -0
  22. package/Chip/index.cjs.map +1 -1
  23. package/Chip/index.js +1 -0
  24. package/Chip/index.js.map +1 -1
  25. package/Collaps/index.cjs +1 -0
  26. package/Collaps/index.cjs.map +1 -1
  27. package/Collaps/index.js +1 -0
  28. package/Collaps/index.js.map +1 -1
  29. package/Container/index.cjs +1 -0
  30. package/Container/index.cjs.map +1 -1
  31. package/Container/index.js +1 -0
  32. package/Container/index.js.map +1 -1
  33. package/Datatable/SelectedBox.cjs +1 -0
  34. package/Datatable/SelectedBox.cjs.map +1 -1
  35. package/Datatable/SelectedBox.js +1 -0
  36. package/Datatable/SelectedBox.js.map +1 -1
  37. package/Datatable/Table.cjs.map +1 -1
  38. package/Datatable/Table.js.map +1 -1
  39. package/Divider/index.cjs +1 -0
  40. package/Divider/index.cjs.map +1 -1
  41. package/Divider/index.js +1 -0
  42. package/Divider/index.js.map +1 -1
  43. package/GridContainer/index.cjs +1 -0
  44. package/GridContainer/index.cjs.map +1 -1
  45. package/GridContainer/index.js +1 -0
  46. package/GridContainer/index.js.map +1 -1
  47. package/GridItem/index.cjs +1 -0
  48. package/GridItem/index.cjs.map +1 -1
  49. package/GridItem/index.js +1 -0
  50. package/GridItem/index.js.map +1 -1
  51. package/Image/index.cjs.map +1 -1
  52. package/Image/index.js.map +1 -1
  53. package/Label/index.cjs +1 -0
  54. package/Label/index.cjs.map +1 -1
  55. package/Label/index.js +1 -0
  56. package/Label/index.js.map +1 -1
  57. package/List/index.cjs +1 -0
  58. package/List/index.cjs.map +1 -1
  59. package/List/index.js +1 -0
  60. package/List/index.js.map +1 -1
  61. package/ListItem/index.cjs +1 -0
  62. package/ListItem/index.cjs.map +1 -1
  63. package/ListItem/index.js +1 -0
  64. package/ListItem/index.js.map +1 -1
  65. package/LoadingBox/index.cjs +1 -0
  66. package/LoadingBox/index.cjs.map +1 -1
  67. package/LoadingBox/index.js +1 -0
  68. package/LoadingBox/index.js.map +1 -1
  69. package/Option/index.cjs +1 -0
  70. package/Option/index.cjs.map +1 -1
  71. package/Option/index.js +1 -0
  72. package/Option/index.js.map +1 -1
  73. package/Paper/index.cjs +1 -0
  74. package/Paper/index.cjs.map +1 -1
  75. package/Paper/index.js +1 -0
  76. package/Paper/index.js.map +1 -1
  77. package/Radio/index.cjs +1 -0
  78. package/Radio/index.cjs.map +1 -1
  79. package/Radio/index.js +1 -0
  80. package/Radio/index.js.map +1 -1
  81. package/Scrollbar/index.cjs.map +1 -1
  82. package/Scrollbar/index.js.map +1 -1
  83. package/Select/index.cjs.map +1 -1
  84. package/Select/index.js.map +1 -1
  85. package/Skeleton/index.cjs +1 -0
  86. package/Skeleton/index.cjs.map +1 -1
  87. package/Skeleton/index.js +1 -0
  88. package/Skeleton/index.js.map +1 -1
  89. package/Stack/index.cjs +1 -0
  90. package/Stack/index.cjs.map +1 -1
  91. package/Stack/index.js +1 -0
  92. package/Stack/index.js.map +1 -1
  93. package/Switch/index.cjs.map +1 -1
  94. package/Switch/index.js.map +1 -1
  95. package/Tab/index.cjs.map +1 -1
  96. package/Tab/index.js.map +1 -1
  97. package/Table/index.cjs +1 -0
  98. package/Table/index.cjs.map +1 -1
  99. package/Table/index.js +1 -0
  100. package/Table/index.js.map +1 -1
  101. package/TableBody/index.cjs +1 -0
  102. package/TableBody/index.cjs.map +1 -1
  103. package/TableBody/index.js +1 -0
  104. package/TableBody/index.js.map +1 -1
  105. package/TableCell/index.cjs +1 -0
  106. package/TableCell/index.cjs.map +1 -1
  107. package/TableCell/index.js +1 -0
  108. package/TableCell/index.js.map +1 -1
  109. package/TableFooter/index.cjs +1 -0
  110. package/TableFooter/index.cjs.map +1 -1
  111. package/TableFooter/index.js +1 -0
  112. package/TableFooter/index.js.map +1 -1
  113. package/TableHead/index.cjs +1 -0
  114. package/TableHead/index.cjs.map +1 -1
  115. package/TableHead/index.js +1 -0
  116. package/TableHead/index.js.map +1 -1
  117. package/TablePagination/index.cjs.map +1 -1
  118. package/TablePagination/index.js.map +1 -1
  119. package/TableRow/index.cjs +1 -0
  120. package/TableRow/index.cjs.map +1 -1
  121. package/TableRow/index.js +1 -0
  122. package/TableRow/index.js.map +1 -1
  123. package/Tabs/index.cjs.map +1 -1
  124. package/Tabs/index.js.map +1 -1
  125. package/Text/index.cjs +1 -0
  126. package/Text/index.cjs.map +1 -1
  127. package/Text/index.js +1 -0
  128. package/Text/index.js.map +1 -1
  129. package/Toast/index.cjs.map +1 -1
  130. package/Toast/index.js.map +1 -1
  131. package/Tooltip/index.cjs.map +1 -1
  132. package/Tooltip/index.js.map +1 -1
  133. package/ViewBox/index.cjs +1 -0
  134. package/ViewBox/index.cjs.map +1 -1
  135. package/ViewBox/index.js +1 -0
  136. package/ViewBox/index.js.map +1 -1
  137. package/package.json +1 -1
  138. package/useBlurCss/index.cjs +1 -0
  139. package/useBlurCss/index.cjs.map +1 -1
  140. package/useBlurCss/index.js +1 -0
  141. package/useBlurCss/index.js.map +1 -1
  142. package/useContextMenu/index.cjs +1 -0
  143. package/useContextMenu/index.cjs.map +1 -1
  144. package/useContextMenu/index.js +1 -0
  145. package/useContextMenu/index.js.map +1 -1
  146. package/useCorner/index.cjs +1 -0
  147. package/useCorner/index.cjs.map +1 -1
  148. package/useCorner/index.js +1 -0
  149. package/useCorner/index.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SelectedBox.js","sources":["../../src/Datatable/SelectedBox.tsx"],"sourcesContent":["import 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":["_jsx","_jsxs"],"mappings":";;;;;;AAKA,MAAM,WAAW,GAAG,CAAC,KAA8B,KAAI;AACpD,IAAA,IAAI,EACD,KAAK,EACL,SAAS,EACX,GAAG,KAAK;AAET,IAAA,IAAI,OAAO,GAAG,KAAK,CAAC,SAAS,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM;AACxD,IAAA,IAAI,CAAC,OAAO;AAAE,QAAA,OAAOA,iBAAK;AAE1B,IAAA,QACGC,IAAA,CAAC,KAAK,IACH,OAAO,EAAC,sBAAsB,EAC9B,SAAS,EAAC,KAAK,EACf,UAAU,EAAC,QAAQ,EACnB,cAAc,EAAC,eAAe,EAC9B,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,CAAC,EACL,MAAM,EAAE,EAAE,EACV,KAAK,EAAC,MAAM,EACZ,EAAE,EAAE,GAAG,EAAA,QAAA,EAAA,CAEPA,KAAC,IAAI,EAAA,EAAC,UAAU,EAAE,GAAG,2BAAa,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAA,EAAA,CAAQ,EAC/DD,IAAC,KAAK,EAAA,EACH,OAAO,EAAA,IAAA,EACP,GAAG,EAAE,CAAC,YAEL,SAAS,IAAI,SAAS,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAA0B,KAAI;wBAA9B,EAAE,KAAK,EAAE,IAAI,EAAA,GAAA,EAAa,EAAR,MAAM,GAAA,MAAA,CAAA,EAAA,EAAxB,iBAA0B,CAAF;AACxE,oBAAA,QACGA,GAAA,CAAC,UAAU,kBAER,OAAO,EAAC,MAAM,EACd,KAAK,EAAC,OAAO,EAAA,EACT,MAAM,EAAA,EAAA,QAAA,EAET,IAAI,KALA,KAAK,CAMA;AAEnB,gBAAA,CAAC,CAAC,EAAA,CACG,CAAA,EAAA,CACH;AAEd;;;;"}
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;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.cjs","sources":["../../src/Datatable/Table.tsx"],"sourcesContent":["\"use client\";\n\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":";;;;;;;;;AAQA;AACG;;AAcY;AACG;AACF;AACH;AAIK;AACA;AAQH;AAKf;;"}
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;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sources":["../../src/Datatable/Table.tsx"],"sourcesContent":["\"use client\";\n\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":";;;;;;;AAQA;AACG;;AAcY;AACG;AACF;AACH;AAIK;AACA;AAQH;AAKf;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var tslib = require('tslib');
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/Divider/index.tsx"],"sourcesContent":["import 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":["__rest","useBreakpointProps","_jsx","Tag"],"mappings":";;;;;;;AAUA,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAA8D,EAAE,GAAmB,KAAI;;AAAvF,IAAA,IAAA,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAA,GAAA,EAA4B,EAAvB,IAAI,GAAAA,YAAA,CAAA,EAAA,EAA3C,CAAA,UAAA,EAAA,WAAA,EAAA,OAAA,EAAA,MAAA,CAA6C,CAAF;IAC7G,MAAM,EAAE,GAAQ,EAAE;AAClB,IAAA,IAAI,SAAS;AAAE,QAAA,EAAE,CAAC,SAAS,GAAG,SAAS;AACvC,IAAA,IAAI,KAAK;AAAE,QAAA,EAAE,CAAC,KAAK,GAAG,KAAK;AAC3B,IAAA,IAAI,IAAI;AAAE,QAAA,EAAE,CAAC,IAAI,GAAG,IAAI;AACxB,IAAA,MAAM,CAAC,GAAQC,uBAAkB,CAAC,EAAE,CAAC;AACrC,IAAA,SAAS,GAAG,CAAA,EAAA,GAAA,CAAC,CAAC,SAAS,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,YAAY;AACvC,IAAA,KAAK,GAAG,CAAA,EAAA,GAAA,CAAC,CAAC,KAAK,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,SAAS;AAC5B,IAAA,IAAI,GAAG,CAAA,EAAA,GAAA,CAAC,CAAC,IAAI,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,CAAC;AAElB,IAAA,IAAI,MAAM,GAAG,SAAS,KAAK,YAAY;IAEvC,QACIC,cAAA,CAACC,QAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACI,IAAI,EAAA,EACR,SAAS,EAAC,SAAS,EACnB,GAAG,EAAE;YACD,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;YAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM;AAC9B,YAAA,OAAO,EAAE,KAAK,KAAK,SAAS,GAAG,CAAA,oBAAA,CAAsB,GAAG,CAAA,EAAG,KAAK,CAAA,UAAA,CAAY;AAC/E,SAAA,EACD,GAAG,EAAE,GAAG,YACV,QAAQ,EAAA,CAAA,CAAO;AAEzB,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { __rest } from 'tslib';
2
3
  import { jsx } from 'react/jsx-runtime';
3
4
  import React from 'react';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/Divider/index.tsx"],"sourcesContent":["import 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":["_jsx"],"mappings":";;;;;AAUA,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAA8D,EAAE,GAAmB,KAAI;;AAAvF,IAAA,IAAA,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAA,GAAA,EAA4B,EAAvB,IAAI,GAAA,MAAA,CAAA,EAAA,EAA3C,CAAA,UAAA,EAAA,WAAA,EAAA,OAAA,EAAA,MAAA,CAA6C,CAAF;IAC7G,MAAM,EAAE,GAAQ,EAAE;AAClB,IAAA,IAAI,SAAS;AAAE,QAAA,EAAE,CAAC,SAAS,GAAG,SAAS;AACvC,IAAA,IAAI,KAAK;AAAE,QAAA,EAAE,CAAC,KAAK,GAAG,KAAK;AAC3B,IAAA,IAAI,IAAI;AAAE,QAAA,EAAE,CAAC,IAAI,GAAG,IAAI;AACxB,IAAA,MAAM,CAAC,GAAQ,kBAAkB,CAAC,EAAE,CAAC;AACrC,IAAA,SAAS,GAAG,CAAA,EAAA,GAAA,CAAC,CAAC,SAAS,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,YAAY;AACvC,IAAA,KAAK,GAAG,CAAA,EAAA,GAAA,CAAC,CAAC,KAAK,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,SAAS;AAC5B,IAAA,IAAI,GAAG,CAAA,EAAA,GAAA,CAAC,CAAC,IAAI,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,CAAC;AAElB,IAAA,IAAI,MAAM,GAAG,SAAS,KAAK,YAAY;IAEvC,QACIA,GAAA,CAAC,GAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACI,IAAI,EAAA,EACR,SAAS,EAAC,SAAS,EACnB,GAAG,EAAE;YACD,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;YAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM;AAC9B,YAAA,OAAO,EAAE,KAAK,KAAK,SAAS,GAAG,CAAA,oBAAA,CAAsB,GAAG,CAAA,EAAG,KAAK,CAAA,UAAA,CAAY;AAC/E,SAAA,EACD,GAAG,EAAE,GAAG,YACV,QAAQ,EAAA,CAAA,CAAO;AAEzB,CAAC;;;;"}
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;;"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var tslib = require('tslib');
@@ -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":["__rest","_jsx","Tag"],"mappings":";;;;;;;AAKA,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAA4C,EAAE,GAAoB,KAAI;AAAtE,IAAA,IAAA,EAAE,QAAQ,EAAA,GAAA,EAAkC,EAA7B,IAAI,GAAAA,YAAA,CAAA,EAAA,EAAnB,YAAqB,CAAF;AAC3F,IAAA,QACIC,cAAA,CAACC,QAAG,oBACI,IAAI,EAAA,EACR,GAAG,EAAE;AACD,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,aAAa,EAAE,KAAK;AACpB,YAAA,QAAQ,EAAE,MAAM;AAChB,YAAA,KAAK,EAAE,MAAM;SAChB,EACD,SAAS,EAAC,gBAAgB,EAC1B,GAAG,EAAE,GAAG,EAAA,QAAA,EAEP,QAAQ,EAAA,CAAA,CACP;AAEd,CAAC;;;;"}
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;;"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { __rest } from 'tslib';
2
3
  import { jsx } from 'react/jsx-runtime';
3
4
  import React from 'react';
@@ -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":["_jsx"],"mappings":";;;;;AAKA,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAA4C,EAAE,GAAoB,KAAI;AAAtE,IAAA,IAAA,EAAE,QAAQ,EAAA,GAAA,EAAkC,EAA7B,IAAI,GAAA,MAAA,CAAA,EAAA,EAAnB,YAAqB,CAAF;AAC3F,IAAA,QACIA,GAAA,CAAC,GAAG,oBACI,IAAI,EAAA,EACR,GAAG,EAAE;AACD,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,aAAa,EAAE,KAAK;AACpB,YAAA,QAAQ,EAAE,MAAM;AAChB,YAAA,KAAK,EAAE,MAAM;SAChB,EACD,SAAS,EAAC,gBAAgB,EAC1B,GAAG,EAAE,GAAG,EAAA,QAAA,EAEP,QAAQ,EAAA,CAAA,CACP;AAEd,CAAC;;;;"}
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;;"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var tslib = require('tslib');
@@ -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":["__rest","_jsx","Tag"],"mappings":";;;;;;;AAYA,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAA2D,EAAE,GAAoB,KAAI;AAArF,IAAA,IAAA,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAA,GAAA,EAA6B,EAAxB,IAAI,GAAAA,YAAA,CAAA,EAAA,EAAvC,0CAAyC,CAAF;IAE1G,IAAI,CAAC,GAAQ,EAAE;AAEf,IAAA,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;AACpC,IAAA,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;AACpC,IAAA,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;AACpC,IAAA,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;AACpC,IAAA,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;AAEpC,IAAA,QACIC,cAAA,CAACC,QAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EACA,GAAG,EAAE,GAAG,EAAA,EACJ,IAAI,EAAA,EACR,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,CAAC,EACX,SAAS,EAAC,WAAW,EAAA,QAAA,EAEpB,QAAQ,EAAA,CAAA,CACP;AAEd,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { __rest } from 'tslib';
2
3
  import { jsx } from 'react/jsx-runtime';
3
4
  import React from 'react';
@@ -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":["_jsx"],"mappings":";;;;;AAYA,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAA2D,EAAE,GAAoB,KAAI;AAArF,IAAA,IAAA,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAA,GAAA,EAA6B,EAAxB,IAAI,GAAA,MAAA,CAAA,EAAA,EAAvC,0CAAyC,CAAF;IAE1G,IAAI,CAAC,GAAQ,EAAE;AAEf,IAAA,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;AACpC,IAAA,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;AACpC,IAAA,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;AACpC,IAAA,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;AACpC,IAAA,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;AAEpC,IAAA,QACIA,GAAA,CAAC,GAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EACA,GAAG,EAAE,GAAG,EAAA,EACJ,IAAI,EAAA,EACR,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,CAAC,EACX,SAAS,EAAC,WAAW,EAAA,QAAA,EAEpB,QAAQ,EAAA,CAAA,CACP;AAEd,CAAC;;;;"}
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;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/Image/index.tsx"],"sourcesContent":["\"use client\";\n\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":";;;;;;;;AASA;AAAoE;;AAGhE;AACI;;AAMY;AACA;AACA;AACH;;AAOb;;;AAWQ;AAIZ;;"}
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;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/Image/index.tsx"],"sourcesContent":["\"use client\";\n\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":";;;;;;AASA;AAAoE;;AAGhE;AACI;;AAMY;AACA;AACA;AACH;;AAOb;;;AAWQ;AAIZ;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var tslib = require('tslib');
@@ -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":["__rest","_jsx","Tag"],"mappings":";;;;;;;AAMA,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAuC,EAAoC,EAAE,GAAmB,KAAI;AAA7D,IAAA,IAAA,EAAE,QAAQ,EAAA,GAAA,EAA0B,EAArB,IAAI,GAAAA,YAAA,CAAA,EAAA,EAAnB,YAAqB,CAAF;IACrF,OAAOC,cAAA,CAACC,QAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EACP,SAAS,EAAC,OAAO,EAAA,EACb,IAAI,EAAA,EACR,GAAG,EAAE;AACD,YAAA,OAAO,EAAE,aAAa;AACtB,YAAA,UAAU,EAAE,QAAQ;AACpB,YAAA,aAAa,EAAE,QAAQ;AACvB,YAAA,QAAQ,EAAE,MAAM;AAChB,YAAA,GAAG,EAAE,EAAE;AACP,YAAA,KAAK,EAAE,cAAc;AACrB,YAAA,UAAU,EAAE,MAAM;AAClB,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,UAAU,EAAE,KAAK;SACpB,EACD,SAAS,EAAC,OAAO,EACjB,GAAG,EAAE,GAAG,EAAA,QAAA,EACV,QAAQ,EAAA,CAAA,CAAO;AACrB,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { __rest } from 'tslib';
2
3
  import { jsx } from 'react/jsx-runtime';
3
4
  import React from 'react';
@@ -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":["_jsx"],"mappings":";;;;;AAMA,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAuC,EAAoC,EAAE,GAAmB,KAAI;AAA7D,IAAA,IAAA,EAAE,QAAQ,EAAA,GAAA,EAA0B,EAArB,IAAI,GAAA,MAAA,CAAA,EAAA,EAAnB,YAAqB,CAAF;IACrF,OAAOA,GAAA,CAAC,GAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EACP,SAAS,EAAC,OAAO,EAAA,EACb,IAAI,EAAA,EACR,GAAG,EAAE;AACD,YAAA,OAAO,EAAE,aAAa;AACtB,YAAA,UAAU,EAAE,QAAQ;AACpB,YAAA,aAAa,EAAE,QAAQ;AACvB,YAAA,QAAQ,EAAE,MAAM;AAChB,YAAA,GAAG,EAAE,EAAE;AACP,YAAA,KAAK,EAAE,cAAc;AACrB,YAAA,UAAU,EAAE,MAAM;AAClB,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,UAAU,EAAE,KAAK;SACpB,EACD,SAAS,EAAC,OAAO,EACjB,GAAG,EAAE,GAAG,EAAA,QAAA,EACV,QAAQ,EAAA,CAAA,CAAO;AACrB,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var tslib = require('tslib');
@@ -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":["__rest","useInterface","useBreakpointProps","useColorTemplate","_jsx","ListContext","Tag"],"mappings":";;;;;;;;AAYA,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAoC,EAAmC,EAAE,GAAmB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a,CAAC,OAAO,CAAC;AAChC,qBAAA,EACD,mBAAmB,EAAE;AACjB,wBAAA,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC;AAChC,qBAAA,EACD,uBAAuB,EAAE;AACrB,wBAAA,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC;AAChC,qBAAA,EAAA,CAAA,EAEL,qCAAqC,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC9B,QAAQ,CAAC,OAAO,CAAA,EAAA,EACnB,mBAAmB,EAAE;AACjB,wBAAA,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;AAC3B,qBAAA,EACD,mBAAmB,EAAE;AACjB,wBAAA,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;AAC3B,qBAAA,EACD,uBAAuB,EAAE;AACrB,wBAAA,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;AAC3B,qBAAA,EACD,MAAM,EAAE,GAAG,QAEX,EAAE,IAAI,EAAS,EAAC,EAExB,GAAG,EAAE,GAAG,EAAA,QAAA,EAEP,QAAQ,EAAA,CAAA,CACP,EAAA,CACa;AAE/B,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { __rest } from 'tslib';
2
3
  import { jsx } from 'react/jsx-runtime';
3
4
  import React from 'react';
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":["_jsx"],"mappings":";;;;;;AAYA,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAoC,EAAmC,EAAE,GAAmB,KAAI;;AAA5D,IAAA,IAAA,EAAE,QAAQ,EAAA,GAAA,EAAyB,EAApB,IAAI,GAAA,MAAA,CAAA,EAAA,EAAnB,YAAqB,CAAF;AACjF,IAAA,IAAI,CAAA,EAAA,CAAA,GAAqE,YAAY,CAAM,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,EAAvG,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,EAAA,GAAA,EAAY,EAAP,KAAK,GAAA,MAAA,CAAA,EAAA,EAA9D,CAAA,IAAA,EAAA,OAA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,OAAO,CAAC;AAC3B,qBAAA,EACD,mBAAmB,EAAE;AACjB,wBAAA,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;AAC3B,qBAAA,EACD,uBAAuB,EAAE;AACrB,wBAAA,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;AAC3B,qBAAA,EACD,MAAM,EAAE,GAAG,QAEX,EAAE,IAAI,EAAS,EAAC,EAExB,GAAG,EAAE,GAAG,EAAA,QAAA,EAEP,QAAQ,EAAA,CAAA,CACP,EAAA,CACa;AAE/B,CAAC;;;;"}
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;;"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var tslib = require('tslib');
@@ -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":["__rest","useInterface","useBreakpointProps","useListContext","_jsxs","Tag","_jsx","Text"],"mappings":";;;;;;;;;AAeA,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAoC,EAA2E,EAAE,GAAmB,KAAI;;AAApG,IAAA,IAAA,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAA,GAAA,EAA6B,EAAxB,IAAI,GAAAA,YAAA,CAAA,EAAA,EAAvD,wDAAyD,CAAF;AACzH,IAAA,IAAI,OAA2BC,iBAAY,CAAM,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,EAAjE,EAAE,QAAQ,EAAA,GAAA,EAAY,EAAP,KAAK,GAAAD,YAAA,CAAA,EAAA,EAApB,CAAA,UAAA,CAAsB,CAA2C;IACtE,MAAM,EAAE,GAAQ,EAAE;AAClB,IAAA,IAAI,QAAQ;AAAE,QAAA,EAAE,CAAC,QAAQ,GAAG,QAAQ;AACpC,IAAA,IAAI,SAAS;AAAE,QAAA,EAAE,CAAC,SAAS,GAAG,SAAS;AACvC,IAAA,IAAI,OAAO;AAAE,QAAA,EAAE,CAAC,OAAO,GAAG,OAAO;AACjC,IAAA,IAAI,IAAI;AAAE,QAAA,EAAE,CAAC,IAAI,GAAG,IAAI;AACxB,IAAA,MAAM,CAAC,GAAQE,uBAAkB,CAAC,EAAE,CAAC;AACrC,IAAA,MAAM,GAAG,GAAGC,0BAAc,EAAE;AAE5B,IAAA,QAAQ,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,CAAC,EAAE,oBAAoB,EAAE,QAAmB,EAAE,EAAE,IAAI,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,EACxF,GAAG,EAAE,GAAG,EAAA,QAAA,EAAA,CAEP,SAAS,IAAIC,cAAA,CAACD,QAAG,EAAA,EAAC,EAAE,EAAE,CAAC,EAAE,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,cAAc,EAAC,SAAS,EAAC,gBAAgB,YAAE,SAAgB,EAAA,CAAO,EACrHD,eAAA,CAACC,QAAG,EAAA,EAAC,IAAI,EAAE,CAAC,aACRC,cAAA,CAACC,KAAI,IACD,OAAO,EAAC,MAAM,EACd,SAAS,EAAC,gBAAgB,EAC1B,SAAS,EAAE,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,GAAG,GAAG,GAAG,KAAK,EAAA,QAAA,EAEpF,QAAQ,EAAA,CACN,EAEH,QAAQ,IAAID,cAAA,CAACC,KAAI,EAAA,EACb,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,QAAQ,EACjB,SAAS,EAAC,oBAAoB,EAC9B,SAAS,EAAE,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,GAAG,GAAG,GAAG,KAAK,EAAA,QAAA,EACvF,QAAe,EAAA,CAAQ,CAAA,EAAA,CAE3B,EACL,OAAO,IAAID,cAAA,CAACD,QAAG,EAAA,EAAC,EAAE,EAAE,CAAC,EAAE,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,cAAc,EAAC,SAAS,EAAC,gBAAgB,YAAE,OAAc,EAAA,CAAO,CAAA,EAAA,CAAA,CAC/G;AAEd,CAAC;AAED,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { __rest } from 'tslib';
2
3
  import { jsxs, jsx } from 'react/jsx-runtime';
3
4
  import React from 'react';
@@ -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":["_jsxs","_jsx"],"mappings":";;;;;;;AAeA,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAoC,EAA2E,EAAE,GAAmB,KAAI;;AAApG,IAAA,IAAA,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EA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K,EAAA,QAAA,EAEpF,QAAQ,EAAA,CACN,EAEH,QAAQ,IAAIA,GAAA,CAAC,IAAI,EAAA,EACb,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,QAAQ,EACjB,SAAS,EAAC,oBAAoB,EAC9B,SAAS,EAAE,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,GAAG,GAAG,GAAG,KAAK,EAAA,QAAA,EACvF,QAAe,EAAA,CAAQ,CAAA,EAAA,CAE3B,EACL,OAAO,IAAIA,GAAA,CAAC,GAAG,EAAA,EAAC,EAAE,EAAE,CAAC,EAAE,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,cAAc,EAAC,SAAS,EAAC,gBAAgB,YAAE,OAAc,EAAA,CAAO,CAAA,EAAA,CAAA,CAC/G;AAEd,CAAC;AAED,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
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;;"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var tslib = require('tslib');
@@ -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":["__rest","useInterface","useBreakpointProps","_jsxs","Tag","_jsx","CircleProgress"],"mappings":";;;;;;;;AAeA,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAA0C,EAAE,GAAmB,KAAI;;AAAnE,IAAA,IAAA,EAAE,QAAQ,E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AACvB,iBAAA,EAAA,QAAA,EAEDC,cAAA,CAACC,KAAc,EAAA,MAAA,CAAA,MAAA,CAAA,EACX,KAAK,EAAC,OAAO,EACb,SAAS,EAAA,IAAA,EAAA,EACL,SAAS,KAAA,IAAA,IAAT,SAAS,uBAAT,SAAS,CAAE,cAAc,CAAA,CAC/B,EAAA,CACA,EACND,cAAA,CAACD,QAAG,EAAA,EACA,QAAQ,EAAE,OAAO,EAAA,QAAA,EAEhB,QAAQ,EAAA,CACP,CAAA,EAAA,CAAA,CACJ;AAEd,CAAC;;;;"}
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;;"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { __rest } from 'tslib';
2
3
  import { jsxs, jsx } from 'react/jsx-runtime';
3
4
  import React from 'react';
@@ -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 {...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;AACpB,oBAAA,GAAG,EAAE,CAAC;AACN,oBAAA,IAAI,EAAE,CAAC;AACP,oBAAA,KAAK,EAAE,CAAC;AACR,oBAAA,MAAM,EAAE,CAAC;AACT,oBAAA,MAAM,EAAE,CAAC;AACT,oBAAA,OAAO,EAAE,MAAM;AACf,oBAAA,cAAc,EAAE,QAAQ;AACxB,oBAAA,UAAU,EAAE,QAAQ;AACvB,iBAAA,EAAA,QAAA,EAEDA,GAAA,CAAC,cAAc,EAAA,MAAA,CAAA,MAAA,CAAA,EACX,KAAK,EAAC,OAAO,EACb,SAAS,EAAA,IAAA,EAAA,EACL,SAAS,KAAA,IAAA,IAAT,SAAS,uBAAT,SAAS,CAAE,cAAc,CAAA,CAC/B,EAAA,CACA,EACNA,GAAA,CAAC,GAAG,EAAA,EACA,QAAQ,EAAE,OAAO,EAAA,QAAA,EAEhB,QAAQ,EAAA,CACP,CAAA,EAAA,CAAA,CACJ;AAEd,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var tslib = require('tslib');
@@ -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":["__rest","_jsx","ListItem"],"mappings":";;;;;;;AAQA,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAA0C,EAAE,GAAmB,KAAI;QAAnE,EAAE,KAAK,EAAE,QAAQ,EAAA,GAAA,EAAyB,EAApB,KAAK,GAAAA,YAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF;AACxD,IAAA,QACIC,cAAA,CAACC,KAAQ,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,KAAK,EAAA,EAAE,GAAG,EAAE,GAAG,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAA,CAAY;AAE5D,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { __rest } from 'tslib';
2
3
  import { jsx } from 'react/jsx-runtime';
3
4
  import React from 'react';
@@ -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":["_jsx"],"mappings":";;;;;AAQA,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAA0C,EAAE,GAAmB,KAAI;QAAnE,EAAE,KAAK,EAAE,QAAQ,EAAA,GAAA,EAAyB,EAApB,KAAK,GAAA,MAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF;AACxD,IAAA,QACIA,GAAA,CAAC,QAAQ,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,KAAK,EAAA,EAAE,GAAG,EAAE,GAAG,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAA,CAAY;AAE5D,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var tslib = require('tslib');
@@ -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":["__rest","useInterface","_jsx","Tag"],"mappings":";;;;;;;AAMA,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAAoC,EAAE,GAAoB,KAAI;AAA9D,IAAA,IAAA,EAAE,QAAQ,EAAA,GAAA,EAA0B,EAArB,IAAI,GAAAA,YAAA,CAAA,EAAA,EAAnB,YAAqB,CAAF;AACnF,IAAA,IAAI,CAAC,KAAK,CAAC,GAAGC,iBAAY,CAAM,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;IAClD,QACIC,eAACC,QAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACI,KAAK,EAAA,EACT,GAAG,kBACC,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,CAAC,EACT,CAAC,EAAE,GAAG,EACN,OAAO,EAAE,sBAAsB,EAC/B,KAAK,EAAE,cAAc,EAAA,EAClB,KAAK,aAAL,KAAK,KAAA,MAAA,GAAA,MAAA,GAAL,KAAK,CAAE,EAAE,CAAA,EAEhB,SAAS,EAAC,OAAO,EACjB,GAAG,EAAE,GAAG,EAAA,QAAA,EACV,QAAQ,EAAA,CAAA,CAAO;AAEzB,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { __rest } from 'tslib';
2
3
  import { jsx } from 'react/jsx-runtime';
3
4
  import React from 'react';
@@ -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":["_jsx"],"mappings":";;;;;AAMA,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAAoC,EAAE,GAAoB,KAAI;AAA9D,IAAA,IAAA,EAAE,QAAQ,EAAA,GAAA,EAA0B,EAArB,IAAI,GAAA,MAAA,CAAA,EAAA,EAAnB,YAAqB,CAAF;AACnF,IAAA,IAAI,CAAC,KAAK,CAAC,GAAG,YAAY,CAAM,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;IAClD,QACIA,IAAC,GAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACI,KAAK,EAAA,EACT,GAAG,kBACC,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,CAAC,EACT,CAAC,EAAE,GAAG,EACN,OAAO,EAAE,sBAAsB,EAC/B,KAAK,EAAE,cAAc,EAAA,EAClB,KAAK,aAAL,KAAK,KAAA,MAAA,GAAA,MAAA,GAAL,KAAK,CAAE,EAAE,CAAA,EAEhB,SAAS,EAAC,OAAO,EACjB,GAAG,EAAE,GAAG,EAAA,QAAA,EACV,QAAQ,EAAA,CAAA,CAAO;AAEzB,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var jsxRuntime = require('react/jsx-runtime');
@@ -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":["useInterface","_jsx","Checkbox"],"mappings":";;;;;;;;;AAQA,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAiB,EAAE,GAAoB,KAAI;AACvE,IAAA,IAAI,CAAC,IAAI,CAAC,GAAGA,iBAAY,CAAM,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC;IAClD,OAAOC,cAAA,CAACC,KAAQ,EAAA,MAAA,CAAA,MAAA,CAAA,EACZ,SAAS,EAAED,cAAA,CAAC,SAAS,KAAG,EACxB,WAAW,EAAEA,cAAA,CAAC,WAAW,KAAG,EAAA,EACxB,IAAI,IACR,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,CAAC,OAAO,EAAE,IAAI,CAAA,IAAI,aAAJ,IAAI,KAAA,MAAA,GAAA,MAAA,GAAJ,IAAI,CAAE,UAAU,KAAI,EAAE,CAAC,CAAC,EAAA,CAAA,CACpD;AACN,CAAC;;;;"}
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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx } from 'react/jsx-runtime';
2
3
  import React from 'react';
3
4
  import { useInterface } from '@xanui/core';
@@ -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":["_jsx"],"mappings":";;;;;;;AAQA,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAiB,EAAE,GAAoB,KAAI;AACvE,IAAA,IAAI,CAAC,IAAI,CAAC,GAAG,YAAY,CAAM,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC;IAClD,OAAOA,GAAA,CAAC,QAAQ,EAAA,MAAA,CAAA,MAAA,CAAA,EACZ,SAAS,EAAEA,GAAA,CAAC,SAAS,KAAG,EACxB,WAAW,EAAEA,GAAA,CAAC,WAAW,KAAG,EAAA,EACxB,IAAI,IACR,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,CAAC,OAAO,EAAE,IAAI,CAAA,IAAI,aAAJ,IAAI,KAAA,MAAA,GAAA,MAAA,GAAJ,IAAI,CAAE,UAAU,KAAI,EAAE,CAAC,CAAC,EAAA,CAAA,CACpD;AACN,CAAC;;;;"}
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;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/Scrollbar/index.tsx"],"sourcesContent":["\"use client\";\n\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":";;;;;;;;AAmBA;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;;"}
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;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/Scrollbar/index.tsx"],"sourcesContent":["\"use client\";\n\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":";;;;;;AAmBA;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;;"}
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;;"}