@kcascend/liquid-ui 0.0.20 → 0.0.21
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 +85 -85
- package/dist/styles.css +4326 -4326
- package/package.json +36 -36
package/README.md
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
# Liquid UI Package
|
|
2
|
-
|
|
3
|
-
`@kcascend/liquid-ui` is the reusable UI package for Liquid Design System consumers.
|
|
4
|
-
|
|
5
|
-
## Local development
|
|
6
|
-
|
|
7
|
-
1. Run `npm install` from the repository root to install the local file dependency.
|
|
8
|
-
2. Run `npm run build:ui` to rebuild the package outputs in `packages/liquid-ui/dist`.
|
|
9
|
-
3. Run `npm run storybook` to rebuild the package and launch Storybook against the package boundary.
|
|
10
|
-
|
|
11
|
-
## Grid usage
|
|
12
|
-
|
|
13
|
-
The package exposes a grid primitive through `GridLayout` and `GridColumn`, plus an approved layout catalog for application shells and content regions.
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
import {
|
|
17
|
-
approvedContentLayoutPatterns,
|
|
18
|
-
GridColumn,
|
|
19
|
-
GridLayout,
|
|
20
|
-
} from '@kcascend/liquid-ui';
|
|
21
|
-
|
|
22
|
-
export function Example() {
|
|
23
|
-
const layout = approvedContentLayoutPatterns.sidebarEnd;
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<GridLayout as="div">
|
|
27
|
-
<GridColumn {...layout.regions.primary}>Primary</GridColumn>
|
|
28
|
-
<GridColumn {...layout.regions.secondary}>Secondary</GridColumn>
|
|
29
|
-
</GridLayout>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Supported layout features:
|
|
35
|
-
|
|
36
|
-
- Responsive spans through `sm`, `md`, `lg`, `xlg`, and `max`.
|
|
37
|
-
- Offset columns with object values like `md={{ span: 4, offset: 2 }}`.
|
|
38
|
-
- Gutter modes with `narrow` and `condensed`.
|
|
39
|
-
- `withRowGap` to keep vertical spacing aligned with the active gutter.
|
|
40
|
-
- `fullWidth` for viewport-spanning layouts.
|
|
41
|
-
- `subgrid` for nested grids that inherit the parent column scaffold.
|
|
42
|
-
- Auto columns when a `GridColumn` is rendered without explicit breakpoint props.
|
|
43
|
-
|
|
44
|
-
## Application shell geometry
|
|
45
|
-
|
|
46
|
-
The Figma application-shell pattern is the canonical geometry for product shells:
|
|
47
|
-
|
|
48
|
-
- Header: `48px`
|
|
49
|
-
- Left product-navigation panel: `256px`
|
|
50
|
-
- Right application-information panel: `256px`
|
|
51
|
-
- Compact transformation breakpoint: `672px`
|
|
52
|
-
|
|
53
|
-
Import `applicationShellGeometry` rather than reproducing these values in consumer CSS. The
|
|
54
|
-
geometry is sourced from Figma node `3307:3`; its runtime composition and accessibility behavior
|
|
55
|
-
remain governed by the exported shell components.
|
|
56
|
-
|
|
57
|
-
`ProductNavigationPanel` provides product-local destinations and expandable route groups, with
|
|
58
|
-
controlled or uncontrolled active-route and disclosure state. `ApplicationInformationPanel` provides
|
|
59
|
-
the separate application-wide utility disclosure. It requires `privacyHref`, `termsOfUseHref`, and
|
|
60
|
-
non-link `copyright` metadata; optional utility rows are supplied by the consumer. Pass the same
|
|
61
|
-
configuration through `HeaderShell.applicationInformation` to render its independent header trigger.
|
|
62
|
-
|
|
63
|
-
Approved layout guidance:
|
|
64
|
-
|
|
65
|
-
- Start application shells from `approvedShellRows`.
|
|
66
|
-
- Start page content from `approvedContentLayoutPatterns`.
|
|
67
|
-
- Introduce a bespoke breakpoint map only when a screen cannot be expressed by the approved patterns and that exception is documented in a spec.
|
|
68
|
-
|
|
69
|
-
## Figma governance
|
|
70
|
-
|
|
71
|
-
Every reusable component must record an approved Figma reference in story metadata or component documentation before it is considered ready for review. The initial workflow example in this package uses the Liquid token source in Figma
|
|
72
|
-
|
|
73
|
-
Storybook now demonstrates both patterns:
|
|
74
|
-
|
|
75
|
-
- a package-consumed button component with Figma and accessibility metadata
|
|
76
|
-
- a token values reference story that reads directly from the generated `tokens` export
|
|
77
|
-
|
|
78
|
-
## Accessibility verification
|
|
79
|
-
|
|
80
|
-
Each component review must include:
|
|
81
|
-
|
|
82
|
-
- Keyboard interaction expectations when the component is interactive.
|
|
83
|
-
- Name, role, and state guidance for assistive technologies.
|
|
84
|
-
- Color contrast and focus treatment verification.
|
|
85
|
-
- Storybook documentation that explains any usage constraints needed to stay WCAG 2.1 aligned.
|
|
1
|
+
# Liquid UI Package
|
|
2
|
+
|
|
3
|
+
`@kcascend/liquid-ui` is the reusable UI package for Liquid Design System consumers.
|
|
4
|
+
|
|
5
|
+
## Local development
|
|
6
|
+
|
|
7
|
+
1. Run `npm install` from the repository root to install the local file dependency.
|
|
8
|
+
2. Run `npm run build:ui` to rebuild the package outputs in `packages/liquid-ui/dist`.
|
|
9
|
+
3. Run `npm run storybook` to rebuild the package and launch Storybook against the package boundary.
|
|
10
|
+
|
|
11
|
+
## Grid usage
|
|
12
|
+
|
|
13
|
+
The package exposes a grid primitive through `GridLayout` and `GridColumn`, plus an approved layout catalog for application shells and content regions.
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import {
|
|
17
|
+
approvedContentLayoutPatterns,
|
|
18
|
+
GridColumn,
|
|
19
|
+
GridLayout,
|
|
20
|
+
} from '@kcascend/liquid-ui';
|
|
21
|
+
|
|
22
|
+
export function Example() {
|
|
23
|
+
const layout = approvedContentLayoutPatterns.sidebarEnd;
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<GridLayout as="div">
|
|
27
|
+
<GridColumn {...layout.regions.primary}>Primary</GridColumn>
|
|
28
|
+
<GridColumn {...layout.regions.secondary}>Secondary</GridColumn>
|
|
29
|
+
</GridLayout>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Supported layout features:
|
|
35
|
+
|
|
36
|
+
- Responsive spans through `sm`, `md`, `lg`, `xlg`, and `max`.
|
|
37
|
+
- Offset columns with object values like `md={{ span: 4, offset: 2 }}`.
|
|
38
|
+
- Gutter modes with `narrow` and `condensed`.
|
|
39
|
+
- `withRowGap` to keep vertical spacing aligned with the active gutter.
|
|
40
|
+
- `fullWidth` for viewport-spanning layouts.
|
|
41
|
+
- `subgrid` for nested grids that inherit the parent column scaffold.
|
|
42
|
+
- Auto columns when a `GridColumn` is rendered without explicit breakpoint props.
|
|
43
|
+
|
|
44
|
+
## Application shell geometry
|
|
45
|
+
|
|
46
|
+
The Figma application-shell pattern is the canonical geometry for product shells:
|
|
47
|
+
|
|
48
|
+
- Header: `48px`
|
|
49
|
+
- Left product-navigation panel: `256px`
|
|
50
|
+
- Right application-information panel: `256px`
|
|
51
|
+
- Compact transformation breakpoint: `672px`
|
|
52
|
+
|
|
53
|
+
Import `applicationShellGeometry` rather than reproducing these values in consumer CSS. The
|
|
54
|
+
geometry is sourced from Figma node `3307:3`; its runtime composition and accessibility behavior
|
|
55
|
+
remain governed by the exported shell components.
|
|
56
|
+
|
|
57
|
+
`ProductNavigationPanel` provides product-local destinations and expandable route groups, with
|
|
58
|
+
controlled or uncontrolled active-route and disclosure state. `ApplicationInformationPanel` provides
|
|
59
|
+
the separate application-wide utility disclosure. It requires `privacyHref`, `termsOfUseHref`, and
|
|
60
|
+
non-link `copyright` metadata; optional utility rows are supplied by the consumer. Pass the same
|
|
61
|
+
configuration through `HeaderShell.applicationInformation` to render its independent header trigger.
|
|
62
|
+
|
|
63
|
+
Approved layout guidance:
|
|
64
|
+
|
|
65
|
+
- Start application shells from `approvedShellRows`.
|
|
66
|
+
- Start page content from `approvedContentLayoutPatterns`.
|
|
67
|
+
- Introduce a bespoke breakpoint map only when a screen cannot be expressed by the approved patterns and that exception is documented in a spec.
|
|
68
|
+
|
|
69
|
+
## Figma governance
|
|
70
|
+
|
|
71
|
+
Every reusable component must record an approved Figma reference in story metadata or component documentation before it is considered ready for review. The initial workflow example in this package uses the Liquid token source in Figma
|
|
72
|
+
|
|
73
|
+
Storybook now demonstrates both patterns:
|
|
74
|
+
|
|
75
|
+
- a package-consumed button component with Figma and accessibility metadata
|
|
76
|
+
- a token values reference story that reads directly from the generated `tokens` export
|
|
77
|
+
|
|
78
|
+
## Accessibility verification
|
|
79
|
+
|
|
80
|
+
Each component review must include:
|
|
81
|
+
|
|
82
|
+
- Keyboard interaction expectations when the component is interactive.
|
|
83
|
+
- Name, role, and state guidance for assistive technologies.
|
|
84
|
+
- Color contrast and focus treatment verification.
|
|
85
|
+
- Storybook documentation that explains any usage constraints needed to stay WCAG 2.1 aligned.
|