@juwel-development/design-system 3.10.0 → 4.0.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 +16 -3
- package/dist/design-system.js +1038 -528
- package/dist/styles.css +2 -0
- package/dist/styles.dark.css +2 -0
- package/dist/styles.light.css +2 -0
- package/dist/types/Arrangement/ColumnLayout/ColumnLayout.d.ts +38 -18
- package/dist/types/Display/Callout/Callout.d.ts +31 -0
- package/dist/types/Display/Icon/Icon.d.ts +31 -16
- package/dist/types/Display/Meter/Meter.d.ts +5 -6
- package/dist/types/Display/Rule/Rule.d.ts +22 -0
- package/dist/types/Display/Table/Table.d.ts +57 -7
- package/dist/types/Display/Typography/Eyebrow/Eyebrow.d.ts +1 -1
- package/dist/types/Display/Typography/H1/H1.d.ts +1 -1
- package/dist/types/Display/Typography/H2/H2.d.ts +1 -1
- package/dist/types/Display/Typography/H3/H3.d.ts +1 -1
- package/dist/types/Display/Typography/H4/H4.d.ts +1 -1
- package/dist/types/Display/Typography/H5/H5.d.ts +1 -1
- package/dist/types/Display/Typography/H6/H6.d.ts +1 -1
- package/dist/types/Display/Typography/Note/Note.d.ts +16 -3
- package/dist/types/Display/Typography/P/P.d.ts +15 -2
- package/dist/types/Display/Typography/Prose/Prose.d.ts +14 -6
- package/dist/types/Interaction/Button/Button.d.ts +13 -5
- package/dist/types/Interaction/Slider/Slider.d.ts +3 -0
- package/dist/types/Interaction/Stepper/Stepper.d.ts +59 -0
- package/dist/types/Interaction/Stepper/StepperCompositionError.d.ts +3 -0
- package/dist/types/Interaction/Switch/Switch.d.ts +20 -0
- package/dist/types/Interaction/Tabs/Tabs.d.ts +24 -3
- package/dist/types/Layout/Dialog/Dialog.d.ts +11 -3
- package/dist/types/Layout/Form/FormConfigurationError.d.ts +3 -0
- package/dist/types/Layout/Pane/Pane.d.ts +55 -0
- package/dist/types/Layout/Shell/Shell.d.ts +39 -0
- package/dist/types/Layout/Sidebar/Sidebar.d.ts +16 -2
- package/dist/types/Theme/Palette.d.ts +11 -4
- package/dist/types/index.d.ts +21 -1
- package/package.json +18 -8
- package/src/Arrangement/ColumnLayout/ColumnLayout.tsx +86 -28
- package/src/Display/Callout/Callout.tsx +64 -0
- package/src/Display/Icon/Icon.tsx +111 -21
- package/src/Display/Meter/Meter.tsx +12 -13
- package/src/Display/Rule/Rule.tsx +31 -0
- package/src/Display/Table/Table.tsx +189 -24
- package/src/Display/Typography/Note/Note.tsx +27 -11
- package/src/Display/Typography/P/P.tsx +29 -4
- package/src/Display/Typography/Prose/Prose.tsx +44 -19
- package/src/Interaction/Button/Button.tsx +14 -5
- package/src/Interaction/Slider/Slider.tsx +3 -5
- package/src/Interaction/Stepper/Stepper.tsx +307 -0
- package/src/Interaction/Stepper/StepperCompositionError.ts +6 -0
- package/src/Interaction/Switch/Switch.tsx +64 -0
- package/src/Interaction/Tabs/Tabs.tsx +44 -10
- package/src/Layout/Dialog/Dialog.tsx +19 -6
- package/src/Layout/Form/Form.tsx +2 -1
- package/src/Layout/Form/FormConfigurationError.ts +6 -0
- package/src/Layout/Pane/Pane.tsx +159 -0
- package/src/Layout/Shell/Shell.tsx +124 -0
- package/src/Layout/Sidebar/Sidebar.tsx +31 -7
- package/src/Theme/Palette.ts +17 -6
- package/src/Theme/renderTokens.ts +61 -12
- package/src/index.ts +21 -2
- package/src/styles.css +5 -6
- package/src/styles.dark.css +5 -6
- package/src/styles.light.css +5 -6
- package/src/tokens.css +54 -9
- package/src/tokens.dark.css +51 -8
- package/src/tokens.light.css +49 -6
- package/dist/index.css +0 -2
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
1
2
|
import { type FunctionComponent, type ReactNode } from 'react';
|
|
2
3
|
import type { Subject } from 'rxjs';
|
|
3
|
-
|
|
4
|
+
declare const tabsRoot: (props?: ({
|
|
5
|
+
fill?: boolean | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ITabsRootProps extends VariantProps<typeof tabsRoot> {
|
|
8
|
+
/** Fill the allocated parent height, keeping List at content height and giving Panel the rest.
|
|
9
|
+
* In an unsized parent, panels retain content height. Compose List and Panels directly in Root;
|
|
10
|
+
* an unsized spacing wrapper does not pass the bound. No spacing is added. */
|
|
11
|
+
fill?: VariantProps<typeof tabsRoot>['fill'];
|
|
4
12
|
/** The key of the active tab. Must name a declared tab/panel pair; the consumer owns it. */
|
|
5
13
|
active: string;
|
|
6
14
|
/** Emits the selected key on click and on arrow navigation. Tabs never selects on its own. */
|
|
@@ -64,11 +72,23 @@ export interface ITabsPanelProps {
|
|
|
64
72
|
* `foreground`, constant thickness in both states, so switching shifts no widths and no weights.
|
|
65
73
|
* Keyboard focus is the separate shared focus ring. Colour moves on the one motion token.
|
|
66
74
|
*
|
|
75
|
+
* - With `fill`, Root takes the allocated parent height; List keeps its content height and the
|
|
76
|
+
* active Panel takes the remainder. Its definite height bounds a direct Pane or bounded Table.
|
|
77
|
+
* Switching views changes neither Root height nor List position. No scrolling or spacing is added.
|
|
78
|
+
* In an unsized parent the panel retains content height; no bound is invented.
|
|
79
|
+
* - Without `fill` (including false or null), the existing content-height composition is unchanged.
|
|
80
|
+
*
|
|
67
81
|
* @CallerMustEnsure — the component cannot see these and does not check them
|
|
68
82
|
* - One List with Tab elements as direct DOM children (arrays and fragments are supported),
|
|
69
83
|
* and the Panels under the same Root - as siblings of the List, or with it inside one
|
|
70
84
|
* arrangement such as a `Stack` (see the separation guidance below). Do not wrap tabs in host
|
|
71
85
|
* elements.
|
|
86
|
+
* - For `fill`, List and Panels must be direct DOM children of Root (fragments are fine), with
|
|
87
|
+
* one height-accepting child directly inside the active Panel. Supply a definite parent height
|
|
88
|
+
* and enough room for List and the child's fixed content. An unsized Stack between Root and
|
|
89
|
+
* members, or between Panel and its child, breaks that height chain. Compose content spacing
|
|
90
|
+
* inside the Pane's slots instead; Tabs adds no gap. In an unsized parent the enclosing page
|
|
91
|
+
* owns overflow. A bounded Table requires the separate #142 API.
|
|
72
92
|
* - A label is a meaningful visible text name, with non-interactive decoration at most: no link,
|
|
73
93
|
* button, input or other focusable descendant, since the tab is the one control and a nested
|
|
74
94
|
* control inside a `button` is invalid. Decorative parts - an icon that repeats the text - carry
|
|
@@ -88,8 +108,8 @@ export interface ITabsPanelProps {
|
|
|
88
108
|
* do not fit, so a label is never the reason to shorten a name.
|
|
89
109
|
* - This is not a router: no location, no history, no deep links. Wire `onSelect$` to whatever
|
|
90
110
|
* owns the active key and pass that key back in.
|
|
91
|
-
* - Tabs sets no spacing between the row and the panel;
|
|
92
|
-
* and its members - `<Tabs.Root><Stack gap="region"><Tabs.List/>…<Tabs.Panel/>…</Stack>
|
|
111
|
+
* - In the default content-height mode, Tabs sets no spacing between the row and the panel;
|
|
112
|
+
* the separation is a `Stack` between Root and its members - `<Tabs.Root><Stack gap="region"><Tabs.List/>…<Tabs.Panel/>…</Stack>
|
|
93
113
|
* </Tabs.Root>`. `gap="stack"` holds the row and its view together as one block; `gap="region"`
|
|
94
114
|
* sets the view apart as a region of its own. Inactive panels are hidden, so the gap is exactly
|
|
95
115
|
* one whichever panel is active, from the token the consumer's other groups already use.
|
|
@@ -102,3 +122,4 @@ export declare const Tabs: {
|
|
|
102
122
|
readonly Tab: FunctionComponent<ITabsTabProps>;
|
|
103
123
|
readonly Panel: FunctionComponent<ITabsPanelProps>;
|
|
104
124
|
};
|
|
125
|
+
export {};
|
|
@@ -4,6 +4,9 @@ import type { Subject } from 'rxjs';
|
|
|
4
4
|
declare const dialogRoot: (props?: ({
|
|
5
5
|
extent?: "screen" | "content" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare const dialogContent: (props?: ({
|
|
8
|
+
scrollOwner?: "body" | "child" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
10
|
export interface IDialogRootProps extends VariantProps<typeof dialogRoot> {
|
|
8
11
|
/** The composed regions, in the supported order: Title, Description, Content, Actions. */
|
|
9
12
|
children: ReactNode;
|
|
@@ -29,7 +32,7 @@ export interface IDialogDescriptionProps {
|
|
|
29
32
|
children: ReactNode;
|
|
30
33
|
testId?: string;
|
|
31
34
|
}
|
|
32
|
-
export interface IDialogContentProps {
|
|
35
|
+
export interface IDialogContentProps extends VariantProps<typeof dialogContent> {
|
|
33
36
|
/** Arbitrary task content, composed and owned by the consumer. */
|
|
34
37
|
children: ReactNode;
|
|
35
38
|
testId?: string;
|
|
@@ -44,7 +47,7 @@ export interface IDialogActionsProps {
|
|
|
44
47
|
* the platform `<dialog>` and `showModal()`: the browser owns the top layer, background inertness
|
|
45
48
|
* and the modal keyboard boundary; the consumer owns all wording, controls, outcomes and
|
|
46
49
|
* replacement. Composed from five members: `Root` carries the contract, `Title` the visible name,
|
|
47
|
-
* `Description` one connected line, `Content` the
|
|
50
|
+
* `Description` one connected line, `Content` the scrolling region or holder of one bounded child, `Actions` the controls.
|
|
48
51
|
*
|
|
49
52
|
* @Guarantees — enforced on every render
|
|
50
53
|
* - Presents through `showModal()`/`close()` - no portal, focus trap or polyfill - so background
|
|
@@ -67,7 +70,9 @@ export interface IDialogActionsProps {
|
|
|
67
70
|
* - `extent="screen"` (the default) fills the viewport minus the `--gutter` inline and
|
|
68
71
|
* `--space-region` block insets, header and Actions fixed, only `Content` scrolling.
|
|
69
72
|
* `extent="content"` holds a fixed 32rem capped to the viewport with content-driven height;
|
|
70
|
-
* `Content` scrolls
|
|
73
|
+
* Default `Content` scrolls as the fallback when its content exceeds available space.
|
|
74
|
+
* - `Content scrollOwner="child"` passes available height to one bounded child without scrolling.
|
|
75
|
+
* A bounded Table then owns both axes and pins its header; title, description and actions stay fixed.
|
|
71
76
|
* - Regions take `--space-region` padding with `--space-stack` between Title and Description and
|
|
72
77
|
* between Actions controls; hairlines separate header from `Content` and `Content` from
|
|
73
78
|
* `Actions` only where both neighbours exist. The surface reads `--radius-dialog`,
|
|
@@ -75,6 +80,9 @@ export interface IDialogActionsProps {
|
|
|
75
80
|
* with the theme's optional `--scrim-blur`.
|
|
76
81
|
*
|
|
77
82
|
* @CallerMustEnsure — the component cannot see these and does not check them
|
|
83
|
+
* - In child-scroll mode provide one child that accepts the height allocation and owns overflow.
|
|
84
|
+
* Intermediate wrappers must preserve that allocation. Fixed regions must fit the viewport and
|
|
85
|
+
* leave usable room for the child; a Table needs room for its header and readable rows.
|
|
78
86
|
* - Direct children in the order `Title`, `Description`, `Content`, `Actions`, at most one of
|
|
79
87
|
* each; `Actions` is present and holds at least one explicit dismissal control, wired to the
|
|
80
88
|
* same dismissal and visibility transitions. Cancel-before-Confirm order puts initial focus on
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { type FunctionComponent, type ReactNode } from 'react';
|
|
3
|
+
declare const paneBody: (props?: ({
|
|
4
|
+
scrollOwner?: "body" | "child" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface IPaneRootProps {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/** A non-empty name makes the enclosure an accessible group, as with Box. */
|
|
9
|
+
name?: string;
|
|
10
|
+
testId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IPaneSectionProps {
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
testId?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IPaneBodyProps extends VariantProps<typeof paneBody> {
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
/** Names the body while overflowing. Unused when the child owns scrolling. */
|
|
19
|
+
ariaLabel: string;
|
|
20
|
+
testId?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A parent-bounded enclosure with optional content-height Head and Foot around a shrinking Body.
|
|
24
|
+
*
|
|
25
|
+
* @Guarantees
|
|
26
|
+
* - Root fills the allocated height, including its border and box inset. Without a definite
|
|
27
|
+
* parent height it grows with content; a stacked parent or enclosing body owns scrolling.
|
|
28
|
+
* - Head and Foot never shrink. Body scrolls both axes as needed and short content does not
|
|
29
|
+
* stretch: Foot follows it, with any unused height left in Root rather than inside Body.
|
|
30
|
+
* - Root paints surface, foreground, border and box inset, square and without elevation.
|
|
31
|
+
* The stack space role separates slots; a non-empty name exposes a group, never a landmark.
|
|
32
|
+
* - Default Body is the sole scroll region: a named group and keyboard stop only while
|
|
33
|
+
* overflowing, retained while focused. It reserves the shared focus ring's room and leaves
|
|
34
|
+
* native focus reveal, scrolling and child keyboard interactions intact.
|
|
35
|
+
* - Body scrollOwner="child" passes its allocated height directly to its child, without an
|
|
36
|
+
* inner wrapper, overflow, group or keyboard stop. The child owns scroll semantics and naming.
|
|
37
|
+
* Use this for a bounded Table: its wrapper must own both axes so its header stays in view.
|
|
38
|
+
*
|
|
39
|
+
* @CallerMustEnsure
|
|
40
|
+
* - Compose at most one Head, Body and Foot, in that order, directly inside Root; all are optional.
|
|
41
|
+
* Do not nest panes. The consumer owns all wording, facts, actions and internal arrangement.
|
|
42
|
+
* - Supply a finite parent height to bound a pane, and enough room for Head, Foot, inset and gaps.
|
|
43
|
+
* At smaller sizes use an unsized stacked arrangement in a scrolling page or Shell body.
|
|
44
|
+
* - In child mode supply one child that accepts its parent's allocated height and handles its
|
|
45
|
+
* own overflow and focus ring. Intermediate wrappers must preserve that allocation.
|
|
46
|
+
* - Filled ColumnLayout columns and active Stepper panels can pass the bound to Root. Keep
|
|
47
|
+
* those holders and Pane directly composed so no intermediate wrapper loses the allocation.
|
|
48
|
+
*/
|
|
49
|
+
export declare const Pane: {
|
|
50
|
+
readonly Root: FunctionComponent<IPaneRootProps>;
|
|
51
|
+
readonly Head: FunctionComponent<IPaneSectionProps>;
|
|
52
|
+
readonly Body: FunctionComponent<IPaneBodyProps>;
|
|
53
|
+
readonly Foot: FunctionComponent<IPaneSectionProps>;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { type FunctionComponent, type ReactNode } from 'react';
|
|
3
|
+
declare const shellBody: (props?: ({
|
|
4
|
+
mode?: "page" | "console" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface IShellProps extends VariantProps<typeof shellBody> {
|
|
7
|
+
/** Consumer-owned top bar; its content determines its height. */
|
|
8
|
+
bar: ReactNode;
|
|
9
|
+
/** Body content; receives the remaining height in console mode. */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** The body scroll group's name, exposed only while overflowing or focused. */
|
|
12
|
+
ariaLabel: string;
|
|
13
|
+
testId?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A viewport-owning frame with a content-height bar and the remaining height for its body.
|
|
17
|
+
*
|
|
18
|
+
* @Guarantees
|
|
19
|
+
* - CSS allocates both tracks, including when bar content wraps. Header is unchanged.
|
|
20
|
+
* - Console (default) passes a finite height to its child; page lets body content grow.
|
|
21
|
+
* Both keep overflow inside the body, with the bar visible and document still.
|
|
22
|
+
* - Console body scrolling is a reachability fallback for content that cannot fit; bounded
|
|
23
|
+
* panels normally own their scrolling. Page deliberately scrolls the body as a whole.
|
|
24
|
+
* - Overflow makes the body a named, keyboard-reachable group, never a landmark. Removing
|
|
25
|
+
* overflow does not relocate focus. Native focus reveal and scroll keys remain intact.
|
|
26
|
+
* - Body padding reserves the shared focus ring's room, with an inset ring on the body itself.
|
|
27
|
+
*
|
|
28
|
+
* @CallerMustEnsure
|
|
29
|
+
* - Place one Shell at the viewport origin, with no outside margins, padding or siblings that
|
|
30
|
+
* add document extent. This is the application frame, not a nested fullscreen section.
|
|
31
|
+
* - The bar must leave usable body space. An arbitrarily tall bar cannot fit every viewport.
|
|
32
|
+
* - Supply the main landmark inside the body (inside Sidebar.Content when using Sidebar).
|
|
33
|
+
* - Intermediate consumer wrappers must preserve the allocated height for bounded panels;
|
|
34
|
+
* wrappers with height: 100% and min-height: 0, or display: contents, can pass it through.
|
|
35
|
+
* - Use Sidebar.Root fill in a console; below 64rem its list stacks and the body scrolls.
|
|
36
|
+
* - Name the body in the viewer's language. Content and its panel arrangements remain yours.
|
|
37
|
+
*/
|
|
38
|
+
export declare const Shell: FunctionComponent<IShellProps>;
|
|
39
|
+
export {};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
1
2
|
import type { FunctionComponent, ReactNode } from 'react';
|
|
2
3
|
import type { Subject } from 'rxjs';
|
|
3
|
-
|
|
4
|
+
declare const sidebarRoot: (props?: ({
|
|
5
|
+
fill?: boolean | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ISidebarRootProps extends VariantProps<typeof sidebarRoot> {
|
|
8
|
+
/** Pass a finite parent height through to Content at 64rem and above, using CSS alone.
|
|
9
|
+
* Below 64rem the enclosing scrollable body owns the stacked list and content. */
|
|
10
|
+
fill?: VariantProps<typeof sidebarRoot>['fill'];
|
|
4
11
|
/** The key of the active entry. The caller supplies a key identifying one non-inert entry;
|
|
5
12
|
* Sidebar renders what it is given and never selects a fallback for an invalid key. */
|
|
6
13
|
active: string;
|
|
@@ -49,11 +56,17 @@ export interface ISidebarContentProps {
|
|
|
49
56
|
* assumed top-bar offset, capped to the screen/scrolling-area height with independent entry scrolling.
|
|
50
57
|
* Content sits beside it in `minmax(0,1fr)`, so wide content cannot displace the track.
|
|
51
58
|
* - Below 64rem the whole list lies above the content in normal flow - no stickiness, no cap, no
|
|
52
|
-
* drawer.
|
|
59
|
+
* drawer. Without fill, Sidebar grows with its content.
|
|
60
|
+
* - With fill, a finite parent height passes through Root and Content at 64rem and above;
|
|
61
|
+
* navigation is capped to that allocated height by CSS, with no scrollport measurement.
|
|
62
|
+
* Below 64rem the list stacks and the enclosing body scrolls. The DOM never switches.
|
|
53
63
|
* - It separates the tracks itself (the region space role and a `border` hairline) but gives the
|
|
54
64
|
* content track no padding and no landmark - the consumer owns everything inside `Content`.
|
|
55
65
|
*
|
|
56
66
|
* @CallerMustEnsure — the component cannot see these and does not check them
|
|
67
|
+
* - Fill requires a parent with a finite height and a scrollable enclosing body for narrow
|
|
68
|
+
* viewports or oversized fixed content. Consumer wrappers inside Content preserve that bound.
|
|
69
|
+
* It works with any bounded parent; no Shell identity, context or offset is required.
|
|
57
70
|
* - Entry keys are unique and `active` names one non-inert entry. Sidebar corrects nothing.
|
|
58
71
|
* - Items and the one Content are direct children of `Root` - Root assembles only what it can see,
|
|
59
72
|
* and an Item rendered outside a Root has no selection to derive its treatment from.
|
|
@@ -71,3 +84,4 @@ export declare const Sidebar: {
|
|
|
71
84
|
readonly Item: FunctionComponent<ISidebarItemProps>;
|
|
72
85
|
readonly Content: FunctionComponent<ISidebarContentProps>;
|
|
73
86
|
};
|
|
87
|
+
export {};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Light and dark are two complete sets of the same roles rather than a set of `dark:` overrides
|
|
11
11
|
* scattered through the components. A component therefore carries no dark-mode classes at all:
|
|
12
12
|
* swapping the `.dark` class re-points the variables underneath it. Complete means `Required`: the
|
|
13
|
-
*
|
|
13
|
+
* roles the type marks optional are optional for a consumer's palette object, never here.
|
|
14
14
|
*
|
|
15
15
|
* The values below are still depot-tracker's brand (primary is its violet). They are carried over
|
|
16
16
|
* so nothing changed visually during the extraction - a starting point to replace, not a decision.
|
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
export type PaletteTokens = {
|
|
19
19
|
/** Page and panel background. */
|
|
20
20
|
surface: string;
|
|
21
|
+
/** Selected Table row surface, distinct from resting and hover surfaces. Keep foreground, muted
|
|
22
|
+
* link and status inks at 4.5:1; marker, rule and focusRing at 3:1 in each scheme.
|
|
23
|
+
* Optional for existing palette objects; CSS overrides inherit the shipped default. Consumers
|
|
24
|
+
* composing other inks or controls on this surface must ensure their contrast too. */
|
|
25
|
+
selectedSurface?: string;
|
|
26
|
+
/** Error ink/fill on a selected surface: 4.5:1 against selectedSurface and errorForeground. */
|
|
27
|
+
selectedError?: string;
|
|
21
28
|
/** Default text colour on `surface`. */
|
|
22
29
|
foreground: string;
|
|
23
30
|
/** De-emphasised text - captions, help text, placeholders. */
|
|
@@ -41,11 +48,11 @@ export type PaletteTokens = {
|
|
|
41
48
|
backing: string;
|
|
42
49
|
/** The themed veil behind a Dialog, marking the page beneath as present but unavailable. The one
|
|
43
50
|
* role whose alpha is part of the colour - the page must show through, which a solid hex cannot
|
|
44
|
-
* say - so it is an `rgb(r g b / a)` value, not a hex.
|
|
45
|
-
*
|
|
51
|
+
* say - so it is an `rgb(r g b / a)` value, not a hex. Constraint: compositing over surface
|
|
52
|
+
* must reduce its relative luminance by at least 50%; modality never depends on the treatment.
|
|
46
53
|
*
|
|
47
54
|
* Migration (added with Dialog): a consumer constructing its own `PaletteTokens` object must
|
|
48
|
-
* add this role - `rgb(15 23 42 / 0.5)` is the
|
|
55
|
+
* add this role - `rgb(15 23 42 / 0.5)` is the light default. Spreading `light`/`dark` and
|
|
49
56
|
* overriding is unaffected, and a theme that only overrides the generated custom properties
|
|
50
57
|
* in CSS inherits the default. */
|
|
51
58
|
scrim: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
import './styles.css';
|
|
2
1
|
export { Cluster } from 'Arrangement/Cluster/Cluster';
|
|
3
2
|
export { ColumnLayout } from 'Arrangement/ColumnLayout/ColumnLayout';
|
|
3
|
+
export { ColumnLayoutCompositionError } from 'Arrangement/ColumnLayout/ColumnLayoutCompositionError';
|
|
4
|
+
export { ColumnLayoutConfigurationError } from 'Arrangement/ColumnLayout/ColumnLayoutConfigurationError';
|
|
4
5
|
export { FieldRow } from 'Arrangement/FieldRow/FieldRow';
|
|
6
|
+
export { FieldRowCompositionError } from 'Arrangement/FieldRow/FieldRowCompositionError';
|
|
7
|
+
export { FieldRowConfigurationError } from 'Arrangement/FieldRow/FieldRowConfigurationError';
|
|
5
8
|
export { Stack } from 'Arrangement/Stack/Stack';
|
|
6
9
|
export { Box } from 'Display/Box/Box';
|
|
7
10
|
export { Brandmark } from 'Display/Brandmark/Brandmark';
|
|
11
|
+
export { Callout } from 'Display/Callout/Callout';
|
|
8
12
|
export { Checklist } from 'Display/Checklist/Checklist';
|
|
9
13
|
export { Collection } from 'Display/Collection/Collection';
|
|
10
14
|
export { DefinitionList } from 'Display/DefinitionList/DefinitionList';
|
|
15
|
+
export { DefinitionListConfigurationError } from 'Display/DefinitionList/DefinitionListConfigurationError';
|
|
11
16
|
export { Figure } from 'Display/Figure/Figure';
|
|
12
17
|
export { Icon } from 'Display/Icon/Icon';
|
|
13
18
|
export { Meter } from 'Display/Meter/Meter';
|
|
19
|
+
export { MeterConfigurationError } from 'Display/Meter/MeterConfigurationError';
|
|
14
20
|
export { Rail } from 'Display/Rail/Rail';
|
|
21
|
+
export { Rule } from 'Display/Rule/Rule';
|
|
15
22
|
export type { TableColumnAllocation } from 'Display/Table/Table';
|
|
16
23
|
export { Table } from 'Display/Table/Table';
|
|
24
|
+
export { TableConfigurationError } from 'Display/Table/TableConfigurationError';
|
|
17
25
|
export { Eyebrow } from 'Display/Typography/Eyebrow/Eyebrow';
|
|
18
26
|
export { H1 } from 'Display/Typography/H1/H1';
|
|
19
27
|
export { H2 } from 'Display/Typography/H2/H2';
|
|
@@ -26,24 +34,36 @@ export { P } from 'Display/Typography/P/P';
|
|
|
26
34
|
export { Prose } from 'Display/Typography/Prose/Prose';
|
|
27
35
|
export { Button } from 'Interaction/Button/Button';
|
|
28
36
|
export { Choices } from 'Interaction/Choices/Choices';
|
|
37
|
+
export { ChoicesCompositionError } from 'Interaction/Choices/ChoicesCompositionError';
|
|
29
38
|
export { Input } from 'Interaction/Input/Input';
|
|
30
39
|
export { Link } from 'Interaction/Link/Link';
|
|
31
40
|
export { MultiSelect } from 'Interaction/MultiSelect/MultiSelect';
|
|
41
|
+
export { MultiSelectCompositionError } from 'Interaction/MultiSelect/MultiSelectCompositionError';
|
|
32
42
|
export { NumberInput } from 'Interaction/NumberInput/NumberInput';
|
|
33
43
|
export { Select } from 'Interaction/Select/Select';
|
|
34
44
|
export { Slider } from 'Interaction/Slider/Slider';
|
|
45
|
+
export { SliderConfigurationError } from 'Interaction/Slider/SliderConfigurationError';
|
|
46
|
+
export { Stepper } from 'Interaction/Stepper/Stepper';
|
|
47
|
+
export { StepperCompositionError } from 'Interaction/Stepper/StepperCompositionError';
|
|
48
|
+
export { Switch } from 'Interaction/Switch/Switch';
|
|
35
49
|
export { Tabs } from 'Interaction/Tabs/Tabs';
|
|
50
|
+
export { TabsCompositionError } from 'Interaction/Tabs/TabsCompositionError';
|
|
36
51
|
export { TextArea } from 'Interaction/TextArea/TextArea';
|
|
37
52
|
export { Cover } from 'Layout/Cover/Cover';
|
|
38
53
|
export { Dialog } from 'Layout/Dialog/Dialog';
|
|
54
|
+
export { DialogCompositionError } from 'Layout/Dialog/DialogCompositionError';
|
|
55
|
+
export { DialogNamingError } from 'Layout/Dialog/DialogNamingError';
|
|
39
56
|
export { Footer } from 'Layout/Footer/Footer';
|
|
40
57
|
export type { FormState } from 'Layout/Form/Form';
|
|
41
58
|
export { Form } from 'Layout/Form/Form';
|
|
59
|
+
export { FormConfigurationError } from 'Layout/Form/FormConfigurationError';
|
|
42
60
|
export { Header } from 'Layout/Header/Header';
|
|
43
61
|
export { Hero } from 'Layout/Hero/Hero';
|
|
44
62
|
export { PageHead } from 'Layout/PageHead/PageHead';
|
|
63
|
+
export { Pane } from 'Layout/Pane/Pane';
|
|
45
64
|
export { ScrollContainer } from 'Layout/ScrollContainer/ScrollContainer';
|
|
46
65
|
export { Section } from 'Layout/Section/Section';
|
|
66
|
+
export { Shell } from 'Layout/Shell/Shell';
|
|
47
67
|
export { Sidebar } from 'Layout/Sidebar/Sidebar';
|
|
48
68
|
export type { PaletteTokens } from 'Theme/Palette';
|
|
49
69
|
export { dark, light } from 'Theme/Palette';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juwel-development/design-system",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared design system: tokens and components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"import": "./dist/design-system.js",
|
|
30
30
|
"default": "./dist/design-system.js"
|
|
31
31
|
},
|
|
32
|
-
"./styles.css": "./
|
|
33
|
-
"./styles.light.css": "./
|
|
34
|
-
"./styles.dark.css": "./
|
|
32
|
+
"./styles.css": "./dist/styles.css",
|
|
33
|
+
"./styles.light.css": "./dist/styles.light.css",
|
|
34
|
+
"./styles.dark.css": "./dist/styles.dark.css",
|
|
35
35
|
"./tokens.css": "./src/tokens.css",
|
|
36
36
|
"./tokens.light.css": "./src/tokens.light.css",
|
|
37
37
|
"./tokens.dark.css": "./src/tokens.dark.css",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"build:tokens": "tsx scripts/build-tokens.ts",
|
|
42
42
|
"build:components": "vite build",
|
|
43
43
|
"build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --declarationDir dist/types",
|
|
44
|
-
"build": "npm run build:components && npm run build:types",
|
|
44
|
+
"build": "npm run build:components && npm run build:styles && npm run build:types && npm run check:build",
|
|
45
45
|
"typecheck": "tsc --noEmit",
|
|
46
46
|
"test": "vitest run",
|
|
47
47
|
"test:coverage": "vitest run --coverage",
|
|
@@ -53,7 +53,9 @@
|
|
|
53
53
|
"fallow:human": "fallow dead-code && fallow dupes && fallow health",
|
|
54
54
|
"fallow:agent": "fallow review --brief",
|
|
55
55
|
"fallow:map": "fallow viz",
|
|
56
|
-
"prepare": "husky"
|
|
56
|
+
"prepare": "husky",
|
|
57
|
+
"build:styles": "vite build --config vite.styles.config.ts",
|
|
58
|
+
"check:build": "tsx scripts/check-build.ts"
|
|
57
59
|
},
|
|
58
60
|
"dependencies": {
|
|
59
61
|
"class-variance-authority": "^0.7.1"
|
|
@@ -61,7 +63,8 @@
|
|
|
61
63
|
"peerDependencies": {
|
|
62
64
|
"react": "^19.0.0",
|
|
63
65
|
"react-dom": "^19.0.0",
|
|
64
|
-
"rxjs": "^7.8.2"
|
|
66
|
+
"rxjs": "^7.8.2",
|
|
67
|
+
"tailwindcss": "^4.0.0"
|
|
65
68
|
},
|
|
66
69
|
"devDependencies": {
|
|
67
70
|
"@biomejs/biome": "^2.5.7",
|
|
@@ -93,12 +96,19 @@
|
|
|
93
96
|
"tsx": "^4.23.11",
|
|
94
97
|
"typescript": "^5.9.2",
|
|
95
98
|
"vite": "^8.2.1",
|
|
96
|
-
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
97
99
|
"vitest": "^4.1.10"
|
|
98
100
|
},
|
|
99
101
|
"overrides": {
|
|
100
102
|
"fallow-type-aware": {
|
|
101
103
|
"typescript": "7.0.2"
|
|
102
104
|
}
|
|
105
|
+
},
|
|
106
|
+
"sideEffects": [
|
|
107
|
+
"**/*.css"
|
|
108
|
+
],
|
|
109
|
+
"peerDependenciesMeta": {
|
|
110
|
+
"tailwindcss": {
|
|
111
|
+
"optional": true
|
|
112
|
+
}
|
|
103
113
|
}
|
|
104
114
|
}
|