@keboola/design 12.0.0 → 13.0.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/AGENTS.md +12 -7
- package/CHANGELOG.md +91 -0
- package/COMPONENT-API.md +15 -5
- package/dist/{AIKit-BD4r7ff-.js → AIKit-DcOlHIBr.js} +22 -10
- package/dist/AIKit-DcOlHIBr.js.map +1 -0
- package/dist/{AlertModal-Th2khjPi.js → AlertModal-mbSnuuka.js} +5 -5
- package/dist/AlertModal-mbSnuuka.js.map +1 -0
- package/dist/{BrandEditor-BU23Vl8V.js → BrandEditor-Bkd6dhb8.js} +6 -6
- package/dist/{BrandEditor-BU23Vl8V.js.map → BrandEditor-Bkd6dhb8.js.map} +1 -1
- package/dist/{Breadcrumb-p9HtMLCc.js → Breadcrumb-BUoAZyhO.js} +2 -2
- package/dist/{Breadcrumb-p9HtMLCc.js.map → Breadcrumb-BUoAZyhO.js.map} +1 -1
- package/dist/{Button-Ca4Q3VJU.js → Button-B21oVcPU.js} +3 -4
- package/dist/Button-B21oVcPU.js.map +1 -0
- package/dist/{Card-Cr9MBNHu.js → Card-BQmBWHXl.js} +32 -4
- package/dist/Card-BQmBWHXl.js.map +1 -0
- package/dist/{ClipboardButton-DHa1trtI.js → ClipboardButton-srUgWgwH.js} +2 -2
- package/dist/{ClipboardButton-DHa1trtI.js.map → ClipboardButton-srUgWgwH.js.map} +1 -1
- package/dist/{CodeEditor-BSo-oLFG.js → CodeEditor-jZMw1ioj.js} +2 -2
- package/dist/{CodeEditor-BSo-oLFG.js.map → CodeEditor-jZMw1ioj.js.map} +1 -1
- package/dist/{ColorInput-DSMqrs2-.js → ColorInput-B3gBZ8Ya.js} +2 -2
- package/dist/{ColorInput-DSMqrs2-.js.map → ColorInput-B3gBZ8Ya.js.map} +1 -1
- package/dist/{ColorModeSwitch-D7EuWyJz.js → ColorModeSwitch-Bw9wMyoL.js} +2 -2
- package/dist/{ColorModeSwitch-D7EuWyJz.js.map → ColorModeSwitch-Bw9wMyoL.js.map} +1 -1
- package/dist/{Combobox-CxRAYOBt.js → Combobox-C_MTpQ1l.js} +21 -9
- package/dist/Combobox-C_MTpQ1l.js.map +1 -0
- package/dist/{Command-BU_cVurn.js → Command-BQPiZCNz.js} +2 -2
- package/dist/{Command-BU_cVurn.js.map → Command-BQPiZCNz.js.map} +1 -1
- package/dist/{CopyField-6_c-NdLO.js → CopyField-Ba7h8MqZ.js} +3 -3
- package/dist/CopyField-Ba7h8MqZ.js.map +1 -0
- package/dist/{DateInput-DyEErfJf.js → DateInput-D0nWUasV.js} +2 -2
- package/dist/{DateInput-DyEErfJf.js.map → DateInput-D0nWUasV.js.map} +1 -1
- package/dist/{DateRangeInput-Dg7-VUd9.js → DateRangeInput-i6wE45-V.js} +2 -2
- package/dist/{DateRangeInput-Dg7-VUd9.js.map → DateRangeInput-i6wE45-V.js.map} +1 -1
- package/dist/{DateRangePicker-BoPnh4aH.js → DateRangePicker-BAnuz6vO.js} +2 -2
- package/dist/{DateRangePicker-BoPnh4aH.js.map → DateRangePicker-BAnuz6vO.js.map} +1 -1
- package/dist/{FieldItem-2wMXQ0Qw.js → FieldItem-BHViBJS3.js} +2 -2
- package/dist/{FieldItem-2wMXQ0Qw.js.map → FieldItem-BHViBJS3.js.map} +1 -1
- package/dist/{FileUpload-C83tXuE2.js → FileUpload-Ch2hrIWq.js} +2 -2
- package/dist/{FileUpload-C83tXuE2.js.map → FileUpload-Ch2hrIWq.js.map} +1 -1
- package/dist/{Form-95rVLfX8.js → Form-VkzfVPyT.js} +5 -5
- package/dist/{Form-95rVLfX8.js.map → Form-VkzfVPyT.js.map} +1 -1
- package/dist/{FormGroup-CmNiAtU6.js → FormGroup-CmCppxOn.js} +3 -3
- package/dist/{FormGroup-CmNiAtU6.js.map → FormGroup-CmCppxOn.js.map} +1 -1
- package/dist/{FullScreenModal-CD7mYeTz.js → FullScreenModal-Cwnm8WdM.js} +2 -2
- package/dist/{FullScreenModal-CD7mYeTz.js.map → FullScreenModal-Cwnm8WdM.js.map} +1 -1
- package/dist/{InputGroup-B4QOPxHl.js → InputGroup-CrlMRz4X.js} +2 -2
- package/dist/{InputGroup-B4QOPxHl.js.map → InputGroup-CrlMRz4X.js.map} +1 -1
- package/dist/{MermaidDiagram-BQvz6bhv.js → MermaidDiagram-B30x2yV7.js} +2 -2
- package/dist/{MermaidDiagram-BQvz6bhv.js.map → MermaidDiagram-B30x2yV7.js.map} +1 -1
- package/dist/{Modal-Driyqs_N.js → Modal-BkSuS9Yz.js} +2 -2
- package/dist/{Modal-Driyqs_N.js.map → Modal-BkSuS9Yz.js.map} +1 -1
- package/dist/{MultiActionButtonGroup-BPnmzBtw.js → MultiActionButtonGroup-AWLj1Tg7.js} +2 -2
- package/dist/{MultiActionButtonGroup-BPnmzBtw.js.map → MultiActionButtonGroup-AWLj1Tg7.js.map} +1 -1
- package/dist/{PageToolbar-DOAtAnfL.js → PageToolbar-CIW0VmKe.js} +2 -2
- package/dist/{PageToolbar-DOAtAnfL.js.map → PageToolbar-CIW0VmKe.js.map} +1 -1
- package/dist/{Pagination-LaSg-5cl.js → Pagination-DH3f6LN0.js} +2 -2
- package/dist/{Pagination-LaSg-5cl.js.map → Pagination-DH3f6LN0.js.map} +1 -1
- package/dist/{Popconfirm-SLz0zodk.js → Popconfirm-Dhzn7sy6.js} +2 -2
- package/dist/{Popconfirm-SLz0zodk.js.map → Popconfirm-Dhzn7sy6.js.map} +1 -1
- package/dist/{SearchInput-CEfQDNl3.js → SearchInput-D3qMkHaW.js} +2 -2
- package/dist/{SearchInput-CEfQDNl3.js.map → SearchInput-D3qMkHaW.js.map} +1 -1
- package/dist/{SectionNav-B_qf0AXi.js → SectionNav-TU5i3JeM.js} +2 -2
- package/dist/{SectionNav-B_qf0AXi.js.map → SectionNav-TU5i3JeM.js.map} +1 -1
- package/dist/{Select-ByRvkZ3D.js → Select-B4uK0QVm.js} +4 -3
- package/dist/Select-B4uK0QVm.js.map +1 -0
- package/dist/{Sheet-C-yXk5Da.js → Sheet-D0fAE14T.js} +2 -2
- package/dist/{Sheet-C-yXk5Da.js.map → Sheet-D0fAE14T.js.map} +1 -1
- package/dist/{Sidebar-Ds0E6PbR.js → Sidebar-ZLMNIbg5.js} +3 -3
- package/dist/{Sidebar-Ds0E6PbR.js.map → Sidebar-ZLMNIbg5.js.map} +1 -1
- package/dist/{Slider-DWdu9NuM.js → Slider-B0ou9r0B.js} +2 -2
- package/dist/{Slider-DWdu9NuM.js.map → Slider-B0ou9r0B.js.map} +1 -1
- package/dist/{Tabs-Dt9oLYHC.js → Tabs-CTDmye1N.js} +2 -2
- package/dist/{Tabs-Dt9oLYHC.js.map → Tabs-CTDmye1N.js.map} +1 -1
- package/dist/{TextInput-CDG2XpBl.js → TextInput-BWYXbfs4.js} +2 -2
- package/dist/{TextInput-CDG2XpBl.js.map → TextInput-BWYXbfs4.js.map} +1 -1
- package/dist/{ThemeProvider-DXsxFg1U.js → ThemeProvider-VF38VfUa.js} +3 -3
- package/dist/{ThemeProvider-DXsxFg1U.js.map → ThemeProvider-VF38VfUa.js.map} +1 -1
- package/dist/{ZoomableSvg-BzXVfgnI.js → ZoomableSvg-C65nta_r.js} +3 -3
- package/dist/{ZoomableSvg-BzXVfgnI.js.map → ZoomableSvg-C65nta_r.js.map} +1 -1
- package/dist/editors.js +3 -3
- package/dist/flint.js +1 -1
- package/dist/index.d.ts +375 -375
- package/dist/index.js +37 -37
- package/dist/internal/blocks/AIKit.js +1 -1
- package/dist/internal/blocks/BrandEditor.js +1 -1
- package/dist/internal/blocks/ChartPanel.js +1 -1
- package/dist/internal/blocks/ChipEditor.js +1 -1
- package/dist/internal/blocks/ClipboardButton.js +1 -1
- package/dist/internal/blocks/ColorInput.js +1 -1
- package/dist/internal/blocks/ColorModeSwitch.js +1 -1
- package/dist/internal/blocks/Command.js +1 -1
- package/dist/internal/blocks/CopyField.js +1 -1
- package/dist/internal/blocks/DateInput.js +1 -1
- package/dist/internal/blocks/DateRangeInput.js +1 -1
- package/dist/internal/blocks/EmptyConfigurationActionCard.js +1 -1
- package/dist/internal/blocks/ExportMenu.js +1 -1
- package/dist/internal/blocks/Form/connectors/ComboboxField.js +2 -2
- package/dist/internal/blocks/Form/connectors/ComboboxField.js.map +1 -1
- package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +1 -1
- package/dist/internal/blocks/Form/connectors/MultiComboboxField.js.map +1 -1
- package/dist/internal/blocks/Form.js +1 -1
- package/dist/internal/blocks/FormGroup.js +1 -1
- package/dist/internal/blocks/MultiActionButtonGroup.js +1 -1
- package/dist/internal/blocks/MultiCombobox.js +4 -5
- package/dist/internal/blocks/MultiCombobox.js.map +1 -1
- package/dist/internal/blocks/NumberInput.js +1 -1
- package/dist/internal/blocks/PageToolbar.js +1 -1
- package/dist/internal/blocks/PasswordInput.js +1 -1
- package/dist/internal/blocks/SearchInput.js +1 -1
- package/dist/internal/blocks/SearchInputWithNavigation.js +2 -2
- package/dist/internal/blocks/SectionNav.js +1 -1
- package/dist/internal/blocks/SplitButton.js +1 -1
- package/dist/internal/blocks/StatCard.js +1 -1
- package/dist/internal/blocks/TextInput.js +1 -1
- package/dist/internal/blocks/Textarea.js +1 -1
- package/dist/internal/blocks/TimeInput.js +1 -1
- package/dist/internal/components/AlertModal.js +1 -1
- package/dist/internal/components/Breadcrumb.js +1 -1
- package/dist/internal/components/Button.js +1 -1
- package/dist/internal/components/Card.js +1 -1
- package/dist/internal/components/CollapsiblePanel.js +1 -1
- package/dist/internal/components/CollapsiblePanel.js.map +1 -1
- package/dist/internal/components/Combobox.js +1 -1
- package/dist/internal/components/DateRangePicker.js +1 -1
- package/dist/internal/components/FileUpload.js +1 -1
- package/dist/internal/components/FullScreenModal.js +1 -1
- package/dist/internal/components/InputGroup.js +1 -1
- package/dist/internal/components/Modal.js +1 -1
- package/dist/internal/components/Pagination.js +1 -1
- package/dist/internal/components/Popconfirm.js +1 -1
- package/dist/internal/components/Select.js +1 -1
- package/dist/internal/components/Sheet.js +1 -1
- package/dist/internal/components/Sidebar.js +1 -1
- package/dist/internal/components/Slider.js +1 -1
- package/dist/internal/components/Tabs.js +1 -1
- package/dist/internal/components/ThemeProvider.js +2 -2
- package/dist/internal/components/ZoomableSvg.js +1 -1
- package/dist/internal/utils/accessibleName.js +11 -0
- package/dist/internal/utils/accessibleName.js.map +1 -0
- package/dist/markdown-editor.js +4 -4
- package/dist/mermaid.js +1 -1
- package/dist/rjsf.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/testing.js +3 -4
- package/dist/testing.js.map +1 -1
- package/package.json +23 -23
- package/src/theme.css +6 -1
- package/dist/AIKit-BD4r7ff-.js.map +0 -1
- package/dist/AlertModal-Th2khjPi.js.map +0 -1
- package/dist/Button-Ca4Q3VJU.js.map +0 -1
- package/dist/Card-Cr9MBNHu.js.map +0 -1
- package/dist/Combobox-CxRAYOBt.js.map +0 -1
- package/dist/CopyField-6_c-NdLO.js.map +0 -1
- package/dist/Select-ByRvkZ3D.js.map +0 -1
- package/dist/internal/components/StatusDot.js +0 -60
- package/dist/internal/components/StatusDot.js.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -79,6 +79,8 @@ This file answers **which** component to use; [`COMPONENT-API.md`](./COMPONENT-A
|
|
|
79
79
|
|
|
80
80
|
**Never** use `Popover` for destructive confirmations (use `Popconfirm`) or hover-only previews (use `HoverCard`). **Never** hand-roll a confirmation from `Modal` + buttons — use `AlertModal`, which owns the confirm/cancel actions and the async loading state.
|
|
81
81
|
|
|
82
|
+
**Filters in a menu are menu items:** `DropdownMenu.RadioItem` for one value, `DropdownMenu.CheckboxItem` for several, both `indicator="check" indicatorAlign="end"`. Never `RadioGroup` or `Checkbox` in a `DropdownMenu` or `Popover`.
|
|
83
|
+
|
|
82
84
|
### Inputs
|
|
83
85
|
|
|
84
86
|
| Use | When |
|
|
@@ -93,7 +95,7 @@ This file answers **which** component to use; [`COMPONENT-API.md`](./COMPONENT-A
|
|
|
93
95
|
|
|
94
96
|
**Never** build custom label + input combinations — compose `Label` + `FormGroup.TextInput` + `FormGroup.Help` inside `FormGroup`.
|
|
95
97
|
|
|
96
|
-
**Every select-shaped control needs an accessible name, and it goes on the control itself** — pass `id` and point a `<Label htmlFor>` at it where the field has a visible label, `aria-labelledby` where that label is some other node, and `aria-label` for a bare control — a toolbar filter, a repeated row. A name set on a surrounding wrapper (an `InputGroup`, a `<div>`) reaches nothing: the role is on the trigger or the input. `Select
|
|
98
|
+
**Every select-shaped control needs an accessible name, and it goes on the control itself** — pass `id` and point a `<Label htmlFor>` at it where the field has a visible label, `aria-labelledby` where that label is some other node, and `aria-label` for a bare control — a toolbar filter, a repeated row. A name set on a surrounding wrapper (an `InputGroup`, a `<div>`) reaches nothing: the role is on the trigger or the input. `Select`, `Select.Trigger`, `Combobox`, `Combobox.Input` and `MultiCombobox` **will not compile** without one of the three (the JSDoc on the prop says why); a component that wraps one passes it on — a required `id` where every caller renders a `<Label htmlFor>`, `WithAccessibleName<Props>` where some caller has no visible label. The `field.*` connectors need none of it: `FieldItem` owns the label and hands the control its `id`.
|
|
97
99
|
|
|
98
100
|
`FileUpload` composes `FileUpload.DropZone` (the dashed box, owning the drag / error visuals) with `FileUpload.FileList` (selected files; `invalid` tints the rows). It deliberately ships **no** rejection copy — the wording is product copy, so read the current rejections with `useFileUploadRejections()` inside `FileUpload` and write the sentence yourself. Reach for `useFileDropTarget` only when there is no box to render: it returns `getRootProps()` / `isDragActive` for an affordance you style, and `noClick` / `noKeyboard` keep an already-interactive subtree (a composer, a form) from opening the file dialog on every click.
|
|
99
101
|
|
|
@@ -107,15 +109,16 @@ This file answers **which** component to use; [`COMPONENT-API.md`](./COMPONENT-A
|
|
|
107
109
|
| `Toaster` | Mount once at app root |
|
|
108
110
|
| `Alert` | Persistent contextual message in page layout |
|
|
109
111
|
| `FormGroup state="error"` | Field-level validation errors inline below input |
|
|
110
|
-
| `StatusDot` | One entity's state as a coloured dot beside its name |
|
|
111
112
|
|
|
112
113
|
**Never** use `Alert` for ephemeral success (use `toast()`) or `toast()` for blocking errors (use `Alert`).
|
|
113
114
|
|
|
114
|
-
**Never** paint a state with a hue of your own — no `tw:
|
|
115
|
-
hue.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
**Never** paint a state with a hue of your own — no `tw:text-amber-600`, no `color` prop taking a
|
|
116
|
+
hue. Use the status tokens (`success` / `warning` / `info` / `destructive`, `muted-foreground` for no
|
|
117
|
+
state yet), so a customer brand recolours every state at once. Colour never carries the meaning
|
|
118
|
+
alone: name the state in text, or in an `aria-label` where there is no room for text.
|
|
119
|
+
|
|
120
|
+
**Don't** put a dot or bullet before text that already names the state ("Failed", "Up to date") —
|
|
121
|
+
colour the text instead. A column of dots reads as a bulleted list.
|
|
119
122
|
|
|
120
123
|
### Loading
|
|
121
124
|
|
|
@@ -252,6 +255,8 @@ Vertical rhythm: prefer `tw:gap-*` on a flex column parent over `tw:mt-*` on chi
|
|
|
252
255
|
|
|
253
256
|
The `label` prop implies `orientation="horizontal"` — labels are not rendered vertically.
|
|
254
257
|
|
|
258
|
+
**Separate inline items with `tw:gap-x-*`, not a typed `·` / `|` / `/` / `—`** — it wraps onto the wrong line and a screen reader reads it out.
|
|
259
|
+
|
|
255
260
|
### Date/time, color, multi-select, code
|
|
256
261
|
|
|
257
262
|
| Use | When |
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,96 @@
|
|
|
1
1
|
# @keboola/design
|
|
2
2
|
|
|
3
|
+
## 13.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- Remove the `keboolaLegacyTopnav` brand (`keboola-legacy-topnav`). No app renders the top-nav layout any more; use `keboolaLegacySidebar`. The `shell: 'topnav'` option stays: a brand that sets it still gets the `AppShell` top-bar geometry.
|
|
8
|
+
|
|
9
|
+
- Remove `StatusDot` and `statusDotVariants`
|
|
10
|
+
|
|
11
|
+
Nothing on the platform renders it. Colour the text that names the state with a status token (`tw:text-success`, `tw:text-destructive`, …) instead of putting a dot in front of it.
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- `AlertModal.Content` takes `icon={false}` for a dialog that wants no glyph at all. The header's first column collapses rather than sitting empty, so the title and body start at the edge; `variant` still colours the confirm button.
|
|
16
|
+
|
|
17
|
+
- `Card` takes `asChild` and becomes the link it wraps — `<Card asChild><a href>…</a></Card>` or a router `<Link>`. An `<a href>` card lifts, steps its border and deepens its shadow on hover (no motion under `prefers-reduced-motion`), shows the focus ring on `focus-visible` and a pointer cursor; `interactive` opts any other card in, or an anchor card out. New `Card.Description` renders the muted line under `Card.Title`.
|
|
18
|
+
|
|
19
|
+
- `Combobox`, `MultiCombobox` and `Combobox.Input` require an accessible name — `aria-label`,
|
|
20
|
+
`aria-labelledby`, or an `id` a `<Label htmlFor>` points at — as `Select` does.
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
// A visible label — point it at the control.
|
|
24
|
+
<Label htmlFor="bucket">Bucket</Label>
|
|
25
|
+
<Combobox id="bucket" items={buckets} value={bucket} onValueChange={setBucket} />
|
|
26
|
+
|
|
27
|
+
// A bare control (toolbar filter, repeated row) — name it directly.
|
|
28
|
+
<MultiCombobox aria-label="Status" items={STATUSES} value={statuses} onValueChange={setStatuses} />
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- The `placeholder` is not a name: the name calculation reaches it only as a last resort, and it
|
|
32
|
+
disappears once a value is picked.
|
|
33
|
+
- The requirement sits on the input, which carries the `combobox` role, so the compound
|
|
34
|
+
`Combobox.Input` has it too.
|
|
35
|
+
- `ComboboxField` and `MultiComboboxField` take no `id`, `aria-label` or `aria-labelledby`:
|
|
36
|
+
`FieldItem` renders the label and hands the control its `id`.
|
|
37
|
+
- `WithAccessibleName<Props>` is exported for a component that wraps one of these controls and
|
|
38
|
+
passes the requirement on.
|
|
39
|
+
|
|
40
|
+
- `forwardAccessibleName` is exported next to `WithAccessibleName`, for a component that wraps
|
|
41
|
+
`Combobox`, `MultiCombobox` or `Select` and passes their accessible-name requirement on.
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
const TablePicker = ({
|
|
45
|
+
tables,
|
|
46
|
+
value,
|
|
47
|
+
onChange,
|
|
48
|
+
...accessibleName
|
|
49
|
+
}: Props) => (
|
|
50
|
+
<Combobox
|
|
51
|
+
{...forwardAccessibleName(accessibleName)}
|
|
52
|
+
items={tables}
|
|
53
|
+
value={value}
|
|
54
|
+
onValueChange={onChange}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- It returns the rest of the wrapper's destructure unchanged, for spreading onto the control.
|
|
60
|
+
- A prop left in that rest besides `id`, `aria-label` and `aria-labelledby` fails type-check,
|
|
61
|
+
where a plain spread would pass it to the control unnoticed.
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- Filled `Button`s (`primary`, `secondary`, `danger`, `kai`) paint to their outer edge, so they line up with an `outline` Button beside them. `kai` drops its 1px outer ring and keeps the soft glow.
|
|
66
|
+
|
|
67
|
+
- `CopyField.Reveal` takes a `subject`, so the eye can say "Show password" instead of "Show value"
|
|
68
|
+
|
|
69
|
+
- `CollapsiblePanel` keeps its chevron inside the panel when the header holds long text.
|
|
70
|
+
- The header content can shrink, so a `truncate` inside it cuts the text instead of pushing the chevron out.
|
|
71
|
+
|
|
72
|
+
- `MultiCombobox` selected-value chips are back to the badge's own height; the truncation tooltip no
|
|
73
|
+
longer resets the chip label's line-height.
|
|
74
|
+
|
|
75
|
+
- `Combobox` and `MultiCombobox` option rows now wrap a long label onto more lines instead of
|
|
76
|
+
truncating it, and a selected-value chip whose label is cut off shows the full label in a tooltip
|
|
77
|
+
on hover.
|
|
78
|
+
|
|
79
|
+
- `dompurify` requires 3.4.16 or newer, the release that fixes event handlers left armed in subtrees an `afterSanitize` hook removes
|
|
80
|
+
|
|
81
|
+
- `AGENTS.md`: filters in a menu are `DropdownMenu.RadioItem` / `CheckboxItem` with `indicator="check"`, never `RadioGroup` or `Checkbox`.
|
|
82
|
+
|
|
83
|
+
- `PromptInput` leaves the controls in its slots alone: with `commands` or `mentions`, Enter on a
|
|
84
|
+
focused `prefix`/`suffix` button (or a button in a menu it portals out) clicks it, and a click in
|
|
85
|
+
such a layer keeps the focus there instead of moving it to the textarea.
|
|
86
|
+
|
|
87
|
+
- `AGENTS.md`: status text that already names its state takes a status colour, not a leading dot or bullet; inline items are separated by a `tw:gap-x-*` flex row, not a typed `·` / `|` / `/` / `—`.
|
|
88
|
+
|
|
89
|
+
- `ToolCallStatusHeader` shows its label in full foreground ink while `needsConfirmation` is set, so the name of the action being approved is as easy to see as the content below it. The warning tint, icon and "Confirmation required" chip still mark the state.
|
|
90
|
+
|
|
91
|
+
- Updated dependencies:
|
|
92
|
+
- @keboola/brand-registry@2.0.0
|
|
93
|
+
|
|
3
94
|
## 12.0.0
|
|
4
95
|
|
|
5
96
|
### Major Changes
|
package/COMPONENT-API.md
CHANGED
|
@@ -465,12 +465,14 @@ Source: `src/blocks/Form/connectors/OtpInputField.tsx`
|
|
|
465
465
|
|
|
466
466
|
Source: `src/components/Card/Card.tsx`
|
|
467
467
|
|
|
468
|
-
> Subcomponents that EXIST: `Card.Header`, `Card.Title`, `Card.Content`. There is NO `Card.
|
|
468
|
+
> Subcomponents that EXIST: `Card.Header`, `Card.Title`, `Card.Description`, `Card.Content`. There is NO `Card.Footer`. Plus native `<div>` attributes. A clickable tile is `<Card asChild><a href>…</a></Card>` (or a router `<Link>`): the whole card is the link, its accessible name is its text, and it must hold NO nested buttons or links. Not the DS `Link`: it defaults to `target="_blank"` and stops click propagation — fine only for an external tile.
|
|
469
469
|
|
|
470
|
-
| Prop
|
|
471
|
-
|
|
|
472
|
-
| `
|
|
473
|
-
| `
|
|
470
|
+
| Prop | Type | Required | Default | Description |
|
|
471
|
+
| ------------- | -------------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
472
|
+
| `asChild` | `boolean` | no | `false` | Render as a Radix `Slot`: the child (`<a href>`, a router `<Link>`) becomes the card. The card is then one link — nest no buttons or links inside it. |
|
|
473
|
+
| `bordered` | `boolean \| null` | no | `false` | |
|
|
474
|
+
| `interactive` | `boolean` | no | — | Hover lift, focus ring and pointer cursor. Defaults to on when the card renders an `<a href>`; `false` opts that out, `true` opts any other element in. |
|
|
475
|
+
| `padding` | `"small" \| "medium" \| "large" \| "none" \| null` | no | `small` | |
|
|
474
476
|
|
|
475
477
|
### `Card.Header`
|
|
476
478
|
|
|
@@ -493,6 +495,14 @@ Source: `src/components/Card/CardTitle.tsx`
|
|
|
493
495
|
| ---- | -------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
494
496
|
| `as` | `HeadingLevel` | no | `h3` | Heading tag to render. Defaults to `h3`; set explicitly to avoid a heading-order skip (e.g. `as="h2"` when the Card sits directly under a page's `h1`). |
|
|
495
497
|
|
|
498
|
+
### `Card.Description`
|
|
499
|
+
|
|
500
|
+
Source: `src/components/Card/CardDescription.tsx`
|
|
501
|
+
|
|
502
|
+
> Muted small `<p>` under `Card.Title`; place both in `Card.Header layout="stack"`. No own props — native `<p>` attributes.
|
|
503
|
+
|
|
504
|
+
_No own props — see note above for passthrough attributes._
|
|
505
|
+
|
|
496
506
|
### `Card.Content`
|
|
497
507
|
|
|
498
508
|
Source: `src/components/Card/CardContent.tsx`
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { cn } from "./classNames-BzrkDnOD.js";
|
|
2
2
|
import { Tooltip, TooltipProvider } from "./utils-Bd28bWgm.js";
|
|
3
3
|
import { AlertCircle, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Ban, BarChart3, Bell, Bug, Calendar, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Circle, CircleAlert, CircleCheck, CircleHelp, CirclePause, CirclePlay, CirclePlus, CircleStop, CircleX, Clock, Cog, Copy, Database, Download, Ellipsis, ExternalLink, Eye, File, FilePen, FileText, Flag, Folder, Gauge, GitBranch, GitMerge, GitPullRequest, Globe, Hand, History, Hourglass, Info, Key, Layers, LineChart, Link, List, ListChecks, Loader2, Lock, Mail, Maximize2, Minimize2, Minus, Pencil, Play, Plus, RefreshCw, Rocket, RotateCcw, RotateCw, Save, Search, Send, Settings, Sparkles, Star, Table, ThumbsDown, ThumbsUp, Trash2, TriangleAlert, Upload, User, Users, WandSparkles, Warehouse, Workflow, X, XCircle, Zap } from "./icons-wcA70iQx.js";
|
|
4
|
-
import { Button } from "./Button-
|
|
4
|
+
import { Button } from "./Button-B21oVcPU.js";
|
|
5
5
|
import { ButtonGroup } from "./internal/components/ButtonGroup.js";
|
|
6
|
-
import { ClipboardButton } from "./ClipboardButton-
|
|
7
|
-
import { FullScreenModal, FullScreenModalBody, FullScreenModalHeader } from "./FullScreenModal-
|
|
6
|
+
import { ClipboardButton } from "./ClipboardButton-srUgWgwH.js";
|
|
7
|
+
import { FullScreenModal, FullScreenModalBody, FullScreenModalHeader } from "./FullScreenModal-Cwnm8WdM.js";
|
|
8
8
|
import { Truncated } from "./internal/components/Truncated.js";
|
|
9
9
|
import { HoverCard } from "./HoverCard-B8OKu9XZ.js";
|
|
10
|
-
import { Command } from "./Command-
|
|
11
|
-
import { TextInput } from "./TextInput-
|
|
10
|
+
import { Command } from "./Command-BQPiZCNz.js";
|
|
11
|
+
import { TextInput } from "./TextInput-BWYXbfs4.js";
|
|
12
12
|
import { Checkbox } from "./Checkbox-8yIIgY7g.js";
|
|
13
13
|
import { Badge } from "./Badge-DIjhwPvh.js";
|
|
14
14
|
import { Textarea } from "./internal/blocks/Textarea.js";
|
|
@@ -1462,7 +1462,13 @@ const CMDK_HIJACKED_KEYS = /* @__PURE__ */ new Set([
|
|
|
1462
1462
|
"End",
|
|
1463
1463
|
"Enter"
|
|
1464
1464
|
]);
|
|
1465
|
-
|
|
1465
|
+
/**
|
|
1466
|
+
* Whether the composer's always-mounted cmdk root would act on this keystroke, cancelling its default.
|
|
1467
|
+
*
|
|
1468
|
+
* - cmdk acts on every `CMDK_HIJACKED_KEYS` key regardless of modifiers, except a modified Enter.
|
|
1469
|
+
* - The textarea and the form stop these from bubbling, or a focused button never clicks on Enter.
|
|
1470
|
+
*/
|
|
1471
|
+
const isCmdkNavigation = (event) => CMDK_HIJACKED_KEYS.has(event.key) && (event.key !== "Enter" || !(event.metaKey || event.ctrlKey || event.altKey));
|
|
1466
1472
|
/**
|
|
1467
1473
|
* The `@token` the caret sits at the end of, if any.
|
|
1468
1474
|
*
|
|
@@ -1645,14 +1651,19 @@ const PromptInput = ({ onSend, onAbort, onContinue, prefix, variant, suffix, att
|
|
|
1645
1651
|
if (panelOpen) return;
|
|
1646
1652
|
if (event.key === "ArrowUp" || event.key === "ArrowDown") return;
|
|
1647
1653
|
if (event.key === "Enter" && matchesFilter(menuItems, menuFilter).length > 0) return;
|
|
1648
|
-
} else if (hasMenus &&
|
|
1654
|
+
} else if (hasMenus && isCmdkNavigation(event)) event.stopPropagation();
|
|
1649
1655
|
if (event.key === "Enter" && !event.shiftKey && !event.ctrlKey && !event.metaKey) {
|
|
1650
1656
|
event.preventDefault();
|
|
1651
1657
|
if (status !== "streaming") handleSubmit();
|
|
1652
1658
|
}
|
|
1653
1659
|
};
|
|
1660
|
+
const handleOnFormKeyDown = (event) => {
|
|
1661
|
+
if (hasMenus && event.target !== textareaRef.current && isCmdkNavigation(event)) event.stopPropagation();
|
|
1662
|
+
};
|
|
1654
1663
|
const handleOnMouseDown = (event) => {
|
|
1655
|
-
|
|
1664
|
+
const { currentTarget, target } = event;
|
|
1665
|
+
if (target === textareaRef.current) return;
|
|
1666
|
+
if (!(target instanceof Node && currentTarget.contains(target))) return;
|
|
1656
1667
|
event.preventDefault();
|
|
1657
1668
|
textareaRef.current?.focus();
|
|
1658
1669
|
};
|
|
@@ -1661,6 +1672,7 @@ const PromptInput = ({ onSend, onAbort, onContinue, prefix, variant, suffix, att
|
|
|
1661
1672
|
children: /* @__PURE__ */ jsxs("form", {
|
|
1662
1673
|
"data-testid": "prompt-input",
|
|
1663
1674
|
"data-status": status,
|
|
1675
|
+
onKeyDown: handleOnFormKeyDown,
|
|
1664
1676
|
onMouseDown: handleOnMouseDown,
|
|
1665
1677
|
onSubmit: handleOnSubmit,
|
|
1666
1678
|
className: cn(promptInputVariants({ variant }), disabled && "tw:bg-none tw:border-border tw:shadow-[inset_0_100vw_rgb(var(--muted))] tw:cursor-default", className),
|
|
@@ -2204,7 +2216,7 @@ const ToolCallStatusHeader = ({ icon: IconComponent, iconSpin, status, text, nee
|
|
|
2204
2216
|
className: "tw:flex tw:min-w-0 tw:flex-1 tw:items-center tw:gap-1.5",
|
|
2205
2217
|
children: [/* @__PURE__ */ jsx(IconComponent, { className: cn("tw:size-3.5 tw:shrink-0", statusIconInk[status], iconSpin && "tw:animate-spin") }), /* @__PURE__ */ jsx("span", {
|
|
2206
2218
|
"data-testid": "tool-status-text",
|
|
2207
|
-
className: cn("tw:truncate tw:pr-0.5 tw:text-xs tw:font-medium", statusInk[status]),
|
|
2219
|
+
className: cn("tw:truncate tw:pr-0.5 tw:text-xs tw:font-medium", needsConfirmation ? "tw:text-foreground" : statusInk[status]),
|
|
2208
2220
|
children: text
|
|
2209
2221
|
})]
|
|
2210
2222
|
}), (needsConfirmation || isCollapsible) && /* @__PURE__ */ jsxs("div", {
|
|
@@ -2325,4 +2337,4 @@ const UsageStats = ({ value, alert = false, children, className, ariaLabel, alig
|
|
|
2325
2337
|
//#endregion
|
|
2326
2338
|
export { AnswerActions, AnswerSummary, ChatInlineIcon, CollapsibleStepHeader, DIAGRAM_LANGUAGES, FileDownloadChip, InlineStepDetail, InlineStepGroup, InlineStepLabel, Markdown, MarkdownTable, MessageBubble, PROMPT_INPUT_CONTAINER, PlanApproval, PlanRewritingIndicator, PromptInput, Question, QuestionBlock, SuggestedPrompt, ThinkingIndicator, ToolCallApproval, ToolCallChip, ToolCallStatusHeader, UsageBar, UsageStats, UsageStatsRing, clampPercentage, findMentionToken, findSlashToken, formatPercentage, getChatInlineIconName };
|
|
2327
2339
|
|
|
2328
|
-
//# sourceMappingURL=AIKit-
|
|
2340
|
+
//# sourceMappingURL=AIKit-DcOlHIBr.js.map
|