@capra/core 1.8.2 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +294 -46
- package/dist/index.d.cts +132 -20
- package/dist/index.d.mts +132 -20
- package/dist/index.mjs +295 -49
- package/dist/style.css +251 -72
- package/docs/core-alert--usage.md +2 -0
- package/docs/core-anchor--usage.md +2 -0
- package/docs/core-autocompletefield--usage.md +2 -0
- package/docs/core-badge--design.md +10 -5
- package/docs/core-badge--usage.md +5 -2
- package/docs/core-breadcrumbs--usage.md +2 -0
- package/docs/core-button--usage.md +2 -0
- package/docs/core-buttonlink--usage.md +2 -0
- package/docs/core-checkbox--usage.md +2 -0
- package/docs/core-collapse--usage.md +2 -0
- package/docs/core-datepickerfield--usage.md +2 -0
- package/docs/core-daterangepickerfield--usage.md +2 -0
- package/docs/core-divider--usage.md +2 -0
- package/docs/core-emptystate--usage.md +2 -0
- package/docs/core-helpertext--usage.md +2 -0
- package/docs/core-iconbutton--usage.md +2 -0
- package/docs/core-inputrow--usage.md +2 -0
- package/docs/core-label--usage.md +2 -0
- package/docs/core-link--usage.md +2 -0
- package/docs/core-listitem--usage.md +2 -0
- package/docs/core-menu--usage.md +2 -0
- package/docs/core-modal--usage.md +2 -0
- package/docs/core-pagination--usage.md +2 -0
- package/docs/core-pill--usage.md +2 -0
- package/docs/core-radio--usage.md +2 -0
- package/docs/core-radiogroup--usage.md +2 -0
- package/docs/core-radiotile--usage.md +2 -0
- package/docs/core-ribbon--usage.md +2 -0
- package/docs/core-skeleton--usage.md +1 -2
- package/docs/core-skeletongroup--usage.md +0 -1
- package/docs/core-spinner--usage.md +2 -0
- package/docs/core-switch--usage.md +2 -0
- package/docs/core-tabnav--usage.md +2 -0
- package/docs/core-tag--usage.md +2 -0
- package/docs/core-text--usage.md +2 -0
- package/docs/core-textarea--usage.md +2 -0
- package/docs/core-textinput--usage.md +2 -0
- package/docs/core-tooltip--usage.md +2 -0
- package/docs/core-topnav--usage.md +2 -0
- package/docs/core-tree--design.md +31 -0
- package/docs/core-tree--usage.md +102 -0
- package/docs/core-verticalnavigation--usage.md +2 -0
- package/docs/history-changelogs-capra-core--docs.md +34 -0
- package/docs/index.md +2 -0
- package/package.json +7 -7
|
@@ -10,6 +10,8 @@ The `Breadcrumbs` component is partially implemented and does not yet support dr
|
|
|
10
10
|
|
|
11
11
|
| Prop | Type | Required | Default | Description |
|
|
12
12
|
| --- | --- | --- | --- | --- |
|
|
13
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
14
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
13
15
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
14
16
|
| `aria-label` | `string` | No | 'Breadcrumb' | Accessible name for the breadcrumb navigation landmark.<br>Defaults to `"Breadcrumb"`. |
|
|
15
17
|
| `size` | `string` | No | 'md' | `--` |
|
|
@@ -14,4 +14,6 @@ Primary interactive element displaying text and supporting leading and trailing
|
|
|
14
14
|
| `trailingIcon` | `SvgIcon` | No | `--` | Icon to display after the button text. |
|
|
15
15
|
| `block` | `boolean` | No | `--` | Whether to display the button as a block-level (full-width) component. Defaults to `false`. |
|
|
16
16
|
| `onClick` | `React.ComponentProps<'button'>['onClick']` | No | `--` | Click handler for the button. |
|
|
17
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
18
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
17
19
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -21,4 +21,6 @@ Primary interactive element displaying text and supporting leading and trailing
|
|
|
21
21
|
| `download` | `boolean \| string` | No | `--` | Causes the browser to download the linked URL. A string may be provided to suggest a file name. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download). |
|
|
22
22
|
| `referrerPolicy` | `HTMLAttributeReferrerPolicy` | No | `--` | How much of the referrer to send when following the link. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#referrerpolicy). |
|
|
23
23
|
| `routerOptions` | `unknown` | No | `--` | Options for the configured client side router. |
|
|
24
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
25
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
24
26
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -8,6 +8,8 @@ Checkbox component for capturing boolean user input. Supports controlled and unc
|
|
|
8
8
|
| `checked` | `boolean` | No | `--` | Controlled checked state. Use with onChange for controlled component. |
|
|
9
9
|
| `defaultChecked` | `boolean` | No | `--` | Default checked state for uncontrolled component. |
|
|
10
10
|
| `children` | `string \| React.ReactNode` | No | `--` | The label for the checkbox. |
|
|
11
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
12
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
11
13
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
12
14
|
|
|
13
15
|
## Integration Notes
|
|
@@ -4,6 +4,8 @@ A collapsible disclosure section with an expandable header and panel. Pass **`ti
|
|
|
4
4
|
|
|
5
5
|
| Prop | Type | Required | Default | Description |
|
|
6
6
|
| --- | --- | --- | --- | --- |
|
|
7
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
8
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
7
9
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
8
10
|
| `title` | `string` | Yes | `--` | Plain string title rendered in the disclosure heading. |
|
|
9
11
|
| `headerTrailingContentSlot` | `React.ReactNode` | No | `--` | Trailing header region for actions (switches, buttons, etc.). |
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
| `label` | `string` | No | `--` | Label for the field. Required for accessibility; use aria-label if another element acts as label. |
|
|
7
7
|
| `layout` | `'vertical' \| 'horizontal'` | No | `--` | Label and field layout: vertical (label above) or horizontal (label on leading side). Prefer vertical; use horizontal when space is limited. |
|
|
8
8
|
| `granularity` | `'day' \| 'second'` | No | `--` | Smallest date/time unit shown in the field. Only `day` and `second` are supported. |
|
|
9
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
10
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
9
11
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
10
12
|
| `canClear` | `boolean` | No | `--` | When true, shows a clear control to the left of the calendar button while the field has a value. |
|
|
11
13
|
| `disabled` | `boolean` | No | `--` | Disables the field. |
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
| `layout` | `'vertical' \| 'horizontal'` | No | `--` | Label and field layout: vertical (label above) or horizontal (label on leading side). Prefer vertical; use horizontal when space is limited. |
|
|
8
8
|
| `placeholder` | `unknown` | No | `--` | Placeholders for empty start and end, shown with a swap icon between them when the group is not focus-within. |
|
|
9
9
|
| `granularity` | `'day' \| 'second'` | No | `--` | Smallest date/time unit shown in the fields. Only `day` and `second` are supported. |
|
|
10
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
11
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
10
12
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
11
13
|
| `canClear` | `boolean` | No | `--` | When true, shows a clear control to the left of the calendar button while the field has a value. |
|
|
12
14
|
| `disabled` | `boolean` | No | `--` | Disables the field. |
|
|
@@ -4,5 +4,7 @@ Divider separates and groups content. Use horizontal dividers between sections;
|
|
|
4
4
|
|
|
5
5
|
| Prop | Type | Required | Default | Description |
|
|
6
6
|
| --- | --- | --- | --- | --- |
|
|
7
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
8
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
7
9
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
8
10
|
| `type` | `string` | No | 'horizontal' | `--` |
|
|
@@ -10,4 +10,6 @@ The EmptyState component is used to display a message when there is no data to d
|
|
|
10
10
|
| `title` | `string` | Yes | `--` | The title to display in the empty state. |
|
|
11
11
|
| `description` | `string` | No | `--` | The description to display in the empty state. Please do not skip this property without a good reason. |
|
|
12
12
|
| `children` | `React.ReactNode` | No | `--` | Generic use for adding a button or other action elements below the description. |
|
|
13
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
14
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
13
15
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -8,4 +8,6 @@ Helper text for inputs.
|
|
|
8
8
|
| `children` | `string` | No | `--` | Main text. Use for hints, requirements, disclaimers, etc. |
|
|
9
9
|
| `countText` | `string` | No | `--` | Text to display on the right side of the helper text. Is marked as a live content area via `aria-live`. |
|
|
10
10
|
| `disabled` | `boolean` | No | `--` | Whether the input the helper text applies to is disabled. |
|
|
11
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
12
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
11
13
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -12,4 +12,6 @@ Interactive element displaying a single icon.
|
|
|
12
12
|
| `disabled` | `boolean` | No | false | Whether the button is disabled. |
|
|
13
13
|
| `pending` | `boolean` | No | false | Whether the button is in a pending state. |
|
|
14
14
|
| `onClick` | `React.ComponentProps<'button'>['onClick']` | No | `--` | Click handler for the button. |
|
|
15
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
16
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
15
17
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -3,4 +3,6 @@
|
|
|
3
3
|
| Prop | Type | Required | Default | Description |
|
|
4
4
|
| --- | --- | --- | --- | --- |
|
|
5
5
|
| `children` | `React.ReactNode` | No | `--` | `--` |
|
|
6
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
7
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
6
8
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -7,6 +7,8 @@ Label text and optional required indicator for form fields, aligned with Capra f
|
|
|
7
7
|
| `children` | `string` | No | `--` | Text to display in the label. |
|
|
8
8
|
| `required` | `boolean` | No | `--` | Whether the field the label is labeling is required (shows asterisk after label). |
|
|
9
9
|
| `trailingSlot` | `React.ReactNode` | No | `--` | Content after the label text. |
|
|
10
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
11
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
10
12
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
11
13
|
|
|
12
14
|
## React Aria
|
package/docs/core-link--usage.md
CHANGED
|
@@ -13,4 +13,6 @@ Links are navigational elements that take users to a new page.
|
|
|
13
13
|
| `download` | `boolean \| string` | No | `--` | Causes the browser to download the linked URL. A string may be provided to suggest a file name. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download). |
|
|
14
14
|
| `referrerPolicy` | `HTMLAttributeReferrerPolicy` | No | `--` | How much of the referrer to send when following the link. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#referrerpolicy). |
|
|
15
15
|
| `routerOptions` | `unknown` | No | `--` | Options for the configured client side router. |
|
|
16
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
17
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
16
18
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -3,4 +3,6 @@
|
|
|
3
3
|
| Prop | Type | Required | Default | Description |
|
|
4
4
|
| --- | --- | --- | --- | --- |
|
|
5
5
|
| `as` | `As` | No | `--` | `--` |
|
|
6
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
7
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
6
8
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
package/docs/core-menu--usage.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
| Prop | Type | Required | Default | Description |
|
|
4
4
|
| --- | --- | --- | --- | --- |
|
|
5
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
6
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
5
7
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
6
8
|
| `trigger` | `React.ReactElement` | Yes | `--` | Single element that toggles the menu (e.g. button). Rendered as the menu trigger; must forward refs to a focusable DOM node (wrapped with React Aria {@link Pressable} internally). |
|
|
7
9
|
| `children` | `React.ReactNode` | No | `--` | Menu content. Use Menu.Item, Menu.Section, Menu.Header, Menu.Divider. |
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
| Prop | Type | Required | Default | Description |
|
|
6
6
|
| --- | --- | --- | --- | --- |
|
|
7
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
8
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
7
9
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
8
10
|
| `size` | `string` | No | 'md' | `--` |
|
|
9
11
|
| `isDismissible` | `boolean` | No | true | `--` |
|
|
@@ -10,4 +10,6 @@ Pagination component for navigating through paged content. Renders prev/next but
|
|
|
10
10
|
| `onChange` | `(page: number, pageSize: number) => void` | No | `--` | Callback when page changes. |
|
|
11
11
|
| `disabled` | `boolean` | No | false | Whether the pagination is disabled. |
|
|
12
12
|
| `aria-label` | `string` | Yes | `--` | Accessible name for the navigation. Required for accessibility. |
|
|
13
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
14
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
13
15
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
package/docs/core-pill--usage.md
CHANGED
|
@@ -7,4 +7,6 @@
|
|
|
7
7
|
| `variant` | `'bold' \| 'muted' \| 'outline'` | No | 'bold' | A variant to apply to the pill. Only applies when the appearance is not 'default'.<br><br><ul><br> <li><br> 'bold' - Can be used for isolated pills, such as when in the header of an object details page.<br> Use bold pills with caution, since they can easily distract from the primary content.<br> Be cautious with multiple bold pills on a single page, and absolutely avoid multiple bold pills in close proximity.<br> </li><br> <li>'muted' - Used when pills are inline with other content, such as table cells.</li><br></ul><br><br>@default 'bold' |
|
|
8
8
|
| `appearance` | `'default' \| 'info' \| 'danger' \| 'warning' \| 'success' \| 'highlight'` | No | 'default' | The appearance of the pill, which determines its color and severity.<br><br><ul><br> <li>'info' - Information pills communicate general information or an important property.</li><br> <li>'danger' - Danger pills communicate problems that require action to be resolved.</li><br> <li>'warning' - Warning pills can communicate information that is time-sensitive, or trending towards a danger state.</li><br> <li>'success' - Success pills communicate successful states or completed actions.</li><br> <li>'highlight' - Highlight pills bring special attention to metadata without communicating status.</li><br></ul><br><br>@default 'default' |
|
|
9
9
|
| `inline` | `boolean` | No | false | Whether to render the pill as an inline element. This is useful when the pill is used in a heading or other inline context.<br><br>By default, the pill will be rendered as a block element.<br><br>@default false |
|
|
10
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
11
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
10
12
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -5,4 +5,6 @@ A presentational radio button component. You will typically use this component w
|
|
|
5
5
|
| Prop | Type | Required | Default | Description |
|
|
6
6
|
| --- | --- | --- | --- | --- |
|
|
7
7
|
| `value` | `string \| null` | Yes | `--` | The value of the radio button. |
|
|
8
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
9
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
8
10
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -9,4 +9,6 @@ A control wrapper for a group of radio buttons.
|
|
|
9
9
|
| `disabled` | `boolean` | No | `--` | Whether the radios in the group are disabled |
|
|
10
10
|
| `value` | `string \| null` | No | `--` | The current value of the radio group |
|
|
11
11
|
| `layout` | `'vertical' \| 'horizontal'` | No | 'horizontal' | Whether the radio buttons should be displayed vertically or horizontally<br>@default 'horizontal' |
|
|
12
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
13
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
12
14
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -7,4 +7,6 @@ A card variation of a radio button component. You will typically use this compon
|
|
|
7
7
|
| `description` | `React.ReactNode` | No | `--` | Optional description text displayed below the main label in the tile. |
|
|
8
8
|
| `children` | `React.ReactNode` | Yes | `--` | The main label for the tile. |
|
|
9
9
|
| `icon` | `React.ReactNode` | No | `--` | Optional icon to display in the tile. |
|
|
10
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
11
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
10
12
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -4,6 +4,8 @@ A ribbon component used to highlight new features that exist in a 'preview' stat
|
|
|
4
4
|
|
|
5
5
|
| Prop | Type | Required | Default | Description |
|
|
6
6
|
| --- | --- | --- | --- | --- |
|
|
7
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
8
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
7
9
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
8
10
|
| `children` | `string` | Yes | `--` | The label text to display. |
|
|
9
11
|
| `color` | `(typeof ribbonColors)[number]` | No | 'teal' | The color of the ribbon. One of the predefined colors (teal, green, purple).<br>For custom colors, use FORCE__className with CSS that sets --_ribbon-background-color.<br>@default 'teal' |
|
|
@@ -9,5 +9,4 @@ A skeleton is a graphical placeholder, reserving physical space in the page for
|
|
|
9
9
|
| `paragraph` | `SkeletonParagraphProps \| boolean` | No | `--` | Show paragraph placeholder.<br>@default true |
|
|
10
10
|
| `round` | `boolean` | No | `--` | Show paragraph and title radius when true.<br>@default false |
|
|
11
11
|
| `active` | `boolean` | No | `--` | Show animation effect. Respects prefers-reduced-motion.<br>@default false |
|
|
12
|
-
| `children` | `React.ReactNode` | No | `--` | When set together with `loading`: if `loading` is false, only `children`<br>are rendered (no skeleton). If `loading` is true, the skeleton is shown instead — for preset<br>layouts (title and/or paragraph) children are not mounted while loading; in element mode<br>(`title={false}` and `paragraph={false}`) children render inside the placeholder while loading. |
|
|
13
|
-
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
12
|
+
| `children` | `React.ReactNode` | No | `--` | When set together with `loading`: if `loading` is false, only `children`<br>are rendered (no skeleton). If `loading` is true, the skeleton is shown instead — for preset<br>layouts (title and/or paragraph) children are not mounted while loading; in element mode<br>(`title={false}` and `paragraph={false}`) children render inside the placeholder while loading. |
|
|
@@ -5,6 +5,5 @@
|
|
|
5
5
|
| `style` | `React.CSSProperties` | No | `--` | `--` |
|
|
6
6
|
| `size` | `keyof typeof SKELETON_SIZE` | No | `--` | Preset dimensions from `dimension.component.*`; use `style` for custom width/height. |
|
|
7
7
|
| `active` | `boolean` | No | `--` | Show animation effect. @default false |
|
|
8
|
-
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
9
8
|
| `block` | `boolean` | No | `--` | `--` |
|
|
10
9
|
| `shape` | `'circle' \| 'round' \| 'square' \| 'default'` | No | `--` | `--` |
|
|
@@ -8,4 +8,6 @@ The Spinner component is used to display a loading state. It can be used in two
|
|
|
8
8
|
| `title` | `string` | No | `--` | (optional) The title to display in the Spinner. |
|
|
9
9
|
| `children` | `React.ReactNode` | No | `--` | The content to display inside the Spinner. When provided, Spinner acts as a wrapper with overlay. |
|
|
10
10
|
| `isPending` | `boolean` | No | `--` | Whether the Spinner is visible. Only used when children are provided. @default true |
|
|
11
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
12
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
11
13
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -5,4 +5,6 @@
|
|
|
5
5
|
| Prop | Type | Required | Default | Description |
|
|
6
6
|
| --- | --- | --- | --- | --- |
|
|
7
7
|
| `size` | `'sm' \| 'md'` | No | `--` | `--` |
|
|
8
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
9
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
8
10
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -4,6 +4,8 @@ TabNav provides a horizontal or vertical navigation styled as tabs. Tab items ar
|
|
|
4
4
|
|
|
5
5
|
| Prop | Type | Required | Default | Description |
|
|
6
6
|
| --- | --- | --- | --- | --- |
|
|
7
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
8
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
7
9
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
8
10
|
| `activeKey` | `string` | No | `--` | Key of the currently active tab (for visual styling). Typically derived from the current URL. |
|
|
9
11
|
| `onTabClick` | `(key: string, event: React.MouseEvent) => void` | No | `--` | Callback when a tab link is clicked (before navigation). |
|
package/docs/core-tag--usage.md
CHANGED
|
@@ -9,4 +9,6 @@ A tag component for displaying a label and an optional icon.
|
|
|
9
9
|
| `children` | `string` | Yes | `--` | The label text to display in the tag. |
|
|
10
10
|
| `size` | `(typeof tagSizes)[number]` | No | 'md' | The size of the tag. Defaults to `md`. |
|
|
11
11
|
| `onDelete` | `() => void` | No | `--` | The callback function for when the user clicks the delete button. |
|
|
12
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
13
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
12
14
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
package/docs/core-text--usage.md
CHANGED
|
@@ -7,4 +7,6 @@ Component for displaying text. The visual display can be controlled via `variant
|
|
|
7
7
|
| `variant` | `(typeof variants)[number]` | No | `--` | The text style variant. Defaults to `body`. |
|
|
8
8
|
| `color` | `Color \| 'inherit'` | No | `--` | The text foreground color. Can be a theme color or inherited from the environment. Defaults to `inherit`.<br>@default inherit |
|
|
9
9
|
| `as` | `As` | No | `--` | The underlying element rendered by the component. Defaults to `span`. |
|
|
10
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
11
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
10
12
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -12,6 +12,8 @@ TextArea component for multi-line text entry.
|
|
|
12
12
|
| `helperText` | `string` | No | `--` | Helper text below the field. Replaced by error message when status is error. Use for requirements, disclaimers. |
|
|
13
13
|
| `label` | `string` | No | `--` | Label for the field. Required for accessibility; use aria-label if another element acts as label. |
|
|
14
14
|
| `layout` | `'vertical' \| 'horizontal'` | No | `--` | Label and field layout: vertical (label above) or horizontal (label on leading side). Prefer vertical; use horizontal when space is limited. |
|
|
15
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
16
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
15
17
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
16
18
|
|
|
17
19
|
Use `InputField` with `input={TextArea}` for label above the field, helper text, character count, and validation
|
|
@@ -14,6 +14,8 @@ TextInput component for single-line text entry. Backwards compatible with Ant De
|
|
|
14
14
|
| `leadingSlot` | `React.ReactNode` | No | `--` | Content before the input (e.g. icon). |
|
|
15
15
|
| `size` | `(typeof sizes)[number]` | No | `--` | Size of the input.<br>@default 'md' |
|
|
16
16
|
| `trailingSlot` | `React.ReactNode` | No | `--` | Content after the input (e.g. icon or clear button). |
|
|
17
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
18
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
17
19
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
18
20
|
|
|
19
21
|
Use `layout="vertical"` (default) for label above the field; use `layout="horizontal"` for label on the leading side when space is limited.
|
|
@@ -45,4 +45,6 @@ function MyComponent() {
|
|
|
45
45
|
| `placement` | `(typeof placements)[number]` | No | 'bottom' | The position of the tooltip relative to the trigger element.<br>@default 'bottom' |
|
|
46
46
|
| `isDisabled` | `boolean` | No | false | Whether the tooltip is disabled.<br>@default false |
|
|
47
47
|
| `getContainer` | `() => HTMLElement \| null` | No | `--` | The container to mount the tooltip in.<br>@default document.body<br><br>**Warning**: This is an unsafe feature and may cause accessibility, keyboard navigation, and other issues. Only use if you know what you are doing. |
|
|
48
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
49
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
48
50
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
| Prop | Type | Required | Default | Description |
|
|
4
4
|
| --- | --- | --- | --- | --- |
|
|
5
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
6
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
5
7
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
6
8
|
| `children` | `React.ReactNode` | No | `--` | `--` |
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Core/Tree - Design
|
|
2
|
+
|
|
3
|
+
A hierarchical tree with cascading multi-select and Capra ListItem row layout.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### Label
|
|
8
|
+
|
|
9
|
+
All tree items are required to have a clear and concise label.
|
|
10
|
+
|
|
11
|
+
### Parent
|
|
12
|
+
|
|
13
|
+
Tree items containing decedents display a chevron to enable the user to show/hide the decedents.
|
|
14
|
+
|
|
15
|
+
### Open
|
|
16
|
+
|
|
17
|
+
When open, a parent Tree item's chevron displays pointing down.
|
|
18
|
+
|
|
19
|
+
### Selectable
|
|
20
|
+
|
|
21
|
+
A tree item can optionally be selectable. When enabled, a checkbox will appear to the left of the label.
|
|
22
|
+
|
|
23
|
+
### Suffix
|
|
24
|
+
|
|
25
|
+
A suffix provides space for information such as item counts.
|
|
26
|
+
|
|
27
|
+
### Trailing Slot
|
|
28
|
+
|
|
29
|
+
A trailing slot can optionally be used to add an icon to the tree item.
|
|
30
|
+
|
|
31
|
+
In Figma the preferred icons for the trailing slot are Git statuses, but other icons can be used if needed.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Core/Tree - Usage
|
|
2
|
+
|
|
3
|
+
A hierarchical tree with cascading multi-select and Capra ListItem row layout.
|
|
4
|
+
|
|
5
|
+
## Basic usage
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Tree, type TreeItemType } from '@capra/core';
|
|
9
|
+
|
|
10
|
+
const items: TreeItemType[] = [
|
|
11
|
+
{
|
|
12
|
+
key: 'logs',
|
|
13
|
+
label: 'Logs',
|
|
14
|
+
children: [
|
|
15
|
+
{ key: 'auth', label: 'Auth' },
|
|
16
|
+
{ key: 'system', label: 'System' },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
function Example() {
|
|
22
|
+
return <Tree items={items} aria-label="Log sources" defaultExpandedKeys={['logs']} />;
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
| Prop | Type | Required | Default | Description |
|
|
29
|
+
| --- | --- | --- | --- | --- |
|
|
30
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
31
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
32
|
+
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
33
|
+
| `aria-label` | `string` | No | `--` | Defines a string value that labels the current element. |
|
|
34
|
+
| `aria-labelledby` | `string` | No | `--` | Identifies the element (or elements) that labels the current element. |
|
|
35
|
+
| `items` | `TreeItemType[]` | Yes | `--` | Items to render in the tree. |
|
|
36
|
+
| `onAction` | `(key: Key) => void` | No | `--` | Handler that is called when a user performs an action on an item. |
|
|
37
|
+
| `defaultExpandedKeys` | `Iterable<Key>` | No | `--` | The initial expanded keys when in uncontrolled mode. |
|
|
38
|
+
| `defaultSelectedKeys` | `Iterable<Key>` | No | `--` | The initial selected keys when in uncontrolled mode. |
|
|
39
|
+
| `expandedKeys` | `Iterable<Key>` | No | `--` | The currently expanded keys when in controlled mode. |
|
|
40
|
+
| `onExpandedChange` | `(keys: Set<Key>) => void` | No | `--` | Handler that is called when the expanded keys change. |
|
|
41
|
+
| `onSelectionChange` | `(keys: Set<Key>) => void` | No | `--` | Callback that is fired when the selection changes. |
|
|
42
|
+
| `selectedKeys` | `Iterable<Key>` | No | `--` | The currently selected keys when in controlled mode. |
|
|
43
|
+
| `selectionMode` | `'none' \| 'multiple'` | No | 'multiple' | The selection mode of the tree.<br>@default 'multiple' |
|
|
44
|
+
|
|
45
|
+
## Selection patterns
|
|
46
|
+
|
|
47
|
+
### Uncontrolled selection
|
|
48
|
+
|
|
49
|
+
Use `defaultSelectedKeys` for simple uncontrolled multi-select. Selecting a parent cascades to all enabled
|
|
50
|
+
descendants, and deselecting the parent removes the whole enabled branch.
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
<Tree items={filesystemItems} aria-label="Remote filesystem" defaultSelectedKeys={['logs']} />
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Controlled selection
|
|
57
|
+
|
|
58
|
+
Use `selectedKeys` with `onSelectionChange` when the selected branch needs to stay in application state. The callback
|
|
59
|
+
receives the normalized key set after cascade rules are applied.
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
const [selectedKeys, setSelectedKeys] = useState<Set<string>>(new Set(['logs']));
|
|
63
|
+
|
|
64
|
+
<Tree
|
|
65
|
+
items={filesystemItems}
|
|
66
|
+
aria-label="Remote filesystem"
|
|
67
|
+
selectedKeys={selectedKeys}
|
|
68
|
+
onSelectionChange={setSelectedKeys}
|
|
69
|
+
/>;
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Disabled items
|
|
73
|
+
|
|
74
|
+
Set `isDisabled` on an item to disable just that row. Disabled items are skipped during cascade selection and cannot
|
|
75
|
+
be toggled directly.
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
const items = [
|
|
79
|
+
{
|
|
80
|
+
key: 'notebooks',
|
|
81
|
+
label: 'Notebooks',
|
|
82
|
+
isDisabled: true,
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Content options
|
|
88
|
+
|
|
89
|
+
### Suffix and trailing slot
|
|
90
|
+
|
|
91
|
+
Use `suffix` for short secondary metadata and `trailingSlot` for decorative affordances.
|
|
92
|
+
|
|
93
|
+
## Accessibility
|
|
94
|
+
|
|
95
|
+
| Key | Function |
|
|
96
|
+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
97
|
+
| `Tab`<br />`Shift+Tab` | Moves focus into the tree.<br />- Focus is given to the last Tree \| Item to have focus.<br />- If no selection and no previous item had focus, focus is given to first item.<br />- If select and no previous item had focus, focus is given to first selected item. |
|
|
98
|
+
| `Right Arrow` | - When on a closed parent item, open the node; focus does not move.<br />- When on an open item, or item with no children, does nothing. |
|
|
99
|
+
| `Left Arrow` | - When on an open parent item, closes the item; focus does not move.<br />- When on a closed item, or item with no children, does nothing. |
|
|
100
|
+
| `Up Arrow`<br />`Down Arrow` | Moves focus to the next/previous visible item, without opening or closing a node. |
|
|
101
|
+
| `Enter` | Triggers the default action.<br />- If selection is available, selects the currently focused item.<br />- If no selection is available, open/close the currently focused item. |
|
|
102
|
+
| `Space` | Selects the currently focused item. |
|
|
@@ -6,6 +6,8 @@ Vertical navigation shell with controlled and uncontrolled collapse support. Pro
|
|
|
6
6
|
|
|
7
7
|
| Prop | Type | Required | Default | Description |
|
|
8
8
|
| --- | --- | --- | --- | --- |
|
|
9
|
+
| `className` | `never` | No | `--` | Use `FORCE__className` instead. |
|
|
10
|
+
| `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
|
|
9
11
|
| `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
|
|
10
12
|
| `collapsed` | `boolean` | No | `--` | Controlled collapsed state. |
|
|
11
13
|
| `onCollapseChange` | `(collapsed: boolean) => void` | No | `--` | Callback fired when the collapsed state changes. |
|
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# History/Changelogs/@capra-core
|
|
2
2
|
|
|
3
|
+
### 1.10.0
|
|
4
|
+
|
|
5
|
+
#### Minor Changes
|
|
6
|
+
|
|
7
|
+
* [a73a72f](https://bitbucket.org/cribl/capra-ui/commits/a73a72f): Add `Badge` `size` prop and `neutral` appearance.
|
|
8
|
+
* [3d42958](https://bitbucket.org/cribl/capra-ui/commits/3d42958): Add `offset` prop to `BadgeLayout` to support additional positioning options.
|
|
9
|
+
|
|
10
|
+
#### Patch Changes
|
|
11
|
+
|
|
12
|
+
* [0b0e03a](https://bitbucket.org/cribl/capra-ui/commits/0b0e03a): Fix tab hover color
|
|
13
|
+
|
|
14
|
+
### 1.9.0
|
|
15
|
+
|
|
16
|
+
#### Minor Changes
|
|
17
|
+
|
|
18
|
+
* [1cbe432](https://bitbucket.org/cribl/capra-ui/commits/1cbe432): Update intrarepo depedency ranges to use minor version pinning instead of exact versions
|
|
19
|
+
|
|
20
|
+
Excerpt from the dependency list in `package.json` for `@capra/domain`:
|
|
21
|
+
|
|
22
|
+
| Before | After |
|
|
23
|
+
| ------------------------ | ------------------------- |
|
|
24
|
+
| `"@capra/core": "1.6.0"` | `"@capra/core": "^1.6.0"` |
|
|
25
|
+
|
|
26
|
+
* [674593e](https://bitbucket.org/cribl/capra-ui/commits/674593e): Add a `Tree` component
|
|
27
|
+
|
|
28
|
+
* [8ebac6d](https://bitbucket.org/cribl/capra-ui/commits/8ebac6d): Make the `Label` component available.
|
|
29
|
+
|
|
30
|
+
* [5224ebb](https://bitbucket.org/cribl/capra-ui/commits/5224ebb): Update component types for className and style to align with runtime behavior.
|
|
31
|
+
|
|
32
|
+
#### Patch Changes
|
|
33
|
+
|
|
34
|
+
* Updated dependencies [1cbe432](https://bitbucket.org/cribl/capra-ui/commits/1cbe432) — Update intrarepo depedency ranges to use minor version pinning instead of exact versions
|
|
35
|
+
* @capra/icons\@1.8.0
|
|
36
|
+
|
|
3
37
|
### 1.8.2
|
|
4
38
|
|
|
5
39
|
#### Patch Changes
|
package/docs/index.md
CHANGED
|
@@ -103,6 +103,8 @@ Embedded documentation is available on the filesystem for each of these packages
|
|
|
103
103
|
- [Core/Tooltip - Usage](./core-tooltip--usage.md)
|
|
104
104
|
- [Core/TopNav - Design](./core-topnav--design.md)
|
|
105
105
|
- [Core/TopNav - Usage](./core-topnav--usage.md)
|
|
106
|
+
- [Core/Tree - Design](./core-tree--design.md)
|
|
107
|
+
- [Core/Tree - Usage](./core-tree--usage.md)
|
|
106
108
|
- [Core/VerticalNavigation - Design](./core-verticalnavigation--design.md)
|
|
107
109
|
- [Core/VerticalNavigation - Usage](./core-verticalnavigation--usage.md)
|
|
108
110
|
- [Core/VisuallyHidden - Design](./core-visuallyhidden--design.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capra/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Core React components for the Capra design system",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"react-aria": "^3.48.0",
|
|
37
37
|
"react-aria-components": "^1.17.0",
|
|
38
|
-
"@capra/icons": "1.
|
|
38
|
+
"@capra/icons": "^1.8.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"clsx": "^2.1.1",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"antd": "4.24.16",
|
|
44
44
|
"storybook": "^10.4.6",
|
|
45
45
|
"tsdown": "^0.22.7",
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@private/
|
|
49
|
-
"@private/
|
|
50
|
-
"@private/testing": "0.0.7"
|
|
46
|
+
"@capra/theme": "^1.4.0",
|
|
47
|
+
"@private/stories": "^0.0.0",
|
|
48
|
+
"@private/linting": "^0.0.1",
|
|
49
|
+
"@private/building": "^0.1.0",
|
|
50
|
+
"@private/testing": "^0.0.7"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"clean": "rm -rf ./dist",
|