@kubetail/ui 0.3.2 → 2.0.0-rc2

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 (232) hide show
  1. package/README.md +2 -1
  2. package/dist/elements/button.cjs +2 -0
  3. package/dist/elements/button.cjs.map +1 -0
  4. package/dist/elements/button.d.ts +18 -0
  5. package/dist/elements/button.js +36 -0
  6. package/dist/elements/button.js.map +1 -0
  7. package/dist/elements/button.stories.d.ts +32 -0
  8. package/dist/elements/calendar.cjs +2 -0
  9. package/dist/elements/calendar.cjs.map +1 -0
  10. package/dist/elements/calendar.d.ts +4 -0
  11. package/dist/elements/{Calendar.js → calendar.js} +4 -4
  12. package/dist/elements/calendar.js.map +1 -0
  13. package/dist/elements/calendar.stories.d.ts +17 -0
  14. package/dist/elements/calendar.test.d.ts +0 -0
  15. package/dist/elements/card.cjs +2 -0
  16. package/dist/elements/card.cjs.map +1 -0
  17. package/dist/elements/card.d.ts +8 -0
  18. package/dist/elements/card.js +57 -0
  19. package/dist/elements/card.js.map +1 -0
  20. package/dist/elements/card.stories.d.ts +15 -0
  21. package/dist/elements/checkbox.cjs +2 -0
  22. package/dist/elements/checkbox.cjs.map +1 -0
  23. package/dist/elements/checkbox.d.ts +3 -0
  24. package/dist/elements/checkbox.js +29 -0
  25. package/dist/elements/checkbox.js.map +1 -0
  26. package/dist/elements/checkbox.stories.d.ts +15 -0
  27. package/dist/elements/checkbox.test.d.ts +0 -0
  28. package/dist/elements/dropdown-menu.cjs +2 -0
  29. package/dist/elements/dropdown-menu.cjs.map +1 -0
  30. package/dist/elements/dropdown-menu.d.ts +25 -0
  31. package/dist/elements/dropdown-menu.js +196 -0
  32. package/dist/elements/dropdown-menu.js.map +1 -0
  33. package/dist/elements/dropdown-menu.stories.d.ts +16 -0
  34. package/dist/elements/dropdown-menu.test.d.ts +0 -0
  35. package/dist/elements/form.cjs +2 -0
  36. package/dist/elements/form.cjs.map +1 -0
  37. package/dist/elements/form.d.ts +23 -0
  38. package/dist/elements/form.js +83 -0
  39. package/dist/elements/form.js.map +1 -0
  40. package/dist/elements/form.stories.d.ts +16 -0
  41. package/dist/elements/form.test.d.ts +0 -0
  42. package/dist/elements/input.cjs +2 -0
  43. package/dist/elements/input.cjs.map +1 -0
  44. package/dist/elements/input.d.ts +2 -0
  45. package/dist/elements/input.js +22 -0
  46. package/dist/elements/input.js.map +1 -0
  47. package/dist/elements/input.stories.d.ts +35 -0
  48. package/dist/elements/input.test.d.ts +0 -0
  49. package/dist/elements/label.cjs +2 -0
  50. package/dist/elements/label.cjs.map +1 -0
  51. package/dist/elements/label.d.ts +3 -0
  52. package/dist/elements/label.js +20 -0
  53. package/dist/elements/label.js.map +1 -0
  54. package/dist/elements/label.stories.d.ts +17 -0
  55. package/dist/elements/popover.cjs +2 -0
  56. package/dist/elements/popover.cjs.map +1 -0
  57. package/dist/elements/popover.d.ts +7 -0
  58. package/dist/elements/popover.js +41 -0
  59. package/dist/elements/popover.js.map +1 -0
  60. package/dist/elements/popover.stories.d.ts +17 -0
  61. package/dist/elements/popover.test.d.ts +0 -0
  62. package/dist/elements/select.cjs +2 -0
  63. package/dist/elements/select.cjs.map +1 -0
  64. package/dist/elements/select.d.ts +14 -0
  65. package/dist/elements/select.js +146 -0
  66. package/dist/elements/select.js.map +1 -0
  67. package/dist/elements/select.stories.d.ts +20 -0
  68. package/dist/elements/select.test.d.ts +0 -0
  69. package/dist/elements/spinner.cjs +2 -0
  70. package/dist/elements/spinner.cjs.map +1 -0
  71. package/dist/elements/spinner.d.ts +7 -0
  72. package/dist/elements/{Spinner.js → spinner.js} +5 -5
  73. package/dist/elements/spinner.js.map +1 -0
  74. package/dist/elements/{Spinner.stories.d.ts → spinner.stories.d.ts} +1 -1
  75. package/dist/elements/table.cjs +2 -0
  76. package/dist/elements/table.cjs.map +1 -0
  77. package/dist/elements/table.d.ts +9 -0
  78. package/dist/elements/table.js +71 -0
  79. package/dist/elements/table.js.map +1 -0
  80. package/dist/elements/table.stories.d.ts +17 -0
  81. package/dist/elements/tabs.cjs +2 -0
  82. package/dist/elements/tabs.cjs.map +1 -0
  83. package/dist/elements/tabs.d.ts +6 -0
  84. package/dist/elements/tabs.js +42 -0
  85. package/dist/elements/tabs.js.map +1 -0
  86. package/dist/elements/tabs.stories.d.ts +18 -0
  87. package/dist/index.css +216 -90
  88. package/package.json +20 -11
  89. package/dist/elements/Alert.cjs +0 -2
  90. package/dist/elements/Alert.cjs.map +0 -1
  91. package/dist/elements/Alert.d.ts +0 -9
  92. package/dist/elements/Alert.js +0 -13
  93. package/dist/elements/Alert.js.map +0 -1
  94. package/dist/elements/Alert.stories.d.ts +0 -11
  95. package/dist/elements/Button.cjs +0 -2
  96. package/dist/elements/Button.cjs.map +0 -1
  97. package/dist/elements/Button.d.ts +0 -9
  98. package/dist/elements/Button.js +0 -44
  99. package/dist/elements/Button.js.map +0 -1
  100. package/dist/elements/Button.stories.d.ts +0 -15
  101. package/dist/elements/Calendar.cjs +0 -2
  102. package/dist/elements/Calendar.cjs.map +0 -1
  103. package/dist/elements/Calendar.d.ts +0 -3
  104. package/dist/elements/Calendar.js.map +0 -1
  105. package/dist/elements/Calendar.stories.d.ts +0 -10
  106. package/dist/elements/Container.cjs +0 -2
  107. package/dist/elements/Container.cjs.map +0 -1
  108. package/dist/elements/Container.d.ts +0 -8
  109. package/dist/elements/Container.js +0 -7
  110. package/dist/elements/Container.js.map +0 -1
  111. package/dist/elements/Container.stories.d.ts +0 -14
  112. package/dist/elements/DataTable/Body.cjs +0 -2
  113. package/dist/elements/DataTable/Body.cjs.map +0 -1
  114. package/dist/elements/DataTable/Body.d.ts +0 -6
  115. package/dist/elements/DataTable/Body.js +0 -8
  116. package/dist/elements/DataTable/Body.js.map +0 -1
  117. package/dist/elements/DataTable/DataCell.cjs +0 -2
  118. package/dist/elements/DataTable/DataCell.cjs.map +0 -1
  119. package/dist/elements/DataTable/DataCell.d.ts +0 -6
  120. package/dist/elements/DataTable/DataCell.js +0 -19
  121. package/dist/elements/DataTable/DataCell.js.map +0 -1
  122. package/dist/elements/DataTable/Header.cjs +0 -2
  123. package/dist/elements/DataTable/Header.cjs.map +0 -1
  124. package/dist/elements/DataTable/Header.d.ts +0 -20
  125. package/dist/elements/DataTable/Header.js +0 -23
  126. package/dist/elements/DataTable/Header.js.map +0 -1
  127. package/dist/elements/DataTable/HeaderCell.cjs +0 -2
  128. package/dist/elements/DataTable/HeaderCell.cjs.map +0 -1
  129. package/dist/elements/DataTable/HeaderCell.d.ts +0 -10
  130. package/dist/elements/DataTable/HeaderCell.js +0 -45
  131. package/dist/elements/DataTable/HeaderCell.js.map +0 -1
  132. package/dist/elements/DataTable/Row.cjs +0 -2
  133. package/dist/elements/DataTable/Row.cjs.map +0 -1
  134. package/dist/elements/DataTable/Row.d.ts +0 -6
  135. package/dist/elements/DataTable/Row.js +0 -7
  136. package/dist/elements/DataTable/Row.js.map +0 -1
  137. package/dist/elements/DataTable/index.cjs +0 -2
  138. package/dist/elements/DataTable/index.cjs.map +0 -1
  139. package/dist/elements/DataTable/index.d.ts +0 -25
  140. package/dist/elements/DataTable/index.js +0 -31
  141. package/dist/elements/DataTable/index.js.map +0 -1
  142. package/dist/elements/DataTable/shared.cjs +0 -2
  143. package/dist/elements/DataTable/shared.cjs.map +0 -1
  144. package/dist/elements/DataTable/shared.d.ts +0 -6
  145. package/dist/elements/DataTable/shared.js +0 -8
  146. package/dist/elements/DataTable/shared.js.map +0 -1
  147. package/dist/elements/DataTable.stories.d.ts +0 -11
  148. package/dist/elements/DropdownMenu.cjs +0 -2
  149. package/dist/elements/DropdownMenu.cjs.map +0 -1
  150. package/dist/elements/DropdownMenu.d.ts +0 -26
  151. package/dist/elements/DropdownMenu.js +0 -125
  152. package/dist/elements/DropdownMenu.js.map +0 -1
  153. package/dist/elements/DropdownMenu.stories.d.ts +0 -9
  154. package/dist/elements/Form.cjs +0 -2
  155. package/dist/elements/Form.cjs.map +0 -1
  156. package/dist/elements/Form.d.ts +0 -22
  157. package/dist/elements/Form.js +0 -29
  158. package/dist/elements/Form.js.map +0 -1
  159. package/dist/elements/Form.stories.d.ts +0 -11
  160. package/dist/elements/FormCheck.cjs +0 -2
  161. package/dist/elements/FormCheck.cjs.map +0 -1
  162. package/dist/elements/FormCheck.d.ts +0 -7
  163. package/dist/elements/FormCheck.js +0 -17
  164. package/dist/elements/FormCheck.js.map +0 -1
  165. package/dist/elements/FormCheck.stories.d.ts +0 -14
  166. package/dist/elements/FormControl.cjs +0 -2
  167. package/dist/elements/FormControl.cjs.map +0 -1
  168. package/dist/elements/FormControl.d.ts +0 -12
  169. package/dist/elements/FormControl.js +0 -19
  170. package/dist/elements/FormControl.js.map +0 -1
  171. package/dist/elements/FormControlFeedback.cjs +0 -2
  172. package/dist/elements/FormControlFeedback.cjs.map +0 -1
  173. package/dist/elements/FormControlFeedback.d.ts +0 -8
  174. package/dist/elements/FormControlFeedback.js +0 -8
  175. package/dist/elements/FormControlFeedback.js.map +0 -1
  176. package/dist/elements/FormControlFeedback.test.d.ts +0 -1
  177. package/dist/elements/FormFeedback.cjs +0 -2
  178. package/dist/elements/FormFeedback.cjs.map +0 -1
  179. package/dist/elements/FormFeedback.d.ts +0 -8
  180. package/dist/elements/FormFeedback.js +0 -8
  181. package/dist/elements/FormFeedback.js.map +0 -1
  182. package/dist/elements/FormFeedback.test.d.ts +0 -1
  183. package/dist/elements/FormFieldset.cjs +0 -2
  184. package/dist/elements/FormFieldset.cjs.map +0 -1
  185. package/dist/elements/FormFieldset.d.ts +0 -2
  186. package/dist/elements/FormFieldset.js +0 -11
  187. package/dist/elements/FormFieldset.js.map +0 -1
  188. package/dist/elements/FormFieldset.test.d.ts +0 -1
  189. package/dist/elements/FormGroup.cjs +0 -2
  190. package/dist/elements/FormGroup.cjs.map +0 -1
  191. package/dist/elements/FormGroup.d.ts +0 -10
  192. package/dist/elements/FormGroup.js +0 -13
  193. package/dist/elements/FormGroup.js.map +0 -1
  194. package/dist/elements/FormGroup.test.d.ts +0 -1
  195. package/dist/elements/FormLabel.cjs +0 -2
  196. package/dist/elements/FormLabel.cjs.map +0 -1
  197. package/dist/elements/FormLabel.d.ts +0 -6
  198. package/dist/elements/FormLabel.js +0 -15
  199. package/dist/elements/FormLabel.js.map +0 -1
  200. package/dist/elements/FormLabel.test.d.ts +0 -1
  201. package/dist/elements/FormOption.cjs +0 -2
  202. package/dist/elements/FormOption.cjs.map +0 -1
  203. package/dist/elements/FormOption.d.ts +0 -2
  204. package/dist/elements/FormOption.js +0 -10
  205. package/dist/elements/FormOption.js.map +0 -1
  206. package/dist/elements/FormSelect.cjs +0 -2
  207. package/dist/elements/FormSelect.cjs.map +0 -1
  208. package/dist/elements/FormSelect.d.ts +0 -5
  209. package/dist/elements/FormSelect.js +0 -13
  210. package/dist/elements/FormSelect.js.map +0 -1
  211. package/dist/elements/Popover.cjs +0 -2
  212. package/dist/elements/Popover.cjs.map +0 -1
  213. package/dist/elements/Popover.d.ts +0 -7
  214. package/dist/elements/Popover.js +0 -26
  215. package/dist/elements/Popover.js.map +0 -1
  216. package/dist/elements/Popover.stories.d.ts +0 -9
  217. package/dist/elements/Spinner.cjs +0 -2
  218. package/dist/elements/Spinner.cjs.map +0 -1
  219. package/dist/elements/Spinner.d.ts +0 -7
  220. package/dist/elements/Spinner.js.map +0 -1
  221. package/dist/elements/Tabs.cjs +0 -2
  222. package/dist/elements/Tabs.cjs.map +0 -1
  223. package/dist/elements/Tabs.d.ts +0 -6
  224. package/dist/elements/Tabs.js +0 -47
  225. package/dist/elements/Tabs.js.map +0 -1
  226. package/dist/elements/Tabs.stories.d.ts +0 -9
  227. /package/dist/elements/{Alert.test.d.ts → button.test.d.ts} +0 -0
  228. /package/dist/elements/{Button.test.d.ts → card.test.d.ts} +0 -0
  229. /package/dist/elements/{Container.test.d.ts → label.test.d.ts} +0 -0
  230. /package/dist/elements/{Form.test.d.ts → spinner.test.d.ts} +0 -0
  231. /package/dist/elements/{FormCheck.test.d.ts → table.test.d.ts} +0 -0
  232. /package/dist/elements/{FormControl.test.d.ts → tabs.test.d.ts} +0 -0
@@ -1,8 +0,0 @@
1
- import { ElementType, ReactNode } from 'react';
2
- type Props = {
3
- as?: ElementType;
4
- children?: ReactNode;
5
- className?: string;
6
- };
7
- declare const Container: ({ as, children, className }: Props) => import("react/jsx-runtime").JSX.Element;
8
- export default Container;
@@ -1,7 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { cn as n } from "../lib/utils.js";
3
- const r = "container mx-auto sm:max-w-screen-sm md:max-w-screen-md lg:max-w-screen-lg xl:max-w-screen-xl 2xl:max-w-screen-2xl px-4", t = ({ as: e = "div", children: a, className: m }) => /* @__PURE__ */ s(e, { className: n(r, m), children: a });
4
- export {
5
- t as default
6
- };
7
- //# sourceMappingURL=Container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Container.js","sources":["../../src/elements/Container.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { ElementType, ReactNode } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst baseCN =\n 'container mx-auto sm:max-w-screen-sm md:max-w-screen-md lg:max-w-screen-lg xl:max-w-screen-xl 2xl:max-w-screen-2xl px-4';\n\ntype Props = {\n as?: ElementType;\n children?: ReactNode;\n className?: string;\n};\n\nconst Container = ({ as = 'div', children, className }: Props) => {\n const Tag = as;\n\n return <Tag className={cn(baseCN, className)}>{children}</Tag>;\n};\n\nexport default Container;\n"],"names":["baseCN","Container","as","children","className","cn"],"mappings":";;AAkBA,MAAMA,IACJ,2HAQIC,IAAY,CAAC,EAAE,IAAAC,IAAK,OAAO,UAAAC,GAAU,WAAAC,0BAC7BF,GAEJ,EAAI,WAAWG,EAAGL,GAAQI,CAAS,GAAI,UAAAD,GAAS;"}
@@ -1,14 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- tags: string[];
5
- component: ({ as, children, className }: {
6
- as?: import('react').ElementType;
7
- children?: import('react').ReactNode;
8
- className?: string;
9
- }) => import("react/jsx-runtime").JSX.Element;
10
- };
11
- export default meta;
12
- type Story = StoryObj<typeof meta>;
13
- export declare const Default: Story;
14
- export declare const CustomStyling: Story;
@@ -1,2 +0,0 @@
1
- "use strict";const i=require("react/jsx-runtime"),o=require("../../lib/utils.cjs"),a="divide-y divide-chrome-200 bg-background",s=({className:e,...t})=>i.jsx("tbody",{...t,className:o.cn(a,e)});s.displayName="DataTableBody";module.exports=s;
2
- //# sourceMappingURL=Body.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Body.cjs","sources":["../../../src/elements/DataTable/Body.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst baseCls = 'divide-y divide-chrome-200 bg-background';\n\nconst Body = ({ className, ...props }: ComponentPropsWithoutRef<'tbody'>) => (\n <tbody {...props} className={cn(baseCls, className)} />\n);\n\nBody.displayName = 'DataTableBody';\n\nexport default Body;\n"],"names":["baseCls","Body","className","props","jsx","cn"],"mappings":"mFAkBMA,EAAU,2CAEVC,EAAO,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,IAC5BC,EAAAA,IAAC,QAAA,CAAO,GAAGD,EAAO,UAAWE,EAAAA,GAAGL,EAASE,CAAS,CAAA,CAAG,EAGvDD,EAAK,YAAc"}
@@ -1,6 +0,0 @@
1
- import { ComponentPropsWithoutRef } from 'react';
2
- declare const Body: {
3
- ({ className, ...props }: ComponentPropsWithoutRef<"tbody">): import("react/jsx-runtime").JSX.Element;
4
- displayName: string;
5
- };
6
- export default Body;
@@ -1,8 +0,0 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { cn as e } from "../../lib/utils.js";
3
- const s = "divide-y divide-chrome-200 bg-background", t = ({ className: o, ...a }) => /* @__PURE__ */ d("tbody", { ...a, className: e(s, o) });
4
- t.displayName = "DataTableBody";
5
- export {
6
- t as default
7
- };
8
- //# sourceMappingURL=Body.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Body.js","sources":["../../../src/elements/DataTable/Body.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst baseCls = 'divide-y divide-chrome-200 bg-background';\n\nconst Body = ({ className, ...props }: ComponentPropsWithoutRef<'tbody'>) => (\n <tbody {...props} className={cn(baseCls, className)} />\n);\n\nBody.displayName = 'DataTableBody';\n\nexport default Body;\n"],"names":["baseCls","Body","className","props","jsx","cn"],"mappings":";;AAkBA,MAAMA,IAAU,4CAEVC,IAAO,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,MAC5B,gBAAAC,EAAC,SAAA,EAAO,GAAGD,GAAO,WAAWE,EAAGL,GAASE,CAAS,EAAA,CAAG;AAGvDD,EAAK,cAAc;"}
@@ -1,2 +0,0 @@
1
- "use strict";const p=require("react/jsx-runtime"),r=require("react"),n=require("../../lib/utils.cjs"),c=require("./shared.cjs"),o="whitespace-nowrap",x={xs:"px-2 py-1",sm:"px-2 py-1.5",md:"px-3 py-3.5",lg:"px-3 py-3.5",xl:"px-3 py-3.5"},e=({className:s,...t})=>{const{size:a}=r.useContext(c.Context);return p.jsx("td",{...t,className:n.cn(o,x[a],s)})};e.displayName="DataTableDataCell";module.exports=e;
2
- //# sourceMappingURL=DataCell.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataCell.cjs","sources":["../../../src/elements/DataTable/DataCell.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { useContext } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as TableContext } from './shared';\nimport type { DataTableSize } from './shared';\n\nconst baseCls = 'whitespace-nowrap';\n\nconst sizeCNMap: Record<DataTableSize, string> = {\n xs: 'px-2 py-1',\n sm: 'px-2 py-1.5',\n md: 'px-3 py-3.5',\n lg: 'px-3 py-3.5',\n xl: 'px-3 py-3.5',\n};\n\nconst DataCell = ({ className, ...props }: ComponentPropsWithoutRef<'td'>) => {\n const { size } = useContext(TableContext);\n\n return <td {...props} className={cn(baseCls, sizeCNMap[size], className)} />;\n};\n\nDataCell.displayName = 'DataTableDataCell';\n\nexport default DataCell;\n"],"names":["baseCls","sizeCNMap","DataCell","className","props","size","useContext","TableContext","jsx","cn"],"mappings":"gIAsBMA,EAAU,oBAEVC,EAA2C,CAC/C,GAAI,YACJ,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,GAAI,aACN,EAEMC,EAAW,CAAC,CAAE,UAAAC,EAAW,GAAGC,KAA4C,CAC5E,KAAM,CAAE,KAAAC,CAAA,EAASC,EAAAA,WAAWC,SAAY,EAExC,OAAOC,MAAC,KAAA,CAAI,GAAGJ,EAAO,UAAWK,KAAGT,EAASC,EAAUI,CAAI,EAAGF,CAAS,CAAA,CAAG,CAC5E,EAEAD,EAAS,YAAc"}
@@ -1,6 +0,0 @@
1
- import { ComponentPropsWithoutRef } from 'react';
2
- declare const DataCell: {
3
- ({ className, ...props }: ComponentPropsWithoutRef<"td">): import("react/jsx-runtime").JSX.Element;
4
- displayName: string;
5
- };
6
- export default DataCell;
@@ -1,19 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { useContext as e } from "react";
3
- import { cn as o } from "../../lib/utils.js";
4
- import { Context as m } from "./shared.js";
5
- const r = "whitespace-nowrap", l = {
6
- xs: "px-2 py-1",
7
- sm: "px-2 py-1.5",
8
- md: "px-3 py-3.5",
9
- lg: "px-3 py-3.5",
10
- xl: "px-3 py-3.5"
11
- }, x = ({ className: t, ...p }) => {
12
- const { size: a } = e(m);
13
- return /* @__PURE__ */ s("td", { ...p, className: o(r, l[a], t) });
14
- };
15
- x.displayName = "DataTableDataCell";
16
- export {
17
- x as default
18
- };
19
- //# sourceMappingURL=DataCell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataCell.js","sources":["../../../src/elements/DataTable/DataCell.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { useContext } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as TableContext } from './shared';\nimport type { DataTableSize } from './shared';\n\nconst baseCls = 'whitespace-nowrap';\n\nconst sizeCNMap: Record<DataTableSize, string> = {\n xs: 'px-2 py-1',\n sm: 'px-2 py-1.5',\n md: 'px-3 py-3.5',\n lg: 'px-3 py-3.5',\n xl: 'px-3 py-3.5',\n};\n\nconst DataCell = ({ className, ...props }: ComponentPropsWithoutRef<'td'>) => {\n const { size } = useContext(TableContext);\n\n return <td {...props} className={cn(baseCls, sizeCNMap[size], className)} />;\n};\n\nDataCell.displayName = 'DataTableDataCell';\n\nexport default DataCell;\n"],"names":["baseCls","sizeCNMap","DataCell","className","props","size","useContext","TableContext","jsx","cn"],"mappings":";;;;AAsBA,MAAMA,IAAU,qBAEVC,IAA2C;AAAA,EAC/C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAW,CAAC,EAAE,WAAAC,GAAW,GAAGC,QAA4C;AAC5E,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAWC,CAAY;AAExC,SAAO,gBAAAC,EAAC,MAAA,EAAI,GAAGJ,GAAO,WAAWK,EAAGT,GAASC,EAAUI,CAAI,GAAGF,CAAS,EAAA,CAAG;AAC5E;AAEAD,EAAS,cAAc;"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),n=require("react"),i=require("../../lib/utils.cjs"),d="bg-chrome-50",r=()=>{},s=n.createContext({sortBy:null,onSortByChange:r}),a=({className:c,sortBy:e,onSortByChange:t,...l})=>{const u=n.useMemo(()=>({sortBy:e||null,onSortByChange:t||r}),[e,t]);return o.jsx(s.Provider,{value:u,children:o.jsx("thead",{...l,className:i.cn(d,c)})})};a.displayName="DataTableHeader";exports.Context=s;exports.default=a;
2
- //# sourceMappingURL=Header.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Header.cjs","sources":["../../../src/elements/DataTable/Header.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createContext, useMemo } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst baseCls = 'bg-chrome-50';\nconst noop = () => {};\n\nexport type SortBy = {\n field: string;\n direction: 'ASC' | 'DESC';\n};\n\ntype OnSortByChange = (newSortBy: SortBy) => void;\n\ninterface Props extends ComponentPropsWithoutRef<'thead'> {\n sortBy?: SortBy;\n onSortByChange?: OnSortByChange;\n}\n\ntype SortByContext = {\n sortBy: SortBy | null;\n onSortByChange: OnSortByChange;\n};\n\nexport const Context = createContext<SortByContext>({\n sortBy: null,\n onSortByChange: noop,\n});\n\nconst Header = ({ className, sortBy, onSortByChange, ...props }: Props) => {\n const context = useMemo(\n () => ({\n sortBy: sortBy || null,\n onSortByChange: onSortByChange || noop,\n }),\n [sortBy, onSortByChange],\n );\n\n return (\n <Context.Provider value={context}>\n <thead {...props} className={cn(baseCls, className)} />\n </Context.Provider>\n );\n};\n\nHeader.displayName = 'DataTableHeader';\n\nexport default Header;\n"],"names":["baseCls","noop","Context","createContext","Header","className","sortBy","onSortByChange","props","context","useMemo","jsx","cn"],"mappings":"qMAmBMA,EAAU,eACVC,EAAO,IAAM,CAAC,EAmBPC,EAAUC,EAAAA,cAA6B,CAClD,OAAQ,KACR,eAAgBF,CAClB,CAAC,EAEKG,EAAS,CAAC,CAAE,UAAAC,EAAW,OAAAC,EAAQ,eAAAC,EAAgB,GAAGC,KAAmB,CACzE,MAAMC,EAAUC,EAAAA,QACd,KAAO,CACL,OAAQJ,GAAU,KAClB,eAAgBC,GAAkBN,CAAA,GAEpC,CAACK,EAAQC,CAAc,CAAA,EAGzB,OACEI,EAAAA,IAACT,EAAQ,SAAR,CAAiB,MAAOO,EACvB,SAAAE,EAAAA,IAAC,QAAA,CAAO,GAAGH,EAAO,UAAWI,EAAAA,GAAGZ,EAASK,CAAS,EAAG,EACvD,CAEJ,EAEAD,EAAO,YAAc"}
@@ -1,20 +0,0 @@
1
- import { ComponentPropsWithoutRef } from 'react';
2
- export type SortBy = {
3
- field: string;
4
- direction: 'ASC' | 'DESC';
5
- };
6
- type OnSortByChange = (newSortBy: SortBy) => void;
7
- interface Props extends ComponentPropsWithoutRef<'thead'> {
8
- sortBy?: SortBy;
9
- onSortByChange?: OnSortByChange;
10
- }
11
- type SortByContext = {
12
- sortBy: SortBy | null;
13
- onSortByChange: OnSortByChange;
14
- };
15
- export declare const Context: import('react').Context<SortByContext>;
16
- declare const Header: {
17
- ({ className, sortBy, onSortByChange, ...props }: Props): import("react/jsx-runtime").JSX.Element;
18
- displayName: string;
19
- };
20
- export default Header;
@@ -1,23 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { createContext as c, useMemo as l } from "react";
3
- import { cn as m } from "../../lib/utils.js";
4
- const d = "bg-chrome-50", r = () => {
5
- }, i = c({
6
- sortBy: null,
7
- onSortByChange: r
8
- }), p = ({ className: a, sortBy: e, onSortByChange: o, ...n }) => {
9
- const s = l(
10
- () => ({
11
- sortBy: e || null,
12
- onSortByChange: o || r
13
- }),
14
- [e, o]
15
- );
16
- return /* @__PURE__ */ t(i.Provider, { value: s, children: /* @__PURE__ */ t("thead", { ...n, className: m(d, a) }) });
17
- };
18
- p.displayName = "DataTableHeader";
19
- export {
20
- i as Context,
21
- p as default
22
- };
23
- //# sourceMappingURL=Header.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Header.js","sources":["../../../src/elements/DataTable/Header.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createContext, useMemo } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst baseCls = 'bg-chrome-50';\nconst noop = () => {};\n\nexport type SortBy = {\n field: string;\n direction: 'ASC' | 'DESC';\n};\n\ntype OnSortByChange = (newSortBy: SortBy) => void;\n\ninterface Props extends ComponentPropsWithoutRef<'thead'> {\n sortBy?: SortBy;\n onSortByChange?: OnSortByChange;\n}\n\ntype SortByContext = {\n sortBy: SortBy | null;\n onSortByChange: OnSortByChange;\n};\n\nexport const Context = createContext<SortByContext>({\n sortBy: null,\n onSortByChange: noop,\n});\n\nconst Header = ({ className, sortBy, onSortByChange, ...props }: Props) => {\n const context = useMemo(\n () => ({\n sortBy: sortBy || null,\n onSortByChange: onSortByChange || noop,\n }),\n [sortBy, onSortByChange],\n );\n\n return (\n <Context.Provider value={context}>\n <thead {...props} className={cn(baseCls, className)} />\n </Context.Provider>\n );\n};\n\nHeader.displayName = 'DataTableHeader';\n\nexport default Header;\n"],"names":["baseCls","noop","Context","createContext","Header","className","sortBy","onSortByChange","props","context","useMemo","jsx","cn"],"mappings":";;;AAmBA,MAAMA,IAAU,gBACVC,IAAO,MAAM;AAAC,GAmBPC,IAAUC,EAA6B;AAAA,EAClD,QAAQ;AAAA,EACR,gBAAgBF;AAClB,CAAC,GAEKG,IAAS,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,gBAAAC,GAAgB,GAAGC,QAAmB;AACzE,QAAMC,IAAUC;AAAA,IACd,OAAO;AAAA,MACL,QAAQJ,KAAU;AAAA,MAClB,gBAAgBC,KAAkBN;AAAA,IAAA;AAAA,IAEpC,CAACK,GAAQC,CAAc;AAAA,EAAA;AAGzB,SACE,gBAAAI,EAACT,EAAQ,UAAR,EAAiB,OAAOO,GACvB,UAAA,gBAAAE,EAAC,SAAA,EAAO,GAAGH,GAAO,WAAWI,EAAGZ,GAASK,CAAS,GAAG,GACvD;AAEJ;AAEAD,EAAO,cAAc;"}
@@ -1,2 +0,0 @@
1
- "use strict";const i=require("react/jsx-runtime"),l=require("@heroicons/react/20/solid"),a=require("react"),x=require("../../lib/utils.cjs"),m=require("./Header.cjs"),b=require("./shared.cjs"),N="text-left font-semibold text-chrome-900 select-none",S="ml-2 flex-none text-chrome-400 group-hover:visible group-focus:visible",D={xs:"px-2 py-1.5",sm:"px-2 py-1.5",md:"px-3 py-3.5",lg:"px-3 py-3.5",xl:"px-3 py-3.5"},C=({children:c,className:p,sortField:n,initialSortDirection:u="ASC",...f})=>{const{size:d}=a.useContext(b.Context),{sortBy:e,onSortByChange:r}=a.useContext(m.Context),t=e&&e.field===n?e.direction:u,h=s=>{if(s.key==="Enter"||s.key===" "){let o=t;(e==null?void 0:e.field)===n&&(o=o==="ASC"?"DESC":"ASC"),n&&r({field:n,direction:o})}};return i.jsxs("th",{...f,className:x.cn(N,D[d],p),children:[n&&i.jsxs("span",{className:"group inline-flex cursor-pointer",role:"button",tabIndex:0,onClick:()=>{let s=t;(e==null?void 0:e.field)===n&&(s=s==="ASC"?"DESC":"ASC"),r({field:n,direction:s})},onKeyDown:h,children:[c,i.jsx("span",{className:x.cn(S,(e==null?void 0:e.field)===n?"visible":"invisible"),children:t==="ASC"?i.jsx(l.ChevronUpIcon,{className:"h-5 w-5"}):i.jsx(l.ChevronDownIcon,{className:"h-5 w-5"})})]}),!n&&c]})};C.displayName="DataTableHeaderCell";module.exports=C;
2
- //# sourceMappingURL=HeaderCell.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderCell.cjs","sources":["../../../src/elements/DataTable/HeaderCell.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/20/solid';\nimport { useContext } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as HeaderContext } from './Header';\nimport { Context as TableContext } from './shared';\nimport type { DataTableSize } from './shared';\n\nconst baseCN = 'text-left font-semibold text-chrome-900 select-none';\nconst sortIconCN = 'ml-2 flex-none text-chrome-400 group-hover:visible group-focus:visible';\n\nconst sizeCNMap: Record<DataTableSize, string> = {\n xs: 'px-2 py-1.5',\n sm: 'px-2 py-1.5',\n md: 'px-3 py-3.5',\n lg: 'px-3 py-3.5',\n xl: 'px-3 py-3.5',\n};\n\ninterface Props extends ComponentPropsWithoutRef<'th'> {\n sortField?: string;\n initialSortDirection?: 'ASC' | 'DESC';\n}\n\nconst HeaderCell = ({ children, className, sortField, initialSortDirection = 'ASC', ...props }: Props) => {\n const { size } = useContext(TableContext);\n\n const { sortBy, onSortByChange } = useContext(HeaderContext);\n\n const sortDirection = sortBy && sortBy.field === sortField ? sortBy.direction : initialSortDirection;\n\n const handleKeyPress = (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n let newDirection = sortDirection;\n if (sortBy?.field === sortField) newDirection = newDirection === 'ASC' ? 'DESC' : 'ASC';\n if (sortField) onSortByChange({ field: sortField, direction: newDirection });\n }\n };\n\n return (\n <th {...props} className={cn(baseCN, sizeCNMap[size], className)}>\n {sortField && (\n <span\n className=\"group inline-flex cursor-pointer\"\n role=\"button\"\n tabIndex={0}\n onClick={() => {\n let newDirection = sortDirection;\n if (sortBy?.field === sortField) newDirection = newDirection === 'ASC' ? 'DESC' : 'ASC';\n onSortByChange({ field: sortField, direction: newDirection });\n }}\n onKeyDown={handleKeyPress}\n >\n {children}\n <span className={cn(sortIconCN, sortBy?.field === sortField ? 'visible' : 'invisible')}>\n {sortDirection === 'ASC' ? <ChevronUpIcon className=\"h-5 w-5\" /> : <ChevronDownIcon className=\"h-5 w-5\" />}\n </span>\n </span>\n )}\n {!sortField && children}\n </th>\n );\n};\n\nHeaderCell.displayName = 'DataTableHeaderCell';\n\nexport default HeaderCell;\n"],"names":["baseCN","sortIconCN","sizeCNMap","HeaderCell","children","className","sortField","initialSortDirection","props","size","useContext","TableContext","sortBy","onSortByChange","HeaderContext","sortDirection","handleKeyPress","event","newDirection","jsxs","cn","jsx","ChevronUpIcon","ChevronDownIcon"],"mappings":"iMAwBMA,EAAS,sDACTC,EAAa,yEAEbC,EAA2C,CAC/C,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,GAAI,aACN,EAOMC,EAAa,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,UAAAC,EAAW,qBAAAC,EAAuB,MAAO,GAAGC,KAAmB,CACxG,KAAM,CAAE,KAAAC,CAAA,EAASC,EAAAA,WAAWC,SAAY,EAElC,CAAE,OAAAC,EAAQ,eAAAC,GAAmBH,EAAAA,WAAWI,EAAAA,OAAa,EAErDC,EAAgBH,GAAUA,EAAO,QAAUN,EAAYM,EAAO,UAAYL,EAE1ES,EAAkBC,GAA+B,CACrD,GAAIA,EAAM,MAAQ,SAAWA,EAAM,MAAQ,IAAK,CAC9C,IAAIC,EAAeH,GACfH,GAAA,YAAAA,EAAQ,SAAUN,IAAWY,EAAeA,IAAiB,MAAQ,OAAS,OAC9EZ,GAAWO,EAAe,CAAE,MAAOP,EAAW,UAAWY,EAAc,CAC7E,CACF,EAEA,OACEC,EAAAA,KAAC,KAAA,CAAI,GAAGX,EAAO,UAAWY,EAAAA,GAAGpB,EAAQE,EAAUO,CAAI,EAAGJ,CAAS,EAC5D,SAAA,CAAAC,GACCa,EAAAA,KAAC,OAAA,CACC,UAAU,mCACV,KAAK,SACL,SAAU,EACV,QAAS,IAAM,CACb,IAAID,EAAeH,GACfH,GAAA,YAAAA,EAAQ,SAAUN,IAAWY,EAAeA,IAAiB,MAAQ,OAAS,OAClFL,EAAe,CAAE,MAAOP,EAAW,UAAWY,EAAc,CAC9D,EACA,UAAWF,EAEV,SAAA,CAAAZ,EACDiB,EAAAA,IAAC,QAAK,UAAWD,EAAAA,GAAGnB,GAAYW,GAAA,YAAAA,EAAQ,SAAUN,EAAY,UAAY,WAAW,EAClF,aAAkB,MAAQe,EAAAA,IAACC,iBAAc,UAAU,SAAA,CAAU,EAAKD,EAAAA,IAACE,EAAAA,gBAAA,CAAgB,UAAU,SAAA,CAAU,CAAA,CAC1G,CAAA,CAAA,CAAA,EAGH,CAACjB,GAAaF,CAAA,EACjB,CAEJ,EAEAD,EAAW,YAAc"}
@@ -1,10 +0,0 @@
1
- import { ComponentPropsWithoutRef } from 'react';
2
- interface Props extends ComponentPropsWithoutRef<'th'> {
3
- sortField?: string;
4
- initialSortDirection?: 'ASC' | 'DESC';
5
- }
6
- declare const HeaderCell: {
7
- ({ children, className, sortField, initialSortDirection, ...props }: Props): import("react/jsx-runtime").JSX.Element;
8
- displayName: string;
9
- };
10
- export default HeaderCell;
@@ -1,45 +0,0 @@
1
- import { jsxs as r, jsx as c } from "react/jsx-runtime";
2
- import { ChevronUpIcon as d, ChevronDownIcon as b } from "@heroicons/react/20/solid";
3
- import { useContext as a } from "react";
4
- import { cn as p } from "../../lib/utils.js";
5
- import { Context as u } from "./Header.js";
6
- import { Context as N } from "./shared.js";
7
- const S = "text-left font-semibold text-chrome-900 select-none", D = "ml-2 flex-none text-chrome-400 group-hover:visible group-focus:visible", v = {
8
- xs: "px-2 py-1.5",
9
- sm: "px-2 py-1.5",
10
- md: "px-3 py-3.5",
11
- lg: "px-3 py-3.5",
12
- xl: "px-3 py-3.5"
13
- }, w = ({ children: s, className: m, sortField: n, initialSortDirection: f = "ASC", ...C }) => {
14
- const { size: x } = a(N), { sortBy: e, onSortByChange: l } = a(u), i = e && e.field === n ? e.direction : f, h = (o) => {
15
- if (o.key === "Enter" || o.key === " ") {
16
- let t = i;
17
- (e == null ? void 0 : e.field) === n && (t = t === "ASC" ? "DESC" : "ASC"), n && l({ field: n, direction: t });
18
- }
19
- };
20
- return /* @__PURE__ */ r("th", { ...C, className: p(S, v[x], m), children: [
21
- n && /* @__PURE__ */ r(
22
- "span",
23
- {
24
- className: "group inline-flex cursor-pointer",
25
- role: "button",
26
- tabIndex: 0,
27
- onClick: () => {
28
- let o = i;
29
- (e == null ? void 0 : e.field) === n && (o = o === "ASC" ? "DESC" : "ASC"), l({ field: n, direction: o });
30
- },
31
- onKeyDown: h,
32
- children: [
33
- s,
34
- /* @__PURE__ */ c("span", { className: p(D, (e == null ? void 0 : e.field) === n ? "visible" : "invisible"), children: i === "ASC" ? /* @__PURE__ */ c(d, { className: "h-5 w-5" }) : /* @__PURE__ */ c(b, { className: "h-5 w-5" }) })
35
- ]
36
- }
37
- ),
38
- !n && s
39
- ] });
40
- };
41
- w.displayName = "DataTableHeaderCell";
42
- export {
43
- w as default
44
- };
45
- //# sourceMappingURL=HeaderCell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderCell.js","sources":["../../../src/elements/DataTable/HeaderCell.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/20/solid';\nimport { useContext } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as HeaderContext } from './Header';\nimport { Context as TableContext } from './shared';\nimport type { DataTableSize } from './shared';\n\nconst baseCN = 'text-left font-semibold text-chrome-900 select-none';\nconst sortIconCN = 'ml-2 flex-none text-chrome-400 group-hover:visible group-focus:visible';\n\nconst sizeCNMap: Record<DataTableSize, string> = {\n xs: 'px-2 py-1.5',\n sm: 'px-2 py-1.5',\n md: 'px-3 py-3.5',\n lg: 'px-3 py-3.5',\n xl: 'px-3 py-3.5',\n};\n\ninterface Props extends ComponentPropsWithoutRef<'th'> {\n sortField?: string;\n initialSortDirection?: 'ASC' | 'DESC';\n}\n\nconst HeaderCell = ({ children, className, sortField, initialSortDirection = 'ASC', ...props }: Props) => {\n const { size } = useContext(TableContext);\n\n const { sortBy, onSortByChange } = useContext(HeaderContext);\n\n const sortDirection = sortBy && sortBy.field === sortField ? sortBy.direction : initialSortDirection;\n\n const handleKeyPress = (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n let newDirection = sortDirection;\n if (sortBy?.field === sortField) newDirection = newDirection === 'ASC' ? 'DESC' : 'ASC';\n if (sortField) onSortByChange({ field: sortField, direction: newDirection });\n }\n };\n\n return (\n <th {...props} className={cn(baseCN, sizeCNMap[size], className)}>\n {sortField && (\n <span\n className=\"group inline-flex cursor-pointer\"\n role=\"button\"\n tabIndex={0}\n onClick={() => {\n let newDirection = sortDirection;\n if (sortBy?.field === sortField) newDirection = newDirection === 'ASC' ? 'DESC' : 'ASC';\n onSortByChange({ field: sortField, direction: newDirection });\n }}\n onKeyDown={handleKeyPress}\n >\n {children}\n <span className={cn(sortIconCN, sortBy?.field === sortField ? 'visible' : 'invisible')}>\n {sortDirection === 'ASC' ? <ChevronUpIcon className=\"h-5 w-5\" /> : <ChevronDownIcon className=\"h-5 w-5\" />}\n </span>\n </span>\n )}\n {!sortField && children}\n </th>\n );\n};\n\nHeaderCell.displayName = 'DataTableHeaderCell';\n\nexport default HeaderCell;\n"],"names":["baseCN","sortIconCN","sizeCNMap","HeaderCell","children","className","sortField","initialSortDirection","props","size","useContext","TableContext","sortBy","onSortByChange","HeaderContext","sortDirection","handleKeyPress","event","newDirection","jsxs","cn","jsx","ChevronUpIcon","ChevronDownIcon"],"mappings":";;;;;;AAwBA,MAAMA,IAAS,uDACTC,IAAa,0EAEbC,IAA2C;AAAA,EAC/C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAOMC,IAAa,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,WAAAC,GAAW,sBAAAC,IAAuB,OAAO,GAAGC,QAAmB;AACxG,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAWC,CAAY,GAElC,EAAE,QAAAC,GAAQ,gBAAAC,MAAmBH,EAAWI,CAAa,GAErDC,IAAgBH,KAAUA,EAAO,UAAUN,IAAYM,EAAO,YAAYL,GAE1ES,IAAiB,CAACC,MAA+B;AACrD,QAAIA,EAAM,QAAQ,WAAWA,EAAM,QAAQ,KAAK;AAC9C,UAAIC,IAAeH;AACnB,OAAIH,KAAA,gBAAAA,EAAQ,WAAUN,MAAWY,IAAeA,MAAiB,QAAQ,SAAS,QAC9EZ,KAAWO,EAAe,EAAE,OAAOP,GAAW,WAAWY,GAAc;AAAA,IAC7E;AAAA,EACF;AAEA,SACE,gBAAAC,EAAC,MAAA,EAAI,GAAGX,GAAO,WAAWY,EAAGpB,GAAQE,EAAUO,CAAI,GAAGJ,CAAS,GAC5D,UAAA;AAAA,IAAAC,KACC,gBAAAa;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,MAAK;AAAA,QACL,UAAU;AAAA,QACV,SAAS,MAAM;AACb,cAAID,IAAeH;AACnB,WAAIH,KAAA,gBAAAA,EAAQ,WAAUN,MAAWY,IAAeA,MAAiB,QAAQ,SAAS,QAClFL,EAAe,EAAE,OAAOP,GAAW,WAAWY,GAAc;AAAA,QAC9D;AAAA,QACA,WAAWF;AAAA,QAEV,UAAA;AAAA,UAAAZ;AAAA,UACD,gBAAAiB,EAAC,UAAK,WAAWD,EAAGnB,IAAYW,KAAA,gBAAAA,EAAQ,WAAUN,IAAY,YAAY,WAAW,GAClF,gBAAkB,QAAQ,gBAAAe,EAACC,KAAc,WAAU,UAAA,CAAU,IAAK,gBAAAD,EAACE,GAAA,EAAgB,WAAU,UAAA,CAAU,EAAA,CAC1G;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAGH,CAACjB,KAAaF;AAAA,EAAA,GACjB;AAEJ;AAEAD,EAAW,cAAc;"}
@@ -1,2 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),s=t=>e.jsx("tr",{...t});s.displayName="DataTableRow";module.exports=s;
2
- //# sourceMappingURL=Row.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Row.cjs","sources":["../../../src/elements/DataTable/Row.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { ComponentPropsWithoutRef } from 'react';\n\nconst Row = (props: ComponentPropsWithoutRef<'tr'>) => <tr {...props} />;\n\nRow.displayName = 'DataTableRow';\n\nexport default Row;\n"],"names":["Row","props","jsx"],"mappings":"kDAgBMA,EAAOC,GAA0CC,EAAAA,IAAC,KAAA,CAAI,GAAGD,CAAA,CAAO,EAEtED,EAAI,YAAc"}
@@ -1,6 +0,0 @@
1
- import { ComponentPropsWithoutRef } from 'react';
2
- declare const Row: {
3
- (props: ComponentPropsWithoutRef<"tr">): import("react/jsx-runtime").JSX.Element;
4
- displayName: string;
5
- };
6
- export default Row;
@@ -1,7 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- const t = (a) => /* @__PURE__ */ o("tr", { ...a });
3
- t.displayName = "DataTableRow";
4
- export {
5
- t as default
6
- };
7
- //# sourceMappingURL=Row.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Row.js","sources":["../../../src/elements/DataTable/Row.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { ComponentPropsWithoutRef } from 'react';\n\nconst Row = (props: ComponentPropsWithoutRef<'tr'>) => <tr {...props} />;\n\nRow.displayName = 'DataTableRow';\n\nexport default Row;\n"],"names":["Row","props","jsx"],"mappings":";AAgBA,MAAMA,IAAM,CAACC,MAA0C,gBAAAC,EAAC,MAAA,EAAI,GAAGD,EAAA,CAAO;AAEtED,EAAI,cAAc;"}
@@ -1,2 +0,0 @@
1
- "use strict";const t=require("react/jsx-runtime"),c=require("react"),s=require("../../lib/utils.cjs"),i=require("./Body.cjs"),l=require("./DataCell.cjs"),d=require("./Header.cjs"),u=require("./HeaderCell.cjs"),x=require("./Row.cjs"),m=require("./shared.cjs"),b="overflow-hidden shadow ring ring-black/5 rounded-lg",q={xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-base",xl:"text-base"},r=({className:a,children:n,size:e="md"})=>{const o=c.useMemo(()=>({size:e}),[e]);return t.jsx(m.Context.Provider,{value:o,children:t.jsx("div",{className:s.cn(b,a),children:t.jsx("table",{className:s.cn("min-w-full divide-y divide-chrome-300",e&&q[e]),children:n})})})};r.displayName="DataTable";const h=Object.assign(r,{Body:i,DataCell:l,Header:d.default,HeaderCell:u,Row:x});module.exports=h;
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/elements/DataTable/index.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { useMemo } from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport Body from './Body';\nimport DataCell from './DataCell';\nimport Header from './Header';\nimport HeaderCell from './HeaderCell';\nimport Row from './Row';\nimport { Context } from './shared';\nimport type { DataTableSize } from './shared';\n\nconst baseCls = 'overflow-hidden shadow ring ring-black/5 rounded-lg';\n\nconst sizeCNMap: Record<DataTableSize, string> = {\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-sm',\n lg: 'text-base',\n xl: 'text-base',\n};\n\ninterface Props extends PropsWithChildren {\n className?: string;\n size?: DataTableSize;\n}\n\nconst DataTable = ({ className, children, size = 'md' }: Props) => {\n const context = useMemo(() => ({ size }), [size]);\n\n return (\n <Context.Provider value={context}>\n <div className={cn(baseCls, className)}>\n <table className={cn('min-w-full divide-y divide-chrome-300', size && sizeCNMap[size])}>{children}</table>\n </div>\n </Context.Provider>\n );\n};\n\nDataTable.displayName = 'DataTable';\n\ntype DataTableType = typeof DataTable;\n\nexport interface DataTableExportType extends DataTableType {\n Body: typeof Body;\n DataCell: typeof DataCell;\n Header: typeof Header;\n HeaderCell: typeof HeaderCell;\n Row: typeof Row;\n}\n\nconst DataTableExport: DataTableExportType = Object.assign(DataTable, {\n Body,\n DataCell,\n Header,\n HeaderCell,\n Row,\n});\n\nexport default DataTableExport;\n"],"names":["baseCls","sizeCNMap","DataTable","className","children","size","context","useMemo","jsx","Context","cn","DataTableExport","Body","DataCell","Header","HeaderCell","Row"],"mappings":"mQA2BMA,EAAU,sDAEVC,EAA2C,CAC/C,GAAI,UACJ,GAAI,UACJ,GAAI,UACJ,GAAI,YACJ,GAAI,WACN,EAOMC,EAAY,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,KAAAC,EAAO,QAAkB,CACjE,MAAMC,EAAUC,EAAAA,QAAQ,KAAO,CAAE,KAAAF,IAAS,CAACA,CAAI,CAAC,EAEhD,OACEG,EAAAA,IAACC,EAAAA,QAAQ,SAAR,CAAiB,MAAOH,EACvB,SAAAE,EAAAA,IAAC,MAAA,CAAI,UAAWE,EAAAA,GAAGV,EAASG,CAAS,EACnC,SAAAK,EAAAA,IAAC,QAAA,CAAM,UAAWE,EAAAA,GAAG,wCAAyCL,GAAQJ,EAAUI,CAAI,CAAC,EAAI,SAAAD,CAAA,CAAS,CAAA,CACpG,CAAA,CACF,CAEJ,EAEAF,EAAU,YAAc,YAYxB,MAAMS,EAAuC,OAAO,OAAOT,EAAW,CACpE,KAAAU,EACA,SAAAC,EAAA,OACAC,EAAAA,QACA,WAAAC,EACA,IAAAC,CACF,CAAC"}
@@ -1,25 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- import { default as Body } from './Body';
3
- import { default as DataCell } from './DataCell';
4
- import { default as Header } from './Header';
5
- import { default as HeaderCell } from './HeaderCell';
6
- import { default as Row } from './Row';
7
- import { DataTableSize } from './shared';
8
- interface Props extends PropsWithChildren {
9
- className?: string;
10
- size?: DataTableSize;
11
- }
12
- declare const DataTable: {
13
- ({ className, children, size }: Props): import("react/jsx-runtime").JSX.Element;
14
- displayName: string;
15
- };
16
- type DataTableType = typeof DataTable;
17
- export interface DataTableExportType extends DataTableType {
18
- Body: typeof Body;
19
- DataCell: typeof DataCell;
20
- Header: typeof Header;
21
- HeaderCell: typeof HeaderCell;
22
- Row: typeof Row;
23
- }
24
- declare const DataTableExport: DataTableExportType;
25
- export default DataTableExport;
@@ -1,31 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { useMemo as s } from "react";
3
- import { cn as o } from "../../lib/utils.js";
4
- import i from "./Body.js";
5
- import d from "./DataCell.js";
6
- import n from "./Header.js";
7
- import c from "./HeaderCell.js";
8
- import p from "./Row.js";
9
- import { Context as x } from "./shared.js";
10
- const f = "overflow-hidden shadow ring ring-black/5 rounded-lg", b = {
11
- xs: "text-xs",
12
- sm: "text-sm",
13
- md: "text-sm",
14
- lg: "text-base",
15
- xl: "text-base"
16
- }, r = ({ className: a, children: m, size: t = "md" }) => {
17
- const l = s(() => ({ size: t }), [t]);
18
- return /* @__PURE__ */ e(x.Provider, { value: l, children: /* @__PURE__ */ e("div", { className: o(f, a), children: /* @__PURE__ */ e("table", { className: o("min-w-full divide-y divide-chrome-300", t && b[t]), children: m }) }) });
19
- };
20
- r.displayName = "DataTable";
21
- const T = Object.assign(r, {
22
- Body: i,
23
- DataCell: d,
24
- Header: n,
25
- HeaderCell: c,
26
- Row: p
27
- });
28
- export {
29
- T as default
30
- };
31
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/elements/DataTable/index.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { useMemo } from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport Body from './Body';\nimport DataCell from './DataCell';\nimport Header from './Header';\nimport HeaderCell from './HeaderCell';\nimport Row from './Row';\nimport { Context } from './shared';\nimport type { DataTableSize } from './shared';\n\nconst baseCls = 'overflow-hidden shadow ring ring-black/5 rounded-lg';\n\nconst sizeCNMap: Record<DataTableSize, string> = {\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-sm',\n lg: 'text-base',\n xl: 'text-base',\n};\n\ninterface Props extends PropsWithChildren {\n className?: string;\n size?: DataTableSize;\n}\n\nconst DataTable = ({ className, children, size = 'md' }: Props) => {\n const context = useMemo(() => ({ size }), [size]);\n\n return (\n <Context.Provider value={context}>\n <div className={cn(baseCls, className)}>\n <table className={cn('min-w-full divide-y divide-chrome-300', size && sizeCNMap[size])}>{children}</table>\n </div>\n </Context.Provider>\n );\n};\n\nDataTable.displayName = 'DataTable';\n\ntype DataTableType = typeof DataTable;\n\nexport interface DataTableExportType extends DataTableType {\n Body: typeof Body;\n DataCell: typeof DataCell;\n Header: typeof Header;\n HeaderCell: typeof HeaderCell;\n Row: typeof Row;\n}\n\nconst DataTableExport: DataTableExportType = Object.assign(DataTable, {\n Body,\n DataCell,\n Header,\n HeaderCell,\n Row,\n});\n\nexport default DataTableExport;\n"],"names":["baseCls","sizeCNMap","DataTable","className","children","size","context","useMemo","jsx","Context","cn","DataTableExport","Body","DataCell","Header","HeaderCell","Row"],"mappings":";;;;;;;;;AA2BA,MAAMA,IAAU,uDAEVC,IAA2C;AAAA,EAC/C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAOMC,IAAY,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,MAAAC,IAAO,WAAkB;AACjE,QAAMC,IAAUC,EAAQ,OAAO,EAAE,MAAAF,MAAS,CAACA,CAAI,CAAC;AAEhD,SACE,gBAAAG,EAACC,EAAQ,UAAR,EAAiB,OAAOH,GACvB,UAAA,gBAAAE,EAAC,OAAA,EAAI,WAAWE,EAAGV,GAASG,CAAS,GACnC,UAAA,gBAAAK,EAAC,SAAA,EAAM,WAAWE,EAAG,yCAAyCL,KAAQJ,EAAUI,CAAI,CAAC,GAAI,UAAAD,EAAA,CAAS,EAAA,CACpG,EAAA,CACF;AAEJ;AAEAF,EAAU,cAAc;AAYxB,MAAMS,IAAuC,OAAO,OAAOT,GAAW;AAAA,EACpE,MAAAU;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,KAAAC;AACF,CAAC;"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext({size:"md"});exports.Context=t;
2
- //# sourceMappingURL=shared.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.cjs","sources":["../../../src/elements/DataTable/shared.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createContext } from 'react';\n\nexport type DataTableSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\ntype DataTableContext = {\n size: DataTableSize;\n};\n\nexport const Context = createContext<DataTableContext>({\n size: 'md',\n});\n"],"names":["Context","createContext"],"mappings":"yGAsBaA,EAAUC,EAAAA,cAAgC,CACrD,KAAM,IACR,CAAC"}
@@ -1,6 +0,0 @@
1
- export type DataTableSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2
- type DataTableContext = {
3
- size: DataTableSize;
4
- };
5
- export declare const Context: import('react').Context<DataTableContext>;
6
- export {};
@@ -1,8 +0,0 @@
1
- import { createContext as t } from "react";
2
- const o = t({
3
- size: "md"
4
- });
5
- export {
6
- o as Context
7
- };
8
- //# sourceMappingURL=shared.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.js","sources":["../../../src/elements/DataTable/shared.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createContext } from 'react';\n\nexport type DataTableSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\ntype DataTableContext = {\n size: DataTableSize;\n};\n\nexport const Context = createContext<DataTableContext>({\n size: 'md',\n});\n"],"names":["Context","createContext"],"mappings":";AAsBO,MAAMA,IAAUC,EAAgC;AAAA,EACrD,MAAM;AACR,CAAC;"}
@@ -1,11 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- tags: string[];
5
- component: import('./DataTable').DataTableExportType;
6
- };
7
- export default meta;
8
- type Story = StoryObj<typeof meta>;
9
- export declare const Default: Story;
10
- export declare const Sortable: Story;
11
- export declare const Dynamic: Story;
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),h=require("@radix-ui/react-dropdown-menu"),c=require("lucide-react"),d=require("react"),s=require("../lib/utils.cjs");function D(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>o[n]})}}return t.default=o,Object.freeze(t)}const e=D(h),M=e.Root,y=e.Trigger,N=e.Group,j=e.Portal,v=e.Sub,S=e.RadioGroup,l=d.forwardRef(({className:o,inset:t,children:n,...r},i)=>a.jsxs(e.SubTrigger,{ref:i,className:s.cn("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-chrome-100 data-[state=open]:bg-chrome-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",o),...r,children:[n,a.jsx(c.ChevronRight,{className:"ml-auto"})]}));l.displayName=e.SubTrigger.displayName;const p=d.forwardRef(({className:o,...t},n)=>a.jsx(e.SubContent,{ref:n,className:s.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...t}));p.displayName=e.SubContent.displayName;const u=d.forwardRef(({className:o,sideOffset:t=4,...n},r)=>a.jsx(e.Portal,{children:a.jsx(e.Content,{ref:r,sideOffset:t,className:s.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...n})}));u.displayName=e.Content.displayName;const m=d.forwardRef(({className:o,inset:t,...n},r)=>a.jsx(e.Item,{ref:r,className:s.cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",o),...n}));m.displayName=e.Item.displayName;const f=d.forwardRef(({className:o,children:t,checked:n,...r},i)=>a.jsxs(e.CheckboxItem,{ref:i,className:s.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),checked:n,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(e.ItemIndicator,{children:a.jsx(c.Check,{className:"h-4 w-4"})})}),t]}));f.displayName=e.CheckboxItem.displayName;const w=d.forwardRef(({className:o,children:t,...n},r)=>a.jsxs(e.RadioItem,{ref:r,className:s.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(e.ItemIndicator,{children:a.jsx(c.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));w.displayName=e.RadioItem.displayName;const b=d.forwardRef(({className:o,inset:t,...n},r)=>a.jsx(e.Label,{ref:r,className:s.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...n}));b.displayName=e.Label.displayName;const g=d.forwardRef(({className:o,...t},n)=>a.jsx(e.Separator,{ref:n,className:s.cn("-mx-1 my-1 h-px bg-chrome-300",o),...t}));g.displayName=e.Separator.displayName;const x=({className:o,...t})=>a.jsx("span",{className:s.cn("ml-auto text-xs tracking-widest opacity-60",o),...t});x.displayName="DropdownMenuShortcut";exports.DropdownMenu=M;exports.DropdownMenuCheckboxItem=f;exports.DropdownMenuContent=u;exports.DropdownMenuGroup=N;exports.DropdownMenuItem=m;exports.DropdownMenuLabel=b;exports.DropdownMenuPortal=j;exports.DropdownMenuRadioGroup=S;exports.DropdownMenuRadioItem=w;exports.DropdownMenuSeparator=g;exports.DropdownMenuShortcut=x;exports.DropdownMenuSub=v;exports.DropdownMenuSubContent=p;exports.DropdownMenuSubTrigger=l;exports.DropdownMenuTrigger=y;
2
- //# sourceMappingURL=DropdownMenu.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownMenu.cjs","sources":["../../src/elements/DropdownMenu.tsx"],"sourcesContent":["import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-chrome-100 data-[state=open]:bg-chrome-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\n\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n));\n\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 bg-popover p-1 text-popover-foreground shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\n\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\n\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\n\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\n\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px bg-chrome-300', className)} {...props} />\n));\n\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n);\n\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","forwardRef","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":"qgBAMMA,EAAeC,EAAsB,KAErCC,EAAsBD,EAAsB,QAE5CE,EAAoBF,EAAsB,MAE1CG,EAAqBH,EAAsB,OAE3CI,EAAkBJ,EAAsB,IAExCK,EAAyBL,EAAsB,WAE/CM,EAAyBC,EAAAA,WAK7B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,SAAAC,EAAU,GAAGC,GAASC,IAC3CC,EAAAA,KAACb,EAAsB,WAAtB,CACC,IAAAY,EACA,UAAWE,EAAAA,GACT,iNACAL,GAAS,OACTD,CAAA,EAED,GAAGG,EAEH,SAAA,CAAAD,EACDK,EAAAA,IAACC,EAAAA,aAAA,CAAa,UAAU,SAAA,CAAU,CAAA,CAAA,CACpC,CACD,EAEDV,EAAuB,YAAcN,EAAsB,WAAW,YAEtE,MAAMiB,EAAyBV,EAAAA,WAG7B,CAAC,CAAE,UAAAC,EAAW,GAAGG,CAAA,EAASC,IAC1BG,EAAAA,IAACf,EAAsB,WAAtB,CACC,IAAAY,EACA,UAAWE,EAAAA,GACT,0cACAN,CAAA,EAED,GAAGG,CAAA,CACN,CACD,EAEDM,EAAuB,YAAcjB,EAAsB,WAAW,YAEtE,MAAMkB,EAAsBX,EAAAA,WAG1B,CAAC,CAAE,UAAAC,EAAW,WAAAW,EAAa,EAAG,GAAGR,CAAA,EAASC,IAC1CG,EAAAA,IAACf,EAAsB,OAAtB,CACC,SAAAe,EAAAA,IAACf,EAAsB,QAAtB,CACC,IAAAY,EACA,WAAAO,EACA,UAAWL,EAAAA,GACT,yHACA,mVACAN,CAAA,EAED,GAAGG,CAAA,CACN,EACF,CACD,EAEDO,EAAoB,YAAclB,EAAsB,QAAQ,YAEhE,MAAMoB,EAAmBb,EAAAA,WAKvB,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,GAAGE,CAAA,EAASC,IACjCG,EAAAA,IAACf,EAAsB,KAAtB,CACC,IAAAY,EACA,UAAWE,EAAAA,GACT,4QACAL,GAAS,OACTD,CAAA,EAED,GAAGG,CAAA,CACN,CACD,EAEDS,EAAiB,YAAcpB,EAAsB,KAAK,YAE1D,MAAMqB,EAA2Bd,EAAAA,WAG/B,CAAC,CAAE,UAAAC,EAAW,SAAAE,EAAU,QAAAY,EAAS,GAAGX,GAASC,IAC7CC,EAAAA,KAACb,EAAsB,aAAtB,CACC,IAAAY,EACA,UAAWE,EAAAA,GACT,2OACAN,CAAA,EAEF,QAAAc,EACC,GAAGX,EAEJ,SAAA,CAAAI,EAAAA,IAAC,OAAA,CAAK,UAAU,+DACd,SAAAA,EAAAA,IAACf,EAAsB,cAAtB,CACC,SAAAe,EAAAA,IAACQ,QAAA,CAAM,UAAU,SAAA,CAAU,CAAA,CAC7B,EACF,EACCb,CAAA,CAAA,CACH,CACD,EAEDW,EAAyB,YAAcrB,EAAsB,aAAa,YAE1E,MAAMwB,EAAwBjB,EAAAA,WAG5B,CAAC,CAAE,UAAAC,EAAW,SAAAE,EAAU,GAAGC,CAAA,EAASC,IACpCC,EAAAA,KAACb,EAAsB,UAAtB,CACC,IAAAY,EACA,UAAWE,EAAAA,GACT,2OACAN,CAAA,EAED,GAAGG,EAEJ,SAAA,CAAAI,EAAAA,IAAC,OAAA,CAAK,UAAU,+DACd,SAAAA,EAAAA,IAACf,EAAsB,cAAtB,CACC,SAAAe,EAAAA,IAACU,SAAA,CAAO,UAAU,sBAAA,CAAuB,CAAA,CAC3C,EACF,EACCf,CAAA,CAAA,CACH,CACD,EAEDc,EAAsB,YAAcxB,EAAsB,UAAU,YAEpE,MAAM0B,EAAoBnB,EAAAA,WAKxB,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,GAAGE,CAAA,EAASC,IACjCG,EAAAA,IAACf,EAAsB,MAAtB,CACC,IAAAY,EACA,UAAWE,EAAAA,GAAG,oCAAqCL,GAAS,OAAQD,CAAS,EAC5E,GAAGG,CAAA,CACN,CACD,EAEDe,EAAkB,YAAc1B,EAAsB,MAAM,YAE5D,MAAM2B,EAAwBpB,EAAAA,WAG5B,CAAC,CAAE,UAAAC,EAAW,GAAGG,CAAA,EAASC,IAC1BG,MAACf,EAAsB,UAAtB,CAAgC,IAAAY,EAAU,UAAWE,EAAAA,GAAG,gCAAiCN,CAAS,EAAI,GAAGG,EAAO,CAClH,EAEDgB,EAAsB,YAAc3B,EAAsB,UAAU,YAEpE,MAAM4B,EAAuB,CAAC,CAAE,UAAApB,EAAW,GAAGG,CAAA,IAC5CI,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,GAAG,6CAA8CN,CAAS,EAAI,GAAGG,CAAA,CAAO,EAG3FiB,EAAqB,YAAc"}
@@ -1,26 +0,0 @@
1
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
2
- declare const DropdownMenu: import('react').FC<DropdownMenuPrimitive.DropdownMenuProps>;
3
- declare const DropdownMenuTrigger: import('react').ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
4
- declare const DropdownMenuGroup: import('react').ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & import('react').RefAttributes<HTMLDivElement>>;
5
- declare const DropdownMenuPortal: import('react').FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
6
- declare const DropdownMenuSub: import('react').FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
7
- declare const DropdownMenuRadioGroup: import('react').ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & import('react').RefAttributes<HTMLDivElement>>;
8
- declare const DropdownMenuSubTrigger: import('react').ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
9
- inset?: boolean;
10
- } & import('react').RefAttributes<HTMLDivElement>>;
11
- declare const DropdownMenuSubContent: import('react').ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
12
- declare const DropdownMenuContent: import('react').ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
13
- declare const DropdownMenuItem: import('react').ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
14
- inset?: boolean;
15
- } & import('react').RefAttributes<HTMLDivElement>>;
16
- declare const DropdownMenuCheckboxItem: import('react').ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
17
- declare const DropdownMenuRadioItem: import('react').ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
18
- declare const DropdownMenuLabel: import('react').ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
19
- inset?: boolean;
20
- } & import('react').RefAttributes<HTMLDivElement>>;
21
- declare const DropdownMenuSeparator: import('react').ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
22
- declare const DropdownMenuShortcut: {
23
- ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
24
- displayName: string;
25
- };
26
- export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };