@cloudflare/kumo 2.6.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/ai/component-registry.json +1182 -163
- package/ai/component-registry.md +1425 -119
- package/ai/schemas.ts +137 -8
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +259 -22
- package/dist/ai/schemas.d.ts.map +1 -1
- package/dist/ai/schemas.js +1516 -1299
- package/dist/ai/schemas.js.map +1 -1
- package/dist/chunks/Maps-imwfwgb7do9lr3i5.js +2448 -0
- package/dist/chunks/Maps-imwfwgb7do9lr3i5.js.map +1 -0
- package/dist/chunks/{autocomplete-hgprlcuf0ixbbo6d.js → autocomplete-a4gvspveibfuod24.js} +5 -5
- package/dist/chunks/{autocomplete-hgprlcuf0ixbbo6d.js.map → autocomplete-a4gvspveibfuod24.js.map} +1 -1
- package/dist/chunks/{badge-c1th6h6ahz7eu49q.js → badge-dfc1r37osagi3rs4.js} +9 -9
- package/dist/chunks/{badge-c1th6h6ahz7eu49q.js.map → badge-dfc1r37osagi3rs4.js.map} +1 -1
- package/dist/chunks/{banner-es5iwuk4pf25e29e.js → banner-j52y8l13puk7dybi.js} +2 -2
- package/dist/chunks/{banner-es5iwuk4pf25e29e.js.map → banner-j52y8l13puk7dybi.js.map} +1 -1
- package/dist/chunks/{breadcrumbs-lyj8ljudrm2owx5y.js → breadcrumbs-js59m7m57bdsveew.js} +4 -4
- package/dist/chunks/{breadcrumbs-lyj8ljudrm2owx5y.js.map → breadcrumbs-js59m7m57bdsveew.js.map} +1 -1
- package/dist/chunks/{button-gtdhvogt5rlrf1is.js → button-ebfdg9mkhojue36n.js} +80 -80
- package/dist/chunks/button-ebfdg9mkhojue36n.js.map +1 -0
- package/dist/chunks/{checkbox-byg8t8r9vbmif696.js → checkbox-k355pnfisqt0h4eg.js} +4 -4
- package/dist/chunks/{checkbox-byg8t8r9vbmif696.js.map → checkbox-k355pnfisqt0h4eg.js.map} +1 -1
- package/dist/chunks/{clipboard-text-lf909phvldd8rfk8.js → clipboard-text-isb05zkg2aox0tp6.js} +5 -5
- package/dist/chunks/{clipboard-text-lf909phvldd8rfk8.js.map → clipboard-text-isb05zkg2aox0tp6.js.map} +1 -1
- package/dist/chunks/{cloudflare-logo-fya2cd2ljozkzjh8.js → cloudflare-logo-fiuocxdxqrxawjfv.js} +2 -2
- package/dist/chunks/{cloudflare-logo-fya2cd2ljozkzjh8.js.map → cloudflare-logo-fiuocxdxqrxawjfv.js.map} +1 -1
- package/dist/chunks/{cn-ct4n7r74mh8y0f48.js → cn-bo7ya7641lkickbt.js} +6 -10
- package/dist/chunks/cn-bo7ya7641lkickbt.js.map +1 -0
- package/dist/chunks/{code-bbnjm8vk9hxl129r.js → code-pbkfdfat0yilg6dx.js} +2 -2
- package/dist/chunks/{code-bbnjm8vk9hxl129r.js.map → code-pbkfdfat0yilg6dx.js.map} +1 -1
- package/dist/chunks/{collapsible-dl61f8gd4j897hmv.js → collapsible-f9hgtc1u6xvqrgt8.js} +3 -3
- package/dist/chunks/{collapsible-dl61f8gd4j897hmv.js.map → collapsible-f9hgtc1u6xvqrgt8.js.map} +1 -1
- package/dist/chunks/{combobox-dxff22zxzq846nec.js → combobox-hc9wi9nwsyyli8ur.js} +5 -5
- package/dist/chunks/{combobox-dxff22zxzq846nec.js.map → combobox-hc9wi9nwsyyli8ur.js.map} +1 -1
- package/dist/chunks/{command-palette-i4r0402b838wiy0j.js → command-palette-c03zze4ayuytwxjg.js} +4 -4
- package/dist/chunks/{command-palette-i4r0402b838wiy0j.js.map → command-palette-c03zze4ayuytwxjg.js.map} +1 -1
- package/dist/chunks/{date-picker-mjocqqbggb76n8rt.js → date-picker-bffp889exjixmgz3.js} +8 -8
- package/dist/chunks/{date-picker-mjocqqbggb76n8rt.js.map → date-picker-bffp889exjixmgz3.js.map} +1 -1
- package/dist/chunks/{date-range-picker-o8uyril1kogvhoei.js → date-range-picker-oks2r14lbbukd545.js} +2 -2
- package/dist/chunks/{date-range-picker-o8uyril1kogvhoei.js.map → date-range-picker-oks2r14lbbukd545.js.map} +1 -1
- package/dist/chunks/{dialog-g1b8161nbyixdit0.js → dialog-ovhmzfuppr5xix0e.js} +15 -15
- package/dist/chunks/dialog-ovhmzfuppr5xix0e.js.map +1 -0
- package/dist/chunks/{dropdown-irp18txvgz8590e9.js → dropdown-iey8f344rd5dgahz.js} +24 -16
- package/dist/chunks/dropdown-iey8f344rd5dgahz.js.map +1 -0
- package/dist/chunks/{empty-daa6d7u9oleaw24a.js → empty-k83r53jh5utqvv7w.js} +3 -3
- package/dist/chunks/{empty-daa6d7u9oleaw24a.js.map → empty-k83r53jh5utqvv7w.js.map} +1 -1
- package/dist/chunks/{field-f1hy08um3jf9jos6.js → field-bmglk138wa8bf3ei.js} +4 -4
- package/dist/chunks/{field-f1hy08um3jf9jos6.js.map → field-bmglk138wa8bf3ei.js.map} +1 -1
- package/dist/chunks/{grid-do93dv1rjggqxx7p.js → grid-jze04557ljywg3uc.js} +2 -2
- package/dist/chunks/{grid-do93dv1rjggqxx7p.js.map → grid-jze04557ljywg3uc.js.map} +1 -1
- package/dist/chunks/input-area-sg518xu4pyg4m0km.js +144 -0
- package/dist/chunks/input-area-sg518xu4pyg4m0km.js.map +1 -0
- package/dist/chunks/{input-f2ct7obgdzypjmp2.js → input-ckl5misj0jd9cu5r.js} +4 -4
- package/dist/chunks/{input-f2ct7obgdzypjmp2.js.map → input-ckl5misj0jd9cu5r.js.map} +1 -1
- package/dist/chunks/{input-group-kcd3jin5pbdijmw8.js → input-group-bflx1m6ki55e99vf.js} +6 -6
- package/dist/chunks/{input-group-kcd3jin5pbdijmw8.js.map → input-group-bflx1m6ki55e99vf.js.map} +1 -1
- package/dist/chunks/{label-himqjkdhh0hgfdsa.js → label-i1xbmg8y1n0tbtkx.js} +4 -4
- package/dist/chunks/{label-himqjkdhh0hgfdsa.js.map → label-i1xbmg8y1n0tbtkx.js.map} +1 -1
- package/dist/chunks/{layer-card-cshi5vydqg3phyfx.js → layer-card-m6h85dpadvee39h2.js} +3 -3
- package/dist/chunks/{layer-card-cshi5vydqg3phyfx.js.map → layer-card-m6h85dpadvee39h2.js.map} +1 -1
- package/dist/chunks/{link-bw21ofmgg58igq5n.js → link-j93fl5m8zrcfivsr.js} +3 -3
- package/dist/chunks/{link-bw21ofmgg58igq5n.js.map → link-j93fl5m8zrcfivsr.js.map} +1 -1
- package/dist/chunks/{menubar-m12wcbbucuszspw4.js → menubar-opzxfzylaatfz4nv.js} +8 -8
- package/dist/chunks/{menubar-m12wcbbucuszspw4.js.map → menubar-opzxfzylaatfz4nv.js.map} +1 -1
- package/dist/chunks/{meter-dn8vgc0smpk0du75.js → meter-6br6z5ekw41trxeh.js} +3 -3
- package/dist/chunks/{meter-dn8vgc0smpk0du75.js.map → meter-6br6z5ekw41trxeh.js.map} +1 -1
- package/dist/chunks/{pagination-oafyxvdndm9m8250.js → pagination-j33ntwqmm9qskfgv.js} +4 -4
- package/dist/chunks/{pagination-oafyxvdndm9m8250.js.map → pagination-j33ntwqmm9qskfgv.js.map} +1 -1
- package/dist/chunks/{popover-bbxr39l1lx175hum.js → popover-cqdmpp8i4hg8gzzx.js} +3 -3
- package/dist/chunks/{popover-bbxr39l1lx175hum.js.map → popover-cqdmpp8i4hg8gzzx.js.map} +1 -1
- package/dist/chunks/{radio-ffx05ih9nc764evh.js → radio-ejey7i6r4tq314av.js} +3 -3
- package/dist/chunks/{radio-ffx05ih9nc764evh.js.map → radio-ejey7i6r4tq314av.js.map} +1 -1
- package/dist/chunks/{select-kl1skfh3pmwc33rp.js → select-p8adn2tnpom25hpl.js} +8 -8
- package/dist/chunks/{select-kl1skfh3pmwc33rp.js.map → select-p8adn2tnpom25hpl.js.map} +1 -1
- package/dist/chunks/{sensitive-input-izmbyk1t7r56ciiq.js → sensitive-input-it1hsswlccq3u7g6.js} +5 -5
- package/dist/chunks/{sensitive-input-izmbyk1t7r56ciiq.js.map → sensitive-input-it1hsswlccq3u7g6.js.map} +1 -1
- package/dist/chunks/{sidebar-ior8rnhsd7gy5am5.js → sidebar-7whsl7qwrw5b6ip8.js} +307 -307
- package/dist/chunks/sidebar-7whsl7qwrw5b6ip8.js.map +1 -0
- package/dist/chunks/{skeleton-line-epxenksfesr2fkcv.js → skeleton-line-omxgxia23vpav94x.js} +2 -2
- package/dist/chunks/{skeleton-line-epxenksfesr2fkcv.js.map → skeleton-line-omxgxia23vpav94x.js.map} +1 -1
- package/dist/chunks/{surface-g5a1buofz4erjov2.js → surface-gc2gblserrxcb1eg.js} +5 -5
- package/dist/chunks/{surface-g5a1buofz4erjov2.js.map → surface-gc2gblserrxcb1eg.js.map} +1 -1
- package/dist/chunks/{switch-kh8a6l3l0hszm9h4.js → switch-ljsq915e0l1a5mjd.js} +4 -4
- package/dist/chunks/{switch-kh8a6l3l0hszm9h4.js.map → switch-ljsq915e0l1a5mjd.js.map} +1 -1
- package/dist/chunks/{table-of-contents-jco9kvt48d34dwsw.js → table-of-contents-cghjqyk43nj5zmlw.js} +2 -2
- package/dist/chunks/{table-of-contents-jco9kvt48d34dwsw.js.map → table-of-contents-cghjqyk43nj5zmlw.js.map} +1 -1
- package/dist/chunks/{table-dz2k55oab66h2vi9.js → table-ojjjeqszmt9jgnug.js} +3 -3
- package/dist/chunks/{table-dz2k55oab66h2vi9.js.map → table-ojjjeqszmt9jgnug.js.map} +1 -1
- package/dist/chunks/{tabs-kcw98wibdz4mhpkc.js → tabs-kemdy19kfesj2xjr.js} +3 -3
- package/dist/chunks/{tabs-kcw98wibdz4mhpkc.js.map → tabs-kemdy19kfesj2xjr.js.map} +1 -1
- package/dist/chunks/{text-be7ehenoyldhyjma.js → text-oqp48b9m5u6t62b4.js} +2 -2
- package/dist/chunks/{text-be7ehenoyldhyjma.js.map → text-oqp48b9m5u6t62b4.js.map} +1 -1
- package/dist/chunks/{toast-dkdo1lu72tnefya6.js → toast-ldj9zi940w83ub90.js} +97 -81
- package/dist/chunks/toast-ldj9zi940w83ub90.js.map +1 -0
- package/dist/chunks/{toolbar-o7xe6pd189evdd53.js → toolbar-lmylyrod70sn0q4i.js} +6 -6
- package/dist/chunks/{toolbar-o7xe6pd189evdd53.js.map → toolbar-lmylyrod70sn0q4i.js.map} +1 -1
- package/dist/chunks/{tooltip-eqnhjdbvwapy8gj4.js → tooltip-mooldq78tg77ekvv.js} +4 -4
- package/dist/chunks/tooltip-mooldq78tg77ekvv.js.map +1 -0
- package/dist/chunks/vendor-base-ui-elpbzr8xeffrz4h2.js +25027 -0
- package/dist/chunks/vendor-base-ui-elpbzr8xeffrz4h2.js.map +1 -0
- package/dist/chunks/{vendor-floating-ui-c4mwmh0xmfzevy9l.js → vendor-floating-ui-k1zjlb8fkwtcw4k5.js} +22 -23
- package/dist/chunks/{vendor-floating-ui-c4mwmh0xmfzevy9l.js.map → vendor-floating-ui-k1zjlb8fkwtcw4k5.js.map} +1 -1
- package/dist/chunks/vendor-styling-ofvnbcuht98q88oo.js +3252 -0
- package/dist/chunks/vendor-styling-ofvnbcuht98q88oo.js.map +1 -0
- package/dist/code.js +2 -2
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/chart.js +6 -4
- package/dist/components/checkbox.js +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/cloudflare-logo.js +1 -1
- package/dist/components/code.js +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/flow.js +2277 -2312
- package/dist/components/flow.js.map +1 -1
- package/dist/components/grid.js +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input.js +3 -3
- package/dist/components/label.js +1 -1
- package/dist/components/layer-card.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/meter.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sensitive-input.js +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/surface.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table-of-contents.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toolbar.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/index.js +128 -126
- package/dist/primitives/accordion.js +1 -1
- package/dist/primitives/alert-dialog.js +1 -1
- package/dist/primitives/autocomplete.js +1 -1
- package/dist/primitives/avatar.js +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/checkbox-group.js +1 -1
- package/dist/primitives/checkbox.js +1 -1
- package/dist/primitives/collapsible.js +1 -1
- package/dist/primitives/combobox.js +1 -1
- package/dist/primitives/context-menu.js +1 -1
- package/dist/primitives/csp-provider.js +1 -1
- package/dist/primitives/dialog.js +1 -1
- package/dist/primitives/direction-provider.js +1 -1
- package/dist/primitives/drawer.js +1 -1
- package/dist/primitives/field.js +1 -1
- package/dist/primitives/fieldset.js +1 -1
- package/dist/primitives/form.js +1 -1
- package/dist/primitives/input.js +1 -1
- package/dist/primitives/menu.js +1 -1
- package/dist/primitives/menubar.js +1 -1
- package/dist/primitives/meter.js +1 -1
- package/dist/primitives/navigation-menu.js +1 -1
- package/dist/primitives/number-field.js +1 -1
- package/dist/primitives/otp-field.js +3 -2
- package/dist/primitives/popover.js +1 -1
- package/dist/primitives/preview-card.js +1 -1
- package/dist/primitives/progress.js +1 -1
- package/dist/primitives/radio-group.js +1 -1
- package/dist/primitives/radio.js +1 -1
- package/dist/primitives/scroll-area.js +1 -1
- package/dist/primitives/select.js +1 -1
- package/dist/primitives/separator.js +1 -1
- package/dist/primitives/slider.js +1 -1
- package/dist/primitives/switch.js +1 -1
- package/dist/primitives/tabs.js +1 -1
- package/dist/primitives/toast.js +1 -1
- package/dist/primitives/toggle-group.js +1 -1
- package/dist/primitives/toggle.js +1 -1
- package/dist/primitives/toolbar.js +1 -1
- package/dist/primitives/tooltip.js +1 -1
- package/dist/primitives.js +27 -26
- package/dist/src/components/button/button.d.ts +2 -2
- package/dist/src/components/chart/Color.d.ts +16 -0
- package/dist/src/components/chart/Color.d.ts.map +1 -1
- package/dist/src/components/chart/EChart.d.ts +7 -0
- package/dist/src/components/chart/EChart.d.ts.map +1 -1
- package/dist/src/components/chart/Maps.d.ts +211 -0
- package/dist/src/components/chart/Maps.d.ts.map +1 -0
- package/dist/src/components/chart/SankeyChart.d.ts.map +1 -1
- package/dist/src/components/chart/TimeseriesChart.d.ts +8 -0
- package/dist/src/components/chart/TimeseriesChart.d.ts.map +1 -1
- package/dist/src/components/chart/index.d.ts +2 -1
- package/dist/src/components/chart/index.d.ts.map +1 -1
- package/dist/src/components/chart/timeseries-markers.d.ts +107 -0
- package/dist/src/components/chart/timeseries-markers.d.ts.map +1 -0
- package/dist/src/components/chart/timeseries-thresholds.d.ts +61 -0
- package/dist/src/components/chart/timeseries-thresholds.d.ts.map +1 -0
- package/dist/src/components/chart/timeseries-tooltip.d.ts +28 -0
- package/dist/src/components/chart/timeseries-tooltip.d.ts.map +1 -0
- package/dist/src/components/chart/tooltip-utils.d.ts +4 -0
- package/dist/src/components/chart/tooltip-utils.d.ts.map +1 -0
- package/dist/src/components/dialog/dialog.d.ts +12 -12
- package/dist/src/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/src/components/flow/connectors.d.ts +18 -0
- package/dist/src/components/flow/connectors.d.ts.map +1 -1
- package/dist/src/components/flow/diagram.d.ts +48 -39
- package/dist/src/components/flow/diagram.d.ts.map +1 -1
- package/dist/src/components/flow/flow-layout.d.ts +77 -0
- package/dist/src/components/flow/flow-layout.d.ts.map +1 -0
- package/dist/src/components/flow/node.d.ts.map +1 -1
- package/dist/src/components/flow/parallel.d.ts +3 -7
- package/dist/src/components/flow/parallel.d.ts.map +1 -1
- package/dist/src/components/flow/use-children.d.ts +0 -60
- package/dist/src/components/flow/use-children.d.ts.map +1 -1
- package/dist/src/components/input/input-area.d.ts +18 -0
- package/dist/src/components/input/input-area.d.ts.map +1 -1
- package/dist/src/components/sidebar/sidebar.d.ts +2 -0
- package/dist/src/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/src/components/toast/toast.d.ts +2 -2
- package/dist/src/components/toast/toast.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/primitives/index.d.ts +1 -0
- package/dist/src/primitives/index.d.ts.map +1 -1
- package/dist/src/primitives/otp-field.d.ts +1 -0
- package/dist/src/primitives/otp-field.d.ts.map +1 -1
- package/dist/src/utils/cn.d.ts +1 -2
- package/dist/src/utils/cn.d.ts.map +1 -1
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/utils.js +8 -7
- package/dist/utils.js.map +1 -1
- package/package.json +6 -5
- package/scripts/component-registry/discovery.ts +87 -0
- package/scripts/component-registry/index.test.ts +89 -1
- package/scripts/component-registry/index.ts +27 -2
- package/scripts/component-registry/sub-components.ts +34 -21
- package/scripts/generate-primitives.ts +9 -0
- package/dist/chunks/SankeyChart-g1tng405ml2e0qg2.js +0 -890
- package/dist/chunks/SankeyChart-g1tng405ml2e0qg2.js.map +0 -1
- package/dist/chunks/button-gtdhvogt5rlrf1is.js.map +0 -1
- package/dist/chunks/cn-ct4n7r74mh8y0f48.js.map +0 -1
- package/dist/chunks/dialog-g1b8161nbyixdit0.js.map +0 -1
- package/dist/chunks/dropdown-irp18txvgz8590e9.js.map +0 -1
- package/dist/chunks/input-area-bwyujceeulpfkpxv.js +0 -78
- package/dist/chunks/input-area-bwyujceeulpfkpxv.js.map +0 -1
- package/dist/chunks/sidebar-ior8rnhsd7gy5am5.js.map +0 -1
- package/dist/chunks/toast-dkdo1lu72tnefya6.js.map +0 -1
- package/dist/chunks/tooltip-eqnhjdbvwapy8gj4.js.map +0 -1
- package/dist/chunks/vendor-base-ui-f9z44m829vvptrg0.js +0 -24712
- package/dist/chunks/vendor-base-ui-f9z44m829vvptrg0.js.map +0 -1
- package/dist/chunks/vendor-styling-gobnkhsy0rva4qd3.js +0 -2775
- package/dist/chunks/vendor-styling-gobnkhsy0rva4qd3.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-
|
|
1
|
+
{"version":3,"file":"field-bmglk138wa8bf3ei.js","sources":["../../src/components/field/field.tsx"],"sourcesContent":["import { Field as FieldBase } from \"@base-ui/react/field\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Label } from \"../label\";\n\n/**\n * Normalizes an error prop that may be a string or structured object\n * into the `{ message, match }` shape expected by `<Field>`.\n *\n * Returns `undefined` when the input is falsy.\n */\nexport function normalizeFieldError(\n error: string | { message: ReactNode; match: FieldErrorMatch } | undefined,\n): { message: ReactNode; match: FieldErrorMatch } | undefined {\n if (!error) return undefined;\n if (typeof error === \"string\") return { message: error, match: true };\n return error;\n}\n\n/** Field variant definitions (currently empty, reserved for future additions). */\nexport const KUMO_FIELD_VARIANTS = {\n // Field currently has no variant options but structure is ready for future additions\n} as const;\n\nexport const KUMO_FIELD_DEFAULT_VARIANTS = {} as const;\n\n// Derived types from KUMO_FIELD_VARIANTS\nexport interface KumoFieldVariantsProps {\n /**\n * When true, places the control (checkbox/switch) before the label visually.\n * When false (default), places the label before the control.\n * Used to support different layout patterns (e.g., iOS-style toggles on the right).\n */\n controlFirst?: boolean;\n}\n\nexport function fieldVariants({\n controlFirst = false,\n}: KumoFieldVariantsProps = {}) {\n return cn(\n // Base styles - vertical layout (default)\n \"grid gap-2\",\n\n // Horizontal layout for checkbox and switch\n // Default: Grid auto-reverses in RTL (desired)\n \"has-[input[type=checkbox]]:grid-cols-[auto_1fr] has-[input[type=checkbox]]:items-center\",\n \"has-[[role=switch]]:grid-cols-[auto_1fr] has-[[role=switch]]:items-center\",\n\n // Control first: use flexbox with row-reverse to flip visual order without affecting text direction\n // flex-row-reverse in LTR: Control→Label, in RTL: Label→Control (opposite of grid default)\n controlFirst && [\n \"has-[input[type=checkbox]]:flex has-[input[type=checkbox]]:flex-row-reverse has-[input[type=checkbox]]:flex-wrap has-[input[type=checkbox]]:items-center\",\n \"has-[[role=switch]]:flex has-[[role=switch]]:flex-row-reverse has-[[role=switch]]:flex-wrap has-[[role=switch]]:items-center\",\n \"[&>label]:flex-1\",\n ],\n );\n}\n\n/**\n * Match type for field validation errors.\n * Can be a boolean or a key from the browser's ValidityState interface.\n * Source: BaseErrorProps[\"match\"] (ComponentPropsWithoutRef<typeof FieldBase.Error>)\n */\nexport type FieldErrorMatch =\n | boolean\n | \"badInput\"\n | \"customError\"\n | \"patternMismatch\"\n | \"rangeOverflow\"\n | \"rangeUnderflow\"\n | \"stepMismatch\"\n | \"tooLong\"\n | \"tooShort\"\n | \"typeMismatch\"\n | \"valid\"\n | \"valueMissing\";\n\n/**\n * Field component props — wraps a form control with label, description, and error message.\n *\n * @example\n * ```tsx\n * <Field label=\"Email\" required>\n * <Input placeholder=\"you@example.com\" />\n * </Field>\n *\n * <Field label=\"Phone\" required={false} description=\"We'll only use this for account recovery.\">\n * <Input placeholder=\"+1 555-0000\" />\n * </Field>\n * ```\n */\nexport interface FieldProps extends KumoFieldVariantsProps {\n /** The form control element(s) to wrap (Input, Select, Checkbox, etc.). */\n children: ReactNode;\n /** The label content — can be a string or any React node. */\n label: ReactNode;\n /**\n * When explicitly `false`, shows gray \"(optional)\" text after the label.\n * When `true` or `undefined`, no indicator is shown.\n */\n required?: boolean;\n /** Tooltip content displayed next to the label via an info icon. */\n labelTooltip?: ReactNode;\n /** Validation error with a message and a browser `ValidityState` match key. */\n error?: {\n message: ReactNode;\n match: FieldErrorMatch;\n };\n /** Helper text displayed below the control (hidden when `error` is present). */\n description?: ReactNode;\n /** When `true`, places the control before the label (for checkbox/switch layouts). */\n controlFirst?: boolean;\n /**\n * When `true`, Field renders layout, description, and error but skips\n * the `<label>` element. Use when the child component provides its own\n * accessible label (e.g. Select uses Base UI's `Select.Label` to avoid\n * hover/focus coupling from native `<label>`).\n * @default false\n */\n hideLabel?: boolean;\n}\n\n/**\n * Form field wrapper that provides a label, optional description, and error display\n * around any form control. Built on Base UI Field primitives.\n *\n * @example\n * ```tsx\n * <Field label=\"Username\">\n * <Input placeholder=\"Choose a username\" />\n * </Field>\n * ```\n */\nexport function Field({\n children,\n label,\n required,\n labelTooltip,\n error,\n description,\n controlFirst = false,\n hideLabel = false,\n}: FieldProps) {\n // Show \"(optional)\" when required is explicitly false\n const showOptional = required === false;\n\n return (\n <FieldBase.Root className={fieldVariants({ controlFirst })}>\n {!hideLabel && (\n <FieldBase.Label className=\"m-0 select-none text-base font-medium text-kumo-default\">\n <Label showOptional={showOptional} tooltip={labelTooltip} asContent>\n {label}\n </Label>\n </FieldBase.Label>\n )}\n {children}\n {error ? (\n <FieldBase.Error\n className={cn(\n \"text-sm leading-snug text-kumo-danger\",\n // Span full width in horizontal layout\n \"col-span-full\",\n )}\n match={error.match}\n >\n {error.message}\n </FieldBase.Error>\n ) : (\n description && (\n <FieldBase.Description\n className={cn(\n \"text-sm leading-snug text-kumo-subtle\",\n // Span full width in horizontal layout\n \"col-span-full\",\n )}\n >\n {description}\n </FieldBase.Description>\n )\n )}\n </FieldBase.Root>\n );\n}\n"],"names":["normalizeFieldError","error","KUMO_FIELD_VARIANTS","KUMO_FIELD_DEFAULT_VARIANTS","fieldVariants","controlFirst","cn","Field","children","label","required","labelTooltip","description","hideLabel","showOptional","jsxs","FieldBase.Root","jsx","FieldBase.Label","Label","FieldBase.Error","FieldBase.Description"],"mappings":";;;;;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,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as l } from "react/jsx-runtime";
|
|
3
3
|
import a from "react";
|
|
4
|
-
import { c as d } from "./cn-ct4n7r74mh8y0f48.js";
|
|
5
4
|
import { r as n } from "./resolve-variant-gw6eh7fa4st8ej7m.js";
|
|
5
|
+
import { c as d } from "./vendor-styling-ofvnbcuht98q88oo.js";
|
|
6
6
|
const g = {
|
|
7
7
|
variant: {
|
|
8
8
|
"2up": {
|
|
@@ -125,4 +125,4 @@ export {
|
|
|
125
125
|
t as c,
|
|
126
126
|
u as g
|
|
127
127
|
};
|
|
128
|
-
//# sourceMappingURL=grid-
|
|
128
|
+
//# sourceMappingURL=grid-jze04557ljywg3uc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-
|
|
1
|
+
{"version":3,"file":"grid-jze04557ljywg3uc.js","sources":["../../src/components/grid/grid.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant } from \"../../utils/resolve-variant\";\n\n/** Grid variant and gap definitions mapping layout names to their responsive Tailwind classes. */\nexport const KUMO_GRID_VARIANTS = {\n variant: {\n \"2up\": {\n classes: \"grid-cols-1 md:grid-cols-2\",\n description:\n \"Grid items stack on small screens, display side-by-side on medium screens and up\",\n },\n \"side-by-side\": {\n classes: \"grid-cols-2\",\n description: \"Grid items always displayed side-by-side\",\n },\n \"2-1\": {\n classes: \"grid-cols-1 md:grid-cols-[2fr_1fr]\",\n description:\n \"Two-thirds / one-third split (66%/33%) on medium screens and up\",\n },\n \"1-2\": {\n classes: \"grid-cols-1 md:grid-cols-[1fr_2fr]\",\n description:\n \"One-third / two-thirds split (33%/66%) on medium screens and up\",\n },\n \"1-3up\": {\n classes: \"grid-cols-1 lg:grid-cols-3\",\n description:\n \"Grid items stack on small screens, expand to 3 across on large screens\",\n },\n \"3up\": {\n classes: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-3\",\n description:\n \"Grid items stack on small screens, 2 across on medium, 3 across on large\",\n },\n \"4up\": {\n classes: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4\",\n description:\n \"Grid items stack on small screens, progressively increase columns at larger breakpoints\",\n },\n \"6up\": {\n classes: \"grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6\",\n description: \"Grid items start at 2 across, expand to 6 across on XL\",\n },\n \"1-2-4up\": {\n classes: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-4\",\n description:\n \"Grid items stack on small screens, 2 across on medium, 4 across on large\",\n },\n },\n gap: {\n none: {\n classes: \"gap-0\",\n description: \"No gap between grid items\",\n },\n sm: {\n classes: \"gap-3\",\n description: \"Small gap between grid items\",\n },\n base: {\n classes: \"gap-2 md:gap-6 lg:gap-8\",\n description: \"Default responsive gap between grid items\",\n },\n lg: {\n classes: \"gap-8\",\n description: \"Large gap between grid items\",\n },\n },\n} as const;\n\nexport const KUMO_GRID_DEFAULT_VARIANTS = {\n gap: \"base\",\n} as const;\n\nexport type KumoGridVariant = keyof typeof KUMO_GRID_VARIANTS.variant;\nexport type KumoGridGap = keyof typeof KUMO_GRID_VARIANTS.gap;\n\n/**\n * Grid component props.\n *\n * @example\n * ```tsx\n * <Grid variant=\"3up\" gap=\"sm\">\n * <GridItem><Surface className=\"p-4\">1</Surface></GridItem>\n * <GridItem><Surface className=\"p-4\">2</Surface></GridItem>\n * <GridItem><Surface className=\"p-4\">3</Surface></GridItem>\n * </Grid>\n * ```\n */\nexport interface GridProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Grid items to render. */\n children?: React.ReactNode;\n /** Additional CSS classes merged via `cn()`. */\n className?: string;\n /** Show dividers between grid items on mobile (only works with `\"4up\"` variant). */\n mobileDivider?: boolean;\n /**\n * Gap size between grid items.\n * - `\"none\"` — No gap\n * - `\"sm\"` — 12px gap\n * - `\"base\"` — Responsive gap (8px → 24px → 32px)\n * - `\"lg\"` — 32px gap\n * @default \"base\"\n */\n gap?: KumoGridGap;\n /**\n * Responsive column layout variant.\n * - `\"2up\"` — 1 col → 2 cols at md\n * - `\"side-by-side\"` — Always 2 cols\n * - `\"2-1\"` — 66%/33% split at md\n * - `\"1-2\"` — 33%/66% split at md\n * - `\"3up\"` — 1 → 2 → 3 cols\n * - `\"4up\"` — 1 → 2 → 3 → 4 cols\n * - `\"6up\"` — 2 → 3 → 4 → 6 cols\n * - `\"1-2-4up\"` — 1 → 2 → 4 cols\n */\n variant?: KumoGridVariant;\n}\n\n/** GridItem component props — a single cell within a Grid. */\nexport interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Content for this grid cell. */\n children?: React.ReactNode;\n /** Additional CSS classes merged via `cn()`. */\n className?: string;\n}\n\ninterface GridContextValue {\n variant?: KumoGridVariant;\n gap: KumoGridGap;\n mobileDivider?: boolean;\n}\n\nconst GridContext = React.createContext<GridContextValue>({\n gap: \"base\",\n});\n\nexport function gridVariants({\n variant,\n gap = KUMO_GRID_DEFAULT_VARIANTS.gap,\n}: {\n variant?: KumoGridVariant;\n gap?: KumoGridGap;\n} = {}) {\n return cn(\n \"grid\",\n variant && resolveVariant(KUMO_GRID_VARIANTS.variant, variant, \"2up\").classes,\n resolveVariant(KUMO_GRID_VARIANTS.gap, gap, KUMO_GRID_DEFAULT_VARIANTS.gap).classes,\n );\n}\n\nexport function gridItemVariants({\n variant,\n mobileDivider,\n}: {\n variant?: KumoGridVariant;\n mobileDivider?: boolean;\n} = {}) {\n return cn(\n mobileDivider &&\n variant === \"4up\" &&\n \"border-b border-kumo-hairline pb-8 md:border-b-0 md:pb-0\",\n );\n}\n\n/**\n * Responsive CSS grid layout container with preset column configurations.\n *\n * @example\n * ```tsx\n * <Grid variant=\"2up\" gap=\"base\">\n * <GridItem>Left</GridItem>\n * <GridItem>Right</GridItem>\n * </Grid>\n * ```\n */\nexport const Grid = React.forwardRef<HTMLDivElement, GridProps>(\n (\n {\n children,\n className,\n mobileDivider,\n gap = KUMO_GRID_DEFAULT_VARIANTS.gap,\n variant,\n ...props\n },\n ref,\n ) => {\n return (\n <GridContext.Provider value={{ variant, gap, mobileDivider }}>\n <div\n ref={ref}\n className={cn(gridVariants({ variant, gap }), className)}\n {...props}\n >\n {children}\n </div>\n </GridContext.Provider>\n );\n },\n);\n\nGrid.displayName = \"Grid\";\n\nexport const GridItem = React.forwardRef<HTMLDivElement, GridItemProps>(\n ({ children, className, ...props }, ref) => {\n const { variant, mobileDivider } = React.useContext(GridContext);\n\n return (\n <div\n ref={ref}\n className={cn(gridItemVariants({ variant, mobileDivider }), className)}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nGridItem.displayName = \"GridItem\";\n"],"names":["KUMO_GRID_VARIANTS","KUMO_GRID_DEFAULT_VARIANTS","GridContext","React","gridVariants","variant","gap","cn","resolveVariant","gridItemVariants","mobileDivider","Grid","children","className","props","ref","jsx","GridItem"],"mappings":";;;;;AAKO,MAAMA,IAAqB;AAAA,EAChC,SAAS;AAAA,IACP,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aACE;AAAA,IAAA;AAAA,IAEJ,gBAAgB;AAAA,MACd,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aACE;AAAA,IAAA;AAAA,IAEJ,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aACE;AAAA,IAAA;AAAA,IAEJ,SAAS;AAAA,MACP,SAAS;AAAA,MACT,aACE;AAAA,IAAA;AAAA,IAEJ,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aACE;AAAA,IAAA;AAAA,IAEJ,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aACE;AAAA,IAAA;AAAA,IAEJ,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,WAAW;AAAA,MACT,SAAS;AAAA,MACT,aACE;AAAA,IAAA;AAAA,EACJ;AAAA,EAEF,KAAK;AAAA,IACH,MAAM;AA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EAD,EAAK,cAAc;AAEZ,MAAMM,IAAWd,EAAM;AAAA,EAC5B,CAAC,EAAE,UAAAS,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAAQ;AAC1C,UAAM,EAAE,SAAAV,GAAS,eAAAK,EAAA,IAAkBP,EAAM,WAAWD,CAAW;AAE/D,WACE,gBAAAc;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAD;AAAA,QACA,WAAWR,EAAGE,EAAiB,EAAE,SAAAJ,GAAS,eAAAK,EAAA,CAAe,GAAGG,CAAS;AAAA,QACpE,GAAGC;AAAA,QAEH,UAAAF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAK,EAAS,cAAc;"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as N } from "react/jsx-runtime";
|
|
3
|
+
import { i as S } from "./input-ckl5misj0jd9cu5r.js";
|
|
4
|
+
import * as Y from "react";
|
|
5
|
+
import { useRef as v, useCallback as k, useLayoutEffect as F, useEffect as A } from "react";
|
|
6
|
+
import { F as B, n as L } from "./field-bmglk138wa8bf3ei.js";
|
|
7
|
+
import { c as M } from "./vendor-styling-ofvnbcuht98q88oo.js";
|
|
8
|
+
import { aY as O } from "./vendor-base-ui-elpbzr8xeffrz4h2.js";
|
|
9
|
+
const W = typeof window < "u" ? F : A;
|
|
10
|
+
function f(n) {
|
|
11
|
+
const t = Number.parseFloat(n);
|
|
12
|
+
return Number.isNaN(t) ? 0 : t;
|
|
13
|
+
}
|
|
14
|
+
function P({
|
|
15
|
+
enabled: n,
|
|
16
|
+
minRows: t,
|
|
17
|
+
maxRows: R
|
|
18
|
+
}) {
|
|
19
|
+
const d = v(null), z = v(n);
|
|
20
|
+
z.current = n;
|
|
21
|
+
const m = v(t);
|
|
22
|
+
m.current = t;
|
|
23
|
+
const b = v(R);
|
|
24
|
+
b.current = R;
|
|
25
|
+
const a = k(() => {
|
|
26
|
+
const e = d.current;
|
|
27
|
+
if (!z.current || !e || typeof window > "u")
|
|
28
|
+
return;
|
|
29
|
+
const r = window.getComputedStyle(e), s = f(r.borderTopWidth) + f(r.borderBottomWidth), l = f(r.paddingTop) + f(r.paddingBottom), p = r.boxSizing === "border-box";
|
|
30
|
+
e.style.height = "auto";
|
|
31
|
+
let c = p ? e.scrollHeight + s : e.scrollHeight - l;
|
|
32
|
+
const w = m.current, o = b.current;
|
|
33
|
+
if (w > 0 || o && o > 0) {
|
|
34
|
+
const C = f(r.fontSize), u = r.lineHeight, g = u === "normal" || u === "" ? C * 1.2 : u.endsWith("px") ? f(u) : f(u) * C, x = p ? l + s : 0, h = g * w + x;
|
|
35
|
+
if (c = Math.max(c, h), o && o > 0) {
|
|
36
|
+
const y = g * o + x;
|
|
37
|
+
c > y ? (c = y, e.style.overflowY = "auto") : e.style.overflowY = "hidden";
|
|
38
|
+
} else
|
|
39
|
+
e.style.overflowY = "hidden";
|
|
40
|
+
} else
|
|
41
|
+
e.style.overflowY = "hidden";
|
|
42
|
+
e.style.height = `${c}px`;
|
|
43
|
+
}, []);
|
|
44
|
+
return W(() => {
|
|
45
|
+
n && a();
|
|
46
|
+
}), W(() => {
|
|
47
|
+
if (!n) return;
|
|
48
|
+
const e = d.current;
|
|
49
|
+
if (!e) return;
|
|
50
|
+
let r = e.clientWidth;
|
|
51
|
+
const s = typeof ResizeObserver < "u" ? new ResizeObserver(() => {
|
|
52
|
+
e.clientWidth !== r && (r = e.clientWidth, a());
|
|
53
|
+
}) : null;
|
|
54
|
+
return s?.observe(e), () => {
|
|
55
|
+
s?.disconnect(), e.style.height = "", e.style.overflowY = "";
|
|
56
|
+
};
|
|
57
|
+
}, [n, a]), { textareaRef: d, resize: a };
|
|
58
|
+
}
|
|
59
|
+
const I = Y.forwardRef(
|
|
60
|
+
(n, t) => {
|
|
61
|
+
const {
|
|
62
|
+
className: R,
|
|
63
|
+
onValueChange: d,
|
|
64
|
+
size: z = "base",
|
|
65
|
+
variant: m,
|
|
66
|
+
onChange: b,
|
|
67
|
+
label: a,
|
|
68
|
+
labelTooltip: e,
|
|
69
|
+
description: r,
|
|
70
|
+
error: s,
|
|
71
|
+
autoResize: l = !1,
|
|
72
|
+
minRows: p = 1,
|
|
73
|
+
maxRows: c,
|
|
74
|
+
rows: w,
|
|
75
|
+
...o
|
|
76
|
+
} = n;
|
|
77
|
+
process.env.NODE_ENV !== "production" && m === "error" && console.warn(
|
|
78
|
+
'[Kumo InputArea]: variant="error" is deprecated. Error styling is now automatically applied when the `error` prop is truthy. Simply remove the variant prop and pass an error message instead.'
|
|
79
|
+
);
|
|
80
|
+
const C = m ?? (s ? "error" : "default"), { required: u } = o, { textareaRef: g, resize: x } = P({
|
|
81
|
+
enabled: l,
|
|
82
|
+
minRows: p,
|
|
83
|
+
maxRows: c
|
|
84
|
+
}), h = v(void 0), y = k(
|
|
85
|
+
(i) => {
|
|
86
|
+
g.current = i, typeof t == "function" ? i ? h.current = t(i) : h.current ? (h.current(), h.current = void 0) : t(null) : t && (t.current = i);
|
|
87
|
+
},
|
|
88
|
+
[t, g]
|
|
89
|
+
), E = o.value !== void 0, H = k(
|
|
90
|
+
(i) => {
|
|
91
|
+
b?.(i), d?.(i.target.value), E || x();
|
|
92
|
+
},
|
|
93
|
+
[b, d, x, E]
|
|
94
|
+
), T = M(
|
|
95
|
+
S({ size: z, variant: C, focusIndicator: !0 }),
|
|
96
|
+
"h-auto py-2",
|
|
97
|
+
// Input variant always comes with size, but it does not apply for textarea
|
|
98
|
+
l && "w-full field-sizing-content resize-none scroll-pb-2 [scrollbar-color:var(--color-kumo-line)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-track]:my-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-kumo-line [&::-webkit-scrollbar-corner]:bg-transparent",
|
|
99
|
+
R
|
|
100
|
+
);
|
|
101
|
+
return a || s || r ? /* @__PURE__ */ N(
|
|
102
|
+
B,
|
|
103
|
+
{
|
|
104
|
+
label: a,
|
|
105
|
+
required: u,
|
|
106
|
+
labelTooltip: e,
|
|
107
|
+
description: r,
|
|
108
|
+
error: L(s),
|
|
109
|
+
children: /* @__PURE__ */ N(
|
|
110
|
+
O,
|
|
111
|
+
{
|
|
112
|
+
render: (i) => /* @__PURE__ */ N(
|
|
113
|
+
"textarea",
|
|
114
|
+
{
|
|
115
|
+
...i,
|
|
116
|
+
ref: y,
|
|
117
|
+
className: T,
|
|
118
|
+
onChange: H,
|
|
119
|
+
rows: l ? p : w,
|
|
120
|
+
...o
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
) : /* @__PURE__ */ N(
|
|
127
|
+
"textarea",
|
|
128
|
+
{
|
|
129
|
+
ref: y,
|
|
130
|
+
className: T,
|
|
131
|
+
onChange: H,
|
|
132
|
+
rows: l ? p : w,
|
|
133
|
+
...o
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
I.displayName = "InputArea";
|
|
139
|
+
const $ = I;
|
|
140
|
+
export {
|
|
141
|
+
I,
|
|
142
|
+
$ as T
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=input-area-sg518xu4pyg4m0km.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-area-sg518xu4pyg4m0km.js","sources":["../../src/components/input/input-area.tsx"],"sourcesContent":["import { inputVariants } from \"./input\";\nimport { cn } from \"../../utils/cn\";\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n type ReactNode,\n} from \"react\";\nimport * as React from \"react\";\nimport { Field as FieldBase } from \"@base-ui/react/field\";\nimport {\n Field as KumoField,\n normalizeFieldError,\n type FieldErrorMatch,\n} from \"../field/field\";\n\n// useLayoutEffect warns when rendered with react-dom/server (React 18);\n// fall back to useEffect on the server where neither runs anyway.\nconst useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\nfunction parsePx(value: string): number {\n const parsed = Number.parseFloat(value);\n return Number.isNaN(parsed) ? 0 : parsed;\n}\n\n/**\n * Measures the content height of a textarea and applies it as an explicit\n * height, optionally clamped to `maxRows`. Handles box-sizing/borders and\n * container width changes (rewrapping).\n */\nfunction useTextareaAutoResize({\n enabled,\n minRows,\n maxRows,\n}: {\n enabled: boolean;\n minRows: number;\n maxRows?: number;\n}) {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const enabledRef = useRef(enabled);\n enabledRef.current = enabled;\n const minRowsRef = useRef(minRows);\n minRowsRef.current = minRows;\n const maxRowsRef = useRef(maxRows);\n maxRowsRef.current = maxRows;\n\n const resize = useCallback(() => {\n const textarea = textareaRef.current;\n if (!enabledRef.current || !textarea || typeof window === \"undefined\")\n return;\n\n const style = window.getComputedStyle(textarea);\n const borders =\n parsePx(style.borderTopWidth) + parsePx(style.borderBottomWidth);\n const padding =\n parsePx(style.paddingTop) + parsePx(style.paddingBottom);\n const isBorderBox = style.boxSizing === \"border-box\";\n\n // Collapsing to `auto` lets scrollHeight report the true content height\n // (needed to shrink); measure-then-write happens within a single layout\n // pass, before paint.\n textarea.style.height = \"auto\";\n // scrollHeight = content + padding. Convert to the height the current\n // box-sizing expects: border-box needs borders added, content-box needs\n // padding removed.\n let height = isBorderBox\n ? textarea.scrollHeight + borders\n : textarea.scrollHeight - padding;\n\n const currentMinRows = minRowsRef.current;\n const currentMaxRows = maxRowsRef.current;\n if (currentMinRows > 0 || (currentMaxRows && currentMaxRows > 0)) {\n // Computed line-height is normally a px value, but some environments\n // (e.g. jsdom) can return \"normal\" or a unitless multiplier like \"1.5\".\n const fontSize = parsePx(style.fontSize);\n const rawLineHeight = style.lineHeight;\n const lineHeight =\n rawLineHeight === \"normal\" || rawLineHeight === \"\"\n ? fontSize * 1.2\n : rawLineHeight.endsWith(\"px\")\n ? parsePx(rawLineHeight)\n : parsePx(rawLineHeight) * fontSize;\n const boxSpacing = isBorderBox ? padding + borders : 0;\n const minHeight = lineHeight * currentMinRows + boxSpacing;\n height = Math.max(height, minHeight);\n\n if (currentMaxRows && currentMaxRows > 0) {\n const maxHeight = lineHeight * currentMaxRows + boxSpacing;\n if (height > maxHeight) {\n height = maxHeight;\n // Content exceeds the clamp — it must stay scrollable.\n textarea.style.overflowY = \"auto\";\n } else {\n textarea.style.overflowY = \"hidden\";\n }\n } else {\n textarea.style.overflowY = \"hidden\";\n }\n } else {\n textarea.style.overflowY = \"hidden\";\n }\n\n textarea.style.height = `${height}px`;\n }, []);\n\n // Re-measure after every commit while enabled: covers controlled value\n // changes, size/variant/className changes, and anything else that reflows.\n // Two extra synchronous layouts per render is cheap for a textarea and\n // immune to stale-dependency bugs.\n useIsomorphicLayoutEffect(() => {\n if (enabled) resize();\n });\n\n // Setup/teardown per node while enabled. Restores inline styles when\n // autoResize turns off or on unmount so the manual resize handle behavior\n // returns untouched.\n useIsomorphicLayoutEffect(() => {\n if (!enabled) return;\n const textarea = textareaRef.current;\n if (!textarea) return;\n\n // Width changes rewrap content and change the required height. Only\n // react to inline-size changes — our own height writes also fire the\n // observer and would otherwise cause redundant resize passes.\n let lastWidth = textarea.clientWidth;\n const observer =\n typeof ResizeObserver !== \"undefined\"\n ? new ResizeObserver(() => {\n if (textarea.clientWidth !== lastWidth) {\n lastWidth = textarea.clientWidth;\n resize();\n }\n })\n : null;\n observer?.observe(textarea);\n\n return () => {\n observer?.disconnect();\n textarea.style.height = \"\";\n textarea.style.overflowY = \"\";\n };\n }, [enabled, resize]);\n\n return { textareaRef, resize };\n}\n\nexport const InputArea = React.forwardRef<HTMLTextAreaElement, InputAreaProps>(\n (props, ref) => {\n const {\n className,\n onValueChange,\n size = \"base\",\n variant: variantProp,\n onChange,\n label,\n labelTooltip,\n description,\n error,\n autoResize = false,\n minRows = 1,\n maxRows,\n rows,\n ...inputProps\n } = props;\n\n // Deprecation warning for variant=\"error\"\n if (process.env.NODE_ENV !== \"production\" && variantProp === \"error\") {\n console.warn(\n '[Kumo InputArea]: variant=\"error\" is deprecated. ' +\n \"Error styling is now automatically applied when the `error` prop is truthy. \" +\n \"Simply remove the variant prop and pass an error message instead.\",\n );\n }\n\n // Auto-apply error styling when error prop is truthy\n // Explicit variant prop takes precedence for backwards compatibility\n const variant = variantProp ?? (error ? \"error\" : \"default\");\n\n // Extract required from inputProps to pass to Field for label decoration\n const { required } = inputProps;\n const { textareaRef, resize } = useTextareaAutoResize({\n enabled: autoResize,\n minRows,\n maxRows,\n });\n\n // Forwarded ref may be a React 19 callback ref returning a cleanup\n // function — honor it instead of calling ref(null) on detach.\n const refCleanup = useRef<(() => void) | void>(undefined);\n const setTextareaRef = useCallback(\n (node: HTMLTextAreaElement | null) => {\n textareaRef.current = node;\n\n if (typeof ref === \"function\") {\n if (node) {\n refCleanup.current = ref(node) as (() => void) | void;\n } else if (refCleanup.current) {\n refCleanup.current();\n refCleanup.current = undefined;\n } else {\n ref(null);\n }\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref, textareaRef],\n );\n\n // Controlled inputs re-render on every keystroke, so the post-render\n // layout effect already re-measures; resizing here too would force a\n // second synchronous layout. Uncontrolled inputs don't re-render, so the\n // change handler is their only resize trigger.\n const isControlled = inputProps.value !== undefined;\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n onChange?.(event);\n onValueChange?.(event.target.value);\n if (!isControlled) resize();\n },\n [onChange, onValueChange, resize, isControlled],\n );\n\n const textareaClassName = cn(\n inputVariants({ size, variant, focusIndicator: true }),\n \"h-auto py-2\", // Input variant always comes with size, but it does not apply for textarea\n autoResize &&\n \"w-full field-sizing-content resize-none scroll-pb-2 [scrollbar-color:var(--color-kumo-line)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-track]:my-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-kumo-line [&::-webkit-scrollbar-corner]:bg-transparent\",\n className,\n );\n\n // Render with Field wrapper if label, error, or description is provided\n // Use FieldBase.Control with render callback to ensure proper label-textarea association.\n // The render callback receives props with the correct id/aria-labelledby from Field context.\n if (label || error || description) {\n return (\n <KumoField\n label={label}\n required={required}\n labelTooltip={labelTooltip}\n description={description}\n error={normalizeFieldError(error)}\n >\n <FieldBase.Control\n render={(controlProps) => (\n <textarea\n {...controlProps}\n ref={setTextareaRef}\n className={textareaClassName}\n onChange={handleChange}\n rows={autoResize ? minRows : rows}\n {...inputProps}\n />\n )}\n />\n </KumoField>\n );\n }\n\n // Render bare textarea without Field wrapper\n return (\n <textarea\n ref={setTextareaRef}\n className={textareaClassName}\n onChange={handleChange}\n rows={autoResize ? minRows : rows}\n {...inputProps}\n />\n );\n },\n);\n\nInputArea.displayName = \"InputArea\";\n\n/** Alias for InputArea — provided for discoverability when migrating from other libraries */\nexport const Textarea = InputArea;\n\n/**\n * InputArea component props\n * @property {ReactNode} [label] - Label content for the textarea (enables Field wrapper)\n * @property {ReactNode} [description] - Helper text displayed below the textarea\n * @property {string | { message: ReactNode, match: FieldErrorMatch }} [error] - Error message or validation error object\n */\nexport type InputAreaProps = {\n onValueChange?: (value: string) => void;\n variant?: \"default\" | \"error\";\n size?: \"xs\" | \"sm\" | \"base\" | \"lg\";\n // Then other custom props\n children?: React.ReactNode;\n className?: string;\n /** Label content for the textarea (enables Field wrapper) - can be a string or any React node */\n label?: ReactNode;\n /** Tooltip content to display next to the label via an info icon */\n labelTooltip?: ReactNode;\n /** Helper text displayed below the textarea */\n description?: ReactNode;\n /** Error message or validation error object */\n error?: string | { message: ReactNode; match: FieldErrorMatch };\n /** Automatically resize the textarea based on its content. */\n autoResize?: boolean;\n /** Minimum number of rows to display when `autoResize` is enabled. @default 1 */\n minRows?: number;\n /** Maximum number of rows to grow to when `autoResize` is enabled; content beyond this scrolls. */\n maxRows?: number;\n\n // Finally, spread the native input props (least important)\n} & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, \"size\">;\n"],"names":["useIsomorphicLayoutEffect","useLayoutEffect","useEffect","parsePx","value","parsed","useTextareaAutoResize","enabled","minRows","maxRows","textareaRef","useRef","enabledRef","minRowsRef","maxRowsRef","resize","useCallback","textarea","style","borders","padding","isBorderBox","height","currentMinRows","currentMaxRows","fontSize","rawLineHeight","lineHeight","boxSpacing","minHeight","maxHeight","lastWidth","observer","InputArea","React","props","ref","className","onValueChange","size","variantProp","onChange","label","labelTooltip","description","error","autoResize","rows","inputProps","variant","required","refCleanup","setTextareaRef","node","isControlled","handleChange","event","textareaClassName","cn","inputVariants","jsx","KumoField","normalizeFieldError","FieldBase.Control","controlProps","Textarea"],"mappings":";;;;;;;;AAmBA,MAAMA,IACJ,OAAO,SAAW,MAAcC,IAAkBC;AAEpD,SAASC,EAAQC,GAAuB;AACtC,QAAMC,IAAS,OAAO,WAAWD,CAAK;AACtC,SAAO,OAAO,MAAMC,CAAM,IAAI,IAAIA;AACpC;AAOA,SAASC,EAAsB;AAAA,EAC7B,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AACF,GAIG;AACD,QAAMC,IAAcC,EAAmC,IAAI,GACrDC,IAAaD,EAAOJ,CAAO;AACjC,EAAAK,EAAW,UAAUL;AACrB,QAAMM,IAAaF,EAAOH,CAAO;AACjC,EAAAK,EAAW,UAAUL;AACrB,QAAMM,IAAaH,EAAOF,CAAO;AACjC,EAAAK,EAAW,UAAUL;AAErB,QAAMM,IAASC,EAAY,MAAM;AAC/B,UAAMC,IAAWP,EAAY;AAC7B,QAAI,CAACE,EAAW,WAAW,CAACK,KAAY,OAAO,SAAW;AACxD;AAEF,UAAMC,IAAQ,OAAO,iBAAiBD,CAAQ,GACxCE,IACJhB,EAAQe,EAAM,cAAc,IAAIf,EAAQe,EAAM,iBAAiB,GAC3DE,IACJjB,EAAQe,EAAM,UAAU,IAAIf,EAAQe,EAAM,aAAa,GACnDG,IAAcH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kB,EAAM,OAAO,KAAK,GAC7BF,KAAcvC,EAAA;AAAA,MACrB;AAAA,MACA,CAAC0B,GAAUH,GAAevB,GAAQuC,CAAY;AAAA,IAAA,GAG1CG,IAAoBC;AAAA,MACxBC,EAAc,EAAE,MAAApB,GAAM,SAAAU,GAAS,gBAAgB,IAAM;AAAA,MACrD;AAAA;AAAA,MACAH,KACE;AAAA,MACFT;AAAA,IAAA;AAMF,WAAIK,KAASG,KAASD,IAElB,gBAAAgB;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,OAAAnB;AAAA,QACA,UAAAQ;AAAA,QACA,cAAAP;AAAA,QACA,aAAAC;AAAA,QACA,OAAOkB,EAAoBjB,CAAK;AAAA,QAEhC,UAAA,gBAAAe;AAAA,UAACG;AAAAA,UAAA;AAAA,YACC,QAAQ,CAACC,MACP,gBAAAJ;AAAA,cAAC;AAAA,cAAA;AAAA,gBACE,GAAGI;AAAA,gBACJ,KAAKZ;AAAA,gBACL,WAAWK;AAAA,gBACX,UAAUF;AAAA,gBACV,MAAMT,IAAatC,IAAUuC;AAAA,gBAC5B,GAAGC;AAAA,cAAA;AAAA,YAAA;AAAA,UACN;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA,IAOJ,gBAAAY;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKR;AAAA,QACL,WAAWK;AAAA,QACX,UAAUF;AAAA,QACV,MAAMT,IAAatC,IAAUuC;AAAA,QAC5B,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAf,EAAU,cAAc;AAGjB,MAAMgC,IAAWhC;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as d } from "react/jsx-runtime";
|
|
3
|
-
import { c as g } from "./cn-ct4n7r74mh8y0f48.js";
|
|
4
3
|
import { r as f } from "./resolve-variant-gw6eh7fa4st8ej7m.js";
|
|
5
4
|
import { forwardRef as w } from "react";
|
|
6
|
-
import { F as E, n as N } from "./field-
|
|
7
|
-
import { I as y } from "./vendor-base-ui-
|
|
5
|
+
import { F as E, n as N } from "./field-bmglk138wa8bf3ei.js";
|
|
6
|
+
import { I as y } from "./vendor-base-ui-elpbzr8xeffrz4h2.js";
|
|
7
|
+
import { c as g } from "./vendor-styling-ofvnbcuht98q88oo.js";
|
|
8
8
|
const m = {
|
|
9
9
|
size: {
|
|
10
10
|
xs: {
|
|
@@ -127,4 +127,4 @@ export {
|
|
|
127
127
|
m as K,
|
|
128
128
|
z as i
|
|
129
129
|
};
|
|
130
|
-
//# sourceMappingURL=input-
|
|
130
|
+
//# sourceMappingURL=input-ckl5misj0jd9cu5r.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-f2ct7obgdzypjmp2.js","sources":["../../src/components/input/input.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn\";\nimport { resolveVariant } from \"../../utils/resolve-variant\";\nimport {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from \"react\";\nimport { Input as BaseInput } from \"@base-ui/react/input\";\nimport { Field, normalizeFieldError, type FieldErrorMatch } from \"../field/field\";\n\n/** Input size and variant definitions mapping names to their Tailwind classes. */\nexport const KUMO_INPUT_VARIANTS = {\n size: {\n xs: {\n classes: \"h-5 gap-1 rounded-sm px-1.5 text-xs\",\n description: \"Extra small input for compact UIs\",\n },\n sm: {\n classes: \"h-6.5 gap-1 rounded-md px-2 text-xs\",\n description: \"Small input for secondary fields\",\n },\n base: {\n classes: \"h-9 gap-1.5 rounded-lg px-3 text-base\",\n description: \"Default input size\",\n },\n lg: {\n classes: \"h-10 gap-2 rounded-lg px-4 text-base\",\n description: \"Large input for prominent fields\",\n },\n },\n variant: {\n default: {\n classes: \"focus:ring-kumo-focus/50 focus:ring-[1.5px]\",\n description: \"Default input appearance\",\n },\n error: {\n classes: \"!ring-kumo-danger focus:ring-kumo-danger/50 focus:ring-[1.5px]\",\n description: \"Error state for validation failures\",\n },\n },\n} as const;\n\nexport const KUMO_INPUT_DEFAULT_VARIANTS = {\n size: \"base\",\n variant: \"default\",\n} as const;\n\nexport const KUMO_INPUT_STYLING = {\n dimensions: {\n xs: { height: 20, paddingX: 6, fontSize: 12, borderRadius: 2, width: 160 },\n sm: { height: 26, paddingX: 8, fontSize: 12, borderRadius: 6, width: 200 },\n base: {\n height: 36,\n paddingX: 12,\n fontSize: 16,\n borderRadius: 8,\n width: 280,\n },\n lg: { height: 40, paddingX: 16, fontSize: 16, borderRadius: 8, width: 320 },\n },\n baseTokens: {\n background: \"color-secondary\",\n text: \"text-color-surface\",\n placeholder: \"text-color-muted\",\n ring: \"color-border\",\n },\n stateTokens: {\n focus: { ring: \"color-active\" },\n error: { ring: \"color-error\" },\n disabled: { opacity: 0.5, text: \"text-color-muted\" },\n },\n} as const;\n\n// Derived types from KUMO_INPUT_VARIANTS\nexport type KumoInputSize = keyof typeof KUMO_INPUT_VARIANTS.size;\nexport type KumoInputVariant = keyof typeof KUMO_INPUT_VARIANTS.variant;\n\nexport interface KumoInputVariantsProps {\n /**\n * Input size.\n * - `\"xs\"` — Extra small for compact UIs\n * - `\"sm\"` — Small for secondary fields\n * - `\"base\"` — Default size\n * - `\"lg\"` — Large for prominent fields\n * @default \"base\"\n */\n size?: KumoInputSize;\n /**\n * Visual variant.\n * - `\"default\"` — Standard input\n * - `\"error\"` — Error state for validation failures\n * @default \"default\"\n */\n variant?: KumoInputVariant;\n parentFocusIndicator?: boolean;\n focusIndicator?: boolean;\n}\n\n// Omit native `size` attribute (number) to avoid conflict with our custom `size` variant\ntype BaseInputProps = Omit<ComponentPropsWithoutRef<typeof BaseInput>, \"size\">;\n\nexport function inputVariants({\n variant = KUMO_INPUT_DEFAULT_VARIANTS.variant,\n size = KUMO_INPUT_DEFAULT_VARIANTS.size,\n parentFocusIndicator = false,\n focusIndicator = false,\n}: KumoInputVariantsProps = {}) {\n return cn(\n // Base styles\n \"border-0 bg-kumo-control text-kumo-default ring ring-kumo-line outline-none focus:outline-none\",\n // Disabled state and placeholder styles (using vanilla CSS class for Chrome compatibility)\n \"kumo-input-placeholder disabled:text-kumo-disabled\",\n // Apply size styles from KUMO_INPUT_VARIANTS\n resolveVariant(\n KUMO_INPUT_VARIANTS.size,\n size,\n KUMO_INPUT_DEFAULT_VARIANTS.size,\n ).classes,\n // Apply variant styles from KUMO_INPUT_VARIANTS\n resolveVariant(\n KUMO_INPUT_VARIANTS.variant,\n variant,\n KUMO_INPUT_DEFAULT_VARIANTS.variant,\n ).classes,\n // Focus state handling\n parentFocusIndicator &&\n (variant === \"error\"\n ? \"focus-within:ring-kumo-danger/50 focus-within:ring-[1.5px]\"\n : \"focus-within:ring-kumo-focus/50 focus-within:ring-[1.5px]\"),\n focusIndicator &&\n (variant === \"error\"\n ? \"focus:ring-kumo-danger/50 focus:ring-[1.5px]\"\n : \"focus:ring-kumo-focus/50 focus:ring-[1.5px]\"),\n );\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>((props, ref) => {\n const {\n className,\n size = \"base\",\n variant: variantProp,\n label,\n labelTooltip,\n description,\n error,\n passwordManagerIgnore = false,\n ...inputProps\n } = props;\n\n // Deprecation warning for variant=\"error\"\n if (process.env.NODE_ENV !== \"production\" && variantProp === \"error\") {\n console.warn(\n '[Kumo Input]: variant=\"error\" is deprecated. ' +\n \"Error styling is now automatically applied when the `error` prop is truthy. \" +\n \"Simply remove the variant prop and pass an error message instead.\",\n );\n }\n\n // Auto-apply error styling when error prop is truthy\n // Explicit variant prop takes precedence for backwards compatibility\n const variant = variantProp ?? (error ? \"error\" : \"default\");\n\n // Extract required from inputProps to pass to Field for label decoration\n const { required } = inputProps;\n\n // A11y enforcement: warn in dev if no accessible name provided\n if (process.env.NODE_ENV !== \"production\") {\n const hasLabel = Boolean(label);\n const hasAriaLabel = Boolean(inputProps[\"aria-label\"]);\n const hasAriaLabelledBy = Boolean(inputProps[\"aria-labelledby\"]);\n\n if (!hasLabel && !hasAriaLabel && !hasAriaLabelledBy) {\n console.warn(\n \"[Kumo Input]: Input must have an accessible name. Provide either:\\n\" +\n \" - label prop: <Input label='Email' />\\n\" +\n \" - aria-label: <Input aria-label='Email address' />\\n\" +\n \" - aria-labelledby for custom label association\",\n );\n }\n }\n\n const input = (\n <BaseInput\n ref={ref}\n className={cn(\n inputVariants({ size, variant, focusIndicator: true }),\n passwordManagerIgnore && \"keeper-ignore\",\n className,\n )}\n {...(passwordManagerIgnore\n ? {\n \"data-1p-ignore\": \"true\",\n \"data-bwignore\": \"true\",\n \"data-form-type\": \"other\",\n \"data-lpignore\": \"true\",\n }\n : {})}\n {...inputProps}\n />\n );\n\n // Render with Field wrapper if label, error, or description is provided\n if (label || error || description) {\n return (\n <Field\n label={label}\n required={required}\n labelTooltip={labelTooltip}\n description={description}\n error={normalizeFieldError(error)}\n >\n {input}\n </Field>\n );\n }\n\n // Render bare input without Field wrapper\n return input;\n});\n\nInput.displayName = \"Input\";\n\n/**\n * Input component props with accessibility guidance.\n *\n * **Accessible Name Required:** Input should have one of:\n * 1. `label` prop (recommended) - enables Field wrapper with label/description/error\n * 2. `placeholder` + `aria-label` - for bare inputs with visual placeholder\n * 3. `aria-labelledby` - for custom label association\n *\n * Missing accessible names will trigger console warnings in development.\n *\n * @example\n * // Recommended: Built-in Field wrapper\n * <Input label=\"Email\" placeholder=\"you@example.com\" />\n *\n * @example\n * // Bare input with placeholder and aria-label\n * <Input placeholder=\"Search...\" aria-label=\"Search products\" />\n *\n * @example\n * // Custom label association\n * <label id=\"email-label\">Email</label>\n * <Input aria-labelledby=\"email-label\" />\n *\n * @example\n * // With description and error\n * <Input\n * label=\"Password\"\n * description=\"Must be at least 8 characters\"\n * error=\"Password is too short\"\n * />\n */\nexport type InputProps = Pick<KumoInputVariantsProps, \"size\" | \"variant\"> &\n BaseInputProps & {\n /** Label content for the input (enables Field wrapper) - can be a string or any React node */\n label?: ReactNode;\n /** Tooltip content to display next to the label via an info icon */\n labelTooltip?: ReactNode;\n /** Helper text displayed below the input */\n description?: ReactNode;\n /** Error message or validation error object */\n error?: string | { message: ReactNode; match: FieldErrorMatch };\n /** Suppress browser extension password manager overlays on non-credential inputs. */\n passwordManagerIgnore?: boolean;\n };\n"],"names":["KUMO_INPUT_VARIANTS","KUMO_INPUT_DEFAULT_VARIANTS","inputVariants","variant","size","parentFocusIndicator","focusIndicator","cn","resolveVariant","Input","forwardRef","props","ref","className","variantProp","label","labelTooltip","description","error","passwordManagerIgnore","inputProps","required","hasLabel","hasAriaLabel","hasAriaLabelledBy","input","jsx","BaseInput","Field","normalizeFieldError"],"mappings":";;;;;;;AAWO,MAAMA,IAAsB;AAAA,EACjC,MAAM;AAAA,IACJ,IAAI;AAAA,MACF,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,IAAI;AAAA,MACF,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,IAAI;AAAA,MACF,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,EACf;AAAA,EAEF,SAAS;AAAA,IACP,SAAS;AAAA,MACP,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GAEaC,IAA8B;AAAA,EACzC,MAAM;AAAA,EACN,SAAS;AACX;AAwDO,SAASC,EAAc;AAAA,EAC5B,SAAAC,IAAUF,EAA4B;AAAA,EACtC,MAAAG,IAAOH,EAA4B;AAAA,EACnC,sBAAAI,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AACnB,IAA4B,IAAI;AAC9B,SAAOC;AAAA;AAAA,IAEL;AAAA;AAAA,IAEA;AAAA;AAAA,IAEAC;AAAA,MACER,EAAoB;AAAA,MACpBI;AAAA,MACAH,EAA4B;AAAA,IAAA,EAC5B;AAAA;AAAA,IAEFO;AAAA,MACER,EAAoB;AAAA,MACpBG;AA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A,MACC,OAAAb;AAAA,MACA,UAAAM;AAAA,MACA,cAAAL;AAAA,MACA,aAAAC;AAAA,MACA,OAAOY,EAAoBX,CAAK;AAAA,MAE/B,UAAAO;AAAA,IAAA;AAAA,EAAA,IAMAA;AACT,CAAC;AAEDhB,EAAM,cAAc;"}
|
|
1
|
+
{"version":3,"file":"input-ckl5misj0jd9cu5r.js","sources":["../../src/components/input/input.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn\";\nimport { resolveVariant } from \"../../utils/resolve-variant\";\nimport {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from \"react\";\nimport { Input as BaseInput } from \"@base-ui/react/input\";\nimport { Field, normalizeFieldError, type FieldErrorMatch } from \"../field/field\";\n\n/** Input size and variant definitions mapping names to their Tailwind classes. */\nexport const KUMO_INPUT_VARIANTS = {\n size: {\n xs: {\n classes: \"h-5 gap-1 rounded-sm px-1.5 text-xs\",\n description: \"Extra small input for compact UIs\",\n },\n sm: {\n classes: \"h-6.5 gap-1 rounded-md px-2 text-xs\",\n description: \"Small input for secondary fields\",\n },\n base: {\n classes: \"h-9 gap-1.5 rounded-lg px-3 text-base\",\n description: \"Default input size\",\n },\n lg: {\n classes: \"h-10 gap-2 rounded-lg px-4 text-base\",\n description: \"Large input for prominent fields\",\n },\n },\n variant: {\n default: {\n classes: \"focus:ring-kumo-focus/50 focus:ring-[1.5px]\",\n description: \"Default input appearance\",\n },\n error: {\n classes: \"!ring-kumo-danger focus:ring-kumo-danger/50 focus:ring-[1.5px]\",\n description: \"Error state for validation failures\",\n },\n },\n} as const;\n\nexport const KUMO_INPUT_DEFAULT_VARIANTS = {\n size: \"base\",\n variant: \"default\",\n} as const;\n\nexport const KUMO_INPUT_STYLING = {\n dimensions: {\n xs: { height: 20, paddingX: 6, fontSize: 12, borderRadius: 2, width: 160 },\n sm: { height: 26, paddingX: 8, fontSize: 12, borderRadius: 6, width: 200 },\n base: {\n height: 36,\n paddingX: 12,\n fontSize: 16,\n borderRadius: 8,\n width: 280,\n },\n lg: { height: 40, paddingX: 16, fontSize: 16, borderRadius: 8, width: 320 },\n },\n baseTokens: {\n background: \"color-secondary\",\n text: \"text-color-surface\",\n placeholder: \"text-color-muted\",\n ring: \"color-border\",\n },\n stateTokens: {\n focus: { ring: \"color-active\" },\n error: { ring: \"color-error\" },\n disabled: { opacity: 0.5, text: \"text-color-muted\" },\n },\n} as const;\n\n// Derived types from KUMO_INPUT_VARIANTS\nexport type KumoInputSize = keyof typeof KUMO_INPUT_VARIANTS.size;\nexport type KumoInputVariant = keyof typeof KUMO_INPUT_VARIANTS.variant;\n\nexport interface KumoInputVariantsProps {\n /**\n * Input size.\n * - `\"xs\"` — Extra small for compact UIs\n * - `\"sm\"` — Small for secondary fields\n * - `\"base\"` — Default size\n * - `\"lg\"` — Large for prominent fields\n * @default \"base\"\n */\n size?: KumoInputSize;\n /**\n * Visual variant.\n * - `\"default\"` — Standard input\n * - `\"error\"` — Error state for validation failures\n * @default \"default\"\n */\n variant?: KumoInputVariant;\n parentFocusIndicator?: boolean;\n focusIndicator?: boolean;\n}\n\n// Omit native `size` attribute (number) to avoid conflict with our custom `size` variant\ntype BaseInputProps = Omit<ComponentPropsWithoutRef<typeof BaseInput>, \"size\">;\n\nexport function inputVariants({\n variant = KUMO_INPUT_DEFAULT_VARIANTS.variant,\n size = KUMO_INPUT_DEFAULT_VARIANTS.size,\n parentFocusIndicator = false,\n focusIndicator = false,\n}: KumoInputVariantsProps = {}) {\n return cn(\n // Base styles\n \"border-0 bg-kumo-control text-kumo-default ring ring-kumo-line outline-none focus:outline-none\",\n // Disabled state and placeholder styles (using vanilla CSS class for Chrome compatibility)\n \"kumo-input-placeholder disabled:text-kumo-disabled\",\n // Apply size styles from KUMO_INPUT_VARIANTS\n resolveVariant(\n KUMO_INPUT_VARIANTS.size,\n size,\n KUMO_INPUT_DEFAULT_VARIANTS.size,\n ).classes,\n // Apply variant styles from KUMO_INPUT_VARIANTS\n resolveVariant(\n KUMO_INPUT_VARIANTS.variant,\n variant,\n KUMO_INPUT_DEFAULT_VARIANTS.variant,\n ).classes,\n // Focus state handling\n parentFocusIndicator &&\n (variant === \"error\"\n ? \"focus-within:ring-kumo-danger/50 focus-within:ring-[1.5px]\"\n : \"focus-within:ring-kumo-focus/50 focus-within:ring-[1.5px]\"),\n focusIndicator &&\n (variant === \"error\"\n ? \"focus:ring-kumo-danger/50 focus:ring-[1.5px]\"\n : \"focus:ring-kumo-focus/50 focus:ring-[1.5px]\"),\n );\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>((props, ref) => {\n const {\n className,\n size = \"base\",\n variant: variantProp,\n label,\n labelTooltip,\n description,\n error,\n passwordManagerIgnore = false,\n ...inputProps\n } = props;\n\n // Deprecation warning for variant=\"error\"\n if (process.env.NODE_ENV !== \"production\" && variantProp === \"error\") {\n console.warn(\n '[Kumo Input]: variant=\"error\" is deprecated. ' +\n \"Error styling is now automatically applied when the `error` prop is truthy. \" +\n \"Simply remove the variant prop and pass an error message instead.\",\n );\n }\n\n // Auto-apply error styling when error prop is truthy\n // Explicit variant prop takes precedence for backwards compatibility\n const variant = variantProp ?? (error ? \"error\" : \"default\");\n\n // Extract required from inputProps to pass to Field for label decoration\n const { required } = inputProps;\n\n // A11y enforcement: warn in dev if no accessible name provided\n if (process.env.NODE_ENV !== \"production\") {\n const hasLabel = Boolean(label);\n const hasAriaLabel = Boolean(inputProps[\"aria-label\"]);\n const hasAriaLabelledBy = Boolean(inputProps[\"aria-labelledby\"]);\n\n if (!hasLabel && !hasAriaLabel && !hasAriaLabelledBy) {\n console.warn(\n \"[Kumo Input]: Input must have an accessible name. Provide either:\\n\" +\n \" - label prop: <Input label='Email' />\\n\" +\n \" - aria-label: <Input aria-label='Email address' />\\n\" +\n \" - aria-labelledby for custom label association\",\n );\n }\n }\n\n const input = (\n <BaseInput\n ref={ref}\n className={cn(\n inputVariants({ size, variant, focusIndicator: true }),\n passwordManagerIgnore && \"keeper-ignore\",\n className,\n )}\n {...(passwordManagerIgnore\n ? {\n \"data-1p-ignore\": \"true\",\n \"data-bwignore\": \"true\",\n \"data-form-type\": \"other\",\n \"data-lpignore\": \"true\",\n }\n : {})}\n {...inputProps}\n />\n );\n\n // Render with Field wrapper if label, error, or description is provided\n if (label || error || description) {\n return (\n <Field\n label={label}\n required={required}\n labelTooltip={labelTooltip}\n description={description}\n error={normalizeFieldError(error)}\n >\n {input}\n </Field>\n );\n }\n\n // Render bare input without Field wrapper\n return input;\n});\n\nInput.displayName = \"Input\";\n\n/**\n * Input component props with accessibility guidance.\n *\n * **Accessible Name Required:** Input should have one of:\n * 1. `label` prop (recommended) - enables Field wrapper with label/description/error\n * 2. `placeholder` + `aria-label` - for bare inputs with visual placeholder\n * 3. `aria-labelledby` - for custom label association\n *\n * Missing accessible names will trigger console warnings in development.\n *\n * @example\n * // Recommended: Built-in Field wrapper\n * <Input label=\"Email\" placeholder=\"you@example.com\" />\n *\n * @example\n * // Bare input with placeholder and aria-label\n * <Input placeholder=\"Search...\" aria-label=\"Search products\" />\n *\n * @example\n * // Custom label association\n * <label id=\"email-label\">Email</label>\n * <Input aria-labelledby=\"email-label\" />\n *\n * @example\n * // With description and error\n * <Input\n * label=\"Password\"\n * description=\"Must be at least 8 characters\"\n * error=\"Password is too short\"\n * />\n */\nexport type InputProps = Pick<KumoInputVariantsProps, \"size\" | \"variant\"> &\n BaseInputProps & {\n /** Label content for the input (enables Field wrapper) - can be a string or any React node */\n label?: ReactNode;\n /** Tooltip content to display next to the label via an info icon */\n labelTooltip?: ReactNode;\n /** Helper text displayed below the input */\n description?: ReactNode;\n /** Error message or validation error object */\n error?: string | { message: ReactNode; match: FieldErrorMatch };\n /** Suppress browser extension password manager overlays on non-credential inputs. */\n passwordManagerIgnore?: boolean;\n };\n"],"names":["KUMO_INPUT_VARIANTS","KUMO_INPUT_DEFAULT_VARIANTS","inputVariants","variant","size","parentFocusIndicator","focusIndicator","cn","resolveVariant","Input","forwardRef","props","ref","className","variantProp","label","labelTooltip","description","error","passwordManagerIgnore","inputProps","required","hasLabel","hasAriaLabel","hasAriaLabelledBy","input","jsx","BaseInput","Field","normalizeFieldError"],"mappings":";;;;;;;AAWO,MAAMA,IAAsB;AAAA,EACjC,MAAM;AAAA,IACJ,IAAI;AAAA,MACF,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,IAAI;AAAA,MACF,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,IAAI;AAAA,MACF,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,EACf;AAAA,EAEF,SAAS;AAAA,IACP,SAAS;AAAA,MACP,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GAEaC,IAA8B;AAAA,EACzC,MAAM;AAAA,EACN,SAAS;AACX;AAwDO,SAASC,EAAc;AAAA,EAC5B,SAAAC,IAAUF,EAA4B;AAAA,EACtC,MAAAG,IAAOH,EAA4B;AAAA,EACnC,sBAAAI,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AACnB,IAA4B,IAAI;AAC9B,SAAOC;AAAA;AAAA,IAEL;AAAA;AAAA,IAEA;AAAA;AAAA,IAEAC;AAAA,MACER,EAAoB;AAAA,MACpBI;AAAA,MACAH,EAA4B;AAAA,IAAA,EAC5B;AAAA;AAAA,IAEFO;AAAA,MACER,EAAoB;AAAA,MACpBG;AAAA,MACAF,EAA4B;AAAA,IAAA,EAC5B;AAAA;AAAA,IAEFI,MACGF,MAAY,UACT,+DACA;AAAA,IACNG,MACGH,MAAY,UACT,iDACA;AAAA,EAAA;AAEV;AAEO,MAAMM,IAAQC,EAAyC,CAACC,GAAOC,MAAQ;AAC5E,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,MAAAT,IAAO;AAAA,IACP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{ jsx as s, jsxs as O, Fragment as $ } from "react/jsx-runtime";
|
|
3
3
|
import P, { createContext as T, Children as _, isValidElement as E, useContext as V, forwardRef as x, cloneElement as H, useId as J, useMemo as Q } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { B as X } from "./button-
|
|
8
|
-
import { T as Y } from "./tooltip-
|
|
4
|
+
import { I as W, i as A } from "./input-ckl5misj0jd9cu5r.js";
|
|
5
|
+
import { F as C } from "./field-bmglk138wa8bf3ei.js";
|
|
6
|
+
import { c as l } from "./vendor-styling-ofvnbcuht98q88oo.js";
|
|
7
|
+
import { B as X } from "./button-ebfdg9mkhojue36n.js";
|
|
8
|
+
import { T as Y } from "./tooltip-mooldq78tg77ekvv.js";
|
|
9
9
|
const G = {
|
|
10
10
|
xs: {
|
|
11
11
|
inputOuter: "px-1.5",
|
|
@@ -502,4 +502,4 @@ export {
|
|
|
502
502
|
dt as K,
|
|
503
503
|
pt as a
|
|
504
504
|
};
|
|
505
|
-
//# sourceMappingURL=input-group-
|
|
505
|
+
//# sourceMappingURL=input-group-bflx1m6ki55e99vf.js.map
|