@cloudflare/kumo 2.12.0 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/ai/component-registry.json +107 -11
- package/ai/component-registry.md +136 -3
- package/ai/schemas.ts +14 -0
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +60 -0
- package/dist/ai/schemas.js +31 -0
- package/dist/chunks/{ToolbarInput-gxep3ixoe8r6v2to.js → ToolbarInput-er5t9irqvuwcjrir.js} +28 -1
- package/dist/chunks/{autocomplete-msex8kc8sw3fp373.js → autocomplete-dn6g4rc8bktdl4an.js} +2 -2
- package/dist/chunks/{banner-nz02b60ech1e2m6f.js → banner-n1ekcvrwashsgv93.js} +1 -1
- package/dist/chunks/{breadcrumbs-jvlyp3bw0u8qx4fi.js → breadcrumbs-ffwe8tzqzmpyikq5.js} +1 -1
- package/dist/chunks/{button-iqaz1uluabeo18f0.js → button-h36q7tklakhd38nx.js} +1 -1
- package/dist/chunks/{checkbox-crxoyqsxiupt9kmi.js → checkbox-jachq6akfh72x12r.js} +1 -1
- package/dist/chunks/{clipboard-text-osbgah3jz16ma2vv.js → clipboard-text-ms46uaujvkjmjnng.js} +2 -2
- package/dist/chunks/{combobox-nosdsxdxe2abnqzr.js → combobox-hxarufzb1z61xnbv.js} +3 -3
- package/dist/chunks/{dialog-nas75qs6d8gj5dxm.js → dialog-o0164pgcyc74lvp9.js} +1 -1
- package/dist/chunks/{empty-kfofsb6khrn1s26v.js → empty-ox60d384lkwbj5n4.js} +1 -1
- package/dist/chunks/{field-i7lxgmtio7nutt7c.js → field-kgz7w7yixmtpg010.js} +1 -1
- package/dist/chunks/{index2.parts-epkfat8l4pvwpd1a.js → index2.parts-kiwz8e3k8utvm4zb.js} +1 -29
- package/dist/chunks/{input-group-ksh61axy2qgkxl5y.js → input-group-kshukialqry0fmra.js} +5 -5
- package/dist/chunks/{input-oc9u4galsdrwy00s.js → input-ikfimmpl5sngvh9s.js} +2 -2
- package/dist/chunks/{input-jthoux2vfxltqtdh.js → input-pehjmr1q131tz38w.js} +1 -1
- package/dist/chunks/{label-ow6ait7o31g1umgy.js → label-ie2gpde0nco1avi7.js} +2 -2
- package/dist/chunks/{menubar-fu5u76o529yi19kp.js → menubar-ljbsj2ulayebjyza.js} +1 -1
- package/dist/chunks/{pagination-hu8y5b8zpef2z4lp.js → pagination-i3jewbdolgru0xnr.js} +13 -9
- package/dist/chunks/{select-jdz3yg2pvcjlkroy.js → select-ndqpqpmqtmn497rq.js} +27 -12
- package/dist/chunks/{sensitive-input-lba9qvv3ai4xwgux.js → sensitive-input-jtbp3mvdynz9wewu.js} +2 -2
- package/dist/chunks/{sidebar-enm5suo7wq163iw5.js → sidebar-ob6c9b8fq0hx7uke.js} +2 -2
- package/dist/chunks/{switch-bstb0wl1bi8hjt4z.js → switch-oghrd7f6i5jqar59.js} +1 -1
- package/dist/chunks/{table-ebfyk2rmebrn82k0.js → table-miggde3uqhhrd5at.js} +2 -2
- package/dist/chunks/{text-fsaeol90bjy3pnik.js → text-jzp4mdlr222iuzxt.js} +4 -4
- package/dist/chunks/{toast-byzrdv104awqbkjh.js → toast-g435fvt74w5orxqo.js} +1 -1
- package/dist/chunks/{toolbar-djjwqq141iealxa6.js → toolbar-e0b61hr6ys6dmwhv.js} +23 -4
- package/dist/chunks/{tooltip-k9f7io0k22k5jorq.js → tooltip-jq15p5jzgfrhslpo.js} +1 -1
- package/dist/code.js +1 -1
- package/dist/components/autocomplete.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/checkbox.js +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/field.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/menubar.js +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/select.d.ts +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/switch.js +1 -1
- package/dist/components/table.d.ts +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/text.d.ts +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toolbar.d.ts +2 -2
- package/dist/components/toolbar.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/{index-DTjmw8Vy2.d.ts → index-BXsHCLB82.d.ts} +4 -2
- package/dist/{index-CaoLMX-b2.d.ts → index-D97n4Bpf2.d.ts} +4 -2
- package/dist/{index-Dsn2VLZv.d.ts → index-DYYiDxZs.d.ts} +5 -0
- package/dist/{index-Bl6QyQDi2.d.ts → index-Dzzi1o7w2.d.ts} +4 -4
- package/dist/{index-BHclAeEt2.d.ts → index-_Sl5wohy2.d.ts} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +25 -25
- package/dist/primitives/toolbar.js +1 -1
- package/dist/primitives.js +1 -1
- package/dist/styles/kumo-standalone.css +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# @cloudflare/kumo
|
|
2
2
|
|
|
3
|
+
## 2.13.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7d5241d: Allow default Tooltip trigger children to control their line height, preventing inherited text from being clipped.
|
|
8
|
+
|
|
9
|
+
## 2.13.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 4066307: Add unknown-total pagination support through `hasNextPage`.
|
|
14
|
+
- f74936f: Add `Toolbar.Link`, which renders a `LinkButton` with toolbar sizing, styling, and keyboard navigation.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- d004940: Position dialogs near the top of the viewport instead of vertically centering them.
|
|
19
|
+
- 8f0a1f0: Use the elevated surface color for even rows in the default Table variant.
|
|
20
|
+
- 1ede8bf: fix(select): align the trigger surface with form controls
|
|
21
|
+
|
|
22
|
+
Select triggers now use `bg-kumo-control`, including their open and disabled
|
|
23
|
+
states, so they match Input, Combobox, and the rest of the form-control family.
|
|
24
|
+
Consumer background classes can still override the default without using
|
|
25
|
+
`!important`. The popup remains on the floating `bg-kumo-base` surface.
|
|
26
|
+
|
|
27
|
+
- 8482c50: fix(select): anchor the popup below the trigger and expose placement props
|
|
28
|
+
|
|
29
|
+
`Select.Positioner` relied on Base UI's `alignItemWithTrigger` default (`true`),
|
|
30
|
+
which overlays the popup on the trigger so the selected option's text lands on
|
|
31
|
+
the trigger's value text, emulating a native `<select>`. Options always render at
|
|
32
|
+
`text-base`, so on `xs`/`sm` triggers the popup was much taller than its anchor,
|
|
33
|
+
and Base UI's compensating shift detached it from the trigger — on `xs` it
|
|
34
|
+
overhung by 12.5px above and 45.5px below and sat 8px to the left, covering
|
|
35
|
+
adjacent content.
|
|
36
|
+
|
|
37
|
+
The popup now prefers `bottom` placement and is offset from the trigger, with
|
|
38
|
+
Base UI's collision avoidance still flipping it automatically when the preferred
|
|
39
|
+
side lacks space. Placement is configurable:
|
|
40
|
+
|
|
41
|
+
| prop | default | notes |
|
|
42
|
+
| ---------------------- | ---------- | ------------------------------------------------------------- |
|
|
43
|
+
| `side` | `"bottom"` | preferred side; still flips automatically on collision |
|
|
44
|
+
| `sideOffset` | `4` | gap between trigger and popup, matching Combobox/Autocomplete |
|
|
45
|
+
| `align` | `"start"` | alignment along the trigger edge |
|
|
46
|
+
| `alignOffset` | — | additional offset along the alignment axis |
|
|
47
|
+
| `alignItemWithTrigger` | `false` | opt back in to the native `<select>` overlay |
|
|
48
|
+
|
|
49
|
+
The remaining Base UI Positioner controls are also forwarded unchanged:
|
|
50
|
+
`anchor`, `arrowPadding`, `positionMethod`, `collisionAvoidance`,
|
|
51
|
+
`collisionBoundary`, `collisionPadding`, `sticky`, and
|
|
52
|
+
`disableAnchorTracking`.
|
|
53
|
+
|
|
54
|
+
The popup also now tracks the trigger width via `min-w-(--anchor-width)` instead
|
|
55
|
+
of `min-w-[calc(var(--anchor-width)+3px)]`, which existed to visually offset the
|
|
56
|
+
old item-alignment shift.
|
|
57
|
+
|
|
58
|
+
- 7526a6a: Allow non-heading Text variants to inherit line height from their surrounding context.
|
|
59
|
+
- b094a5a: Make `Combobox.Input` sit flush with the top and sides of `Combobox.Content` and remove its bottom corner rounding.
|
|
60
|
+
- 20b7880: Reduce the trailing inset for buttons inside large InputGroup addons.
|
|
61
|
+
|
|
3
62
|
## 2.12.0
|
|
4
63
|
|
|
5
64
|
### Minor Changes
|
|
@@ -4624,6 +4624,11 @@
|
|
|
4624
4624
|
"optional": true,
|
|
4625
4625
|
"description": "Total number of items across all pages."
|
|
4626
4626
|
},
|
|
4627
|
+
"hasNextPage": {
|
|
4628
|
+
"type": "boolean",
|
|
4629
|
+
"optional": true,
|
|
4630
|
+
"description": "Whether another page exists when the total count is unknown. Ignored when `totalCount` is provided. Unknown totals use sequential controls only."
|
|
4631
|
+
},
|
|
4627
4632
|
"className": {
|
|
4628
4633
|
"type": "string",
|
|
4629
4634
|
"optional": true,
|
|
@@ -4660,6 +4665,7 @@
|
|
|
4660
4665
|
"examples": [
|
|
4661
4666
|
"<Pagination page={page} setPage={setPage} perPage={10} totalCount={100} />",
|
|
4662
4667
|
"<Pagination\n page={page}\n setPage={setPage}\n perPage={10}\n totalCount={100}\n controls=\"simple\"\n />",
|
|
4668
|
+
"<Pagination\n text={() => `Page ${page}`}\n page={page}\n setPage={setPage}\n hasNextPage={hasNextPage}\n />",
|
|
4663
4669
|
"<Pagination\n page={page}\n setPage={setPage}\n perPage={10}\n totalCount={100}\n controls=\"full\"\n />",
|
|
4664
4670
|
"<Pagination page={page} setPage={setPage} perPage={10} totalCount={100} />",
|
|
4665
4671
|
"<Pagination page={page} setPage={setPage} perPage={25} totalCount={1250} />",
|
|
@@ -5154,6 +5160,88 @@
|
|
|
5154
5160
|
"importPath": "@cloudflare/kumo",
|
|
5155
5161
|
"category": "Input",
|
|
5156
5162
|
"props": {
|
|
5163
|
+
"align": {
|
|
5164
|
+
"type": "enum",
|
|
5165
|
+
"optional": true,
|
|
5166
|
+
"description": "How to align the popup relative to the specified side.",
|
|
5167
|
+
"values": [
|
|
5168
|
+
"start",
|
|
5169
|
+
"center",
|
|
5170
|
+
"end"
|
|
5171
|
+
]
|
|
5172
|
+
},
|
|
5173
|
+
"alignItemWithTrigger": {
|
|
5174
|
+
"type": "boolean",
|
|
5175
|
+
"optional": true,
|
|
5176
|
+
"description": "Whether the positioner overlaps the trigger so the selected item's text is aligned with the trigger's value text. This only applies to mouse input and is automatically disabled if there is not enough space."
|
|
5177
|
+
},
|
|
5178
|
+
"alignOffset": {
|
|
5179
|
+
"type": "number | OffsetFunction",
|
|
5180
|
+
"optional": true,
|
|
5181
|
+
"description": "Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment.\n\nThe function takes a `data` object parameter with the following properties:\n- `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.\n- `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.\n- `data.side`: which side of the anchor element the positioner is aligned against.\n- `data.align`: how the positioner is aligned relative to the specified side."
|
|
5182
|
+
},
|
|
5183
|
+
"anchor": {
|
|
5184
|
+
"type": "ReactNode",
|
|
5185
|
+
"optional": true,
|
|
5186
|
+
"description": "An element to position the popup against. By default, the popup will be positioned against the trigger."
|
|
5187
|
+
},
|
|
5188
|
+
"arrowPadding": {
|
|
5189
|
+
"type": "number",
|
|
5190
|
+
"optional": true,
|
|
5191
|
+
"description": "Minimum distance to maintain between the arrow and the edges of the popup.\n\nUse it to prevent the arrow element from hanging out of the rounded corners of a popup."
|
|
5192
|
+
},
|
|
5193
|
+
"collisionAvoidance": {
|
|
5194
|
+
"type": "CollisionAvoidance",
|
|
5195
|
+
"optional": true,
|
|
5196
|
+
"description": "Determines how to handle collisions when positioning the popup.\n\n`side` controls overflow on the preferred placement axis (`top`/`bottom` or `left`/`right`):\n- `'flip'`: keep the requested side when it fits; otherwise try the opposite side (`top` and `bottom`, or `left` and `right`).\n- `'shift'`: never change side; keep the requested side and move the popup within the clipping boundary so it stays visible.\n- `'none'`: do not correct side-axis overflow.\n\n`align` controls overflow on the alignment axis (`start`/`center`/`end`):\n- `'flip'`: keep side, but swap `start` and `end` when the requested alignment overflows.\n- `'shift'`: keep side and requested alignment, then nudge the popup along the alignment axis to fit.\n- `'none'`: do not correct alignment-axis overflow.\n\n`fallbackAxisSide` controls fallback behavior on the perpendicular axis when the preferred axis cannot fit:\n- `'start'`: allow perpendicular fallback and try the logical start side first (`top` before `bottom`, or `left` before `right` in LTR).\n- `'end'`: allow perpendicular fallback and try the logical end side first (`bottom` before `top`, or `right` before `left` in LTR).\n- `'none'`: do not fallback to the perpendicular axis.\n\nWhen `side` is `'shift'`, explicitly setting `align` only supports `'shift'` or `'none'`. If `align` is omitted, it defaults to `'flip'`."
|
|
5197
|
+
},
|
|
5198
|
+
"collisionBoundary": {
|
|
5199
|
+
"type": "Boundary",
|
|
5200
|
+
"optional": true,
|
|
5201
|
+
"description": "An element or a rectangle that delimits the area that the popup is confined to."
|
|
5202
|
+
},
|
|
5203
|
+
"collisionPadding": {
|
|
5204
|
+
"type": "Padding",
|
|
5205
|
+
"optional": true,
|
|
5206
|
+
"description": "Additional space to maintain from the edge of the collision boundary."
|
|
5207
|
+
},
|
|
5208
|
+
"disableAnchorTracking": {
|
|
5209
|
+
"type": "boolean",
|
|
5210
|
+
"optional": true,
|
|
5211
|
+
"description": "Whether to disable the popup from tracking any layout shift of its positioning anchor."
|
|
5212
|
+
},
|
|
5213
|
+
"positionMethod": {
|
|
5214
|
+
"type": "enum",
|
|
5215
|
+
"optional": true,
|
|
5216
|
+
"description": "Determines which CSS `position` property to use.",
|
|
5217
|
+
"values": [
|
|
5218
|
+
"absolute",
|
|
5219
|
+
"fixed"
|
|
5220
|
+
]
|
|
5221
|
+
},
|
|
5222
|
+
"side": {
|
|
5223
|
+
"type": "enum",
|
|
5224
|
+
"optional": true,
|
|
5225
|
+
"description": "Which side of the anchor element to align the popup against. May automatically change to avoid collisions.",
|
|
5226
|
+
"values": [
|
|
5227
|
+
"top",
|
|
5228
|
+
"bottom",
|
|
5229
|
+
"left",
|
|
5230
|
+
"right",
|
|
5231
|
+
"inline-end",
|
|
5232
|
+
"inline-start"
|
|
5233
|
+
]
|
|
5234
|
+
},
|
|
5235
|
+
"sideOffset": {
|
|
5236
|
+
"type": "number | OffsetFunction",
|
|
5237
|
+
"optional": true,
|
|
5238
|
+
"description": "Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment.\n\nThe function takes a `data` object parameter with the following properties:\n- `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.\n- `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.\n- `data.side`: which side of the anchor element the positioner is aligned against.\n- `data.align`: how the positioner is aligned relative to the specified side."
|
|
5239
|
+
},
|
|
5240
|
+
"sticky": {
|
|
5241
|
+
"type": "boolean",
|
|
5242
|
+
"optional": true,
|
|
5243
|
+
"description": "Whether to maintain the popup in the viewport after the anchor element was scrolled out of view."
|
|
5244
|
+
},
|
|
5157
5245
|
"className": {
|
|
5158
5246
|
"type": "string",
|
|
5159
5247
|
"optional": true,
|
|
@@ -5270,11 +5358,13 @@
|
|
|
5270
5358
|
"<Select\n label=\"Plan\"\n className=\"w-[200px]\"\n value={value}\n onValueChange={(v) => setValue(v as string | null)}\n items={{\n free: \"Free\",\n pro: \"Pro\",\n business: { label: \"Business\", disabled: true },\n enterprise: { label: \"Enterprise\", disabled: true },\n }}\n />",
|
|
5271
5359
|
"<Select\n label=\"Food\"\n placeholder=\"Pick a food...\"\n className=\"w-[220px]\"\n value={value}\n onValueChange={(v) => setValue(v as Food | null)}\n isItemEqualToValue={(item, val) => item.value === val.value}\n >\n <Select.Group>\n <Select.GroupLabel>Fruits</Select.GroupLabel>\n {foods.fruits.map((food) => (\n <Select.Option key={food.value} value={food}>\n {food.label}\n </Select.Option>\n ))}\n </Select.Group>\n <Select.Separator />\n <Select.Group>\n <Select.GroupLabel>Vegetables</Select.GroupLabel>\n {foods.vegetables.map((food) => (\n <Select.Option key={food.value} value={food}>\n {food.label}\n </Select.Option>\n ))}\n </Select.Group>\n </Select>",
|
|
5272
5360
|
"<Select\n label=\"Server Region\"\n placeholder=\"Select a region...\"\n className=\"w-[260px]\"\n value={value}\n onValueChange={(v) => setValue(v as ServerRegion | null)}\n isItemEqualToValue={(item, val) => item.value === val.value}\n >\n <Select.Group>\n <Select.GroupLabel>Available</Select.GroupLabel>\n {serverRegions.available.map((region) => (\n <Select.Option key={region.value} value={region}>\n {region.label}\n </Select.Option>\n ))}\n </Select.Group>\n <Select.Separator />\n <Select.Group>\n <Select.GroupLabel>Unavailable</Select.GroupLabel>\n {serverRegions.unavailable.map((region) => (\n <Select.Option key={region.value} value={region} disabled>\n {region.label}\n </Select.Option>\n ))}\n </Select.Group>\n </Select>",
|
|
5273
|
-
"<Select\n label=\"Long List Select\"\n description=\"Tests scrolling behavior with many options\"\n placeholder=\"Choose an option...\"\n className=\"w-[220px]\"\n value={value}\n onValueChange={(v) => setValue(v as LongListItem | null)}\n isItemEqualToValue={(item, val) => item.value === val.value}\n >\n {longListItems.map((item) => (\n <Select.Option key={item.value} value={item}>\n {item.label}\n </Select.Option>\n ))}\n </Select>"
|
|
5361
|
+
"<Select\n label=\"Long List Select\"\n description=\"Tests scrolling behavior with many options\"\n placeholder=\"Choose an option...\"\n className=\"w-[220px]\"\n value={value}\n onValueChange={(v) => setValue(v as LongListItem | null)}\n isItemEqualToValue={(item, val) => item.value === val.value}\n >\n {longListItems.map((item) => (\n <Select.Option key={item.value} value={item}>\n {item.label}\n </Select.Option>\n ))}\n </Select>",
|
|
5362
|
+
"<div className=\"grid gap-4 sm:grid-cols-2\">\n <Select\n label=\"side=bottom (default)\"\n className=\"w-[200px]\"\n defaultValue=\"earth\"\n items={planets}\n />\n <Select\n label=\"side=top\"\n side=\"top\"\n className=\"w-[200px]\"\n defaultValue=\"earth\"\n items={planets}\n />\n <Select\n label=\"align=end\"\n align=\"end\"\n className=\"w-[200px]\"\n defaultValue=\"earth\"\n items={planets}\n />\n <Select\n label=\"sideOffset=12\"\n sideOffset={12}\n className=\"w-[200px]\"\n defaultValue=\"earth\"\n items={planets}\n />\n </div>",
|
|
5363
|
+
"<div className=\"flex flex-wrap items-start gap-8\">\n <Select\n label=\"Anchored (default)\"\n description=\"Opens below the trigger\"\n className=\"w-[200px]\"\n defaultValue=\"mars\"\n items={planets}\n />\n <Select\n label=\"Aligned to selection\"\n description=\"Selected option lands on the trigger\"\n alignItemWithTrigger\n className=\"w-[200px]\"\n defaultValue=\"mars\"\n items={planets}\n />\n </div>"
|
|
5274
5364
|
],
|
|
5275
5365
|
"colors": [
|
|
5276
5366
|
"bg-kumo-base",
|
|
5277
|
-
"bg-kumo-
|
|
5367
|
+
"bg-kumo-control",
|
|
5278
5368
|
"bg-kumo-hairline",
|
|
5279
5369
|
"bg-kumo-tint",
|
|
5280
5370
|
"border-kumo-line",
|
|
@@ -5314,7 +5404,7 @@
|
|
|
5314
5404
|
"height": 36,
|
|
5315
5405
|
"paddingX": 12,
|
|
5316
5406
|
"borderRadius": 8,
|
|
5317
|
-
"background": "bg-kumo-
|
|
5407
|
+
"background": "bg-kumo-control",
|
|
5318
5408
|
"text": "text-color-surface",
|
|
5319
5409
|
"ring": "color-border",
|
|
5320
5410
|
"fontSize": 16,
|
|
@@ -5339,7 +5429,7 @@
|
|
|
5339
5429
|
}
|
|
5340
5430
|
},
|
|
5341
5431
|
"popup": {
|
|
5342
|
-
"background": "bg-kumo-
|
|
5432
|
+
"background": "bg-kumo-base",
|
|
5343
5433
|
"ring": "border-kumo-line",
|
|
5344
5434
|
"borderRadius": 8,
|
|
5345
5435
|
"padding": 6
|
|
@@ -6399,7 +6489,7 @@
|
|
|
6399
6489
|
"selected": "Selected row variant"
|
|
6400
6490
|
},
|
|
6401
6491
|
"classes": {
|
|
6402
|
-
"default": "even:bg-kumo-
|
|
6492
|
+
"default": "even:bg-kumo-elevated [--kumo-table-row-bg:var(--color-kumo-base)] even:[--kumo-table-row-bg:var(--color-kumo-elevated)]",
|
|
6403
6493
|
"selected": "bg-kumo-tint [--kumo-table-row-bg:var(--color-kumo-tint)]"
|
|
6404
6494
|
}
|
|
6405
6495
|
},
|
|
@@ -6662,14 +6752,14 @@
|
|
|
6662
6752
|
}
|
|
6663
6753
|
},
|
|
6664
6754
|
"examples": [
|
|
6665
|
-
"<div className=\"flex flex-col gap-6\">\n <div>\n <p className=\"mb-2 text-sm text-kumo-subtle\">Segmented (default)</p>\n <Tabs\n variant=\"segmented\"\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</p>\n <Tabs\n variant=\"underline\"\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>",
|
|
6755
|
+
"<div className=\"flex flex-col items-start gap-6\">\n <div>\n <p className=\"mb-2 text-sm text-kumo-subtle\">Segmented (default)</p>\n <Tabs\n variant=\"segmented\"\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</p>\n <Tabs\n variant=\"underline\"\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>",
|
|
6666
6756
|
"<Tabs\n variant=\"segmented\"\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 />",
|
|
6667
6757
|
"<Tabs\n variant=\"underline\"\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 />",
|
|
6668
6758
|
"<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>",
|
|
6669
6759
|
"<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>",
|
|
6670
6760
|
"<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>",
|
|
6671
6761
|
"<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>",
|
|
6672
|
-
"<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>",
|
|
6762
|
+
"<div className=\"flex flex-col items-start 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>",
|
|
6673
6763
|
"<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 />"
|
|
6674
6764
|
],
|
|
6675
6765
|
"colors": [
|
|
@@ -6775,10 +6865,10 @@
|
|
|
6775
6865
|
"lg": "Large text"
|
|
6776
6866
|
},
|
|
6777
6867
|
"classes": {
|
|
6778
|
-
"xs": "text-xs",
|
|
6779
|
-
"sm": "text-sm",
|
|
6780
|
-
"base": "text-base",
|
|
6781
|
-
"lg": "text-lg"
|
|
6868
|
+
"xs": "text-xs/[inherit]",
|
|
6869
|
+
"sm": "text-sm/[inherit]",
|
|
6870
|
+
"base": "text-base/[inherit]",
|
|
6871
|
+
"lg": "text-lg/[inherit]"
|
|
6782
6872
|
},
|
|
6783
6873
|
"default": "base"
|
|
6784
6874
|
},
|
|
@@ -7219,6 +7309,7 @@
|
|
|
7219
7309
|
"<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>",
|
|
7220
7310
|
"<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>",
|
|
7221
7311
|
"<Toolbar>\n <Toolbar.Button icon={UploadSimpleIcon}>Upload</Toolbar.Button>\n <Toolbar.Button icon={DownloadSimpleIcon}>Download</Toolbar.Button>\n </Toolbar>",
|
|
7312
|
+
"<Toolbar>\n <Toolbar.Link href=\"/components/button\" icon={BookOpenIcon}>\n Button documentation\n </Toolbar.Link>\n <Toolbar.Button icon={DownloadSimpleIcon}>Download</Toolbar.Button>\n </Toolbar>",
|
|
7222
7313
|
"<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>",
|
|
7223
7314
|
"<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>",
|
|
7224
7315
|
"<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>"
|
|
@@ -7234,6 +7325,11 @@
|
|
|
7234
7325
|
"description": "Button sub-component",
|
|
7235
7326
|
"props": {}
|
|
7236
7327
|
},
|
|
7328
|
+
"Link": {
|
|
7329
|
+
"name": "Link",
|
|
7330
|
+
"description": "Link sub-component",
|
|
7331
|
+
"props": {}
|
|
7332
|
+
},
|
|
7237
7333
|
"Input": {
|
|
7238
7334
|
"name": "Input",
|
|
7239
7335
|
"description": "Input sub-component",
|
package/ai/component-registry.md
CHANGED
|
@@ -5627,6 +5627,8 @@ Pagination component
|
|
|
5627
5627
|
Number of items displayed per page.
|
|
5628
5628
|
- `totalCount`: number
|
|
5629
5629
|
Total number of items across all pages.
|
|
5630
|
+
- `hasNextPage`: boolean
|
|
5631
|
+
Whether another page exists when the total count is unknown. Ignored when `totalCount` is provided. Unknown totals use sequential controls only.
|
|
5630
5632
|
- `className`: string
|
|
5631
5633
|
Additional CSS classes for the container
|
|
5632
5634
|
- `labels`: PaginationLabels
|
|
@@ -5708,6 +5710,15 @@ Props:
|
|
|
5708
5710
|
/>
|
|
5709
5711
|
```
|
|
5710
5712
|
|
|
5713
|
+
```tsx
|
|
5714
|
+
<Pagination
|
|
5715
|
+
text={() => `Page ${page}`}
|
|
5716
|
+
page={page}
|
|
5717
|
+
setPage={setPage}
|
|
5718
|
+
hasNextPage={hasNextPage}
|
|
5719
|
+
/>
|
|
5720
|
+
```
|
|
5721
|
+
|
|
5711
5722
|
```tsx
|
|
5712
5723
|
<Pagination
|
|
5713
5724
|
text={({ perPage }: { perPage?: number }) =>
|
|
@@ -6631,6 +6642,63 @@ Select component
|
|
|
6631
6642
|
|
|
6632
6643
|
**Props:**
|
|
6633
6644
|
|
|
6645
|
+
- `align`: enum
|
|
6646
|
+
How to align the popup relative to the specified side.
|
|
6647
|
+
- `alignItemWithTrigger`: boolean
|
|
6648
|
+
Whether the positioner overlaps the trigger so the selected item's text is aligned with the trigger's value text. This only applies to mouse input and is automatically disabled if there is not enough space.
|
|
6649
|
+
- `alignOffset`: number | OffsetFunction
|
|
6650
|
+
Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment.
|
|
6651
|
+
|
|
6652
|
+
The function takes a `data` object parameter with the following properties:
|
|
6653
|
+
- `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
|
|
6654
|
+
- `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
|
|
6655
|
+
- `data.side`: which side of the anchor element the positioner is aligned against.
|
|
6656
|
+
- `data.align`: how the positioner is aligned relative to the specified side.
|
|
6657
|
+
- `anchor`: ReactNode
|
|
6658
|
+
An element to position the popup against. By default, the popup will be positioned against the trigger.
|
|
6659
|
+
- `arrowPadding`: number
|
|
6660
|
+
Minimum distance to maintain between the arrow and the edges of the popup.
|
|
6661
|
+
|
|
6662
|
+
Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
|
|
6663
|
+
- `collisionAvoidance`: CollisionAvoidance
|
|
6664
|
+
Determines how to handle collisions when positioning the popup.
|
|
6665
|
+
|
|
6666
|
+
`side` controls overflow on the preferred placement axis (`top`/`bottom` or `left`/`right`):
|
|
6667
|
+
- `'flip'`: keep the requested side when it fits; otherwise try the opposite side (`top` and `bottom`, or `left` and `right`).
|
|
6668
|
+
- `'shift'`: never change side; keep the requested side and move the popup within the clipping boundary so it stays visible.
|
|
6669
|
+
- `'none'`: do not correct side-axis overflow.
|
|
6670
|
+
|
|
6671
|
+
`align` controls overflow on the alignment axis (`start`/`center`/`end`):
|
|
6672
|
+
- `'flip'`: keep side, but swap `start` and `end` when the requested alignment overflows.
|
|
6673
|
+
- `'shift'`: keep side and requested alignment, then nudge the popup along the alignment axis to fit.
|
|
6674
|
+
- `'none'`: do not correct alignment-axis overflow.
|
|
6675
|
+
|
|
6676
|
+
`fallbackAxisSide` controls fallback behavior on the perpendicular axis when the preferred axis cannot fit:
|
|
6677
|
+
- `'start'`: allow perpendicular fallback and try the logical start side first (`top` before `bottom`, or `left` before `right` in LTR).
|
|
6678
|
+
- `'end'`: allow perpendicular fallback and try the logical end side first (`bottom` before `top`, or `right` before `left` in LTR).
|
|
6679
|
+
- `'none'`: do not fallback to the perpendicular axis.
|
|
6680
|
+
|
|
6681
|
+
When `side` is `'shift'`, explicitly setting `align` only supports `'shift'` or `'none'`. If `align` is omitted, it defaults to `'flip'`.
|
|
6682
|
+
- `collisionBoundary`: Boundary
|
|
6683
|
+
An element or a rectangle that delimits the area that the popup is confined to.
|
|
6684
|
+
- `collisionPadding`: Padding
|
|
6685
|
+
Additional space to maintain from the edge of the collision boundary.
|
|
6686
|
+
- `disableAnchorTracking`: boolean
|
|
6687
|
+
Whether to disable the popup from tracking any layout shift of its positioning anchor.
|
|
6688
|
+
- `positionMethod`: enum
|
|
6689
|
+
Determines which CSS `position` property to use.
|
|
6690
|
+
- `side`: enum
|
|
6691
|
+
Which side of the anchor element to align the popup against. May automatically change to avoid collisions.
|
|
6692
|
+
- `sideOffset`: number | OffsetFunction
|
|
6693
|
+
Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment.
|
|
6694
|
+
|
|
6695
|
+
The function takes a `data` object parameter with the following properties:
|
|
6696
|
+
- `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
|
|
6697
|
+
- `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
|
|
6698
|
+
- `data.side`: which side of the anchor element the positioner is aligned against.
|
|
6699
|
+
- `data.align`: how the positioner is aligned relative to the specified side.
|
|
6700
|
+
- `sticky`: boolean
|
|
6701
|
+
Whether to maintain the popup in the viewport after the anchor element was scrolled out of view.
|
|
6634
6702
|
- `className`: string
|
|
6635
6703
|
Additional CSS classes merged via `cn()`.
|
|
6636
6704
|
- `render`: ReactNode
|
|
@@ -6671,7 +6739,7 @@ Select component
|
|
|
6671
6739
|
|
|
6672
6740
|
**Colors (kumo tokens used):**
|
|
6673
6741
|
|
|
6674
|
-
`bg-kumo-base`, `bg-kumo-
|
|
6742
|
+
`bg-kumo-base`, `bg-kumo-control`, `bg-kumo-hairline`, `bg-kumo-tint`, `border-kumo-line`, `ring-kumo-brand`, `ring-kumo-danger`, `ring-kumo-focus`, `ring-kumo-line`, `text-kumo-danger`, `text-kumo-default`, `text-kumo-placeholder`, `text-kumo-subtle`
|
|
6675
6743
|
|
|
6676
6744
|
**Styling:**
|
|
6677
6745
|
|
|
@@ -7015,6 +7083,58 @@ Separator sub-component
|
|
|
7015
7083
|
</Select>
|
|
7016
7084
|
```
|
|
7017
7085
|
|
|
7086
|
+
```tsx
|
|
7087
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
7088
|
+
<Select
|
|
7089
|
+
label="side=bottom (default)"
|
|
7090
|
+
className="w-[200px]"
|
|
7091
|
+
defaultValue="earth"
|
|
7092
|
+
items={planets}
|
|
7093
|
+
/>
|
|
7094
|
+
<Select
|
|
7095
|
+
label="side=top"
|
|
7096
|
+
side="top"
|
|
7097
|
+
className="w-[200px]"
|
|
7098
|
+
defaultValue="earth"
|
|
7099
|
+
items={planets}
|
|
7100
|
+
/>
|
|
7101
|
+
<Select
|
|
7102
|
+
label="align=end"
|
|
7103
|
+
align="end"
|
|
7104
|
+
className="w-[200px]"
|
|
7105
|
+
defaultValue="earth"
|
|
7106
|
+
items={planets}
|
|
7107
|
+
/>
|
|
7108
|
+
<Select
|
|
7109
|
+
label="sideOffset=12"
|
|
7110
|
+
sideOffset={12}
|
|
7111
|
+
className="w-[200px]"
|
|
7112
|
+
defaultValue="earth"
|
|
7113
|
+
items={planets}
|
|
7114
|
+
/>
|
|
7115
|
+
</div>
|
|
7116
|
+
```
|
|
7117
|
+
|
|
7118
|
+
```tsx
|
|
7119
|
+
<div className="flex flex-wrap items-start gap-8">
|
|
7120
|
+
<Select
|
|
7121
|
+
label="Anchored (default)"
|
|
7122
|
+
description="Opens below the trigger"
|
|
7123
|
+
className="w-[200px]"
|
|
7124
|
+
defaultValue="mars"
|
|
7125
|
+
items={planets}
|
|
7126
|
+
/>
|
|
7127
|
+
<Select
|
|
7128
|
+
label="Aligned to selection"
|
|
7129
|
+
description="Selected option lands on the trigger"
|
|
7130
|
+
alignItemWithTrigger
|
|
7131
|
+
className="w-[200px]"
|
|
7132
|
+
defaultValue="mars"
|
|
7133
|
+
items={planets}
|
|
7134
|
+
/>
|
|
7135
|
+
</div>
|
|
7136
|
+
```
|
|
7137
|
+
|
|
7018
7138
|
|
|
7019
7139
|
---
|
|
7020
7140
|
|
|
@@ -9078,7 +9198,7 @@ Tab navigation component with segmented or underline style. Built on Base UI Tab
|
|
|
9078
9198
|
**Examples:**
|
|
9079
9199
|
|
|
9080
9200
|
```tsx
|
|
9081
|
-
<div className="flex flex-col gap-6">
|
|
9201
|
+
<div className="flex flex-col items-start gap-6">
|
|
9082
9202
|
<div>
|
|
9083
9203
|
<p className="mb-2 text-sm text-kumo-subtle">Segmented (default)</p>
|
|
9084
9204
|
<Tabs
|
|
@@ -9172,7 +9292,7 @@ Tab navigation component with segmented or underline style. Built on Base UI Tab
|
|
|
9172
9292
|
```
|
|
9173
9293
|
|
|
9174
9294
|
```tsx
|
|
9175
|
-
<div className="flex flex-col gap-6">
|
|
9295
|
+
<div className="flex flex-col items-start gap-6">
|
|
9176
9296
|
<div>
|
|
9177
9297
|
<p className="mb-2 text-sm text-kumo-subtle">Segmented sm</p>
|
|
9178
9298
|
<Tabs
|
|
@@ -9903,6 +10023,10 @@ This is a compound component. Use these sub-components:
|
|
|
9903
10023
|
|
|
9904
10024
|
Button sub-component
|
|
9905
10025
|
|
|
10026
|
+
#### Toolbar.Link
|
|
10027
|
+
|
|
10028
|
+
Link sub-component
|
|
10029
|
+
|
|
9906
10030
|
#### Toolbar.Input
|
|
9907
10031
|
|
|
9908
10032
|
Input sub-component
|
|
@@ -9961,6 +10085,15 @@ InputGroup sub-component
|
|
|
9961
10085
|
</Toolbar>
|
|
9962
10086
|
```
|
|
9963
10087
|
|
|
10088
|
+
```tsx
|
|
10089
|
+
<Toolbar>
|
|
10090
|
+
<Toolbar.Link href="/components/button" icon={BookOpenIcon}>
|
|
10091
|
+
Button documentation
|
|
10092
|
+
</Toolbar.Link>
|
|
10093
|
+
<Toolbar.Button icon={DownloadSimpleIcon}>Download</Toolbar.Button>
|
|
10094
|
+
</Toolbar>
|
|
10095
|
+
```
|
|
10096
|
+
|
|
9964
10097
|
```tsx
|
|
9965
10098
|
<Toolbar className="w-full max-w-lg">
|
|
9966
10099
|
<Toolbar.Input
|
package/ai/schemas.ts
CHANGED
|
@@ -704,6 +704,7 @@ export const PaginationPropsSchema = z.object({
|
|
|
704
704
|
page: z.number().optional(), // Current page number (1-indexed).
|
|
705
705
|
perPage: z.number().optional(), // Number of items displayed per page.
|
|
706
706
|
totalCount: z.number().optional(), // Total number of items across all pages.
|
|
707
|
+
hasNextPage: z.boolean().optional(), // Whether another page exists when the total count is unknown. Ignored when `totalCount` is provided. Unknown totals use sequential controls only.
|
|
707
708
|
className: z.string().optional(), // Additional CSS classes for the container
|
|
708
709
|
labels: z.unknown().optional(), // Labels for internationalization of aria-labels. All labels have English defaults. For visible text like "Showing X of Y", use render props on sub-components: - `Pagination.Info` children for the info text - `Pagination.PageSize` label prop for the "Per page:" text
|
|
709
710
|
children: z.union([z.string(), z.number(), z.boolean(), z.null(), DynamicValueSchema]).optional(), // Compound component children for custom layouts. Use Pagination.Info, Pagination.PageSize, Pagination.Controls, and Pagination.Separator.
|
|
@@ -754,6 +755,19 @@ export const SankeyChartPropsSchema = z.object({
|
|
|
754
755
|
});
|
|
755
756
|
|
|
756
757
|
export const SelectPropsSchema = z.object({
|
|
758
|
+
align: z.enum(["start", "center", "end"]).optional(), // How to align the popup relative to the specified side.
|
|
759
|
+
alignItemWithTrigger: z.boolean().optional(), // Whether the positioner overlaps the trigger so the selected item's text is aligned with the trigger's value text. This only applies to mouse input and is automatically disabled if there is not enough space.
|
|
760
|
+
alignOffset: z.unknown().optional(), // Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a `data` object parameter with the following properties: - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`. - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`. - `data.side`: which side of the anchor element the positioner is aligned against. - `data.align`: how the positioner is aligned relative to the specified side.
|
|
761
|
+
anchor: z.union([z.string(), z.number(), z.boolean(), z.null(), DynamicValueSchema]).optional(), // An element to position the popup against. By default, the popup will be positioned against the trigger.
|
|
762
|
+
arrowPadding: z.number().optional(), // Minimum distance to maintain between the arrow and the edges of the popup. Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
|
|
763
|
+
collisionAvoidance: z.unknown().optional(), // Determines how to handle collisions when positioning the popup. `side` controls overflow on the preferred placement axis (`top`/`bottom` or `left`/`right`): - `'flip'`: keep the requested side when it fits; otherwise try the opposite side (`top` and `bottom`, or `left` and `right`). - `'shift'`: never change side; keep the requested side and move the popup within the clipping boundary so it stays visible. - `'none'`: do not correct side-axis overflow. `align` controls overflow on the alignment axis (`start`/`center`/`end`): - `'flip'`: keep side, but swap `start` and `end` when the requested alignment overflows. - `'shift'`: keep side and requested alignment, then nudge the popup along the alignment axis to fit. - `'none'`: do not correct alignment-axis overflow. `fallbackAxisSide` controls fallback behavior on the perpendicular axis when the preferred axis cannot fit: - `'start'`: allow perpendicular fallback and try the logical start side first (`top` before `bottom`, or `left` before `right` in LTR). - `'end'`: allow perpendicular fallback and try the logical end side first (`bottom` before `top`, or `right` before `left` in LTR). - `'none'`: do not fallback to the perpendicular axis. When `side` is `'shift'`, explicitly setting `align` only supports `'shift'` or `'none'`. If `align` is omitted, it defaults to `'flip'`.
|
|
764
|
+
collisionBoundary: z.unknown().optional(), // An element or a rectangle that delimits the area that the popup is confined to.
|
|
765
|
+
collisionPadding: z.unknown().optional(), // Additional space to maintain from the edge of the collision boundary.
|
|
766
|
+
disableAnchorTracking: z.boolean().optional(), // Whether to disable the popup from tracking any layout shift of its positioning anchor.
|
|
767
|
+
positionMethod: z.enum(["absolute", "fixed"]).optional(), // Determines which CSS `position` property to use.
|
|
768
|
+
side: z.enum(["top", "bottom", "left", "right", "inline-end", "inline-start"]).optional(), // Which side of the anchor element to align the popup against. May automatically change to avoid collisions.
|
|
769
|
+
sideOffset: z.unknown().optional(), // Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a `data` object parameter with the following properties: - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`. - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`. - `data.side`: which side of the anchor element the positioner is aligned against. - `data.align`: how the positioner is aligned relative to the specified side.
|
|
770
|
+
sticky: z.boolean().optional(), // Whether to maintain the popup in the viewport after the anchor element was scrolled out of view.
|
|
757
771
|
className: z.string().optional(), // Additional CSS classes merged via `cn()`.
|
|
758
772
|
render: z.union([z.string(), z.number(), z.boolean(), z.null(), DynamicValueSchema]).optional(), // Replaces the trigger element while preserving Select behavior.
|
|
759
773
|
size: z.enum(["xs", "sm", "base", "lg"]).optional(), // Size of the select trigger. Matches Input component sizes.
|
package/dist/.build-complete
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1788464828746
|
package/dist/ai/schemas.d.ts
CHANGED
|
@@ -966,6 +966,7 @@ declare const PaginationPropsSchema: z.ZodObject<{
|
|
|
966
966
|
page: z.ZodOptional<z.ZodNumber>;
|
|
967
967
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
968
968
|
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
969
|
+
hasNextPage: z.ZodOptional<z.ZodBoolean>;
|
|
969
970
|
className: z.ZodOptional<z.ZodString>;
|
|
970
971
|
labels: z.ZodOptional<z.ZodUnknown>;
|
|
971
972
|
children: 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<{
|
|
@@ -1029,6 +1030,35 @@ declare const SankeyChartPropsSchema: z.ZodObject<{
|
|
|
1029
1030
|
isDarkMode: z.ZodOptional<z.ZodBoolean>;
|
|
1030
1031
|
}, z.core.$strip>;
|
|
1031
1032
|
declare const SelectPropsSchema: z.ZodObject<{
|
|
1033
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
1034
|
+
start: "start";
|
|
1035
|
+
end: "end";
|
|
1036
|
+
center: "center";
|
|
1037
|
+
}>>;
|
|
1038
|
+
alignItemWithTrigger: z.ZodOptional<z.ZodBoolean>;
|
|
1039
|
+
alignOffset: z.ZodOptional<z.ZodUnknown>;
|
|
1040
|
+
anchor: 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<{
|
|
1041
|
+
path: z.ZodString;
|
|
1042
|
+
}, z.core.$strip>]>]>>;
|
|
1043
|
+
arrowPadding: z.ZodOptional<z.ZodNumber>;
|
|
1044
|
+
collisionAvoidance: z.ZodOptional<z.ZodUnknown>;
|
|
1045
|
+
collisionBoundary: z.ZodOptional<z.ZodUnknown>;
|
|
1046
|
+
collisionPadding: z.ZodOptional<z.ZodUnknown>;
|
|
1047
|
+
disableAnchorTracking: z.ZodOptional<z.ZodBoolean>;
|
|
1048
|
+
positionMethod: z.ZodOptional<z.ZodEnum<{
|
|
1049
|
+
absolute: "absolute";
|
|
1050
|
+
fixed: "fixed";
|
|
1051
|
+
}>>;
|
|
1052
|
+
side: z.ZodOptional<z.ZodEnum<{
|
|
1053
|
+
right: "right";
|
|
1054
|
+
top: "top";
|
|
1055
|
+
bottom: "bottom";
|
|
1056
|
+
left: "left";
|
|
1057
|
+
"inline-end": "inline-end";
|
|
1058
|
+
"inline-start": "inline-start";
|
|
1059
|
+
}>>;
|
|
1060
|
+
sideOffset: z.ZodOptional<z.ZodUnknown>;
|
|
1061
|
+
sticky: z.ZodOptional<z.ZodBoolean>;
|
|
1032
1062
|
className: z.ZodOptional<z.ZodString>;
|
|
1033
1063
|
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<{
|
|
1034
1064
|
path: z.ZodString;
|
|
@@ -2279,6 +2309,7 @@ declare const ComponentPropsSchemas: {
|
|
|
2279
2309
|
page: z.ZodOptional<z.ZodNumber>;
|
|
2280
2310
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
2281
2311
|
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
2312
|
+
hasNextPage: z.ZodOptional<z.ZodBoolean>;
|
|
2282
2313
|
className: z.ZodOptional<z.ZodString>;
|
|
2283
2314
|
labels: z.ZodOptional<z.ZodUnknown>;
|
|
2284
2315
|
children: 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<{
|
|
@@ -2342,6 +2373,35 @@ declare const ComponentPropsSchemas: {
|
|
|
2342
2373
|
isDarkMode: z.ZodOptional<z.ZodBoolean>;
|
|
2343
2374
|
}, z.core.$strip>;
|
|
2344
2375
|
readonly Select: z.ZodObject<{
|
|
2376
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
2377
|
+
start: "start";
|
|
2378
|
+
end: "end";
|
|
2379
|
+
center: "center";
|
|
2380
|
+
}>>;
|
|
2381
|
+
alignItemWithTrigger: z.ZodOptional<z.ZodBoolean>;
|
|
2382
|
+
alignOffset: z.ZodOptional<z.ZodUnknown>;
|
|
2383
|
+
anchor: 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<{
|
|
2384
|
+
path: z.ZodString;
|
|
2385
|
+
}, z.core.$strip>]>]>>;
|
|
2386
|
+
arrowPadding: z.ZodOptional<z.ZodNumber>;
|
|
2387
|
+
collisionAvoidance: z.ZodOptional<z.ZodUnknown>;
|
|
2388
|
+
collisionBoundary: z.ZodOptional<z.ZodUnknown>;
|
|
2389
|
+
collisionPadding: z.ZodOptional<z.ZodUnknown>;
|
|
2390
|
+
disableAnchorTracking: z.ZodOptional<z.ZodBoolean>;
|
|
2391
|
+
positionMethod: z.ZodOptional<z.ZodEnum<{
|
|
2392
|
+
absolute: "absolute";
|
|
2393
|
+
fixed: "fixed";
|
|
2394
|
+
}>>;
|
|
2395
|
+
side: z.ZodOptional<z.ZodEnum<{
|
|
2396
|
+
right: "right";
|
|
2397
|
+
top: "top";
|
|
2398
|
+
bottom: "bottom";
|
|
2399
|
+
left: "left";
|
|
2400
|
+
"inline-end": "inline-end";
|
|
2401
|
+
"inline-start": "inline-start";
|
|
2402
|
+
}>>;
|
|
2403
|
+
sideOffset: z.ZodOptional<z.ZodUnknown>;
|
|
2404
|
+
sticky: z.ZodOptional<z.ZodBoolean>;
|
|
2345
2405
|
className: z.ZodOptional<z.ZodString>;
|
|
2346
2406
|
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<{
|
|
2347
2407
|
path: z.ZodString;
|