@alfakit/vue 0.1.9 → 0.1.10

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 (122) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/app/components.d.ts.map +1 -1
  3. package/dist/app/components.js +1 -0
  4. package/dist/app/components.js.map +1 -1
  5. package/dist/components/dev-tools/DevToolsInspector.js.map +1 -1
  6. package/dist/components/dev-tools/DevToolsInspector.vue.d.ts.map +1 -1
  7. package/dist/components/dev-tools/DevToolsInspector.vue_vue_type_script_setup_true_lang.js +1 -1
  8. package/dist/components/dev-tools/DevToolsInspector.vue_vue_type_script_setup_true_lang.js.map +1 -1
  9. package/dist/components/fields/CheckboxListField.js.map +1 -1
  10. package/dist/components/fields/CheckboxListField.vue.d.ts.map +1 -1
  11. package/dist/components/fields/CheckboxListField.vue_vue_type_script_setup_true_lang.js +2 -2
  12. package/dist/components/fields/CheckboxListField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  13. package/dist/components/fields/DatePickerField.js.map +1 -1
  14. package/dist/components/fields/DatePickerField.vue.d.ts.map +1 -1
  15. package/dist/components/fields/DatePickerField.vue_vue_type_script_setup_true_lang.js +34 -32
  16. package/dist/components/fields/DatePickerField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  17. package/dist/components/fields/RichEditorSuggestions.js.map +1 -1
  18. package/dist/components/fields/RichEditorSuggestions.vue.d.ts +1 -1
  19. package/dist/components/fields/RichEditorSuggestions.vue.d.ts.map +1 -1
  20. package/dist/components/fields/RichEditorSuggestions.vue_vue_type_script_setup_true_lang.js +29 -23
  21. package/dist/components/fields/RichEditorSuggestions.vue_vue_type_script_setup_true_lang.js.map +1 -1
  22. package/dist/components/fields/RichEditorToolbarGroup.js.map +1 -1
  23. package/dist/components/fields/RichEditorToolbarGroup.vue.d.ts.map +1 -1
  24. package/dist/components/fields/RichEditorToolbarGroup.vue_vue_type_script_setup_true_lang.js +9 -4
  25. package/dist/components/fields/RichEditorToolbarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  26. package/dist/components/file-manager/FileManagerView.js.map +1 -1
  27. package/dist/components/file-manager/FileManagerView.vue.d.ts.map +1 -1
  28. package/dist/components/file-manager/FileManagerView.vue_vue_type_script_setup_true_lang.js +5 -1
  29. package/dist/components/file-manager/FileManagerView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/layout/CalloutComponent.js.map +1 -1
  31. package/dist/components/layout/CalloutComponent.vue.d.ts.map +1 -1
  32. package/dist/components/layout/CalloutComponent.vue_vue_type_script_setup_true_lang.js +43 -39
  33. package/dist/components/layout/CalloutComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  34. package/dist/components/layout/EmptyStateComponent.js.map +1 -1
  35. package/dist/components/layout/EmptyStateComponent.vue.d.ts.map +1 -1
  36. package/dist/components/layout/EmptyStateComponent.vue_vue_type_script_setup_true_lang.js +29 -26
  37. package/dist/components/layout/EmptyStateComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  38. package/dist/components/layout/MixedContent.js.map +1 -1
  39. package/dist/components/layout/MixedContent.vue.d.ts +5 -3
  40. package/dist/components/layout/MixedContent.vue.d.ts.map +1 -1
  41. package/dist/components/layout/MixedContent.vue_vue_type_script_setup_true_lang.js +5 -4
  42. package/dist/components/layout/MixedContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  43. package/dist/components/layout/SectionComponent.js.map +1 -1
  44. package/dist/components/layout/SectionComponent.vue.d.ts.map +1 -1
  45. package/dist/components/layout/SectionComponent.vue_vue_type_script_setup_true_lang.js +12 -8
  46. package/dist/components/layout/SectionComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  47. package/dist/components/notifications/NotificationsMenu.js.map +1 -1
  48. package/dist/components/notifications/NotificationsMenu.vue.d.ts.map +1 -1
  49. package/dist/components/notifications/NotificationsMenu.vue_vue_type_script_setup_true_lang.js +133 -104
  50. package/dist/components/notifications/NotificationsMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  51. package/dist/components/panel/ShortcutsOverlay.js.map +1 -1
  52. package/dist/components/panel/ShortcutsOverlay.vue.d.ts.map +1 -1
  53. package/dist/components/panel/ShortcutsOverlay.vue_vue_type_script_setup_true_lang.js +20 -19
  54. package/dist/components/panel/ShortcutsOverlay.vue_vue_type_script_setup_true_lang.js.map +1 -1
  55. package/dist/components/table/ColumnManager.js.map +1 -1
  56. package/dist/components/table/ColumnManager.vue.d.ts.map +1 -1
  57. package/dist/components/table/ColumnManager.vue_vue_type_script_setup_true_lang.js +6 -6
  58. package/dist/components/table/ColumnManager.vue_vue_type_script_setup_true_lang.js.map +1 -1
  59. package/dist/components/table/Spreadsheet.js.map +1 -1
  60. package/dist/components/table/Spreadsheet.vue.d.ts.map +1 -1
  61. package/dist/components/table/Spreadsheet.vue_vue_type_script_setup_true_lang.js +37 -33
  62. package/dist/components/table/Spreadsheet.vue_vue_type_script_setup_true_lang.js.map +1 -1
  63. package/dist/components/translation-manager/TranslationManagerView.js.map +1 -1
  64. package/dist/components/translation-manager/TranslationManagerView.vue.d.ts.map +1 -1
  65. package/dist/components/translation-manager/TranslationManagerView.vue_vue_type_script_setup_true_lang.js +1 -1
  66. package/dist/components/translation-manager/TranslationManagerView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  67. package/dist/components/ui/SidebarMenuButton.js.map +1 -1
  68. package/dist/components/ui/SidebarMenuButton.vue.d.ts.map +1 -1
  69. package/dist/components/ui/SidebarMenuButton.vue_vue_type_script_setup_true_lang.js +12 -12
  70. package/dist/components/ui/SidebarMenuButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  71. package/dist/components/widgets/StatCard.js.map +1 -1
  72. package/dist/components/widgets/StatCard.vue.d.ts.map +1 -1
  73. package/dist/components/widgets/StatCard.vue_vue_type_script_setup_true_lang.js +30 -30
  74. package/dist/components/widgets/StatCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  75. package/dist/eject-manifest.json +2 -2
  76. package/dist/pages/AlfakitPage.js.map +1 -1
  77. package/dist/pages/AlfakitPage.vue.d.ts.map +1 -1
  78. package/dist/pages/AlfakitPage.vue_vue_type_script_setup_true_lang.js +16 -19
  79. package/dist/pages/AlfakitPage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  80. package/dist/standalone/AlfakitComponent.js.map +1 -1
  81. package/dist/standalone/AlfakitComponent.vue.d.ts.map +1 -1
  82. package/dist/standalone/AlfakitComponent.vue_vue_type_script_setup_true_lang.js +2 -2
  83. package/dist/standalone/AlfakitComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  84. package/dist/standalone/runtime.d.ts.map +1 -1
  85. package/dist/standalone/runtime.js +25 -25
  86. package/dist/standalone/runtime.js.map +1 -1
  87. package/dist/standalone.css +2 -1
  88. package/dist/starter-kit/AlfakitStarterKitRoot.js.map +1 -1
  89. package/dist/starter-kit/AlfakitStarterKitRoot.vue.d.ts.map +1 -1
  90. package/dist/starter-kit/AlfakitStarterKitRoot.vue_vue_type_script_setup_true_lang.js +1 -1
  91. package/dist/starter-kit/AlfakitStarterKitRoot.vue_vue_type_script_setup_true_lang.js.map +1 -1
  92. package/dist/starter-kit/navigation.d.ts +6 -1
  93. package/dist/starter-kit/navigation.d.ts.map +1 -1
  94. package/dist/starter-kit/navigation.js +11 -10
  95. package/dist/starter-kit/navigation.js.map +1 -1
  96. package/dist/styles.css +2 -1
  97. package/dist/themes.css +4 -0
  98. package/package.json +2 -2
  99. package/src/app/components.ts +3 -0
  100. package/src/components/dev-tools/DevToolsInspector.vue +1 -1
  101. package/src/components/fields/CheckboxListField.vue +2 -2
  102. package/src/components/fields/DatePickerField.vue +1 -0
  103. package/src/components/fields/RichEditorSuggestions.vue +13 -6
  104. package/src/components/fields/RichEditorToolbarGroup.vue +16 -1
  105. package/src/components/file-manager/FileManagerView.vue +3 -1
  106. package/src/components/layout/CalloutComponent.vue +15 -2
  107. package/src/components/layout/EmptyStateComponent.vue +10 -1
  108. package/src/components/layout/MixedContent.vue +12 -4
  109. package/src/components/layout/SectionComponent.vue +20 -4
  110. package/src/components/notifications/NotificationsMenu.vue +45 -1
  111. package/src/components/panel/ShortcutsOverlay.vue +27 -22
  112. package/src/components/table/ColumnManager.vue +6 -4
  113. package/src/components/table/Spreadsheet.vue +9 -4
  114. package/src/components/translation-manager/TranslationManagerView.vue +1 -1
  115. package/src/components/ui/SidebarMenuButton.vue +6 -0
  116. package/src/components/widgets/StatCard.vue +6 -3
  117. package/src/pages/AlfakitPage.vue +13 -3
  118. package/src/standalone/AlfakitComponent.vue +8 -4
  119. package/src/standalone/runtime.ts +3 -0
  120. package/src/starter-kit/AlfakitStarterKitRoot.vue +3 -2
  121. package/src/starter-kit/navigation.ts +12 -1
  122. package/src/styles.css +2 -1
@@ -3,26 +3,28 @@ import { cn as t } from "../../lib/utils.js";
3
3
  import { colorClass as n, textColorClasses as r } from "../../lib/colors.js";
4
4
  import i from "../../lib/Icon.js";
5
5
  import a from "../actions/ActionList.js";
6
- import o from "./MixedContent.js";
7
- import { actionsAlignmentClass as s } from "@alfakit/core";
8
- import { computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, mergeProps as h, normalizeClass as g, openBlock as _, toDisplayString as v, unref as y } from "vue";
6
+ import { useOptionalFormStore as o } from "../form/form-context.js";
7
+ import { useFieldActionContext as s } from "../schema/field-actions.js";
8
+ import c from "./MixedContent.js";
9
+ import { actionsAlignmentClass as l } from "@alfakit/core";
10
+ import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineComponent as g, mergeProps as _, normalizeClass as v, openBlock as y, toDisplayString as b, unref as x } from "vue";
9
11
  //#region src/components/layout/CalloutComponent.vue?vue&type=script&setup=true&lang.ts
10
- var b = [
12
+ var S = [
11
13
  "data-color",
12
14
  "data-status",
13
15
  "role"
14
- ], x = {
16
+ ], C = {
15
17
  key: 0,
16
18
  "data-slot": "callout-icon",
17
19
  class: "mt-0.5 shrink-0"
18
- }, S = { class: "flex min-w-0 flex-1 flex-col gap-1" }, C = {
20
+ }, w = { class: "flex min-w-0 flex-1 flex-col gap-1" }, T = {
19
21
  key: 0,
20
22
  class: "leading-6 font-semibold"
21
- }, w = ["innerHTML"], T = /*@__PURE__*/ m({
23
+ }, E = ["innerHTML"], D = /*@__PURE__*/ g({
22
24
  __name: "CalloutComponent",
23
25
  props: { component: {} },
24
- setup(m) {
25
- let T = {
26
+ setup(g) {
27
+ let D = {
26
28
  primary: "border-primary/30 bg-primary/5 [&_[data-slot=callout-icon]]:text-primary",
27
29
  secondary: "border-border bg-secondary [&_[data-slot=callout-icon]]:text-secondary-foreground",
28
30
  success: "border-success/30 bg-success/5 [&_[data-slot=callout-icon]]:text-success",
@@ -30,58 +32,60 @@ var b = [
30
32
  danger: "border-destructive/30 bg-destructive/5 [&_[data-slot=callout-icon]]:text-destructive",
31
33
  info: "border-info/30 bg-info/5 [&_[data-slot=callout-icon]]:text-info",
32
34
  gray: "border-border bg-muted/40 [&_[data-slot=callout-icon]]:text-muted-foreground"
33
- }, E = {
35
+ }, O = {
34
36
  xs: "size-4",
35
37
  sm: "size-4",
36
38
  md: "size-5",
37
39
  lg: "size-6",
38
40
  xl: "size-7",
39
41
  "2xl": "size-8"
40
- }, D = m, O = e(), k = c(() => D.component.color ?? D.component.status), A = c(() => D.component.iconColor ?? (D.component.color ? void 0 : D.component.status));
41
- return (e, c) => (_(), d("div", h({
42
+ }, k = g, A = o(), j = e(), M = s(() => k.component), N = u(() => A ? M.value : j), P = u(() => k.component.color ?? k.component.status), F = u(() => k.component.iconColor ?? (k.component.color ? void 0 : k.component.status));
43
+ return (e, o) => (y(), p("div", _({
42
44
  "data-slot": "callout",
43
- "data-color": D.component.color ?? "gray",
44
- "data-status": D.component.status,
45
- role: k.value === "danger" || k.value === "warning" ? "alert" : "note",
46
- class: y(t)("flex items-start gap-3 rounded-lg border p-4 text-sm", y(n)(T, D.component.color))
47
- }, D.component.extraAttributes), [
48
- D.component.icon ? (_(), d("span", x, [p(y(i), {
49
- name: D.component.icon,
50
- class: g(y(t)(D.component.iconSize && E[D.component.iconSize] || "size-5", A.value && y(n)(y(r), A.value)))
51
- }, null, 8, ["name", "class"])])) : u("", !0),
52
- f("div", S, [
53
- D.component.heading ? (_(), d("p", C, v(D.component.heading), 1)) : u("", !0),
54
- D.component.description ? (_(), d("div", {
45
+ "data-color": k.component.color ?? "gray",
46
+ "data-status": k.component.status,
47
+ role: P.value === "danger" || P.value === "warning" ? "alert" : "note",
48
+ class: x(t)("flex items-start gap-3 rounded-lg border p-4 text-sm", x(n)(D, k.component.color))
49
+ }, k.component.extraAttributes), [
50
+ k.component.icon ? (y(), p("span", C, [h(x(i), {
51
+ name: k.component.icon,
52
+ class: v(x(t)(k.component.iconSize && O[k.component.iconSize] || "size-5", F.value && x(n)(x(r), F.value)))
53
+ }, null, 8, ["name", "class"])])) : f("", !0),
54
+ m("div", w, [
55
+ k.component.heading ? (y(), p("p", T, b(k.component.heading), 1)) : f("", !0),
56
+ k.component.description ? (y(), p("div", {
55
57
  key: 1,
56
58
  class: "text-muted-foreground alfakit-prose",
57
- innerHTML: D.component.description
58
- }, null, 8, w)) : u("", !0),
59
- D.component.actions && D.component.actions.length > 0 ? (_(), l(a, {
59
+ innerHTML: k.component.description
60
+ }, null, 8, E)) : f("", !0),
61
+ k.component.actions && k.component.actions.length > 0 ? (y(), d(a, {
60
62
  key: 2,
61
- actions: D.component.actions,
62
- context: y(O),
63
+ actions: k.component.actions,
64
+ context: N.value,
63
65
  size: "sm",
64
- class: g(y(t)("mt-2", y(s)(D.component.footerActionsAlignment)))
66
+ class: v(x(t)("mt-2", x(l)(k.component.footerActionsAlignment)))
65
67
  }, null, 8, [
66
68
  "actions",
67
69
  "context",
68
70
  "class"
69
- ])) : u("", !0),
70
- p(o, {
71
- items: D.component.footer,
71
+ ])) : f("", !0),
72
+ h(c, {
73
+ items: k.component.footer,
74
+ context: N.value,
72
75
  name: "callout-footer",
73
76
  class: "mt-2"
74
- }, null, 8, ["items"])
77
+ }, null, 8, ["items", "context"])
75
78
  ]),
76
- p(o, {
77
- items: D.component.controls,
79
+ h(c, {
80
+ items: k.component.controls,
81
+ context: N.value,
78
82
  name: "callout-controls",
79
83
  class: "-me-1 -mt-1 shrink-0 gap-1"
80
- }, null, 8, ["items"])
81
- ], 16, b));
84
+ }, null, 8, ["items", "context"])
85
+ ], 16, S));
82
86
  }
83
87
  });
84
88
  //#endregion
85
- export { T as default };
89
+ export { D as default };
86
90
 
87
91
  //# sourceMappingURL=CalloutComponent.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CalloutComponent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_mergeProps","_unref","_createVNode","Icon","_normalizeClass","_createCommentVNode","_createElementVNode","_toDisplayString","_createBlock","ActionList","MixedContent","Icon_default","ActionList_default","MixedContent_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","CalloutComponent_vue_vue_type_script_setup_true_lang_default","CALLOUT_COLORS","CALLOUT_ICON_SIZES","props","__props","context","usePageActionContext","tone","computed","iconColor","openBlock","createElementBlock","mergeProps","unref","cn","colorClass","createVNode","normalizeClass","textColorClasses","createCommentVNode","createElementVNode","toDisplayString","createBlock","actionsAlignmentClass"],"sources":["../../../src/components/layout/CalloutComponent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { CalloutSchema } from '@alfakit/core'\nimport { actionsAlignmentClass } from '@alfakit/core'\nimport { computed } from 'vue'\nimport { colorClass, textColorClasses } from '../../lib/colors'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport ActionList from '../actions/ActionList.vue'\nimport MixedContent from './MixedContent.vue'\n\nconst CALLOUT_COLORS: Record<string, string> = {\n primary: 'border-primary/30 bg-primary/5 [&_[data-slot=callout-icon]]:text-primary',\n secondary: 'border-border bg-secondary [&_[data-slot=callout-icon]]:text-secondary-foreground',\n success: 'border-success/30 bg-success/5 [&_[data-slot=callout-icon]]:text-success',\n warning: 'border-warning/40 bg-warning/10 [&_[data-slot=callout-icon]]:text-warning',\n danger: 'border-destructive/30 bg-destructive/5 [&_[data-slot=callout-icon]]:text-destructive',\n info: 'border-info/30 bg-info/5 [&_[data-slot=callout-icon]]:text-info',\n gray: 'border-border bg-muted/40 [&_[data-slot=callout-icon]]:text-muted-foreground',\n}\n\nconst CALLOUT_ICON_SIZES: Record<string, string> = {\n xs: 'size-4',\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n xl: 'size-7',\n '2xl': 'size-8',\n}\n\nconst props = defineProps<{ component: CalloutSchema }>()\nconst context = usePageActionContext()\nconst tone = computed(() => props.component.color ?? props.component.status)\n// `iconColor()`, or the status colour once `color(null)` removed the background.\nconst iconColor = computed(\n () => props.component.iconColor ?? (props.component.color ? undefined : props.component.status),\n)\n</script>\n\n<template>\n <div\n data-slot=\"callout\"\n :data-color=\"props.component.color ?? 'gray'\"\n :data-status=\"props.component.status\"\n :role=\"tone === 'danger' || tone === 'warning' ? 'alert' : 'note'\"\n :class=\"\n cn(\n 'flex items-start gap-3 rounded-lg border p-4 text-sm',\n colorClass(CALLOUT_COLORS, props.component.color),\n )\n \"\n v-bind=\"props.component.extraAttributes\"\n >\n <span v-if=\"props.component.icon\" data-slot=\"callout-icon\" class=\"mt-0.5 shrink-0\">\n <Icon\n :name=\"props.component.icon\"\n :class=\"\n cn(\n (props.component.iconSize && CALLOUT_ICON_SIZES[props.component.iconSize]) || 'size-5',\n iconColor && colorClass(textColorClasses, iconColor),\n )\n \"\n />\n </span>\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p v-if=\"props.component.heading\" class=\"leading-6 font-semibold\">\n {{ props.component.heading }}\n </p>\n <div\n v-if=\"props.component.description\"\n class=\"text-muted-foreground alfakit-prose\"\n v-html=\"props.component.description\"\n />\n <ActionList\n v-if=\"props.component.actions && props.component.actions.length > 0\"\n :actions=\"props.component.actions\"\n :context=\"context\"\n size=\"sm\"\n :class=\"cn('mt-2', actionsAlignmentClass(props.component.footerActionsAlignment))\"\n />\n <MixedContent :items=\"props.component.footer\" name=\"callout-footer\" class=\"mt-2\" />\n </div>\n <MixedContent\n :items=\"props.component.controls\"\n name=\"callout-controls\"\n class=\"-me-1 -mt-1 shrink-0 gap-1\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAWA,IAAMsB,IAAyC;GAC7C,SAAS;GACT,WAAW;GACX,SAAS;GACT,SAAS;GACT,QAAQ;GACR,MAAM;GACN,MAAM;EACR,GAEMC,IAA6C;GACjD,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,OAAO;EACT,GAEMC,IAAQC,GACRC,IAAUC,EAAqB,GAC/BC,IAAOC,QAAeL,EAAM,UAAU,SAASA,EAAM,UAAU,MAAM,GAErEM,IAAYD,QACVL,EAAM,UAAU,cAAcA,EAAM,UAAU,QAAQ,KAAA,IAAYA,EAAM,UAAU,OAC1F;oBAIExB,EAAA,GAAAC,EA+CM,OA/CNC,EA+CM;GA9CJ,aAAU;GACT,cAAYsB,EAAM,UAAU,SAAK;GACjC,eAAaA,EAAM,UAAU;GAC7B,MAAMI,EAAA,UAAI,YAAiBA,EAAA,UAAI,YAAA,UAAA;GAC/B,OAAczB,EAAAgC,CAAA,CAAE,CAAA,wDAA0EhC,EAAAiC,CAAA,CAAU,CAACd,GAAgBE,EAAM,UAAU,KAAK,CAAA;EAMnI,GAAAA,EAAM,UAAU,eAAe,GAAA;GAE3BA,EAAM,UAAU,QAA5BxB,EAAA,GAAAC,EAUO,QAVPgB,GAUO,CATLb,EAQED,EAAAE,CAAA,GAAA;IAPC,MAAMmB,EAAM,UAAU;IACtB,OAAKlB,EAAaH,EAAAgC,CAAA,CAAE,CAAeX,EAAM,UAAU,YAAYD,EAAmBC,EAAM,UAAU,aAAQ,UAA4BM,EAAA,SAAa3B,EAAAiC,CAAA,CAAU,CAACjC,EAAAoC,CAAA,GAAkBT,EAAA,KAAS,CAAA,CAAA;;GAQ9LtB,EAiBM,OAjBNU,GAiBM;IAhBKM,EAAM,UAAU,WAAzBxB,EAAA,GAAAC,EAEI,KAFJkB,GAEIV,EADCe,EAAM,UAAU,OAAO,GAAA,CAAA,KAAAgB,EAAA,IAAA,EAAA;IAGpBhB,EAAM,UAAU,eADxBxB,EAAA,GAAAC,EAIE,OAAA;;KAFA,OAAM;KACN,WAAQuB,EAAM,UAAU;;IAGlBA,EAAM,UAAU,WAAWA,EAAM,UAAU,QAAQ,SAAM,KADjExB,EAAA,GAAAU,EAMEC,GAAA;;KAJC,SAASa,EAAM,UAAU;KACzB,SAASrB,EAAAuB,CAAA;KACV,MAAK;KACJ,OAAKpB,EAAEH,EAAAgC,CAAA,CAAE,CAAA,QAAShC,EAAAyC,CAAA,CAAqB,CAACpB,EAAM,UAAU,sBAAsB,CAAA,CAAA;;;;;;IAEjFpB,EAAmFQ,GAAA;KAApE,OAAOY,EAAM,UAAU;KAAQ,MAAK;KAAiB,OAAM;;;GAE5EpB,EAIEQ,GAAA;IAHC,OAAOY,EAAM,UAAU;IACxB,MAAK;IACL,OAAM"}
1
+ {"version":3,"file":"CalloutComponent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_mergeProps","_unref","_createVNode","Icon","_normalizeClass","_createCommentVNode","_createElementVNode","_toDisplayString","_createBlock","ActionList","MixedContent","Icon_default","ActionList_default","MixedContent_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","CalloutComponent_vue_vue_type_script_setup_true_lang_default","CALLOUT_COLORS","CALLOUT_ICON_SIZES","props","__props","form","useOptionalFormStore","pageContext","usePageActionContext","fieldContext","useFieldActionContext","context","computed","tone","iconColor","openBlock","createElementBlock","mergeProps","unref","cn","colorClass","createVNode","normalizeClass","textColorClasses","createCommentVNode","createElementVNode","toDisplayString","createBlock","actionsAlignmentClass"],"sources":["../../../src/components/layout/CalloutComponent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { CalloutSchema } from '@alfakit/core'\nimport { actionsAlignmentClass } from '@alfakit/core'\nimport { computed } from 'vue'\nimport { colorClass, textColorClasses } from '../../lib/colors'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport { useOptionalFormStore } from '../form/form-context'\nimport ActionList from '../actions/ActionList.vue'\nimport { useFieldActionContext } from '../schema/field-actions'\nimport MixedContent from './MixedContent.vue'\n\nconst CALLOUT_COLORS: Record<string, string> = {\n primary: 'border-primary/30 bg-primary/5 [&_[data-slot=callout-icon]]:text-primary',\n secondary: 'border-border bg-secondary [&_[data-slot=callout-icon]]:text-secondary-foreground',\n success: 'border-success/30 bg-success/5 [&_[data-slot=callout-icon]]:text-success',\n warning: 'border-warning/40 bg-warning/10 [&_[data-slot=callout-icon]]:text-warning',\n danger: 'border-destructive/30 bg-destructive/5 [&_[data-slot=callout-icon]]:text-destructive',\n info: 'border-info/30 bg-info/5 [&_[data-slot=callout-icon]]:text-info',\n gray: 'border-border bg-muted/40 [&_[data-slot=callout-icon]]:text-muted-foreground',\n}\n\nconst CALLOUT_ICON_SIZES: Record<string, string> = {\n xs: 'size-4',\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n xl: 'size-7',\n '2xl': 'size-8',\n}\n\nconst props = defineProps<{ component: CalloutSchema }>()\n// Inside a form the actions run as field actions of this component, so `$get` / `$set`\n// reach the form (like a section's header actions).\nconst form = useOptionalFormStore()\nconst pageContext = usePageActionContext()\nconst fieldContext = useFieldActionContext(() => props.component)\nconst context = computed(() => (form ? fieldContext.value : pageContext))\nconst tone = computed(() => props.component.color ?? props.component.status)\n// `iconColor()`, or the status colour once `color(null)` removed the background.\nconst iconColor = computed(\n () => props.component.iconColor ?? (props.component.color ? undefined : props.component.status),\n)\n</script>\n\n<template>\n <div\n data-slot=\"callout\"\n :data-color=\"props.component.color ?? 'gray'\"\n :data-status=\"props.component.status\"\n :role=\"tone === 'danger' || tone === 'warning' ? 'alert' : 'note'\"\n :class=\"\n cn(\n 'flex items-start gap-3 rounded-lg border p-4 text-sm',\n colorClass(CALLOUT_COLORS, props.component.color),\n )\n \"\n v-bind=\"props.component.extraAttributes\"\n >\n <span v-if=\"props.component.icon\" data-slot=\"callout-icon\" class=\"mt-0.5 shrink-0\">\n <Icon\n :name=\"props.component.icon\"\n :class=\"\n cn(\n (props.component.iconSize && CALLOUT_ICON_SIZES[props.component.iconSize]) || 'size-5',\n iconColor && colorClass(textColorClasses, iconColor),\n )\n \"\n />\n </span>\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p v-if=\"props.component.heading\" class=\"leading-6 font-semibold\">\n {{ props.component.heading }}\n </p>\n <div\n v-if=\"props.component.description\"\n class=\"text-muted-foreground alfakit-prose\"\n v-html=\"props.component.description\"\n />\n <ActionList\n v-if=\"props.component.actions && props.component.actions.length > 0\"\n :actions=\"props.component.actions\"\n :context=\"context\"\n size=\"sm\"\n :class=\"cn('mt-2', actionsAlignmentClass(props.component.footerActionsAlignment))\"\n />\n <MixedContent\n :items=\"props.component.footer\"\n :context=\"context\"\n name=\"callout-footer\"\n class=\"mt-2\"\n />\n </div>\n <MixedContent\n :items=\"props.component.controls\"\n :context=\"context\"\n name=\"callout-controls\"\n class=\"-me-1 -mt-1 shrink-0 gap-1\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAaA,IAAMsB,IAAyC;GAC7C,SAAS;GACT,WAAW;GACX,SAAS;GACT,SAAS;GACT,QAAQ;GACR,MAAM;GACN,MAAM;EACR,GAEMC,IAA6C;GACjD,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,OAAO;EACT,GAEMC,IAAQC,GAGRC,IAAOC,EAAqB,GAC5BC,IAAcC,EAAqB,GACnCC,IAAeC,QAA4B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,EAAA;KACV,MAAK;KACJ,OAAK1B,EAAEH,EAAAqC,CAAA,CAAE,CAAA,QAASrC,EAAA8C,CAAA,CAAqB,CAACzB,EAAM,UAAU,sBAAsB,CAAA,CAAA;;;;;;IAEjFpB,EAKEQ,GAAA;KAJC,OAAOY,EAAM,UAAU;KACvB,SAASQ,EAAA;KACV,MAAK;KACL,OAAM;;;GAGV5B,EAKEQ,GAAA;IAJC,OAAOY,EAAM,UAAU;IACvB,SAASQ,EAAA;IACV,MAAK;IACL,OAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyStateComponent.js","names":["_sfc_main","EmptyStateComponent_vue_vue_type_script_setup_true_lang_default","EmptyStateComponent_default"],"sources":["../../../src/components/layout/EmptyStateComponent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { EmptyStateComponentSchema } from '@alfakit/core'\nimport { colorClass, iconBackgroundColorClasses } from '../../lib/colors'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport ActionList from '../actions/ActionList.vue'\nimport MixedContent from './MixedContent.vue'\n\nconst props = defineProps<{ component: EmptyStateComponentSchema }>()\nconst context = usePageActionContext()\n</script>\n\n<template>\n <div\n data-slot=\"empty-state\"\n :class=\"\n cn(\n 'flex flex-col items-center justify-center gap-3 px-6 py-10 text-center',\n props.component.contained && 'rounded-xl border border-dashed',\n )\n \"\n v-bind=\"props.component.extraAttributes\"\n >\n <div\n v-if=\"props.component.icon\"\n :class=\"\n cn(\n 'flex size-12 items-center justify-center rounded-full',\n colorClass(iconBackgroundColorClasses, props.component.color),\n )\n \"\n >\n <Icon :name=\"props.component.icon\" class=\"size-6\" />\n </div>\n <h3 v-if=\"props.component.heading\" class=\"text-base font-semibold\">\n {{ props.component.heading }}\n </h3>\n <div\n v-if=\"props.component.description\"\n class=\"text-muted-foreground max-w-md text-sm\"\n v-html=\"props.component.description\"\n />\n <ActionList\n v-if=\"props.component.actions && props.component.actions.length > 0\"\n :actions=\"props.component.actions\"\n :context=\"context\"\n class=\"mt-2 justify-center\"\n />\n <MixedContent\n :items=\"props.component.footer\"\n name=\"empty-state-footer\"\n class=\"justify-center\"\n />\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"EmptyStateComponent.js","names":["_sfc_main","EmptyStateComponent_vue_vue_type_script_setup_true_lang_default","EmptyStateComponent_default"],"sources":["../../../src/components/layout/EmptyStateComponent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { EmptyStateComponentSchema } from '@alfakit/core'\nimport { computed } from 'vue'\nimport { colorClass, iconBackgroundColorClasses } from '../../lib/colors'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport { useOptionalFormStore } from '../form/form-context'\nimport ActionList from '../actions/ActionList.vue'\nimport { useFieldActionContext } from '../schema/field-actions'\nimport MixedContent from './MixedContent.vue'\n\nconst props = defineProps<{ component: EmptyStateComponentSchema }>()\n// Inside a form the actions run as field actions of this component, so `$get` / `$set`\n// reach the form (like a section's header actions).\nconst form = useOptionalFormStore()\nconst pageContext = usePageActionContext()\nconst fieldContext = useFieldActionContext(() => props.component)\nconst context = computed(() => (form ? fieldContext.value : pageContext))\n</script>\n\n<template>\n <div\n data-slot=\"empty-state\"\n :class=\"\n cn(\n 'flex flex-col items-center justify-center gap-3 px-6 py-10 text-center',\n props.component.contained && 'rounded-xl border border-dashed',\n )\n \"\n v-bind=\"props.component.extraAttributes\"\n >\n <div\n v-if=\"props.component.icon\"\n :class=\"\n cn(\n 'flex size-12 items-center justify-center rounded-full',\n colorClass(iconBackgroundColorClasses, props.component.color),\n )\n \"\n >\n <Icon :name=\"props.component.icon\" class=\"size-6\" />\n </div>\n <h3 v-if=\"props.component.heading\" class=\"text-base font-semibold\">\n {{ props.component.heading }}\n </h3>\n <div\n v-if=\"props.component.description\"\n class=\"text-muted-foreground max-w-md text-sm\"\n v-html=\"props.component.description\"\n />\n <ActionList\n v-if=\"props.component.actions && props.component.actions.length > 0\"\n :actions=\"props.component.actions\"\n :context=\"context\"\n class=\"mt-2 justify-center\"\n />\n <MixedContent\n :items=\"props.component.footer\"\n :context=\"context\"\n name=\"empty-state-footer\"\n class=\"justify-center\"\n />\n </div>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyStateComponent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/EmptyStateComponent.vue"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAQ9D,KAAK,WAAW,GAAG;IAAE,SAAS,EAAE,yBAAyB,CAAA;CAAE,CAAC;;AAoH5D,wBAMG"}
1
+ {"version":3,"file":"EmptyStateComponent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/EmptyStateComponent.vue"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAW9D,KAAK,WAAW,GAAG;IAAE,SAAS,EAAE,yBAAyB,CAAA;CAAE,CAAC;;AA2H5D,wBAMG"}
@@ -3,49 +3,52 @@ import { cn as t } from "../../lib/utils.js";
3
3
  import { colorClass as n, iconBackgroundColorClasses as r } from "../../lib/colors.js";
4
4
  import i from "../../lib/Icon.js";
5
5
  import a from "../actions/ActionList.js";
6
- import o from "./MixedContent.js";
7
- import { createBlock as s, createCommentVNode as c, createElementBlock as l, createVNode as u, defineComponent as d, mergeProps as f, normalizeClass as p, openBlock as m, toDisplayString as h, unref as g } from "vue";
6
+ import { useOptionalFormStore as o } from "../form/form-context.js";
7
+ import { useFieldActionContext as s } from "../schema/field-actions.js";
8
+ import c from "./MixedContent.js";
9
+ import { computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createVNode as p, defineComponent as m, mergeProps as h, normalizeClass as g, openBlock as _, toDisplayString as v, unref as y } from "vue";
8
10
  //#region src/components/layout/EmptyStateComponent.vue?vue&type=script&setup=true&lang.ts
9
- var _ = {
11
+ var b = {
10
12
  key: 1,
11
13
  class: "text-base font-semibold"
12
- }, v = ["innerHTML"], y = /*@__PURE__*/ d({
14
+ }, x = ["innerHTML"], S = /*@__PURE__*/ m({
13
15
  __name: "EmptyStateComponent",
14
16
  props: { component: {} },
15
- setup(d) {
16
- let y = d, b = e();
17
- return (e, d) => (m(), l("div", f({
17
+ setup(m) {
18
+ let S = m, C = o(), w = e(), T = s(() => S.component), E = l(() => C ? T.value : w);
19
+ return (e, o) => (_(), f("div", h({
18
20
  "data-slot": "empty-state",
19
- class: g(t)("flex flex-col items-center justify-center gap-3 px-6 py-10 text-center", y.component.contained && "rounded-xl border border-dashed")
20
- }, y.component.extraAttributes), [
21
- y.component.icon ? (m(), l("div", {
21
+ class: y(t)("flex flex-col items-center justify-center gap-3 px-6 py-10 text-center", S.component.contained && "rounded-xl border border-dashed")
22
+ }, S.component.extraAttributes), [
23
+ S.component.icon ? (_(), f("div", {
22
24
  key: 0,
23
- class: p(g(t)("flex size-12 items-center justify-center rounded-full", g(n)(g(r), y.component.color)))
24
- }, [u(g(i), {
25
- name: y.component.icon,
25
+ class: g(y(t)("flex size-12 items-center justify-center rounded-full", y(n)(y(r), S.component.color)))
26
+ }, [p(y(i), {
27
+ name: S.component.icon,
26
28
  class: "size-6"
27
- }, null, 8, ["name"])], 2)) : c("", !0),
28
- y.component.heading ? (m(), l("h3", _, h(y.component.heading), 1)) : c("", !0),
29
- y.component.description ? (m(), l("div", {
29
+ }, null, 8, ["name"])], 2)) : d("", !0),
30
+ S.component.heading ? (_(), f("h3", b, v(S.component.heading), 1)) : d("", !0),
31
+ S.component.description ? (_(), f("div", {
30
32
  key: 2,
31
33
  class: "text-muted-foreground max-w-md text-sm",
32
- innerHTML: y.component.description
33
- }, null, 8, v)) : c("", !0),
34
- y.component.actions && y.component.actions.length > 0 ? (m(), s(a, {
34
+ innerHTML: S.component.description
35
+ }, null, 8, x)) : d("", !0),
36
+ S.component.actions && S.component.actions.length > 0 ? (_(), u(a, {
35
37
  key: 3,
36
- actions: y.component.actions,
37
- context: g(b),
38
+ actions: S.component.actions,
39
+ context: E.value,
38
40
  class: "mt-2 justify-center"
39
- }, null, 8, ["actions", "context"])) : c("", !0),
40
- u(o, {
41
- items: y.component.footer,
41
+ }, null, 8, ["actions", "context"])) : d("", !0),
42
+ p(c, {
43
+ items: S.component.footer,
44
+ context: E.value,
42
45
  name: "empty-state-footer",
43
46
  class: "justify-center"
44
- }, null, 8, ["items"])
47
+ }, null, 8, ["items", "context"])
45
48
  ], 16));
46
49
  }
47
50
  });
48
51
  //#endregion
49
- export { y as default };
52
+ export { S as default };
50
53
 
51
54
  //# sourceMappingURL=EmptyStateComponent.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyStateComponent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_mergeProps","_unref","_normalizeClass","_createVNode","Icon","_createCommentVNode","_toDisplayString","_createBlock","ActionList","MixedContent","Icon_default","ActionList_default","MixedContent_default","_hoisted_1","_hoisted_2","EmptyStateComponent_vue_vue_type_script_setup_true_lang_default","props","__props","context","usePageActionContext","openBlock","createElementBlock","mergeProps","unref","cn","normalizeClass","colorClass","iconBackgroundColorClasses","createVNode","createCommentVNode","toDisplayString","createBlock"],"sources":["../../../src/components/layout/EmptyStateComponent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { EmptyStateComponentSchema } from '@alfakit/core'\nimport { colorClass, iconBackgroundColorClasses } from '../../lib/colors'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport ActionList from '../actions/ActionList.vue'\nimport MixedContent from './MixedContent.vue'\n\nconst props = defineProps<{ component: EmptyStateComponentSchema }>()\nconst context = usePageActionContext()\n</script>\n\n<template>\n <div\n data-slot=\"empty-state\"\n :class=\"\n cn(\n 'flex flex-col items-center justify-center gap-3 px-6 py-10 text-center',\n props.component.contained && 'rounded-xl border border-dashed',\n )\n \"\n v-bind=\"props.component.extraAttributes\"\n >\n <div\n v-if=\"props.component.icon\"\n :class=\"\n cn(\n 'flex size-12 items-center justify-center rounded-full',\n colorClass(iconBackgroundColorClasses, props.component.color),\n )\n \"\n >\n <Icon :name=\"props.component.icon\" class=\"size-6\" />\n </div>\n <h3 v-if=\"props.component.heading\" class=\"text-base font-semibold\">\n {{ props.component.heading }}\n </h3>\n <div\n v-if=\"props.component.description\"\n class=\"text-muted-foreground max-w-md text-sm\"\n v-html=\"props.component.description\"\n />\n <ActionList\n v-if=\"props.component.actions && props.component.actions.length > 0\"\n :actions=\"props.component.actions\"\n :context=\"context\"\n class=\"mt-2 justify-center\"\n />\n <MixedContent\n :items=\"props.component.footer\"\n name=\"empty-state-footer\"\n class=\"justify-center\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EASA,IAAMkB,IAAQC,GACRC,IAAUC,EAAqB;oBAInCrB,EAAA,GAAAC,EAwCM,OAxCNC,EAwCM;GAvCJ,aAAU;GACT,OAAcC,EAAAuB,CAAA,CAAE,CAAA,0EAA4FR,EAAM,UAAU,aAAS,iCAAA;EAM9H,GAAAA,EAAM,UAAU,eAAe,GAAA;GAG/BA,EAAM,UAAU,QADxBlB,EAAA,GAAAC,EAUM,OAAA;;IARH,OAAKG,EAAWD,EAAAuB,CAAA,CAAE,CAAA,yDAA+EvB,EAAAyB,CAAA,CAAU,CAACzB,EAAA0B,CAAA,GAA4BX,EAAM,UAAU,KAAK,CAAA,CAAA;GAO9Jb,GAAAA,CAAAA,EAAoDF,EAAAG,CAAA,GAAA;IAA7C,MAAMY,EAAM,UAAU;IAAM,OAAM;;GAEjCA,EAAM,UAAU,WAA1BlB,EAAA,GAAAC,EAEK,MAFLc,GAEKP,EADAU,EAAM,UAAU,OAAO,GAAA,CAAA,KAAAa,EAAA,IAAA,EAAA;GAGpBb,EAAM,UAAU,eADxBlB,EAAA,GAAAC,EAIE,OAAA;;IAFA,OAAM;IACN,WAAQiB,EAAM,UAAU;;GAGlBA,EAAM,UAAU,WAAWA,EAAM,UAAU,QAAQ,SAAM,KADjElB,EAAA,GAAAS,EAKEC,GAAA;;IAHC,SAASQ,EAAM,UAAU;IACzB,SAASf,EAAAiB,CAAA;IACV,OAAM;;GAERf,EAIEM,GAAA;IAHC,OAAOO,EAAM,UAAU;IACxB,MAAK;IACL,OAAM"}
1
+ {"version":3,"file":"EmptyStateComponent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_mergeProps","_unref","_normalizeClass","_createVNode","Icon","_createCommentVNode","_toDisplayString","_createBlock","ActionList","MixedContent","Icon_default","ActionList_default","MixedContent_default","_hoisted_1","_hoisted_2","EmptyStateComponent_vue_vue_type_script_setup_true_lang_default","props","__props","form","useOptionalFormStore","pageContext","usePageActionContext","fieldContext","useFieldActionContext","context","computed","openBlock","createElementBlock","mergeProps","unref","cn","normalizeClass","colorClass","iconBackgroundColorClasses","createVNode","createCommentVNode","toDisplayString","createBlock"],"sources":["../../../src/components/layout/EmptyStateComponent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { EmptyStateComponentSchema } from '@alfakit/core'\nimport { computed } from 'vue'\nimport { colorClass, iconBackgroundColorClasses } from '../../lib/colors'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport { useOptionalFormStore } from '../form/form-context'\nimport ActionList from '../actions/ActionList.vue'\nimport { useFieldActionContext } from '../schema/field-actions'\nimport MixedContent from './MixedContent.vue'\n\nconst props = defineProps<{ component: EmptyStateComponentSchema }>()\n// Inside a form the actions run as field actions of this component, so `$get` / `$set`\n// reach the form (like a section's header actions).\nconst form = useOptionalFormStore()\nconst pageContext = usePageActionContext()\nconst fieldContext = useFieldActionContext(() => props.component)\nconst context = computed(() => (form ? fieldContext.value : pageContext))\n</script>\n\n<template>\n <div\n data-slot=\"empty-state\"\n :class=\"\n cn(\n 'flex flex-col items-center justify-center gap-3 px-6 py-10 text-center',\n props.component.contained && 'rounded-xl border border-dashed',\n )\n \"\n v-bind=\"props.component.extraAttributes\"\n >\n <div\n v-if=\"props.component.icon\"\n :class=\"\n cn(\n 'flex size-12 items-center justify-center rounded-full',\n colorClass(iconBackgroundColorClasses, props.component.color),\n )\n \"\n >\n <Icon :name=\"props.component.icon\" class=\"size-6\" />\n </div>\n <h3 v-if=\"props.component.heading\" class=\"text-base font-semibold\">\n {{ props.component.heading }}\n </h3>\n <div\n v-if=\"props.component.description\"\n class=\"text-muted-foreground max-w-md text-sm\"\n v-html=\"props.component.description\"\n />\n <ActionList\n v-if=\"props.component.actions && props.component.actions.length > 0\"\n :actions=\"props.component.actions\"\n :context=\"context\"\n class=\"mt-2 justify-center\"\n />\n <MixedContent\n :items=\"props.component.footer\"\n :context=\"context\"\n name=\"empty-state-footer\"\n class=\"justify-center\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAYA,IAAMkB,IAAQC,GAGRC,IAAOC,EAAqB,GAC5BC,IAAcC,EAAqB,GACnCC,IAAeC,QAA4BP,EAAM,SAAS,GAC1DQ,IAAUC,QAAgBP,IAAOI,EAAa,QAAQF,CAAY;oBAItEtB,EAAA,GAAAC,EAyCM,OAzCNC,EAyCM;GAxCJ,aAAU;GACT,OAAcC,EAAA6B,CAAA,CAAE,CAAA,0EAA4Fd,EAAM,UAAU,aAAS,iCAAA;EAM9H,GAAAA,EAAM,UAAU,eAAe,GAAA;GAG/BA,EAAM,UAAU,QADxBlB,EAAA,GAAAC,EAUM,OAAA;;IARH,OAAKG,EAAWD,EAAA6B,CAAA,CAAE,CAAA,yDAA+E7B,EAAA+B,CAAA,CAAU,CAAC/B,EAAAgC,CAAA,GAA4BjB,EAAM,UAAU,KAAK,CAAA,CAAA;GAO9Jb,GAAAA,CAAAA,EAAoDF,EAAAG,CAAA,GAAA;IAA7C,MAAMY,EAAM,UAAU;IAAM,OAAM;;GAEjCA,EAAM,UAAU,WAA1BlB,EAAA,GAAAC,EAEK,MAFLc,GAEKP,EADAU,EAAM,UAAU,OAAO,GAAA,CAAA,KAAAmB,EAAA,IAAA,EAAA;GAGpBnB,EAAM,UAAU,eADxBlB,EAAA,GAAAC,EAIE,OAAA;;IAFA,OAAM;IACN,WAAQiB,EAAM,UAAU;;GAGlBA,EAAM,UAAU,WAAWA,EAAM,UAAU,QAAQ,SAAM,KADjElB,EAAA,GAAAS,EAKEC,GAAA;;IAHC,SAASQ,EAAM,UAAU;IACzB,SAASQ,EAAA;IACV,OAAM;;GAERrB,EAKEM,GAAA;IAJC,OAAOO,EAAM,UAAU;IACvB,SAASQ,EAAA;IACV,MAAK;IACL,OAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"MixedContent.js","names":["_sfc_main","MixedContent_vue_vue_type_script_setup_true_lang_default","MixedContent_default"],"sources":["../../../src/components/layout/MixedContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { AnyActionSchema, ContentSlotItem, SchemaComponent } from '@alfakit/core'\nimport { computed, type HTMLAttributes } from 'vue'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport ActionList from '../actions/ActionList.vue'\nimport RenderComponent from '../schema/RenderComponent.vue'\n\n/**\n * Actions and components placed in a layout component's fixed spot (a section's\n * `afterHeader()`, a callout's `controls()`). Actions run in the page's action context,\n * like section header actions.\n */\nconst props = defineProps<{\n items: ContentSlotItem[] | undefined\n name: string\n class?: HTMLAttributes['class']\n}>()\n\nconst context = usePageActionContext()\n\ntype Group =\n | { kind: 'actions'; key: string; actions: AnyActionSchema[] }\n | { kind: 'component'; key: string; component: SchemaComponent }\n\n// Consecutive actions share one action list so they sit together.\nconst groups = computed<Group[]>(() => {\n const result: Group[] = []\n\n for (const item of props.items ?? []) {\n if (item.action) {\n const last = result[result.length - 1]\n\n if (last?.kind === 'actions') {\n last.actions.push(item.action)\n } else {\n result.push({ kind: 'actions', key: `actions-${result.length}`, actions: [item.action] })\n }\n } else {\n result.push({ kind: 'component', key: item.component.key, component: item.component })\n }\n }\n\n return result\n})\n</script>\n\n<template>\n <div\n v-if=\"props.items?.length\"\n :data-slot=\"props.name\"\n :class=\"cn('flex flex-wrap items-center gap-2', props.class)\"\n >\n <template v-for=\"group in groups\" :key=\"group.key\">\n <ActionList\n v-if=\"group.kind === 'actions'\"\n :actions=\"group.actions\"\n :context=\"context\"\n size=\"sm\"\n />\n <RenderComponent v-else :component=\"group.component\" />\n </template>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"MixedContent.js","names":["_sfc_main","MixedContent_vue_vue_type_script_setup_true_lang_default","MixedContent_default"],"sources":["../../../src/components/layout/MixedContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type {\n ActionContext,\n AnyActionSchema,\n ContentSlotItem,\n SchemaComponent,\n} from '@alfakit/core'\nimport { computed, type HTMLAttributes } from 'vue'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport ActionList from '../actions/ActionList.vue'\nimport RenderComponent from '../schema/RenderComponent.vue'\n\n/**\n * Actions and components placed in a layout component's fixed spot (a section's\n * `afterHeader()`, a callout's `controls()`). Actions run in the owner's action context\n * (`context`: inside a form, the owner's field context, so `$get` / `$set` work), else the\n * page's.\n */\nconst props = defineProps<{\n items: ContentSlotItem[] | undefined\n name: string\n class?: HTMLAttributes['class']\n context?: ActionContext\n}>()\n\nconst pageContext = usePageActionContext()\nconst context = computed(() => props.context ?? pageContext)\n\ntype Group =\n | { kind: 'actions'; key: string; actions: AnyActionSchema[] }\n | { kind: 'component'; key: string; component: SchemaComponent }\n\n// Consecutive actions share one action list so they sit together.\nconst groups = computed<Group[]>(() => {\n const result: Group[] = []\n\n for (const item of props.items ?? []) {\n if (item.action) {\n const last = result[result.length - 1]\n\n if (last?.kind === 'actions') {\n last.actions.push(item.action)\n } else {\n result.push({ kind: 'actions', key: `actions-${result.length}`, actions: [item.action] })\n }\n } else {\n result.push({ kind: 'component', key: item.component.key, component: item.component })\n }\n }\n\n return result\n})\n</script>\n\n<template>\n <div\n v-if=\"props.items?.length\"\n :data-slot=\"props.name\"\n :class=\"cn('flex flex-wrap items-center gap-2', props.class)\"\n >\n <template v-for=\"group in groups\" :key=\"group.key\">\n <ActionList\n v-if=\"group.kind === 'actions'\"\n :actions=\"group.actions\"\n :context=\"context\"\n size=\"sm\"\n />\n <RenderComponent v-else :component=\"group.component\" />\n </template>\n </div>\n</template>\n"],"mappings":""}
@@ -1,14 +1,16 @@
1
- import type { ContentSlotItem } from '@alfakit/core';
1
+ import type { ActionContext, ContentSlotItem } from '@alfakit/core';
2
2
  import { type HTMLAttributes } from 'vue';
3
3
  /**
4
4
  * Actions and components placed in a layout component's fixed spot (a section's
5
- * `afterHeader()`, a callout's `controls()`). Actions run in the page's action context,
6
- * like section header actions.
5
+ * `afterHeader()`, a callout's `controls()`). Actions run in the owner's action context
6
+ * (`context`: inside a form, the owner's field context, so `$get` / `$set` work), else the
7
+ * page's.
7
8
  */
8
9
  type __VLS_Props = {
9
10
  items: ContentSlotItem[] | undefined;
10
11
  name: string;
11
12
  class?: HTMLAttributes['class'];
13
+ context?: ActionContext;
12
14
  };
13
15
  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>;
14
16
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"MixedContent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/MixedContent.vue"],"names":[],"mappings":"AAkEA,OAAO,KAAK,EAAmB,eAAe,EAAmB,MAAM,eAAe,CAAA;AACtF,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAMnD;;;;GAIG;AACH,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,eAAe,EAAE,GAAG,SAAS,CAAA;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;CAChC,CAAC;;AA+FF,wBAMG"}
1
+ {"version":3,"file":"MixedContent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/MixedContent.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EACV,aAAa,EAEb,eAAe,EAEhB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAMnD;;;;;GAKG;AACH,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,eAAe,EAAE,GAAG,SAAS,CAAA;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAC/B,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,CAAC;;AAgGF,wBAMG"}
@@ -15,10 +15,11 @@ var m = ["data-slot"], h = /*@__PURE__*/ l({
15
15
  String,
16
16
  Object,
17
17
  Array
18
- ] }
18
+ ] },
19
+ context: {}
19
20
  },
20
21
  setup(l) {
21
- let h = l, g = e(), _ = a(() => {
22
+ let h = l, g = e(), _ = a(() => h.context ?? g), v = a(() => {
22
23
  let e = [];
23
24
  for (let t of h.items ?? []) if (t.action) {
24
25
  let n = e[e.length - 1];
@@ -38,10 +39,10 @@ var m = ["data-slot"], h = /*@__PURE__*/ l({
38
39
  key: 0,
39
40
  "data-slot": h.name,
40
41
  class: u(p(t)("flex flex-wrap items-center gap-2", h.class))
41
- }, [(d(!0), c(i, null, f(_.value, (e) => (d(), c(i, { key: e.key }, [e.kind === "actions" ? (d(), o(n, {
42
+ }, [(d(!0), c(i, null, f(v.value, (e) => (d(), c(i, { key: e.key }, [e.kind === "actions" ? (d(), o(n, {
42
43
  key: 0,
43
44
  actions: e.actions,
44
- context: p(g),
45
+ context: _.value,
45
46
  size: "sm"
46
47
  }, null, 8, ["actions", "context"])) : (d(), o(r, {
47
48
  key: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"MixedContent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_Fragment","_renderList","_createBlock","ActionList","RenderComponent","_createCommentVNode","ActionList_default","RenderComponent_default","_hoisted_1","MixedContent_vue_vue_type_script_setup_true_lang_default","props","__props","context","usePageActionContext","groups","computed","result","item","last","openBlock","createElementBlock","normalizeClass","unref","cn","Fragment","renderList","group","createBlock","createCommentVNode"],"sources":["../../../src/components/layout/MixedContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { AnyActionSchema, ContentSlotItem, SchemaComponent } from '@alfakit/core'\nimport { computed, type HTMLAttributes } from 'vue'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport ActionList from '../actions/ActionList.vue'\nimport RenderComponent from '../schema/RenderComponent.vue'\n\n/**\n * Actions and components placed in a layout component's fixed spot (a section's\n * `afterHeader()`, a callout's `controls()`). Actions run in the page's action context,\n * like section header actions.\n */\nconst props = defineProps<{\n items: ContentSlotItem[] | undefined\n name: string\n class?: HTMLAttributes['class']\n}>()\n\nconst context = usePageActionContext()\n\ntype Group =\n | { kind: 'actions'; key: string; actions: AnyActionSchema[] }\n | { kind: 'component'; key: string; component: SchemaComponent }\n\n// Consecutive actions share one action list so they sit together.\nconst groups = computed<Group[]>(() => {\n const result: Group[] = []\n\n for (const item of props.items ?? []) {\n if (item.action) {\n const last = result[result.length - 1]\n\n if (last?.kind === 'actions') {\n last.actions.push(item.action)\n } else {\n result.push({ kind: 'actions', key: `actions-${result.length}`, actions: [item.action] })\n }\n } else {\n result.push({ kind: 'component', key: item.component.key, component: item.component })\n }\n }\n\n return result\n})\n</script>\n\n<template>\n <div\n v-if=\"props.items?.length\"\n :data-slot=\"props.name\"\n :class=\"cn('flex flex-wrap items-center gap-2', props.class)\"\n >\n <template v-for=\"group in groups\" :key=\"group.key\">\n <ActionList\n v-if=\"group.kind === 'actions'\"\n :actions=\"group.actions\"\n :context=\"context\"\n size=\"sm\"\n />\n <RenderComponent v-else :component=\"group.component\" />\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAaA,IAAMc,IAAQC,GAMRC,IAAUC,EAAqB,GAO/BC,IAASC,QAAwB;GACrC,IAAMC,IAAkB,CAAC;GAEzB,KAAK,IAAMC,KAAQP,EAAM,SAAS,CAAC,GACjC,IAAIO,EAAK,QAAQ;IACf,IAAMC,IAAOF,EAAOA,EAAO,SAAS;IAEpC,AAAIE,GAAM,SAAS,YACjBA,EAAK,QAAQ,KAAKD,EAAK,MAAM,IAE7BD,EAAO,KAAK;KAAE,MAAM;KAAW,KAAK,WAAWA,EAAO;KAAU,SAAS,CAACC,EAAK,MAAM;IAAE,CAAC;GAE5F,OACE,EAAO,KAAK;IAAE,MAAM;IAAa,KAAKA,EAAK,UAAU;IAAK,WAAWA,EAAK;GAAU,CAAC;GAIzF,OAAOD;EACT,CAAC;mBAKSN,EAAM,OAAO,UADrBd,EAAA,GAAAC,EAcM,OAAA;;GAZH,aAAWa,EAAM;GACjB,OAAKZ,EAAEC,EAAAwB,CAAA,CAAE,CAAA,qCAAsCb,EAAM,KAAK,CAAA;EAE3Dd,GAAAA,EAAAA,EAAA,EAAA,GAAAC,EAQWG,GAAA,MAAAC,EARea,EAAA,QAAT,OAAuBK,EAAA,GAAAC,EAAAI,GAAA,EAAA,KAAAE,EAAM,IAAA,GAAA,CAEpCA,EAAM,SAAI,aADlB9B,EAAA,GAAAM,EAKEC,GAAA;;GAHC,SAASuB,EAAM;GACf,SAAS3B,EAAAa,CAAA;GACV,MAAK;EAEPhB,GAAAA,MAAAA,GAAAA,CAAAA,WAAAA,SAAAA,CAAAA,MAAAA,EAAA,GAAAM,EAAuDE,GAAA;;GAA9B,WAAWsB,EAAM"}
1
+ {"version":3,"file":"MixedContent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_Fragment","_renderList","_createBlock","ActionList","RenderComponent","_createCommentVNode","ActionList_default","RenderComponent_default","_hoisted_1","MixedContent_vue_vue_type_script_setup_true_lang_default","props","__props","pageContext","usePageActionContext","context","computed","groups","result","item","last","openBlock","createElementBlock","normalizeClass","unref","cn","Fragment","renderList","group","createBlock","createCommentVNode"],"sources":["../../../src/components/layout/MixedContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type {\n ActionContext,\n AnyActionSchema,\n ContentSlotItem,\n SchemaComponent,\n} from '@alfakit/core'\nimport { computed, type HTMLAttributes } from 'vue'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport ActionList from '../actions/ActionList.vue'\nimport RenderComponent from '../schema/RenderComponent.vue'\n\n/**\n * Actions and components placed in a layout component's fixed spot (a section's\n * `afterHeader()`, a callout's `controls()`). Actions run in the owner's action context\n * (`context`: inside a form, the owner's field context, so `$get` / `$set` work), else the\n * page's.\n */\nconst props = defineProps<{\n items: ContentSlotItem[] | undefined\n name: string\n class?: HTMLAttributes['class']\n context?: ActionContext\n}>()\n\nconst pageContext = usePageActionContext()\nconst context = computed(() => props.context ?? pageContext)\n\ntype Group =\n | { kind: 'actions'; key: string; actions: AnyActionSchema[] }\n | { kind: 'component'; key: string; component: SchemaComponent }\n\n// Consecutive actions share one action list so they sit together.\nconst groups = computed<Group[]>(() => {\n const result: Group[] = []\n\n for (const item of props.items ?? []) {\n if (item.action) {\n const last = result[result.length - 1]\n\n if (last?.kind === 'actions') {\n last.actions.push(item.action)\n } else {\n result.push({ kind: 'actions', key: `actions-${result.length}`, actions: [item.action] })\n }\n } else {\n result.push({ kind: 'component', key: item.component.key, component: item.component })\n }\n }\n\n return result\n})\n</script>\n\n<template>\n <div\n v-if=\"props.items?.length\"\n :data-slot=\"props.name\"\n :class=\"cn('flex flex-wrap items-center gap-2', props.class)\"\n >\n <template v-for=\"group in groups\" :key=\"group.key\">\n <ActionList\n v-if=\"group.kind === 'actions'\"\n :actions=\"group.actions\"\n :context=\"context\"\n size=\"sm\"\n />\n <RenderComponent v-else :component=\"group.component\" />\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAmBA,IAAMc,IAAQC,GAORC,IAAcC,EAAqB,GACnCC,IAAUC,QAAeL,EAAM,WAAWE,CAAW,GAOrDI,IAASD,QAAwB;GACrC,IAAME,IAAkB,CAAC;GAEzB,KAAK,IAAMC,KAAQR,EAAM,SAAS,CAAC,GACjC,IAAIQ,EAAK,QAAQ;IACf,IAAMC,IAAOF,EAAOA,EAAO,SAAS;IAEpC,AAAIE,GAAM,SAAS,YACjBA,EAAK,QAAQ,KAAKD,EAAK,MAAM,IAE7BD,EAAO,KAAK;KAAE,MAAM;KAAW,KAAK,WAAWA,EAAO;KAAU,SAAS,CAACC,EAAK,MAAM;IAAE,CAAC;GAE5F,OACE,EAAO,KAAK;IAAE,MAAM;IAAa,KAAKA,EAAK,UAAU;IAAK,WAAWA,EAAK;GAAU,CAAC;GAIzF,OAAOD;EACT,CAAC;mBAKSP,EAAM,OAAO,UADrBd,EAAA,GAAAC,EAcM,OAAA;;GAZH,aAAWa,EAAM;GACjB,OAAKZ,EAAEC,EAAAyB,CAAA,CAAE,CAAA,qCAAsCd,EAAM,KAAK,CAAA;EAE3Dd,GAAAA,EAAAA,EAAA,EAAA,GAAAC,EAQWG,GAAA,MAAAC,EARee,EAAA,QAAT,OAAuBI,EAAA,GAAAC,EAAAI,GAAA,EAAA,KAAAE,EAAM,IAAA,GAAA,CAEpCA,EAAM,SAAI,aADlB/B,EAAA,GAAAM,EAKEC,GAAA;;GAHC,SAASwB,EAAM;GACf,SAASb,EAAA;GACV,MAAK;EAEPlB,GAAAA,MAAAA,GAAAA,CAAAA,WAAAA,SAAAA,CAAAA,MAAAA,EAAA,GAAAM,EAAuDE,GAAA;;GAA9B,WAAWuB,EAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"SectionComponent.js","names":["_sfc_main","SectionComponent_vue_vue_type_script_setup_true_lang_default","SectionComponent_default"],"sources":["../../../src/components/layout/SectionComponent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { SectionSchema } from '@alfakit/core'\nimport {\n actionsAlignmentClass,\n headingTag,\n readPersisted,\n schemaGapClass,\n writePersisted,\n} from '@alfakit/core'\nimport { ChevronDownIcon } from '@lucide/vue'\nimport { computed, onMounted, ref } from 'vue'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport { useOptionalFormStore } from '../form/form-context'\nimport { useFieldActionContext } from '../schema/field-actions'\nimport ActionList from '../actions/ActionList.vue'\nimport SchemaRenderer from '../schema/SchemaRenderer.vue'\nimport Button from '../ui/Button.vue'\nimport Collapsible from '../ui/Collapsible.vue'\nimport CollapsibleContent from '../ui/CollapsibleContent.vue'\nimport CollapsibleTrigger from '../ui/CollapsibleTrigger.vue'\nimport { useT } from '../../context'\nimport DeferredSchema from './DeferredSchema.vue'\nimport MixedContent from './MixedContent.vue'\n\nconst props = defineProps<{ component: SectionSchema }>()\nconst open = ref(!props.component.collapsed)\n// Inside a form the section's actions run as field actions, so `$get` / `$set` work.\nconst sectionForm = useOptionalFormStore()\nconst pageContext = usePageActionContext()\nconst fieldContext = useFieldActionContext(() => props.component)\nconst context = computed(() => (sectionForm ? fieldContext.value : pageContext))\nconst heading = computed(() => headingTag(props.component.headingLevel))\nconst hasHeader = computed(() =>\n Boolean(\n props.component.heading ||\n props.component.description ||\n props.component.icon ||\n props.component.headerActions?.length ||\n props.component.afterHeader?.length,\n ),\n)\n\n// Stored after mounting, so the server render and hydration use the schema's default.\nonMounted(() => {\n const key = props.component.persistCollapsed\n\n if (!key) return\n\n const stored = readPersisted(key)\n\n if (stored !== null) open.value = stored !== 'collapsed'\n})\n\nfunction setOpen(next: boolean) {\n open.value = next\n\n if (props.component.persistCollapsed) {\n writePersisted(props.component.persistCollapsed, next ? 'expanded' : 'collapsed')\n }\n}\nconst hasFooterActions = computed(() => Boolean(props.component.footerActions?.length))\nconst hasFooter = computed(() => hasFooterActions.value || Boolean(props.component.footer?.length))\nconst t = useT()\n</script>\n\n<template>\n <Collapsible\n v-if=\"props.component.aside\"\n :open=\"!props.component.collapsible || open\"\n as-child\n @update:open=\"setOpen($event)\"\n >\n <section\n data-slot=\"section\"\n class=\"grid gap-6 lg:grid-cols-3\"\n v-bind=\"props.component.extraAttributes\"\n >\n <div v-if=\"hasHeader\" class=\"flex flex-wrap items-start gap-3 lg:col-span-1\">\n <Icon\n v-if=\"props.component.icon\"\n :name=\"props.component.icon\"\n class=\"text-muted-foreground mt-0.5 size-5\"\n />\n <div class=\"min-w-0 flex-1 basis-48\">\n <component\n :is=\"heading\"\n v-if=\"props.component.heading\"\n class=\"text-base leading-6 font-semibold break-words\"\n >\n {{ props.component.heading }}\n </component>\n <p\n v-if=\"props.component.description\"\n class=\"text-muted-foreground mt-1 text-sm break-words\"\n >\n {{ props.component.description }}\n </p>\n </div>\n <ActionList\n v-if=\"props.component.headerActions && props.component.headerActions.length > 0\"\n :actions=\"props.component.headerActions\"\n :context=\"context\"\n size=\"sm\"\n />\n <MixedContent :items=\"props.component.afterHeader\" name=\"section-after-header\" />\n <CollapsibleTrigger v-if=\"props.component.collapsible\" as-child>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :aria-label=\"t('toggle_section', {}, 'Toggle section')\"\n >\n <Icon\n name=\"alfakit::schemas.section.collapse-button\"\n :fallback=\"ChevronDownIcon\"\n :class=\"cn('transition-transform', open && 'rotate-180')\"\n />\n </Button>\n </CollapsibleTrigger>\n </div>\n <CollapsibleContent as-child>\n <div\n data-surface=\"section\"\n :class=\"\n cn(\n 'bg-card rounded-xl border shadow-xs lg:col-span-2',\n props.component.secondary && 'bg-muted/40',\n )\n \"\n >\n <div :class=\"cn('p-6', props.component.compact && 'p-4')\">\n <DeferredSchema v-slot=\"{ component: loaded }\" :component=\"props.component\">\n <SchemaRenderer\n :components=\"loaded.schema ?? []\"\n :columns=\"loaded.columns\"\n :class=\"schemaGapClass(loaded) || undefined\"\n />\n </DeferredSchema>\n </div>\n <div\n v-if=\"hasFooter\"\n data-slot=\"section-footer\"\n :class=\"\n cn(\n 'flex flex-wrap items-center gap-3 border-t px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <ActionList\n v-if=\"hasFooterActions\"\n :actions=\"props.component.footerActions!\"\n :context=\"context\"\n :class=\"actionsAlignmentClass(props.component.footerActionsAlignment) || undefined\"\n />\n <MixedContent :items=\"props.component.footer\" name=\"section-footer-content\" />\n </div>\n </div>\n </CollapsibleContent>\n </section>\n </Collapsible>\n <Collapsible\n v-else\n :open=\"!props.component.collapsible || open\"\n as-child\n @update:open=\"setOpen($event)\"\n >\n <section\n data-slot=\"section\"\n data-surface=\"section\"\n :class=\"cn('bg-card rounded-xl border shadow-xs', props.component.secondary && 'bg-muted/40')\"\n v-bind=\"props.component.extraAttributes\"\n >\n <div\n v-if=\"hasHeader\"\n :class=\"\n cn(\n 'flex flex-wrap items-start gap-3 border-b px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <Icon\n v-if=\"props.component.icon\"\n :name=\"props.component.icon\"\n class=\"text-muted-foreground mt-0.5 size-5\"\n />\n <div class=\"min-w-0 flex-1 basis-48\">\n <component\n :is=\"heading\"\n v-if=\"props.component.heading\"\n class=\"text-base leading-6 font-semibold break-words\"\n >\n {{ props.component.heading }}\n </component>\n <p\n v-if=\"props.component.description\"\n class=\"text-muted-foreground mt-1 text-sm break-words\"\n >\n {{ props.component.description }}\n </p>\n </div>\n <ActionList\n v-if=\"props.component.headerActions && props.component.headerActions.length > 0\"\n :actions=\"props.component.headerActions\"\n :context=\"context\"\n size=\"sm\"\n />\n <MixedContent :items=\"props.component.afterHeader\" name=\"section-after-header\" />\n <CollapsibleTrigger v-if=\"props.component.collapsible\" as-child>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :aria-label=\"t('toggle_section', {}, 'Toggle section')\"\n >\n <Icon\n name=\"alfakit::schemas.section.collapse-button\"\n :fallback=\"ChevronDownIcon\"\n :class=\"cn('transition-transform', open && 'rotate-180')\"\n />\n </Button>\n </CollapsibleTrigger>\n </div>\n <CollapsibleContent>\n <div :class=\"cn('p-6', props.component.compact && 'p-4')\">\n <DeferredSchema v-slot=\"{ component: loaded }\" :component=\"props.component\">\n <SchemaRenderer\n :components=\"loaded.schema ?? []\"\n :columns=\"loaded.columns\"\n :class=\"schemaGapClass(loaded) || undefined\"\n />\n </DeferredSchema>\n </div>\n <div\n v-if=\"hasFooter\"\n data-slot=\"section-footer\"\n :class=\"\n cn(\n 'flex flex-wrap items-center gap-3 border-t px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <ActionList\n v-if=\"hasFooterActions\"\n :actions=\"props.component.footerActions!\"\n :context=\"context\"\n :class=\"actionsAlignmentClass(props.component.footerActionsAlignment) || undefined\"\n />\n <MixedContent :items=\"props.component.footer\" name=\"section-footer-content\" />\n </div>\n </CollapsibleContent>\n </section>\n </Collapsible>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SectionComponent.js","names":["_sfc_main","SectionComponent_vue_vue_type_script_setup_true_lang_default","SectionComponent_default"],"sources":["../../../src/components/layout/SectionComponent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { SectionSchema } from '@alfakit/core'\nimport {\n actionsAlignmentClass,\n headingTag,\n readPersisted,\n schemaGapClass,\n writePersisted,\n} from '@alfakit/core'\nimport { ChevronDownIcon } from '@lucide/vue'\nimport { computed, onMounted, ref } from 'vue'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport { useOptionalFormStore } from '../form/form-context'\nimport { useFieldActionContext } from '../schema/field-actions'\nimport ActionList from '../actions/ActionList.vue'\nimport SchemaRenderer from '../schema/SchemaRenderer.vue'\nimport Button from '../ui/Button.vue'\nimport Collapsible from '../ui/Collapsible.vue'\nimport CollapsibleContent from '../ui/CollapsibleContent.vue'\nimport CollapsibleTrigger from '../ui/CollapsibleTrigger.vue'\nimport { useT } from '../../context'\nimport DeferredSchema from './DeferredSchema.vue'\nimport MixedContent from './MixedContent.vue'\n\nconst props = defineProps<{ component: SectionSchema }>()\nconst open = ref(!props.component.collapsed)\n// Inside a form the section's actions run as field actions, so `$get` / `$set` work.\nconst sectionForm = useOptionalFormStore()\nconst pageContext = usePageActionContext()\nconst fieldContext = useFieldActionContext(() => props.component)\nconst context = computed(() => (sectionForm ? fieldContext.value : pageContext))\nconst heading = computed(() => headingTag(props.component.headingLevel))\nconst hasHeader = computed(() =>\n Boolean(\n props.component.heading ||\n props.component.description ||\n props.component.icon ||\n props.component.headerActions?.length ||\n props.component.afterHeader?.length,\n ),\n)\n\n// Stored after mounting, so the server render and hydration use the schema's default.\nonMounted(() => {\n const key = props.component.persistCollapsed\n\n if (!key) return\n\n const stored = readPersisted(key)\n\n if (stored !== null) open.value = stored !== 'collapsed'\n})\n\nfunction setOpen(next: boolean) {\n open.value = next\n\n if (props.component.persistCollapsed) {\n writePersisted(props.component.persistCollapsed, next ? 'expanded' : 'collapsed')\n }\n}\nconst hasFooterActions = computed(() => Boolean(props.component.footerActions?.length))\nconst hasFooter = computed(() => hasFooterActions.value || Boolean(props.component.footer?.length))\nconst t = useT()\n</script>\n\n<template>\n <Collapsible\n v-if=\"props.component.aside\"\n :open=\"!props.component.collapsible || open\"\n as-child\n @update:open=\"setOpen($event)\"\n >\n <section\n data-slot=\"section\"\n class=\"grid gap-6 lg:grid-cols-3\"\n v-bind=\"props.component.extraAttributes\"\n >\n <div v-if=\"hasHeader\" class=\"flex flex-wrap items-start gap-3 lg:col-span-1\">\n <Icon\n v-if=\"props.component.icon\"\n :name=\"props.component.icon\"\n class=\"text-muted-foreground mt-0.5 size-5\"\n />\n <div class=\"min-w-0 flex-1 basis-48\">\n <component\n :is=\"heading\"\n v-if=\"props.component.heading\"\n class=\"text-base leading-6 font-semibold break-words\"\n >\n {{ props.component.heading }}\n </component>\n <p\n v-if=\"props.component.description\"\n class=\"text-muted-foreground mt-1 text-sm break-words\"\n >\n {{ props.component.description }}\n </p>\n </div>\n <ActionList\n v-if=\"props.component.headerActions && props.component.headerActions.length > 0\"\n :actions=\"props.component.headerActions\"\n :context=\"context\"\n size=\"sm\"\n />\n <MixedContent\n :items=\"props.component.afterHeader\"\n name=\"section-after-header\"\n :context=\"context\"\n />\n <CollapsibleTrigger v-if=\"props.component.collapsible\" as-child>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :aria-label=\"t('toggle_section', {}, 'Toggle section')\"\n >\n <Icon\n name=\"alfakit::schemas.section.collapse-button\"\n :fallback=\"ChevronDownIcon\"\n :class=\"cn('transition-transform', open && 'rotate-180')\"\n />\n </Button>\n </CollapsibleTrigger>\n </div>\n <CollapsibleContent as-child>\n <div\n data-surface=\"section\"\n :class=\"\n cn(\n 'bg-card rounded-xl border shadow-xs lg:col-span-2',\n props.component.secondary && 'bg-muted/40',\n )\n \"\n >\n <div :class=\"cn('p-6', props.component.compact && 'p-4')\">\n <DeferredSchema v-slot=\"{ component: loaded }\" :component=\"props.component\">\n <SchemaRenderer\n :components=\"loaded.schema ?? []\"\n :columns=\"loaded.columns\"\n :class=\"schemaGapClass(loaded) || undefined\"\n />\n </DeferredSchema>\n </div>\n <div\n v-if=\"hasFooter\"\n data-slot=\"section-footer\"\n :class=\"\n cn(\n 'flex flex-wrap items-center gap-3 border-t px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <ActionList\n v-if=\"hasFooterActions\"\n :actions=\"props.component.footerActions!\"\n :context=\"context\"\n :class=\"actionsAlignmentClass(props.component.footerActionsAlignment) || undefined\"\n />\n <MixedContent\n :items=\"props.component.footer\"\n name=\"section-footer-content\"\n :context=\"context\"\n />\n </div>\n </div>\n </CollapsibleContent>\n </section>\n </Collapsible>\n <Collapsible\n v-else\n :open=\"!props.component.collapsible || open\"\n as-child\n @update:open=\"setOpen($event)\"\n >\n <section\n data-slot=\"section\"\n data-surface=\"section\"\n :class=\"cn('bg-card rounded-xl border shadow-xs', props.component.secondary && 'bg-muted/40')\"\n v-bind=\"props.component.extraAttributes\"\n >\n <div\n v-if=\"hasHeader\"\n :class=\"\n cn(\n 'flex flex-wrap items-start gap-3 border-b px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <Icon\n v-if=\"props.component.icon\"\n :name=\"props.component.icon\"\n class=\"text-muted-foreground mt-0.5 size-5\"\n />\n <div class=\"min-w-0 flex-1 basis-48\">\n <component\n :is=\"heading\"\n v-if=\"props.component.heading\"\n class=\"text-base leading-6 font-semibold break-words\"\n >\n {{ props.component.heading }}\n </component>\n <p\n v-if=\"props.component.description\"\n class=\"text-muted-foreground mt-1 text-sm break-words\"\n >\n {{ props.component.description }}\n </p>\n </div>\n <ActionList\n v-if=\"props.component.headerActions && props.component.headerActions.length > 0\"\n :actions=\"props.component.headerActions\"\n :context=\"context\"\n size=\"sm\"\n />\n <MixedContent\n :items=\"props.component.afterHeader\"\n name=\"section-after-header\"\n :context=\"context\"\n />\n <CollapsibleTrigger v-if=\"props.component.collapsible\" as-child>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :aria-label=\"t('toggle_section', {}, 'Toggle section')\"\n >\n <Icon\n name=\"alfakit::schemas.section.collapse-button\"\n :fallback=\"ChevronDownIcon\"\n :class=\"cn('transition-transform', open && 'rotate-180')\"\n />\n </Button>\n </CollapsibleTrigger>\n </div>\n <CollapsibleContent>\n <div :class=\"cn('p-6', props.component.compact && 'p-4')\">\n <DeferredSchema v-slot=\"{ component: loaded }\" :component=\"props.component\">\n <SchemaRenderer\n :components=\"loaded.schema ?? []\"\n :columns=\"loaded.columns\"\n :class=\"schemaGapClass(loaded) || undefined\"\n />\n </DeferredSchema>\n </div>\n <div\n v-if=\"hasFooter\"\n data-slot=\"section-footer\"\n :class=\"\n cn(\n 'flex flex-wrap items-center gap-3 border-t px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <ActionList\n v-if=\"hasFooterActions\"\n :actions=\"props.component.footerActions!\"\n :context=\"context\"\n :class=\"actionsAlignmentClass(props.component.footerActionsAlignment) || undefined\"\n />\n <MixedContent\n :items=\"props.component.footer\"\n name=\"section-footer-content\"\n :context=\"context\"\n />\n </div>\n </CollapsibleContent>\n </section>\n </Collapsible>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"SectionComponent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/SectionComponent.vue"],"names":[],"mappings":"AAoQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAyBlD,KAAK,WAAW,GAAG;IAAE,SAAS,EAAE,aAAa,CAAA;CAAE,CAAC;;AA6iBhD,wBAMG"}
1
+ {"version":3,"file":"SectionComponent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/SectionComponent.vue"],"names":[],"mappings":"AAoRA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAyBlD,KAAK,WAAW,GAAG;IAAE,SAAS,EAAE,aAAa,CAAA;CAAE,CAAC;;AAqjBhD,wBAMG"}
@@ -70,8 +70,9 @@ var L = {
70
70
  }, null, 8, ["actions", "context"])) : x("", !0),
71
71
  T(f, {
72
72
  items: H.component.afterHeader,
73
- name: "section-after-header"
74
- }, null, 8, ["items"]),
73
+ name: "section-after-header",
74
+ context: q.value
75
+ }, null, 8, ["items", "context"]),
75
76
  H.component.collapsible ? (A(), b(p, {
76
77
  key: 2,
77
78
  "as-child": ""
@@ -121,8 +122,9 @@ var L = {
121
122
  "class"
122
123
  ])) : x("", !0), T(f, {
123
124
  items: H.component.footer,
124
- name: "section-footer-content"
125
- }, null, 8, ["items"])], 2)) : x("", !0)], 2)]),
125
+ name: "section-footer-content",
126
+ context: q.value
127
+ }, null, 8, ["items", "context"])], 2)) : x("", !0)], 2)]),
126
128
  _: 1
127
129
  })], 16)]),
128
130
  _: 1
@@ -160,8 +162,9 @@ var L = {
160
162
  }, null, 8, ["actions", "context"])) : x("", !0),
161
163
  T(f, {
162
164
  items: H.component.afterHeader,
163
- name: "section-after-header"
164
- }, null, 8, ["items"]),
165
+ name: "section-after-header",
166
+ context: q.value
167
+ }, null, 8, ["items", "context"]),
165
168
  H.component.collapsible ? (A(), b(p, {
166
169
  key: 2,
167
170
  "as-child": ""
@@ -208,8 +211,9 @@ var L = {
208
211
  "class"
209
212
  ])) : x("", !0), T(f, {
210
213
  items: H.component.footer,
211
- name: "section-footer-content"
212
- }, null, 8, ["items"])], 2)) : x("", !0)]),
214
+ name: "section-footer-content",
215
+ context: q.value
216
+ }, null, 8, ["items", "context"])], 2)) : x("", !0)]),
213
217
  _: 1
214
218
  })], 16)]),
215
219
  _: 1
@@ -1 +1 @@
1
- {"version":3,"file":"SectionComponent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","Collapsible","_withCtx","_createElementVNode","_mergeProps","_createElementBlock","_unref","Icon","_createCommentVNode","_resolveDynamicComponent","_createTextVNode","_toDisplayString","ActionList","_createVNode","MixedContent","CollapsibleTrigger","Button","_normalizeClass","CollapsibleContent","DeferredSchema","SchemaRenderer","Icon_default","Button_default","ActionList_default","SchemaRenderer_default","DeferredSchema_default","Collapsible_default","CollapsibleContent_default","MixedContent_default","CollapsibleTrigger_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","SectionComponent_vue_vue_type_script_setup_true_lang_default","props","__props","open","ref","sectionForm","useOptionalFormStore","pageContext","usePageActionContext","fieldContext","useFieldActionContext","context","computed","heading","headingTag","hasHeader","key","stored","readPersisted","setOpen","next","writePersisted","hasFooterActions","hasFooter","t","useT","openBlock","createBlock","_cache","$event","withCtx","createElementVNode","mergeProps","createElementBlock","unref","createCommentVNode","resolveDynamicComponent","createTextVNode","toDisplayString","createVNode","ChevronDownIcon","normalizeClass","cn","loaded","schemaGapClass","actionsAlignmentClass"],"sources":["../../../src/components/layout/SectionComponent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { SectionSchema } from '@alfakit/core'\nimport {\n actionsAlignmentClass,\n headingTag,\n readPersisted,\n schemaGapClass,\n writePersisted,\n} from '@alfakit/core'\nimport { ChevronDownIcon } from '@lucide/vue'\nimport { computed, onMounted, ref } from 'vue'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport { useOptionalFormStore } from '../form/form-context'\nimport { useFieldActionContext } from '../schema/field-actions'\nimport ActionList from '../actions/ActionList.vue'\nimport SchemaRenderer from '../schema/SchemaRenderer.vue'\nimport Button from '../ui/Button.vue'\nimport Collapsible from '../ui/Collapsible.vue'\nimport CollapsibleContent from '../ui/CollapsibleContent.vue'\nimport CollapsibleTrigger from '../ui/CollapsibleTrigger.vue'\nimport { useT } from '../../context'\nimport DeferredSchema from './DeferredSchema.vue'\nimport MixedContent from './MixedContent.vue'\n\nconst props = defineProps<{ component: SectionSchema }>()\nconst open = ref(!props.component.collapsed)\n// Inside a form the section's actions run as field actions, so `$get` / `$set` work.\nconst sectionForm = useOptionalFormStore()\nconst pageContext = usePageActionContext()\nconst fieldContext = useFieldActionContext(() => props.component)\nconst context = computed(() => (sectionForm ? fieldContext.value : pageContext))\nconst heading = computed(() => headingTag(props.component.headingLevel))\nconst hasHeader = computed(() =>\n Boolean(\n props.component.heading ||\n props.component.description ||\n props.component.icon ||\n props.component.headerActions?.length ||\n props.component.afterHeader?.length,\n ),\n)\n\n// Stored after mounting, so the server render and hydration use the schema's default.\nonMounted(() => {\n const key = props.component.persistCollapsed\n\n if (!key) return\n\n const stored = readPersisted(key)\n\n if (stored !== null) open.value = stored !== 'collapsed'\n})\n\nfunction setOpen(next: boolean) {\n open.value = next\n\n if (props.component.persistCollapsed) {\n writePersisted(props.component.persistCollapsed, next ? 'expanded' : 'collapsed')\n }\n}\nconst hasFooterActions = computed(() => Boolean(props.component.footerActions?.length))\nconst hasFooter = computed(() => hasFooterActions.value || Boolean(props.component.footer?.length))\nconst t = useT()\n</script>\n\n<template>\n <Collapsible\n v-if=\"props.component.aside\"\n :open=\"!props.component.collapsible || open\"\n as-child\n @update:open=\"setOpen($event)\"\n >\n <section\n data-slot=\"section\"\n class=\"grid gap-6 lg:grid-cols-3\"\n v-bind=\"props.component.extraAttributes\"\n >\n <div v-if=\"hasHeader\" class=\"flex flex-wrap items-start gap-3 lg:col-span-1\">\n <Icon\n v-if=\"props.component.icon\"\n :name=\"props.component.icon\"\n class=\"text-muted-foreground mt-0.5 size-5\"\n />\n <div class=\"min-w-0 flex-1 basis-48\">\n <component\n :is=\"heading\"\n v-if=\"props.component.heading\"\n class=\"text-base leading-6 font-semibold break-words\"\n >\n {{ props.component.heading }}\n </component>\n <p\n v-if=\"props.component.description\"\n class=\"text-muted-foreground mt-1 text-sm break-words\"\n >\n {{ props.component.description }}\n </p>\n </div>\n <ActionList\n v-if=\"props.component.headerActions && props.component.headerActions.length > 0\"\n :actions=\"props.component.headerActions\"\n :context=\"context\"\n size=\"sm\"\n />\n <MixedContent :items=\"props.component.afterHeader\" name=\"section-after-header\" />\n <CollapsibleTrigger v-if=\"props.component.collapsible\" as-child>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :aria-label=\"t('toggle_section', {}, 'Toggle section')\"\n >\n <Icon\n name=\"alfakit::schemas.section.collapse-button\"\n :fallback=\"ChevronDownIcon\"\n :class=\"cn('transition-transform', open && 'rotate-180')\"\n />\n </Button>\n </CollapsibleTrigger>\n </div>\n <CollapsibleContent as-child>\n <div\n data-surface=\"section\"\n :class=\"\n cn(\n 'bg-card rounded-xl border shadow-xs lg:col-span-2',\n props.component.secondary && 'bg-muted/40',\n )\n \"\n >\n <div :class=\"cn('p-6', props.component.compact && 'p-4')\">\n <DeferredSchema v-slot=\"{ component: loaded }\" :component=\"props.component\">\n <SchemaRenderer\n :components=\"loaded.schema ?? []\"\n :columns=\"loaded.columns\"\n :class=\"schemaGapClass(loaded) || undefined\"\n />\n </DeferredSchema>\n </div>\n <div\n v-if=\"hasFooter\"\n data-slot=\"section-footer\"\n :class=\"\n cn(\n 'flex flex-wrap items-center gap-3 border-t px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <ActionList\n v-if=\"hasFooterActions\"\n :actions=\"props.component.footerActions!\"\n :context=\"context\"\n :class=\"actionsAlignmentClass(props.component.footerActionsAlignment) || undefined\"\n />\n <MixedContent :items=\"props.component.footer\" name=\"section-footer-content\" />\n </div>\n </div>\n </CollapsibleContent>\n </section>\n </Collapsible>\n <Collapsible\n v-else\n :open=\"!props.component.collapsible || open\"\n as-child\n @update:open=\"setOpen($event)\"\n >\n <section\n data-slot=\"section\"\n data-surface=\"section\"\n :class=\"cn('bg-card rounded-xl border shadow-xs', props.component.secondary && 'bg-muted/40')\"\n v-bind=\"props.component.extraAttributes\"\n >\n <div\n v-if=\"hasHeader\"\n :class=\"\n cn(\n 'flex flex-wrap items-start gap-3 border-b px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <Icon\n v-if=\"props.component.icon\"\n :name=\"props.component.icon\"\n class=\"text-muted-foreground mt-0.5 size-5\"\n />\n <div class=\"min-w-0 flex-1 basis-48\">\n <component\n :is=\"heading\"\n v-if=\"props.component.heading\"\n class=\"text-base leading-6 font-semibold break-words\"\n >\n {{ props.component.heading }}\n </component>\n <p\n v-if=\"props.component.description\"\n class=\"text-muted-foreground mt-1 text-sm break-words\"\n >\n {{ props.component.description }}\n </p>\n </div>\n <ActionList\n v-if=\"props.component.headerActions && props.component.headerActions.length > 0\"\n :actions=\"props.component.headerActions\"\n :context=\"context\"\n size=\"sm\"\n />\n <MixedContent :items=\"props.component.afterHeader\" name=\"section-after-header\" />\n <CollapsibleTrigger v-if=\"props.component.collapsible\" as-child>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :aria-label=\"t('toggle_section', {}, 'Toggle section')\"\n >\n <Icon\n name=\"alfakit::schemas.section.collapse-button\"\n :fallback=\"ChevronDownIcon\"\n :class=\"cn('transition-transform', open && 'rotate-180')\"\n />\n </Button>\n </CollapsibleTrigger>\n </div>\n <CollapsibleContent>\n <div :class=\"cn('p-6', props.component.compact && 'p-4')\">\n <DeferredSchema v-slot=\"{ component: loaded }\" :component=\"props.component\">\n <SchemaRenderer\n :components=\"loaded.schema ?? []\"\n :columns=\"loaded.columns\"\n :class=\"schemaGapClass(loaded) || undefined\"\n />\n </DeferredSchema>\n </div>\n <div\n v-if=\"hasFooter\"\n data-slot=\"section-footer\"\n :class=\"\n cn(\n 'flex flex-wrap items-center gap-3 border-t px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <ActionList\n v-if=\"hasFooterActions\"\n :actions=\"props.component.footerActions!\"\n :context=\"context\"\n :class=\"actionsAlignmentClass(props.component.footerActionsAlignment) || undefined\"\n />\n <MixedContent :items=\"props.component.footer\" name=\"section-footer-content\" />\n </div>\n </CollapsibleContent>\n </section>\n </Collapsible>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BA,IAAMqC,IAAQC,GACRC,IAAOC,EAAI,CAACH,EAAM,UAAU,SAAS,GAErCI,IAAcC,EAAqB,GACnCC,IAAcC,EAAqB,GACnCC,IAAeC,QAA4BT,EAAM,SAAS,GAC1DU,IAAUC,QAAgBP,IAAcI,EAAa,QAAQF,CAAY,GACzEM,IAAUD,QAAeE,EAAWb,EAAM,UAAU,YAAY,CAAC,GACjEc,IAAYH,QAChB,GACEX,EAAM,UAAU,WAChBA,EAAM,UAAU,eAChBA,EAAM,UAAU,QAChBA,EAAM,UAAU,eAAe,UAC/BA,EAAM,UAAU,aAAa,OAEjC;EAGA,QAAgB;GACd,IAAMe,IAAMf,EAAM,UAAU;GAE5B,IAAI,CAACe,GAAK;GAEV,IAAMC,IAASC,EAAcF,CAAG;GAEhC,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AM,CAAA;MACzB,SAASA,EAAO;MAChB,OAAK7D,EAAEX,EAAAyE,CAAA,CAAc,CAACD,CAAM,KAAK,KAAA,CAAS;;;;;;;IAKzC,GAAA,GAAA,CAAA,WAAA,CAAA,CAAA,GAAA,CAAA,GAAApB,EAAA,SADR3D,EAAA,GAAAM,EAiBM,OAAA;;KAfJ,aAAU;KACT,OAAKY,EAAeX,EAAAuE,CAAA,CAAE,CAAA,wDAAsFzC,EAAM,UAAU,WAAO,WAAA,CAAA;IAQ5H,GAAA,CAAAqB,EAAA,SADR1D,EAAA,GAAAC,EAKEY,GAAA;;KAHC,SAASwB,EAAM,UAAU;KACzB,SAASU,EAAA;KACT,OAAK7B,EAAEX,EAAA0E,CAAA,CAAqB,CAAC5C,EAAM,UAAU,sBAAsB,KAAK,KAAA,CAAS;;;;;IAEpFvB,CAAAA,KAAAA,EAAAA,IAAAA,EAAAA,GAAAA,EAA8EC,GAAA;KAA/D,OAAOsB,EAAM,UAAU;KAAQ,MAAK"}
1
+ {"version":3,"file":"SectionComponent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","Collapsible","_withCtx","_createElementVNode","_mergeProps","_createElementBlock","_unref","Icon","_createCommentVNode","_resolveDynamicComponent","_createTextVNode","_toDisplayString","ActionList","_createVNode","MixedContent","CollapsibleTrigger","Button","_normalizeClass","CollapsibleContent","DeferredSchema","SchemaRenderer","Icon_default","Button_default","ActionList_default","SchemaRenderer_default","DeferredSchema_default","Collapsible_default","CollapsibleContent_default","MixedContent_default","CollapsibleTrigger_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","SectionComponent_vue_vue_type_script_setup_true_lang_default","props","__props","open","ref","sectionForm","useOptionalFormStore","pageContext","usePageActionContext","fieldContext","useFieldActionContext","context","computed","heading","headingTag","hasHeader","key","stored","readPersisted","setOpen","next","writePersisted","hasFooterActions","hasFooter","t","useT","openBlock","createBlock","_cache","$event","withCtx","createElementVNode","mergeProps","createElementBlock","unref","createCommentVNode","resolveDynamicComponent","createTextVNode","toDisplayString","createVNode","ChevronDownIcon","normalizeClass","cn","loaded","schemaGapClass","actionsAlignmentClass"],"sources":["../../../src/components/layout/SectionComponent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { SectionSchema } from '@alfakit/core'\nimport {\n actionsAlignmentClass,\n headingTag,\n readPersisted,\n schemaGapClass,\n writePersisted,\n} from '@alfakit/core'\nimport { ChevronDownIcon } from '@lucide/vue'\nimport { computed, onMounted, ref } from 'vue'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport { usePageActionContext } from '../actions/action-context'\nimport { useOptionalFormStore } from '../form/form-context'\nimport { useFieldActionContext } from '../schema/field-actions'\nimport ActionList from '../actions/ActionList.vue'\nimport SchemaRenderer from '../schema/SchemaRenderer.vue'\nimport Button from '../ui/Button.vue'\nimport Collapsible from '../ui/Collapsible.vue'\nimport CollapsibleContent from '../ui/CollapsibleContent.vue'\nimport CollapsibleTrigger from '../ui/CollapsibleTrigger.vue'\nimport { useT } from '../../context'\nimport DeferredSchema from './DeferredSchema.vue'\nimport MixedContent from './MixedContent.vue'\n\nconst props = defineProps<{ component: SectionSchema }>()\nconst open = ref(!props.component.collapsed)\n// Inside a form the section's actions run as field actions, so `$get` / `$set` work.\nconst sectionForm = useOptionalFormStore()\nconst pageContext = usePageActionContext()\nconst fieldContext = useFieldActionContext(() => props.component)\nconst context = computed(() => (sectionForm ? fieldContext.value : pageContext))\nconst heading = computed(() => headingTag(props.component.headingLevel))\nconst hasHeader = computed(() =>\n Boolean(\n props.component.heading ||\n props.component.description ||\n props.component.icon ||\n props.component.headerActions?.length ||\n props.component.afterHeader?.length,\n ),\n)\n\n// Stored after mounting, so the server render and hydration use the schema's default.\nonMounted(() => {\n const key = props.component.persistCollapsed\n\n if (!key) return\n\n const stored = readPersisted(key)\n\n if (stored !== null) open.value = stored !== 'collapsed'\n})\n\nfunction setOpen(next: boolean) {\n open.value = next\n\n if (props.component.persistCollapsed) {\n writePersisted(props.component.persistCollapsed, next ? 'expanded' : 'collapsed')\n }\n}\nconst hasFooterActions = computed(() => Boolean(props.component.footerActions?.length))\nconst hasFooter = computed(() => hasFooterActions.value || Boolean(props.component.footer?.length))\nconst t = useT()\n</script>\n\n<template>\n <Collapsible\n v-if=\"props.component.aside\"\n :open=\"!props.component.collapsible || open\"\n as-child\n @update:open=\"setOpen($event)\"\n >\n <section\n data-slot=\"section\"\n class=\"grid gap-6 lg:grid-cols-3\"\n v-bind=\"props.component.extraAttributes\"\n >\n <div v-if=\"hasHeader\" class=\"flex flex-wrap items-start gap-3 lg:col-span-1\">\n <Icon\n v-if=\"props.component.icon\"\n :name=\"props.component.icon\"\n class=\"text-muted-foreground mt-0.5 size-5\"\n />\n <div class=\"min-w-0 flex-1 basis-48\">\n <component\n :is=\"heading\"\n v-if=\"props.component.heading\"\n class=\"text-base leading-6 font-semibold break-words\"\n >\n {{ props.component.heading }}\n </component>\n <p\n v-if=\"props.component.description\"\n class=\"text-muted-foreground mt-1 text-sm break-words\"\n >\n {{ props.component.description }}\n </p>\n </div>\n <ActionList\n v-if=\"props.component.headerActions && props.component.headerActions.length > 0\"\n :actions=\"props.component.headerActions\"\n :context=\"context\"\n size=\"sm\"\n />\n <MixedContent\n :items=\"props.component.afterHeader\"\n name=\"section-after-header\"\n :context=\"context\"\n />\n <CollapsibleTrigger v-if=\"props.component.collapsible\" as-child>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :aria-label=\"t('toggle_section', {}, 'Toggle section')\"\n >\n <Icon\n name=\"alfakit::schemas.section.collapse-button\"\n :fallback=\"ChevronDownIcon\"\n :class=\"cn('transition-transform', open && 'rotate-180')\"\n />\n </Button>\n </CollapsibleTrigger>\n </div>\n <CollapsibleContent as-child>\n <div\n data-surface=\"section\"\n :class=\"\n cn(\n 'bg-card rounded-xl border shadow-xs lg:col-span-2',\n props.component.secondary && 'bg-muted/40',\n )\n \"\n >\n <div :class=\"cn('p-6', props.component.compact && 'p-4')\">\n <DeferredSchema v-slot=\"{ component: loaded }\" :component=\"props.component\">\n <SchemaRenderer\n :components=\"loaded.schema ?? []\"\n :columns=\"loaded.columns\"\n :class=\"schemaGapClass(loaded) || undefined\"\n />\n </DeferredSchema>\n </div>\n <div\n v-if=\"hasFooter\"\n data-slot=\"section-footer\"\n :class=\"\n cn(\n 'flex flex-wrap items-center gap-3 border-t px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <ActionList\n v-if=\"hasFooterActions\"\n :actions=\"props.component.footerActions!\"\n :context=\"context\"\n :class=\"actionsAlignmentClass(props.component.footerActionsAlignment) || undefined\"\n />\n <MixedContent\n :items=\"props.component.footer\"\n name=\"section-footer-content\"\n :context=\"context\"\n />\n </div>\n </div>\n </CollapsibleContent>\n </section>\n </Collapsible>\n <Collapsible\n v-else\n :open=\"!props.component.collapsible || open\"\n as-child\n @update:open=\"setOpen($event)\"\n >\n <section\n data-slot=\"section\"\n data-surface=\"section\"\n :class=\"cn('bg-card rounded-xl border shadow-xs', props.component.secondary && 'bg-muted/40')\"\n v-bind=\"props.component.extraAttributes\"\n >\n <div\n v-if=\"hasHeader\"\n :class=\"\n cn(\n 'flex flex-wrap items-start gap-3 border-b px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <Icon\n v-if=\"props.component.icon\"\n :name=\"props.component.icon\"\n class=\"text-muted-foreground mt-0.5 size-5\"\n />\n <div class=\"min-w-0 flex-1 basis-48\">\n <component\n :is=\"heading\"\n v-if=\"props.component.heading\"\n class=\"text-base leading-6 font-semibold break-words\"\n >\n {{ props.component.heading }}\n </component>\n <p\n v-if=\"props.component.description\"\n class=\"text-muted-foreground mt-1 text-sm break-words\"\n >\n {{ props.component.description }}\n </p>\n </div>\n <ActionList\n v-if=\"props.component.headerActions && props.component.headerActions.length > 0\"\n :actions=\"props.component.headerActions\"\n :context=\"context\"\n size=\"sm\"\n />\n <MixedContent\n :items=\"props.component.afterHeader\"\n name=\"section-after-header\"\n :context=\"context\"\n />\n <CollapsibleTrigger v-if=\"props.component.collapsible\" as-child>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :aria-label=\"t('toggle_section', {}, 'Toggle section')\"\n >\n <Icon\n name=\"alfakit::schemas.section.collapse-button\"\n :fallback=\"ChevronDownIcon\"\n :class=\"cn('transition-transform', open && 'rotate-180')\"\n />\n </Button>\n </CollapsibleTrigger>\n </div>\n <CollapsibleContent>\n <div :class=\"cn('p-6', props.component.compact && 'p-4')\">\n <DeferredSchema v-slot=\"{ component: loaded }\" :component=\"props.component\">\n <SchemaRenderer\n :components=\"loaded.schema ?? []\"\n :columns=\"loaded.columns\"\n :class=\"schemaGapClass(loaded) || undefined\"\n />\n </DeferredSchema>\n </div>\n <div\n v-if=\"hasFooter\"\n data-slot=\"section-footer\"\n :class=\"\n cn(\n 'flex flex-wrap items-center gap-3 border-t px-6 py-4',\n props.component.compact && 'px-4 py-3',\n )\n \"\n >\n <ActionList\n v-if=\"hasFooterActions\"\n :actions=\"props.component.footerActions!\"\n :context=\"context\"\n :class=\"actionsAlignmentClass(props.component.footerActionsAlignment) || undefined\"\n />\n <MixedContent\n :items=\"props.component.footer\"\n name=\"section-footer-content\"\n :context=\"context\"\n />\n </div>\n </CollapsibleContent>\n </section>\n </Collapsible>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BA,IAAMqC,IAAQC,GACRC,IAAOC,EAAI,CAACH,EAAM,UAAU,SAAS,GAErCI,IAAcC,EAAqB,GACnCC,IAAcC,EAAqB,GACnCC,IAAeC,QAA4BT,EAAM,SAAS,GAC1DU,IAAUC,QAAgBP,IAAcI,EAAa,QAAQF,CAAY,GACzEM,IAAUD,QAAeE,EAAWb,EAAM,UAAU,YAAY,CAAC,GACjEc,IAAYH,QAChB,GACEX,EAAM,UAAU,WAChBA,EAAM,UAAU,eAChBA,EAAM,UAAU,QAChBA,EAAM,UAAU,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