@omni-design/components 0.11.0 → 0.13.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/.claude/commands/ScanComponents.md +1 -1
- package/.claude/commands/ShareComponent.md +1 -1
- package/CLAUDE.md +5 -3
- package/dist/OmniDesignProvider.esm.js +1 -1
- package/dist/OmniDesignProvider.esm.js.map +1 -1
- package/dist/OmniDesignProvider.js +1 -1
- package/dist/OmniDesignProvider.js.map +1 -1
- package/dist/index.esm.js +8 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/types/components/BackgroundPicker.d.ts +1 -1
- package/dist/types/components/BrandIcon/BrandIcon.d.ts +20 -0
- package/dist/types/components/BrandIcon/index.d.ts +1 -0
- package/dist/types/components/Button/Button.d.ts +3 -1
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +3 -2
- package/dist/types/components/Charts/tokens.d.ts +1 -1
- package/dist/types/components/Chip/Chip.d.ts +1 -1
- package/dist/types/components/Footer/Footer.d.ts +3 -1
- package/dist/types/components/Foundations/FoundationTopic.d.ts +4 -0
- package/dist/types/components/Foundations/HowToSlot.d.ts +16 -0
- package/dist/types/components/Foundations/TokenRoles.d.ts +19 -0
- package/dist/types/components/Foundations/TypographySummary.d.ts +2 -0
- package/dist/types/components/IconBadge/IconBadge.d.ts +1 -1
- package/dist/types/components/Loader/Loader.d.ts +66 -0
- package/dist/types/components/Loader/index.d.ts +1 -0
- package/dist/types/components/MiniSwatch/MiniSwatch.d.ts +7 -0
- package/dist/types/components/MiniSwatch/index.d.ts +1 -0
- package/dist/types/components/ShowcaseHeader.d.ts +5 -0
- package/dist/types/components/Swatch/Swatch.d.ts +14 -0
- package/dist/types/components/Swatch/index.d.ts +1 -0
- package/dist/types/components/Switch/Switch.d.ts +24 -8
- package/dist/types/components/Switch/index.d.ts +1 -1
- package/dist/types/components/TextField/TextField.d.ts +1 -1
- package/dist/types/components/Typography/Typography.d.ts +54 -1
- package/dist/types/components/Typography/index.d.ts +1 -1
- package/dist/types/components/_states.d.ts +1 -1
- package/dist/types/components/a11yPanel.d.ts +37 -0
- package/dist/types/components/index.d.ts +7 -1
- package/dist/types/docs/DocPanels.d.ts +25 -0
- package/dist/types/docs/components.d.ts +220 -0
- package/dist/types/docs/componentsData.d.ts +587 -0
- package/dist/types/docs/componentsForms.d.ts +597 -0
- package/dist/types/docs/componentsNav.d.ts +420 -0
- package/dist/types/docs/componentsOverlays.d.ts +379 -0
- package/dist/types/docs/componentsRest.d.ts +158 -0
- package/dist/types/docs/componentsSurfaces.d.ts +429 -0
- package/dist/types/docs/docsLink.d.ts +32 -0
- package/dist/types/docs/examples.d.ts +48 -0
- package/dist/types/docs/figmaHowTo.d.ts +28 -0
- package/dist/types/docs/figmaLinks.d.ts +58 -0
- package/dist/types/docs/foundations.d.ts +40 -0
- package/dist/types/docs/index.d.ts +5 -0
- package/docs/components.md +71 -55
- package/package.json +4 -2
- package/public/styles/Dark-Mode.css +12062 -13009
- package/public/styles/Light-Mode.css +11246 -12370
- package/public/styles/base.css +387 -182
- package/public/styles/core.css +569 -133
- package/public/styles/foundation.css +142 -53
- package/public/styles/styles.css +5 -5
- package/public/styles/theme.json +2 -2
- package/public/styles/typography-tokens.css +873 -96
- package/dist/types/theme/useThemeMode.d.ts +0 -4
package/docs/components.md
CHANGED
|
@@ -33,7 +33,7 @@ special chromeless variant for low-emphasis actions.
|
|
|
33
33
|
### Import
|
|
34
34
|
|
|
35
35
|
```jsx
|
|
36
|
-
import { Button } from '@
|
|
36
|
+
import { Button } from '@omni-design/components';
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
### Props
|
|
@@ -108,7 +108,7 @@ spaced and connected (border-collapsing) layouts.
|
|
|
108
108
|
### Import
|
|
109
109
|
|
|
110
110
|
```jsx
|
|
111
|
-
import { ButtonGroup, Button } from '@
|
|
111
|
+
import { ButtonGroup, Button } from '@omni-design/components';
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
### Props
|
|
@@ -176,7 +176,7 @@ import {
|
|
|
176
176
|
CheckboxGroup,
|
|
177
177
|
CheckboxWithDescription,
|
|
178
178
|
IndeterminateCheckbox,
|
|
179
|
-
} from '@
|
|
179
|
+
} from '@omni-design/components';
|
|
180
180
|
```
|
|
181
181
|
|
|
182
182
|
### Checkbox Props
|
|
@@ -300,7 +300,7 @@ label positions, three sizes, and validation states.
|
|
|
300
300
|
### Import
|
|
301
301
|
|
|
302
302
|
```jsx
|
|
303
|
-
import { Input } from '@
|
|
303
|
+
import { Input } from '@omni-design/components';
|
|
304
304
|
```
|
|
305
305
|
|
|
306
306
|
### Props
|
|
@@ -395,84 +395,100 @@ variable resolves correctly.
|
|
|
395
395
|
|
|
396
396
|
## Chip
|
|
397
397
|
|
|
398
|
-
|
|
399
|
-
|
|
398
|
+
A small surface you can toggle — a filter, a choice, a tag on an input. If it
|
|
399
|
+
only labels something and cannot be clicked, use **Tag** instead.
|
|
400
400
|
|
|
401
401
|
### Import
|
|
402
402
|
|
|
403
403
|
```jsx
|
|
404
|
-
import { Chip } from '@
|
|
404
|
+
import { Chip } from '@omni-design/components';
|
|
405
405
|
```
|
|
406
406
|
|
|
407
|
+
### Colour and selection are different axes
|
|
408
|
+
|
|
409
|
+
This is the part worth reading. **There is no solid/outline shape axis**, and
|
|
410
|
+
there is no `color` prop.
|
|
411
|
+
|
|
412
|
+
- **Colour** comes from `variant`, which sets `data-theme` on the chip.
|
|
413
|
+
- **Selection** is a SURFACE LEVEL, not a different fill:
|
|
414
|
+
|
|
415
|
+
| | `data-surface` |
|
|
416
|
+
| --- | --- |
|
|
417
|
+
| unselected | `Surface-Brightest` |
|
|
418
|
+
| selected | `Surface-Dimmest` |
|
|
419
|
+
|
|
420
|
+
Both levels paint `var(--Background)` with a `var(--Border)` edge, so one
|
|
421
|
+
`data-theme` drives both states and `--Text`, `--Hover` and `--Pressed` come
|
|
422
|
+
along paired. Change the theme and both states move together.
|
|
423
|
+
|
|
424
|
+
`variant="default"` sets no `data-theme` at all and INHERITS, so a chip inside a
|
|
425
|
+
themed region takes that region's colour.
|
|
426
|
+
|
|
427
|
+
`-outline` and `-light` still render and warn once in development. Do not write
|
|
428
|
+
new ones: `-outline` was the unselected chip under another name, which let the
|
|
429
|
+
component express four combinations against the design's two.
|
|
430
|
+
|
|
407
431
|
### Props
|
|
408
432
|
|
|
409
|
-
| Prop | Type | Default |
|
|
433
|
+
| Prop | Type | Default | Notes |
|
|
410
434
|
|---|---|---|---|
|
|
411
|
-
| `
|
|
412
|
-
| `
|
|
413
|
-
| `
|
|
414
|
-
| `
|
|
435
|
+
| `variant` | string | `'primary'` | The COLOUR: `default` + the 8 palettes |
|
|
436
|
+
| `label` | node | — | Also accepts `children` |
|
|
437
|
+
| `selected` | boolean | `false` | Switches the surface level, not the fill |
|
|
438
|
+
| `selectionMode` | string | — | `radio` or `checkbox` — adds the ARIA role |
|
|
415
439
|
| `clickable` | boolean | `false` | — |
|
|
416
|
-
| `
|
|
417
|
-
| `onDelete` | function | — |
|
|
418
|
-
| `
|
|
419
|
-
| `icon` | node | — | Leading icon |
|
|
420
|
-
| `selected` | boolean | `false` | Visual selected state for clickable chips |
|
|
440
|
+
| `onClick` | function | — | Implies `clickable` |
|
|
441
|
+
| `onDelete` | function | — | Adds the dismiss affordance |
|
|
442
|
+
| `startDecorator` / `endDecorator` | node | — | Icon or avatar |
|
|
421
443
|
| `disabled` | boolean | `false` | — |
|
|
422
444
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
**Non-clickable outline:** `--Tags-{Color}-BG` (border), `--Text`
|
|
445
|
+
**There is no `size` prop.** Chip has ONE size, 24px, matching the Figma set,
|
|
446
|
+
which carries no size axis. Component sizing in this system comes from the
|
|
447
|
+
`Component-Size` modes rather than a per-component ladder. A `size` passed
|
|
448
|
+
anyway is ignored and warns once.
|
|
428
449
|
|
|
429
|
-
|
|
430
|
-
`--Buttons-{Color}-Hover`, `--Buttons-{Color}-Active`
|
|
450
|
+
### Tokens consumed
|
|
431
451
|
|
|
432
|
-
|
|
433
|
-
`--
|
|
452
|
+
All of them resolve from the chip's own `data-theme` + `data-surface` zone:
|
|
453
|
+
`--Background` (the body), `--Text` (the label), `--Border` (the outline), plus
|
|
454
|
+
`--Hover` and `--Pressed`.
|
|
434
455
|
|
|
435
456
|
### Examples
|
|
436
457
|
|
|
437
458
|
```jsx
|
|
438
|
-
//
|
|
439
|
-
<Chip
|
|
440
|
-
<Chip
|
|
441
|
-
|
|
459
|
+
// Colour comes from variant
|
|
460
|
+
<Chip variant="success">Active</Chip>
|
|
461
|
+
<Chip variant="warning">Pending</Chip>
|
|
462
|
+
|
|
463
|
+
// Inherits the surrounding theme
|
|
464
|
+
<Chip variant="default">Neutral</Chip>
|
|
442
465
|
|
|
443
|
-
//
|
|
466
|
+
// Selectable — selection changes the SURFACE, not the colour
|
|
444
467
|
<Chip
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
clickable
|
|
468
|
+
variant="primary"
|
|
469
|
+
selectionMode="checkbox"
|
|
448
470
|
selected={selected}
|
|
449
471
|
onClick={() => setSelected(!selected)}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
<Chip
|
|
454
|
-
label="React"
|
|
455
|
-
color="info"
|
|
456
|
-
deletable
|
|
457
|
-
onDelete={() => removeTag('react')}
|
|
458
|
-
/>
|
|
459
|
-
|
|
460
|
-
// With icon
|
|
461
|
-
<Chip label="Verified" color="success" icon={<CheckIcon />} />
|
|
472
|
+
>
|
|
473
|
+
Design
|
|
474
|
+
</Chip>
|
|
462
475
|
|
|
463
|
-
//
|
|
464
|
-
<Chip
|
|
465
|
-
|
|
476
|
+
// Dismissible, with a leading icon
|
|
477
|
+
<Chip variant="info" startDecorator={<TagIcon />} onDelete={() => remove('react')}>
|
|
478
|
+
React
|
|
479
|
+
</Chip>
|
|
466
480
|
```
|
|
467
481
|
|
|
468
482
|
### Accessibility notes
|
|
469
483
|
|
|
470
|
-
-
|
|
471
|
-
-
|
|
472
|
-
-
|
|
484
|
+
- A dismissible chip's X is labelled with what it removes, not "close".
|
|
485
|
+
- A selectable chip announces its own selected state — do not add `aria-pressed`.
|
|
486
|
+
- The 24x24 minimum touch target (WCAG 2.5.8) is carried by a pseudo-element,
|
|
487
|
+
so the chip stays 24px tall without the target shrinking.
|
|
473
488
|
|
|
474
489
|
---
|
|
475
490
|
|
|
491
|
+
|
|
476
492
|
## Stack
|
|
477
493
|
|
|
478
494
|
Flexible layout primitive for arranging children in a row or column with
|
|
@@ -494,7 +510,7 @@ import {
|
|
|
494
510
|
InsetStack,
|
|
495
511
|
ScrollStack,
|
|
496
512
|
WrapStack,
|
|
497
|
-
} from '@
|
|
513
|
+
} from '@omni-design/components';
|
|
498
514
|
```
|
|
499
515
|
|
|
500
516
|
### Stack Props
|
|
@@ -576,7 +592,7 @@ as Button.
|
|
|
576
592
|
### Import
|
|
577
593
|
|
|
578
594
|
```jsx
|
|
579
|
-
import { Tabs, TabPanel } from '@
|
|
595
|
+
import { Tabs, TabPanel } from '@omni-design/components';
|
|
580
596
|
```
|
|
581
597
|
|
|
582
598
|
### Tabs Props
|
|
@@ -686,7 +702,7 @@ all child components automatically inherit the correct color context.
|
|
|
686
702
|
### Import
|
|
687
703
|
|
|
688
704
|
```jsx
|
|
689
|
-
import { Card } from '@
|
|
705
|
+
import { Card } from '@omni-design/components';
|
|
690
706
|
```
|
|
691
707
|
|
|
692
708
|
### Props
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omni-design/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "DynoDesign adaptive component library — token-driven React components with customizable CSS theming",
|
|
5
5
|
"author": "Lise Noble",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -107,7 +107,9 @@
|
|
|
107
107
|
"type": "git",
|
|
108
108
|
"url": "https://github.com/lwnoble/omni-design"
|
|
109
109
|
},
|
|
110
|
-
"dependencies": {
|
|
110
|
+
"dependencies": {
|
|
111
|
+
"@fortawesome/free-brands-svg-icons": "^7.3.1"
|
|
112
|
+
},
|
|
111
113
|
"homepage": "/",
|
|
112
114
|
"browserslist": {
|
|
113
115
|
"production": [
|