@kubetail/ui 0.3.0 → 0.3.1

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 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
- ```sh
13
+ ```console
14
14
  pnpm install
15
15
  ```
16
16
 
17
17
  Next, run storybook:
18
18
 
19
- ```sh
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
- This should work as simple as running the following command:
27
+ Instead of running the project on your local machine you can also run it in a container using `docker compose`:
26
28
 
27
- ```sh
29
+ ```console
28
30
  docker compose up
29
31
  ```
30
32
 
31
- Open [http://localhost:6006](http://localhost:6006) in your browser to see the components.
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
- ```bash
46
- pnpm add -D @kubetail/ui
47
+ ```console
48
+ pnpm add @kubetail/ui
47
49
  ```
48
50
 
49
- 2. Modify your Tailwind config file
50
-
51
- ```javascript
52
- import kubetailUIPlugin from '@kubetail/ui/plugin';
53
-
54
- export default {
55
- content: [
56
- ...
57
- './node_modules/@kubetail/ui/**/*.js',
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,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 ring-black ring-opacity-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 g=Object.assign(r,{Body:i,DataCell:l,Header:d.default,HeaderCell:u,Row:x});module.exports=g;
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 ring-black ring-opacity-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,qEAEVC,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
+ {"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 l } from "react";
2
+ import { useMemo as s } from "react";
3
3
  import { cn as o } from "../../lib/utils.js";
4
- import s from "./Body.js";
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-1 ring-black ring-opacity-5 rounded-lg", b = {
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 i = l(() => ({ size: t }), [t]);
18
- return /* @__PURE__ */ e(x.Provider, { value: i, 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 }) }) });
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: s,
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 ring-black ring-opacity-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,sEAEVC,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
+ {"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"),m="flex items-center",f="h-4 w-4 text-primary-600 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring-1 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(m,o),children:[e.jsx(a,{...n,ref:i,id:s,type:"checkbox",className:f}),r&&e.jsx("label",{htmlFor:s,className:d,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"),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;
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 text-primary-600 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring-1 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,kLACIC,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 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,12 +1,12 @@
1
1
  import { jsxs as i, jsx as r } 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", p = "h-4 w-4 text-primary-600 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring-1 focus:ring-ring focus:ring-offset-0 disabled:opacity-50", u = "ml-2 block text-sm text-chrome-900", d = l(
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
5
  ({ as: s = "input", className: t, id: e, label: o, ...c }, n) => {
6
6
  const a = s;
7
7
  return /* @__PURE__ */ i("div", { className: m(f, t), children: [
8
- /* @__PURE__ */ r(a, { ...c, ref: n, id: e, type: "checkbox", className: p }),
9
- o && /* @__PURE__ */ r("label", { htmlFor: e, className: u, children: o })
8
+ /* @__PURE__ */ r(a, { ...c, ref: n, id: e, type: "checkbox", className: u }),
9
+ o && /* @__PURE__ */ r("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 text-primary-600 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring-1 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,mLACIC,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 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,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 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;
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 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,+UAOIC,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,CAAA,CAE7F,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-1 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(
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 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,gVAOIC,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,EAAA;AAE7F;AAEAH,EAAY,cAAc;AAQ1B,MAAMa,IAA2C,OAAO,OAAOb,GAAa;AAAA,EAC1E,UAAUc;AACZ,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 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;
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 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,6NAMIC,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"}
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-1 focus:ring-ring focus:ring-offset-0 disabled:opacity-50", l = c(({ className: o, id: r, ...t }, e) => {
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 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,8NAMIC,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;"}
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.white);
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.0",
3
+ "version": "v0.3.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "module": "./dist/index.js",