@cloudflare/kumo 2.16.0 → 2.17.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 +21 -0
- package/ai/component-registry.json +33 -7
- package/ai/component-registry.md +58 -3
- package/ai/schemas.ts +1 -0
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +2 -0
- package/dist/ai/schemas.js +1 -0
- package/dist/chunks/{autocomplete-ht782okfv7nv75mq.js → autocomplete-evlm6fj7v7w0g2z2.js} +2 -2
- package/dist/chunks/{banner-cpla8vqjxaulggyd.js → banner-lvbgdzxq3yndkbot.js} +1 -1
- package/dist/chunks/{breadcrumbs-oyuqwb09l08uhok2.js → breadcrumbs-fsuyq7z6hdh1thjv.js} +1 -1
- package/dist/chunks/{button-oxy32x5w9x9az80g.js → button-k7axs4vu1rwx89w3.js} +1 -1
- package/dist/chunks/{checkbox-o9627970y7c9ciqy.js → checkbox-g8b4f2hs5vux3u26.js} +1 -1
- package/dist/chunks/{clipboard-text-c0ad6lzyxauxduv1.js → clipboard-text-fffd5tpa0iye6r6m.js} +17 -6
- package/dist/chunks/{combobox-kgf0gmniahm15n81.js → combobox-iawd8lxwd5b18fce.js} +2 -2
- package/dist/chunks/{date-picker-oee5ehsrepnlmltj.js → date-picker-kfoxd4u7ckg4nsez.js} +78 -6
- package/dist/chunks/{empty-ft85jcbs7fd5t3tn.js → empty-ir5bg5w4kkisuc1c.js} +1 -1
- package/dist/chunks/{field-jzzlgre0jmrr38o2.js → field-n7gmbg5xvh6oqbom.js} +7 -2
- package/dist/chunks/{input-jk86hoj6nqfhl5u8.js → input-f0pbcvjudf5zb8ek.js} +1 -1
- package/dist/chunks/{input-group-hc2qp3m6gsfomqvr.js → input-group-dqo5tcoewbdx86qx.js} +4 -4
- package/dist/chunks/{input-jsnp6etq7rbjjj9e.js → input-iev3wgdzhkqpae2k.js} +2 -2
- package/dist/chunks/{label-hugrtzreeqk5mtqu.js → label-njfcj6h9utmg2n9l.js} +2 -2
- package/dist/chunks/{layer-dialog-dwrrgv1wasrerow4.js → layer-dialog-n7foup6icxowm82n.js} +11 -3
- package/dist/chunks/{menubar-m5pqhx7lu5z7mkks.js → menubar-b454nksysu0wicbz.js} +1 -1
- package/dist/chunks/{pagination-nyknrk1lyexwgyrx.js → pagination-mwlpbysq4cxmvs45.js} +2 -2
- package/dist/chunks/{select-owq85889zm4y23ws.js → select-fae2ls189jrq902h.js} +4 -4
- package/dist/chunks/{sensitive-input-nzwvjuwlpb51ze04.js → sensitive-input-heb3xapwahzhpq6y.js} +2 -2
- package/dist/chunks/{sidebar-gluq5b5oacrdk4m4.js → sidebar-h6g412ror8p7uo0d.js} +3 -3
- package/dist/chunks/{switch-mqf1ulvle4nd6d2t.js → switch-ktfauhluw1yi5tkk.js} +1 -1
- package/dist/chunks/{table-nysse5tiwf47gg4k.js → table-lp41fsw7mqr751hn.js} +1 -1
- package/dist/chunks/{tag-input-fjfzlsaxmnqee7dk.js → tag-input-k6vzllby4qebmv63.js} +4 -4
- package/dist/chunks/{toast-b4t9rt9y1sumcmy2.js → toast-kzwscia42707sau6.js} +60 -52
- package/dist/chunks/{toolbar-l9laewk5jvf4u0si.js → toolbar-nnos2ouwfk7i6tpw.js} +3 -3
- package/dist/chunks/{tooltip-lguwh8bjhxwnjfus.js → tooltip-bcymn9bfyz29fvji.js} +2 -0
- 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.d.ts +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-picker.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/layer-dialog.d.ts +1 -1
- package/dist/components/layer-dialog.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/pagination.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/switch.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tag-input.js +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toolbar.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/{index-DJIRVD5B.d.ts → index-CReGk3Dc.d.ts} +6 -0
- package/dist/{index-5bJAnzUo.d.ts → index-Dmbgjww7.d.ts} +1 -0
- package/dist/{index-DNsSKNUe.d.ts → index-bBPKMepR.d.ts} +4 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +26 -26
- package/dist/styles/kumo-binding.css +159 -0
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/styles/kumo.css +0 -545
- package/package.json +1 -1
- package/scripts/format-generated.ts +12 -0
- package/scripts/generate-primitives.ts +16 -12
- package/scripts/theme-generator/index.ts +2 -2
- package/dist/index-DhOvcB0m.d.ts +0 -60
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @cloudflare/kumo
|
|
2
2
|
|
|
3
|
+
## 2.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c2b2fc4: Add a `masked` option to `ClipboardText` for sensitive values that should be hidden initially and revealed on demand.
|
|
8
|
+
- 7d1c776: Refresh DatePicker's styling. Days are 32px squares in 36px columns with 8px between weeks and 14px text, and the previous and next buttons are borderless squares that match the days. Two-month views sit side by side, range bands are rounded at their ends and where weeks wrap, and month and year dropdowns (`captionLayout="dropdown"`) are styled.
|
|
9
|
+
|
|
10
|
+
DatePicker now uses Kumo tokens instead of hard-coded colors, so it follows the active theme, and `@cloudflare/kumo/styles/standalone` now styles it too. Month-change animations respect `prefers-reduced-motion`.
|
|
11
|
+
|
|
12
|
+
The `.rdp-*` rules and `--rdp-*` variables in `kumo.css` are gone, apart from the month-change animations. If you customized DatePicker through them, use the `classNames` prop instead.
|
|
13
|
+
|
|
14
|
+
- 40eaa25: Fix the toast bump animation cutting off a toast's slide-in when the same `id` is added again while the toast is still entering. Duplicate adds through `createKumoToastManager()` now bump too, and toast motion respects `prefers-reduced-motion`. Toast surface styles now live on an inner `[data-kumo-part="surface"]` element instead of the `role="dialog"` root.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 06726b0: `Field` no longer renders a `<label>` when it would be empty: when `label` and `labelTooltip` are each `undefined`, `null`, a boolean or `""`, and there is no "(optional)" indicator. This fixes `Input`, `InputArea` and `TagInput` without a `label` but with a description or error: they no longer show an empty row above the control, and their `aria-label` is no longer replaced by an empty accessible name.
|
|
19
|
+
- 595463b: Format generated primitive and theme files with Oxfmt so codegen does not create formatting-only changes.
|
|
20
|
+
- 3aa0d59: Hide the native scrollbars of the LayerDialog body and Sidebar content with Kumo's own CSS. Base UI only hides them with a style element it injects into the document head, so client routers that swap the head (such as Astro's ClientRouter) or a Content Security Policy that blocks inline styles could leave empty scrollbar tracks along the dialog body.
|
|
21
|
+
- 890a6ab: Add a full-width `LayerDialog.Separator` for dividing sections of dialog body content.
|
|
22
|
+
- 4185bb1: `Tooltip` now keeps its own trigger out of the tab order while the tooltip is `disabled`. This applies only when Kumo renders the trigger (no `render` or `asChild`), for example around truncated `Text` that needs a tooltip only when it overflows. A disabled tooltip there has nothing to reveal, so keyboard users no longer stop on it. Custom triggers passed through `render` keep their own focus behavior.
|
|
23
|
+
|
|
3
24
|
## 2.16.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -1362,6 +1362,11 @@
|
|
|
1362
1362
|
"optional": true,
|
|
1363
1363
|
"description": "If provided, this text will be copied to clipboard instead of the `text` prop."
|
|
1364
1364
|
},
|
|
1365
|
+
"masked": {
|
|
1366
|
+
"type": "boolean",
|
|
1367
|
+
"optional": true,
|
|
1368
|
+
"description": "Masks the text initially and adds a control to reveal or hide it."
|
|
1369
|
+
},
|
|
1365
1370
|
"className": {
|
|
1366
1371
|
"type": "string",
|
|
1367
1372
|
"optional": true,
|
|
@@ -1382,6 +1387,7 @@
|
|
|
1382
1387
|
"<ClipboardText text=\"0c239dd2\" />",
|
|
1383
1388
|
"<ClipboardText text=\"abc123\" />",
|
|
1384
1389
|
"<ClipboardText text=\"sk_live_51H8...\" />",
|
|
1390
|
+
"<div className=\"w-full max-w-xs\">\n <ClipboardText className=\"w-full\" text=\"sk_live_51H8_abc123\" masked />\n </div>",
|
|
1385
1391
|
"<ClipboardText\n text=\"sk_live_***********\"\n textToCopy=\"sk_live_51H8_abc123\"\n />",
|
|
1386
1392
|
"<ClipboardText text=\"https://example.com/very/long/url/path\" />",
|
|
1387
1393
|
"<ClipboardText\n text=\"npx kumo add button\"\n tooltip={{ text: \"Copy\", copiedText: \"Copied!\", side: \"top\" }}\n />"
|
|
@@ -3111,17 +3117,29 @@
|
|
|
3111
3117
|
}
|
|
3112
3118
|
},
|
|
3113
3119
|
"examples": [
|
|
3114
|
-
"<div className=\"flex flex-col gap-4\">\n <DatePicker\n mode=\"single\"\n selected={date}\n onChange={(d) => {\n if (d) {\n setDate(d);\n }\n }}\n />\n <p className=\"text-sm text-kumo-subtle\">\n Selected: {date ? date.toLocaleDateString() : \"None\"}\n </p>\n </div>",
|
|
3115
|
-
"<div className=\"flex flex-col gap-4\">\n <DatePicker\n mode=\"multiple\"\n selected={dates}\n onChange={setDates}\n max={5}\n />\n <p className=\"text-sm text-kumo-subtle\">\n Selected: {dates?.length ?? 0} date(s)\n </p>\n </div>",
|
|
3116
|
-
"<div className=\"flex flex-col gap-4\">\n <DatePicker\n mode=\"range\"\n selected={range}\n onChange={setRange}\n numberOfMonths={2}\n />\n <p className=\"text-sm text-kumo-subtle\">\n Range:{\" \"}\n {range?.from\n ? `${range.from.toLocaleDateString()} - ${range.to?.toLocaleDateString() ?? \"...\"}`\n : \"None\"}\n </p>\n </div>",
|
|
3117
|
-
"<div className=\"flex flex-col gap-4\">\n <DatePicker\n mode=\"range\"\n selected={range}\n onChange={setRange}\n min={3}\n max={7}\n footer={\n <span className=\"text-xs text-kumo-subtle\">Select 3-7 nights</span>\n }\n />\n </div>",
|
|
3120
|
+
"<div className=\"flex flex-col gap-4\">\n <DatePicker\n className=\"p-3\"\n mode=\"single\"\n selected={date}\n onChange={(d) => {\n if (d) {\n setDate(d);\n }\n }}\n />\n <p className=\"text-sm text-kumo-subtle\">\n Selected: {date ? date.toLocaleDateString() : \"None\"}\n </p>\n </div>",
|
|
3121
|
+
"<div className=\"flex flex-col gap-4\">\n <DatePicker\n className=\"p-3\"\n mode=\"multiple\"\n selected={dates}\n onChange={setDates}\n max={5}\n />\n <p className=\"text-sm text-kumo-subtle\">\n Selected: {dates?.length ?? 0} date(s)\n </p>\n </div>",
|
|
3122
|
+
"<div className=\"flex flex-col gap-4\">\n <DatePicker\n className=\"p-3\"\n mode=\"range\"\n selected={range}\n onChange={setRange}\n numberOfMonths={2}\n />\n <p className=\"text-sm text-kumo-subtle\">\n Range:{\" \"}\n {range?.from\n ? `${range.from.toLocaleDateString()} - ${range.to?.toLocaleDateString() ?? \"...\"}`\n : \"None\"}\n </p>\n </div>",
|
|
3123
|
+
"<div className=\"flex flex-col gap-4\">\n <DatePicker\n className=\"p-3\"\n mode=\"range\"\n selected={range}\n onChange={setRange}\n min={3}\n max={7}\n footer={\n <span className=\"text-xs text-kumo-subtle\">Select 3-7 nights</span>\n }\n />\n </div>",
|
|
3124
|
+
"<DatePicker\n className=\"p-3\"\n mode=\"single\"\n selected={date}\n onChange={setDate}\n captionLayout=\"dropdown\"\n startMonth={new Date(2020, 0)}\n endMonth={new Date(2030, 11)}\n />",
|
|
3118
3125
|
"<Popover>\n <Popover.Trigger\n render={<Button variant=\"outline\" icon={CalendarDotsIcon} />}\n >\n {date ? date.toLocaleDateString() : \"Pick a date\"}\n </Popover.Trigger>\n <Popover.Content className=\"p-3\">\n <DatePicker mode=\"single\" selected={date} onChange={setDate} />\n </Popover.Content>\n </Popover>",
|
|
3119
3126
|
"<Popover>\n <Popover.Trigger\n render={<Button variant=\"outline\" icon={CalendarDotsIcon} />}\n >\n {formatRange()}\n </Popover.Trigger>\n <Popover.Content className=\"p-3\">\n <DatePicker\n mode=\"range\"\n selected={range}\n onChange={setRange}\n numberOfMonths={2}\n />\n </Popover.Content>\n </Popover>",
|
|
3120
|
-
"<Popover>\n <Popover.Trigger\n render={<Button variant=\"outline\" icon={CalendarDotsIcon} />}\n >\n {formatRange()}\n </Popover.Trigger>\n <Popover.Content className=\"p-0\">\n <div className=\"flex\">\n <div className=\"flex flex-col gap-1 border-r border-kumo-hairline p-2 text-sm\">\n {presets.map((preset) => {\n const isActive = isPresetActive(preset);\n return (\n <button\n key={preset.label}\n type=\"button\"\n onClick={() => handlePresetClick(preset)}\n className={`rounded-md px-3 py-1.5 text-left whitespace-nowrap ${\n isActive\n ? \"bg-kumo-
|
|
3121
|
-
"<DatePicker\n mode=\"multiple\"\n selected={dates}\n onChange={setDates}\n max={maxDays}\n disabled={unavailableDates}\n fixedWeeks\n footer={\n <p className=\"w-full pt-2 text-xs text-kumo-subtle\">\n {selectedCount}/{maxDays} days selected. Grayed dates are unavailable.\n </p>\n }\n />"
|
|
3127
|
+
"<Popover>\n <Popover.Trigger\n render={<Button variant=\"outline\" icon={CalendarDotsIcon} />}\n >\n {formatRange()}\n </Popover.Trigger>\n <Popover.Content className=\"p-0\">\n <div className=\"flex\">\n <div className=\"flex flex-col gap-1 border-r border-kumo-hairline p-2 text-sm\">\n {presets.map((preset) => {\n const isActive = isPresetActive(preset);\n return (\n <button\n key={preset.label}\n type=\"button\"\n onClick={() => handlePresetClick(preset)}\n className={`rounded-md px-3 py-1.5 text-left whitespace-nowrap ${\n isActive\n ? \"bg-kumo-contrast text-kumo-inverse\"\n : \"text-kumo-subtle hover:bg-kumo-control\"\n }`}\n >\n {preset.label}\n </button>\n );\n })}\n </div>\n <div className=\"p-3\">\n <DatePicker\n mode=\"range\"\n selected={range}\n onChange={setRange}\n month={month}\n onMonthChange={setMonth}\n numberOfMonths={2}\n />\n </div>\n </div>\n </Popover.Content>\n </Popover>",
|
|
3128
|
+
"<DatePicker\n className=\"p-3\"\n mode=\"multiple\"\n selected={dates}\n onChange={setDates}\n max={maxDays}\n disabled={unavailableDates}\n fixedWeeks\n footer={\n <p className=\"w-full pt-2 text-xs text-kumo-subtle\">\n {selectedCount}/{maxDays} days selected. Grayed dates are unavailable.\n </p>\n }\n />"
|
|
3122
3129
|
],
|
|
3123
3130
|
"colors": [
|
|
3124
|
-
"bg-kumo-base"
|
|
3131
|
+
"bg-kumo-base",
|
|
3132
|
+
"bg-kumo-contrast",
|
|
3133
|
+
"bg-kumo-fill",
|
|
3134
|
+
"bg-kumo-interact",
|
|
3135
|
+
"bg-kumo-tint",
|
|
3136
|
+
"ring-kumo-brand",
|
|
3137
|
+
"ring-kumo-line",
|
|
3138
|
+
"text-kumo-default",
|
|
3139
|
+
"text-kumo-inactive",
|
|
3140
|
+
"text-kumo-inverse",
|
|
3141
|
+
"text-kumo-link",
|
|
3142
|
+
"text-kumo-subtle"
|
|
3125
3143
|
]
|
|
3126
3144
|
},
|
|
3127
3145
|
"DateRangePicker": {
|
|
@@ -4636,6 +4654,7 @@
|
|
|
4636
4654
|
"<LayerDialog.Root>\n <LayerDialog.Trigger\n render={(props) => <Button {...props}>Open settings</Button>}\n />\n <LayerDialog.Content>\n <LayerDialog.Title>Configure custom hostname</LayerDialog.Title>\n <LayerDialog.Description>\n Route requests for this hostname to your Worker.\n </LayerDialog.Description>\n <LayerDialog.Body>\n <div className=\"flex flex-col gap-5\">\n <Input\n label=\"Hostname\"\n onChange={(event) => setHostname(event.target.value)}\n value={hostname}\n />\n <Input\n label=\"Display name\"\n onChange={(event) => setName(event.target.value)}\n value={name}\n />\n </div>\n </LayerDialog.Body>\n <LayerDialog.Actions>\n <LayerDialog.Action\n disabled={!hostname || !name}\n onClick={() => undefined}\n >\n Save hostname\n </LayerDialog.Action>\n </LayerDialog.Actions>\n </LayerDialog.Content>\n </LayerDialog.Root>",
|
|
4637
4655
|
"<LayerDialog.Root>\n <LayerDialog.Trigger\n render={(props) => <Button {...props}>Create deployment</Button>}\n />\n <LayerDialog.Content>\n <LayerDialog.Title>Create deployment</LayerDialog.Title>\n <LayerDialog.Description>\n The browser owns the form’s native validation and submission state.\n </LayerDialog.Description>\n <LayerDialog.Body>\n <form\n id={formId}\n className=\"flex flex-col gap-5\"\n onSubmit={(event) => event.preventDefault()}\n >\n <Input\n label=\"Service name\"\n name=\"serviceName\"\n placeholder=\"production-api\"\n required\n />\n <Input\n label=\"Compatibility date\"\n name=\"compatibilityDate\"\n required\n type=\"date\"\n />\n </form>\n </LayerDialog.Body>\n <LayerDialog.Actions dismissLabel=\"Cancel\">\n <LayerDialog.Action form={formId} type=\"submit\">\n Create deployment\n </LayerDialog.Action>\n </LayerDialog.Actions>\n </LayerDialog.Content>\n </LayerDialog.Root>",
|
|
4638
4656
|
"<LayerDialog.Root>\n <LayerDialog.Trigger\n render={(props) => <Button {...props}>Choose a Worker</Button>}\n />\n <LayerDialog.Content>\n <LayerDialog.Title>Choose a Worker</LayerDialog.Title>\n <LayerDialog.Description>\n Select the Worker that handles requests for this route.\n </LayerDialog.Description>\n <LayerDialog.Body>\n <div className=\"flex flex-col gap-3\">\n <Input\n aria-label=\"Search Workers\"\n onChange={(event) => setQuery(event.target.value)}\n placeholder=\"Search Workers\"\n type=\"search\"\n value={query}\n />\n {matches.length > 0 ? (\n <ul className=\"flex flex-col divide-y divide-kumo-hairline rounded-lg border border-kumo-hairline\">\n {matches.map((worker) => (\n <li key={worker} className=\"px-3 py-2 text-kumo-default\">\n {worker}\n </li>\n ))}\n </ul>\n ) : (\n <Text variant=\"secondary\">No Workers match “{query}”.</Text>\n )}\n </div>\n </LayerDialog.Body>\n </LayerDialog.Content>\n </LayerDialog.Root>",
|
|
4657
|
+
"<LayerDialog.Root>\n <LayerDialog.Trigger\n render={(props) => <Button {...props}>Review deployment</Button>}\n />\n <LayerDialog.Content>\n <LayerDialog.Title>Deployment summary</LayerDialog.Title>\n <LayerDialog.Description>\n Review the configuration before deploying.\n </LayerDialog.Description>\n <LayerDialog.Body>\n <Text variant=\"secondary\">\n production-api will deploy to the global network.\n </Text>\n <LayerDialog.Separator />\n <Text variant=\"secondary\">\n The deployment uses compatibility date 2026-10-26.\n </Text>\n </LayerDialog.Body>\n <LayerDialog.Actions>\n <LayerDialog.Action>Deploy</LayerDialog.Action>\n </LayerDialog.Actions>\n </LayerDialog.Content>\n </LayerDialog.Root>",
|
|
4639
4658
|
"<div className=\"flex flex-wrap justify-center gap-3\">\n <LayerDialog.Root>\n <LayerDialog.Trigger\n render={(props) => <Button {...props}>Edit deployment</Button>}\n />\n <LayerDialog.Content>\n <LayerDialog.Title>Save deployment</LayerDialog.Title>\n <LayerDialog.Description>\n Deploy these changes now, or keep them as a draft.\n </LayerDialog.Description>\n <LayerDialog.Body>\n <Text variant=\"secondary\">\n The alternate save outcome is related to the primary action, so it\n lives in its split-button menu rather than as an unrelated footer\n button.\n </Text>\n </LayerDialog.Body>\n <LayerDialog.Actions>\n <LayerDialog.Action\n menu={[\n <DropdownMenu.Item key=\"draft\">\n Save as draft\n </DropdownMenu.Item>,\n ]}\n menuLabel=\"Save options\"\n >\n Save and deploy\n </LayerDialog.Action>\n </LayerDialog.Actions>\n </LayerDialog.Content>\n </LayerDialog.Root>\n\n <LayerDialog.Alert>\n <LayerDialog.Trigger\n render={(props) => (\n <Button {...props} variant=\"secondary\">\n Delete deployment\n </Button>\n )}\n />\n <LayerDialog.Content>\n <LayerDialog.Title>Delete deployment</LayerDialog.Title>\n <LayerDialog.Description>\n This permanently removes the deployment and cannot be undone.\n </LayerDialog.Description>\n <LayerDialog.Body>\n <Text variant=\"secondary\">\n The destructive split button keeps every part of the action,\n including the menu trigger, visually consistent.\n </Text>\n </LayerDialog.Body>\n <LayerDialog.Actions>\n <LayerDialog.Action\n menu={[\n <DropdownMenu.Item key=\"delete-with-tokens\">\n Delete and revoke tokens\n </DropdownMenu.Item>,\n ]}\n menuLabel=\"Delete options\"\n variant=\"destructive\"\n >\n Delete deployment\n </LayerDialog.Action>\n </LayerDialog.Actions>\n </LayerDialog.Content>\n </LayerDialog.Alert>\n </div>",
|
|
4640
4659
|
"<LayerDialog.Root>\n <LayerDialog.Trigger\n render={(props) => <Button {...props}>Edit profile</Button>}\n />\n <LayerDialog.Content>\n <LayerDialog.Title>Edit profile</LayerDialog.Title>\n <LayerDialog.Description>\n Update the profile information shown to your teammates. Changes are\n not saved until you confirm.\n </LayerDialog.Description>\n <LayerDialog.Body>\n <div className=\"flex flex-col gap-5\">\n <Input\n label=\"Display name\"\n onChange={(event) => setName(event.target.value)}\n value={name}\n />\n <Input\n label=\"Email address\"\n onChange={(event) => setEmail(event.target.value)}\n type=\"email\"\n value={email}\n />\n </div>\n </LayerDialog.Body>\n <LayerDialog.Actions dismissLabel=\"Cancel\">\n <LayerDialog.Action\n disabled={!email || !name}\n onClick={() => undefined}\n >\n Save changes\n </LayerDialog.Action>\n </LayerDialog.Actions>\n </LayerDialog.Content>\n </LayerDialog.Root>",
|
|
4641
4660
|
"<LayerDialog.Alert>\n <LayerDialog.Trigger\n render={(props) => (\n <Button variant=\"secondary-destructive\" {...props}>\n Delete Worker\n </Button>\n )}\n />\n <LayerDialog.Content>\n <LayerDialog.Title>Delete Worker</LayerDialog.Title>\n <LayerDialog.Description>\n Deleting{\" \"}\n <strong className=\"font-medium text-kumo-default\">\n {workerName}\n </strong>{\" \"}\n is permanent.\n </LayerDialog.Description>\n <LayerDialog.Body>\n <div className=\"flex flex-col gap-5\">\n <Text variant=\"secondary\">\n This deletes the Worker, deployments, and configuration. If this\n Worker consumes Queues, those connections are removed first.\n Queues, D1 databases, and messages stay in your account.\n </Text>\n <Input\n label={\n <>\n Type{\" \"}\n <strong className=\"font-medium text-kumo-default\">\n {workerName}\n </strong>{\" \"}\n to confirm\n </>\n }\n onChange={(event) => setConfirmation(event.target.value)}\n placeholder={workerName}\n value={confirmation}\n />\n </div>\n </LayerDialog.Body>\n <LayerDialog.Actions>\n <LayerDialog.Action\n disabled={confirmation !== workerName}\n onClick={() => undefined}\n variant=\"destructive\"\n >\n Delete Worker\n </LayerDialog.Action>\n </LayerDialog.Actions>\n </LayerDialog.Content>\n </LayerDialog.Alert>",
|
|
@@ -4651,6 +4670,7 @@
|
|
|
4651
4670
|
"bg-kumo-contrast",
|
|
4652
4671
|
"bg-kumo-elevated",
|
|
4653
4672
|
"bg-kumo-fill",
|
|
4673
|
+
"bg-kumo-hairline",
|
|
4654
4674
|
"bg-kumo-recessed",
|
|
4655
4675
|
"border-kumo-hairline"
|
|
4656
4676
|
],
|
|
@@ -4730,6 +4750,11 @@
|
|
|
4730
4750
|
}
|
|
4731
4751
|
}
|
|
4732
4752
|
},
|
|
4753
|
+
"Separator": {
|
|
4754
|
+
"name": "Separator",
|
|
4755
|
+
"description": "Separator sub-component",
|
|
4756
|
+
"props": {}
|
|
4757
|
+
},
|
|
4733
4758
|
"Action": {
|
|
4734
4759
|
"name": "Action",
|
|
4735
4760
|
"description": "Action sub-component",
|
|
@@ -7892,6 +7917,7 @@
|
|
|
7892
7917
|
"<Toasty>\n <ToastDescriptionOnlyButton />\n </Toasty>",
|
|
7893
7918
|
"<Toasty>\n <ToastSuccessButton />\n </Toasty>",
|
|
7894
7919
|
"<Toasty>\n <ToastMultipleButton />\n </Toasty>",
|
|
7920
|
+
"<Toasty>\n <ToastDeduplicatedButton />\n </Toasty>",
|
|
7895
7921
|
"<Toasty>\n <ToastErrorButton />\n </Toasty>",
|
|
7896
7922
|
"<Toasty>\n <ToastWarningButton />\n </Toasty>",
|
|
7897
7923
|
"<Toasty>\n <ToastInfoButton />\n </Toasty>",
|
package/ai/component-registry.md
CHANGED
|
@@ -1794,6 +1794,8 @@ Read-only text field with a one-click copy-to-clipboard button.
|
|
|
1794
1794
|
The text to display and copy to clipboard.
|
|
1795
1795
|
- `textToCopy`: string
|
|
1796
1796
|
If provided, this text will be copied to clipboard instead of the `text` prop.
|
|
1797
|
+
- `masked`: boolean
|
|
1798
|
+
Masks the text initially and adds a control to reveal or hide it.
|
|
1797
1799
|
- `className`: string
|
|
1798
1800
|
Additional CSS classes merged via `cn()`.
|
|
1799
1801
|
- `tooltip`: object
|
|
@@ -1857,6 +1859,12 @@ Read-only text field with a one-click copy-to-clipboard button.
|
|
|
1857
1859
|
<ClipboardText text="0c239dd2" />
|
|
1858
1860
|
```
|
|
1859
1861
|
|
|
1862
|
+
```tsx
|
|
1863
|
+
<div className="w-full max-w-xs">
|
|
1864
|
+
<ClipboardText className="w-full" text="sk_live_51H8_abc123" masked />
|
|
1865
|
+
</div>
|
|
1866
|
+
```
|
|
1867
|
+
|
|
1860
1868
|
```tsx
|
|
1861
1869
|
<ClipboardText
|
|
1862
1870
|
text="sk_live_***********"
|
|
@@ -3338,13 +3346,14 @@ DatePicker — a date selection calendar.
|
|
|
3338
3346
|
|
|
3339
3347
|
**Colors (kumo tokens used):**
|
|
3340
3348
|
|
|
3341
|
-
`bg-kumo-base`
|
|
3349
|
+
`bg-kumo-base`, `bg-kumo-contrast`, `bg-kumo-fill`, `bg-kumo-interact`, `bg-kumo-tint`, `ring-kumo-brand`, `ring-kumo-line`, `text-kumo-default`, `text-kumo-inactive`, `text-kumo-inverse`, `text-kumo-link`, `text-kumo-subtle`
|
|
3342
3350
|
|
|
3343
3351
|
**Examples:**
|
|
3344
3352
|
|
|
3345
3353
|
```tsx
|
|
3346
3354
|
<div className="flex flex-col gap-4">
|
|
3347
3355
|
<DatePicker
|
|
3356
|
+
className="p-3"
|
|
3348
3357
|
mode="single"
|
|
3349
3358
|
selected={date}
|
|
3350
3359
|
onChange={(d) => {
|
|
@@ -3362,6 +3371,7 @@ DatePicker — a date selection calendar.
|
|
|
3362
3371
|
```tsx
|
|
3363
3372
|
<div className="flex flex-col gap-4">
|
|
3364
3373
|
<DatePicker
|
|
3374
|
+
className="p-3"
|
|
3365
3375
|
mode="multiple"
|
|
3366
3376
|
selected={dates}
|
|
3367
3377
|
onChange={setDates}
|
|
@@ -3376,6 +3386,7 @@ DatePicker — a date selection calendar.
|
|
|
3376
3386
|
```tsx
|
|
3377
3387
|
<div className="flex flex-col gap-4">
|
|
3378
3388
|
<DatePicker
|
|
3389
|
+
className="p-3"
|
|
3379
3390
|
mode="range"
|
|
3380
3391
|
selected={range}
|
|
3381
3392
|
onChange={setRange}
|
|
@@ -3393,6 +3404,7 @@ DatePicker — a date selection calendar.
|
|
|
3393
3404
|
```tsx
|
|
3394
3405
|
<div className="flex flex-col gap-4">
|
|
3395
3406
|
<DatePicker
|
|
3407
|
+
className="p-3"
|
|
3396
3408
|
mode="range"
|
|
3397
3409
|
selected={range}
|
|
3398
3410
|
onChange={setRange}
|
|
@@ -3405,6 +3417,18 @@ DatePicker — a date selection calendar.
|
|
|
3405
3417
|
</div>
|
|
3406
3418
|
```
|
|
3407
3419
|
|
|
3420
|
+
```tsx
|
|
3421
|
+
<DatePicker
|
|
3422
|
+
className="p-3"
|
|
3423
|
+
mode="single"
|
|
3424
|
+
selected={date}
|
|
3425
|
+
onChange={setDate}
|
|
3426
|
+
captionLayout="dropdown"
|
|
3427
|
+
startMonth={new Date(2020, 0)}
|
|
3428
|
+
endMonth={new Date(2030, 11)}
|
|
3429
|
+
/>
|
|
3430
|
+
```
|
|
3431
|
+
|
|
3408
3432
|
```tsx
|
|
3409
3433
|
<Popover>
|
|
3410
3434
|
<Popover.Trigger
|
|
@@ -3455,7 +3479,7 @@ DatePicker — a date selection calendar.
|
|
|
3455
3479
|
onClick={() => handlePresetClick(preset)}
|
|
3456
3480
|
className={`rounded-md px-3 py-1.5 text-left whitespace-nowrap ${
|
|
3457
3481
|
isActive
|
|
3458
|
-
? "bg-kumo-
|
|
3482
|
+
? "bg-kumo-contrast text-kumo-inverse"
|
|
3459
3483
|
: "text-kumo-subtle hover:bg-kumo-control"
|
|
3460
3484
|
}`}
|
|
3461
3485
|
>
|
|
@@ -3481,6 +3505,7 @@ DatePicker — a date selection calendar.
|
|
|
3481
3505
|
|
|
3482
3506
|
```tsx
|
|
3483
3507
|
<DatePicker
|
|
3508
|
+
className="p-3"
|
|
3484
3509
|
mode="multiple"
|
|
3485
3510
|
selected={dates}
|
|
3486
3511
|
onChange={setDates}
|
|
@@ -5742,7 +5767,7 @@ LayerDialog component
|
|
|
5742
5767
|
|
|
5743
5768
|
**Colors (kumo tokens used):**
|
|
5744
5769
|
|
|
5745
|
-
`bg-kumo-base`, `bg-kumo-contrast`, `bg-kumo-elevated`, `bg-kumo-fill`, `bg-kumo-recessed`, `border-kumo-hairline`
|
|
5770
|
+
`bg-kumo-base`, `bg-kumo-contrast`, `bg-kumo-elevated`, `bg-kumo-fill`, `bg-kumo-hairline`, `bg-kumo-recessed`, `border-kumo-hairline`
|
|
5746
5771
|
|
|
5747
5772
|
**Sub-Components:**
|
|
5748
5773
|
|
|
@@ -5792,6 +5817,10 @@ Body sub-component
|
|
|
5792
5817
|
Props:
|
|
5793
5818
|
- `children`: ReactNode (required)
|
|
5794
5819
|
|
|
5820
|
+
#### LayerDialog.Separator
|
|
5821
|
+
|
|
5822
|
+
Separator sub-component
|
|
5823
|
+
|
|
5795
5824
|
#### LayerDialog.Action
|
|
5796
5825
|
|
|
5797
5826
|
Action sub-component
|
|
@@ -5935,6 +5964,32 @@ Props:
|
|
|
5935
5964
|
</LayerDialog.Root>
|
|
5936
5965
|
```
|
|
5937
5966
|
|
|
5967
|
+
```tsx
|
|
5968
|
+
<LayerDialog.Root>
|
|
5969
|
+
<LayerDialog.Trigger
|
|
5970
|
+
render={(props) => <Button {...props}>Review deployment</Button>}
|
|
5971
|
+
/>
|
|
5972
|
+
<LayerDialog.Content>
|
|
5973
|
+
<LayerDialog.Title>Deployment summary</LayerDialog.Title>
|
|
5974
|
+
<LayerDialog.Description>
|
|
5975
|
+
Review the configuration before deploying.
|
|
5976
|
+
</LayerDialog.Description>
|
|
5977
|
+
<LayerDialog.Body>
|
|
5978
|
+
<Text variant="secondary">
|
|
5979
|
+
production-api will deploy to the global network.
|
|
5980
|
+
</Text>
|
|
5981
|
+
<LayerDialog.Separator />
|
|
5982
|
+
<Text variant="secondary">
|
|
5983
|
+
The deployment uses compatibility date 2026-10-26.
|
|
5984
|
+
</Text>
|
|
5985
|
+
</LayerDialog.Body>
|
|
5986
|
+
<LayerDialog.Actions>
|
|
5987
|
+
<LayerDialog.Action>Deploy</LayerDialog.Action>
|
|
5988
|
+
</LayerDialog.Actions>
|
|
5989
|
+
</LayerDialog.Content>
|
|
5990
|
+
</LayerDialog.Root>
|
|
5991
|
+
```
|
|
5992
|
+
|
|
5938
5993
|
```tsx
|
|
5939
5994
|
<div className="flex flex-wrap justify-center gap-3">
|
|
5940
5995
|
<LayerDialog.Root>
|
package/ai/schemas.ts
CHANGED
|
@@ -255,6 +255,7 @@ export const ClipboardTextPropsSchema = z.object({
|
|
|
255
255
|
size: z.enum(["sm", "base", "lg"]).optional(), // Size of the clipboard text field. - `"sm"` — Small clipboard text for compact UIs - `"base"` — Default clipboard text size - `"lg"` — Large clipboard text for prominent display
|
|
256
256
|
text: z.string(), // The text to display and copy to clipboard.
|
|
257
257
|
textToCopy: z.string().optional(), // If provided, this text will be copied to clipboard instead of the `text` prop.
|
|
258
|
+
masked: z.boolean().optional(), // Masks the text initially and adds a control to reveal or hide it.
|
|
258
259
|
className: z.string().optional(), // Additional CSS classes merged via `cn()`.
|
|
259
260
|
tooltip: z.unknown().optional(), // Tooltip config. Shows tooltip on hover, anchored toast on click.
|
|
260
261
|
labels: z.unknown().optional(), // Accessible labels for i18n.
|
package/dist/.build-complete
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1793640397744
|
package/dist/ai/schemas.d.ts
CHANGED
|
@@ -322,6 +322,7 @@ export declare const ClipboardTextPropsSchema: z.ZodObject<{
|
|
|
322
322
|
}>>;
|
|
323
323
|
text: z.ZodString;
|
|
324
324
|
textToCopy: z.ZodOptional<z.ZodString>;
|
|
325
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
325
326
|
className: z.ZodOptional<z.ZodString>;
|
|
326
327
|
tooltip: z.ZodOptional<z.ZodUnknown>;
|
|
327
328
|
labels: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -1809,6 +1810,7 @@ export declare const ComponentPropsSchemas: {
|
|
|
1809
1810
|
}>>;
|
|
1810
1811
|
text: z.ZodString;
|
|
1811
1812
|
textToCopy: z.ZodOptional<z.ZodString>;
|
|
1813
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
1812
1814
|
className: z.ZodOptional<z.ZodString>;
|
|
1813
1815
|
tooltip: z.ZodOptional<z.ZodUnknown>;
|
|
1814
1816
|
labels: z.ZodOptional<z.ZodUnknown>;
|
package/dist/ai/schemas.js
CHANGED
|
@@ -4366,6 +4366,7 @@ const ClipboardTextPropsSchema = object({
|
|
|
4366
4366
|
]).optional(),
|
|
4367
4367
|
text: string(),
|
|
4368
4368
|
textToCopy: string().optional(),
|
|
4369
|
+
masked: boolean().optional(),
|
|
4369
4370
|
className: string().optional(),
|
|
4370
4371
|
tooltip: unknown().optional(),
|
|
4371
4372
|
labels: unknown().optional()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
|
-
import { t as Field } from "./field-
|
|
5
|
-
import { n as KUMO_INPUT_VARIANTS, r as inputVariants } from "./input-
|
|
4
|
+
import { t as Field } from "./field-n7gmbg5xvh6oqbom.js";
|
|
5
|
+
import { n as KUMO_INPUT_VARIANTS, r as inputVariants } from "./input-f0pbcvjudf5zb8ek.js";
|
|
6
6
|
import { a as ComboboxGroupLabel, c as ComboboxCollection, l as ComboboxInput, o as ComboboxGroup, s as ComboboxList, t as ComboboxEmpty, w as useCoreFilter } from "./ComboboxEmpty-gkt1y5b81a4983v7.js";
|
|
7
7
|
import { n as ComboboxPositioner, r as ComboboxPortal, t as ComboboxPopup } from "./ComboboxPopup-n8cbgys9st446j1i.js";
|
|
8
8
|
import { n as AutocompleteRoot, t as AutocompleteItem } from "./AutocompleteItem-36ysm5nwbsd0snr6.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
4
|
import { r as Link } from "./link-h84bkh8eem39p529.js";
|
|
5
|
-
import { t as Button } from "./button-
|
|
5
|
+
import { t as Button } from "./button-k7axs4vu1rwx89w3.js";
|
|
6
6
|
import { createContext, forwardRef, isValidElement, useContext } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/banner/banner-action.tsx
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
4
|
import { n as useLinkComponent } from "./link-provider-kbwllpbo24fvgioj.js";
|
|
5
|
-
import { t as Button } from "./button-
|
|
5
|
+
import { t as Button } from "./button-k7axs4vu1rwx89w3.js";
|
|
6
6
|
import { t as useCopyFeedback } from "./use-copy-feedback-gl55ghst0csvpv4j.js";
|
|
7
7
|
import { t as SkeletonLine } from "./skeleton-line-gjf1fecmyy82aejz.js";
|
|
8
8
|
import { Children, cloneElement, isValidElement } from "react";
|
|
@@ -3,7 +3,7 @@ import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
|
3
3
|
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
4
|
import { n as useLinkComponent } from "./link-provider-kbwllpbo24fvgioj.js";
|
|
5
5
|
import { t as Loader } from "./loader-kv5nk8j8tsuesxqo.js";
|
|
6
|
-
import { t as Tooltip } from "./tooltip-
|
|
6
|
+
import { t as Tooltip } from "./tooltip-bcymn9bfyz29fvji.js";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { ArrowsClockwise } from "@phosphor-icons/react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
-
import { r as Label } from "./label-
|
|
3
|
+
import { r as Label } from "./label-njfcj6h9utmg2n9l.js";
|
|
4
4
|
import { n as FieldsetRoot, t as FieldsetLegend } from "./FieldsetLegend-gl9z9eezr0xg9zr7.js";
|
|
5
5
|
import { n as FieldRoot, t as FieldLabel } from "./FieldLabel-fjc7tdis7rcbq8o4.js";
|
|
6
6
|
import { t as CheckboxGroup$1 } from "./CheckboxGroup-581mfftu99wvjb3a.js";
|
package/dist/chunks/{clipboard-text-c0ad6lzyxauxduv1.js → clipboard-text-fffd5tpa0iye6r6m.js}
RENAMED
|
@@ -3,12 +3,12 @@ import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
|
3
3
|
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
4
|
import { a as TooltipTrigger, i as TooltipPortal, n as TooltipPositioner, s as TooltipRoot, t as TooltipPopup } from "./TooltipPopup-furysmeyb68uycbz.js";
|
|
5
5
|
import { t as TooltipProvider } from "./TooltipProvider-hyans0ens4axh1y8.js";
|
|
6
|
-
import { t as Button } from "./button-
|
|
6
|
+
import { t as Button } from "./button-k7axs4vu1rwx89w3.js";
|
|
7
7
|
import { a as ToastDescription, h as ToastProvider, l as ToastRoot, n as useToastManager, p as ToastViewport, r as ToastPositioner, t as createToastManager } from "./createToastManager-cxjmn4jx3ejh85fs.js";
|
|
8
|
-
import { r as inputVariants } from "./input-
|
|
8
|
+
import { r as inputVariants } from "./input-f0pbcvjudf5zb8ek.js";
|
|
9
9
|
import { forwardRef, useCallback, useEffect, useRef, useState } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { CheckIcon, CopyIcon } from "@phosphor-icons/react";
|
|
11
|
+
import { CheckIcon, CopyIcon, EyeIcon, EyeSlashIcon } from "@phosphor-icons/react";
|
|
12
12
|
//#region src/components/clipboard-text/clipboard-text.tsx
|
|
13
13
|
const clipboardToastManager = createToastManager();
|
|
14
14
|
const COPIED_FEEDBACK_MS = 1500;
|
|
@@ -37,7 +37,7 @@ const clipboardTextAnimations = { slide: {
|
|
|
37
37
|
end: "pointer-events-none absolute inset-0 flex items-center justify-center opacity-0 -translate-y-full"
|
|
38
38
|
} };
|
|
39
39
|
function clipboardTextVariants({ size = KUMO_CLIPBOARD_TEXT_DEFAULT_VARIANTS.size } = {}) {
|
|
40
|
-
return cn("flex items-center overflow-hidden bg-kumo-base px-0 font-mono", resolveVariant(KUMO_CLIPBOARD_TEXT_VARIANTS.size, size, KUMO_CLIPBOARD_TEXT_DEFAULT_VARIANTS.size).classes);
|
|
40
|
+
return cn("flex items-center gap-0 overflow-hidden bg-kumo-base px-0 font-mono", resolveVariant(KUMO_CLIPBOARD_TEXT_VARIANTS.size, size, KUMO_CLIPBOARD_TEXT_DEFAULT_VARIANTS.size).classes);
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Anchored toasts viewport - renders "Copied" toasts anchored to buttons
|
|
@@ -77,8 +77,9 @@ function TooltipWrapper({ children }) {
|
|
|
77
77
|
* <ClipboardText text="0c239dd2" />
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
|
-
const ClipboardText = forwardRef(({ text, textToCopy, className, size = KUMO_CLIPBOARD_TEXT_DEFAULT_VARIANTS.size, onCopy, tooltip, labels: { copyAction = "Copy to clipboard" } = {} }, ref) => {
|
|
80
|
+
const ClipboardText = forwardRef(({ text, textToCopy, masked = false, className, size = KUMO_CLIPBOARD_TEXT_DEFAULT_VARIANTS.size, onCopy, tooltip, labels: { copyAction = "Copy to clipboard", revealAction = "Reveal value", hideAction = "Hide value" } = {} }, ref) => {
|
|
81
81
|
const [copied, setCopied] = useState(false);
|
|
82
|
+
const [revealed, setRevealed] = useState(false);
|
|
82
83
|
const buttonRef = useRef(null);
|
|
83
84
|
const resetTimeoutRef = useRef(null);
|
|
84
85
|
const toastIdRef = useRef(null);
|
|
@@ -163,14 +164,24 @@ const ClipboardText = forwardRef(({ text, textToCopy, className, size = KUMO_CLI
|
|
|
163
164
|
children: /* @__PURE__ */ jsx(CopyIcon, {})
|
|
164
165
|
})]
|
|
165
166
|
});
|
|
167
|
+
const visibilityButton = masked ? /* @__PURE__ */ jsx(Button, {
|
|
168
|
+
size: sizeConfig.buttonSize,
|
|
169
|
+
variant: "ghost",
|
|
170
|
+
className: cn("rounded-none border-l! border-kumo-line! px-3", "focus:ring-kumo-focus/50 focus:ring-inset", "focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset"),
|
|
171
|
+
onClick: () => setRevealed((value) => !value),
|
|
172
|
+
"aria-label": revealed ? hideAction : revealAction,
|
|
173
|
+
"aria-pressed": revealed,
|
|
174
|
+
children: revealed ? /* @__PURE__ */ jsx(EyeSlashIcon, {}) : /* @__PURE__ */ jsx(EyeIcon, {})
|
|
175
|
+
}) : null;
|
|
166
176
|
return /* @__PURE__ */ jsxs("div", {
|
|
167
177
|
ref,
|
|
168
178
|
className: cn(inputVariants({ size: sizeConfig.buttonSize }), clipboardTextVariants({ size }), className),
|
|
169
179
|
children: [
|
|
170
180
|
/* @__PURE__ */ jsx("span", {
|
|
171
181
|
className: "grow truncate ps-4 pe-2",
|
|
172
|
-
children: text
|
|
182
|
+
children: masked && !revealed ? "••••••••" : text
|
|
173
183
|
}),
|
|
184
|
+
visibilityButton,
|
|
174
185
|
tooltip ? /* @__PURE__ */ jsx(TooltipWrapper, { children: /* @__PURE__ */ jsxs(TooltipRoot, {
|
|
175
186
|
disabled: copied,
|
|
176
187
|
onOpenChange: (open, eventDetails) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { n as usePortalContainer } from "./portal-provider-eveknxf26oudn7pp.js";
|
|
4
|
-
import { t as Field } from "./field-
|
|
5
|
-
import { n as KUMO_INPUT_VARIANTS, r as inputVariants } from "./input-
|
|
4
|
+
import { t as Field } from "./field-n7gmbg5xvh6oqbom.js";
|
|
5
|
+
import { n as KUMO_INPUT_VARIANTS, r as inputVariants } from "./input-f0pbcvjudf5zb8ek.js";
|
|
6
6
|
import { C as useComboboxFilter, a as ComboboxGroupLabel, c as ComboboxCollection, l as ComboboxInput, n as ComboboxItem, o as ComboboxGroup, s as ComboboxList, t as ComboboxEmpty } from "./ComboboxEmpty-gkt1y5b81a4983v7.js";
|
|
7
7
|
import { a as ComboboxItemIndicator, i as ComboboxChips, n as ComboboxChipRemove, o as ComboboxValue, r as ComboboxChip, s as ComboboxRoot, t as createComboboxItems } from "./createItems-n07tfwx89cdoar18.js";
|
|
8
8
|
import { n as ComboboxIcon, r as ComboboxTrigger, t as ComboboxClear } from "./ComboboxClear-ioejwvtnmqanph88.js";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as __exportAll } from "./rolldown-runtime-hi7ti5xiuxsegr96.js";
|
|
3
3
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
4
|
+
import { i as buttonVariants } from "./button-k7axs4vu1rwx89w3.js";
|
|
4
5
|
import React, { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { CaretLeftIcon, CaretRightIcon } from "@phosphor-icons/react";
|
|
7
|
+
import { CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon } from "@phosphor-icons/react";
|
|
7
8
|
//#region ../../node_modules/.pnpm/@date-fns+tz@1.4.1/node_modules/@date-fns/tz/tzName/index.js
|
|
8
9
|
/**
|
|
9
10
|
* Time zone name format.
|
|
@@ -6740,16 +6741,54 @@ function DayPicker(initialProps) {
|
|
|
6740
6741
|
}
|
|
6741
6742
|
//#endregion
|
|
6742
6743
|
//#region src/components/date-picker/date-picker.tsx
|
|
6744
|
+
const CHEVRON_ICONS = {
|
|
6745
|
+
left: CaretLeftIcon,
|
|
6746
|
+
right: CaretRightIcon,
|
|
6747
|
+
up: CaretUpIcon,
|
|
6748
|
+
down: CaretDownIcon
|
|
6749
|
+
};
|
|
6743
6750
|
/**
|
|
6744
6751
|
* Custom Chevron component using Phosphor icons
|
|
6745
6752
|
*/
|
|
6746
|
-
const Chevron = ({
|
|
6747
|
-
|
|
6753
|
+
const Chevron = ({ className, orientation = "left" }) => {
|
|
6754
|
+
const Icon = CHEVRON_ICONS[orientation];
|
|
6755
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
6748
6756
|
size: 16,
|
|
6749
|
-
|
|
6757
|
+
className,
|
|
6758
|
+
"aria-hidden": true
|
|
6750
6759
|
});
|
|
6751
6760
|
};
|
|
6752
6761
|
/**
|
|
6762
|
+
* Renders the day cell, or a custom `Day`, with markers for where it sits in
|
|
6763
|
+
* a selected range. Day buttons take their styles from their cell, so a
|
|
6764
|
+
* custom `DayButton` keeps them, and so does a custom `Day` that passes its
|
|
6765
|
+
* props on.
|
|
6766
|
+
*/
|
|
6767
|
+
function withRangeMarkers(CustomDay) {
|
|
6768
|
+
return function Day({ day, modifiers, ...props }) {
|
|
6769
|
+
const markers = {
|
|
6770
|
+
"data-range-start": modifiers.range_start || void 0,
|
|
6771
|
+
"data-range-middle": modifiers.range_middle || void 0,
|
|
6772
|
+
"data-range-end": modifiers.range_end || void 0
|
|
6773
|
+
};
|
|
6774
|
+
return CustomDay ? /* @__PURE__ */ jsx(CustomDay, {
|
|
6775
|
+
day,
|
|
6776
|
+
modifiers,
|
|
6777
|
+
...props,
|
|
6778
|
+
...markers
|
|
6779
|
+
}) : /* @__PURE__ */ jsx("td", {
|
|
6780
|
+
...props,
|
|
6781
|
+
...markers
|
|
6782
|
+
});
|
|
6783
|
+
};
|
|
6784
|
+
}
|
|
6785
|
+
/** Square ghost buttons the size of a day square. */
|
|
6786
|
+
const navButtonClassName = cn(buttonVariants({
|
|
6787
|
+
variant: "ghost",
|
|
6788
|
+
shape: "square"
|
|
6789
|
+
}), "size-(--cell-size) rounded-md aria-disabled:cursor-not-allowed aria-disabled:opacity-50");
|
|
6790
|
+
const dayButtonClassName = cn("flex size-(--cell-size) items-center justify-center rounded-md text-base text-kumo-default tabular-nums transition-colors outline-none", "cursor-pointer hover:bg-kumo-tint", "focus-visible:relative focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-kumo-brand", "[td[data-day][data-disabled]_&]:cursor-not-allowed [td[data-day][data-disabled]_&]:text-kumo-inactive [td[data-day][data-disabled]_&]:hover:bg-transparent", "[td[data-day][data-outside]:not([data-selected])_&]:text-kumo-inactive", "[td[data-day][data-today]:not([data-selected],[data-outside])_&]:font-semibold [td[data-day][data-today]:not([data-selected],[data-outside],[data-disabled])_&]:text-kumo-link", "[td[data-day][data-selected]:not([data-range-middle])_&]:bg-kumo-contrast [td[data-day][data-selected]:not([data-range-middle])_&]:text-kumo-inverse [td[data-day][data-selected]:not([data-range-middle])_&]:hover:bg-kumo-contrast", "[td[data-day][data-range-middle]:not([data-disabled])_&]:hover:bg-kumo-interact", "[td[data-day][data-range-start]:not([data-range-end],:last-of-type)_&]:rounded-e-none", "[td[data-day][data-range-end]:not([data-range-start],:first-of-type)_&]:rounded-s-none");
|
|
6791
|
+
/**
|
|
6753
6792
|
* DatePicker — a date selection calendar.
|
|
6754
6793
|
*
|
|
6755
6794
|
* Built on [react-day-picker](https://daypicker.dev) with Kumo styling.
|
|
@@ -6757,6 +6796,10 @@ const Chevron = ({ orientation, ...props }) => {
|
|
|
6757
6796
|
* Outside-month dates are hidden by default in multi-month views to avoid duplicates.
|
|
6758
6797
|
* Set `showOutsideDays` to override this behavior.
|
|
6759
6798
|
*
|
|
6799
|
+
* DatePicker has no internal padding, so it fits a Popover or a page layout
|
|
6800
|
+
* without overrides. The container sets the spacing, e.g.
|
|
6801
|
+
* `<Popover.Content className="p-3">`, or `className="p-3"` on its own.
|
|
6802
|
+
*
|
|
6760
6803
|
* @example
|
|
6761
6804
|
* ```tsx
|
|
6762
6805
|
* // Single date selection
|
|
@@ -6773,18 +6816,47 @@ const Chevron = ({ orientation, ...props }) => {
|
|
|
6773
6816
|
* ```
|
|
6774
6817
|
*/
|
|
6775
6818
|
function DatePicker({ className, classNames, onChange, ...props }) {
|
|
6819
|
+
const defaults = getDefaultClassNames();
|
|
6820
|
+
const hasDropdowns = props.captionLayout?.startsWith("dropdown") ?? false;
|
|
6821
|
+
const hasNavAround = props.navLayout === "around";
|
|
6822
|
+
const customDay = props.components?.Day;
|
|
6823
|
+
const Day = useMemo(() => withRangeMarkers(customDay), [customDay]);
|
|
6776
6824
|
return /* @__PURE__ */ jsx(DayPicker, {
|
|
6777
6825
|
showOutsideDays: (props.numberOfMonths ?? 1) === 1,
|
|
6778
6826
|
animate: true,
|
|
6779
6827
|
...props,
|
|
6780
6828
|
onSelect: onChange,
|
|
6781
6829
|
classNames: {
|
|
6830
|
+
months: cn(defaults.months, "relative isolate flex flex-col gap-4 sm:flex-row"),
|
|
6831
|
+
month: cn(defaults.month, "flex flex-col gap-3", props.navLayout && "relative"),
|
|
6832
|
+
nav: cn(defaults.nav, "absolute end-0.5 top-0 z-1 flex items-center gap-1 rtl:[&_svg]:rotate-180"),
|
|
6833
|
+
button_previous: cn(defaults.button_previous, navButtonClassName, hasNavAround && "absolute start-0.5 top-0 z-1"),
|
|
6834
|
+
button_next: cn(defaults.button_next, navButtonClassName, hasNavAround && "absolute end-0.5 top-0 z-1"),
|
|
6835
|
+
month_caption: cn(defaults.month_caption, "flex h-(--cell-size) items-center px-0.5", hasNavAround && "justify-center px-(--cell-size)"),
|
|
6836
|
+
caption_label: cn(defaults.caption_label, "text-base font-medium text-kumo-default", hasDropdowns && "flex h-7 items-center gap-1 rounded-md ps-2 pe-1 [&>svg]:text-kumo-subtle"),
|
|
6837
|
+
dropdowns: cn(defaults.dropdowns, "flex items-center gap-1.5"),
|
|
6838
|
+
dropdown_root: cn(defaults.dropdown_root, "relative rounded-md ring ring-kumo-line has-focus-visible:ring-2 has-focus-visible:ring-kumo-brand"),
|
|
6839
|
+
dropdown: cn(defaults.dropdown, "absolute inset-0 cursor-pointer opacity-0"),
|
|
6840
|
+
month_grid: cn(defaults.month_grid, "border-collapse"),
|
|
6841
|
+
weekdays: cn(defaults.weekdays, "flex"),
|
|
6842
|
+
weekday: cn(defaults.weekday, "flex h-5 w-(--cell-width) items-center justify-center text-xs font-normal text-kumo-subtle"),
|
|
6843
|
+
week: cn(defaults.week, "mt-2 flex"),
|
|
6844
|
+
week_number_header: cn(defaults.week_number_header, "w-(--cell-width)"),
|
|
6845
|
+
week_number: cn(defaults.week_number, "flex h-(--cell-size) w-(--cell-width) items-center justify-center text-xs text-kumo-subtle"),
|
|
6846
|
+
day: cn(defaults.day, "relative flex h-(--cell-size) w-(--cell-width) justify-center p-0 text-center", "data-selected:first-of-type:rounded-s-md data-selected:last-of-type:rounded-e-md", "data-range-start:data-range-end:bg-none"),
|
|
6847
|
+
day_button: cn(defaults.day_button, dayButtonClassName),
|
|
6848
|
+
range_start: cn(defaults.range_start, "bg-linear-to-r from-transparent from-50% to-kumo-fill to-50% last-of-type:bg-none rtl:bg-linear-to-l"),
|
|
6849
|
+
range_middle: cn(defaults.range_middle, "bg-kumo-fill"),
|
|
6850
|
+
range_end: cn(defaults.range_end, "bg-linear-to-l from-transparent from-50% to-kumo-fill to-50% first-of-type:bg-none rtl:bg-linear-to-r"),
|
|
6851
|
+
hidden: cn(defaults.hidden, "invisible"),
|
|
6852
|
+
footer: cn(defaults.footer, "w-0 min-w-full pt-3"),
|
|
6782
6853
|
...classNames,
|
|
6783
|
-
root: cn("
|
|
6854
|
+
root: cn(defaults.root, "w-fit rounded-xl bg-kumo-base text-sm select-none [--cell-size:--spacing(8)] [--cell-width:--spacing(9)]", classNames?.root, className)
|
|
6784
6855
|
},
|
|
6785
6856
|
components: {
|
|
6786
6857
|
Chevron,
|
|
6787
|
-
...props.components
|
|
6858
|
+
...props.components,
|
|
6859
|
+
Day
|
|
6788
6860
|
}
|
|
6789
6861
|
});
|
|
6790
6862
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
|
-
import { t as Button } from "./button-
|
|
4
|
+
import { t as Button } from "./button-k7axs4vu1rwx89w3.js";
|
|
5
5
|
import { t as Text } from "./text-me99rjbjkaff98gp.js";
|
|
6
6
|
import { t as useCopyFeedback } from "./use-copy-feedback-gl55ghst0csvpv4j.js";
|
|
7
7
|
import { useCallback } from "react";
|