@ketvietlab/design-system 0.1.9 → 0.1.13
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 +92 -6
- package/dist/atlas/README.md +35 -0
- package/dist/atlas/adapter.schema.json +78 -0
- package/dist/atlas/profile.json +43 -0
- package/dist/atlas-cli.d.ts +3 -0
- package/dist/atlas-cli.d.ts.map +1 -0
- package/dist/atlas-cli.js +213 -0
- package/dist/atlas-cli.js.map +1 -0
- package/dist/catalogue/catalogue.css +198 -5
- package/dist/catalogue/groups.d.ts +11 -0
- package/dist/catalogue/groups.d.ts.map +1 -0
- package/dist/catalogue/groups.js +47 -0
- package/dist/catalogue/groups.js.map +1 -0
- package/dist/catalogue/index.d.ts +16 -17
- package/dist/catalogue/index.d.ts.map +1 -1
- package/dist/catalogue/index.js +39 -751
- package/dist/catalogue/index.js.map +1 -1
- package/dist/catalogue/inventory-policy.json +560 -0
- package/dist/catalogue/inventory.css +574 -0
- package/dist/catalogue/inventory.d.ts +16 -0
- package/dist/catalogue/inventory.d.ts.map +1 -0
- package/dist/catalogue/inventory.generated.d.ts +42 -0
- package/dist/catalogue/inventory.generated.d.ts.map +1 -0
- package/dist/catalogue/inventory.generated.js +3 -0
- package/dist/catalogue/inventory.generated.js.map +1 -0
- package/dist/catalogue/inventory.generated.json +9993 -0
- package/dist/catalogue/inventory.js +48 -0
- package/dist/catalogue/inventory.js.map +1 -0
- package/dist/catalogue/registry.d.ts +12 -0
- package/dist/catalogue/registry.d.ts.map +1 -0
- package/dist/catalogue/registry.js +134 -0
- package/dist/catalogue/registry.js.map +1 -0
- package/dist/catalogue/specimens.d.ts +15 -0
- package/dist/catalogue/specimens.d.ts.map +1 -0
- package/dist/catalogue/specimens.js +1186 -0
- package/dist/catalogue/specimens.js.map +1 -0
- package/dist/catalogue/styles.css +1 -0
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +64 -18
- package/dist/contract/index.js.map +1 -1
- package/dist/data-display/data-grid/index.d.ts +22 -0
- package/dist/data-display/data-grid/index.d.ts.map +1 -0
- package/dist/data-display/data-grid/index.js +15 -0
- package/dist/data-display/data-grid/index.js.map +1 -0
- package/dist/data-display/data-grid/styles.css +49 -0
- package/dist/data-display/resource-list/index.d.ts +22 -0
- package/dist/data-display/resource-list/index.d.ts.map +1 -0
- package/dist/data-display/resource-list/index.js +21 -0
- package/dist/data-display/resource-list/index.js.map +1 -0
- package/dist/data-display/resource-list/styles.css +39 -0
- package/dist/data-display/tree/index.d.ts +33 -0
- package/dist/data-display/tree/index.d.ts.map +1 -0
- package/dist/data-display/tree/index.js +21 -0
- package/dist/data-display/tree/index.js.map +1 -0
- package/dist/data-display/tree/styles.css +45 -0
- package/dist/data-operations/inline-edit/index.d.ts +19 -0
- package/dist/data-operations/inline-edit/index.d.ts.map +1 -0
- package/dist/data-operations/inline-edit/index.js +5 -0
- package/dist/data-operations/inline-edit/index.js.map +1 -0
- package/dist/data-operations/inline-edit/styles.css +34 -0
- package/dist/data-operations/list-controls/index.d.ts +67 -0
- package/dist/data-operations/list-controls/index.d.ts.map +1 -0
- package/dist/data-operations/list-controls/index.js +35 -0
- package/dist/data-operations/list-controls/index.js.map +1 -0
- package/dist/data-operations/list-controls/styles.css +82 -0
- package/dist/forms/combobox/index.d.ts +39 -0
- package/dist/forms/combobox/index.d.ts.map +1 -0
- package/dist/forms/combobox/index.js +23 -0
- package/dist/forms/combobox/index.js.map +1 -0
- package/dist/forms/combobox/styles.css +76 -0
- package/dist/forms/date-time/index.d.ts +25 -0
- package/dist/forms/date-time/index.d.ts.map +1 -0
- package/dist/forms/date-time/index.js +15 -0
- package/dist/forms/date-time/index.js.map +1 -0
- package/dist/forms/date-time/styles.css +25 -0
- package/dist/forms/relation-picker/index.d.ts +12 -0
- package/dist/forms/relation-picker/index.d.ts.map +1 -0
- package/dist/forms/relation-picker/index.js +13 -0
- package/dist/forms/relation-picker/index.js.map +1 -0
- package/dist/forms/relation-picker/styles.css +5 -0
- package/dist/forms/scalar-fields/index.d.ts +24 -0
- package/dist/forms/scalar-fields/index.d.ts.map +1 -0
- package/dist/forms/scalar-fields/index.js +23 -0
- package/dist/forms/scalar-fields/index.js.map +1 -0
- package/dist/forms/scalar-fields/styles.css +52 -0
- package/dist/forms/shared.d.ts +19 -0
- package/dist/forms/shared.d.ts.map +1 -0
- package/dist/forms/shared.js +9 -0
- package/dist/forms/shared.js.map +1 -0
- package/dist/forms/upload/index.d.ts +20 -0
- package/dist/forms/upload/index.d.ts.map +1 -0
- package/dist/forms/upload/index.js +11 -0
- package/dist/forms/upload/index.js.map +1 -0
- package/dist/forms/upload/styles.css +21 -0
- package/dist/foundations/reset.css +4 -0
- package/dist/foundations/tokens.css +31 -4
- package/dist/index.d.ts +78 -35
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -19
- package/dist/index.js.map +1 -1
- package/dist/interactions/dialog/index.d.ts +25 -0
- package/dist/interactions/dialog/index.d.ts.map +1 -0
- package/dist/interactions/dialog/index.js +10 -0
- package/dist/interactions/dialog/index.js.map +1 -0
- package/dist/interactions/dialog/styles.css +11 -0
- package/dist/interactions/menu/index.d.ts +27 -0
- package/dist/interactions/menu/index.d.ts.map +1 -0
- package/dist/interactions/menu/index.js +13 -0
- package/dist/interactions/menu/index.js.map +1 -0
- package/dist/interactions/menu/styles.css +85 -0
- package/dist/interactions/popover/index.d.ts +15 -0
- package/dist/interactions/popover/index.d.ts.map +1 -0
- package/dist/interactions/popover/index.js +4 -0
- package/dist/interactions/popover/index.js.map +1 -0
- package/dist/interactions/popover/styles.css +47 -0
- package/dist/interactions/skeleton/index.d.ts +7 -0
- package/dist/interactions/skeleton/index.d.ts.map +1 -0
- package/dist/interactions/skeleton/index.js +5 -0
- package/dist/interactions/skeleton/index.js.map +1 -0
- package/dist/interactions/skeleton/styles.css +32 -0
- package/dist/interactions/spinner/index.d.ts +7 -0
- package/dist/interactions/spinner/index.d.ts.map +1 -0
- package/dist/interactions/spinner/index.js +4 -0
- package/dist/interactions/spinner/index.js.map +1 -0
- package/dist/interactions/spinner/styles.css +38 -0
- package/dist/interactions/toast/index.d.ts +16 -0
- package/dist/interactions/toast/index.d.ts.map +1 -0
- package/dist/interactions/toast/index.js +13 -0
- package/dist/interactions/toast/index.js.map +1 -0
- package/dist/interactions/toast/styles.css +64 -0
- package/dist/interactions/tooltip/index.d.ts +9 -0
- package/dist/interactions/tooltip/index.d.ts.map +1 -0
- package/dist/interactions/tooltip/index.js +4 -0
- package/dist/interactions/tooltip/index.js.map +1 -0
- package/dist/interactions/tooltip/styles.css +65 -0
- package/dist/layouts/app-navigation/index.d.ts +63 -0
- package/dist/layouts/app-navigation/index.d.ts.map +1 -0
- package/dist/layouts/app-navigation/index.js +50 -0
- package/dist/layouts/app-navigation/index.js.map +1 -0
- package/dist/layouts/app-navigation/styles.css +331 -0
- package/dist/layouts/app-navigation.d.ts +2 -0
- package/dist/layouts/app-navigation.d.ts.map +1 -0
- package/dist/layouts/app-navigation.js +2 -0
- package/dist/layouts/app-navigation.js.map +1 -0
- package/dist/layouts/flat/styles.css +74 -0
- package/dist/layouts/flat.css +1 -74
- package/dist/layouts/grouped/styles.css +131 -0
- package/dist/layouts/grouped.css +1 -126
- package/dist/layouts/index.d.ts +1 -69
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +1 -68
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/layout/index.d.ts +70 -0
- package/dist/layouts/layout/index.d.ts.map +1 -0
- package/dist/layouts/layout/index.js +71 -0
- package/dist/layouts/layout/index.js.map +1 -0
- package/dist/layouts/layout/styles.css +369 -0
- package/dist/layouts/layouts.css +1 -369
- package/dist/layouts/shell/index.d.ts +27 -0
- package/dist/layouts/shell/index.d.ts.map +1 -0
- package/dist/layouts/shell/index.js +24 -0
- package/dist/layouts/shell/index.js.map +1 -0
- package/dist/layouts/shell/styles.css +168 -0
- package/dist/layouts/shell.css +1 -168
- package/dist/layouts/shell.d.ts +1 -26
- package/dist/layouts/shell.d.ts.map +1 -1
- package/dist/layouts/shell.js +1 -23
- package/dist/layouts/shell.js.map +1 -1
- package/dist/patterns/board-page/index.d.ts +16 -0
- package/dist/patterns/board-page/index.d.ts.map +1 -0
- package/dist/patterns/board-page/index.js +30 -0
- package/dist/patterns/board-page/index.js.map +1 -0
- package/dist/patterns/board-page/styles.css +164 -0
- package/dist/patterns/board-page.d.ts +1 -13
- package/dist/patterns/board-page.d.ts.map +1 -1
- package/dist/patterns/board-page.js +1 -27
- package/dist/patterns/board-page.js.map +1 -1
- package/dist/patterns/dashboard-page/index.d.ts +15 -0
- package/dist/patterns/dashboard-page/index.d.ts.map +1 -0
- package/dist/patterns/dashboard-page/index.js +27 -0
- package/dist/patterns/dashboard-page/index.js.map +1 -0
- package/dist/patterns/dashboard-page/styles.css +169 -0
- package/dist/patterns/dashboard-page.d.ts +1 -12
- package/dist/patterns/dashboard-page.d.ts.map +1 -1
- package/dist/patterns/dashboard-page.js +1 -24
- package/dist/patterns/dashboard-page.js.map +1 -1
- package/dist/patterns/data-table/index.d.ts +74 -0
- package/dist/patterns/data-table/index.d.ts.map +1 -0
- package/dist/patterns/data-table/index.js +60 -0
- package/dist/patterns/data-table/index.js.map +1 -0
- package/dist/patterns/data-table/styles.css +269 -0
- package/dist/patterns/data-table.d.ts +1 -73
- package/dist/patterns/data-table.d.ts.map +1 -1
- package/dist/patterns/data-table.js +1 -59
- package/dist/patterns/data-table.js.map +1 -1
- package/dist/patterns/form-page/index.d.ts +8 -0
- package/dist/patterns/form-page/index.d.ts.map +1 -0
- package/dist/patterns/form-page/index.js +22 -0
- package/dist/patterns/form-page/index.js.map +1 -0
- package/dist/patterns/form-page/styles.css +237 -0
- package/dist/patterns/form-page.d.ts +1 -7
- package/dist/patterns/form-page.d.ts.map +1 -1
- package/dist/patterns/form-page.js +1 -21
- package/dist/patterns/form-page.js.map +1 -1
- package/dist/patterns/list-chrome/index.d.ts +80 -0
- package/dist/patterns/list-chrome/index.d.ts.map +1 -0
- package/dist/patterns/list-chrome/index.js +45 -0
- package/dist/patterns/list-chrome/index.js.map +1 -0
- package/dist/patterns/list-chrome/styles.css +245 -0
- package/dist/patterns/list-chrome.d.ts +1 -79
- package/dist/patterns/list-chrome.d.ts.map +1 -1
- package/dist/patterns/list-chrome.js +1 -44
- package/dist/patterns/list-chrome.js.map +1 -1
- package/dist/patterns/list-page/index.d.ts +31 -0
- package/dist/patterns/list-page/index.d.ts.map +1 -0
- package/dist/patterns/list-page/index.js +41 -0
- package/dist/patterns/list-page/index.js.map +1 -0
- package/dist/patterns/list-page/responsive.css +140 -0
- package/dist/patterns/list-page/styles.css +228 -0
- package/dist/patterns/list-page.d.ts +1 -30
- package/dist/patterns/list-page.d.ts.map +1 -1
- package/dist/patterns/list-page.js +1 -40
- package/dist/patterns/list-page.js.map +1 -1
- package/dist/patterns/modal-sheet/index.d.ts +16 -0
- package/dist/patterns/modal-sheet/index.d.ts.map +1 -0
- package/dist/patterns/modal-sheet/index.js +15 -0
- package/dist/patterns/modal-sheet/index.js.map +1 -0
- package/dist/patterns/modal-sheet/styles.css +219 -0
- package/dist/patterns/modal-sheet.d.ts +1 -15
- package/dist/patterns/modal-sheet.d.ts.map +1 -1
- package/dist/patterns/modal-sheet.js +1 -14
- package/dist/patterns/modal-sheet.js.map +1 -1
- package/dist/patterns/page-shell/index.d.ts +24 -0
- package/dist/patterns/page-shell/index.d.ts.map +1 -0
- package/dist/patterns/page-shell/index.js +11 -0
- package/dist/patterns/page-shell/index.js.map +1 -0
- package/dist/patterns/page-shell.d.ts +1 -23
- package/dist/patterns/page-shell.d.ts.map +1 -1
- package/dist/patterns/page-shell.js +1 -10
- package/dist/patterns/page-shell.js.map +1 -1
- package/dist/patterns/patterns.css +12 -2247
- package/dist/patterns/pipeline/index.d.ts +29 -0
- package/dist/patterns/pipeline/index.d.ts.map +1 -0
- package/dist/patterns/pipeline/index.js +26 -0
- package/dist/patterns/pipeline/index.js.map +1 -0
- package/dist/patterns/pipeline/styles.css +168 -0
- package/dist/patterns/pipeline.d.ts +1 -28
- package/dist/patterns/pipeline.d.ts.map +1 -1
- package/dist/patterns/pipeline.js +1 -25
- package/dist/patterns/pipeline.js.map +1 -1
- package/dist/patterns/record-form/index.d.ts +18 -0
- package/dist/patterns/record-form/index.d.ts.map +1 -0
- package/dist/patterns/record-form/index.js +14 -0
- package/dist/patterns/record-form/index.js.map +1 -0
- package/dist/patterns/record-form/styles.css +175 -0
- package/dist/patterns/record-form.d.ts +1 -17
- package/dist/patterns/record-form.d.ts.map +1 -1
- package/dist/patterns/record-form.js +1 -13
- package/dist/patterns/record-form.js.map +1 -1
- package/dist/patterns/record-page/index.d.ts +31 -0
- package/dist/patterns/record-page/index.d.ts.map +1 -0
- package/dist/patterns/record-page/index.js +29 -0
- package/dist/patterns/record-page/index.js.map +1 -0
- package/dist/patterns/record-page/styles.css +228 -0
- package/dist/patterns/record-page.d.ts +1 -30
- package/dist/patterns/record-page.d.ts.map +1 -1
- package/dist/patterns/record-page.js +1 -28
- package/dist/patterns/record-page.js.map +1 -1
- package/dist/patterns/workspace-page/index.d.ts +23 -0
- package/dist/patterns/workspace-page/index.d.ts.map +1 -0
- package/dist/patterns/workspace-page/index.js +26 -0
- package/dist/patterns/workspace-page/index.js.map +1 -0
- package/dist/patterns/workspace-page/styles.css +9 -0
- package/dist/patterns/workspace-page.d.ts +1 -22
- package/dist/patterns/workspace-page.d.ts.map +1 -1
- package/dist/patterns/workspace-page.js +1 -25
- package/dist/patterns/workspace-page.js.map +1 -1
- package/dist/primitives/actions/index.d.ts +36 -0
- package/dist/primitives/actions/index.d.ts.map +1 -0
- package/dist/primitives/actions/index.js +10 -0
- package/dist/primitives/actions/index.js.map +1 -0
- package/dist/primitives/actions/styles.css +149 -0
- package/dist/primitives/actions.d.ts +1 -35
- package/dist/primitives/actions.d.ts.map +1 -1
- package/dist/primitives/actions.js +1 -9
- package/dist/primitives/actions.js.map +1 -1
- package/dist/primitives/feedback/index.d.ts +19 -0
- package/dist/primitives/feedback/index.d.ts.map +1 -0
- package/dist/primitives/feedback/index.js +21 -0
- package/dist/primitives/feedback/index.js.map +1 -0
- package/dist/primitives/feedback/styles.css +117 -0
- package/dist/primitives/feedback.d.ts +1 -18
- package/dist/primitives/feedback.d.ts.map +1 -1
- package/dist/primitives/feedback.js +1 -22
- package/dist/primitives/feedback.js.map +1 -1
- package/dist/primitives/field/index.d.ts +35 -0
- package/dist/primitives/field/index.d.ts.map +1 -0
- package/dist/primitives/field/index.js +34 -0
- package/dist/primitives/field/index.js.map +1 -0
- package/dist/primitives/field/native-control.d.ts +4 -0
- package/dist/primitives/field/native-control.d.ts.map +1 -0
- package/dist/primitives/field/native-control.js +12 -0
- package/dist/primitives/field/native-control.js.map +1 -0
- package/dist/primitives/field/styles.css +160 -0
- package/dist/primitives/field.d.ts +1 -34
- package/dist/primitives/field.d.ts.map +1 -1
- package/dist/primitives/field.js +1 -41
- package/dist/primitives/field.js.map +1 -1
- package/dist/primitives/navigation/index.d.ts +36 -0
- package/dist/primitives/navigation/index.d.ts.map +1 -0
- package/dist/primitives/navigation/index.js +19 -0
- package/dist/primitives/navigation/index.js.map +1 -0
- package/dist/primitives/{navigation.css → navigation/styles.css} +51 -0
- package/dist/primitives/navigation.d.ts +1 -25
- package/dist/primitives/navigation.d.ts.map +1 -1
- package/dist/primitives/navigation.js +1 -15
- package/dist/primitives/navigation.js.map +1 -1
- package/dist/primitives/primitives.css +4 -570
- package/dist/primitives/progress/index.d.ts +10 -0
- package/dist/primitives/progress/index.d.ts.map +1 -0
- package/dist/primitives/progress/index.js +13 -0
- package/dist/primitives/progress/index.js.map +1 -0
- package/dist/primitives/progress.d.ts +1 -9
- package/dist/primitives/progress.d.ts.map +1 -1
- package/dist/primitives/progress.js +1 -12
- package/dist/primitives/progress.js.map +1 -1
- package/dist/primitives/status/index.d.ts +27 -0
- package/dist/primitives/status/index.d.ts.map +1 -0
- package/dist/primitives/status/index.js +16 -0
- package/dist/primitives/status/index.js.map +1 -0
- package/dist/primitives/status/styles.css +114 -0
- package/dist/primitives/status.d.ts +1 -26
- package/dist/primitives/status.d.ts.map +1 -1
- package/dist/primitives/status.js +1 -15
- package/dist/primitives/status.js.map +1 -1
- package/dist/record/activity/index.d.ts +26 -0
- package/dist/record/activity/index.d.ts.map +1 -0
- package/dist/record/activity/index.js +33 -0
- package/dist/record/activity/index.js.map +1 -0
- package/dist/record/activity/styles.css +38 -0
- package/dist/record/composition/index.d.ts +33 -0
- package/dist/record/composition/index.d.ts.map +1 -0
- package/dist/record/composition/index.js +10 -0
- package/dist/record/composition/index.js.map +1 -0
- package/dist/record/composition/styles.css +30 -0
- package/dist/record/display/index.d.ts +37 -0
- package/dist/record/display/index.d.ts.map +1 -0
- package/dist/record/display/index.js +23 -0
- package/dist/record/display/index.js.map +1 -0
- package/dist/record/display/styles.css +63 -0
- package/dist/record/formatted-values/index.d.ts +19 -0
- package/dist/record/formatted-values/index.d.ts.map +1 -0
- package/dist/record/formatted-values/index.js +21 -0
- package/dist/record/formatted-values/index.js.map +1 -0
- package/dist/record/formatted-values/styles.css +8 -0
- package/dist/record/media/index.d.ts +31 -0
- package/dist/record/media/index.d.ts.map +1 -0
- package/dist/record/media/index.js +19 -0
- package/dist/record/media/index.js.map +1 -0
- package/dist/record/media/styles.css +38 -0
- package/dist/runtime/auto.d.ts +2 -0
- package/dist/runtime/auto.d.ts.map +1 -0
- package/dist/runtime/auto.js +5 -0
- package/dist/runtime/auto.js.map +1 -0
- package/dist/runtime/index.d.ts +9 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +369 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/styles.css +47 -8
- package/package.json +9 -2
- /package/dist/primitives/{progress.css → progress/styles.css} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { TemplateResult } from '@ketvietlab/ketjs-view';
|
|
2
|
+
import type { Tone } from '../../primitives/status.tsx';
|
|
3
|
+
export declare const HOOKS: readonly ['pipeline', 'pipeline-step', 'pipeline-arrow', 'pipeline-step-label', 'pipeline-step-value', 'pipeline-step-node'];
|
|
4
|
+
export type PipelineStep = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
value: string | number;
|
|
8
|
+
href?: string | null;
|
|
9
|
+
tone?: Tone;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A process read left to right: the stages of a thing, and how many are sitting
|
|
13
|
+
* in each one.
|
|
14
|
+
*
|
|
15
|
+
* Not a `Progress`, which answers "how far along is this one record". This
|
|
16
|
+
* answers "where is the work piling up", so every stage carries its own count
|
|
17
|
+
* and none of them is a percentage of the others — a stage can hold more than
|
|
18
|
+
* the one before it, and a bar that normalised them would say the opposite.
|
|
19
|
+
*
|
|
20
|
+
* An ordered list, because the order is the meaning. The connecting rail and the
|
|
21
|
+
* arrows between stages are drawn by the stylesheet from `pipeline-step-node`
|
|
22
|
+
* and `pipeline-arrow`; both are decoration for an order the markup already
|
|
23
|
+
* states, which is why the arrow carries no text to announce.
|
|
24
|
+
*/
|
|
25
|
+
export declare const Pipeline: (props: {
|
|
26
|
+
label: string;
|
|
27
|
+
steps: readonly PipelineStep[];
|
|
28
|
+
}) => TemplateResult;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/design-system/src/patterns/pipeline/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAEvD,eAAO,MAAM,KAAK,YAChB,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,CACZ,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,UAAW;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;CAAE,KAAG,cAqBnF,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@ketvietlab/ketjs-view/jsx-runtime";
|
|
2
|
+
import { each } from '@ketvietlab/ketjs-view';
|
|
3
|
+
export const HOOKS = [
|
|
4
|
+
'pipeline',
|
|
5
|
+
'pipeline-step',
|
|
6
|
+
'pipeline-arrow',
|
|
7
|
+
'pipeline-step-label',
|
|
8
|
+
'pipeline-step-value',
|
|
9
|
+
'pipeline-step-node',
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* A process read left to right: the stages of a thing, and how many are sitting
|
|
13
|
+
* in each one.
|
|
14
|
+
*
|
|
15
|
+
* Not a `Progress`, which answers "how far along is this one record". This
|
|
16
|
+
* answers "where is the work piling up", so every stage carries its own count
|
|
17
|
+
* and none of them is a percentage of the others — a stage can hold more than
|
|
18
|
+
* the one before it, and a bar that normalised them would say the opposite.
|
|
19
|
+
*
|
|
20
|
+
* An ordered list, because the order is the meaning. The connecting rail and the
|
|
21
|
+
* arrows between stages are drawn by the stylesheet from `pipeline-step-node`
|
|
22
|
+
* and `pipeline-arrow`; both are decoration for an order the markup already
|
|
23
|
+
* states, which is why the arrow carries no text to announce.
|
|
24
|
+
*/
|
|
25
|
+
export const Pipeline = (props) => (_jsx("ol", { "data-ui": "pipeline", "aria-label": props.label, children: each(props.steps, (step) => step.id, (step) => (_jsxs("li", { "data-ui": "pipeline-step", "data-tone": step.tone ?? 'neutral', children: [_jsx("span", { "data-ui": "pipeline-arrow", "aria-hidden": "true" }), step.href ? (_jsx("a", { "data-ui": "pipeline-step-label", href: step.href, children: step.label })) : (_jsx("span", { "data-ui": "pipeline-step-label", children: step.label })), _jsx("span", { "data-ui": "pipeline-step-value", children: String(step.value) }), _jsx("span", { "data-ui": "pipeline-step-node", "aria-hidden": "true" })] }))) }));
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/design-system/src/patterns/pipeline/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAI7C,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,UAAU;IACV,eAAe;IACf,gBAAgB;IAChB,qBAAqB;IACrB,qBAAqB;IACrB,oBAAoB;CACZ,CAAA;AAUV;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAwD,EAAkB,EAAE,CAAC,CACpG,wBAAY,UAAU,gBAAa,KAAK,CAAC,KAAK,YAC3C,IAAI,CACH,KAAK,CAAC,KAAK,EACX,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EACjB,CAAC,IAAI,EAAE,EAAE,CAAC,CACR,yBAAY,eAAe,eAAY,IAAI,CAAC,IAAI,IAAI,SAAS,aAC3D,0BAAc,gBAAgB,iBAAa,MAAM,GAAG,EACnD,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACX,uBAAW,qBAAqB,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,YAC7C,IAAI,CAAC,KAAK,GACT,CACL,CAAC,CAAC,CAAC,CACF,0BAAc,qBAAqB,YAAE,IAAI,CAAC,KAAK,GAAQ,CACxD,EACD,0BAAc,qBAAqB,YAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAQ,EAC/D,0BAAc,oBAAoB,iBAAa,MAAM,GAAG,IACrD,CACN,CACF,GACE,CACN,CAAA"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
@layer ket.app {
|
|
2
|
+
/* A process read left to right. The rail is drawn as two half-lines per step
|
|
3
|
+
rather than one line behind the row, so it starts at the first node and stops
|
|
4
|
+
at the last instead of running off both ends of the grid. */
|
|
5
|
+
:where([data-kv-design-system]) [data-ui="pipeline"] {
|
|
6
|
+
display: grid;
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
grid-auto-columns: 1fr;
|
|
10
|
+
grid-auto-flow: column;
|
|
11
|
+
list-style: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"] {
|
|
15
|
+
position: relative;
|
|
16
|
+
display: grid;
|
|
17
|
+
padding-bottom: var(--kv-space-5);
|
|
18
|
+
justify-items: center;
|
|
19
|
+
gap: var(--kv-space-1);
|
|
20
|
+
text-align: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]::before,
|
|
24
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]::after {
|
|
25
|
+
position: absolute;
|
|
26
|
+
bottom: 0.3125rem;
|
|
27
|
+
height: 1px;
|
|
28
|
+
background: var(--kv-color-line-strong);
|
|
29
|
+
content: "";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]::before {
|
|
33
|
+
left: 0;
|
|
34
|
+
right: 50%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]::after {
|
|
38
|
+
left: 50%;
|
|
39
|
+
right: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]:first-child::before,
|
|
43
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]:last-child::after {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step-node"] {
|
|
48
|
+
position: absolute;
|
|
49
|
+
bottom: 0;
|
|
50
|
+
left: 50%;
|
|
51
|
+
width: 0.625rem;
|
|
52
|
+
height: 0.625rem;
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
background: var(--kv-text-muted);
|
|
55
|
+
translate: -50% 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"][data-tone="info"] [data-ui="pipeline-step-node"] {
|
|
59
|
+
background: var(--kv-color-info);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where([data-kv-design-system])
|
|
63
|
+
[data-ui="pipeline-step"][data-tone="positive"]
|
|
64
|
+
[data-ui="pipeline-step-node"] {
|
|
65
|
+
background: var(--kv-color-positive);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where([data-kv-design-system])
|
|
69
|
+
[data-ui="pipeline-step"][data-tone="warning"]
|
|
70
|
+
[data-ui="pipeline-step-node"] {
|
|
71
|
+
background: var(--kv-color-warning);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:where([data-kv-design-system])
|
|
75
|
+
[data-ui="pipeline-step"][data-tone="danger"]
|
|
76
|
+
[data-ui="pipeline-step-node"] {
|
|
77
|
+
background: var(--kv-color-danger);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Two borders rotated into a chevron, sat on the column boundary. Drawn rather
|
|
81
|
+
than written, because the order is already in the markup and an arrow
|
|
82
|
+
character here would be read out between every pair of stages. */
|
|
83
|
+
:where([data-kv-design-system]) [data-ui="pipeline-arrow"] {
|
|
84
|
+
position: absolute;
|
|
85
|
+
top: 0.25rem;
|
|
86
|
+
left: 0;
|
|
87
|
+
width: 0.375rem;
|
|
88
|
+
height: 0.375rem;
|
|
89
|
+
border-top: 1.5px solid var(--kv-text-muted);
|
|
90
|
+
border-right: 1.5px solid var(--kv-text-muted);
|
|
91
|
+
rotate: 45deg;
|
|
92
|
+
translate: -50% 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]:first-child [data-ui="pipeline-arrow"] {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step-label"] {
|
|
100
|
+
color: var(--kv-text-secondary);
|
|
101
|
+
font-size: var(--kv-text-sm);
|
|
102
|
+
text-decoration: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:where([data-kv-design-system]) a[data-ui="pipeline-step-label"]:hover {
|
|
106
|
+
color: var(--kv-text-main);
|
|
107
|
+
text-decoration: underline;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step-value"] {
|
|
111
|
+
color: var(--kv-text-main);
|
|
112
|
+
font-size: var(--kv-text-2xl);
|
|
113
|
+
font-weight: var(--kv-weight-bold);
|
|
114
|
+
font-variant-numeric: tabular-nums;
|
|
115
|
+
letter-spacing: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Too narrow for four columns, so the rail turns and runs down the left. The
|
|
119
|
+
stages keep their order and their counts; only the axis changes. */
|
|
120
|
+
@media (max-width: 42rem) {
|
|
121
|
+
:where([data-kv-design-system]) [data-ui="pipeline"] {
|
|
122
|
+
grid-auto-columns: auto;
|
|
123
|
+
grid-auto-flow: row;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"] {
|
|
127
|
+
padding-bottom: var(--kv-space-3);
|
|
128
|
+
padding-left: var(--kv-space-6);
|
|
129
|
+
grid-template-columns: 1fr auto;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-items: start;
|
|
132
|
+
text-align: left;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]::before,
|
|
136
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]::after {
|
|
137
|
+
left: 0.3125rem;
|
|
138
|
+
right: auto;
|
|
139
|
+
width: 1px;
|
|
140
|
+
height: 50%;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]::before {
|
|
144
|
+
top: 0;
|
|
145
|
+
bottom: auto;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step"]::after {
|
|
149
|
+
top: 50%;
|
|
150
|
+
bottom: auto;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step-node"] {
|
|
154
|
+
top: 50%;
|
|
155
|
+
bottom: auto;
|
|
156
|
+
left: 0.3125rem;
|
|
157
|
+
translate: -50% -50%;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:where([data-kv-design-system]) [data-ui="pipeline-arrow"] {
|
|
161
|
+
display: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:where([data-kv-design-system]) [data-ui="pipeline-step-value"] {
|
|
165
|
+
font-size: var(--kv-text-lg);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Tone } from '../primitives/status.tsx';
|
|
3
|
-
export declare const HOOKS: readonly ['pipeline', 'pipeline-step', 'pipeline-arrow', 'pipeline-step-label', 'pipeline-step-value', 'pipeline-step-node'];
|
|
4
|
-
export type PipelineStep = {
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
value: string | number;
|
|
8
|
-
href?: string | null;
|
|
9
|
-
tone?: Tone;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* A process read left to right: the stages of a thing, and how many are sitting
|
|
13
|
-
* in each one.
|
|
14
|
-
*
|
|
15
|
-
* Not a `Progress`, which answers "how far along is this one record". This
|
|
16
|
-
* answers "where is the work piling up", so every stage carries its own count
|
|
17
|
-
* and none of them is a percentage of the others — a stage can hold more than
|
|
18
|
-
* the one before it, and a bar that normalised them would say the opposite.
|
|
19
|
-
*
|
|
20
|
-
* An ordered list, because the order is the meaning. The connecting rail and the
|
|
21
|
-
* arrows between stages are drawn by the stylesheet from `pipeline-step-node`
|
|
22
|
-
* and `pipeline-arrow`; both are decoration for an order the markup already
|
|
23
|
-
* states, which is why the arrow carries no text to announce.
|
|
24
|
-
*/
|
|
25
|
-
export declare const Pipeline: (props: {
|
|
26
|
-
label: string;
|
|
27
|
-
steps: readonly PipelineStep[];
|
|
28
|
-
}) => TemplateResult;
|
|
1
|
+
export * from './pipeline/index.tsx';
|
|
29
2
|
//# sourceMappingURL=pipeline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../../../packages/design-system/src/patterns/pipeline.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../../../packages/design-system/src/patterns/pipeline.tsx"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"}
|
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { each } from '@ketvietlab/ketjs-view';
|
|
3
|
-
export const HOOKS = [
|
|
4
|
-
'pipeline',
|
|
5
|
-
'pipeline-step',
|
|
6
|
-
'pipeline-arrow',
|
|
7
|
-
'pipeline-step-label',
|
|
8
|
-
'pipeline-step-value',
|
|
9
|
-
'pipeline-step-node',
|
|
10
|
-
];
|
|
11
|
-
/**
|
|
12
|
-
* A process read left to right: the stages of a thing, and how many are sitting
|
|
13
|
-
* in each one.
|
|
14
|
-
*
|
|
15
|
-
* Not a `Progress`, which answers "how far along is this one record". This
|
|
16
|
-
* answers "where is the work piling up", so every stage carries its own count
|
|
17
|
-
* and none of them is a percentage of the others — a stage can hold more than
|
|
18
|
-
* the one before it, and a bar that normalised them would say the opposite.
|
|
19
|
-
*
|
|
20
|
-
* An ordered list, because the order is the meaning. The connecting rail and the
|
|
21
|
-
* arrows between stages are drawn by the stylesheet from `pipeline-step-node`
|
|
22
|
-
* and `pipeline-arrow`; both are decoration for an order the markup already
|
|
23
|
-
* states, which is why the arrow carries no text to announce.
|
|
24
|
-
*/
|
|
25
|
-
export const Pipeline = (props) => (_jsx("ol", { "data-ui": "pipeline", "aria-label": props.label, children: each(props.steps, (step) => step.id, (step) => (_jsxs("li", { "data-ui": "pipeline-step", "data-tone": step.tone ?? 'neutral', children: [_jsx("span", { "data-ui": "pipeline-arrow", "aria-hidden": "true" }), step.href ? (_jsx("a", { "data-ui": "pipeline-step-label", href: step.href, children: step.label })) : (_jsx("span", { "data-ui": "pipeline-step-label", children: step.label })), _jsx("span", { "data-ui": "pipeline-step-value", children: String(step.value) }), _jsx("span", { "data-ui": "pipeline-step-node", "aria-hidden": "true" })] }))) }));
|
|
1
|
+
export * from './pipeline/index.js';
|
|
26
2
|
//# sourceMappingURL=pipeline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../../../../../packages/design-system/src/patterns/pipeline.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../../../../../packages/design-system/src/patterns/pipeline.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAsB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TemplateResult } from '@ketvietlab/ketjs-view';
|
|
2
|
+
import type { ActionVariant } from '../../primitives/actions.tsx';
|
|
3
|
+
import type { FieldProps } from '../../primitives/field.tsx';
|
|
4
|
+
export declare const HOOKS: readonly ['record-form', 'form-errors', 'form-grid', 'form-actions'];
|
|
5
|
+
export type RecordFormProps = {
|
|
6
|
+
id?: string | null;
|
|
7
|
+
action: string;
|
|
8
|
+
method?: 'get' | 'post';
|
|
9
|
+
fields: readonly FieldProps[];
|
|
10
|
+
submitLabel: string;
|
|
11
|
+
submitVariant?: ActionVariant;
|
|
12
|
+
cancelHref?: string | null;
|
|
13
|
+
cancelLabel?: string | null;
|
|
14
|
+
errors?: readonly string[];
|
|
15
|
+
hidden?: Record<string, string>;
|
|
16
|
+
};
|
|
17
|
+
export declare const RecordForm: (props: RecordFormProps) => TemplateResult;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/design-system/src/patterns/record-form/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAE5D,eAAO,MAAM,KAAK,YAAI,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,CAAU,CAAA;AAEzF,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IACvB,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,UAAU,UAAW,eAAe,KAAG,cA+CnD,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@ketvietlab/ketjs-view/jsx-runtime";
|
|
2
|
+
import { each } from '@ketvietlab/ketjs-view';
|
|
3
|
+
import { ActionGroup, Button, LinkButton } from '../../primitives/actions.js';
|
|
4
|
+
import { Field } from '../../primitives/field.js';
|
|
5
|
+
export const HOOKS = ['record-form', 'form-errors', 'form-grid', 'form-actions'];
|
|
6
|
+
export const RecordForm = (props) => (_jsxs("form", { "data-ui": "record-form", id: props.id ?? undefined, action: props.action, method: props.method ?? 'post', children: [Object.entries(props.hidden ?? {}).map(([name, value]) => (_jsx("input", { type: "hidden", name: name, value: value }))), !!props.errors?.length && (_jsx("ul", { "data-ui": "form-errors", role: "alert", children: each(props.errors, (error, index) => `${index}:${error}`, (error) => (_jsx("li", { children: error }))) })), _jsx("div", { "data-ui": "form-grid", children: each(props.fields, (field) => field.id, (field) => (_jsx(Field, { ...field }))) }), _jsx("div", { "data-ui": "form-actions", children: _jsx(ActionGroup, { actions: [
|
|
7
|
+
_jsx(Button, { label: props.submitLabel, variant: props.submitVariant ?? 'primary', type: "submit" }),
|
|
8
|
+
...(props.cancelHref
|
|
9
|
+
? [
|
|
10
|
+
_jsx(LinkButton, { label: props.cancelLabel ?? 'Cancel', href: props.cancelHref, variant: "tertiary" }),
|
|
11
|
+
]
|
|
12
|
+
: []),
|
|
13
|
+
] }) })] }));
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/design-system/src/patterns/record-form/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,6BAA8B,CAAA;AAE9E,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA4B,CAAA;AAGlD,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,CAAU,CAAA;AAezF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAkB,EAAE,CAAC,CACpE,2BACU,aAAa,EACrB,EAAE,EAAE,KAAK,CAAC,EAAE,IAAI,SAAS,EACzB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,MAAM,aAE7B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CACzD,gBAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,CAClD,CAAC,EACD,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,IAAI,CACzB,wBAAY,aAAa,EAAC,IAAI,EAAC,OAAO,YACnC,IAAI,CACH,KAAK,CAAC,MAAM,EACZ,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,IAAI,KAAK,EAAE,EACrC,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,uBAAK,KAAK,GAAM,CACjB,CACF,GACE,CACN,EACD,yBAAa,WAAW,YACrB,IAAI,CACH,KAAK,CAAC,MAAM,EACZ,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,EACnB,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,KAAC,KAAK,OAAK,KAAK,GAAI,CACrB,CACF,GACG,EACN,yBAAa,cAAc,YACzB,KAAC,WAAW,IACV,OAAO,EAAE;oBACP,KAAC,MAAM,IAAC,KAAK,EAAE,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,aAAa,IAAI,SAAS,EAAE,IAAI,EAAC,QAAQ,GAAG;oBAC7F,GAAG,CAAC,KAAK,CAAC,UAAU;wBAClB,CAAC,CAAC;4BACE,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,CAAC,WAAW,IAAI,QAAQ,EACpC,IAAI,EAAE,KAAK,CAAC,UAAU,EACtB,OAAO,EAAC,UAAU,GAClB;yBACH;wBACH,CAAC,CAAC,EAAE,CAAC;iBACR,GACD,GACE,IACD,CACR,CAAA"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
@layer ket.app {
|
|
2
|
+
:where([data-kv-design-system]) [data-ui="record-form"] {
|
|
3
|
+
display: grid;
|
|
4
|
+
min-width: 0;
|
|
5
|
+
container-type: inline-size;
|
|
6
|
+
container-name: record-form;
|
|
7
|
+
gap: var(--kv-gap-field-group);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@media (max-width: 48rem) {
|
|
11
|
+
:where([data-kv-design-system]) [data-ui="table-scroll"][data-responsive="stack"] {
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where([data-kv-design-system]) [data-responsive="stack"] > [data-ui="table"] {
|
|
16
|
+
display: block;
|
|
17
|
+
min-width: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where([data-kv-design-system]) [data-responsive="stack"] > [data-ui="table"] > thead {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where([data-kv-design-system]) [data-responsive="stack"] > [data-ui="table"] > tbody {
|
|
25
|
+
display: block;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="row"] {
|
|
29
|
+
display: grid;
|
|
30
|
+
grid-template-columns: minmax(0, 1fr);
|
|
31
|
+
height: auto;
|
|
32
|
+
padding: var(--kv-space-3);
|
|
33
|
+
border-bottom: 1px solid var(--kv-table-border);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="row"]:last-child {
|
|
37
|
+
border-bottom: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="group-row"],
|
|
41
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="group-pager"] {
|
|
42
|
+
display: block;
|
|
43
|
+
height: auto;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="group-cell"],
|
|
47
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="group-pager"] td {
|
|
48
|
+
display: block;
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="cell"] {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-wrap: wrap;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
gap: var(--kv-space-2);
|
|
58
|
+
width: 100%;
|
|
59
|
+
min-width: 0;
|
|
60
|
+
max-width: none;
|
|
61
|
+
height: auto;
|
|
62
|
+
padding: var(--kv-space-2) 0;
|
|
63
|
+
border: 0;
|
|
64
|
+
white-space: normal;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="cell"]::before {
|
|
68
|
+
content: attr(data-label);
|
|
69
|
+
color: var(--kv-text-muted);
|
|
70
|
+
font-size: var(--kv-text-sm);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="cell"]:first-child {
|
|
74
|
+
display: block;
|
|
75
|
+
font-weight: var(--kv-weight-semibold);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="cell"]:first-child::before {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="select-cell"] {
|
|
83
|
+
display: flex;
|
|
84
|
+
justify-content: flex-start;
|
|
85
|
+
width: 100%;
|
|
86
|
+
max-width: none;
|
|
87
|
+
height: auto;
|
|
88
|
+
padding: var(--kv-space-2) 0;
|
|
89
|
+
border: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="cell"][data-linked="true"] {
|
|
93
|
+
padding: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:where([data-kv-design-system]) [data-responsive="stack"] [data-ui="row-link"] {
|
|
97
|
+
min-height: auto;
|
|
98
|
+
padding: var(--kv-space-2) 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (max-width: 47.9375rem) {
|
|
103
|
+
:where([data-kv-design-system]) [data-ui="list-chrome-row"][data-row="query"] {
|
|
104
|
+
flex-wrap: wrap;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:where([data-kv-design-system]) [data-ui="list-search"] {
|
|
108
|
+
flex: 1 1 8rem;
|
|
109
|
+
width: auto;
|
|
110
|
+
min-width: 0;
|
|
111
|
+
max-width: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:where([data-kv-design-system]) [data-ui="list-chrome-row"][data-row="filters"] {
|
|
115
|
+
flex: 1 0 100%;
|
|
116
|
+
width: 100%;
|
|
117
|
+
min-width: 0;
|
|
118
|
+
order: 3;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:where([data-kv-design-system]) [data-ui="list-chrome-row"][data-row="tail"] {
|
|
122
|
+
display: contents;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:where([data-kv-design-system]) [data-ui="list-chrome-row"][data-row="meta"] {
|
|
126
|
+
margin-left: auto;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:where([data-kv-design-system]) [data-ui="list-actions"],
|
|
130
|
+
:where([data-kv-design-system]) [data-ui="bulk-action-list"],
|
|
131
|
+
:where([data-kv-design-system]) [data-ui="pager-actions"],
|
|
132
|
+
:where([data-kv-design-system]) [data-ui="pager-pages"] {
|
|
133
|
+
justify-content: flex-start;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:where([data-kv-design-system]) [data-ui="form-errors"] {
|
|
138
|
+
display: grid;
|
|
139
|
+
gap: var(--kv-space-1);
|
|
140
|
+
margin: 0;
|
|
141
|
+
padding: var(--kv-space-3) var(--kv-space-3) var(--kv-space-3) 2rem;
|
|
142
|
+
border: 1px solid var(--kv-color-danger);
|
|
143
|
+
border-radius: var(--kv-radius-sm);
|
|
144
|
+
background: var(--kv-color-danger-soft);
|
|
145
|
+
color: var(--kv-color-danger);
|
|
146
|
+
font-size: var(--kv-text-sm);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:where([data-kv-design-system]) [data-ui="form-grid"] {
|
|
150
|
+
display: grid;
|
|
151
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
152
|
+
gap: var(--kv-gap-form-row) var(--kv-gap-field-group);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:where([data-kv-design-system]) [data-ui="form-grid"] [data-ui="field"][data-span="full"] {
|
|
156
|
+
grid-column: 1 / -1;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:where([data-kv-design-system]) [data-ui="form-actions"] {
|
|
160
|
+
display: flex;
|
|
161
|
+
justify-content: flex-end;
|
|
162
|
+
padding-top: var(--kv-space-4);
|
|
163
|
+
border-top: 1px solid var(--kv-panel-divider);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@media (max-width: 47.9375rem) {
|
|
167
|
+
:where([data-kv-design-system]) [data-ui="form-grid"] {
|
|
168
|
+
grid-template-columns: minmax(0, 1fr);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
:where([data-kv-design-system]) [data-ui="form-grid"] [data-ui="field"] {
|
|
172
|
+
grid-column: 1;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { ActionVariant } from '../primitives/actions.tsx';
|
|
3
|
-
import type { FieldProps } from '../primitives/field.tsx';
|
|
4
|
-
export declare const HOOKS: readonly ['record-form', 'form-errors', 'form-grid', 'form-actions'];
|
|
5
|
-
export type RecordFormProps = {
|
|
6
|
-
id?: string | null;
|
|
7
|
-
action: string;
|
|
8
|
-
method?: 'get' | 'post';
|
|
9
|
-
fields: readonly FieldProps[];
|
|
10
|
-
submitLabel: string;
|
|
11
|
-
submitVariant?: ActionVariant;
|
|
12
|
-
cancelHref?: string | null;
|
|
13
|
-
cancelLabel?: string | null;
|
|
14
|
-
errors?: readonly string[];
|
|
15
|
-
hidden?: Record<string, string>;
|
|
16
|
-
};
|
|
17
|
-
export declare const RecordForm: (props: RecordFormProps) => TemplateResult;
|
|
1
|
+
export * from './record-form/index.tsx';
|
|
18
2
|
//# sourceMappingURL=record-form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-form.d.ts","sourceRoot":"","sources":["../../../../../packages/design-system/src/patterns/record-form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record-form.d.ts","sourceRoot":"","sources":["../../../../../packages/design-system/src/patterns/record-form.tsx"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { each } from '@ketvietlab/ketjs-view';
|
|
3
|
-
import { ActionGroup, Button, LinkButton } from '../primitives/actions.js';
|
|
4
|
-
import { Field } from '../primitives/field.js';
|
|
5
|
-
export const HOOKS = ['record-form', 'form-errors', 'form-grid', 'form-actions'];
|
|
6
|
-
export const RecordForm = (props) => (_jsxs("form", { "data-ui": "record-form", id: props.id ?? undefined, action: props.action, method: props.method ?? 'post', children: [Object.entries(props.hidden ?? {}).map(([name, value]) => (_jsx("input", { type: "hidden", name: name, value: value }))), !!props.errors?.length && (_jsx("ul", { "data-ui": "form-errors", role: "alert", children: each(props.errors, (error, index) => `${index}:${error}`, (error) => (_jsx("li", { children: error }))) })), _jsx("div", { "data-ui": "form-grid", children: each(props.fields, (field) => field.id, (field) => (_jsx(Field, { ...field }))) }), _jsx("div", { "data-ui": "form-actions", children: _jsx(ActionGroup, { actions: [
|
|
7
|
-
_jsx(Button, { label: props.submitLabel, variant: props.submitVariant ?? 'primary', type: "submit" }),
|
|
8
|
-
...(props.cancelHref
|
|
9
|
-
? [
|
|
10
|
-
_jsx(LinkButton, { label: props.cancelLabel ?? 'Cancel', href: props.cancelHref, variant: "tertiary" }),
|
|
11
|
-
]
|
|
12
|
-
: []),
|
|
13
|
-
] }) })] }));
|
|
1
|
+
export * from './record-form/index.js';
|
|
14
2
|
//# sourceMappingURL=record-form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-form.js","sourceRoot":"","sources":["../../../../../../packages/design-system/src/patterns/record-form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record-form.js","sourceRoot":"","sources":["../../../../../../packages/design-system/src/patterns/record-form.tsx"],"names":[],"mappings":"AAAA,cAAc,wBAAyB,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { JSXChild, TemplateResult } from '@ketvietlab/ketjs-view';
|
|
2
|
+
import { type PageIdentityKind } from '../page-shell.tsx';
|
|
3
|
+
export declare const HOOKS: readonly ['record-page', 'record-page-context', 'record-page-header', 'record-page-title-row', 'record-page-heading', 'record-page-title', 'record-page-subline', 'record-page-status', 'record-page-description', 'record-page-actions', 'record-page-meta', 'record-page-controller', 'record-page-navigation', 'record-page-layout', 'record-page-body', 'record-page-aside'];
|
|
4
|
+
export type RecordPageSlots = {
|
|
5
|
+
header: string;
|
|
6
|
+
body: string;
|
|
7
|
+
fragmentTitle?: string;
|
|
8
|
+
};
|
|
9
|
+
export type RecordPageProps = {
|
|
10
|
+
title: string;
|
|
11
|
+
body: JSXChild;
|
|
12
|
+
context?: JSXChild;
|
|
13
|
+
variant?: 'operational';
|
|
14
|
+
width?: 'default' | 'wide';
|
|
15
|
+
scope?: string | null;
|
|
16
|
+
description?: string | null;
|
|
17
|
+
status?: JSXChild;
|
|
18
|
+
actions?: JSXChild;
|
|
19
|
+
meta?: JSXChild;
|
|
20
|
+
controller?: JSXChild;
|
|
21
|
+
navigation?: JSXChild;
|
|
22
|
+
aside?: JSXChild;
|
|
23
|
+
asideLabel?: string | null;
|
|
24
|
+
slots?: RecordPageSlots;
|
|
25
|
+
};
|
|
26
|
+
type RecordPageKind = Extract<PageIdentityKind, 'record-page' | 'form-page'>;
|
|
27
|
+
export declare const recordPage: (props: RecordPageProps, compatibilityKind?: RecordPageKind) => TemplateResult;
|
|
28
|
+
/** One durable subject: create, edit, inspect or advance its workflow. */
|
|
29
|
+
export declare const RecordPage: (props: RecordPageProps) => TemplateResult;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/design-system/src/patterns/record-page/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAE9E,eAAO,MAAM,KAAK,YAChB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,CACX,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,QAAQ,CAAA;IACd,OAAO,CAAC,EAAE,QAAQ,CAAA;IAClB,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,CAAC,EAAE,QAAQ,CAAA;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAA;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,UAAU,CAAC,EAAE,QAAQ,CAAA;IACrB,UAAU,CAAC,EAAE,QAAQ,CAAA;IACrB,KAAK,CAAC,EAAE,QAAQ,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,KAAK,CAAC,EAAE,eAAe,CAAA;CACxB,CAAA;AAED,KAAK,cAAc,GAAG,OAAO,CAAC,gBAAgB,EAAE,aAAa,GAAG,WAAW,CAAC,CAAA;AAE5E,eAAO,MAAM,UAAU,UAAW,eAAe,sBAAsB,cAAc,KAAG,cAsCvF,CAAA;AAED,0EAA0E;AAC1E,eAAO,MAAM,UAAU,UAAW,eAAe,KAAG,cAAmC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@ketvietlab/ketjs-view/jsx-runtime";
|
|
2
|
+
import { pageIdentityContent } from '../page-shell.js';
|
|
3
|
+
export const HOOKS = [
|
|
4
|
+
'record-page',
|
|
5
|
+
'record-page-context',
|
|
6
|
+
'record-page-header',
|
|
7
|
+
'record-page-title-row',
|
|
8
|
+
'record-page-heading',
|
|
9
|
+
'record-page-title',
|
|
10
|
+
'record-page-subline',
|
|
11
|
+
'record-page-status',
|
|
12
|
+
'record-page-description',
|
|
13
|
+
'record-page-actions',
|
|
14
|
+
'record-page-meta',
|
|
15
|
+
'record-page-controller',
|
|
16
|
+
'record-page-navigation',
|
|
17
|
+
'record-page-layout',
|
|
18
|
+
'record-page-body',
|
|
19
|
+
'record-page-aside',
|
|
20
|
+
];
|
|
21
|
+
export const recordPage = (props, compatibilityKind) => {
|
|
22
|
+
const kind = compatibilityKind ?? 'record-page';
|
|
23
|
+
if (props.slots?.fragmentTitle !== undefined)
|
|
24
|
+
return (_jsxs("ket-fragments", { "data-title": props.slots.fragmentTitle, children: [_jsx("template", { "data-ket-slot": props.slots.header, children: pageIdentityContent(kind, { ...props, groupDescription: true }) }), _jsx("template", { "data-ket-slot": props.slots.body, children: props.body })] }));
|
|
25
|
+
return (_jsxs("section", { "data-ui": kind, "data-scope": props.scope ?? null, "data-has-aside": String(props.aside !== undefined), "data-variant": props.variant ?? null, "data-width": props.width ?? 'default', "data-pattern": "record", children: [props.context !== undefined && _jsx("div", { "data-ui": `${kind}-context`, children: props.context }), _jsx("header", { "data-ui": `${kind}-header`, "data-ket-slot": props.slots?.header, children: pageIdentityContent(kind, { ...props, groupDescription: true }) }), props.controller !== undefined && _jsx("div", { "data-ui": `${kind}-controller`, children: props.controller }), props.navigation !== undefined && _jsx("div", { "data-ui": `${kind}-navigation`, children: props.navigation }), _jsxs("div", { "data-ui": `${kind}-layout`, children: [_jsx("div", { "data-ui": `${kind}-body`, "data-ket-slot": props.slots?.body, children: props.body }), props.aside !== undefined && (_jsx("aside", { "data-ui": `${kind}-aside`, "aria-label": props.asideLabel ?? null, children: props.aside }))] })] }));
|
|
26
|
+
};
|
|
27
|
+
/** One durable subject: create, edit, inspect or advance its workflow. */
|
|
28
|
+
export const RecordPage = (props) => recordPage(props);
|
|
29
|
+
//# sourceMappingURL=index.js.map
|