@ketvietlab/design-system 0.1.29 → 0.1.31
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 +101 -5
- package/dist/atlas-cli.d.ts.map +1 -1
- package/dist/atlas-cli.js +10 -7
- package/dist/atlas-cli.js.map +1 -1
- package/dist/catalogue/date-pickers.d.ts +6 -0
- package/dist/catalogue/date-pickers.d.ts.map +1 -0
- package/dist/catalogue/date-pickers.js +16 -0
- package/dist/catalogue/date-pickers.js.map +1 -0
- package/dist/catalogue/index.d.ts +7 -2
- package/dist/catalogue/index.d.ts.map +1 -1
- package/dist/catalogue/index.js +20 -4
- package/dist/catalogue/index.js.map +1 -1
- package/dist/catalogue/inventory.generated.js +1 -1
- package/dist/catalogue/inventory.generated.js.map +1 -1
- package/dist/catalogue/inventory.generated.json +363 -159
- package/dist/catalogue/layering.d.ts +10 -0
- package/dist/catalogue/layering.d.ts.map +1 -0
- package/dist/catalogue/layering.js +67 -0
- package/dist/catalogue/layering.js.map +1 -0
- package/dist/catalogue/primitives.css +77 -0
- package/dist/catalogue/primitives.d.ts +34 -0
- package/dist/catalogue/primitives.d.ts.map +1 -0
- package/dist/catalogue/primitives.js +149 -0
- package/dist/catalogue/primitives.js.map +1 -0
- package/dist/catalogue/specimens.d.ts.map +1 -1
- package/dist/catalogue/specimens.js +14 -14
- package/dist/catalogue/specimens.js.map +1 -1
- package/dist/catalogue/styles.css +1 -0
- package/dist/contract/index.d.ts +2 -0
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +1 -0
- package/dist/contract/index.js.map +1 -1
- package/dist/contract/layout-audit.d.ts +32 -0
- package/dist/contract/layout-audit.d.ts.map +1 -0
- package/dist/contract/layout-audit.js +204 -0
- package/dist/contract/layout-audit.js.map +1 -0
- package/dist/forms/date-time/date-math.d.ts +23 -0
- package/dist/forms/date-time/date-math.d.ts.map +1 -0
- package/dist/forms/date-time/date-math.js +83 -0
- package/dist/forms/date-time/date-math.js.map +1 -0
- package/dist/forms/date-time/index.d.ts +37 -6
- package/dist/forms/date-time/index.d.ts.map +1 -1
- package/dist/forms/date-time/index.js +140 -6
- package/dist/forms/date-time/index.js.map +1 -1
- package/dist/forms/date-time/runtime.d.ts +4 -0
- package/dist/forms/date-time/runtime.d.ts.map +1 -0
- package/dist/forms/date-time/runtime.js +637 -0
- package/dist/forms/date-time/runtime.js.map +1 -0
- package/dist/forms/date-time/styles.css +251 -12
- package/dist/foundations/tokens.css +14 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interactions/relation-select/styles.css +0 -12
- package/dist/interactions/search-filter/styles.css +2 -14
- package/dist/layout-audit-cli.d.ts +7 -0
- package/dist/layout-audit-cli.d.ts.map +1 -0
- package/dist/layout-audit-cli.js +63 -0
- package/dist/layout-audit-cli.js.map +1 -0
- package/dist/layouts/app-navigation/styles.css +4 -7
- package/dist/layouts/grouped/styles.css +5 -36
- package/dist/layouts/layering/styles.css +159 -0
- package/dist/layouts/layout/index.d.ts +6 -0
- package/dist/layouts/layout/index.d.ts.map +1 -1
- package/dist/layouts/layout/index.js +6 -1
- package/dist/layouts/layout/index.js.map +1 -1
- package/dist/layouts/layout/styles.css +15 -6
- package/dist/layouts/page-identity/index.d.ts +5 -7
- package/dist/layouts/page-identity/index.d.ts.map +1 -1
- package/dist/layouts/page-identity/index.js +4 -3
- package/dist/layouts/page-identity/index.js.map +1 -1
- package/dist/layouts/shell/index.d.ts +3 -3
- package/dist/layouts/shell/index.d.ts.map +1 -1
- package/dist/layouts/shell/index.js +0 -1
- package/dist/layouts/shell/index.js.map +1 -1
- package/dist/layouts/shell/styles.css +3 -4
- package/dist/patterns/board-page/index.d.ts +1 -1
- package/dist/patterns/board-page/index.d.ts.map +1 -1
- package/dist/patterns/board-page/index.js +0 -1
- package/dist/patterns/board-page/index.js.map +1 -1
- package/dist/patterns/board-page/styles.css +0 -12
- package/dist/patterns/dashboard-page/index.d.ts +1 -1
- package/dist/patterns/dashboard-page/index.d.ts.map +1 -1
- package/dist/patterns/dashboard-page/index.js +0 -1
- package/dist/patterns/dashboard-page/index.js.map +1 -1
- package/dist/patterns/dashboard-page/styles.css +0 -13
- package/dist/patterns/form-page/index.d.ts +1 -1
- package/dist/patterns/form-page/index.d.ts.map +1 -1
- package/dist/patterns/form-page/index.js +0 -1
- package/dist/patterns/form-page/index.js.map +1 -1
- package/dist/patterns/form-page/styles.css +0 -12
- package/dist/patterns/list-page/index.d.ts +2 -1
- package/dist/patterns/list-page/index.d.ts.map +1 -1
- package/dist/patterns/list-page/index.js.map +1 -1
- package/dist/patterns/list-page/responsive.css +0 -8
- package/dist/patterns/list-page/styles.css +1 -16
- package/dist/patterns/modal-sheet/index.d.ts +2 -4
- package/dist/patterns/modal-sheet/index.d.ts.map +1 -1
- package/dist/patterns/modal-sheet/index.js +1 -1
- package/dist/patterns/modal-sheet/index.js.map +1 -1
- package/dist/patterns/modal-sheet/styles.css +7 -2
- package/dist/patterns/page-shell/styles.css +0 -12
- package/dist/patterns/record-page/index.d.ts +1 -2
- package/dist/patterns/record-page/index.d.ts.map +1 -1
- package/dist/patterns/record-page/index.js +2 -3
- package/dist/patterns/record-page/index.js.map +1 -1
- package/dist/patterns/record-page/styles.css +0 -12
- package/dist/patterns/workspace-page/index.d.ts +1 -2
- package/dist/patterns/workspace-page/index.d.ts.map +1 -1
- package/dist/patterns/workspace-page/index.js +0 -1
- package/dist/patterns/workspace-page/index.js.map +1 -1
- package/dist/primitives/actions/styles.css +3 -10
- package/dist/primitives/feedback/styles.css +7 -5
- package/dist/primitives/field/index.d.ts +5 -0
- package/dist/primitives/field/index.d.ts.map +1 -1
- package/dist/primitives/field/index.js +1 -1
- package/dist/primitives/field/index.js.map +1 -1
- package/dist/primitives/field/native-control.d.ts.map +1 -1
- package/dist/primitives/field/native-control.js +3 -3
- package/dist/primitives/field/native-control.js.map +1 -1
- package/dist/primitives/field/styles.css +124 -2
- package/dist/primitives/progress/styles.css +3 -0
- package/dist/primitives/status/styles.css +7 -2
- package/dist/record/display/index.d.ts +6 -0
- package/dist/record/display/index.d.ts.map +1 -1
- package/dist/record/display/index.js +6 -1
- package/dist/record/display/index.js.map +1 -1
- package/dist/record/display/styles.css +26 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +3 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TemplateResult } from '@ketvietlab/ketjs-view';
|
|
2
|
+
export declare const layeringPresentations: readonly ['default', 'grouped'];
|
|
3
|
+
/**
|
|
4
|
+
* LAYOUT.md L1–L2 on one page: every container on the canvas and again inside a
|
|
5
|
+
* white region, so the browser check can compare the two by computed style.
|
|
6
|
+
*/
|
|
7
|
+
export declare const LayeringPreview: (props: {
|
|
8
|
+
presentation: (typeof layeringPresentations)[number];
|
|
9
|
+
}) => TemplateResult;
|
|
10
|
+
//# sourceMappingURL=layering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layering.d.ts","sourceRoot":"","sources":["../../../../../packages/design-system/src/catalogue/layering.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAStE,eAAO,MAAM,qBAAqB,YAAI,SAAS,EAAE,SAAS,CAAU,CAAA;AAwDpE;;;GAGG;AACH,eAAO,MAAM,eAAe,UAAW;IACrC,YAAY,EAAE,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;CACrD,KAAG,cAkHH,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@ketvietlab/ketjs-view/jsx-runtime";
|
|
2
|
+
import { ContentCard, Disclosure, Grid, Metric, Section, Stack, Surface } from '../layouts/index.js';
|
|
3
|
+
import { Field } from '../primitives/field.js';
|
|
4
|
+
import { Notice } from '../primitives/feedback.js';
|
|
5
|
+
import { DataTable } from '../patterns/data-table.js';
|
|
6
|
+
import { ModalSheet } from '../patterns/modal-sheet.js';
|
|
7
|
+
import { RecordForm } from '../patterns/record-form.js';
|
|
8
|
+
import { DescriptionList } from '../record/display/index.js';
|
|
9
|
+
export const layeringPresentations = ['default', 'grouped'];
|
|
10
|
+
const rows = [
|
|
11
|
+
{ id: 'serum', name: 'Serum 30ml', range: '35–55 days' },
|
|
12
|
+
{ id: 'cream', name: 'Cream 50g', range: '45–75 days' },
|
|
13
|
+
];
|
|
14
|
+
const table = (title) => (_jsx(DataTable, { title: title, rows: rows, id: (row) => row.id, columns: [
|
|
15
|
+
{ key: 'name', label: 'Product', cell: (row) => row.name },
|
|
16
|
+
{ key: 'range', label: 'Reference range', cell: (row) => row.range },
|
|
17
|
+
] }));
|
|
18
|
+
const fields = (prefix) => (_jsx(Grid, { columns: 2, items: [
|
|
19
|
+
_jsx(Field, { id: `${prefix}-name`, label: "Name", name: "name", value: "Barrier repair" }),
|
|
20
|
+
_jsx(Field, { id: `${prefix}-start`, label: "Start date", name: "start", type: "date", value: "2026-09-01" }),
|
|
21
|
+
] }));
|
|
22
|
+
/** One form, drawn in a wide surface and in a record-aside-sized column (LAYOUT.md L7). */
|
|
23
|
+
const noteForm = (prefix) => (_jsx(RecordForm, { action: "#layering", submitLabel: "Save", fields: [
|
|
24
|
+
{ id: `${prefix}-subject`, name: 'subject', label: 'Subject', value: 'Follow-up call', span: 'full' },
|
|
25
|
+
{ id: `${prefix}-note`, name: 'note', label: 'Note', type: 'textarea', value: '', span: 'full' },
|
|
26
|
+
] }));
|
|
27
|
+
/** Bare fields stacked in a panel, with no record form around them (LAYOUT.md L7). */
|
|
28
|
+
const panelFields = (prefix) => (_jsx(Stack, { items: [
|
|
29
|
+
_jsx(Field, { id: `${prefix}-path`, label: "Path", name: "path", value: "/en/careers" }),
|
|
30
|
+
_jsx(Field, { id: `${prefix}-note`, label: "Note", name: "note", type: "textarea", value: "" }),
|
|
31
|
+
] }));
|
|
32
|
+
/** Tags a specimen so the browser check can find it; the tag carries no style. */
|
|
33
|
+
const Case = (props) => (_jsx("div", { "data-layering-case": props.name, children: props.body }));
|
|
34
|
+
/**
|
|
35
|
+
* LAYOUT.md L1–L2 on one page: every container on the canvas and again inside a
|
|
36
|
+
* white region, so the browser check can compare the two by computed style.
|
|
37
|
+
*/
|
|
38
|
+
export const LayeringPreview = (props) => (_jsx("div", { "data-kv-design-system": true, "data-theme": "light", "data-presentation": props.presentation === 'grouped' ? 'grouped' : null, style: "padding: 12px; background: var(--kv-page-bg)", children: _jsx(Stack, { items: [
|
|
39
|
+
_jsx(Case, { name: "canvas-surface", body: _jsx(Surface, { title: "On the canvas", body: fields('layering-1') }) }),
|
|
40
|
+
_jsx(Case, { name: "wide-form", body: _jsx(Surface, { title: "A wide form", body: noteForm('layering-wide') }) }),
|
|
41
|
+
_jsx(Case, { name: "narrow-form", body: _jsx("div", { style: "max-inline-size: 20rem", children: _jsx(Surface, { title: "A narrow column", body: noteForm('layering-narrow') }) }) }),
|
|
42
|
+
_jsx(Case, { name: "narrow-panel", body: _jsx("div", { style: "max-inline-size: 20rem", children: _jsx(Surface, { title: "A side panel", body: panelFields('layering-panel') }) }) }),
|
|
43
|
+
_jsx(Case, { name: "canvas-table", body: table('Titled table on the canvas') }),
|
|
44
|
+
_jsx(Case, { name: "canvas-metric", body: _jsx(Metric, { label: "Open", value: 12 }) }),
|
|
45
|
+
_jsx(Case, { name: "surface-in-surface", body: _jsx(Surface, { title: "Outer surface", body: _jsx(Surface, { title: "Nested surface", description: "Renders as a section.", body: fields('layering-2') }) }) }),
|
|
46
|
+
_jsx(Case, { name: "modal", body: _jsx(ModalSheet, { id: "layering-modal", mode: "embedded", title: "Routine", closeLabel: "Close", size: "large", body: _jsx(Stack, { items: [
|
|
47
|
+
_jsx(Notice, { title: "Reference only", message: "Ranges never create a schedule.", tone: "info" }),
|
|
48
|
+
_jsx(Case, { name: "modal-table", body: table('Products from the order') }),
|
|
49
|
+
_jsx(Case, { name: "modal-untitled-table", body: table() }),
|
|
50
|
+
_jsx(Case, { name: "modal-surface", body: _jsx(Surface, { title: "Routine", body: fields('layering-3') }) }),
|
|
51
|
+
_jsx(Case, { name: "modal-well", body: _jsx(Surface, { tone: "subtle", body: _jsx("p", { children: "Customer said the serum stings." }) }) }),
|
|
52
|
+
_jsx(Case, { name: "modal-section", body: _jsx(Section, { title: "Next care", body: fields('layering-4') }) }),
|
|
53
|
+
_jsx(Case, { name: "modal-divided", body: _jsx(Stack, { divided: true, items: [
|
|
54
|
+
_jsx(Section, { title: "Outcome", body: _jsx("p", { children: "Reached the customer." }) }),
|
|
55
|
+
_jsx(Section, { title: "Product feedback", body: _jsx("p", { children: "Serum suits her skin." }) }),
|
|
56
|
+
] }) }),
|
|
57
|
+
_jsx(Case, { name: "modal-disclosure", body: _jsx(Disclosure, { summary: "More detail", body: fields('layering-5') }) }),
|
|
58
|
+
_jsx(Case, { name: "modal-metric", body: _jsx(Metric, { label: "Uses a day", value: 2 }) }),
|
|
59
|
+
_jsx(Case, { name: "modal-card", body: _jsx(ContentCard, { title: "Serum 30ml", summary: "An object keeps its boundary." }) }),
|
|
60
|
+
_jsx(Case, { name: "modal-strip", body: _jsx(DescriptionList, { layout: "strip", items: [
|
|
61
|
+
{ id: 'due', label: 'Due', value: '03/09 09:00' },
|
|
62
|
+
{ id: 'sla', label: 'SLA', value: 'Overdue' },
|
|
63
|
+
{ id: 'owner', label: 'Owner', value: 'Ngoc Anh' },
|
|
64
|
+
] }) }),
|
|
65
|
+
] }) }) }),
|
|
66
|
+
] }) }));
|
|
67
|
+
//# sourceMappingURL=layering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layering.js","sourceRoot":"","sources":["../../../../../../packages/design-system/src/catalogue/layering.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE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] {
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: var(--kv-space-10);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:where([data-kv-design-system]) [data-ui="primitive-section"] {
|
|
8
|
+
min-width: 0;
|
|
9
|
+
scroll-margin-top: var(--kv-space-6);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:where([data-kv-design-system]) [data-ui="primitive-section-head"] {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: baseline;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
gap: var(--kv-space-2) var(--kv-space-3);
|
|
17
|
+
padding-bottom: var(--kv-space-4);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where([data-kv-design-system]) [data-ui="primitive-section-head"] h2 {
|
|
21
|
+
margin: 0;
|
|
22
|
+
font-size: var(--kv-text-lg);
|
|
23
|
+
font-weight: var(--kv-weight-semibold);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where([data-kv-design-system]) [data-ui="primitive-section-head"] span {
|
|
27
|
+
color: var(--kv-text-muted);
|
|
28
|
+
font-family: var(--kv-font-mono);
|
|
29
|
+
font-size: var(--kv-text-xs);
|
|
30
|
+
overflow-wrap: anywhere;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where([data-kv-design-system]) [data-ui="primitive-section-head"] span:last-child {
|
|
34
|
+
flex-basis: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where([data-kv-design-system]) [data-ui="primitive-row"] {
|
|
38
|
+
display: grid;
|
|
39
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
|
|
40
|
+
align-items: start;
|
|
41
|
+
gap: var(--kv-space-6);
|
|
42
|
+
padding-block: var(--kv-space-5);
|
|
43
|
+
border-top: 1px solid var(--kv-color-line);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:where([data-kv-design-system]) [data-ui="primitive-caption"] {
|
|
47
|
+
min-width: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where([data-kv-design-system]) [data-ui="primitive-caption"] h3 {
|
|
51
|
+
margin: 0 0 var(--kv-space-1);
|
|
52
|
+
font-size: var(--kv-text-sm);
|
|
53
|
+
font-weight: var(--kv-weight-medium);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where([data-kv-design-system]) [data-ui="primitive-caption"] p {
|
|
57
|
+
margin: 0;
|
|
58
|
+
color: var(--kv-text-muted);
|
|
59
|
+
font-size: var(--kv-text-xs);
|
|
60
|
+
line-height: var(--kv-leading-relaxed);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where([data-kv-design-system]) [data-ui="primitive-sample"] {
|
|
64
|
+
min-width: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@media (max-width: 63.9375rem) {
|
|
68
|
+
:where([data-kv-design-system]) [data-ui="primitive-section"] {
|
|
69
|
+
scroll-margin-top: calc(var(--kv-space-16) + var(--kv-space-4));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:where([data-kv-design-system]) [data-ui="primitive-row"] {
|
|
73
|
+
grid-template-columns: minmax(0, 1fr);
|
|
74
|
+
gap: var(--kv-space-3);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TemplateResult } from '@ketvietlab/ketjs-view';
|
|
2
|
+
export declare const primitiveSections: readonly [{
|
|
3
|
+
readonly id: 'actions';
|
|
4
|
+
readonly label: 'Actions';
|
|
5
|
+
readonly components: readonly ['ActionGroup', 'Button', 'IconButton', 'LinkButton'];
|
|
6
|
+
}, {
|
|
7
|
+
readonly id: 'status';
|
|
8
|
+
readonly label: 'Status & identity';
|
|
9
|
+
readonly components: readonly ['Avatar', 'Badge', 'Code', 'CountBadge', 'MediaLabel', 'Tag', 'Text'];
|
|
10
|
+
}, {
|
|
11
|
+
readonly id: 'fields';
|
|
12
|
+
readonly label: 'Fields';
|
|
13
|
+
readonly components: readonly ['Field'];
|
|
14
|
+
}, {
|
|
15
|
+
readonly id: 'navigation';
|
|
16
|
+
readonly label: 'Navigation';
|
|
17
|
+
readonly components: readonly ['Breadcrumbs', 'NavItem', 'NavList', 'Tab', 'TabPanel', 'TabbedView', 'Tabs'];
|
|
18
|
+
}, {
|
|
19
|
+
readonly id: 'feedback';
|
|
20
|
+
readonly label: 'Feedback';
|
|
21
|
+
readonly components: readonly ['EmptyState', 'LoadingState', 'Notice'];
|
|
22
|
+
}, {
|
|
23
|
+
readonly id: 'progress';
|
|
24
|
+
readonly label: 'Progress';
|
|
25
|
+
readonly components: readonly ['Progress'];
|
|
26
|
+
}];
|
|
27
|
+
export type PrimitiveHarnessProps = {
|
|
28
|
+
theme?: 'light' | 'dark' | 'system';
|
|
29
|
+
density?: 'compact' | 'default' | 'comfortable';
|
|
30
|
+
tab?: 'overview' | 'activity';
|
|
31
|
+
};
|
|
32
|
+
/** A render-pure comparison surface. Every sample uses the public component contract. */
|
|
33
|
+
export declare const PrimitiveHarness: (props?: PrimitiveHarnessProps) => TemplateResult;
|
|
34
|
+
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../packages/design-system/src/catalogue/primitives.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAY,cAAc,EAAE,MAAM,wBAAwB,CAAA;AA2BtE,eAAO,MAAM,iBAAiB;aAC1B,EAAE,EAAE,SAAS;aAAE,KAAK,EAAE,SAAS;aAAE,UAAU,YAAG,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY;;aAEjG,EAAE,EAAE,QAAQ;aACZ,KAAK,EAAE,mBAAmB;aAC1B,UAAU,YAAG,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM;;aAEjF,EAAE,EAAE,QAAQ;aAAE,KAAK,EAAE,QAAQ;aAAE,UAAU,YAAG,OAAO;;aAEnD,EAAE,EAAE,YAAY;aAChB,KAAK,EAAE,YAAY;aACnB,UAAU,YAAG,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM;;aAEzF,EAAE,EAAE,UAAU;aAAE,KAAK,EAAE,UAAU;aAAE,UAAU,YAAG,YAAY,EAAE,cAAc,EAAE,QAAQ;;aACtF,EAAE,EAAE,UAAU;aAAE,KAAK,EAAE,UAAU;aAAE,UAAU,YAAG,UAAU;EACpD,CAAA;AA2BV,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;IACnC,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,aAAa,CAAA;IAC/C,GAAG,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;CAC9B,CAAA;AAED,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,WAAW,qBAAqB,KAAQ,cA0XpE,CAAA"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "@ketvietlab/ketjs-view/jsx-runtime";
|
|
2
|
+
import { each } from '@ketvietlab/ketjs-view';
|
|
3
|
+
import { ActionGroup, Avatar, Badge, Breadcrumbs, Button, Code, CountBadge, EmptyState, Field, IconButton, Inline, LinkButton, LoadingState, MediaLabel, NavList, Notice, Progress, Select, Stack, TabbedView, Tabs, Tag, Text, } from '../index.js';
|
|
4
|
+
export const primitiveSections = [
|
|
5
|
+
{ id: 'actions', label: 'Actions', components: ['ActionGroup', 'Button', 'IconButton', 'LinkButton'] },
|
|
6
|
+
{
|
|
7
|
+
id: 'status',
|
|
8
|
+
label: 'Status & identity',
|
|
9
|
+
components: ['Avatar', 'Badge', 'Code', 'CountBadge', 'MediaLabel', 'Tag', 'Text'],
|
|
10
|
+
},
|
|
11
|
+
{ id: 'fields', label: 'Fields', components: ['Field'] },
|
|
12
|
+
{
|
|
13
|
+
id: 'navigation',
|
|
14
|
+
label: 'Navigation',
|
|
15
|
+
components: ['Breadcrumbs', 'NavItem', 'NavList', 'Tab', 'TabPanel', 'TabbedView', 'Tabs'],
|
|
16
|
+
},
|
|
17
|
+
{ id: 'feedback', label: 'Feedback', components: ['EmptyState', 'LoadingState', 'Notice'] },
|
|
18
|
+
{ id: 'progress', label: 'Progress', components: ['Progress'] },
|
|
19
|
+
];
|
|
20
|
+
const Row = (props) => (_jsxs("div", { "data-ui": "primitive-row", children: [_jsxs("div", { "data-ui": "primitive-caption", children: [_jsx("h3", { children: props.label }), _jsx("p", { children: props.detail })] }), _jsx("div", { "data-ui": "primitive-sample", children: props.children })] }));
|
|
21
|
+
const Plus = () => (_jsx("svg", { viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "M8 3v10M3 8h10" }) }));
|
|
22
|
+
/** A render-pure comparison surface. Every sample uses the public component contract. */
|
|
23
|
+
export const PrimitiveHarness = (props = {}) => {
|
|
24
|
+
const href = (tab) => `/primitives?theme=${props.theme ?? 'system'}&density=${props.density ?? 'default'}&tab=${tab}#primitive-navigation`;
|
|
25
|
+
const tab = props.tab ?? 'overview';
|
|
26
|
+
const specimens = {
|
|
27
|
+
actions: (_jsxs(_Fragment, { children: [_jsx(Row, { label: "Hierarchy", detail: "One height, four levels of emphasis.", children: _jsx(ActionGroup, { label: "Action hierarchy", actions: [
|
|
28
|
+
_jsx(Button, { label: "Create project", variant: "primary", leading: _jsx(Plus, {}) }),
|
|
29
|
+
_jsx(Button, { label: "Save draft" }),
|
|
30
|
+
_jsx(Button, { label: "View details", variant: "tertiary" }),
|
|
31
|
+
_jsx(Button, { label: "Archive", variant: "destructive" }),
|
|
32
|
+
] }) }), _jsx(Row, { label: "States", detail: "Resting, unavailable and in progress.", children: _jsx(ActionGroup, { label: "Action states", actions: [
|
|
33
|
+
_jsx(Button, { label: "Save changes", variant: "primary" }),
|
|
34
|
+
_jsx(Button, { label: "Save changes", variant: "primary", disabled: true }),
|
|
35
|
+
_jsx(Button, { label: "Saving changes", variant: "primary", loading: true }),
|
|
36
|
+
_jsx(LinkButton, { label: "Opening project", href: "#primitive-actions", loading: true }),
|
|
37
|
+
] }) }), _jsx(Row, { label: "Sizes & icons", detail: "Matched text and icon targets at each size.", children: _jsx(Inline, { items: ['compact', 'default', 'prominent'].map((size) => (_jsx(ActionGroup, { label: `${size} actions`, actions: [
|
|
38
|
+
_jsx(Button, { label: size[0].toUpperCase() + size.slice(1), size: size }),
|
|
39
|
+
_jsx(IconButton, { label: `Add project · ${size}`, icon: _jsx(Plus, {}), size: size, variant: "secondary" }),
|
|
40
|
+
] }))) }) }), _jsx(Row, { label: "Long labels", detail: "Narrow layouts retain the icon and contain the label.", children: _jsx(ActionGroup, { label: "Long action labels", actions: [
|
|
41
|
+
_jsx(Button, { label: "Create a project for the regional operations team", leading: _jsx(Plus, {}) }),
|
|
42
|
+
_jsx(LinkButton, { label: "Browse components", href: "/components", variant: "tertiary", leading: "\u2197" }),
|
|
43
|
+
] }) })] })),
|
|
44
|
+
status: (_jsxs(_Fragment, { children: [_jsx(Row, { label: "Semantic tones", detail: "Quiet surfaces with readable, explicit labels.", children: _jsx(Inline, { items: [
|
|
45
|
+
_jsx(Badge, { label: "Draft" }),
|
|
46
|
+
_jsx(Badge, { label: "In progress", tone: "info" }),
|
|
47
|
+
_jsx(Badge, { label: "Approved", tone: "positive" }),
|
|
48
|
+
_jsx(Badge, { label: "Needs review", tone: "warning" }),
|
|
49
|
+
_jsx(Badge, { label: "Overdue", tone: "danger" }),
|
|
50
|
+
] }) }), _jsx(Row, { label: "Tags & counts", detail: "Categories, removable filters and exact totals.", children: _jsx(Inline, { items: [
|
|
51
|
+
_jsx(Tag, { label: "Operations" }),
|
|
52
|
+
_jsx(Tag, { label: "H\u00E0 N\u1ED9i", removeHref: "#primitive-status", removeLabel: "Remove H\u00E0 N\u1ED9i filter specimen" }),
|
|
53
|
+
_jsx(CountBadge, { count: 0, label: "No pending items" }),
|
|
54
|
+
_jsx(CountBadge, { count: 128, label: "128 pending items" }),
|
|
55
|
+
_jsx(Text, { tone: "muted", children: "Updated just now" }),
|
|
56
|
+
] }) }), _jsx(Row, { label: "Identity", detail: "Three sizes with Vietnamese name fallbacks.", children: _jsx(Inline, { items: [
|
|
57
|
+
_jsx(Avatar, { name: "Nguy\u1EC5n Minh Ch\u00E2u", size: "small" }),
|
|
58
|
+
_jsx(Avatar, { name: "Nguy\u1EC5n Minh Ch\u00E2u" }),
|
|
59
|
+
_jsx(Avatar, { name: "Nguy\u1EC5n Minh Ch\u00E2u", size: "large" }),
|
|
60
|
+
_jsx(MediaLabel, { label: "Nguy\u1EC5n Minh Ch\u00E2u \u00B7 Operations" }),
|
|
61
|
+
_jsx(Code, { value: "PRJ-0042", context: "project" }),
|
|
62
|
+
] }) }), _jsx(Row, { label: "Content pressure", detail: "Long names, unbroken identifiers and reserved media.", children: _jsx(Stack, { gap: "compact", items: [
|
|
63
|
+
_jsx(MediaLabel, { label: "Regional operations \u00B7 Th\u00E0nh ph\u1ED1 H\u1ED3 Ch\u00ED Minh \u00B7 Planning and coordination", reserveImage: true }),
|
|
64
|
+
_jsx(Tag, { label: "regional-operations-planning-and-coordination-vietnam-2026", removeHref: "#primitive-status" }),
|
|
65
|
+
_jsx(Badge, { label: "Awaiting approval from the regional operations coordinator", tone: "warning" }),
|
|
66
|
+
_jsx(Code, { value: "workspace_vietnam_regional_operations_planning_2026_000042" }),
|
|
67
|
+
] }) })] })),
|
|
68
|
+
fields: (_jsxs(_Fragment, { children: [_jsx(Row, { label: "Text & selection", detail: "Shared label column and aligned control edges.", children: _jsx(Stack, { gap: "compact", items: [
|
|
69
|
+
_jsx(Field, { id: "primitive-name", name: "project", label: "Project name", value: "Regional operations", required: true }),
|
|
70
|
+
_jsx(Select, { id: "primitive-region", name: "region", label: "Region", value: "hn", options: [
|
|
71
|
+
{ value: 'hn', label: 'Hà Nội' },
|
|
72
|
+
{ value: 'hcm', label: 'Thành phố Hồ Chí Minh' },
|
|
73
|
+
] }),
|
|
74
|
+
_jsx(Field, { id: "primitive-description", name: "description", label: "Description", type: "textarea", placeholder: "Add a short description\u2026", help: "Visible to everyone in this project." }),
|
|
75
|
+
] }) }), _jsx(Row, { label: "Validation & access", detail: "Help, error, read-only and disabled states.", children: _jsx(Stack, { gap: "compact", items: [
|
|
76
|
+
_jsx(Field, { id: "primitive-email", name: "email", label: "Contact email", type: "email", value: "chau@", required: true, help: "Use your work email.", error: "Enter a complete email address." }),
|
|
77
|
+
_jsx(Field, { id: "primitive-reference", name: "reference", label: "Reference", value: "PRJ-0042", readOnly: true, help: "Assigned automatically." }),
|
|
78
|
+
_jsx(Field, { id: "primitive-owner", name: "owner", label: "Owner", value: "Nguy\u1EC5n Minh Ch\u00E2u", disabled: true }),
|
|
79
|
+
] }) }), _jsx(Row, { label: "Select states", detail: "Consistent chevron inset, long values and native selection.", children: _jsx(Stack, { gap: "compact", items: [
|
|
80
|
+
_jsx(Select, { id: "primitive-select-long", name: "coordination", label: "Coordination", value: "regional", options: [
|
|
81
|
+
{ value: 'regional', label: 'Regional planning and coordination · Thành phố Hồ Chí Minh' },
|
|
82
|
+
{ value: 'local', label: 'Local operations' },
|
|
83
|
+
] }),
|
|
84
|
+
_jsx(Select, { id: "primitive-select-invalid", name: "priority", label: "Priority", value: "", required: true, error: "Choose a priority.", options: [
|
|
85
|
+
{ value: '', label: 'Choose a priority…', disabled: true },
|
|
86
|
+
{ value: 'normal', label: 'Normal' },
|
|
87
|
+
{ value: 'urgent', label: 'Urgent' },
|
|
88
|
+
] }),
|
|
89
|
+
_jsx(Select, { id: "primitive-select-disabled", name: "workspace", label: "Workspace", value: "vietnam", disabled: true, options: [{ value: 'vietnam', label: 'Vietnam operations' }] }),
|
|
90
|
+
] }) }), _jsx(Row, { label: "Choices", detail: "Native keyboard interaction and wrapping labels.", children: _jsx(Stack, { gap: "compact", items: [
|
|
91
|
+
_jsx(Field, { id: "primitive-notify", name: "notify", label: "Send updates", type: "checkbox", value: true }),
|
|
92
|
+
_jsx(Field, { id: "primitive-access", name: "access", label: "Access", type: "radio", value: "team", options: [
|
|
93
|
+
{ value: 'team', label: 'Team' },
|
|
94
|
+
{ value: 'private', label: 'Private' },
|
|
95
|
+
{ value: 'public', label: 'Public', disabled: true },
|
|
96
|
+
] }),
|
|
97
|
+
_jsx(Field, { id: "primitive-channels", name: "channels", label: "Channels", type: "checkbox-group", optionsOrientation: "vertical", options: [
|
|
98
|
+
{ value: 'email', label: 'Email notifications', checked: true },
|
|
99
|
+
{ value: 'digest', label: 'Weekly summary for the regional operations team' },
|
|
100
|
+
] }),
|
|
101
|
+
] }) })] })),
|
|
102
|
+
navigation: (_jsxs(_Fragment, { children: [_jsx(Row, { label: "Location", detail: "Collapsed ancestors remain native links.", children: _jsx(Breadcrumbs, { label: "Project location", maxItems: 3, overflowLabel: "Show parent locations", items: [
|
|
103
|
+
{ label: 'Workspace', href: '#primitive-navigation' },
|
|
104
|
+
{ label: 'Operations', href: '#primitive-navigation' },
|
|
105
|
+
{ label: 'Vietnam', href: '#primitive-navigation' },
|
|
106
|
+
{ label: 'Regional planning' },
|
|
107
|
+
] }) }), _jsx(Row, { label: "Navigation list", detail: "The active route and counts share a clear baseline.", children: _jsx(NavList, { label: "Project sections", items: [
|
|
108
|
+
{ label: 'Overview', href: href('overview'), active: tab === 'overview', leading: '◇' },
|
|
109
|
+
{
|
|
110
|
+
label: 'Activity',
|
|
111
|
+
href: href('activity'),
|
|
112
|
+
active: tab === 'activity',
|
|
113
|
+
leading: '≡',
|
|
114
|
+
count: 12,
|
|
115
|
+
},
|
|
116
|
+
] }) }), _jsx(Row, { label: "Route tabs", detail: "Real URL-backed tabs with an associated panel.", children: _jsx(TabbedView, { id: "primitive-project", label: "Project views", items: [
|
|
117
|
+
{ id: 'overview', label: 'Overview', href: href('overview'), active: tab === 'overview' },
|
|
118
|
+
{
|
|
119
|
+
id: 'activity',
|
|
120
|
+
label: 'Activity',
|
|
121
|
+
href: href('activity'),
|
|
122
|
+
active: tab === 'activity',
|
|
123
|
+
count: 12,
|
|
124
|
+
},
|
|
125
|
+
], body: _jsx(Text, { children: tab === 'overview'
|
|
126
|
+
? 'A shared workspace for the regional operations team.'
|
|
127
|
+
: 'Nguyễn Minh Châu updated the project description.' }) }) })] })),
|
|
128
|
+
feedback: (_jsxs(_Fragment, { children: [_jsx(Row, { label: "Notices", detail: "Information, success, warning and recovery.", children: _jsx(Stack, { gap: "compact", items: [
|
|
129
|
+
_jsx(Notice, { title: "Scheduled", message: "Your report will be ready tomorrow." }),
|
|
130
|
+
_jsx(Notice, { title: "Saved", message: "All changes are up to date.", tone: "positive" }),
|
|
131
|
+
_jsx(Notice, { title: "Review needed", message: "Two projects are missing an owner.", tone: "warning" }),
|
|
132
|
+
_jsx(Notice, { title: "Unable to sync", message: "Check the connection before trying again.", tone: "danger", actions: _jsx(LinkButton, { label: "Review connection", href: "#primitive-fields", size: "compact" }) }),
|
|
133
|
+
] }) }), _jsx(Row, { label: "Empty", detail: "A useful next step with restrained emphasis.", children: _jsx(EmptyState, { title: "No projects yet", message: "Create a project to bring your team\u2019s work together.", actions: _jsx(LinkButton, { label: "Explore actions", href: "#primitive-actions", size: "compact" }) }) }), _jsx(Row, { label: "Loading", detail: "A named live region and decorative skeletons.", children: _jsx(LoadingState, { label: "Loading project activity", lines: 3 }) })] })),
|
|
134
|
+
progress: (_jsx(Row, { label: "Completion", detail: "Zero, partial, complete and text-free tracks.", children: _jsx(Stack, { gap: "loose", items: [
|
|
135
|
+
_jsx(Progress, { label: "Not started", value: 0 }),
|
|
136
|
+
_jsx(Progress, { label: "Project completion", value: 64 }),
|
|
137
|
+
_jsx(Progress, { label: "Review in progress", value: 38, tone: "warning" }),
|
|
138
|
+
_jsx(Progress, { label: "Overdue tasks", value: 16, tone: "danger" }),
|
|
139
|
+
_jsx(Progress, { label: "All tasks complete", value: 100, tone: "positive" }),
|
|
140
|
+
_jsx(Progress, { label: "Background preparation", value: 72, showValue: false }),
|
|
141
|
+
] }) })),
|
|
142
|
+
};
|
|
143
|
+
return (_jsxs("div", { "data-ui": "primitive-harness", children: [_jsx(Tabs, { label: "Primitive families", items: primitiveSections.map((section) => ({
|
|
144
|
+
id: section.id,
|
|
145
|
+
label: section.label,
|
|
146
|
+
href: `#primitive-${section.id}`,
|
|
147
|
+
})) }), each(primitiveSections, (section) => section.id, (section, index) => (_jsxs("section", { "data-ui": "primitive-section", id: `primitive-${section.id}`, "aria-labelledby": `primitive-${section.id}-title`, children: [_jsxs("header", { "data-ui": "primitive-section-head", children: [_jsx("span", { "aria-hidden": "true", children: String(index + 1).padStart(2, '0') }), _jsx("h2", { id: `primitive-${section.id}-title`, children: section.label }), _jsx("span", { children: section.components.join(' · ') })] }), specimens[section.id]] })))] }));
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../../../../../packages/design-system/src/catalogue/primitives.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAE7C,OAAO,EACL,WAAW,EACX,MAAM,EACN,KAAK,EACL,WAAW,EACX,MAAM,EACN,IAAI,EACJ,UAAU,EACV,UAAU,EACV,KAAK,EACL,UAAU,EACV,MAAM,EACN,UAAU,EACV,YAAY,EACZ,UAAU,EACV,OAAO,EACP,MAAM,EACN,QAAQ,EACR,MAAM,EACN,KAAK,EACL,UAAU,EACV,IAAI,EACJ,GAAG,EACH,IAAI,GACL,MAAM,aAAa,CAAA;AAEpB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,aAAa,EAAE,QAAQ,EAAE,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,CAAC,KAAK;oBACpB,IAAI,EAAE,cAAc,OAAO,CAAC,EAAE,EAAE;iBACjC,CAAC,CAAC,GACH,EACD,IAAI,CACH,iBAAiB,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,EACvB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAClB,8BACU,mBAAmB,EAC3B,EAAE,EAAE,aAAa,OAAO,CAAC,EAAE,EAAE,qBACZ,aAAa,OAAO,CAAC,EAAE,QAAQ,aAEhD,6BAAgB,wBAAwB,aACtC,8BAAkB,MAAM,YAAE,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAQ,EACpE,aAAI,EAAE,EAAE,aAAa,OAAO,CAAC,EAAE,QAAQ,YAAG,OAAO,CAAC,KAAK,GAAM,EAC7D,yBAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAQ,IACtC,EACR,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,IACd,CACX,CACF,IACG,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specimens.d.ts","sourceRoot":"","sources":["../../../../../packages/design-system/src/catalogue/specimens.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"specimens.d.ts","sourceRoot":"","sources":["../../../../../packages/design-system/src/catalogue/specimens.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,wBAAwB,CAAA;AAuFtE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,QAAQ,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAA;CACtC,CAAA;AAqND,eAAO,MAAM,eAAe,EAAE,SAAS,cAAc,EA6nEpD,CAAA"}
|
|
@@ -33,7 +33,8 @@ import { createKetTableView, KetTable } from '../interactions/ket-table/index.js
|
|
|
33
33
|
import { ketTableDemoConfig, ketTableGroupedDemoConfig } from '../interactions/ket-table/demo.js';
|
|
34
34
|
import { Checkbox, CheckboxGroup, MoneyField, NumberField, RadioGroup, SearchField, Select, Switch, TextArea, TextField, } from '../forms/scalar-fields/index.js';
|
|
35
35
|
import { Combobox, MultiCombobox, TagPicker } from '../forms/combobox/index.js';
|
|
36
|
-
import {
|
|
36
|
+
import { DatePickerExamples } from './date-pickers.js';
|
|
37
|
+
import { DateTimePicker, TimePicker } from '../forms/date-time/index.js';
|
|
37
38
|
import { DropZone, FileUpload } from '../forms/upload/index.js';
|
|
38
39
|
import { RelationPicker } from '../forms/relation-picker/index.js';
|
|
39
40
|
import { AppliedFilters, FilterBar, SavedViews, SearchBar, SortMenu, ViewSettings, } from '../data-operations/list-controls/index.js';
|
|
@@ -478,7 +479,7 @@ export const componentGroups = [
|
|
|
478
479
|
id: 'app-navigation',
|
|
479
480
|
name: 'Responsive application navigation',
|
|
480
481
|
description: 'One navigation model becomes a persistent desktop sidebar and an accessible mobile drawer.',
|
|
481
|
-
render: () => (_jsx(DemoShell, { active: "collection", main: _jsx(Page, { title: "Operations overview",
|
|
482
|
+
render: () => (_jsx(DemoShell, { active: "collection", main: _jsx(Page, { title: "Operations overview", body: _jsx(Grid, { columns: 2, items: [
|
|
482
483
|
_jsx(Metric, { label: "Open orders", value: "148", detail: "12 need attention" }),
|
|
483
484
|
_jsx(Metric, { label: "Ready to invoice", value: "91", detail: "Updated just now" }),
|
|
484
485
|
] }) }) })),
|
|
@@ -487,7 +488,7 @@ export const componentGroups = [
|
|
|
487
488
|
id: 'app-shell',
|
|
488
489
|
name: 'Collection shell',
|
|
489
490
|
description: 'A full list workspace with sidebar navigation, URL-owned list chrome, selectable rows and a context rail.',
|
|
490
|
-
render: () => (_jsx(DemoShell, { active: "collection", main: _jsx(ListPage, { variant: "operational", context: "Sales / Sales orders", title: "Sales orders",
|
|
491
|
+
render: () => (_jsx(DemoShell, { active: "collection", main: _jsx(ListPage, { variant: "operational", context: "Sales / Sales orders", title: "Sales orders", headerActions: _jsx(Button, { label: "Create order", variant: "primary" }), actionsPlacement: "header", actionsHidden: true, actions: _jsx(BulkActions, { selectedCount: 0, actions: [{ id: 'archive', label: 'Archive selected' }] }), controls: _jsx(ListDemoChrome, { id: "app-shell" }), body: _jsx(OrdersTable, { title: "Order list" }) }), railTitle: "List health", railDetail: "Seven orders need a human decision before invoicing.", railProgress: 72, railItems: [
|
|
491
492
|
_jsx(Badge, { label: "91 ready", tone: "positive" }),
|
|
492
493
|
_jsx(Badge, { label: "7 review", tone: "warning" }),
|
|
493
494
|
] })),
|
|
@@ -496,7 +497,7 @@ export const componentGroups = [
|
|
|
496
497
|
id: 'record-page',
|
|
497
498
|
name: 'Record shell',
|
|
498
499
|
description: 'A durable subject with record identity, tabs, form content and a right-hand facts rail.',
|
|
499
|
-
render: () => (_jsx(DemoShell, { active: "record", main: _jsx(RecordPage, { variant: "operational", context: "Customers / M\u00F9a H\u1EA1 Riverside", title: "M\u00F9a H\u1EA1 Riverside",
|
|
500
|
+
render: () => (_jsx(DemoShell, { active: "record", main: _jsx(RecordPage, { variant: "operational", context: "Customers / M\u00F9a H\u1EA1 Riverside", title: "M\u00F9a H\u1EA1 Riverside", status: _jsx(Badge, { label: "Active", tone: "positive" }), actions: _jsx(ActionGroup, { actions: [
|
|
500
501
|
_jsx(Button, { label: "Save", variant: "primary", size: "compact" }),
|
|
501
502
|
_jsx(Button, { label: "Archive", variant: "tertiary", size: "compact" }),
|
|
502
503
|
] }), navigation: _jsx(Tabs, { label: "Customer record", items: [
|
|
@@ -542,7 +543,7 @@ export const componentGroups = [
|
|
|
542
543
|
id: 'workspace-flow',
|
|
543
544
|
name: 'Flow workspace',
|
|
544
545
|
description: 'A vertical operations overview where metrics, process state and exception lists sit on one grey canvas.',
|
|
545
|
-
render: () => (_jsx(DemoShell, { active: "flow", main: _jsx(WorkspacePage, { variant: "operational", layout: "flow", context: "Sales / Overview", title: "Revenue operations",
|
|
546
|
+
render: () => (_jsx(DemoShell, { active: "flow", main: _jsx(WorkspacePage, { variant: "operational", layout: "flow", context: "Sales / Overview", title: "Revenue operations", actions: _jsx(Button, { label: "Create quotation", variant: "primary" }), controls: _jsx(ActionGroup, { label: "Flow controls", actions: [
|
|
546
547
|
_jsx(LinkButton, { label: "Today", href: "#workspace-flow", size: "compact" }),
|
|
547
548
|
_jsx(LinkButton, { label: "This week", href: "#workspace-flow", size: "compact", variant: "tertiary" }),
|
|
548
549
|
] }), body: _jsx(Stack, { gap: "loose", items: [
|
|
@@ -565,7 +566,7 @@ export const componentGroups = [
|
|
|
565
566
|
id: 'workspace-canvas',
|
|
566
567
|
name: 'Canvas workspace',
|
|
567
568
|
description: 'A horizontal board-style surface where the main content can scroll without changing the shell.',
|
|
568
|
-
render: () => (_jsx(DemoShell, { active: "canvas", main: _jsx(WorkspacePage, { variant: "operational", layout: "canvas", context: "CRM / Pipeline", title: "Opportunities board",
|
|
569
|
+
render: () => (_jsx(DemoShell, { active: "canvas", main: _jsx(WorkspacePage, { variant: "operational", layout: "canvas", context: "CRM / Pipeline", title: "Opportunities board", actions: _jsx(Button, { label: "Create opportunity", variant: "primary" }), controls: _jsx(Inline, { items: [
|
|
569
570
|
_jsx(LinkButton, { label: "My pipeline", href: "#workspace-canvas", size: "compact" }),
|
|
570
571
|
_jsx(LinkButton, { label: "All teams", href: "#workspace-canvas", size: "compact", variant: "tertiary" }),
|
|
571
572
|
_jsx(Tag, { label: "High value", removeHref: "#workspace-canvas", removeLabel: "Remove filter" }),
|
|
@@ -674,7 +675,7 @@ export const componentGroups = [
|
|
|
674
675
|
id: 'list-page',
|
|
675
676
|
name: 'List page',
|
|
676
677
|
description: 'The canonical collection hierarchy: identity with primary actions, URL-driven controls, tool actions and records.',
|
|
677
|
-
render: () => (_jsx(ListPage, { variant: "operational", context: "Sales / Sales orders", eyebrow: "Sales", title: "Sales orders",
|
|
678
|
+
render: () => (_jsx(ListPage, { variant: "operational", context: "Sales / Sales orders", eyebrow: "Sales", title: "Sales orders", headerActions: _jsx(Button, { label: "Create order", variant: "primary" }), actions: _jsx(Button, { label: "Export orders", variant: "secondary" }), controls: _jsx(ListChrome, { search: {
|
|
678
679
|
id: 'orders-query',
|
|
679
680
|
action: '#list-page',
|
|
680
681
|
value: 'Mùa Hạ',
|
|
@@ -735,7 +736,7 @@ export const componentGroups = [
|
|
|
735
736
|
id: 'dashboard-page',
|
|
736
737
|
name: 'Dashboard page',
|
|
737
738
|
description: 'The canonical overview hierarchy: durable context, compact identity, primary action and an uninterrupted analytical canvas.',
|
|
738
|
-
render: () => (_jsx(DashboardPage, { variant: "operational", context: "Sales / Overview", eyebrow: "Commercial workspace", title: "Sales overview",
|
|
739
|
+
render: () => (_jsx(DashboardPage, { variant: "operational", context: "Sales / Overview", eyebrow: "Commercial workspace", title: "Sales overview", actions: _jsx(Button, { label: "Create quotation", variant: "primary" }), body: _jsx(Stack, { gap: "loose", items: [
|
|
739
740
|
_jsx(Grid, { columns: 4, items: [
|
|
740
741
|
_jsx(Metric, { label: "Quotations", value: 24, detail: "5 new today" }),
|
|
741
742
|
_jsx(Metric, { label: "Sent", value: 9, detail: "Awaiting a reply", tone: "info" }),
|
|
@@ -754,7 +755,7 @@ export const componentGroups = [
|
|
|
754
755
|
id: 'board-page',
|
|
755
756
|
name: 'Board page',
|
|
756
757
|
description: 'The canonical horizontal workspace: durable context, compact identity, global controls and an uninterrupted board canvas.',
|
|
757
|
-
render: () => (_jsx(BoardPage, { variant: "operational", context: "CRM / Pipeline", eyebrow: "Pipeline", title: "Sales opportunities",
|
|
758
|
+
render: () => (_jsx(BoardPage, { variant: "operational", context: "CRM / Pipeline", eyebrow: "Pipeline", title: "Sales opportunities", actions: _jsx(Button, { label: "Create opportunity", variant: "primary" }), controls: _jsx(ActionGroup, { label: "Board controls", actions: [
|
|
758
759
|
_jsx(LinkButton, { label: "My opportunities", href: "#board-page", size: "compact" }),
|
|
759
760
|
_jsx(LinkButton, { label: "All teams", href: "#board-page", size: "compact", variant: "tertiary" }),
|
|
760
761
|
] }), body: _jsx(Grid, { columns: 3, items: [
|
|
@@ -816,7 +817,7 @@ export const componentGroups = [
|
|
|
816
817
|
id: 'form-page',
|
|
817
818
|
name: 'Form page',
|
|
818
819
|
description: 'The canonical form hierarchy: record identity and decision first, a stable form column, then durable context.',
|
|
819
|
-
render: () => (_jsx(FormPage, { variant: "operational", context: "Customers / M\u00F9a H\u1EA1 Riverside", title: "M\u00F9a H\u1EA1 Riverside",
|
|
820
|
+
render: () => (_jsx(FormPage, { variant: "operational", context: "Customers / M\u00F9a H\u1EA1 Riverside", title: "M\u00F9a H\u1EA1 Riverside", status: _jsx(Badge, { label: "Active", tone: "positive" }), actions: _jsx(Button, { label: "Save partner", variant: "primary" }), body: _jsx(Surface, { title: "Main information", body: _jsx(RecordForm, { action: "#form-page", fields: [
|
|
820
821
|
{ id: 'partner-name', name: 'name', label: 'Name', value: 'Mùa Hạ Riverside' },
|
|
821
822
|
{ id: 'partner-ref', name: 'ref', label: 'Reference', value: 'CUS-0042' },
|
|
822
823
|
{
|
|
@@ -1079,11 +1080,10 @@ export const componentGroups = [
|
|
|
1079
1080
|
},
|
|
1080
1081
|
{
|
|
1081
1082
|
id: 'date-time',
|
|
1082
|
-
name: '
|
|
1083
|
-
description: '
|
|
1083
|
+
name: 'Date pickers and local time',
|
|
1084
|
+
description: 'Interactive calendars, seven quick ranges, draft selection and native civil-date submission. Open /dates for the focused playground.',
|
|
1084
1085
|
render: () => (_jsx(Stack, { items: [
|
|
1085
|
-
_jsx(
|
|
1086
|
-
_jsx(DateRangePicker, { id: "range", label: "Reporting period", start: { id: 'from', name: 'from', value: '2026-09-01' }, end: { id: 'to', name: 'to', value: '2026-09-30' }, startLabel: "From", endLabel: "To" }),
|
|
1086
|
+
_jsx(DatePickerExamples, {}),
|
|
1087
1087
|
_jsx(DateTimePicker, { id: "appointment", name: "appointment", label: "Appointment", value: "2026-09-08T14:30" }),
|
|
1088
1088
|
_jsx(TimePicker, { id: "cutoff", name: "cutoff", label: "Cut-off", value: "17:00" }),
|
|
1089
1089
|
] })),
|