@cloudflare/kumo 2.9.1 → 2.10.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/ai/component-registry.json +110 -6
  3. package/ai/component-registry.md +91 -2
  4. package/ai/schemas.ts +13 -1
  5. package/dist/.build-complete +1 -1
  6. package/dist/ai/schemas.d.ts +58 -2
  7. package/dist/ai/schemas.js +42 -1
  8. package/dist/chunks/{combobox-m2nvbt0b1stb2syc.js → combobox-l4pucshucau0qvrl.js} +18 -11
  9. package/dist/chunks/{pagination-k0yll9ynbi8flc3b.js → pagination-bya4kmtn4rqbexjb.js} +1 -1
  10. package/dist/chunks/{select-ln6ibqbbs0n4tiig.js → select-cqgxro9via28v4u8.js} +22 -19
  11. package/dist/chunks/{sidebar-kvjzu0ya0b2z6eec.js → sidebar-c5otog7ms7rb19cr.js} +15 -6
  12. package/dist/chunks/{tabs-lb4jj5mw26xtm2je.js → tabs-n7bpptah74dbh8kw.js} +27 -18
  13. package/dist/chunks/{toolbar-gwd1orc8yl7lzaou.js → toolbar-o25cb9lcznranewe.js} +20 -27
  14. package/dist/components/combobox.d.ts +1 -1
  15. package/dist/components/combobox.js +1 -1
  16. package/dist/components/pagination.js +1 -1
  17. package/dist/components/select.d.ts +1 -1
  18. package/dist/components/select.js +1 -1
  19. package/dist/components/sidebar.js +1 -1
  20. package/dist/components/tabs.d.ts +1 -1
  21. package/dist/components/tabs.js +1 -1
  22. package/dist/components/toolbar.d.ts +1 -1
  23. package/dist/components/toolbar.js +1 -1
  24. package/dist/{index-DUCaDjfd.d.ts → index-Bw3M24Mi.d.ts} +11 -2
  25. package/dist/{index-FZvrMcIo2.d.ts → index-CaoLMX-b2.d.ts} +3 -1
  26. package/dist/{index-B6LJIy7_2.d.ts → index-DTjmw8Vy2.d.ts} +7 -1
  27. package/dist/{index-C3iraF8M2.d.ts → index-FCkuxSvs2.d.ts} +5 -0
  28. package/dist/index.d.ts +4 -4
  29. package/dist/index.js +6 -6
  30. package/dist/styles/kumo-standalone.css +1 -1
  31. package/package.json +1 -1
  32. package/scripts/component-registry/index.ts +71 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @cloudflare/kumo
2
2
 
3
+ ## 2.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4b9a4dc: Allow Select and Combobox triggers to compose directly with `Toolbar.Button` and `Toolbar.Input` through their `render` props, adding grouped styling and arrow-key focus management while preserving regular `Select.*` and `Combobox.*` APIs.
8
+
9
+ Deprecate Toolbar's configurable `size` prop and size metadata exports. They remain functional for compatibility; omitting `size` continues to use the base size.
10
+
11
+ ### Patch Changes
12
+
13
+ - 65db2e6: Forward link-specific props in Tabs and Sidebar so link-rendered tabs can opt out of native button semantics, and Sidebar link buttons preserve attributes like `aria-current`.
14
+ - 0c58325: Expose all positioner props on Combobox.Content (`anchor`, `positionMethod`, `collisionAvoidance`, `collisionBoundary`, `collisionPadding`, `sticky`, `disableAnchorTracking`).
15
+ - 528d5ff: Populate InputArea props in component registry so the docs API reference table renders correctly
16
+ - 75c3b14: Fix Sidebar peeking state during SlidingViews transitions.
17
+ - 1d9b588: Fix Tabs overflow controls when tabs are removed and the remaining tabs fit.
18
+
19
+ ## 2.9.2
20
+
21
+ ### Patch Changes
22
+
23
+ - 188a82c: Remove the elevated chip styling from Tabs overflow scroll controls.
24
+ - c5ad709: Constrain Tabs overflow controls to segmented tabs and focus the caret target.
25
+
3
26
  ## 2.9.1
4
27
 
5
28
  ### Patch Changes
@@ -2864,6 +2864,34 @@
2864
2864
  "type": "ComboboxBase.Positioner.Props[\"sideOffset\"]",
2865
2865
  "optional": true
2866
2866
  },
2867
+ "anchor": {
2868
+ "type": "ComboboxBase.Positioner.Props[\"anchor\"]",
2869
+ "optional": true
2870
+ },
2871
+ "positionMethod": {
2872
+ "type": "ComboboxBase.Positioner.Props[\"positionMethod\"]",
2873
+ "optional": true
2874
+ },
2875
+ "collisionAvoidance": {
2876
+ "type": "ComboboxBase.Positioner.Props[\"collisionAvoidance\"]",
2877
+ "optional": true
2878
+ },
2879
+ "collisionBoundary": {
2880
+ "type": "ComboboxBase.Positioner.Props[\"collisionBoundary\"]",
2881
+ "optional": true
2882
+ },
2883
+ "collisionPadding": {
2884
+ "type": "ComboboxBase.Positioner.Props[\"collisionPadding\"]",
2885
+ "optional": true
2886
+ },
2887
+ "sticky": {
2888
+ "type": "ComboboxBase.Positioner.Props[\"sticky\"]",
2889
+ "optional": true
2890
+ },
2891
+ "disableAnchorTracking": {
2892
+ "type": "ComboboxBase.Positioner.Props[\"disableAnchorTracking\"]",
2893
+ "optional": true
2894
+ },
2867
2895
  "container": {
2868
2896
  "type": "PortalContainer",
2869
2897
  "optional": true
@@ -5127,6 +5155,11 @@
5127
5155
  "optional": true,
5128
5156
  "description": "Additional CSS classes merged via `cn()`."
5129
5157
  },
5158
+ "render": {
5159
+ "type": "ReactNode",
5160
+ "optional": true,
5161
+ "description": "Replaces the trigger element while preserving Select behavior."
5162
+ },
5130
5163
  "size": {
5131
5164
  "type": "enum",
5132
5165
  "optional": true,
@@ -6856,13 +6889,13 @@
6856
6889
  "<div className=\"space-y-4\">\n <Tabs\n tabs={[\n { value: \"tab1\", label: \"Tab 1\" },\n { value: \"tab2\", label: \"Tab 2\" },\n { value: \"tab3\", label: \"Tab 3\" },\n ]}\n value={activeTab}\n onValueChange={setActiveTab}\n />\n <p className=\"text-sm text-kumo-subtle\">\n Active tab: <code className=\"text-sm\">{activeTab}</code>\n </p>\n </div>",
6857
6890
  "<div className=\"w-full max-w-md\">\n <Tabs\n tabs={[\n { value: \"overview\", label: \"Overview\" },\n { value: \"analytics\", label: \"Analytics\" },\n { value: \"reports\", label: \"Reports\" },\n { value: \"notifications\", label: \"Notifications\" },\n { value: \"settings\", label: \"Settings\" },\n { value: \"billing\", label: \"Billing\" },\n { value: \"security\", label: \"Security\" },\n { value: \"integrations\", label: \"Integrations\" },\n ]}\n selectedValue=\"overview\"\n />\n </div>",
6858
6891
  "<div className=\"w-full max-w-xs\">\n <Tabs\n tabs={[\n { value: \"overview\", label: \"Overview\" },\n { value: \"analytics\", label: \"Analytics\" },\n { value: \"reports\", label: \"Reports\" },\n { value: \"notifications\", label: \"Notifications\" },\n { value: \"settings\", label: \"Settings\" },\n { value: \"billing\", label: \"Billing\" },\n { value: \"security\", label: \"Security\" },\n { value: \"integrations\", label: \"Integrations\" },\n ]}\n selectedValue=\"overview\"\n />\n </div>",
6892
+ "<div className=\"space-y-3\">\n <div className=\"w-full max-w-[588px]\">\n <Tabs tabs={tabs} selectedValue=\"settings\" />\n </div>\n <div className=\"flex items-center gap-3 text-sm text-kumo-subtle\">\n <button\n type=\"button\"\n className=\"rounded-md border border-kumo-line bg-kumo-base px-2.5 py-1 text-kumo-default hover:bg-kumo-tint focus:ring-2 focus:ring-kumo-brand focus:outline-none\"\n onClick={() => setShowExtraTabs((current) => !current)}\n >\n Toggle extra tabs\n </button>\n <span>{showExtraTabs ? \"10 tabs\" : \"7 tabs\"}</span>\n </div>\n </div>",
6859
6893
  "<div className=\"flex flex-col gap-6\">\n <div>\n <p className=\"mb-2 text-sm text-kumo-subtle\">Segmented sm</p>\n <Tabs\n variant=\"segmented\"\n size=\"sm\"\n tabs={[\n { value: \"tab1\", label: \"Tab 1\" },\n { value: \"tab2\", label: \"Tab 2\" },\n { value: \"tab3\", label: \"Tab 3\" },\n ]}\n selectedValue=\"tab1\"\n />\n </div>\n <div>\n <p className=\"mb-2 text-sm text-kumo-subtle\">Underline sm</p>\n <Tabs\n variant=\"underline\"\n size=\"sm\"\n tabs={[\n { value: \"tab1\", label: \"Tab 1\" },\n { value: \"tab2\", label: \"Tab 2\" },\n { value: \"tab3\", label: \"Tab 3\" },\n ]}\n selectedValue=\"tab1\"\n />\n </div>\n </div>",
6860
- "<Tabs\n tabs={[\n {\n value: \"tab1\",\n label: \"Regular Tab\",\n },\n {\n value: \"tab2\",\n label: \"Link Tab\",\n render: (props) => <a {...props} href=\"#tab2\" />,\n },\n {\n value: \"tab3\",\n label: \"Cloudflare\",\n render: (props) => (\n <a {...props} href=\"https://cloudflare.com\" target=\"_blank\" />\n ),\n },\n ]}\n selectedValue=\"tab1\"\n />"
6894
+ "<Tabs\n tabs={[\n {\n value: \"tab1\",\n label: \"Regular Tab\",\n },\n {\n value: \"tab2\",\n label: \"Link Tab\",\n nativeButton: false,\n render: (props) => <a {...props} href=\"#tab2\" />,\n },\n {\n value: \"tab3\",\n label: \"Cloudflare\",\n nativeButton: false,\n render: (props) => (\n <a {...props} href=\"https://cloudflare.com\" target=\"_blank\" />\n ),\n },\n ]}\n selectedValue=\"tab1\"\n />"
6861
6895
  ],
6862
6896
  "colors": [
6863
6897
  "bg-kumo-base",
6864
6898
  "bg-kumo-brand",
6865
- "bg-kumo-elevated",
6866
6899
  "bg-kumo-recessed",
6867
6900
  "bg-kumo-tint",
6868
6901
  "border-kumo-hairline",
@@ -7404,13 +7437,13 @@
7404
7437
  "<Toolbar className=\"w-full max-w-md\">\n <Toolbar.Input\n aria-label=\"Search DNS records\"\n placeholder=\"Search DNS records\"\n className=\"flex-1\"\n />\n <Toolbar.Button icon={FunnelSimpleIcon} aria-label=\"Filter\" />\n <Toolbar.Button icon={GearSixIcon} aria-label=\"Settings\" />\n </Toolbar>",
7405
7438
  "<Toolbar className=\"w-full max-w-lg\">\n <Toolbar.InputGroup aria-label=\"Worker subdomain\" className=\"flex-1\">\n <InputGroup.Input placeholder=\"my-worker\" />\n <InputGroup.Suffix>.workers.dev</InputGroup.Suffix>\n </Toolbar.InputGroup>\n <Toolbar.Button>Visit</Toolbar.Button>\n </Toolbar>",
7406
7439
  "<Toolbar>\n <Toolbar.Button icon={UploadSimpleIcon}>Upload</Toolbar.Button>\n <Toolbar.Button icon={DownloadSimpleIcon}>Download</Toolbar.Button>\n </Toolbar>",
7407
- "<Toolbar className=\"w-full max-w-lg\">\n <Toolbar.Input\n aria-label=\"Search records\"\n className=\"flex-1\"\n placeholder=\"Search\"\n />\n <Toolbar.Button icon={MagnifyingGlassIcon} aria-label=\"Search\" />\n </Toolbar>"
7440
+ "<Toolbar className=\"w-full max-w-lg\">\n <Toolbar.Input\n aria-label=\"Search records\"\n className=\"flex-1\"\n placeholder=\"Search\"\n />\n <Toolbar.Button icon={MagnifyingGlassIcon} aria-label=\"Search\" />\n </Toolbar>",
7441
+ "<Toolbar>\n <Toolbar.Button icon={FunnelSimpleIcon}>Filter</Toolbar.Button>\n <Select\n aria-label=\"Sort records\"\n defaultValue=\"name\"\n items={{ name: \"Name\", created: \"Created date\", status: \"Status\" }}\n render={<Toolbar.Button />}\n />\n <Toolbar.Button icon={GearSixIcon} aria-label=\"View settings\" />\n </Toolbar>",
7442
+ "<Toolbar className=\"w-full max-w-md\">\n <Toolbar.Button icon={FunnelSimpleIcon}>Status</Toolbar.Button>\n <Combobox items={toolbarComboboxItems}>\n <Combobox.TriggerInput\n aria-label=\"Filter status\"\n className=\"flex-1\"\n placeholder=\"Filter status…\"\n render={<Toolbar.Input />}\n />\n <Combobox.Content>\n <Combobox.List>\n {(item: string) => (\n <Combobox.Item key={item} value={item}>\n {item}\n </Combobox.Item>\n )}\n </Combobox.List>\n <Combobox.Empty>No matching statuses.</Combobox.Empty>\n </Combobox.Content>\n </Combobox>\n </Toolbar>"
7408
7443
  ],
7409
7444
  "colors": [
7410
7445
  "bg-kumo-control",
7411
7446
  "border-kumo-line",
7412
- "ring-kumo-brand",
7413
- "ring-kumo-focus",
7414
7447
  "ring-kumo-line"
7415
7448
  ],
7416
7449
  "subComponents": {
@@ -7519,7 +7552,78 @@
7519
7552
  "description": "Multi-line textarea input with Input variants and InputArea-specific dimensions",
7520
7553
  "importPath": "@cloudflare/kumo (synthetic - uses Input component)",
7521
7554
  "category": "Input",
7522
- "props": {},
7555
+ "props": {
7556
+ "size": {
7557
+ "type": "enum",
7558
+ "optional": true,
7559
+ "description": "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",
7560
+ "values": [
7561
+ "xs",
7562
+ "sm",
7563
+ "base",
7564
+ "lg"
7565
+ ],
7566
+ "descriptions": {
7567
+ "xs": "Extra small for compact UIs",
7568
+ "sm": "Small for secondary fields",
7569
+ "base": "Default size",
7570
+ "lg": "Large for prominent fields"
7571
+ },
7572
+ "default": "base"
7573
+ },
7574
+ "variant": {
7575
+ "type": "enum",
7576
+ "optional": true,
7577
+ "description": "Visual variant of the textarea.",
7578
+ "values": [
7579
+ "default",
7580
+ "error"
7581
+ ],
7582
+ "default": "default"
7583
+ },
7584
+ "label": {
7585
+ "type": "ReactNode",
7586
+ "optional": true,
7587
+ "description": "Label content for the textarea (enables Field wrapper) — can be a string or any React node."
7588
+ },
7589
+ "labelTooltip": {
7590
+ "type": "ReactNode",
7591
+ "optional": true,
7592
+ "description": "Tooltip content to display next to the label via an info icon."
7593
+ },
7594
+ "description": {
7595
+ "type": "ReactNode",
7596
+ "optional": true,
7597
+ "description": "Helper text displayed below the textarea."
7598
+ },
7599
+ "error": {
7600
+ "type": "string | { message: ReactNode; match: FieldErrorMatch }",
7601
+ "optional": true,
7602
+ "description": "Error message or validation error object."
7603
+ },
7604
+ "autoResize": {
7605
+ "type": "boolean",
7606
+ "optional": true,
7607
+ "description": "Automatically resize the textarea based on its content.",
7608
+ "default": "false"
7609
+ },
7610
+ "minRows": {
7611
+ "type": "number",
7612
+ "optional": true,
7613
+ "description": "Minimum number of rows to display when `autoResize` is enabled.",
7614
+ "default": "1"
7615
+ },
7616
+ "maxRows": {
7617
+ "type": "number",
7618
+ "optional": true,
7619
+ "description": "Maximum number of rows to grow to when `autoResize` is enabled; content beyond this scrolls."
7620
+ },
7621
+ "onValueChange": {
7622
+ "type": "(value: string) => void",
7623
+ "optional": true,
7624
+ "description": "Callback fired with the new string value on every change."
7625
+ }
7626
+ },
7523
7627
  "styling": {
7524
7628
  "sizeVariants": {
7525
7629
  "xs": {
@@ -2393,6 +2393,13 @@ Props:
2393
2393
  - `alignOffset`: ComboboxBase.Positioner.Props["alignOffset"]
2394
2394
  - `side`: ComboboxBase.Positioner.Props["side"]
2395
2395
  - `sideOffset`: ComboboxBase.Positioner.Props["sideOffset"]
2396
+ - `anchor`: ComboboxBase.Positioner.Props["anchor"]
2397
+ - `positionMethod`: ComboboxBase.Positioner.Props["positionMethod"]
2398
+ - `collisionAvoidance`: ComboboxBase.Positioner.Props["collisionAvoidance"]
2399
+ - `collisionBoundary`: ComboboxBase.Positioner.Props["collisionBoundary"]
2400
+ - `collisionPadding`: ComboboxBase.Positioner.Props["collisionPadding"]
2401
+ - `sticky`: ComboboxBase.Positioner.Props["sticky"]
2402
+ - `disableAnchorTracking`: ComboboxBase.Positioner.Props["disableAnchorTracking"]
2396
2403
  - `container`: PortalContainer
2397
2404
 
2398
2405
  #### Combobox.TriggerValue
@@ -6636,6 +6643,8 @@ Select component
6636
6643
 
6637
6644
  - `className`: string
6638
6645
  Additional CSS classes merged via `cn()`.
6646
+ - `render`: ReactNode
6647
+ Replaces the trigger element while preserving Select behavior.
6639
6648
  - `size`: enum [default: base]
6640
6649
  Size of the select trigger. Matches Input component sizes.
6641
6650
  - `label`: ReactNode
@@ -9092,7 +9101,7 @@ Tab navigation component with segmented or underline style. Built on Base UI Tab
9092
9101
 
9093
9102
  **Colors (kumo tokens used):**
9094
9103
 
9095
- `bg-kumo-base`, `bg-kumo-brand`, `bg-kumo-elevated`, `bg-kumo-recessed`, `bg-kumo-tint`, `border-kumo-hairline`, `ring-kumo-brand`, `ring-kumo-focus`, `ring-kumo-hairline`, `ring-kumo-line`, `text-kumo-default`, `text-kumo-subtle`
9104
+ `bg-kumo-base`, `bg-kumo-brand`, `bg-kumo-recessed`, `bg-kumo-tint`, `border-kumo-hairline`, `ring-kumo-brand`, `ring-kumo-focus`, `ring-kumo-hairline`, `ring-kumo-line`, `text-kumo-default`, `text-kumo-subtle`
9096
9105
 
9097
9106
  **Styling:**
9098
9107
 
@@ -9175,6 +9184,24 @@ Tab navigation component with segmented or underline style. Built on Base UI Tab
9175
9184
  </div>
9176
9185
  ```
9177
9186
 
9187
+ ```tsx
9188
+ <div className="space-y-3">
9189
+ <div className="w-full max-w-[588px]">
9190
+ <Tabs tabs={tabs} selectedValue="settings" />
9191
+ </div>
9192
+ <div className="flex items-center gap-3 text-sm text-kumo-subtle">
9193
+ <button
9194
+ type="button"
9195
+ className="rounded-md border border-kumo-line bg-kumo-base px-2.5 py-1 text-kumo-default hover:bg-kumo-tint focus:ring-2 focus:ring-kumo-brand focus:outline-none"
9196
+ onClick={() => setShowExtraTabs((current) => !current)}
9197
+ >
9198
+ Toggle extra tabs
9199
+ </button>
9200
+ <span>{showExtraTabs ? "10 tabs" : "7 tabs"}</span>
9201
+ </div>
9202
+ </div>
9203
+ ```
9204
+
9178
9205
  ```tsx
9179
9206
  <div className="flex flex-col gap-6">
9180
9207
  <div>
@@ -9216,11 +9243,13 @@ Tab navigation component with segmented or underline style. Built on Base UI Tab
9216
9243
  {
9217
9244
  value: "tab2",
9218
9245
  label: "Link Tab",
9246
+ nativeButton: false,
9219
9247
  render: (props) => <a {...props} href="#tab2" />,
9220
9248
  },
9221
9249
  {
9222
9250
  value: "tab3",
9223
9251
  label: "Cloudflare",
9252
+ nativeButton: false,
9224
9253
  render: (props) => (
9225
9254
  <a {...props} href="https://cloudflare.com" target="_blank" />
9226
9255
  ),
@@ -9901,7 +9930,7 @@ Accepts a `ReactElement` or a function that returns the element to render.
9901
9930
 
9902
9931
  **Colors (kumo tokens used):**
9903
9932
 
9904
- `bg-kumo-control`, `border-kumo-line`, `ring-kumo-brand`, `ring-kumo-focus`, `ring-kumo-line`
9933
+ `bg-kumo-control`, `border-kumo-line`, `ring-kumo-line`
9905
9934
 
9906
9935
  **Sub-Components:**
9907
9936
 
@@ -9980,6 +10009,43 @@ InputGroup sub-component
9980
10009
  </Toolbar>
9981
10010
  ```
9982
10011
 
10012
+ ```tsx
10013
+ <Toolbar>
10014
+ <Toolbar.Button icon={FunnelSimpleIcon}>Filter</Toolbar.Button>
10015
+ <Select
10016
+ aria-label="Sort records"
10017
+ defaultValue="name"
10018
+ items={{ name: "Name", created: "Created date", status: "Status" }}
10019
+ render={<Toolbar.Button />}
10020
+ />
10021
+ <Toolbar.Button icon={GearSixIcon} aria-label="View settings" />
10022
+ </Toolbar>
10023
+ ```
10024
+
10025
+ ```tsx
10026
+ <Toolbar className="w-full max-w-md">
10027
+ <Toolbar.Button icon={FunnelSimpleIcon}>Status</Toolbar.Button>
10028
+ <Combobox items={toolbarComboboxItems}>
10029
+ <Combobox.TriggerInput
10030
+ aria-label="Filter status"
10031
+ className="flex-1"
10032
+ placeholder="Filter status…"
10033
+ render={<Toolbar.Input />}
10034
+ />
10035
+ <Combobox.Content>
10036
+ <Combobox.List>
10037
+ {(item: string) => (
10038
+ <Combobox.Item key={item} value={item}>
10039
+ {item}
10040
+ </Combobox.Item>
10041
+ )}
10042
+ </Combobox.List>
10043
+ <Combobox.Empty>No matching statuses.</Combobox.Empty>
10044
+ </Combobox.Content>
10045
+ </Combobox>
10046
+ </Toolbar>
10047
+ ```
10048
+
9983
10049
 
9984
10050
  ---
9985
10051
 
@@ -10150,6 +10216,29 @@ Multi-line textarea input with Input variants and InputArea-specific dimensions
10150
10216
 
10151
10217
  **Props:**
10152
10218
 
10219
+ - `size`: enum [default: base]
10220
+ - `"xs"`: Extra small for compact UIs
10221
+ - `"sm"`: Small for secondary fields
10222
+ - `"base"`: Default size
10223
+ - `"lg"`: Large for prominent fields
10224
+ - `variant`: enum [default: default]
10225
+ Visual variant of the textarea.
10226
+ - `label`: ReactNode
10227
+ Label content for the textarea (enables Field wrapper) — can be a string or any React node.
10228
+ - `labelTooltip`: ReactNode
10229
+ Tooltip content to display next to the label via an info icon.
10230
+ - `description`: ReactNode
10231
+ Helper text displayed below the textarea.
10232
+ - `error`: string | { message: ReactNode; match: FieldErrorMatch }
10233
+ Error message or validation error object.
10234
+ - `autoResize`: boolean [default: false]
10235
+ Automatically resize the textarea based on its content.
10236
+ - `minRows`: number [default: 1]
10237
+ Minimum number of rows to display when `autoResize` is enabled.
10238
+ - `maxRows`: number
10239
+ Maximum number of rows to grow to when `autoResize` is enabled; content beyond this scrolls.
10240
+ - `onValueChange`: (value: string) => void
10241
+ Callback fired with the new string value on every change.
10153
10242
 
10154
10243
  **Styling:**
10155
10244
 
package/ai/schemas.ts CHANGED
@@ -610,7 +610,18 @@ export const InputPropsSchema = z.object({
610
610
  variant: z.enum(["default", "error"]).optional(), // Visual variant. - `"default"` — Standard input - `"error"` — Error state for validation failures
611
611
  });
612
612
 
613
- export const InputAreaPropsSchema = z.object({});
613
+ export const InputAreaPropsSchema = z.object({
614
+ size: z.enum(["xs", "sm", "base", "lg"]).optional(), // Input size. - `"xs"` — Extra small for compact UIs - `"sm"` — Small for secondary fields - `"base"` — Default size - `"lg"` — Large for prominent fields
615
+ variant: z.enum(["default", "error"]).optional(), // Visual variant of the textarea.
616
+ label: z.union([z.string(), z.number(), z.boolean(), z.null(), DynamicValueSchema]).optional(), // Label content for the textarea (enables Field wrapper) — can be a string or any React node.
617
+ labelTooltip: z.union([z.string(), z.number(), z.boolean(), z.null(), DynamicValueSchema]).optional(), // Tooltip content to display next to the label via an info icon.
618
+ description: z.union([z.string(), z.number(), z.boolean(), z.null(), DynamicValueSchema]).optional(), // Helper text displayed below the textarea.
619
+ error: z.unknown().optional(), // Error message or validation error object.
620
+ autoResize: z.boolean().optional(), // Automatically resize the textarea based on its content.
621
+ minRows: z.number().optional(), // Minimum number of rows to display when `autoResize` is enabled.
622
+ maxRows: z.number().optional(), // Maximum number of rows to grow to when `autoResize` is enabled; content beyond this scrolls.
623
+ onValueChange: z.unknown().optional(), // Callback fired with the new string value on every change.
624
+ });
614
625
 
615
626
  export const InputGroupPropsSchema = z.object({
616
627
  label: z.union([z.string(), z.number(), z.boolean(), z.null(), DynamicValueSchema]).optional(), // The label content — can be a string or any React node.
@@ -743,6 +754,7 @@ export const SankeyChartPropsSchema = z.object({
743
754
 
744
755
  export const SelectPropsSchema = z.object({
745
756
  className: z.string().optional(), // Additional CSS classes merged via `cn()`.
757
+ render: z.union([z.string(), z.number(), z.boolean(), z.null(), DynamicValueSchema]).optional(), // Replaces the trigger element while preserving Select behavior.
746
758
  size: z.enum(["xs", "sm", "base", "lg"]).optional(), // Size of the select trigger. Matches Input component sizes.
747
759
  label: z.union([z.string(), z.number(), z.boolean(), z.null(), DynamicValueSchema]).optional(), // Label content for the select. When provided, enables the Field wrapper with a visible label above the select. For accessibility without a visible label, use `aria-label` instead.
748
760
  hideLabel: z.boolean().optional(),
@@ -1 +1 @@
1
- 1785842034416
1
+ 1786471183698
@@ -821,7 +821,32 @@ declare const InputPropsSchema: z.ZodObject<{
821
821
  error: "error";
822
822
  }>>;
823
823
  }, z.core.$strip>;
824
- declare const InputAreaPropsSchema: z.ZodObject<{}, z.core.$strip>;
824
+ declare const InputAreaPropsSchema: z.ZodObject<{
825
+ size: z.ZodOptional<z.ZodEnum<{
826
+ base: "base";
827
+ sm: "sm";
828
+ xs: "xs";
829
+ lg: "lg";
830
+ }>>;
831
+ variant: z.ZodOptional<z.ZodEnum<{
832
+ default: "default";
833
+ error: "error";
834
+ }>>;
835
+ label: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
836
+ path: z.ZodString;
837
+ }, z.core.$strip>]>]>>;
838
+ labelTooltip: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
839
+ path: z.ZodString;
840
+ }, z.core.$strip>]>]>>;
841
+ description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
842
+ path: z.ZodString;
843
+ }, z.core.$strip>]>]>>;
844
+ error: z.ZodOptional<z.ZodUnknown>;
845
+ autoResize: z.ZodOptional<z.ZodBoolean>;
846
+ minRows: z.ZodOptional<z.ZodNumber>;
847
+ maxRows: z.ZodOptional<z.ZodNumber>;
848
+ onValueChange: z.ZodOptional<z.ZodUnknown>;
849
+ }, z.core.$strip>;
825
850
  declare const InputGroupPropsSchema: z.ZodObject<{
826
851
  label: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
827
852
  path: z.ZodString;
@@ -1002,6 +1027,9 @@ declare const SankeyChartPropsSchema: z.ZodObject<{
1002
1027
  }, z.core.$strip>;
1003
1028
  declare const SelectPropsSchema: z.ZodObject<{
1004
1029
  className: z.ZodOptional<z.ZodString>;
1030
+ render: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
1031
+ path: z.ZodString;
1032
+ }, z.core.$strip>]>]>>;
1005
1033
  size: z.ZodOptional<z.ZodEnum<{
1006
1034
  base: "base";
1007
1035
  sm: "sm";
@@ -2102,7 +2130,32 @@ declare const ComponentPropsSchemas: {
2102
2130
  error: "error";
2103
2131
  }>>;
2104
2132
  }, z.core.$strip>;
2105
- readonly InputArea: z.ZodObject<{}, z.core.$strip>;
2133
+ readonly InputArea: z.ZodObject<{
2134
+ size: z.ZodOptional<z.ZodEnum<{
2135
+ base: "base";
2136
+ sm: "sm";
2137
+ xs: "xs";
2138
+ lg: "lg";
2139
+ }>>;
2140
+ variant: z.ZodOptional<z.ZodEnum<{
2141
+ default: "default";
2142
+ error: "error";
2143
+ }>>;
2144
+ label: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
2145
+ path: z.ZodString;
2146
+ }, z.core.$strip>]>]>>;
2147
+ labelTooltip: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
2148
+ path: z.ZodString;
2149
+ }, z.core.$strip>]>]>>;
2150
+ description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
2151
+ path: z.ZodString;
2152
+ }, z.core.$strip>]>]>>;
2153
+ error: z.ZodOptional<z.ZodUnknown>;
2154
+ autoResize: z.ZodOptional<z.ZodBoolean>;
2155
+ minRows: z.ZodOptional<z.ZodNumber>;
2156
+ maxRows: z.ZodOptional<z.ZodNumber>;
2157
+ onValueChange: z.ZodOptional<z.ZodUnknown>;
2158
+ }, z.core.$strip>;
2106
2159
  readonly InputGroup: z.ZodObject<{
2107
2160
  label: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
2108
2161
  path: z.ZodString;
@@ -2283,6 +2336,9 @@ declare const ComponentPropsSchemas: {
2283
2336
  }, z.core.$strip>;
2284
2337
  readonly Select: z.ZodObject<{
2285
2338
  className: z.ZodOptional<z.ZodString>;
2339
+ render: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
2340
+ path: z.ZodString;
2341
+ }, z.core.$strip>]>]>>;
2286
2342
  size: z.ZodOptional<z.ZodEnum<{
2287
2343
  base: "base";
2288
2344
  sm: "sm";
@@ -4889,7 +4889,41 @@ const InputPropsSchema = object({
4889
4889
  ]).optional(),
4890
4890
  variant: _enum(["default", "error"]).optional()
4891
4891
  });
4892
- const InputAreaPropsSchema = object({});
4892
+ const InputAreaPropsSchema = object({
4893
+ size: _enum([
4894
+ "xs",
4895
+ "sm",
4896
+ "base",
4897
+ "lg"
4898
+ ]).optional(),
4899
+ variant: _enum(["default", "error"]).optional(),
4900
+ label: union([
4901
+ string(),
4902
+ number(),
4903
+ boolean(),
4904
+ _null(),
4905
+ DynamicValueSchema
4906
+ ]).optional(),
4907
+ labelTooltip: union([
4908
+ string(),
4909
+ number(),
4910
+ boolean(),
4911
+ _null(),
4912
+ DynamicValueSchema
4913
+ ]).optional(),
4914
+ description: union([
4915
+ string(),
4916
+ number(),
4917
+ boolean(),
4918
+ _null(),
4919
+ DynamicValueSchema
4920
+ ]).optional(),
4921
+ error: unknown().optional(),
4922
+ autoResize: boolean().optional(),
4923
+ minRows: number().optional(),
4924
+ maxRows: number().optional(),
4925
+ onValueChange: unknown().optional()
4926
+ });
4893
4927
  const InputGroupPropsSchema = object({
4894
4928
  label: union([
4895
4929
  string(),
@@ -5114,6 +5148,13 @@ const SankeyChartPropsSchema = object({
5114
5148
  });
5115
5149
  const SelectPropsSchema = object({
5116
5150
  className: string().optional(),
5151
+ render: union([
5152
+ string(),
5153
+ number(),
5154
+ boolean(),
5155
+ _null(),
5156
+ DynamicValueSchema
5157
+ ]).optional(),
5117
5158
  size: _enum([
5118
5159
  "xs",
5119
5160
  "sm",
@@ -23,6 +23,7 @@ function Root({ label, required, labelTooltip, description, error, children, siz
23
23
  },
24
24
  children: /* @__PURE__ */ jsx(ComboboxRoot, {
25
25
  ...props,
26
+ required,
26
27
  children
27
28
  })
28
29
  });
@@ -39,7 +40,7 @@ function Root({ label, required, labelTooltip, description, error, children, siz
39
40
  });
40
41
  return comboboxControl;
41
42
  }
42
- function Content({ children, className, align = "start", sideOffset = 4, alignOffset, side, container: containerProp }) {
43
+ function Content({ children, className, align = "start", sideOffset = 4, alignOffset, side, anchor, positionMethod, collisionAvoidance, collisionBoundary, collisionPadding, sticky, disableAnchorTracking, container: containerProp }) {
43
44
  const contextContainer = usePortalContainer();
44
45
  return /* @__PURE__ */ jsx(ComboboxPortal, {
45
46
  container: containerProp ?? contextContainer ?? void 0,
@@ -49,6 +50,13 @@ function Content({ children, className, align = "start", sideOffset = 4, alignOf
49
50
  sideOffset,
50
51
  alignOffset,
51
52
  side,
53
+ anchor,
54
+ positionMethod,
55
+ collisionAvoidance,
56
+ collisionBoundary,
57
+ collisionPadding,
58
+ sticky,
59
+ disableAnchorTracking,
52
60
  children: /* @__PURE__ */ jsx(ComboboxPopup, {
53
61
  className: cn("flex flex-col", "max-h-[min(var(--available-height),24rem)] max-w-(--available-width) min-w-(--anchor-width) py-1.5", "bg-kumo-base text-kumo-default", "rounded-lg shadow-lg ring ring-kumo-line", className),
54
62
  children
@@ -78,12 +86,13 @@ const triggerValueIconStyles = {
78
86
  iconRight: "right-3"
79
87
  }
80
88
  };
81
- function TriggerValue({ className, ...props }) {
89
+ function TriggerValue({ className, render, ...props }) {
82
90
  const { size, hasError } = useContext(ComboboxContext);
83
91
  const iconStyles = triggerValueIconStyles[size];
84
92
  return /* @__PURE__ */ jsxs(ComboboxTrigger, {
85
93
  "data-kumo-component": "Combobox",
86
94
  "data-kumo-part": "trigger",
95
+ render,
87
96
  className: cn(inputVariants({
88
97
  size,
89
98
  variant: hasError ? "error" : "default"
@@ -127,7 +136,7 @@ function TriggerInput({ clearLabel = "Clear selection", showOptionsLabel = "Show
127
136
  const { size, hasError } = useContext(ComboboxContext);
128
137
  const iconStyles = triggerInputIconStyles[size];
129
138
  return /* @__PURE__ */ jsxs("div", {
130
- className: cn("relative inline-block w-full max-w-xs", "has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50", props.className),
139
+ className: cn("relative inline-block w-full", "has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50", props.className),
131
140
  children: [
132
141
  /* @__PURE__ */ jsx(ComboboxInput, {
133
142
  ...props,
@@ -227,15 +236,16 @@ const sizeToMinHeight = {
227
236
  function TriggerMultipleWithInput({ placeholder, renderItem, className, inputSide = "right", value: controlledValue }) {
228
237
  const { size, hasError } = useContext(ComboboxContext);
229
238
  const chipsToRender = controlledValue;
239
+ const renderTriggerInput = (className) => /* @__PURE__ */ jsx(ComboboxInput, {
240
+ placeholder,
241
+ className
242
+ });
230
243
  return /* @__PURE__ */ jsxs(ComboboxChips, {
231
244
  className: cn(inputVariants({
232
245
  size,
233
246
  variant: hasError ? "error" : "default"
234
247
  }), "flex flex-col", "gap-1 px-1.5 py-1", sizeToMinHeight[size], "h-auto", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", className),
235
- children: [inputSide === "top" && /* @__PURE__ */ jsx(ComboboxInput, {
236
- placeholder,
237
- className: "w-full border-0 bg-inherit px-2 py-1"
238
- }), /* @__PURE__ */ jsxs("div", {
248
+ children: [inputSide === "top" && renderTriggerInput("w-full border-0 bg-inherit px-2 py-1"), /* @__PURE__ */ jsxs("div", {
239
249
  className: "flex flex-1 flex-wrap items-center gap-1.5",
240
250
  children: [
241
251
  chipsToRender !== void 0 && chipsToRender.length > 0 && chipsToRender.map((item) => renderItem(item)),
@@ -243,10 +253,7 @@ function TriggerMultipleWithInput({ placeholder, renderItem, className, inputSid
243
253
  if (chipsToRender !== void 0) return null;
244
254
  return /* @__PURE__ */ jsx(Fragment$1, { children: internalValue.map((item) => renderItem(item)) });
245
255
  } }),
246
- inputSide === "right" && /* @__PURE__ */ jsx(ComboboxInput, {
247
- placeholder,
248
- className: "min-w-[100px] flex-1 border-0 bg-inherit px-2 py-1"
249
- })
256
+ inputSide === "right" && renderTriggerInput("min-w-[100px] flex-1 border-0 bg-inherit px-2 py-1")
250
257
  ]
251
258
  })]
252
259
  });
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { t as cn } from "./vendor-styling-da1xibnxfkjmtglr.js";
3
3
  import { t as InputGroup } from "./input-group-otq3m9lach1jyxl0.js";
4
- import { t as Select } from "./select-ln6ibqbbs0n4tiig.js";
4
+ import { t as Select } from "./select-cqgxro9via28v4u8.js";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { createContext, useContext, useEffect, useMemo, useState } from "react";
7
7
  import { CaretDoubleLeftIcon, CaretDoubleRightIcon, CaretLeftIcon, CaretRightIcon } from "@phosphor-icons/react";