@revenexx/studio-shared 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/module.d.mts +6 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +12 -1
  4. package/dist/runtime/components/Dashboard/DashboardConfirmDialog.d.vue.ts +16 -0
  5. package/dist/runtime/components/Dashboard/DashboardConfirmDialog.vue +39 -0
  6. package/dist/runtime/components/Dashboard/DashboardConfirmDialog.vue.d.ts +16 -0
  7. package/dist/runtime/components/Dashboard/DashboardControls.d.vue.ts +58 -0
  8. package/dist/runtime/components/Dashboard/DashboardControls.vue +209 -0
  9. package/dist/runtime/components/Dashboard/DashboardControls.vue.d.ts +58 -0
  10. package/dist/runtime/components/Dashboard/DashboardGrid.d.vue.ts +17 -0
  11. package/dist/runtime/components/Dashboard/DashboardGrid.vue +87 -0
  12. package/dist/runtime/components/Dashboard/DashboardGrid.vue.d.ts +17 -0
  13. package/dist/runtime/components/Dashboard/DashboardNameDialog.d.vue.ts +19 -0
  14. package/dist/runtime/components/Dashboard/DashboardNameDialog.vue +61 -0
  15. package/dist/runtime/components/Dashboard/DashboardNameDialog.vue.d.ts +19 -0
  16. package/dist/runtime/components/Dashboard/DashboardPickerDialog.d.vue.ts +15 -0
  17. package/dist/runtime/components/Dashboard/DashboardPickerDialog.vue +100 -0
  18. package/dist/runtime/components/Dashboard/DashboardPickerDialog.vue.d.ts +15 -0
  19. package/dist/runtime/components/Dashboard/DashboardShareDialog.d.vue.ts +28 -0
  20. package/dist/runtime/components/Dashboard/DashboardShareDialog.vue +155 -0
  21. package/dist/runtime/components/Dashboard/DashboardShareDialog.vue.d.ts +28 -0
  22. package/dist/runtime/components/Dashboard/DashboardTopBar.d.vue.ts +64 -0
  23. package/dist/runtime/components/Dashboard/DashboardTopBar.vue +79 -0
  24. package/dist/runtime/components/Dashboard/DashboardTopBar.vue.d.ts +64 -0
  25. package/dist/runtime/components/Dashboard/DashboardWidgetConfigDialog.d.vue.ts +44 -0
  26. package/dist/runtime/components/Dashboard/DashboardWidgetConfigDialog.vue +153 -0
  27. package/dist/runtime/components/Dashboard/DashboardWidgetConfigDialog.vue.d.ts +44 -0
  28. package/dist/runtime/components/Dashboard/DashboardWidgetFrame.d.vue.ts +28 -0
  29. package/dist/runtime/components/Dashboard/DashboardWidgetFrame.vue +80 -0
  30. package/dist/runtime/components/Dashboard/DashboardWidgetFrame.vue.d.ts +28 -0
  31. package/dist/runtime/components/Dashboard/DashboardWidgetHost.d.vue.ts +7 -0
  32. package/dist/runtime/components/Dashboard/DashboardWidgetHost.vue +30 -0
  33. package/dist/runtime/components/Dashboard/DashboardWidgetHost.vue.d.ts +7 -0
  34. package/dist/runtime/components/Dashboard/DashboardWidgetIcon.d.vue.ts +9 -0
  35. package/dist/runtime/components/Dashboard/DashboardWidgetIcon.vue +13 -0
  36. package/dist/runtime/components/Dashboard/DashboardWidgetIcon.vue.d.ts +9 -0
  37. package/dist/runtime/components/Dashboard/DashboardWidgetLibrary.d.vue.ts +24 -0
  38. package/dist/runtime/components/Dashboard/DashboardWidgetLibrary.vue +140 -0
  39. package/dist/runtime/components/Dashboard/DashboardWidgetLibrary.vue.d.ts +24 -0
  40. package/dist/runtime/components/Dashboard/DashboardWidgetPreview.d.vue.ts +23 -0
  41. package/dist/runtime/components/Dashboard/DashboardWidgetPreview.vue +124 -0
  42. package/dist/runtime/components/Dashboard/DashboardWidgetPreview.vue.d.ts +23 -0
  43. package/dist/runtime/components/DataTable/ColumnsMenu.d.vue.ts +2 -1
  44. package/dist/runtime/components/DataTable/ColumnsMenu.vue.d.ts +2 -1
  45. package/dist/runtime/components/DataTable/DataTable.d.vue.ts +105 -28
  46. package/dist/runtime/components/DataTable/DataTable.vue +403 -38
  47. package/dist/runtime/components/DataTable/DataTable.vue.d.ts +105 -28
  48. package/dist/runtime/components/DataTable/FacetChips.d.vue.ts +17 -0
  49. package/dist/runtime/components/DataTable/FacetChips.vue +72 -0
  50. package/dist/runtime/components/DataTable/FacetChips.vue.d.ts +17 -0
  51. package/dist/runtime/components/DataTable/FacetPanel.d.vue.ts +21 -0
  52. package/dist/runtime/components/DataTable/FacetPanel.vue +359 -0
  53. package/dist/runtime/components/DataTable/FacetPanel.vue.d.ts +21 -0
  54. package/dist/runtime/components/DataTable/FilterMenu.d.vue.ts +6 -5
  55. package/dist/runtime/components/DataTable/FilterMenu.vue.d.ts +6 -5
  56. package/dist/runtime/components/DataTable/SavedViewsMenu.d.vue.ts +6 -1
  57. package/dist/runtime/components/DataTable/SavedViewsMenu.vue +83 -63
  58. package/dist/runtime/components/DataTable/SavedViewsMenu.vue.d.ts +6 -1
  59. package/dist/runtime/components/DataTable/SortMenu.d.vue.ts +9 -3
  60. package/dist/runtime/components/DataTable/SortMenu.vue +40 -12
  61. package/dist/runtime/components/DataTable/SortMenu.vue.d.ts +9 -3
  62. package/dist/runtime/components/DataTable/ViewModeSwitch.d.vue.ts +4 -2
  63. package/dist/runtime/components/DataTable/ViewModeSwitch.vue.d.ts +4 -2
  64. package/dist/runtime/components/Form/FieldCell.d.vue.ts +32 -0
  65. package/dist/runtime/components/Form/FieldCell.vue +46 -0
  66. package/dist/runtime/components/Form/FieldCell.vue.d.ts +32 -0
  67. package/dist/runtime/components/Form/FieldGrid.d.vue.ts +13 -0
  68. package/dist/runtime/components/Form/FieldGrid.vue +11 -0
  69. package/dist/runtime/components/Form/FieldGrid.vue.d.ts +13 -0
  70. package/dist/runtime/components/Form/FormContextCard.d.vue.ts +33 -0
  71. package/dist/runtime/components/Form/FormContextCard.vue +56 -0
  72. package/dist/runtime/components/Form/FormContextCard.vue.d.ts +33 -0
  73. package/dist/runtime/components/Form/FormLayout.d.vue.ts +47 -0
  74. package/dist/runtime/components/Form/FormLayout.vue +169 -0
  75. package/dist/runtime/components/Form/FormLayout.vue.d.ts +47 -0
  76. package/dist/runtime/components/Form/FormSection.d.vue.ts +25 -0
  77. package/dist/runtime/components/Form/FormSection.vue +48 -0
  78. package/dist/runtime/components/Form/FormSection.vue.d.ts +25 -0
  79. package/dist/runtime/components/Form/SaveBar.d.vue.ts +44 -0
  80. package/dist/runtime/components/Form/SaveBar.vue +71 -0
  81. package/dist/runtime/components/Form/SaveBar.vue.d.ts +44 -0
  82. package/dist/runtime/components/Media/MediaFolderTree.d.vue.ts +2 -1
  83. package/dist/runtime/components/Media/MediaFolderTree.vue.d.ts +2 -1
  84. package/dist/runtime/components/Media/MediaPickerDialog.d.vue.ts +4 -3
  85. package/dist/runtime/components/Media/MediaPickerDialog.vue.d.ts +4 -3
  86. package/dist/runtime/components/Media/MediaUploader.d.vue.ts +4 -3
  87. package/dist/runtime/components/Media/MediaUploader.vue.d.ts +4 -3
  88. package/dist/runtime/components/Shared/AppIcon.d.vue.ts +21 -0
  89. package/dist/runtime/components/Shared/AppIcon.vue +47 -0
  90. package/dist/runtime/components/Shared/AppIcon.vue.d.ts +21 -0
  91. package/dist/runtime/components/Shared/BuildLogsFlyout.d.vue.ts +2 -1
  92. package/dist/runtime/components/Shared/BuildLogsFlyout.vue.d.ts +2 -1
  93. package/dist/runtime/components/Shared/DetailSheet.d.vue.ts +60 -0
  94. package/dist/runtime/components/Shared/DetailSheet.vue +207 -0
  95. package/dist/runtime/components/Shared/DetailSheet.vue.d.ts +60 -0
  96. package/dist/runtime/components/Shared/FloatingPanel.d.vue.ts +7 -6
  97. package/dist/runtime/components/Shared/FloatingPanel.vue.d.ts +7 -6
  98. package/dist/runtime/components/Shared/GitDeploymentSettings.d.vue.ts +2 -1
  99. package/dist/runtime/components/Shared/GitDeploymentSettings.vue.d.ts +2 -1
  100. package/dist/runtime/components/Shared/KpiTile.d.vue.ts +2 -1
  101. package/dist/runtime/components/Shared/KpiTile.vue.d.ts +2 -1
  102. package/dist/runtime/components/Shared/ListSurface.d.vue.ts +3 -2
  103. package/dist/runtime/components/Shared/ListSurface.vue.d.ts +3 -2
  104. package/dist/runtime/components/Shared/PageHeader.d.vue.ts +7 -6
  105. package/dist/runtime/components/Shared/PageHeader.vue.d.ts +7 -6
  106. package/dist/runtime/components/Shared/RecordLayout.d.vue.ts +8 -7
  107. package/dist/runtime/components/Shared/RecordLayout.vue.d.ts +8 -7
  108. package/dist/runtime/components/Shared/RecordRailCard.d.vue.ts +3 -2
  109. package/dist/runtime/components/Shared/RecordRailCard.vue.d.ts +3 -2
  110. package/dist/runtime/components/Shared/SidebarNav.d.vue.ts +3 -2
  111. package/dist/runtime/components/Shared/SidebarNav.vue.d.ts +3 -2
  112. package/dist/runtime/components/Shared/SidebarNavLink.d.vue.ts +2 -1
  113. package/dist/runtime/components/Shared/SidebarNavLink.vue.d.ts +2 -1
  114. package/dist/runtime/components/Shared/SortHeader.d.vue.ts +3 -2
  115. package/dist/runtime/components/Shared/SortHeader.vue +6 -2
  116. package/dist/runtime/components/Shared/SortHeader.vue.d.ts +3 -2
  117. package/dist/runtime/components/Shared/StateCard.d.vue.ts +6 -5
  118. package/dist/runtime/components/Shared/StateCard.vue.d.ts +6 -5
  119. package/dist/runtime/components/Shared/StudioCard.d.vue.ts +5 -4
  120. package/dist/runtime/components/Shared/StudioCard.vue.d.ts +5 -4
  121. package/dist/runtime/components/Shared/TabBar.d.vue.ts +9 -10
  122. package/dist/runtime/components/Shared/TabBar.vue +26 -7
  123. package/dist/runtime/components/Shared/TabBar.vue.d.ts +9 -10
  124. package/dist/runtime/components/Shared/ViewTab.d.vue.ts +2 -1
  125. package/dist/runtime/components/Shared/ViewTab.vue.d.ts +2 -1
  126. package/dist/runtime/components/Shared/Wizard.d.vue.ts +10 -7
  127. package/dist/runtime/components/Shared/Wizard.vue.d.ts +10 -7
  128. package/dist/runtime/composables/useDashboards.d.ts +27 -0
  129. package/dist/runtime/composables/useDashboards.js +143 -0
  130. package/dist/runtime/composables/useDetailSheet.d.ts +20 -0
  131. package/dist/runtime/composables/useDetailSheet.js +50 -0
  132. package/dist/runtime/composables/usePlatformTenant.d.ts +6 -0
  133. package/dist/runtime/composables/useSavedViews.d.ts +44 -0
  134. package/dist/runtime/composables/useSavedViews.js +44 -0
  135. package/dist/runtime/composables/useStickyListView.d.ts +60 -0
  136. package/dist/runtime/composables/useStickyListView.js +32 -0
  137. package/dist/runtime/lib/activeTenant.d.ts +58 -0
  138. package/dist/runtime/lib/activeTenant.js +45 -0
  139. package/dist/runtime/lib/appIcon.d.ts +48 -0
  140. package/dist/runtime/lib/appIcon.js +27 -0
  141. package/dist/runtime/lib/canonicalJson.d.ts +43 -0
  142. package/dist/runtime/lib/canonicalJson.js +38 -0
  143. package/dist/runtime/lib/dashboardIcons.d.ts +4 -0
  144. package/dist/runtime/lib/dashboardIcons.js +50 -0
  145. package/dist/runtime/lib/detailSheet.d.ts +43 -0
  146. package/dist/runtime/lib/detailSheet.js +34 -0
  147. package/dist/runtime/lib/facets.d.ts +200 -0
  148. package/dist/runtime/lib/facets.js +171 -0
  149. package/dist/runtime/lib/formLayout.d.ts +94 -0
  150. package/dist/runtime/lib/formLayout.js +70 -0
  151. package/dist/runtime/lib/formLayoutContext.d.ts +26 -0
  152. package/dist/runtime/lib/formLayoutContext.js +1 -0
  153. package/dist/runtime/lib/gridTracks.d.ts +55 -0
  154. package/dist/runtime/lib/gridTracks.js +29 -0
  155. package/dist/runtime/lib/rowMove.d.ts +38 -0
  156. package/dist/runtime/lib/rowMove.js +20 -0
  157. package/dist/runtime/lib/solarIconMap.d.ts +15 -0
  158. package/dist/runtime/lib/solarIconMap.js +280 -0
  159. package/dist/runtime/lib/solarIcons.d.ts +37 -0
  160. package/dist/runtime/lib/solarIcons.js +25 -0
  161. package/dist/runtime/lib/widgetRegistry.d.ts +124 -0
  162. package/dist/runtime/lib/widgetRegistry.js +66 -0
  163. package/dist/runtime/types/dashboard.d.ts +95 -0
  164. package/dist/runtime/types/dashboard.js +2 -0
  165. package/dist/types.d.mts +12 -0
  166. package/package.json +3 -2
@@ -1,6 +1,11 @@
1
1
  import type { DataTableSavedViews } from './types.js';
2
2
  type __VLS_Props = {
3
3
  config: DataTableSavedViews;
4
+ /** Matches the row it sits in; `sm` is the 32px square its neighbours are. */
5
+ size?: 'sm' | 'default';
4
6
  };
5
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
+ size: "sm" | "default";
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
6
11
  export default _default;
@@ -1,13 +1,19 @@
1
1
  import type { DataTableColumn, SortState } from './types.js';
2
2
  type __VLS_Props = {
3
3
  columns: DataTableColumn[];
4
+ /** Matches the row it sits in; `sm` is the 32px square its neighbours are. */
5
+ size?: 'sm' | 'default';
4
6
  };
5
- type __VLS_PublicProps = __VLS_Props & {
7
+ type __VLS_ModelProps = {
6
8
  modelValue: SortState;
7
9
  };
8
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
12
  "update:modelValue": (value: SortState) => any;
10
13
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
14
  "onUpdate:modelValue"?: ((value: SortState) => any) | undefined;
12
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ }>, {
16
+ size: "sm" | "default";
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
13
19
  export default _default;
@@ -1,22 +1,32 @@
1
1
  <script setup>
2
- import { AltArrowDown, SortVertical } from "#solar-icons";
2
+ import { CheckCircle, RoundSortVertical, SortFromBottomToTop, SortFromTopToBottom } from "#solar-icons";
3
3
  import {
4
4
  Button,
5
5
  DropdownMenu,
6
6
  DropdownMenuContent,
7
7
  DropdownMenuItem,
8
+ DropdownMenuLabel,
8
9
  DropdownMenuTrigger
9
10
  } from "@revenexx/studio";
10
11
  const props = defineProps({
11
- columns: { type: Array, required: true }
12
+ columns: { type: Array, required: true },
13
+ size: { type: String, required: false, default: "sm" }
12
14
  });
13
15
  const sort = defineModel({ type: Object, ...{ required: true } });
14
16
  const t = useT();
17
+ const sorted = computed(() => Boolean(sort.value.column && sort.value.direction));
18
+ const icon = computed(() => {
19
+ if (!sorted.value) return RoundSortVertical;
20
+ return sort.value.direction === "asc" ? SortFromBottomToTop : SortFromTopToBottom;
21
+ });
15
22
  const label = computed(() => {
16
23
  const col = props.columns.find((c) => c.key === sort.value.column);
17
- if (!col || !sort.value.direction) return t("shared.datatable.sortmenu.label.default");
24
+ if (!col || !sorted.value) return t("shared.datatable.sortmenu.label.default");
18
25
  return `${col.label} ${sort.value.direction === "asc" ? "\u2191" : "\u2193"}`;
19
26
  });
27
+ function isActive(key, direction) {
28
+ return sort.value.column === key && sort.value.direction === direction;
29
+ }
20
30
  function pick(key, direction) {
21
31
  sort.value = { column: key, direction };
22
32
  }
@@ -25,21 +35,39 @@ function pick(key, direction) {
25
35
  <template>
26
36
  <DropdownMenu>
27
37
  <DropdownMenuTrigger as-child>
28
- <Button variant="outline" size="sm" class="h-7 gap-1.5 text-sm" :aria-label="t('shared.datatable.sortmenu.aria')">
29
- <SortVertical :size="14" />
30
- {{ label }}
31
- <AltArrowDown :size="12" class="opacity-60" />
38
+ <Button
39
+ :variant="sorted ? 'default' : 'outline'"
40
+ :size="size === 'sm' ? 'icon-sm' : 'icon'"
41
+ :data-active="sorted"
42
+ :aria-label="t('shared.datatable.sortmenu.aria', { sort: label })"
43
+ :title="t('shared.datatable.sortmenu.aria', { sort: label })"
44
+ >
45
+ <!-- Violet while idle like the filter trigger and the column picker
46
+ beside it; on the filled face the icon takes the button's own
47
+ foreground, or it would be violet on violet. -->
48
+ <span class="flex shrink-0 items-center" :class="sorted ? '' : 'text-primary'">
49
+ <component :is="icon" weight="Linear" :class="size === 'sm' ? 'size-3.5' : 'size-4'" />
50
+ </span>
32
51
  </Button>
33
52
  </DropdownMenuTrigger>
34
- <DropdownMenuContent align="start" class="w-52">
53
+ <DropdownMenuContent align="start" class="w-56">
54
+ <DropdownMenuLabel>{{ t("shared.datatable.sortmenu.heading") }}</DropdownMenuLabel>
35
55
  <template v-for="col in columns" :key="col.key">
36
56
  <DropdownMenuItem class="gap-2" @select="pick(col.key, 'asc')">
37
- <span class="flex-1 truncate">{{ col.label }} ↑</span>
38
- <span v-if="sort.column === col.key && sort.direction === 'asc'" class="text-xs text-primary">{{ t("shared.datatable.sortmenu.active.badge") }}</span>
57
+ <SortFromBottomToTop weight="Linear" :size="13" class="shrink-0 text-muted-foreground" />
58
+ <span
59
+ class="min-w-0 flex-1 truncate"
60
+ :class="isActive(col.key, 'asc') ? 'font-medium text-primary' : ''"
61
+ >{{ col.label }}</span>
62
+ <CheckCircle v-if="isActive(col.key, 'asc')" :size="14" weight="Bold" class="shrink-0 text-primary" />
39
63
  </DropdownMenuItem>
40
64
  <DropdownMenuItem class="gap-2" @select="pick(col.key, 'desc')">
41
- <span class="flex-1 truncate">{{ col.label }} ↓</span>
42
- <span v-if="sort.column === col.key && sort.direction === 'desc'" class="text-xs text-primary">{{ t("shared.datatable.sortmenu.active.badge") }}</span>
65
+ <SortFromTopToBottom weight="Linear" :size="13" class="shrink-0 text-muted-foreground" />
66
+ <span
67
+ class="min-w-0 flex-1 truncate"
68
+ :class="isActive(col.key, 'desc') ? 'font-medium text-primary' : ''"
69
+ >{{ col.label }}</span>
70
+ <CheckCircle v-if="isActive(col.key, 'desc')" :size="14" weight="Bold" class="shrink-0 text-primary" />
43
71
  </DropdownMenuItem>
44
72
  </template>
45
73
  </DropdownMenuContent>
@@ -1,13 +1,19 @@
1
1
  import type { DataTableColumn, SortState } from './types.js';
2
2
  type __VLS_Props = {
3
3
  columns: DataTableColumn[];
4
+ /** Matches the row it sits in; `sm` is the 32px square its neighbours are. */
5
+ size?: 'sm' | 'default';
4
6
  };
5
- type __VLS_PublicProps = __VLS_Props & {
7
+ type __VLS_ModelProps = {
6
8
  modelValue: SortState;
7
9
  };
8
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
12
  "update:modelValue": (value: SortState) => any;
10
13
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
14
  "onUpdate:modelValue"?: ((value: SortState) => any) | undefined;
12
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ }>, {
16
+ size: "sm" | "default";
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
13
19
  export default _default;
@@ -9,12 +9,14 @@ import type { DataTableViewMode } from './types.js';
9
9
  type __VLS_Props = {
10
10
  modes: DataTableViewMode[];
11
11
  };
12
- type __VLS_PublicProps = __VLS_Props & {
12
+ type __VLS_ModelProps = {
13
13
  modelValue: string;
14
14
  };
15
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
16
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
17
  "update:modelValue": (value: string) => any;
17
18
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
19
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
19
20
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
20
22
  export default _default;
@@ -9,12 +9,14 @@ import type { DataTableViewMode } from './types.js';
9
9
  type __VLS_Props = {
10
10
  modes: DataTableViewMode[];
11
11
  };
12
- type __VLS_PublicProps = __VLS_Props & {
12
+ type __VLS_ModelProps = {
13
13
  modelValue: string;
14
14
  };
15
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
16
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
17
  "update:modelValue": (value: string) => any;
17
18
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
19
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
19
20
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
20
22
  export default _default;
@@ -0,0 +1,32 @@
1
+ import type { FieldSpan } from '../../lib/formLayout.js';
2
+ type __VLS_Props = {
3
+ span?: FieldSpan | 'auto';
4
+ /** Field type, for the default span when `span` is absent or `auto`. */
5
+ type?: string;
6
+ label?: string;
7
+ /** Id of the control the label is for. */
8
+ for?: string;
9
+ hint?: string;
10
+ error?: string | null;
11
+ required?: boolean;
12
+ };
13
+ declare var __VLS_1: {}, __VLS_9: {}, __VLS_11: {
14
+ id: string;
15
+ describedBy: string | undefined;
16
+ };
17
+ type __VLS_Slots = {} & {
18
+ label?: (props: typeof __VLS_1) => any;
19
+ } & {
20
+ 'label-extra'?: (props: typeof __VLS_9) => any;
21
+ } & {
22
+ default?: (props: typeof __VLS_11) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
28
+ type __VLS_WithSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,46 @@
1
+ <script setup>
2
+ import { Label } from "@revenexx/studio";
3
+ import { computed, useId } from "vue";
4
+ import { useT } from "../../composables/useT";
5
+ import { resolveSpan, spanClass } from "../../lib/formLayout";
6
+ const props = defineProps({
7
+ span: { type: String, required: false },
8
+ type: { type: String, required: false },
9
+ label: { type: String, required: false },
10
+ for: { type: String, required: false },
11
+ hint: { type: String, required: false },
12
+ error: { type: [String, null], required: false },
13
+ required: { type: Boolean, required: false }
14
+ });
15
+ const t = useT();
16
+ const uid = useId();
17
+ const cellClass = computed(() => spanClass(resolveSpan({ type: props.type, span: props.span })));
18
+ const controlId = computed(() => props.for ?? `${uid}-control`);
19
+ const hintId = computed(() => props.hint ? `${controlId.value}-hint` : void 0);
20
+ const errorId = computed(() => props.error ? `${controlId.value}-error` : void 0);
21
+ const describedBy = computed(() => [errorId.value, hintId.value].filter(Boolean).join(" ") || void 0);
22
+ </script>
23
+
24
+ <template>
25
+ <div class="min-w-0" :class="cellClass">
26
+ <div v-if="label || $slots.label" class="mb-1.5 flex items-center gap-1.5">
27
+ <slot name="label">
28
+ <Label :for="controlId" class="text-[12.5px] font-medium">
29
+ {{ label }}
30
+ <template v-if="required">
31
+ <span aria-hidden="true" class="text-rose-600">*</span>
32
+ <span class="sr-only">({{ t("shared.form.field.required") }})</span>
33
+ </template>
34
+ </Label>
35
+ </slot>
36
+ <slot name="label-extra" />
37
+ </div>
38
+ <slot :id="controlId" :described-by="describedBy" />
39
+ <p v-if="error" :id="errorId" class="mt-1 text-xs text-rose-700">
40
+ {{ error }}
41
+ </p>
42
+ <p v-if="hint" :id="hintId" class="mt-1 text-xs leading-snug text-muted-foreground">
43
+ {{ hint }}
44
+ </p>
45
+ </div>
46
+ </template>
@@ -0,0 +1,32 @@
1
+ import type { FieldSpan } from '../../lib/formLayout.js';
2
+ type __VLS_Props = {
3
+ span?: FieldSpan | 'auto';
4
+ /** Field type, for the default span when `span` is absent or `auto`. */
5
+ type?: string;
6
+ label?: string;
7
+ /** Id of the control the label is for. */
8
+ for?: string;
9
+ hint?: string;
10
+ error?: string | null;
11
+ required?: boolean;
12
+ };
13
+ declare var __VLS_1: {}, __VLS_9: {}, __VLS_11: {
14
+ id: string;
15
+ describedBy: string | undefined;
16
+ };
17
+ type __VLS_Slots = {} & {
18
+ label?: (props: typeof __VLS_1) => any;
19
+ } & {
20
+ 'label-extra'?: (props: typeof __VLS_9) => any;
21
+ } & {
22
+ default?: (props: typeof __VLS_11) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
28
+ type __VLS_WithSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,11 @@
1
+ <script setup>
2
+
3
+ </script>
4
+
5
+ <template>
6
+ <div class="@container">
7
+ <div class="grid grid-cols-1 gap-x-4 gap-y-3.5 @md:grid-cols-2">
8
+ <slot />
9
+ </div>
10
+ </div>
11
+ </template>
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,33 @@
1
+ import type { FormContextRow } from '../../lib/formLayout.js';
2
+ type __VLS_Props = {
3
+ title: string;
4
+ subtitle?: string;
5
+ /** Defaults to the title's initials. Empty string = no avatar. */
6
+ initials?: string;
7
+ rows?: FormContextRow[];
8
+ };
9
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {
10
+ row: FormContextRow;
11
+ }, __VLS_7: {}, __VLS_9: {};
12
+ type __VLS_Slots = {} & {
13
+ avatar?: (props: typeof __VLS_1) => any;
14
+ } & {
15
+ badges?: (props: typeof __VLS_3) => any;
16
+ } & {
17
+ value?: (props: typeof __VLS_5) => any;
18
+ } & {
19
+ default?: (props: typeof __VLS_7) => any;
20
+ } & {
21
+ footer?: (props: typeof __VLS_9) => any;
22
+ };
23
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
24
+ rows: FormContextRow[];
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,56 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { initialsOf } from "../../lib/formLayout";
4
+ const props = defineProps({
5
+ title: { type: String, required: true },
6
+ subtitle: { type: String, required: false },
7
+ initials: { type: String, required: false },
8
+ rows: { type: Array, required: false, default: () => [] }
9
+ });
10
+ const initialsText = computed(() => props.initials ?? initialsOf(props.title));
11
+ </script>
12
+
13
+ <template>
14
+ <div class="rounded-lg border border-black/[0.06] bg-white/70 p-4 backdrop-blur-sm">
15
+ <div class="flex items-center gap-3">
16
+ <slot name="avatar">
17
+ <span
18
+ v-if="initialsText"
19
+ aria-hidden="true"
20
+ class="flex size-11 shrink-0 items-center justify-center rounded-full bg-accent text-[15px] font-medium text-primary"
21
+ >{{ initialsText }}</span>
22
+ </slot>
23
+ <div class="min-w-0">
24
+ <p class="truncate text-[15px] font-medium text-[#0B0522]" :title="title">
25
+ {{ title }}
26
+ </p>
27
+ <p v-if="subtitle" class="truncate text-[12.5px] text-muted-foreground" :title="subtitle">
28
+ {{ subtitle }}
29
+ </p>
30
+ </div>
31
+ </div>
32
+
33
+ <div v-if="$slots.badges" class="mt-3 flex flex-wrap gap-1.5">
34
+ <slot name="badges" />
35
+ </div>
36
+
37
+ <dl v-if="rows.length" class="mt-4 space-y-2.5 text-[13px]">
38
+ <div v-for="row in rows" :key="row.key" class="flex items-baseline justify-between gap-3">
39
+ <dt class="shrink-0 text-muted-foreground">
40
+ {{ row.label }}
41
+ </dt>
42
+ <dd class="min-w-0 truncate text-right text-[#0B0522]">
43
+ <slot name="value" :row="row">
44
+ {{ row.value || row.value === 0 ? row.value : "\u2014" }}
45
+ </slot>
46
+ </dd>
47
+ </div>
48
+ </dl>
49
+
50
+ <slot />
51
+
52
+ <div v-if="$slots.footer" class="mt-2.5 border-t border-black/[0.06] pt-2.5 text-[13px]">
53
+ <slot name="footer" />
54
+ </div>
55
+ </div>
56
+ </template>
@@ -0,0 +1,33 @@
1
+ import type { FormContextRow } from '../../lib/formLayout.js';
2
+ type __VLS_Props = {
3
+ title: string;
4
+ subtitle?: string;
5
+ /** Defaults to the title's initials. Empty string = no avatar. */
6
+ initials?: string;
7
+ rows?: FormContextRow[];
8
+ };
9
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {
10
+ row: FormContextRow;
11
+ }, __VLS_7: {}, __VLS_9: {};
12
+ type __VLS_Slots = {} & {
13
+ avatar?: (props: typeof __VLS_1) => any;
14
+ } & {
15
+ badges?: (props: typeof __VLS_3) => any;
16
+ } & {
17
+ value?: (props: typeof __VLS_5) => any;
18
+ } & {
19
+ default?: (props: typeof __VLS_7) => any;
20
+ } & {
21
+ footer?: (props: typeof __VLS_9) => any;
22
+ };
23
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
24
+ rows: FormContextRow[];
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,47 @@
1
+ import type { FormSectionEntry } from '../../lib/formLayoutContext.js';
2
+ type __VLS_Props = {
3
+ /** `auto` = from three sections on. `false` hides it, `true` forces it from one. */
4
+ nav?: boolean | 'auto';
5
+ /** Draw the context column. Defaults to "when a `#context` slot is given". */
6
+ context?: boolean;
7
+ /**
8
+ * Height of the sticky page header in px. The nav and context column park
9
+ * under it, sections scroll to just below it. 57 = PageHeader without tabs.
10
+ */
11
+ stickyOffset?: number;
12
+ /** Accessible name of the navigation. Defaults to "Sections". */
13
+ navLabel?: string;
14
+ /** Accessible name of the context column. Defaults to "Summary". */
15
+ contextLabel?: string;
16
+ };
17
+ declare function goTo(id: string, event?: Event): void;
18
+ declare var __VLS_1: {
19
+ sections: FormSectionEntry[];
20
+ activeId: string | null;
21
+ goTo: typeof goTo;
22
+ }, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
23
+ type __VLS_Slots = {} & {
24
+ nav?: (props: typeof __VLS_1) => any;
25
+ } & {
26
+ default?: (props: typeof __VLS_3) => any;
27
+ } & {
28
+ context?: (props: typeof __VLS_5) => any;
29
+ } & {
30
+ savebar?: (props: typeof __VLS_7) => any;
31
+ };
32
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
33
+ activeId: import("vue").Ref<string | null, string | null>;
34
+ goTo: typeof goTo;
35
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
36
+ nav: boolean | "auto";
37
+ context: boolean;
38
+ stickyOffset: number;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
+ declare const _default: typeof __VLS_export;
42
+ export default _default;
43
+ type __VLS_WithSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };