@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
package/dist/layouts/grouped.css
CHANGED
|
@@ -1,126 +1 @@
|
|
|
1
|
-
|
|
2
|
-
@layer ket.app {
|
|
3
|
-
[data-kv-design-system][data-presentation="grouped"] {
|
|
4
|
-
--kv-page-bg: light-dark(#f6f6f7, var(--kv-ref-bg-main));
|
|
5
|
-
--kv-app-bg: light-dark(#f6f6f7, var(--kv-ref-bg-app));
|
|
6
|
-
--kv-sidebar-bg: light-dark(#f7f5f5, var(--kv-ref-bg-sidebar));
|
|
7
|
-
--kv-nav-selected: light-dark(#eef0fb, var(--kv-ref-nav-selected));
|
|
8
|
-
--kv-nav-selected-hover: light-dark(#dde2f7, var(--kv-ref-nav-selected-hover));
|
|
9
|
-
--kv-panel-bg-subtle: light-dark(#f6f6f7, var(--kv-ref-surface-0));
|
|
10
|
-
--kv-surface-raised: light-dark(#fafafb, var(--kv-ref-surface-2));
|
|
11
|
-
--kv-surface-hover: light-dark(#f0f1f3, var(--kv-ref-surface-3));
|
|
12
|
-
--kv-panel-border: light-dark(#e2e4e8, var(--kv-ref-border-subtle));
|
|
13
|
-
--kv-sidebar-border: light-dark(#e9e7e8, rgb(255 255 255 / 7%));
|
|
14
|
-
--kv-table-header-bg: light-dark(#f0f1f3, #282d34);
|
|
15
|
-
--kv-table-row-hover: light-dark(#f6f6f7, rgb(255 255 255 / 2.7%));
|
|
16
|
-
--kv-input-bg-hover: light-dark(#f6f6f7, #252b32);
|
|
17
|
-
--kv-interactive-hover: light-dark(#f6f6f7, var(--kv-ref-control-hover));
|
|
18
|
-
--kv-interactive-active: light-dark(#f0f1f3, var(--kv-ref-control-active));
|
|
19
|
-
--kv-interactive-disabled: light-dark(#f0f1f3, var(--kv-ref-control-disabled));
|
|
20
|
-
/* Rebind inherited aliases at the presentation boundary. */
|
|
21
|
-
--kv-page-content-bg: var(--kv-page-bg);
|
|
22
|
-
--kv-panel-divider: var(--kv-panel-border);
|
|
23
|
-
--kv-table-border: var(--kv-panel-border);
|
|
24
|
-
--kv-right-rail-border: var(--kv-sidebar-border);
|
|
25
|
-
--kv-color-canvas: var(--kv-page-bg);
|
|
26
|
-
--kv-color-canvas-raised: var(--kv-panel-bg-subtle);
|
|
27
|
-
--kv-color-surface-subtle: var(--kv-surface-raised);
|
|
28
|
-
--kv-color-surface-hover: var(--kv-surface-hover);
|
|
29
|
-
--kv-color-line: var(--kv-panel-border);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
[data-kv-design-system][data-presentation="grouped"] :is([data-ui="app-main"], [data-ui="modal-layer"]) {
|
|
33
|
-
color-scheme: light;
|
|
34
|
-
--kv-page-chrome-bg: var(--kv-page-bg);
|
|
35
|
-
color: var(--kv-text-main);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
[data-kv-design-system][data-presentation="grouped"] [data-ui="app-main"] {
|
|
39
|
-
--kv-page-padding-x: var(--kv-space-3);
|
|
40
|
-
background: var(--kv-page-bg);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[data-kv-design-system][data-presentation="grouped"]
|
|
44
|
-
:is([data-ui="list-page"], [data-ui="record-page"], [data-pattern="workspace"])
|
|
45
|
-
> :is([data-ui$="-context"], [data-ui$="-header"], [data-ui$="-navigation"], [data-ui$="-toolbar"]) {
|
|
46
|
-
padding-inline: var(--kv-page-padding-x);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@media (max-width: 42rem) {
|
|
50
|
-
[data-kv-design-system][data-presentation="grouped"]
|
|
51
|
-
:is([data-ui="list-page-body"], [data-ui="list-page-footer"]) {
|
|
52
|
-
margin-inline: var(--kv-page-padding-x);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
[data-kv-design-system][data-presentation="grouped"]
|
|
57
|
-
:is([data-ui="dashboard-page-body"], [data-ui="board-page-body"], [data-ui="record-page-body"]) {
|
|
58
|
-
padding: var(--kv-space-3) var(--kv-page-padding-x);
|
|
59
|
-
gap: var(--kv-space-2);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
[data-kv-design-system][data-presentation="grouped"]
|
|
63
|
-
:is([data-ui="dashboard-page-body"], [data-ui="board-page-body"], [data-ui="record-page-body"])
|
|
64
|
-
> [data-ui="stack"],
|
|
65
|
-
[data-kv-design-system][data-presentation="grouped"] [data-ui="app-main"] [data-ui="grid"],
|
|
66
|
-
[data-kv-design-system][data-presentation="grouped"]
|
|
67
|
-
[data-ui="section-body"]
|
|
68
|
-
> [data-ui="stack"]:has(> [data-ui="content-card"]) {
|
|
69
|
-
gap: var(--kv-space-2);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
[data-kv-design-system][data-presentation="grouped"]
|
|
73
|
-
:is([data-ui="surface"], [data-ui="metric"], [data-ui="content-card"]) {
|
|
74
|
-
padding: var(--kv-space-3);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
[data-kv-design-system][data-presentation="grouped"] [data-ui="surface-head"] {
|
|
78
|
-
padding: 0;
|
|
79
|
-
margin-bottom: var(--kv-space-3);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
[data-kv-design-system][data-presentation="grouped"] [data-ui="table-scroll"][data-framed="false"] {
|
|
83
|
-
width: auto;
|
|
84
|
-
margin-inline: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
[data-kv-design-system][data-presentation="grouped"]
|
|
88
|
-
[data-ui="surface"][data-padding="none"]
|
|
89
|
-
> [data-ui="surface-head"] {
|
|
90
|
-
padding: 0;
|
|
91
|
-
margin-bottom: var(--kv-space-3);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
[data-kv-design-system][data-presentation="grouped"] [data-ui="record-page-aside"] {
|
|
95
|
-
padding: var(--kv-space-3);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
[data-kv-design-system][data-presentation="grouped"] [data-ui="record-page-aside"] > [data-ui="stack"] {
|
|
99
|
-
gap: var(--kv-space-3);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
[data-kv-design-system][data-presentation="grouped"] [data-ui="record-page-aside"] {
|
|
103
|
-
background: var(--kv-panel-bg);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* The context column already owns its white background. */
|
|
107
|
-
[data-kv-design-system][data-presentation="grouped"] [data-ui="record-page-aside"] [data-ui="metric"] {
|
|
108
|
-
padding: 0;
|
|
109
|
-
min-height: 0;
|
|
110
|
-
border: 0;
|
|
111
|
-
border-radius: 0;
|
|
112
|
-
background: transparent;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
[data-kv-design-system][data-presentation="grouped"] [data-ui="surface"] [data-ui="disclosure"] {
|
|
116
|
-
border: 0;
|
|
117
|
-
border-radius: 0;
|
|
118
|
-
background: transparent;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
[data-kv-design-system][data-presentation="grouped"]
|
|
122
|
-
[data-ui="surface"]
|
|
123
|
-
:is([data-ui="disclosure-summary"], [data-ui="disclosure-body"]) {
|
|
124
|
-
padding-inline: 0;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
1
|
+
@import "./grouped/styles.css";
|
package/dist/layouts/index.d.ts
CHANGED
|
@@ -1,70 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Tone } from '../primitives/status.tsx';
|
|
3
|
-
export declare const HOOKS: readonly ['stack', 'inline', 'grid', 'surface', 'surface-head', 'surface-title', 'surface-actions', 'disclosure', 'disclosure-summary', 'disclosure-body', 'section', 'section-head', 'section-eyebrow', 'section-title', 'section-description', 'section-actions', 'section-body', 'content-card', 'card-head', 'card-title', 'card-summary', 'card-body', 'card-meta', 'card-actions', 'metric', 'metric-icon', 'metric-label', 'metric-value', 'metric-detail'];
|
|
4
|
-
export { AppShell, Page, PageHeader, RecordCanvas, RecordSection } from './shell.tsx';
|
|
5
|
-
export declare const Stack: (props: {
|
|
6
|
-
items: readonly JSXChild[];
|
|
7
|
-
gap?: 'compact' | 'default' | 'loose';
|
|
8
|
-
}) => TemplateResult;
|
|
9
|
-
export declare const Inline: (props: {
|
|
10
|
-
items: readonly JSXChild[];
|
|
11
|
-
}) => TemplateResult;
|
|
12
|
-
export declare const Grid: (props: {
|
|
13
|
-
items: readonly JSXChild[];
|
|
14
|
-
columns?: 2 | 3 | 4;
|
|
15
|
-
}) => TemplateResult;
|
|
16
|
-
export declare const Surface: (props: {
|
|
17
|
-
body: JSXChild;
|
|
18
|
-
title?: string;
|
|
19
|
-
actions?: JSXChild;
|
|
20
|
-
tone?: 'default' | 'subtle' | 'raised';
|
|
21
|
-
padding?: 'none' | 'compact' | 'default';
|
|
22
|
-
}) => TemplateResult;
|
|
23
|
-
/** Native, keyboard-accessible progressive disclosure for dense secondary detail. */
|
|
24
|
-
export declare const Disclosure: (props: {
|
|
25
|
-
summary: string;
|
|
26
|
-
body: JSXChild;
|
|
27
|
-
open?: boolean;
|
|
28
|
-
}) => TemplateResult;
|
|
29
|
-
export declare const Section: (props: {
|
|
30
|
-
title: string;
|
|
31
|
-
body: JSXChild;
|
|
32
|
-
description?: string | null;
|
|
33
|
-
eyebrow?: string | null;
|
|
34
|
-
actions?: JSXChild;
|
|
35
|
-
}) => TemplateResult;
|
|
36
|
-
export declare const ContentCard: (props: {
|
|
37
|
-
title: string;
|
|
38
|
-
summary?: string | null;
|
|
39
|
-
body?: JSXChild;
|
|
40
|
-
meta?: JSXChild;
|
|
41
|
-
actions?: JSXChild;
|
|
42
|
-
href?: string | null;
|
|
43
|
-
selected?: boolean;
|
|
44
|
-
}) => TemplateResult;
|
|
45
|
-
/**
|
|
46
|
-
* One number, with the context that makes it mean something.
|
|
47
|
-
*
|
|
48
|
-
* `tone` colours a dot beside the label and nothing else. The number itself stays
|
|
49
|
-
* in the page's ink: a KPI row is read by comparing figures, and four differently
|
|
50
|
-
* coloured figures are compared by colour instead. The dot is drawn only when a
|
|
51
|
-
* tone is passed, so a metric that has no state to report does not grow a grey
|
|
52
|
-
* bullet that means nothing.
|
|
53
|
-
*
|
|
54
|
-
* `href` makes the whole card the link rather than the label, because the card is
|
|
55
|
-
* what the pointer is already over. There is nothing else inside a metric to
|
|
56
|
-
* click, which is exactly why `ContentCard` does the opposite.
|
|
57
|
-
*/
|
|
58
|
-
export declare const Metric: (props: {
|
|
59
|
-
label: string;
|
|
60
|
-
value: string | number;
|
|
61
|
-
detail?: string | null;
|
|
62
|
-
tone?: Tone;
|
|
63
|
-
/**
|
|
64
|
-
* A glyph naming the quantity, in a tile beside it. Decorative: the label is
|
|
65
|
-
* the name of the number, so this is hidden from assistive technology.
|
|
66
|
-
*/
|
|
67
|
-
icon?: JSXChild;
|
|
68
|
-
href?: string | null;
|
|
69
|
-
}) => TemplateResult;
|
|
1
|
+
export * from './layout/index.tsx';
|
|
70
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/design-system/src/layouts/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/design-system/src/layouts/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
package/dist/layouts/index.js
CHANGED
|
@@ -1,69 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { each } from '@ketvietlab/ketjs-view';
|
|
3
|
-
export const HOOKS = [
|
|
4
|
-
'stack',
|
|
5
|
-
'inline',
|
|
6
|
-
'grid',
|
|
7
|
-
'surface',
|
|
8
|
-
'surface-head',
|
|
9
|
-
'surface-title',
|
|
10
|
-
'surface-actions',
|
|
11
|
-
'disclosure',
|
|
12
|
-
'disclosure-summary',
|
|
13
|
-
'disclosure-body',
|
|
14
|
-
'section',
|
|
15
|
-
'section-head',
|
|
16
|
-
'section-eyebrow',
|
|
17
|
-
'section-title',
|
|
18
|
-
'section-description',
|
|
19
|
-
'section-actions',
|
|
20
|
-
'section-body',
|
|
21
|
-
'content-card',
|
|
22
|
-
'card-head',
|
|
23
|
-
'card-title',
|
|
24
|
-
'card-summary',
|
|
25
|
-
'card-body',
|
|
26
|
-
'card-meta',
|
|
27
|
-
'card-actions',
|
|
28
|
-
'metric',
|
|
29
|
-
'metric-icon',
|
|
30
|
-
'metric-label',
|
|
31
|
-
'metric-value',
|
|
32
|
-
'metric-detail',
|
|
33
|
-
];
|
|
34
|
-
export { AppShell, Page, PageHeader, RecordCanvas, RecordSection } from './shell.js';
|
|
35
|
-
const Items = (props) => (_jsx(_Fragment, { children: each(props.items, (_, index) => index, (item) => (typeof item === 'string' || typeof item === 'number' ? _jsx("span", { children: item }) : _jsx(_Fragment, { children: item }))) }));
|
|
36
|
-
export const Stack = (props) => (_jsx("div", { "data-ui": "stack", "data-gap": props.gap ?? 'default', children: _jsx(Items, { items: props.items }) }));
|
|
37
|
-
export const Inline = (props) => (_jsx("div", { "data-ui": "inline", children: _jsx(Items, { items: props.items }) }));
|
|
38
|
-
export const Grid = (props) => (_jsx("div", { "data-ui": "grid", "data-columns": String(props.columns ?? 3), children: _jsx(Items, { items: props.items }) }));
|
|
39
|
-
export const Surface = (props) => (_jsxs("div", { "data-ui": "surface", "data-tone": props.tone ?? 'default', "data-padding": props.padding ?? 'default', "data-has-heading": props.title ? 'true' : null, children: [props.title && (_jsxs("header", { "data-ui": "surface-head", children: [_jsx("h2", { "data-ui": "surface-title", children: props.title }), props.actions !== undefined && _jsx("div", { "data-ui": "surface-actions", children: props.actions })] })), props.body] }));
|
|
40
|
-
/** Native, keyboard-accessible progressive disclosure for dense secondary detail. */
|
|
41
|
-
export const Disclosure = (props) => (_jsxs("details", { "data-ui": "disclosure", open: props.open === true ? true : undefined, children: [_jsx("summary", { "data-ui": "disclosure-summary", children: props.summary }), _jsx("div", { "data-ui": "disclosure-body", children: props.body })] }));
|
|
42
|
-
export const Section = (props) => (_jsxs("section", { "data-ui": "section", children: [_jsxs("header", { "data-ui": "section-head", children: [_jsxs("div", { children: [!!props.eyebrow && _jsx("p", { "data-ui": "section-eyebrow", children: props.eyebrow }), _jsx("h2", { "data-ui": "section-title", children: props.title }), !!props.description && _jsx("p", { "data-ui": "section-description", children: props.description })] }), props.actions !== undefined && _jsx("div", { "data-ui": "section-actions", children: props.actions })] }), _jsx("div", { "data-ui": "section-body", children: props.body })] }));
|
|
43
|
-
export const ContentCard = (props) => (_jsxs("article", { "data-ui": "content-card", "data-interactive": String(!!props.href), "data-selected": String(props.selected === true), children: [_jsxs("header", { "data-ui": "card-head", children: [_jsx("h3", { "data-ui": "card-title", children: props.href ? _jsx("a", { href: props.href, children: props.title }) : props.title }), !!props.summary && _jsx("p", { "data-ui": "card-summary", children: props.summary })] }), props.body !== undefined && _jsx("div", { "data-ui": "card-body", children: props.body }), props.meta !== undefined && _jsx("div", { "data-ui": "card-meta", children: props.meta }), props.actions !== undefined && _jsx("div", { "data-ui": "card-actions", children: props.actions })] }));
|
|
44
|
-
/**
|
|
45
|
-
* One number, with the context that makes it mean something.
|
|
46
|
-
*
|
|
47
|
-
* `tone` colours a dot beside the label and nothing else. The number itself stays
|
|
48
|
-
* in the page's ink: a KPI row is read by comparing figures, and four differently
|
|
49
|
-
* coloured figures are compared by colour instead. The dot is drawn only when a
|
|
50
|
-
* tone is passed, so a metric that has no state to report does not grow a grey
|
|
51
|
-
* bullet that means nothing.
|
|
52
|
-
*
|
|
53
|
-
* `href` makes the whole card the link rather than the label, because the card is
|
|
54
|
-
* what the pointer is already over. There is nothing else inside a metric to
|
|
55
|
-
* click, which is exactly why `ContentCard` does the opposite.
|
|
56
|
-
*/
|
|
57
|
-
export const Metric = (props) => {
|
|
58
|
-
const attributes = {
|
|
59
|
-
'data-ui': 'metric',
|
|
60
|
-
'data-tone': props.tone ?? 'neutral',
|
|
61
|
-
// One marker to a card, never two. The dot reports state for a metric that
|
|
62
|
-
// has no glyph; where there is a glyph, the glyph is already the thing the
|
|
63
|
-
// eye lands on, and a coloured bullet beside the label competes with it.
|
|
64
|
-
'data-dot': String(props.tone !== undefined && props.icon === undefined),
|
|
65
|
-
};
|
|
66
|
-
const body = (_jsxs(_Fragment, { children: [props.icon !== undefined && (_jsx("span", { "data-ui": "metric-icon", "aria-hidden": "true", children: props.icon })), _jsx("p", { "data-ui": "metric-label", children: props.label }), _jsx("p", { "data-ui": "metric-value", children: String(props.value) }), !!props.detail && _jsx("p", { "data-ui": "metric-detail", children: props.detail })] }));
|
|
67
|
-
return props.href ? (_jsx("a", { ...attributes, "data-interactive": "true", href: props.href, children: body })) : (_jsx("article", { ...attributes, "data-interactive": "false", children: body }));
|
|
68
|
-
};
|
|
1
|
+
export * from './layout/index.js';
|
|
69
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/design-system/src/layouts/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/design-system/src/layouts/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAoB,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { JSXChild, TemplateResult } from '@ketvietlab/ketjs-view';
|
|
2
|
+
import type { Tone } from '../../primitives/status.tsx';
|
|
3
|
+
export declare const HOOKS: readonly ['stack', 'inline', 'grid', 'surface', 'surface-head', 'surface-title', 'surface-actions', 'disclosure', 'disclosure-summary', 'disclosure-body', 'section', 'section-head', 'section-eyebrow', 'section-title', 'section-description', 'section-actions', 'section-body', 'content-card', 'card-head', 'card-title', 'card-summary', 'card-body', 'card-meta', 'card-actions', 'metric', 'metric-icon', 'metric-label', 'metric-value', 'metric-detail'];
|
|
4
|
+
export { AppShell, Page, PageHeader, RecordCanvas, RecordSection } from '../shell.tsx';
|
|
5
|
+
export declare const Stack: (props: {
|
|
6
|
+
items: readonly JSXChild[];
|
|
7
|
+
gap?: 'compact' | 'default' | 'loose';
|
|
8
|
+
}) => TemplateResult;
|
|
9
|
+
export declare const Inline: (props: {
|
|
10
|
+
items: readonly JSXChild[];
|
|
11
|
+
}) => TemplateResult;
|
|
12
|
+
export declare const Grid: (props: {
|
|
13
|
+
items: readonly JSXChild[];
|
|
14
|
+
columns?: 2 | 3 | 4;
|
|
15
|
+
}) => TemplateResult;
|
|
16
|
+
export declare const Surface: (props: {
|
|
17
|
+
body: JSXChild;
|
|
18
|
+
title?: string;
|
|
19
|
+
actions?: JSXChild;
|
|
20
|
+
tone?: 'default' | 'subtle' | 'raised';
|
|
21
|
+
padding?: 'none' | 'compact' | 'default';
|
|
22
|
+
}) => TemplateResult;
|
|
23
|
+
/** Native, keyboard-accessible progressive disclosure for dense secondary detail. */
|
|
24
|
+
export declare const Disclosure: (props: {
|
|
25
|
+
summary: string;
|
|
26
|
+
body: JSXChild;
|
|
27
|
+
open?: boolean;
|
|
28
|
+
}) => TemplateResult;
|
|
29
|
+
export declare const Section: (props: {
|
|
30
|
+
title: string;
|
|
31
|
+
body: JSXChild;
|
|
32
|
+
description?: string | null;
|
|
33
|
+
eyebrow?: string | null;
|
|
34
|
+
actions?: JSXChild;
|
|
35
|
+
}) => TemplateResult;
|
|
36
|
+
export declare const ContentCard: (props: {
|
|
37
|
+
title: string;
|
|
38
|
+
summary?: string | null;
|
|
39
|
+
body?: JSXChild;
|
|
40
|
+
meta?: JSXChild;
|
|
41
|
+
actions?: JSXChild;
|
|
42
|
+
href?: string | null;
|
|
43
|
+
selected?: boolean;
|
|
44
|
+
}) => TemplateResult;
|
|
45
|
+
/**
|
|
46
|
+
* One number, with the context that makes it mean something.
|
|
47
|
+
*
|
|
48
|
+
* `tone` colours a dot beside the label and nothing else. The number itself stays
|
|
49
|
+
* in the page's ink: a KPI row is read by comparing figures, and four differently
|
|
50
|
+
* coloured figures are compared by colour instead. The dot is drawn only when a
|
|
51
|
+
* tone is passed, so a metric that has no state to report does not grow a grey
|
|
52
|
+
* bullet that means nothing.
|
|
53
|
+
*
|
|
54
|
+
* `href` makes the whole card the link rather than the label, because the card is
|
|
55
|
+
* what the pointer is already over. There is nothing else inside a metric to
|
|
56
|
+
* click, which is exactly why `ContentCard` does the opposite.
|
|
57
|
+
*/
|
|
58
|
+
export declare const Metric: (props: {
|
|
59
|
+
label: string;
|
|
60
|
+
value: string | number;
|
|
61
|
+
detail?: string | null;
|
|
62
|
+
tone?: Tone;
|
|
63
|
+
/**
|
|
64
|
+
* A glyph naming the quantity, in a tile beside it. Decorative: the label is
|
|
65
|
+
* the name of the number, so this is hidden from assistive technology.
|
|
66
|
+
*/
|
|
67
|
+
icon?: JSXChild;
|
|
68
|
+
href?: string | null;
|
|
69
|
+
}) => TemplateResult;
|
|
70
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/design-system/src/layouts/layout/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAEvD,eAAO,MAAM,KAAK,YAChB,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAS,EACT,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,cAAc,EACd,QAAQ,EACR,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,CACP,CAAA;AAEV,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAatF,eAAO,MAAM,KAAK,UAAW;IAC3B,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAA;IAC1B,GAAG,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;CACtC,KAAG,cAIH,CAAA;AAED,eAAO,MAAM,MAAM,UAAW;IAAE,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAA;CAAE,KAAG,cAI9D,CAAA;AAED,eAAO,MAAM,IAA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,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,KAAG,cA8BH,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
export const HOOKS = [
|
|
4
|
+
'stack',
|
|
5
|
+
'inline',
|
|
6
|
+
'grid',
|
|
7
|
+
'surface',
|
|
8
|
+
'surface-head',
|
|
9
|
+
'surface-title',
|
|
10
|
+
'surface-actions',
|
|
11
|
+
'disclosure',
|
|
12
|
+
'disclosure-summary',
|
|
13
|
+
'disclosure-body',
|
|
14
|
+
'section',
|
|
15
|
+
'section-head',
|
|
16
|
+
'section-eyebrow',
|
|
17
|
+
'section-title',
|
|
18
|
+
'section-description',
|
|
19
|
+
'section-actions',
|
|
20
|
+
'section-body',
|
|
21
|
+
'content-card',
|
|
22
|
+
'card-head',
|
|
23
|
+
'card-title',
|
|
24
|
+
'card-summary',
|
|
25
|
+
'card-body',
|
|
26
|
+
'card-meta',
|
|
27
|
+
'card-actions',
|
|
28
|
+
'metric',
|
|
29
|
+
'metric-icon',
|
|
30
|
+
'metric-label',
|
|
31
|
+
'metric-value',
|
|
32
|
+
'metric-detail',
|
|
33
|
+
];
|
|
34
|
+
export { AppShell, Page, PageHeader, RecordCanvas, RecordSection } from '../shell.js';
|
|
35
|
+
const Items = (props) => (_jsx(_Fragment, { children: each(props.items, (_, index) => index,
|
|
36
|
+
// biome-ignore lint/complexity/noUselessFragments: `each` requires a TemplateResult callback.
|
|
37
|
+
(item) => (typeof item === 'string' || typeof item === 'number' ? _jsx("span", { children: item }) : _jsx(_Fragment, { children: item }))) }));
|
|
38
|
+
export const Stack = (props) => (_jsx("div", { "data-ui": "stack", "data-gap": props.gap ?? 'default', children: _jsx(Items, { items: props.items }) }));
|
|
39
|
+
export const Inline = (props) => (_jsx("div", { "data-ui": "inline", children: _jsx(Items, { items: props.items }) }));
|
|
40
|
+
export const Grid = (props) => (_jsx("div", { "data-ui": "grid", "data-columns": String(props.columns ?? 3), children: _jsx(Items, { items: props.items }) }));
|
|
41
|
+
export const Surface = (props) => (_jsxs("div", { "data-ui": "surface", "data-tone": props.tone ?? 'default', "data-padding": props.padding ?? 'default', "data-has-heading": props.title ? 'true' : null, children: [props.title && (_jsxs("header", { "data-ui": "surface-head", children: [_jsx("h2", { "data-ui": "surface-title", children: props.title }), props.actions !== undefined && _jsx("div", { "data-ui": "surface-actions", children: props.actions })] })), props.body] }));
|
|
42
|
+
/** Native, keyboard-accessible progressive disclosure for dense secondary detail. */
|
|
43
|
+
export const Disclosure = (props) => (_jsxs("details", { "data-ui": "disclosure", open: props.open === true ? true : undefined, children: [_jsx("summary", { "data-ui": "disclosure-summary", children: props.summary }), _jsx("div", { "data-ui": "disclosure-body", children: props.body })] }));
|
|
44
|
+
export const Section = (props) => (_jsxs("section", { "data-ui": "section", children: [_jsxs("header", { "data-ui": "section-head", children: [_jsxs("div", { children: [!!props.eyebrow && _jsx("p", { "data-ui": "section-eyebrow", children: props.eyebrow }), _jsx("h2", { "data-ui": "section-title", children: props.title }), !!props.description && _jsx("p", { "data-ui": "section-description", children: props.description })] }), props.actions !== undefined && _jsx("div", { "data-ui": "section-actions", children: props.actions })] }), _jsx("div", { "data-ui": "section-body", children: props.body })] }));
|
|
45
|
+
export const ContentCard = (props) => (_jsxs("article", { "data-ui": "content-card", "data-interactive": String(!!props.href), "data-selected": String(props.selected === true), children: [_jsxs("header", { "data-ui": "card-head", children: [_jsx("h3", { "data-ui": "card-title", children: props.href ? _jsx("a", { href: props.href, children: props.title }) : props.title }), !!props.summary && _jsx("p", { "data-ui": "card-summary", children: props.summary })] }), props.body !== undefined && _jsx("div", { "data-ui": "card-body", children: props.body }), props.meta !== undefined && _jsx("div", { "data-ui": "card-meta", children: props.meta }), props.actions !== undefined && _jsx("div", { "data-ui": "card-actions", children: props.actions })] }));
|
|
46
|
+
/**
|
|
47
|
+
* One number, with the context that makes it mean something.
|
|
48
|
+
*
|
|
49
|
+
* `tone` colours a dot beside the label and nothing else. The number itself stays
|
|
50
|
+
* in the page's ink: a KPI row is read by comparing figures, and four differently
|
|
51
|
+
* coloured figures are compared by colour instead. The dot is drawn only when a
|
|
52
|
+
* tone is passed, so a metric that has no state to report does not grow a grey
|
|
53
|
+
* bullet that means nothing.
|
|
54
|
+
*
|
|
55
|
+
* `href` makes the whole card the link rather than the label, because the card is
|
|
56
|
+
* what the pointer is already over. There is nothing else inside a metric to
|
|
57
|
+
* click, which is exactly why `ContentCard` does the opposite.
|
|
58
|
+
*/
|
|
59
|
+
export const Metric = (props) => {
|
|
60
|
+
const attributes = {
|
|
61
|
+
'data-ui': 'metric',
|
|
62
|
+
'data-tone': props.tone ?? 'neutral',
|
|
63
|
+
// One marker to a card, never two. The dot reports state for a metric that
|
|
64
|
+
// has no glyph; where there is a glyph, the glyph is already the thing the
|
|
65
|
+
// eye lands on, and a coloured bullet beside the label competes with it.
|
|
66
|
+
'data-dot': String(props.tone !== undefined && props.icon === undefined),
|
|
67
|
+
};
|
|
68
|
+
const body = (_jsxs(_Fragment, { children: [props.icon !== undefined && (_jsx("span", { "data-ui": "metric-icon", "aria-hidden": "true", children: props.icon })), _jsx("p", { "data-ui": "metric-label", children: props.label }), _jsx("p", { "data-ui": "metric-value", children: String(props.value) }), !!props.detail && _jsx("p", { "data-ui": "metric-detail", children: props.detail })] }));
|
|
69
|
+
return props.href ? (_jsx("a", { ...attributes, "data-interactive": "true", href: props.href, children: body })) : (_jsx("article", { ...attributes, "data-interactive": "false", children: body }));
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/design-system/src/layouts/layout/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAI7C,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,OAAO;IACP,QAAQ;IACR,MAAM;IACN,SAAS;IACT,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,YAAY;IACZ,oBAAoB;IACpB,iBAAiB;IACjB,SAAS;IACT,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,qBAAqB;IACrB,iBAAiB;IACjB,cAAc;IACd,cAAc;IACd,WAAW;IACX,YAAY;IACZ,cAAc;IACd,WAAW;IACX,WAAW;IACX,cAAc;IACd,QAAQ;IACR,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;CACP,CAAA;AAEV,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAc,CAAA;AAEtF,MAAM,KAAK,GAAG,CAAC,KAAqC,EAAkB,EAAE,CAAC,CACvE,4BACG,IAAI,CACH,KAAK,CAAC,KAAK,EACX,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK;IACnB,8FAA8F;IAC9F,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,yBAAO,IAAI,GAAQ,CAAC,CAAC,CAAC,4BAAG,IAAI,GAAI,CAAC,CACrG,GACA,CACJ,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAGrB,EAAkB,EAAE,CAAC,CACpB,yBAAa,OAAO,cAAW,KAAK,CAAC,GAAG,IAAI,SAAS,YACnD,KAAC,KAAK,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,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