@ngrr/ds 0.1.18 → 0.1.21
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/AI.md +72 -16
- package/dist/23c7085d7b3822576b1824d3a25f84b78c7c8d8d.svg +7 -0
- package/dist/3f9502fdea06810ad8a11e1710479c909ad81bb2.svg +3 -0
- package/dist/components/atoms/Badge/Badge.d.ts +3 -2
- package/dist/components/atoms/Button/Button.d.ts +6 -1
- package/dist/components/atoms/Checkbox/Checkbox.d.ts +3 -1
- package/dist/components/atoms/Chip/Chip.d.ts +8 -1
- package/dist/components/atoms/Combobox/Combobox.d.ts +3 -2
- package/dist/components/atoms/DataTableHeaderCell/DataTableHeaderCell.d.ts +4 -1
- package/dist/components/atoms/MenuCell/MenuCell.d.ts +4 -0
- package/dist/components/atoms/Select/Select.d.ts +8 -1
- package/dist/components/molecules/Breadcrumbs/BreadcrumbsLarge.d.ts +28 -0
- package/dist/components/molecules/Breadcrumbs/index.d.ts +2 -2
- package/dist/components/molecules/ChoiceList/ChoiceList.d.ts +2 -3
- package/dist/components/molecules/PopoverWrapper/PopoverWrapper.d.ts +2 -1
- package/dist/components/molecules/Toolbar/Toolbar.d.ts +1 -1
- package/dist/components/organisms/Navbar/Navbar.d.ts +4 -4
- package/dist/components/organisms/PopoverMenu/PopoverMenu.d.ts +0 -2
- package/dist/ds-nagarro.es.js +44185 -34916
- package/dist/ds-nagarro.umd.js +32 -309
- package/dist/ds.css +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/stories/StoryUI/StoryUIPanel.d.ts +6 -0
- package/dist/stories/StoryUI/voice/VoiceCanvas.d.ts +20 -0
- package/dist/stories/StoryUI/voice/VoiceControls.d.ts +11 -0
- package/dist/stories/StoryUI/voice/canvas/componentRegistry.d.ts +13 -0
- package/dist/stories/StoryUI/voice/types.d.ts +82 -0
- package/dist/stories/StoryUI/voice/useVoiceInput.d.ts +2 -0
- package/dist/stories/StoryUI/voice/voiceCommands.d.ts +10 -0
- package/dist/tokens.css +1 -0
- package/package.json +23 -15
- package/dist/components/molecules/Breadcrumbs/BreadcrumbsController.d.ts +0 -23
- package/dist/style.css +0 -1
package/AI.md
CHANGED
|
@@ -112,7 +112,7 @@ Always use these exact identifiers. Never use `base`, `normal`, or `rest`.
|
|
|
112
112
|
`AppShell` is the only permitted root layout wrapper. Every page must be inside it. Do not invent wrapper divs or custom layouts.
|
|
113
113
|
```tsx
|
|
114
114
|
import { AppShell, Navbar, Sidebar, Button, SearchBar, Avatar } from '@ngrr/ds';
|
|
115
|
-
// Icons come from lucide-react —
|
|
115
|
+
// Icons come from lucide-react — bundled inside @ngrr/ds, no separate install needed
|
|
116
116
|
import { LayoutDashboard, FolderKanban, CheckSquare, Users, FileText, Settings } from 'lucide-react';
|
|
117
117
|
|
|
118
118
|
<AppShell
|
|
@@ -234,7 +234,7 @@ import { LayoutDashboard, FolderKanban, CheckSquare, Users, FileText, Settings }
|
|
|
234
234
|
- No back arrow on top-level pages: Dashboard, Projects, Tasks, People, Notes
|
|
235
235
|
- CTA hierarchy: Primary (object creation, rightmost in Navbar) → Secondary → Ghost (Export, Share, Edit)
|
|
236
236
|
- All labels and copy: sentence case always ("New project" not "New Project")
|
|
237
|
-
- Icons: from `lucide-react` —
|
|
237
|
+
- Icons: from `lucide-react` — bundled inside `@ngrr/ds`, no separate install needed
|
|
238
238
|
- Tag variants: `success` = completed, `progress` = in progress, `warning` = at risk, `neutral` = not started
|
|
239
239
|
- Settings and User Name always pinned to sidebar bottom via `bottomContent`
|
|
240
240
|
- Sidebar always full viewport height — guaranteed by AppShell CSS rules above
|
|
@@ -310,7 +310,7 @@ There are two breadcrumb sizes and they serve different purposes:
|
|
|
310
310
|
|
|
311
311
|
| Variant | Where | Purpose |
|
|
312
312
|
|---|---|---|
|
|
313
|
-
| **Large** (`
|
|
313
|
+
| **Large** (`BreadcrumbsLarge`) | Navbar | Main navigation hierarchy — replaces page title on detail views |
|
|
314
314
|
| **Small** (`Breadcrumbs`) | Inside page content | Sub-section hierarchy within a detail page |
|
|
315
315
|
|
|
316
316
|
NEVER use small breadcrumbs for main navigation.
|
|
@@ -437,27 +437,45 @@ Never use hardcoded hex values or generic semantic tokens for dataviz color.
|
|
|
437
437
|
---
|
|
438
438
|
|
|
439
439
|
### LCB-03: Horizontal spacing — always use `--page-margin-x`
|
|
440
|
-
|
|
441
|
-
This applies to every container without exception: pages, cards, modals, drawers, tables, lists, and form sections.
|
|
442
|
-
Never introduce independent `padding-left`, `padding-right`, `margin-left`, or `margin-right` values that deviate from this token.
|
|
440
|
+
`var(--page-margin-x)` is the horizontal breathing room for page content. Apply it as `padding-inline` on your own layout wrapper elements inside the content area. Never apply it directly to DS-Nagarro components — they manage their own internal spacing.
|
|
443
441
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
442
|
+
```tsx
|
|
443
|
+
// CORRECT — applied to your own wrapper div inside AppShell's content slot
|
|
444
|
+
<AppShell ...>
|
|
445
|
+
<div style={{ paddingInline: 'var(--page-margin-x)' }}>
|
|
446
|
+
{/* page content here */}
|
|
447
|
+
</div>
|
|
448
|
+
</AppShell>
|
|
449
|
+
|
|
450
|
+
// WRONG
|
|
451
|
+
<Navbar style={{ paddingInline: 'var(--page-margin-x)' }} /> // DS-Nagarro component — never
|
|
452
|
+
padding: 24px // hardcoded value — never
|
|
453
|
+
margin: 0 16px // hardcoded value — never
|
|
454
|
+
```
|
|
447
455
|
|
|
448
456
|
---
|
|
449
457
|
|
|
450
458
|
### LCB-04: Card internal padding — content must never touch card edges
|
|
451
|
-
|
|
452
|
-
Content must never touch the card border.
|
|
459
|
+
`Card` has three areas: an optional header (`SectionHeader`), a content area (`children`), and an optional bottom bar (`Toolbar`). The header and bottom bar are pre-built component instances — never add padding, margin, or gap to them. The content area has no built-in padding — always wrap `children` in a div with `padding: var(--inset-large)` so content never touches the card edges.
|
|
453
460
|
|
|
454
|
-
|
|
455
|
-
|
|
461
|
+
```tsx
|
|
462
|
+
// CORRECT
|
|
463
|
+
<Card title="Team members">
|
|
464
|
+
<div style={{ padding: 'var(--inset-large)' }}>
|
|
465
|
+
{/* content here */}
|
|
466
|
+
</div>
|
|
467
|
+
</Card>
|
|
468
|
+
|
|
469
|
+
// WRONG
|
|
470
|
+
<SectionHeader style={{ padding: 'var(--inset-small)' }} /> // pre-built instance — never
|
|
471
|
+
<Toolbar style={{ padding: 'var(--inset-small)' }} /> // pre-built instance — never
|
|
472
|
+
// Card children with no padding wrapper — content touches card edges
|
|
473
|
+
```
|
|
456
474
|
|
|
457
475
|
---
|
|
458
476
|
|
|
459
477
|
### LCB-05: Icons — always use Lucide, never system icons
|
|
460
|
-
The only permitted icon library is Lucide (`lucide-react`).
|
|
478
|
+
The only permitted icon library is Lucide (`lucide-react`). It is bundled inside `@ngrr/ds` — no separate install is needed.
|
|
461
479
|
Never use browser/OS-native icons, emoji, or icons from any other library.
|
|
462
480
|
This applies everywhere: tables, buttons, inputs, menus, empty states, and all other components.
|
|
463
481
|
|
|
@@ -476,6 +494,42 @@ Never let list items float at an arbitrary width or leave unexplained whitespace
|
|
|
476
494
|
|
|
477
495
|
---
|
|
478
496
|
|
|
497
|
+
### LCB-06b: DataTable multi-selection — BulkActionBar placement
|
|
498
|
+
When a DataTable supports row selection, selecting one or more rows must show a `BulkActionBar` fixed at the bottom center of the table's container. The bar is dismissed via its × button, which must clear the entire selection.
|
|
499
|
+
|
|
500
|
+
`BulkActionBar` only accepts a `className` prop for styling — it has no `style` prop. Positioning must go on a wrapper div around the component.
|
|
501
|
+
|
|
502
|
+
```tsx
|
|
503
|
+
// Table container must be position: relative
|
|
504
|
+
<div style={{ position: 'relative' }}>
|
|
505
|
+
<DataTable ... />
|
|
506
|
+
{selectedCount > 0 && (
|
|
507
|
+
<div style={{
|
|
508
|
+
position: 'absolute',
|
|
509
|
+
bottom: 'var(--inset-large)',
|
|
510
|
+
left: '50%',
|
|
511
|
+
transform: 'translateX(-50%)',
|
|
512
|
+
}}>
|
|
513
|
+
<BulkActionBar
|
|
514
|
+
selectedCount={selectedCount}
|
|
515
|
+
actions={actions}
|
|
516
|
+
onDismiss={handleClearSelection}
|
|
517
|
+
/>
|
|
518
|
+
</div>
|
|
519
|
+
)}
|
|
520
|
+
</div>
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
Rules:
|
|
524
|
+
- Only render when `selectedCount > 0` — never mount with zero selected items
|
|
525
|
+
- Always centered horizontally: `left: 50%` + `transform: translateX(-50%)`
|
|
526
|
+
- Always `var(--inset-large)` from the bottom of the table container
|
|
527
|
+
- Table container must be `position: relative` — never position relative to the viewport
|
|
528
|
+
- Action labels must be count-aware: `"Delete 3"` not `"Delete"`
|
|
529
|
+
- `onDismiss` must clear the entire selection, not just hide the bar
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
479
533
|
### LCB-07: Placeholder content — never leave it in place
|
|
480
534
|
Component slots for icons, help text, and hint icons must never contain placeholder values.
|
|
481
535
|
Either replace with real, meaningful content or hide the slot entirely.
|
|
@@ -2066,9 +2120,11 @@ export const DisabledVariant: Story = {
|
|
|
2066
2120
|
### Layout and placement
|
|
2067
2121
|
- ❌ Build page layout manually with divs — always use `AppShell`.
|
|
2068
2122
|
- ❌ Apply scroll to the full page or AppShell root — only the content area scrolls.
|
|
2069
|
-
- ❌
|
|
2123
|
+
- ❌ Apply `padding-inline: var(--page-margin-x)` to a DS-Nagarro component — only to your own wrapper div inside the content area.
|
|
2124
|
+
- ❌ Use hardcoded `padding-left`, `padding-right`, `margin-left`, or `margin-right` — always use `var(--page-margin-x)` on your own wrapper elements.
|
|
2070
2125
|
- ❌ Add padding, margin, gap, or any spacing override directly to a DS-Nagarro component element. All components have internal spacing built in — overriding it breaks their proportions. To space components relative to each other, apply spacing tokens to wrapper/container elements only.
|
|
2071
|
-
- ❌
|
|
2126
|
+
- ❌ Add padding, margin, or gap to the Card header (`SectionHeader`) or bottom bar (`Toolbar`) — they are pre-built component instances with their own spacing.
|
|
2127
|
+
- ❌ Leave Card `children` without a padding wrapper — always wrap in a div with `padding: var(--inset-large)`.
|
|
2072
2128
|
- ❌ Leave list items undersized — always stretch to full container width.
|
|
2073
2129
|
- ❌ Mix Tab and CustomView tab types in the same row.
|
|
2074
2130
|
- ❌ Nest tabs within tabs.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 2.58333 11.9167" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Icon">
|
|
3
|
+
<path d="M1.29167 6.625C1.65986 6.625 1.95833 6.32652 1.95833 5.95833C1.95833 5.59014 1.65986 5.29167 1.29167 5.29167C0.923477 5.29167 0.625 5.59014 0.625 5.95833C0.625 6.32652 0.923477 6.625 1.29167 6.625Z" stroke="var(--stroke-0, #565860)" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M1.29167 1.95833C1.65986 1.95833 1.95833 1.65986 1.95833 1.29167C1.95833 0.923477 1.65986 0.625 1.29167 0.625C0.923477 0.625 0.625 0.923477 0.625 1.29167C0.625 1.65986 0.923477 1.95833 1.29167 1.95833Z" stroke="var(--stroke-0, #565860)" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M1.29167 11.2917C1.65986 11.2917 1.95833 10.9932 1.95833 10.625C1.95833 10.2568 1.65986 9.95833 1.29167 9.95833C0.923477 9.95833 0.625 10.2568 0.625 10.625C0.625 10.9932 0.923477 11.2917 1.29167 11.2917Z" stroke="var(--stroke-0, #565860)" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 7.91667 7.91667" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path id="Icon" d="M0.625 7.29167L7.29167 0.625M7.29167 0.625H0.625M7.29167 0.625V7.29167" stroke="var(--stroke-0, #565860)" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type BadgeSize = 'sm' | 'lg' | 'dot';
|
|
2
|
-
export type BadgeVariant = 'highlight-soft' | 'highlight-strong' | 'informative' | 'critical';
|
|
2
|
+
export type BadgeVariant = 'highlight-soft' | 'highlight-strong' | 'informative' | 'inverted' | 'critical';
|
|
3
3
|
export interface BadgeProps {
|
|
4
4
|
/**
|
|
5
5
|
* Visual size of the badge.
|
|
@@ -14,7 +14,8 @@ export interface BadgeProps {
|
|
|
14
14
|
* - `highlight-soft` — light teal bg, teal text.
|
|
15
15
|
* - `highlight-strong` — filled teal bg, white text.
|
|
16
16
|
* - `informative` — neutral gray bg, secondary text.
|
|
17
|
-
* - `
|
|
17
|
+
* - `inverted` — dark neutral bg, white text (Figma: Inverted).
|
|
18
|
+
* - `critical` — danger red bg, white text (urgent/errors).
|
|
18
19
|
* @default 'highlight-soft'
|
|
19
20
|
*/
|
|
20
21
|
variant?: BadgeVariant;
|
|
@@ -121,6 +121,11 @@ export interface ButtonProps {
|
|
|
121
121
|
'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
122
122
|
/** Additional CSS class names. */
|
|
123
123
|
className?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Overrides the default tab order. Use `-1` to remove the button from
|
|
126
|
+
* sequential keyboard navigation while keeping it accessible to AT browse mode.
|
|
127
|
+
*/
|
|
128
|
+
tabIndex?: number;
|
|
124
129
|
}
|
|
125
130
|
/**
|
|
126
131
|
* **Button** — triggers an action.
|
|
@@ -154,5 +159,5 @@ export interface ButtonProps {
|
|
|
154
159
|
* <Button loading>Saving…</Button>
|
|
155
160
|
* ```
|
|
156
161
|
*/
|
|
157
|
-
export declare function Button({ variant, size, disabled, loading, destructive, showLeadingIcon, leadingIcon, showLabel, children, showTrailingIcon, trailingIcon, shortcut, shortcutLabel, shortcutAriaLabel, type, onClick, 'aria-label': ariaLabel, 'aria-haspopup': ariaHasPopup, className, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
162
|
+
export declare function Button({ variant, size, disabled, loading, destructive, showLeadingIcon, leadingIcon, showLabel, children, showTrailingIcon, trailingIcon, shortcut, shortcutLabel, shortcutAriaLabel, type, onClick, 'aria-label': ariaLabel, 'aria-haspopup': ariaHasPopup, className, tabIndex, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
158
163
|
export default Button;
|
|
@@ -40,8 +40,10 @@ export interface CheckboxProps {
|
|
|
40
40
|
switcherChecked?: boolean;
|
|
41
41
|
onSwitcherChange?: (checked: boolean) => void;
|
|
42
42
|
onCheckedChange?: (checked: boolean) => void;
|
|
43
|
+
/** When true, checkbox stretches to full width (e.g. in choice lists). Default is wrap content (e.g. toolbar). */
|
|
44
|
+
fullWidth?: boolean;
|
|
43
45
|
className?: string;
|
|
44
46
|
'aria-label'?: string;
|
|
45
47
|
}
|
|
46
|
-
export declare function Checkbox({ size, checked, indeterminate, disabled, label, description, descriptionRight, showContent, showLabel, showDescription, showDescriptionRight, showAvatar, avatarProps, showLeadingIcon, leadingIcon, showTrailingIcon, trailingIcon, showBadge, badgeCount, badgeSize, badgeVariant, showTag, tagLabel, tagVariant, showButtons, actionAriaLabel, onActionClick, showSwitcherRight, switcherChecked, onSwitcherChange, onCheckedChange, className, 'aria-label': ariaLabel, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare function Checkbox({ size, checked, indeterminate, disabled, label, description, descriptionRight, showContent, showLabel, showDescription, showDescriptionRight, showAvatar, avatarProps, showLeadingIcon, leadingIcon, showTrailingIcon, trailingIcon, showBadge, badgeCount, badgeSize, badgeVariant, showTag, tagLabel, tagVariant, showButtons, actionAriaLabel, onActionClick, showSwitcherRight, switcherChecked, onSwitcherChange, onCheckedChange, fullWidth, className, 'aria-label': ariaLabel, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
47
49
|
export default Checkbox;
|
|
@@ -55,6 +55,13 @@ export interface ChipProps {
|
|
|
55
55
|
* Calling `onDismiss` removes the chip value; it does NOT toggle selection.
|
|
56
56
|
*/
|
|
57
57
|
onDismiss?: () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Ref to focus when this chip is dismissed and there are no adjacent chips
|
|
60
|
+
* to move focus to — e.g. the search input in a combobox chip stack.
|
|
61
|
+
* When omitted, focus moves to the nearest sibling dismiss button if one
|
|
62
|
+
* exists; otherwise focus is left unmanaged.
|
|
63
|
+
*/
|
|
64
|
+
dismissFocusFallback?: React.RefObject<HTMLElement | null>;
|
|
58
65
|
/**
|
|
59
66
|
* Click / keyboard handler invoked when the user toggles the chip.
|
|
60
67
|
* The consumer is responsible for updating `selected` in response.
|
|
@@ -79,5 +86,5 @@ export interface ChipGroupProps {
|
|
|
79
86
|
/** Additional CSS class names merged onto the group element. */
|
|
80
87
|
className?: string;
|
|
81
88
|
}
|
|
82
|
-
export declare function Chip({ label, selected, disabled, size, leadingIcon, trailingIcon, showLeadingIcon, showTrailingIcon, onDismiss, onClick, className, 'aria-label': ariaLabel, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
export declare function Chip({ label, selected, disabled, size, leadingIcon, trailingIcon, showLeadingIcon, showTrailingIcon, onDismiss, onClick, className, 'aria-label': ariaLabel, dismissFocusFallback, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
83
90
|
export declare function ChipGroup({ label, children, className }: ChipGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -31,9 +31,10 @@ export interface ComboboxProps {
|
|
|
31
31
|
onValuesChange?: (values: string[], options: ComboboxOption[]) => void;
|
|
32
32
|
onOpenChange?: (open: boolean) => void;
|
|
33
33
|
onInputChange?: (query: string) => void;
|
|
34
|
-
|
|
34
|
+
/** Gap between trigger and dropdown (default 4 = --space-tiny). Use for consistent alignment e.g. inside DateTimePicker. */
|
|
35
|
+
popoverOffset?: number;
|
|
35
36
|
'aria-label'?: string;
|
|
36
37
|
'aria-labelledby'?: string;
|
|
37
38
|
}
|
|
38
|
-
export declare function Combobox({ selectionMode, id, label, showLabel, placeholder, options, value, defaultValue, values, defaultValues, open, defaultOpen, disabled, error, helperText, showHelper, errorMessage, required, helperIcon, className, name, onChange, onValuesChange, onOpenChange, onInputChange,
|
|
39
|
+
export declare function Combobox({ selectionMode, id, label, showLabel, placeholder, options, value, defaultValue, values, defaultValues, open, defaultOpen, disabled, error, helperText, showHelper, errorMessage, required, helperIcon, className, name, onChange, onValuesChange, onOpenChange, onInputChange, popoverOffset, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
39
40
|
export default Combobox;
|
|
@@ -28,6 +28,9 @@ export interface DataTableHeaderCellProps {
|
|
|
28
28
|
leadingAccessory?: React.ReactNode;
|
|
29
29
|
className?: string;
|
|
30
30
|
'aria-label'?: string;
|
|
31
|
+
/** When true, omits role="columnheader" and aria-sort from the root div.
|
|
32
|
+
* Use when the div is already inside a <th scope="col"> that carries those attributes. */
|
|
33
|
+
noRole?: boolean;
|
|
31
34
|
}
|
|
32
|
-
export declare function DataTableHeaderCell({ variant, state, label, width, sortable, sortDirection, reorderable, resizable, checkboxChecked, checkboxIndeterminate, onCheckboxChange, onSortChange, onResizeCommand, onResizePointerDown, onMoreClick, onReorderDragStart, onReorderDragEnd, filterValue: _filterValue, onFilterChange: _onFilterChange, leadingAccessory, className, 'aria-label': ariaLabel, }: DataTableHeaderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare function DataTableHeaderCell({ variant, state, label, width, sortable, sortDirection, reorderable, resizable, checkboxChecked, checkboxIndeterminate, onCheckboxChange, onSortChange, onResizeCommand, onResizePointerDown, onMoreClick, onReorderDragStart, onReorderDragEnd, filterValue: _filterValue, onFilterChange: _onFilterChange, leadingAccessory, className, 'aria-label': ariaLabel, noRole, }: DataTableHeaderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
33
36
|
export default DataTableHeaderCell;
|
|
@@ -41,6 +41,10 @@ export interface MenuCellProps {
|
|
|
41
41
|
tabIndex?: number;
|
|
42
42
|
className?: string;
|
|
43
43
|
'aria-label'?: string;
|
|
44
|
+
/** Override the default "menuitem" role — pass "option" when MenuCell is used inside a listbox. */
|
|
45
|
+
role?: React.AriaRole;
|
|
46
|
+
/** Conveys selection state when role="option" (listbox pattern). */
|
|
47
|
+
'aria-selected'?: boolean;
|
|
44
48
|
}
|
|
45
49
|
export declare const MenuCell: React.ForwardRefExoticComponent<MenuCellProps & React.RefAttributes<HTMLElement>>;
|
|
46
50
|
export default MenuCell;
|
|
@@ -7,6 +7,7 @@ export interface SelectOption {
|
|
|
7
7
|
}
|
|
8
8
|
export interface SelectProps {
|
|
9
9
|
id?: string;
|
|
10
|
+
/** Optional visible label above the control. Omit to use only the control (e.g. inline); ensure aria-label is set for accessibility. */
|
|
10
11
|
label?: string;
|
|
11
12
|
placeholder?: string;
|
|
12
13
|
options?: SelectOption[];
|
|
@@ -16,10 +17,16 @@ export interface SelectProps {
|
|
|
16
17
|
defaultOpen?: boolean;
|
|
17
18
|
disabled?: boolean;
|
|
18
19
|
error?: boolean;
|
|
20
|
+
/** Optional help text below the control. */
|
|
19
21
|
helperText?: string;
|
|
20
22
|
errorMessage?: string;
|
|
21
23
|
required?: boolean;
|
|
24
|
+
/** Optional icon next to help text. Only shown when helperText or errorMessage is present. */
|
|
22
25
|
helperIcon?: React.ReactNode;
|
|
26
|
+
/** When true, shows a leading icon in the control. Pass leadingIcon with a contextual icon (e.g. matching the label). */
|
|
27
|
+
icon?: boolean;
|
|
28
|
+
/** Icon shown at the start of the control when icon is true. Should be contextual with the label (e.g. globe for "Country"). */
|
|
29
|
+
leadingIcon?: React.ReactNode;
|
|
23
30
|
className?: string;
|
|
24
31
|
name?: string;
|
|
25
32
|
onChange?: (value: string, option: SelectOption) => void;
|
|
@@ -27,5 +34,5 @@ export interface SelectProps {
|
|
|
27
34
|
'aria-label'?: string;
|
|
28
35
|
'aria-labelledby'?: string;
|
|
29
36
|
}
|
|
30
|
-
export declare function Select({ id, label, placeholder, options, value, defaultValue, open, defaultOpen, disabled, error, helperText, errorMessage, required, helperIcon, className, name, onChange, onOpenChange, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare function Select({ id, label, placeholder, options, value, defaultValue, open, defaultOpen, disabled, error, helperText, errorMessage, required, helperIcon, icon, leadingIcon, className, name, onChange, onOpenChange, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
31
38
|
export default Select;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type BreadcrumbLargeItemVariant = 'previous' | 'current' | 'ellipsis';
|
|
3
|
+
export interface BreadcrumbLargeItem {
|
|
4
|
+
id?: string;
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
variant?: BreadcrumbLargeItemVariant;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** When true, shows a chevron (e.g. for items that open a dropdown). Default false. */
|
|
9
|
+
showDisclosure?: boolean;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>, item: BreadcrumbLargeItem, index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface BreadcrumbsLargeProps {
|
|
14
|
+
items: BreadcrumbLargeItem[];
|
|
15
|
+
maxVisibleItems?: number;
|
|
16
|
+
showEllipsis?: boolean;
|
|
17
|
+
ellipsisLabel?: string;
|
|
18
|
+
ellipsisAriaLabel?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
'aria-label'?: string;
|
|
21
|
+
onItemClick?: (event: React.MouseEvent<HTMLButtonElement>, item: BreadcrumbLargeItem, index: number) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Large breadcrumbs for page-level navigation, typically in the Navbar.
|
|
25
|
+
* Replaces the page title on detail views with a hierarchical trail.
|
|
26
|
+
*/
|
|
27
|
+
export declare function BreadcrumbsLarge({ items, maxVisibleItems, showEllipsis, ellipsisLabel, ellipsisAriaLabel, className, 'aria-label': ariaLabel, onItemClick, }: BreadcrumbsLargeProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export default BreadcrumbsLarge;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Breadcrumbs } from './Breadcrumbs';
|
|
2
2
|
export type { BreadcrumbsProps, BreadcrumbItem } from './Breadcrumbs';
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
3
|
+
export { BreadcrumbsLarge } from './BreadcrumbsLarge';
|
|
4
|
+
export type { BreadcrumbsLargeProps, BreadcrumbLargeItem, BreadcrumbLargeItemVariant, } from './BreadcrumbsLarge';
|
|
@@ -25,15 +25,14 @@ export interface ChoiceListSection {
|
|
|
25
25
|
items: ChoiceListItem[];
|
|
26
26
|
}
|
|
27
27
|
export interface ChoiceListProps {
|
|
28
|
+
/** Used for aria-label on the root section. */
|
|
28
29
|
title?: string;
|
|
29
|
-
description?: string;
|
|
30
30
|
sections: ChoiceListSection[];
|
|
31
|
-
showHeader?: boolean;
|
|
32
31
|
showSectionHeaders?: boolean;
|
|
33
32
|
className?: string;
|
|
34
33
|
sectionClassName?: string;
|
|
35
34
|
enableMenuKeyboardNavigation?: boolean;
|
|
36
35
|
onMenuEscape?: () => void;
|
|
37
36
|
}
|
|
38
|
-
export declare function ChoiceList({ title,
|
|
37
|
+
export declare function ChoiceList({ title, sections, showSectionHeaders, className, sectionClassName, enableMenuKeyboardNavigation, onMenuEscape, }: ChoiceListProps): import("react/jsx-runtime").JSX.Element;
|
|
39
38
|
export default ChoiceList;
|
|
@@ -2,6 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
export type PopoverWrapperRole = 'menu' | 'dialog' | 'listbox' | 'group';
|
|
3
3
|
export type PopoverWrapperContentPadding = 'none' | 'small';
|
|
4
4
|
export interface PopoverWrapperProps {
|
|
5
|
+
id?: string;
|
|
5
6
|
header?: React.ReactNode;
|
|
6
7
|
segment?: React.ReactNode;
|
|
7
8
|
search?: React.ReactNode;
|
|
@@ -19,5 +20,5 @@ export interface PopoverWrapperProps {
|
|
|
19
20
|
minWidth?: number;
|
|
20
21
|
'aria-label'?: string;
|
|
21
22
|
}
|
|
22
|
-
export declare function PopoverWrapper({ header, segment, search, content, bottomBar, role, width, contentPadding, className, contentClassName, anchorRef, offset, viewportMargin, matchAnchorWidth, minWidth, 'aria-label': ariaLabel, }: PopoverWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function PopoverWrapper({ id, header, segment, search, content, bottomBar, role, width, contentPadding, className, contentClassName, anchorRef, offset, viewportMargin, matchAnchorWidth, minWidth, 'aria-label': ariaLabel, }: PopoverWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export default PopoverWrapper;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export type ToolbarSize = 'lg' | 'md' | 'sm';
|
|
3
|
-
export type ToolbarVariant = 'default' | 'filter-bar';
|
|
3
|
+
export type ToolbarVariant = 'default' | 'filter-bar' | 'plain';
|
|
4
4
|
export interface ToolbarProps {
|
|
5
5
|
size?: ToolbarSize;
|
|
6
6
|
variant?: ToolbarVariant;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BreadcrumbLargeItem, BreadcrumbsLargeProps } from '../../molecules/Breadcrumbs';
|
|
3
3
|
export type NavbarVariant = 'title' | 'breadcrumbs';
|
|
4
4
|
export interface NavbarProps {
|
|
5
5
|
variant?: NavbarVariant;
|
|
@@ -9,9 +9,9 @@ export interface NavbarProps {
|
|
|
9
9
|
descriptionIcon?: React.ReactNode;
|
|
10
10
|
leftActions?: React.ReactNode;
|
|
11
11
|
rightActions?: React.ReactNode;
|
|
12
|
-
breadcrumbItems?:
|
|
13
|
-
breadcrumbMaxVisibleItems?:
|
|
14
|
-
breadcrumbShowEllipsis?:
|
|
12
|
+
breadcrumbItems?: BreadcrumbLargeItem[];
|
|
13
|
+
breadcrumbMaxVisibleItems?: BreadcrumbsLargeProps['maxVisibleItems'];
|
|
14
|
+
breadcrumbShowEllipsis?: BreadcrumbsLargeProps['showEllipsis'];
|
|
15
15
|
responsiveCollapse?: boolean;
|
|
16
16
|
backOnlyBreakpointPx?: number;
|
|
17
17
|
backLabel?: string;
|