@juwel-development/design-system 3.2.0 → 3.3.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/README.md +32 -0
- package/dist/design-system.js +319 -138
- package/dist/index.css +1 -1
- package/dist/types/Arrangement/Stack/Stack.d.ts +19 -6
- package/dist/types/Display/Collection/Collection.d.ts +30 -0
- package/dist/types/Interaction/Tabs/Tabs.d.ts +79 -0
- package/dist/types/Interaction/Tabs/TabsCompositionError.d.ts +3 -0
- package/dist/types/Layout/Sidebar/Sidebar.d.ts +69 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +1 -1
- package/src/Arrangement/Stack/Stack.tsx +30 -10
- package/src/Display/Collection/Collection.tsx +58 -0
- package/src/Interaction/Tabs/Tabs.tsx +284 -0
- package/src/Interaction/Tabs/TabsCompositionError.ts +6 -0
- package/src/Layout/Cover/Cover.tsx +3 -3
- package/src/Layout/Sidebar/Sidebar.tsx +224 -0
- package/src/Theme/renderTokens.ts +31 -0
- package/src/index.ts +3 -0
- package/src/tokens.css +15 -0
- package/src/tokens.dark.css +15 -0
- package/src/tokens.light.css +15 -0
package/README.md
CHANGED
|
@@ -32,6 +32,38 @@ If the host already imports Tailwind and only wants the palette, take the tokens
|
|
|
32
32
|
@import "@juwel-development/design-system/tokens.css";
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
## Collection
|
|
36
|
+
|
|
37
|
+
`Collection` is a vertical group of freely composed items with internal hairlines and
|
|
38
|
+
open outer edges. The library owns spacing and separation; the consumer owns content,
|
|
39
|
+
arrangement and interaction.
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { Collection, Link, Note, Stack } from '@juwel-development/design-system';
|
|
43
|
+
|
|
44
|
+
<Collection.Root>
|
|
45
|
+
<Collection.Item>
|
|
46
|
+
<Stack>
|
|
47
|
+
<Link href={'/guide'}>Read the guide</Link>
|
|
48
|
+
<Note color={'muted'}>Supporting information</Note>
|
|
49
|
+
</Stack>
|
|
50
|
+
</Collection.Item>
|
|
51
|
+
<Collection.Item><Note>Freely composed content</Note></Collection.Item>
|
|
52
|
+
</Collection.Root>;
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Both members accept only `children?: ReactNode` and `testId?: string`. Supply
|
|
56
|
+
`Collection.Item` children directly, through maps, or with conditional omissions.
|
|
57
|
+
The semantic list has no markers, horizontal indent, added focus stops or behavior.
|
|
58
|
+
An empty root renders no placeholder; a single item has no rule.
|
|
59
|
+
|
|
60
|
+
`--space-collection-item` names the vertical padding inside each item, defaulting to
|
|
61
|
+
`1em` above and below so it follows inherited type. This is a separate role from a
|
|
62
|
+
Stack's sibling gap or a Section's band: re-pointing it changes only Collection item
|
|
63
|
+
padding. It is declared in all three token stylesheets and accepts a nonnegative CSS
|
|
64
|
+
length. Hairlines use the existing `--color-border` role. There are no density,
|
|
65
|
+
padding or arrangement props; child components own their typography and wrapping.
|
|
66
|
+
|
|
35
67
|
## Theming
|
|
36
68
|
|
|
37
69
|
Colour is addressed by **role**, never by shade - `bg-primary`, `text-muted`,
|