@kubetail/ui 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -23
- package/dist/elements/DataTable/HeaderCell.cjs.map +1 -1
- package/dist/elements/DataTable/HeaderCell.js.map +1 -1
- package/dist/elements/DataTable/index.cjs +1 -1
- package/dist/elements/DataTable/index.cjs.map +1 -1
- package/dist/elements/DataTable/index.js +6 -6
- package/dist/elements/DataTable/index.js.map +1 -1
- package/dist/elements/FormCheck.cjs +1 -1
- package/dist/elements/FormCheck.cjs.map +1 -1
- package/dist/elements/FormCheck.js +6 -6
- package/dist/elements/FormCheck.js.map +1 -1
- package/dist/elements/FormControl.cjs +1 -1
- package/dist/elements/FormControl.cjs.map +1 -1
- package/dist/elements/FormControl.js +1 -1
- package/dist/elements/FormControl.js.map +1 -1
- package/dist/elements/FormLabel.cjs.map +1 -1
- package/dist/elements/FormLabel.js.map +1 -1
- package/dist/elements/FormSelect.cjs +1 -1
- package/dist/elements/FormSelect.cjs.map +1 -1
- package/dist/elements/FormSelect.js +1 -1
- package/dist/elements/FormSelect.js.map +1 -1
- package/dist/index.css +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -10,25 +10,27 @@ Kubetail-UI is a project for developing and sharing React components and other U
|
|
|
10
10
|
|
|
11
11
|
First, install the dependencies:
|
|
12
12
|
|
|
13
|
-
```
|
|
13
|
+
```console
|
|
14
14
|
pnpm install
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Next, run storybook:
|
|
18
18
|
|
|
19
|
-
```
|
|
19
|
+
```console
|
|
20
20
|
pnpm storybook
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
Open [http://localhost:6006](http://localhost:6006) in your browser to see Storybook.
|
|
24
|
+
|
|
23
25
|
## Getting started in Docker
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
Instead of running the project on your local machine you can also run it in a container using `docker compose`:
|
|
26
28
|
|
|
27
|
-
```
|
|
29
|
+
```console
|
|
28
30
|
docker compose up
|
|
29
31
|
```
|
|
30
32
|
|
|
31
|
-
Open [http://localhost:6006](http://localhost:6006) in your browser to see
|
|
33
|
+
Open [http://localhost:6006](http://localhost:6006) in your browser to see storybook.
|
|
32
34
|
|
|
33
35
|
## Scripts
|
|
34
36
|
|
|
@@ -40,25 +42,19 @@ Open [http://localhost:6006](http://localhost:6006) in your browser to see the c
|
|
|
40
42
|
|
|
41
43
|
## Integrate kubetail-ui into your Tailwind CSS project
|
|
42
44
|
|
|
43
|
-
1. Install `@kubetail/ui` package
|
|
45
|
+
1. Install the `@kubetail/ui` package
|
|
44
46
|
|
|
45
|
-
```
|
|
46
|
-
pnpm add
|
|
47
|
+
```console
|
|
48
|
+
pnpm add @kubetail/ui
|
|
47
49
|
```
|
|
48
50
|
|
|
49
|
-
2. Modify your Tailwind
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
import
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
],
|
|
59
|
-
plugins: [
|
|
60
|
-
...
|
|
61
|
-
kubetailUIPlugin,
|
|
62
|
-
],
|
|
63
|
-
};
|
|
51
|
+
2. Modify your Tailwind css file
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
@import 'tailwindcss';
|
|
55
|
+
|
|
56
|
+
@import '@kubetail/ui';
|
|
57
|
+
@source '../node_modules/@kubetail/ui/**/*.js';
|
|
58
|
+
|
|
59
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
64
60
|
```
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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 +1 @@
|
|
|
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,
|
|
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 +1,2 @@
|
|
|
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
|
|
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
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 +1,25 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
2
|
+
import { useMemo as s } from "react";
|
|
3
3
|
import { cn as o } from "../../lib/utils.js";
|
|
4
|
-
import
|
|
4
|
+
import i from "./Body.js";
|
|
5
5
|
import d from "./DataCell.js";
|
|
6
6
|
import n from "./Header.js";
|
|
7
7
|
import c from "./HeaderCell.js";
|
|
8
8
|
import p from "./Row.js";
|
|
9
9
|
import { Context as x } from "./shared.js";
|
|
10
|
-
const f = "overflow-hidden shadow ring
|
|
10
|
+
const f = "overflow-hidden shadow ring ring-black/5 rounded-lg", b = {
|
|
11
11
|
xs: "text-xs",
|
|
12
12
|
sm: "text-sm",
|
|
13
13
|
md: "text-sm",
|
|
14
14
|
lg: "text-base",
|
|
15
15
|
xl: "text-base"
|
|
16
16
|
}, r = ({ className: a, children: m, size: t = "md" }) => {
|
|
17
|
-
const
|
|
18
|
-
return /* @__PURE__ */ e(x.Provider, { value:
|
|
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
19
|
};
|
|
20
20
|
r.displayName = "DataTable";
|
|
21
21
|
const T = Object.assign(r, {
|
|
22
|
-
Body:
|
|
22
|
+
Body: i,
|
|
23
23
|
DataCell: d,
|
|
24
24
|
Header: n,
|
|
25
25
|
HeaderCell: c,
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),u=require("react"),l=require("../lib/utils.cjs"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),u=require("react"),l=require("../lib/utils.cjs"),f="flex items-center",m="h-4 w-4 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50",d="ml-2 block text-sm text-chrome-900",t=u.forwardRef(({as:c="input",className:o,id:s,label:r,...n},i)=>{const a=c;return e.jsxs("div",{className:l.cn(f,o),children:[e.jsx(a,{...n,ref:i,id:s,type:"checkbox",className:m}),r&&e.jsx("label",{htmlFor:s,className:d,children:r})]})});t.displayName="FormCheck";module.exports=t;
|
|
2
2
|
//# sourceMappingURL=FormCheck.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormCheck.cjs","sources":["../../src/elements/FormCheck.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 { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst wrapperBaseCls = 'flex items-center';\nconst inputBaseCls =\n 'h-4 w-4
|
|
1
|
+
{"version":3,"file":"FormCheck.cjs","sources":["../../src/elements/FormCheck.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 { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst wrapperBaseCls = 'flex items-center';\nconst inputBaseCls =\n 'h-4 w-4 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50';\nconst labelBaseCls = 'ml-2 block text-sm text-chrome-900';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'input'> {\n as?: React.ElementType;\n id?: string;\n label?: React.ReactNode;\n}\n\nconst FormCheck = forwardRef(\n ({ as = 'input', className, id, label, ...props }: Props, ref: React.ForwardedRef<HTMLInputElement>) => {\n const Tag = as;\n\n return (\n <div className={cn(wrapperBaseCls, className)}>\n <Tag {...props} ref={ref} id={id} type=\"checkbox\" className={inputBaseCls} />\n {label && (\n <label htmlFor={id} className={labelBaseCls}>\n {label}\n </label>\n )}\n </div>\n );\n },\n);\n\nFormCheck.displayName = 'FormCheck';\n\nexport default FormCheck;\n"],"names":["wrapperBaseCls","inputBaseCls","labelBaseCls","FormCheck","forwardRef","as","className","id","label","props","ref","Tag","cn","jsx"],"mappings":"mGAkBMA,EAAiB,oBACjBC,EACJ,+JACIC,EAAe,qCAQfC,EAAYC,EAAAA,WAChB,CAAC,CAAE,GAAAC,EAAK,QAAS,UAAAC,EAAW,GAAAC,EAAI,MAAAC,EAAO,GAAGC,CAAA,EAAgBC,IAA8C,CACtG,MAAMC,EAAMN,EAEZ,cACG,MAAA,CAAI,UAAWO,EAAAA,GAAGZ,EAAgBM,CAAS,EAC1C,SAAA,CAAAO,EAAAA,IAACF,EAAA,CAAK,GAAGF,EAAO,IAAAC,EAAU,GAAAH,EAAQ,KAAK,WAAW,UAAWN,EAAc,EAC1EO,GACCK,EAAAA,IAAC,QAAA,CAAM,QAASN,EAAI,UAAWL,EAC5B,SAAAM,CAAA,CACH,CAAA,EAEJ,CAEJ,CACF,EAEAL,EAAU,YAAc"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as i, jsx as
|
|
1
|
+
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as l } from "react";
|
|
3
3
|
import { cn as m } from "../lib/utils.js";
|
|
4
|
-
const f = "flex items-center",
|
|
5
|
-
({ as:
|
|
6
|
-
const a =
|
|
4
|
+
const f = "flex items-center", u = "h-4 w-4 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50", p = "ml-2 block text-sm text-chrome-900", d = l(
|
|
5
|
+
({ as: r = "input", className: t, id: e, label: o, ...c }, n) => {
|
|
6
|
+
const a = r;
|
|
7
7
|
return /* @__PURE__ */ i("div", { className: m(f, t), children: [
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
o && /* @__PURE__ */
|
|
8
|
+
/* @__PURE__ */ s(a, { ...c, ref: n, id: e, type: "checkbox", className: u }),
|
|
9
|
+
o && /* @__PURE__ */ s("label", { htmlFor: e, className: p, children: o })
|
|
10
10
|
] });
|
|
11
11
|
}
|
|
12
12
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormCheck.js","sources":["../../src/elements/FormCheck.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 { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst wrapperBaseCls = 'flex items-center';\nconst inputBaseCls =\n 'h-4 w-4
|
|
1
|
+
{"version":3,"file":"FormCheck.js","sources":["../../src/elements/FormCheck.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 { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst wrapperBaseCls = 'flex items-center';\nconst inputBaseCls =\n 'h-4 w-4 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50';\nconst labelBaseCls = 'ml-2 block text-sm text-chrome-900';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'input'> {\n as?: React.ElementType;\n id?: string;\n label?: React.ReactNode;\n}\n\nconst FormCheck = forwardRef(\n ({ as = 'input', className, id, label, ...props }: Props, ref: React.ForwardedRef<HTMLInputElement>) => {\n const Tag = as;\n\n return (\n <div className={cn(wrapperBaseCls, className)}>\n <Tag {...props} ref={ref} id={id} type=\"checkbox\" className={inputBaseCls} />\n {label && (\n <label htmlFor={id} className={labelBaseCls}>\n {label}\n </label>\n )}\n </div>\n );\n },\n);\n\nFormCheck.displayName = 'FormCheck';\n\nexport default FormCheck;\n"],"names":["wrapperBaseCls","inputBaseCls","labelBaseCls","FormCheck","forwardRef","as","className","id","label","props","ref","Tag","cn","jsx"],"mappings":";;;AAkBA,MAAMA,IAAiB,qBACjBC,IACJ,gKACIC,IAAe,sCAQfC,IAAYC;AAAA,EAChB,CAAC,EAAE,IAAAC,IAAK,SAAS,WAAAC,GAAW,IAAAC,GAAI,OAAAC,GAAO,GAAGC,EAAA,GAAgBC,MAA8C;AACtG,UAAMC,IAAMN;AAEZ,6BACG,OAAA,EAAI,WAAWO,EAAGZ,GAAgBM,CAAS,GAC1C,UAAA;AAAA,MAAA,gBAAAO,EAACF,GAAA,EAAK,GAAGF,GAAO,KAAAC,GAAU,IAAAH,GAAQ,MAAK,YAAW,WAAWN,GAAc;AAAA,MAC1EO,KACC,gBAAAK,EAAC,SAAA,EAAM,SAASN,GAAI,WAAWL,GAC5B,UAAAM,EAAA,CACH;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;AAEAL,EAAU,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const d=require("react/jsx-runtime"),o=require("react"),l=require("../lib/utils.cjs"),a=require("./FormGroup.cjs"),f=require("./FormControlFeedback.cjs"),b="flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring
|
|
1
|
+
"use strict";const d=require("react/jsx-runtime"),o=require("react"),l=require("../lib/utils.cjs"),a=require("./FormGroup.cjs"),f=require("./FormControlFeedback.cjs"),b="flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium",e=o.forwardRef(({as:r="input",className:t,id:n,...s},c)=>{const i=r,{controlId:u}=o.useContext(a.Context);return d.jsx(i,{...s,ref:c,id:n||u,className:l.cn(b,t)})});e.displayName="FormControl";const m=Object.assign(e,{Feedback:f});module.exports=m;
|
|
2
2
|
//# sourceMappingURL=FormControl.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControl.cjs","sources":["../../src/elements/FormControl.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\nimport FormControlFeedback from './FormControlFeedback';\n\nconst baseCls =\n 'flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring
|
|
1
|
+
{"version":3,"file":"FormControl.cjs","sources":["../../src/elements/FormControl.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\nimport FormControlFeedback from './FormControlFeedback';\n\nconst baseCls =\n 'flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium';\n\ninterface Props extends React.ComponentPropsWithoutRef<'input'> {\n as?: React.ElementType;\n id?: string;\n}\n\nconst FormControl = forwardRef(\n ({ as = 'input', className, id, ...props }: Props, ref: React.ForwardedRef<HTMLInputElement>) => {\n const Tag = as;\n const { controlId } = useContext(FormGroupContext);\n\n return <Tag {...props} ref={ref} id={id || controlId} className={cn(baseCls, className)} />;\n },\n);\n\nFormControl.displayName = 'FormControl';\n\ntype FormControlType = typeof FormControl;\n\ninterface FormControlExportType extends FormControlType {\n Feedback: typeof FormControlFeedback;\n}\n\nconst FormControlExport: FormControlExportType = Object.assign(FormControl, {\n Feedback: FormControlFeedback,\n});\n\nexport default FormControlExport;\n"],"names":["baseCls","FormControl","forwardRef","as","className","id","props","ref","Tag","controlId","useContext","FormGroupContext","jsx","cn","FormControlExport","FormControlFeedback"],"mappings":"uKAqBMA,EACJ,6UAOIC,EAAcC,EAAAA,WAClB,CAAC,CAAE,GAAAC,EAAK,QAAS,UAAAC,EAAW,GAAAC,EAAI,GAAGC,CAAA,EAAgBC,IAA8C,CAC/F,MAAMC,EAAML,EACN,CAAE,UAAAM,CAAA,EAAcC,EAAAA,WAAWC,SAAgB,EAEjD,OAAOC,EAAAA,IAACJ,EAAA,CAAK,GAAGF,EAAO,IAAAC,EAAU,GAAIF,GAAMI,EAAW,UAAWI,EAAAA,GAAGb,EAASI,CAAS,CAAA,CAAG,CAC3F,CACF,EAEAH,EAAY,YAAc,cAQ1B,MAAMa,EAA2C,OAAO,OAAOb,EAAa,CAC1E,SAAUc,CACZ,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { forwardRef as l, useContext as a } from "react";
|
|
|
3
3
|
import { cn as c } from "../lib/utils.js";
|
|
4
4
|
import { Context as m } from "./FormGroup.js";
|
|
5
5
|
import u from "./FormControlFeedback.js";
|
|
6
|
-
const p = "flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring
|
|
6
|
+
const p = "flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium", o = l(
|
|
7
7
|
({ as: r = "input", className: t, id: e, ...n }, s) => {
|
|
8
8
|
const f = r, { controlId: i } = a(m);
|
|
9
9
|
return /* @__PURE__ */ d(f, { ...n, ref: s, id: e || i, className: c(p, t) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControl.js","sources":["../../src/elements/FormControl.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\nimport FormControlFeedback from './FormControlFeedback';\n\nconst baseCls =\n 'flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring
|
|
1
|
+
{"version":3,"file":"FormControl.js","sources":["../../src/elements/FormControl.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\nimport FormControlFeedback from './FormControlFeedback';\n\nconst baseCls =\n 'flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium';\n\ninterface Props extends React.ComponentPropsWithoutRef<'input'> {\n as?: React.ElementType;\n id?: string;\n}\n\nconst FormControl = forwardRef(\n ({ as = 'input', className, id, ...props }: Props, ref: React.ForwardedRef<HTMLInputElement>) => {\n const Tag = as;\n const { controlId } = useContext(FormGroupContext);\n\n return <Tag {...props} ref={ref} id={id || controlId} className={cn(baseCls, className)} />;\n },\n);\n\nFormControl.displayName = 'FormControl';\n\ntype FormControlType = typeof FormControl;\n\ninterface FormControlExportType extends FormControlType {\n Feedback: typeof FormControlFeedback;\n}\n\nconst FormControlExport: FormControlExportType = Object.assign(FormControl, {\n Feedback: FormControlFeedback,\n});\n\nexport default FormControlExport;\n"],"names":["baseCls","FormControl","forwardRef","as","className","id","props","ref","Tag","controlId","useContext","FormGroupContext","jsx","cn","FormControlExport","FormControlFeedback"],"mappings":";;;;;AAqBA,MAAMA,IACJ,8UAOIC,IAAcC;AAAA,EAClB,CAAC,EAAE,IAAAC,IAAK,SAAS,WAAAC,GAAW,IAAAC,GAAI,GAAGC,EAAA,GAAgBC,MAA8C;AAC/F,UAAMC,IAAML,GACN,EAAE,WAAAM,EAAA,IAAcC,EAAWC,CAAgB;AAEjD,WAAO,gBAAAC,EAACJ,GAAA,EAAK,GAAGF,GAAO,KAAAC,GAAU,IAAIF,KAAMI,GAAW,WAAWI,EAAGb,GAASI,CAAS,EAAA,CAAG;AAAA,EAC3F;AACF;AAEAH,EAAY,cAAc;AAQ1B,MAAMa,IAA2C,OAAO,OAAOb,GAAa;AAAA,EAC1E,UAAUc;AACZ,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLabel.cjs","sources":["../../src/elements/FormLabel.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\n\nconst baseCls = 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70';\n\ninterface Props extends React.ComponentPropsWithoutRef<'label'> {\n as?: React.ElementType;\n htmlFor?: string;\n}\n\nconst FormLabel = forwardRef(\n ({ as = 'label', className, htmlFor, ...props }: Props, ref: React.ForwardedRef<HTMLLabelElement>) => {\n const Tag = as;\n const { controlId } = useContext(FormGroupContext);\n\n return <Tag {...props} ref={ref} htmlFor={htmlFor || controlId} className={cn(baseCls, className)} />;\n },\n);\n\nFormLabel.displayName = 'FormLabel';\n\nexport default FormLabel;\n"],"names":["baseCls","FormLabel","forwardRef","as","className","htmlFor","props","ref","Tag","controlId","useContext","FormGroupContext","jsx","cn"],"mappings":"gIAoBMA,EAAU,6FAOVC,EAAYC,EAAAA,WAChB,CAAC,CAAE,GAAAC,EAAK,QAAS,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAA,EAAgBC,IAA8C,CACpG,MAAMC,EAAML,EACN,CAAE,UAAAM,CAAA,EAAcC,EAAAA,WAAWC,SAAgB,EAEjD,OAAOC,EAAAA,IAACJ,EAAA,CAAK,GAAGF,EAAO,IAAAC,EAAU,QAASF,GAAWI,EAAW,UAAWI,EAAAA,GAAGb,EAASI,CAAS,CAAA,CAAG,
|
|
1
|
+
{"version":3,"file":"FormLabel.cjs","sources":["../../src/elements/FormLabel.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\n\nconst baseCls = 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70';\n\ninterface Props extends React.ComponentPropsWithoutRef<'label'> {\n as?: React.ElementType;\n htmlFor?: string;\n}\n\nconst FormLabel = forwardRef(\n ({ as = 'label', className, htmlFor, ...props }: Props, ref: React.ForwardedRef<HTMLLabelElement>) => {\n const Tag = as;\n const { controlId } = useContext(FormGroupContext);\n\n return <Tag {...props} ref={ref} htmlFor={htmlFor || controlId} className={cn(baseCls, className)} />;\n },\n);\n\nFormLabel.displayName = 'FormLabel';\n\nexport default FormLabel;\n"],"names":["baseCls","FormLabel","forwardRef","as","className","htmlFor","props","ref","Tag","controlId","useContext","FormGroupContext","jsx","cn"],"mappings":"gIAoBMA,EAAU,6FAOVC,EAAYC,EAAAA,WAChB,CAAC,CAAE,GAAAC,EAAK,QAAS,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAA,EAAgBC,IAA8C,CACpG,MAAMC,EAAML,EACN,CAAE,UAAAM,CAAA,EAAcC,EAAAA,WAAWC,SAAgB,EAEjD,OAAOC,EAAAA,IAACJ,EAAA,CAAK,GAAGF,EAAO,IAAAC,EAAU,QAASF,GAAWI,EAAW,UAAWI,EAAAA,GAAGb,EAASI,CAAS,CAAA,CAAG,CACrG,CACF,EAEAH,EAAU,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLabel.js","sources":["../../src/elements/FormLabel.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\n\nconst baseCls = 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70';\n\ninterface Props extends React.ComponentPropsWithoutRef<'label'> {\n as?: React.ElementType;\n htmlFor?: string;\n}\n\nconst FormLabel = forwardRef(\n ({ as = 'label', className, htmlFor, ...props }: Props, ref: React.ForwardedRef<HTMLLabelElement>) => {\n const Tag = as;\n const { controlId } = useContext(FormGroupContext);\n\n return <Tag {...props} ref={ref} htmlFor={htmlFor || controlId} className={cn(baseCls, className)} />;\n },\n);\n\nFormLabel.displayName = 'FormLabel';\n\nexport default FormLabel;\n"],"names":["baseCls","FormLabel","forwardRef","as","className","htmlFor","props","ref","Tag","controlId","useContext","FormGroupContext","jsx","cn"],"mappings":";;;;AAoBA,MAAMA,IAAU,8FAOVC,IAAYC;AAAA,EAChB,CAAC,EAAE,IAAAC,IAAK,SAAS,WAAAC,GAAW,SAAAC,GAAS,GAAGC,EAAA,GAAgBC,MAA8C;AACpG,UAAMC,IAAML,GACN,EAAE,WAAAM,EAAA,IAAcC,EAAWC,CAAgB;AAEjD,WAAO,gBAAAC,EAACJ,GAAA,EAAK,GAAGF,GAAO,KAAAC,GAAU,SAASF,KAAWI,GAAW,WAAWI,EAAGb,GAASI,CAAS,EAAA,CAAG;AAAA,
|
|
1
|
+
{"version":3,"file":"FormLabel.js","sources":["../../src/elements/FormLabel.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\n\nconst baseCls = 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70';\n\ninterface Props extends React.ComponentPropsWithoutRef<'label'> {\n as?: React.ElementType;\n htmlFor?: string;\n}\n\nconst FormLabel = forwardRef(\n ({ as = 'label', className, htmlFor, ...props }: Props, ref: React.ForwardedRef<HTMLLabelElement>) => {\n const Tag = as;\n const { controlId } = useContext(FormGroupContext);\n\n return <Tag {...props} ref={ref} htmlFor={htmlFor || controlId} className={cn(baseCls, className)} />;\n },\n);\n\nFormLabel.displayName = 'FormLabel';\n\nexport default FormLabel;\n"],"names":["baseCls","FormLabel","forwardRef","as","className","htmlFor","props","ref","Tag","controlId","useContext","FormGroupContext","jsx","cn"],"mappings":";;;;AAoBA,MAAMA,IAAU,8FAOVC,IAAYC;AAAA,EAChB,CAAC,EAAE,IAAAC,IAAK,SAAS,WAAAC,GAAW,SAAAC,GAAS,GAAGC,EAAA,GAAgBC,MAA8C;AACpG,UAAMC,IAAML,GACN,EAAE,WAAAM,EAAA,IAAcC,EAAWC,CAAgB;AAEjD,WAAO,gBAAAC,EAACJ,GAAA,EAAK,GAAGF,GAAO,KAAAC,GAAU,SAASF,KAAWI,GAAW,WAAWI,EAAGb,GAASI,CAAS,EAAA,CAAG;AAAA,EACrG;AACF;AAEAH,EAAU,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const u=require("react/jsx-runtime"),e=require("react"),i=require("../lib/utils.cjs"),l=require("./FormGroup.cjs"),d="mt-1 block w-full h-10 rounded bg-background border border-input py-2 pl-3 pr-10 text-sm ring-offset-background focus:outline-none focus:border-input focus:ring
|
|
1
|
+
"use strict";const u=require("react/jsx-runtime"),e=require("react"),i=require("../lib/utils.cjs"),l=require("./FormGroup.cjs"),d="mt-1 block w-full h-10 rounded bg-background border border-input py-2 pl-3 pr-10 text-sm ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50",r=e.forwardRef(({className:o,id:t,...s},n)=>{const{controlId:c}=e.useContext(l.Context);return u.jsx("select",{...s,ref:n,id:t||c,className:i.cn(d,o)})});r.displayName="FormSelect";module.exports=r;
|
|
2
2
|
//# sourceMappingURL=FormSelect.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormSelect.cjs","sources":["../../src/elements/FormSelect.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\n\nconst baseCls =\n 'mt-1 block w-full h-10 rounded bg-background border border-input py-2 pl-3 pr-10 text-sm ring-offset-background focus:outline-none focus:border-input focus:ring
|
|
1
|
+
{"version":3,"file":"FormSelect.cjs","sources":["../../src/elements/FormSelect.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\n\nconst baseCls =\n 'mt-1 block w-full h-10 rounded bg-background border border-input py-2 pl-3 pr-10 text-sm ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50';\n\ninterface Props extends React.ComponentPropsWithoutRef<'select'> {\n id?: string;\n}\n\nconst FormSelect = forwardRef(({ className, id, ...props }: Props, ref: React.ForwardedRef<HTMLSelectElement>) => {\n const { controlId } = useContext(FormGroupContext);\n\n return <select {...props} ref={ref} id={id || controlId} className={cn(baseCls, className)} />;\n});\n\nFormSelect.displayName = 'FormSelect';\n\nexport default FormSelect;\n"],"names":["baseCls","FormSelect","forwardRef","className","id","props","ref","controlId","useContext","FormGroupContext","jsx","cn"],"mappings":"gIAoBMA,EACJ,2NAMIC,EAAaC,EAAAA,WAAW,CAAC,CAAE,UAAAC,EAAW,GAAAC,EAAI,GAAGC,CAAA,EAAgBC,IAA+C,CAChH,KAAM,CAAE,UAAAC,CAAA,EAAcC,EAAAA,WAAWC,SAAgB,EAEjD,OAAOC,EAAAA,IAAC,SAAA,CAAQ,GAAGL,EAAO,IAAAC,EAAU,GAAIF,GAAMG,EAAW,UAAWI,EAAAA,GAAGX,EAASG,CAAS,CAAA,CAAG,CAC9F,CAAC,EAEDF,EAAW,YAAc"}
|
|
@@ -2,7 +2,7 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as c, useContext as f } from "react";
|
|
3
3
|
import { cn as i } from "../lib/utils.js";
|
|
4
4
|
import { Context as u } from "./FormGroup.js";
|
|
5
|
-
const d = "mt-1 block w-full h-10 rounded bg-background border border-input py-2 pl-3 pr-10 text-sm ring-offset-background focus:outline-none focus:border-input focus:ring
|
|
5
|
+
const d = "mt-1 block w-full h-10 rounded bg-background border border-input py-2 pl-3 pr-10 text-sm ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50", l = c(({ className: o, id: r, ...t }, e) => {
|
|
6
6
|
const { controlId: n } = f(u);
|
|
7
7
|
return /* @__PURE__ */ s("select", { ...t, ref: e, id: r || n, className: i(d, o) });
|
|
8
8
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormSelect.js","sources":["../../src/elements/FormSelect.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\n\nconst baseCls =\n 'mt-1 block w-full h-10 rounded bg-background border border-input py-2 pl-3 pr-10 text-sm ring-offset-background focus:outline-none focus:border-input focus:ring
|
|
1
|
+
{"version":3,"file":"FormSelect.js","sources":["../../src/elements/FormSelect.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 { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\n\nconst baseCls =\n 'mt-1 block w-full h-10 rounded bg-background border border-input py-2 pl-3 pr-10 text-sm ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50';\n\ninterface Props extends React.ComponentPropsWithoutRef<'select'> {\n id?: string;\n}\n\nconst FormSelect = forwardRef(({ className, id, ...props }: Props, ref: React.ForwardedRef<HTMLSelectElement>) => {\n const { controlId } = useContext(FormGroupContext);\n\n return <select {...props} ref={ref} id={id || controlId} className={cn(baseCls, className)} />;\n});\n\nFormSelect.displayName = 'FormSelect';\n\nexport default FormSelect;\n"],"names":["baseCls","FormSelect","forwardRef","className","id","props","ref","controlId","useContext","FormGroupContext","jsx","cn"],"mappings":";;;;AAoBA,MAAMA,IACJ,4NAMIC,IAAaC,EAAW,CAAC,EAAE,WAAAC,GAAW,IAAAC,GAAI,GAAGC,EAAA,GAAgBC,MAA+C;AAChH,QAAM,EAAE,WAAAC,EAAA,IAAcC,EAAWC,CAAgB;AAEjD,SAAO,gBAAAC,EAAC,UAAA,EAAQ,GAAGL,GAAO,KAAAC,GAAU,IAAIF,KAAMG,GAAW,WAAWI,EAAGX,GAASG,CAAS,EAAA,CAAG;AAC9F,CAAC;AAEDF,EAAW,cAAc;"}
|
package/dist/index.css
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
--color-chrome-800: var(--color-gray-200);
|
|
72
72
|
--color-chrome-900: var(--color-gray-100);
|
|
73
73
|
--color-chrome-950: var(--color-gray-50);
|
|
74
|
-
--color-chrome-foreground: var(--color
|
|
74
|
+
--color-chrome-foreground: var(--color-white);
|
|
75
75
|
--color-chrome-divider: var(--color-gray-700);
|
|
76
76
|
}
|
|
77
77
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubetail/ui",
|
|
3
|
-
"version": "v0.3.
|
|
3
|
+
"version": "v0.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@restart/ui": "^1",
|
|
39
39
|
"lucide-react": "*",
|
|
40
40
|
"react": "^19",
|
|
41
|
-
"react-dom": "^19",
|
|
42
41
|
"react-day-picker": "^9",
|
|
42
|
+
"react-dom": "^19",
|
|
43
43
|
"tailwindcss": "^4"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"@vueless/storybook-dark-mode": "^9.0.5",
|
|
98
98
|
"date-fns": "^4.1.0",
|
|
99
99
|
"eslint": "^9.28.0",
|
|
100
|
-
"eslint-config-airbnb-extended": "^1.
|
|
100
|
+
"eslint-config-airbnb-extended": "^2.1.2",
|
|
101
101
|
"eslint-config-prettier": "^10.1.5",
|
|
102
102
|
"eslint-import-resolver-typescript": "^4.4.3",
|
|
103
103
|
"eslint-plugin-import-x": "^4.15.2",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"tslib": "^2.8.1",
|
|
119
119
|
"typescript": "5.8.3",
|
|
120
120
|
"typescript-eslint": "^8.34.0",
|
|
121
|
-
"unplugin-dts": "1.0.0-beta.
|
|
121
|
+
"unplugin-dts": "1.0.0-beta.3",
|
|
122
122
|
"unplugin-fonts": "^1.3.1",
|
|
123
123
|
"vite": "^6.3.5",
|
|
124
124
|
"vitest": "^3.2.3"
|