@capra/core 1.5.3 → 1.6.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 +23 -23
- package/dist/index.d.cts +9 -9
- package/dist/index.d.mts +9 -9
- package/dist/index.mjs +23 -23
- package/dist/style.css +62 -32
- package/docs/conventions--docs.md +186 -0
- package/docs/core-alert--design.md +110 -0
- package/docs/core-alert--usage.md +13 -0
- package/docs/core-anchor--design.md +39 -0
- package/docs/core-anchor--usage.md +39 -0
- package/docs/core-autocompletefield--design.md +91 -0
- package/docs/core-autocompletefield--usage.md +18 -0
- package/docs/core-badge--design.md +70 -0
- package/docs/core-badge--usage.md +13 -0
- package/docs/core-breadcrumbs--design.md +65 -0
- package/docs/core-breadcrumbs--usage.md +16 -0
- package/docs/core-button--design.md +97 -0
- package/docs/core-button--usage.md +17 -0
- package/docs/core-buttonlink--design.md +7 -0
- package/docs/core-buttonlink--usage.md +24 -0
- package/docs/core-card--design.md +100 -0
- package/docs/core-card--usage.md +5 -0
- package/docs/core-checkbox--design.md +66 -0
- package/docs/core-checkbox--usage.md +34 -0
- package/docs/core-collapse--design.md +28 -0
- package/docs/core-collapse--usage.md +20 -0
- package/docs/core-datepickerfield--design.md +71 -0
- package/docs/core-datepickerfield--usage.md +57 -0
- package/docs/core-daterangepickerfield--design.md +76 -0
- package/docs/core-daterangepickerfield--usage.md +62 -0
- package/docs/core-divider--design.md +35 -0
- package/docs/core-divider--usage.md +8 -0
- package/docs/core-drawer--design.md +87 -0
- package/docs/core-drawer--usage.md +9 -0
- package/docs/core-emptystate--design.md +45 -0
- package/docs/core-emptystate--usage.md +13 -0
- package/docs/core-helpertext--design.md +30 -0
- package/docs/core-helpertext--usage.md +11 -0
- package/docs/core-iconbutton--design.md +87 -0
- package/docs/core-iconbutton--usage.md +15 -0
- package/docs/core-inputrow--design.md +85 -0
- package/docs/core-inputrow--usage.md +6 -0
- package/docs/core-label--design.md +27 -0
- package/docs/core-label--usage.md +17 -0
- package/docs/core-link--design.md +58 -0
- package/docs/core-link--usage.md +16 -0
- package/docs/core-listitem--design.md +70 -0
- package/docs/core-listitem--usage.md +6 -0
- package/docs/core-menu--design.md +106 -0
- package/docs/core-menu--usage.md +16 -0
- package/docs/core-modal--design.md +39 -0
- package/docs/core-modal--usage.md +11 -0
- package/docs/core-numberfield--design.md +12 -0
- package/docs/core-numberfield--usage.md +14 -0
- package/docs/core-pagination--design.md +30 -0
- package/docs/core-pagination--usage.md +13 -0
- package/docs/core-passwordfield--design.md +7 -0
- package/docs/core-passwordfield--usage.md +3 -0
- package/docs/core-pill--design.md +94 -0
- package/docs/core-pill--usage.md +10 -0
- package/docs/core-popover--design.md +25 -0
- package/docs/core-popover--usage.md +8 -0
- package/docs/core-radio--design.md +39 -0
- package/docs/core-radio--usage.md +8 -0
- package/docs/core-radiogroup--design.md +5 -0
- package/docs/core-radiogroup--usage.md +12 -0
- package/docs/core-radiotile--design.md +5 -0
- package/docs/core-radiotile--usage.md +10 -0
- package/docs/core-ribbon--design.md +39 -0
- package/docs/core-ribbon--usage.md +12 -0
- package/docs/core-skeleton--design.md +88 -0
- package/docs/core-skeleton--usage.md +13 -0
- package/docs/core-skeletongroup--design.md +50 -0
- package/docs/core-skeletongroup--usage.md +10 -0
- package/docs/core-spinner--design.md +99 -0
- package/docs/core-spinner--usage.md +11 -0
- package/docs/core-switch--design.md +145 -0
- package/docs/core-switch--usage.md +8 -0
- package/docs/core-tabnav--design.md +77 -0
- package/docs/core-tabnav--usage.md +63 -0
- package/docs/core-tag--design.md +21 -0
- package/docs/core-tag--usage.md +11 -0
- package/docs/core-text--design.md +32 -0
- package/docs/core-text--usage.md +10 -0
- package/docs/core-textarea--design.md +74 -0
- package/docs/core-textarea--usage.md +18 -0
- package/docs/core-textfield--design.md +81 -0
- package/docs/core-textfield--usage.md +12 -0
- package/docs/core-textinput--design.md +72 -0
- package/docs/core-textinput--usage.md +19 -0
- package/docs/core-toast--design.md +100 -0
- package/docs/core-toast--usage.md +11 -0
- package/docs/core-tooltip--design.md +61 -0
- package/docs/core-tooltip--usage.md +48 -0
- package/docs/core-topnav--design.md +75 -0
- package/docs/core-topnav--usage.md +6 -0
- package/docs/core-verticalnavigation--design.md +31 -0
- package/docs/core-verticalnavigation--usage.md +17 -0
- package/docs/core-visuallyhidden--design.md +87 -0
- package/docs/core-visuallyhidden--usage.md +35 -0
- package/docs/history-changelogs-capra-core--docs.md +49 -0
- package/docs/index.md +110 -0
- package/docs/using-capra--docs.md +39 -0
- package/package.json +5 -4
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Core/VisuallyHidden - Design
|
|
2
|
+
|
|
3
|
+
VisuallyHidden is a component that hides its children from the visual rendering, but still makes them available to screen readers.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
VisuallyHidden is a utility component that removes content from the visual flow while keeping it accessible to assistive technologies such as screen readers. It uses a well-established CSS technique that clips the element to a 1×1 pixel area without using `display: none` or `visibility: hidden`, which would remove it from the accessibility tree entirely.
|
|
8
|
+
|
|
9
|
+
Use VisuallyHidden when you need to provide context or labels for screen reader users that would be redundant or unnecessary in the visual design.
|
|
10
|
+
|
|
11
|
+
## Use Cases
|
|
12
|
+
|
|
13
|
+
### Hidden labels for icon-only controls
|
|
14
|
+
|
|
15
|
+
Icon-only buttons and controls must have accessible names. Wrap a text label in VisuallyHidden to provide one without affecting the visual design.
|
|
16
|
+
|
|
17
|
+
### Supplementary link text
|
|
18
|
+
|
|
19
|
+
Links like "Read more" lack context when read in isolation. Use VisuallyHidden to append descriptive text that screen readers announce.
|
|
20
|
+
|
|
21
|
+
### Form labels
|
|
22
|
+
|
|
23
|
+
When a form input has a visible placeholder but no visible label, use VisuallyHidden to associate a proper `<label>` element with the input.
|
|
24
|
+
|
|
25
|
+
### Skip links
|
|
26
|
+
|
|
27
|
+
Skip navigation links allow keyboard users to bypass repeated content. The link text can be visually hidden until it receives focus.
|
|
28
|
+
|
|
29
|
+
## Best Practices
|
|
30
|
+
|
|
31
|
+
**Do**
|
|
32
|
+
|
|
33
|
+
<p>
|
|
34
|
+
Do use VisuallyHidden to provide accessible names for icon-only buttons and controls.
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
**Don't**
|
|
38
|
+
|
|
39
|
+
<p>
|
|
40
|
+
Don't use VisuallyHidden to hide content that all users should see. If the content is meaningful, it should be visible.
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
**Do**
|
|
44
|
+
|
|
45
|
+
<p>
|
|
46
|
+
Do use VisuallyHidden to add context to ambiguous links like "Read more" or "Learn more".
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
**Don't**
|
|
50
|
+
|
|
51
|
+
<p>
|
|
52
|
+
Don't use
|
|
53
|
+
|
|
54
|
+
`display: none`
|
|
55
|
+
|
|
56
|
+
or
|
|
57
|
+
|
|
58
|
+
`visibility: hidden`
|
|
59
|
+
|
|
60
|
+
when content should remain available to assistive technologies.
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
## Accessibility
|
|
64
|
+
|
|
65
|
+
### Purpose
|
|
66
|
+
|
|
67
|
+
VisuallyHidden exists specifically to improve accessibility. It bridges the gap between visual design and the information needs of assistive technology users.
|
|
68
|
+
|
|
69
|
+
### When to Use
|
|
70
|
+
|
|
71
|
+
### WCAG 1.1.1 — Non-text Content (Level A)
|
|
72
|
+
|
|
73
|
+
Provide text alternatives for non-text content such as icon-only buttons. VisuallyHidden allows you to add an accessible name without altering the visual design.
|
|
74
|
+
|
|
75
|
+
### WCAG 2.4.4 — Link Purpose (Level A)
|
|
76
|
+
|
|
77
|
+
Links should make sense out of context. When visual context makes the purpose clear but the link text alone is ambiguous (e.g., "Read more"), use VisuallyHidden to add clarifying text.
|
|
78
|
+
|
|
79
|
+
### WCAG 2.4.6 — Headings and Labels (Level AA)
|
|
80
|
+
|
|
81
|
+
Form inputs should have descriptive labels. When a visible label would be redundant with other visual cues, VisuallyHidden can provide a programmatic label for assistive technologies.
|
|
82
|
+
|
|
83
|
+
### Important Notes
|
|
84
|
+
|
|
85
|
+
* VisuallyHidden content **is not** hidden from screen readers — that is its entire purpose.
|
|
86
|
+
* Do **not** use `aria-hidden="true"` on VisuallyHidden or its children, as this would negate its purpose.
|
|
87
|
+
* Prefer `aria-label` or `aria-labelledby` when labeling a single element. Use VisuallyHidden when you need to provide more complex or multi-element content to assistive technologies.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Core/VisuallyHidden - Usage
|
|
2
|
+
|
|
3
|
+
VisuallyHidden is a component that hides its children from the visual rendering, but still makes them available to screen readers.
|
|
4
|
+
|
|
5
|
+
| Prop | Type | Required | Default | Description |
|
|
6
|
+
| --- | --- | --- | --- | --- |
|
|
7
|
+
| `children` | `React.ReactNode` | Yes | `--` | `--` |
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { VisuallyHidden } from '@cribl/capra-core';
|
|
13
|
+
|
|
14
|
+
// Accessible label for an icon-only button
|
|
15
|
+
<button>
|
|
16
|
+
🔔 <VisuallyHidden>Notifications</VisuallyHidden>
|
|
17
|
+
</button>
|
|
18
|
+
|
|
19
|
+
// Descriptive link text
|
|
20
|
+
<a href="/docs">
|
|
21
|
+
Read more<VisuallyHidden> about our API documentation</VisuallyHidden>
|
|
22
|
+
</a>
|
|
23
|
+
|
|
24
|
+
// Hidden form label
|
|
25
|
+
<VisuallyHidden>
|
|
26
|
+
<label htmlFor="search">Search</label>
|
|
27
|
+
</VisuallyHidden>
|
|
28
|
+
<input id="search" type="search" placeholder="Search..." />
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## How It Works
|
|
32
|
+
|
|
33
|
+
The component renders a `<span>` element with CSS that clips it to a 1×1 pixel area using `clip-path: inset(100%)`. This keeps the content in the DOM and accessibility tree while removing it from the visual layout.
|
|
34
|
+
|
|
35
|
+
The `:not(:focus):not(:active)` selector ensures that if a focusable element (like a skip link) is nested inside, it becomes visible when focused.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# History/Changelogs/@capra-core
|
|
2
|
+
|
|
3
|
+
### 1.6.0
|
|
4
|
+
|
|
5
|
+
#### Minor Changes
|
|
6
|
+
|
|
7
|
+
* [e99f46d](https://bitbucket.org/cribl/capra-ui/commits/e99f46d): Include LLM-friendly docs in published packages
|
|
8
|
+
|
|
9
|
+
#### Patch Changes
|
|
10
|
+
|
|
11
|
+
* [ce30088](https://bitbucket.org/cribl/capra-ui/commits/ce30088): Increase `Modal` z-index so it layers correctly
|
|
12
|
+
* [8a1bbe5](https://bitbucket.org/cribl/capra-ui/commits/8a1bbe5): Update `TextInput` internal spacing so Chrome's autofill backgrounds look better
|
|
13
|
+
* Updated dependencies [e99f46d](https://bitbucket.org/cribl/capra-ui/commits/e99f46d) — Include LLM-friendly docs in published packages
|
|
14
|
+
* @capra/icons\@1.7.0
|
|
15
|
+
|
|
16
|
+
### 1.5.3
|
|
17
|
+
|
|
18
|
+
#### Patch Changes
|
|
19
|
+
|
|
20
|
+
* [5387e9d](https://bitbucket.org/cribl/capra-ui/commits/5387e9d): Fix an issue where `EmptyState` crashed in Webpack bundles
|
|
21
|
+
|
|
22
|
+
### 1.5.2
|
|
23
|
+
|
|
24
|
+
#### Patch Changes
|
|
25
|
+
|
|
26
|
+
* [961667d](https://bitbucket.org/cribl/capra-ui/commits/961667d): Update the `icon` prop for `Tag` to accept logos from `@capra/icons/logos`.
|
|
27
|
+
* [1128996](https://bitbucket.org/cribl/capra-ui/commits/1128996): Add documentation links to README and `package.json`
|
|
28
|
+
* Updated dependencies [1128996](https://bitbucket.org/cribl/capra-ui/commits/1128996) — Add documentation links to README and `package.json`
|
|
29
|
+
* @capra/icons\@1.6.1
|
|
30
|
+
|
|
31
|
+
### 1.5.1
|
|
32
|
+
|
|
33
|
+
#### Patch Changes
|
|
34
|
+
|
|
35
|
+
* [7fdf2f5](https://bitbucket.org/cribl/capra-ui/commits/7fdf2f5): Fix `TabNav` horizontal submenu visibility so click, hover, keyboard toggles, `Escape`, and focus containment behave consistently. Remove margin.
|
|
36
|
+
* [363909c](https://bitbucket.org/cribl/capra-ui/commits/363909c): Import `EmptyState` illustrations directly to help with tree-shaking and load times
|
|
37
|
+
* [0219174](https://bitbucket.org/cribl/capra-ui/commits/0219174): Drawer no longer closes on browser Back, and left-placed drawers now use the same close easing behavior as right-placed drawers.
|
|
38
|
+
* [186bcfe](https://bitbucket.org/cribl/capra-ui/commits/186bcfe): Reduce `Tooltip` hover delay to 500ms
|
|
39
|
+
|
|
40
|
+
### 1.5.0
|
|
41
|
+
|
|
42
|
+
#### Minor Changes
|
|
43
|
+
|
|
44
|
+
* [30b2a43](https://bitbucket.org/cribl/capra-ui/commits/30b2a43): Prepare packages for publishing to NPM
|
|
45
|
+
|
|
46
|
+
#### Patch Changes
|
|
47
|
+
|
|
48
|
+
* Updated dependencies [30b2a43](https://bitbucket.org/cribl/capra-ui/commits/30b2a43) — Prepare packages for publishing to NPM
|
|
49
|
+
* @capra/icons\@1.6.0
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# @capra/core
|
|
2
|
+
|
|
3
|
+
This file contains links to the documentation for the `@capra/core` package. This is a local mirror of the documentation located at https://capra.cribl.io/llms.txt.
|
|
4
|
+
|
|
5
|
+
Embedded documentation is available on the filesystem for each of these packages:
|
|
6
|
+
|
|
7
|
+
- `@capra/core`
|
|
8
|
+
- `@capra/domain`
|
|
9
|
+
- `@capra/icons`
|
|
10
|
+
- `@capra/theme`
|
|
11
|
+
|
|
12
|
+
## Documentation
|
|
13
|
+
|
|
14
|
+
- [Conventions](./conventions--docs.md)
|
|
15
|
+
- [Using Capra](./using-capra--docs.md)
|
|
16
|
+
- [Core/Alert - Design](./core-alert--design.md)
|
|
17
|
+
- [Core/Alert - Usage](./core-alert--usage.md)
|
|
18
|
+
- [Core/Anchor - Design](./core-anchor--design.md)
|
|
19
|
+
- [Core/Anchor - Usage](./core-anchor--usage.md)
|
|
20
|
+
- [Core/AutocompleteField - Design](./core-autocompletefield--design.md)
|
|
21
|
+
- [Core/AutocompleteField - Usage](./core-autocompletefield--usage.md)
|
|
22
|
+
- [Core/Badge - Design](./core-badge--design.md)
|
|
23
|
+
- [Core/Badge - Usage](./core-badge--usage.md)
|
|
24
|
+
- [Core/Breadcrumbs - Design](./core-breadcrumbs--design.md)
|
|
25
|
+
- [Core/Breadcrumbs - Usage](./core-breadcrumbs--usage.md)
|
|
26
|
+
- [Core/Button - Design](./core-button--design.md)
|
|
27
|
+
- [Core/Button - Usage](./core-button--usage.md)
|
|
28
|
+
- [Core/ButtonLink - Design](./core-buttonlink--design.md)
|
|
29
|
+
- [Core/ButtonLink - Usage](./core-buttonlink--usage.md)
|
|
30
|
+
- [Core/Card - Design](./core-card--design.md)
|
|
31
|
+
- [Core/Card - Usage](./core-card--usage.md)
|
|
32
|
+
- [Core/Checkbox - Design](./core-checkbox--design.md)
|
|
33
|
+
- [Core/Checkbox - Usage](./core-checkbox--usage.md)
|
|
34
|
+
- [Core/Collapse - Design](./core-collapse--design.md)
|
|
35
|
+
- [Core/Collapse - Usage](./core-collapse--usage.md)
|
|
36
|
+
- [Core/DatePickerField - Design](./core-datepickerfield--design.md)
|
|
37
|
+
- [Core/DatePickerField - Usage](./core-datepickerfield--usage.md)
|
|
38
|
+
- [Core/DateRangePickerField - Design](./core-daterangepickerfield--design.md)
|
|
39
|
+
- [Core/DateRangePickerField - Usage](./core-daterangepickerfield--usage.md)
|
|
40
|
+
- [Core/Divider - Design](./core-divider--design.md)
|
|
41
|
+
- [Core/Divider - Usage](./core-divider--usage.md)
|
|
42
|
+
- [Core/Drawer - Design](./core-drawer--design.md)
|
|
43
|
+
- [Core/Drawer - Usage](./core-drawer--usage.md)
|
|
44
|
+
- [Core/EmptyState - Design](./core-emptystate--design.md)
|
|
45
|
+
- [Core/EmptyState - Usage](./core-emptystate--usage.md)
|
|
46
|
+
- [Core/HelperText - Design](./core-helpertext--design.md)
|
|
47
|
+
- [Core/HelperText - Usage](./core-helpertext--usage.md)
|
|
48
|
+
- [Core/IconButton - Design](./core-iconbutton--design.md)
|
|
49
|
+
- [Core/IconButton - Usage](./core-iconbutton--usage.md)
|
|
50
|
+
- [Core/InputRow - Design](./core-inputrow--design.md)
|
|
51
|
+
- [Core/InputRow - Usage](./core-inputrow--usage.md)
|
|
52
|
+
- [Core/Label - Design](./core-label--design.md)
|
|
53
|
+
- [Core/Label - Usage](./core-label--usage.md)
|
|
54
|
+
- [Core/Link - Design](./core-link--design.md)
|
|
55
|
+
- [Core/Link - Usage](./core-link--usage.md)
|
|
56
|
+
- [Core/ListItem - Design](./core-listitem--design.md)
|
|
57
|
+
- [Core/ListItem - Usage](./core-listitem--usage.md)
|
|
58
|
+
- [Core/Menu - Design](./core-menu--design.md)
|
|
59
|
+
- [Core/Menu - Usage](./core-menu--usage.md)
|
|
60
|
+
- [Core/Modal - Design](./core-modal--design.md)
|
|
61
|
+
- [Core/Modal - Usage](./core-modal--usage.md)
|
|
62
|
+
- [Core/NumberField - Design](./core-numberfield--design.md)
|
|
63
|
+
- [Core/NumberField - Usage](./core-numberfield--usage.md)
|
|
64
|
+
- [Core/Pagination - Design](./core-pagination--design.md)
|
|
65
|
+
- [Core/Pagination - Usage](./core-pagination--usage.md)
|
|
66
|
+
- [Core/PasswordField - Design](./core-passwordfield--design.md)
|
|
67
|
+
- [Core/PasswordField - Usage](./core-passwordfield--usage.md)
|
|
68
|
+
- [Core/Pill - Design](./core-pill--design.md)
|
|
69
|
+
- [Core/Pill - Usage](./core-pill--usage.md)
|
|
70
|
+
- [Core/Popover - Design](./core-popover--design.md)
|
|
71
|
+
- [Core/Popover - Usage](./core-popover--usage.md)
|
|
72
|
+
- [Core/Radio - Design](./core-radio--design.md)
|
|
73
|
+
- [Core/Radio - Usage](./core-radio--usage.md)
|
|
74
|
+
- [Core/RadioGroup - Design](./core-radiogroup--design.md)
|
|
75
|
+
- [Core/RadioGroup - Usage](./core-radiogroup--usage.md)
|
|
76
|
+
- [Core/RadioTile - Design](./core-radiotile--design.md)
|
|
77
|
+
- [Core/RadioTile - Usage](./core-radiotile--usage.md)
|
|
78
|
+
- [Core/Ribbon - Design](./core-ribbon--design.md)
|
|
79
|
+
- [Core/Ribbon - Usage](./core-ribbon--usage.md)
|
|
80
|
+
- [Core/Skeleton - Design](./core-skeleton--design.md)
|
|
81
|
+
- [Core/Skeleton - Usage](./core-skeleton--usage.md)
|
|
82
|
+
- [Core/SkeletonGroup - Design](./core-skeletongroup--design.md)
|
|
83
|
+
- [Core/SkeletonGroup - Usage](./core-skeletongroup--usage.md)
|
|
84
|
+
- [Core/Spinner - Design](./core-spinner--design.md)
|
|
85
|
+
- [Core/Spinner - Usage](./core-spinner--usage.md)
|
|
86
|
+
- [Core/Switch - Design](./core-switch--design.md)
|
|
87
|
+
- [Core/Switch - Usage](./core-switch--usage.md)
|
|
88
|
+
- [Core/TabNav - Design](./core-tabnav--design.md)
|
|
89
|
+
- [Core/TabNav - Usage](./core-tabnav--usage.md)
|
|
90
|
+
- [Core/Tag - Design](./core-tag--design.md)
|
|
91
|
+
- [Core/Tag - Usage](./core-tag--usage.md)
|
|
92
|
+
- [Core/Text - Design](./core-text--design.md)
|
|
93
|
+
- [Core/Text - Usage](./core-text--usage.md)
|
|
94
|
+
- [Core/TextArea - Design](./core-textarea--design.md)
|
|
95
|
+
- [Core/TextArea - Usage](./core-textarea--usage.md)
|
|
96
|
+
- [Core/TextField - Design](./core-textfield--design.md)
|
|
97
|
+
- [Core/TextField - Usage](./core-textfield--usage.md)
|
|
98
|
+
- [Core/TextInput - Design](./core-textinput--design.md)
|
|
99
|
+
- [Core/TextInput - Usage](./core-textinput--usage.md)
|
|
100
|
+
- [Core/Toast - Design](./core-toast--design.md)
|
|
101
|
+
- [Core/Toast - Usage](./core-toast--usage.md)
|
|
102
|
+
- [Core/Tooltip - Design](./core-tooltip--design.md)
|
|
103
|
+
- [Core/Tooltip - Usage](./core-tooltip--usage.md)
|
|
104
|
+
- [Core/TopNav - Design](./core-topnav--design.md)
|
|
105
|
+
- [Core/TopNav - Usage](./core-topnav--usage.md)
|
|
106
|
+
- [Core/VerticalNavigation - Design](./core-verticalnavigation--design.md)
|
|
107
|
+
- [Core/VerticalNavigation - Usage](./core-verticalnavigation--usage.md)
|
|
108
|
+
- [Core/VisuallyHidden - Design](./core-visuallyhidden--design.md)
|
|
109
|
+
- [Core/VisuallyHidden - Usage](./core-visuallyhidden--usage.md)
|
|
110
|
+
- [History/Changelogs/@capra-core](./history-changelogs-capra-core--docs.md)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Using Capra
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
Install the Capra packages into your project:
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
pnpm install @capra/core @capra/domain @capra/theme
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
OR
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
npm install @capra/core @capra/domain @capra/theme
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`@capra/theme` is always required. If you are *only* using `@capra/core`, you do not need to install `@capra/domain`.
|
|
18
|
+
|
|
19
|
+
Prior to importing components, include Capra's CSS in a root stylesheet:
|
|
20
|
+
|
|
21
|
+
```css
|
|
22
|
+
@import '@capra/theme/base.css';
|
|
23
|
+
@import '@capra/icons/styles.css';
|
|
24
|
+
@import '@capra/core/styles.css';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
OR
|
|
28
|
+
|
|
29
|
+
```less
|
|
30
|
+
@import (inline) '@capra/theme/base.css';
|
|
31
|
+
@import (inline) '@capra/icons/styles.css';
|
|
32
|
+
@import (inline) '@capra/core/styles.css';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
:::tip
|
|
36
|
+
|
|
37
|
+
`@capra/theme/base.css` contains design tokens, font-face rules, and baseline globals. If you only need fonts, import `@capra/theme/fonts.css`. If you only need design tokens, import `@capra/theme/styles.css`.
|
|
38
|
+
|
|
39
|
+
:::
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capra/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Core React components for the Capra design system",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"types": "./dist/index.d.mts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
21
|
+
"docs",
|
|
21
22
|
"README.md",
|
|
22
23
|
"LICENSE.txt"
|
|
23
24
|
],
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"react-aria": "^3.48.0",
|
|
36
37
|
"react-aria-components": "^1.17.0",
|
|
37
|
-
"@capra/icons": "1.
|
|
38
|
+
"@capra/icons": "1.7.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@ant-design/icons": "4.8.3",
|
|
@@ -43,10 +44,10 @@
|
|
|
43
44
|
"antd": "4.24.16",
|
|
44
45
|
"storybook": "^10.4.6",
|
|
45
46
|
"tsdown": "^0.22.0",
|
|
46
|
-
"@capra/theme": "1.
|
|
47
|
+
"@capra/theme": "1.3.0",
|
|
48
|
+
"@private/linting": "0.0.0",
|
|
47
49
|
"@private/building": "0.0.4",
|
|
48
50
|
"@private/stories": "0.0.0",
|
|
49
|
-
"@private/linting": "0.0.0",
|
|
50
51
|
"@private/testing": "0.0.7"
|
|
51
52
|
},
|
|
52
53
|
"scripts": {
|