@kubetail/ui 0.3.1 → 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.
@@ -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,CAAA,CAC7E,EAGF,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,CAAA,EAE9D,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
+ {"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,IAAA;AAAA,EAC7E;AAGF,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,QAAA;AAAA,QAE9D,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
+ {"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 e=require("react/jsx-runtime"),u=require("react"),l=require("../lib/utils.cjs"),m="flex items-center",d="h-4 w-4 bg-background text-primary-600 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50",f="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(m,o),children:[e.jsx(a,{...n,ref:i,id:s,type:"checkbox",className:d}),r&&e.jsx("label",{htmlFor:s,className:f,children:r})]})});t.displayName="FormCheck";module.exports=t;
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 bg-background text-primary-600 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,8LACIC,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,CAAA,CAGN,EAEAL,EAAU,YAAc"}
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 r } from "react/jsx-runtime";
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", u = "h-4 w-4 bg-background text-primary-600 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: s = "input", className: t, id: e, label: o, ...c }, n) => {
6
- const a = s;
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__ */ r(a, { ...c, ref: n, id: e, type: "checkbox", className: u }),
9
- o && /* @__PURE__ */ r("label", { htmlFor: e, className: p, children: o })
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 bg-background text-primary-600 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,+LACIC,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,EAAA;AAGN;AAEAL,EAAU,cAAc;"}
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 +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 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,CAAA,CAE7F,EAEAH,EAAY,YAAc,cAQ1B,MAAMa,EAA2C,OAAO,OAAOb,EAAa,CAC1E,SAAUc,CACZ,CAAC"}
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"}
@@ -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 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,EAAA;AAE7F;AAEAH,EAAY,cAAc;AAQ1B,MAAMa,IAA2C,OAAO,OAAOb,GAAa;AAAA,EAC1E,UAAUc;AACZ,CAAC;"}
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,CAAA,CAEvG,EAEAH,EAAU,YAAc"}
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,EAAA;AAEvG;AAEAH,EAAU,cAAc;"}
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;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubetail/ui",
3
- "version": "v0.3.1",
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.0.11",
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.0",
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"