@aleph-alpha/settings-kit 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +489 -2
  3. package/dist/SkLayout.vue_vue_type_script_setup_true_lang-ZjV2AMdR.js +51 -0
  4. package/dist/SkLayoutPage-DGbCpQFm.js +2545 -0
  5. package/dist/UseFileConvertor-DN6cCXNi.js +50 -0
  6. package/dist/components/SkField/SkField.vue.d.ts +28 -0
  7. package/dist/components/SkField/SkField.vue.d.ts.map +1 -0
  8. package/dist/components/SkField/index.d.ts +2 -0
  9. package/dist/components/SkField/index.d.ts.map +1 -0
  10. package/dist/components/SkGroup/SkGroup.vue.d.ts +29 -0
  11. package/dist/components/SkGroup/SkGroup.vue.d.ts.map +1 -0
  12. package/dist/components/SkGroup/index.d.ts +2 -0
  13. package/dist/components/SkGroup/index.d.ts.map +1 -0
  14. package/dist/components/SkItem/SkItem.vue.d.ts +22 -0
  15. package/dist/components/SkItem/SkItem.vue.d.ts.map +1 -0
  16. package/dist/components/SkItem/index.d.ts +2 -0
  17. package/dist/components/SkItem/index.d.ts.map +1 -0
  18. package/dist/components/SkLayout/SkLayout.vue.d.ts +53 -0
  19. package/dist/components/SkLayout/SkLayout.vue.d.ts.map +1 -0
  20. package/dist/components/SkLayout/SkLayoutPage.d.ts +23 -0
  21. package/dist/components/SkLayout/SkLayoutPage.d.ts.map +1 -0
  22. package/dist/components/SkLayout/context.d.ts +61 -0
  23. package/dist/components/SkLayout/context.d.ts.map +1 -0
  24. package/dist/components/SkLayout/index.d.ts +5 -0
  25. package/dist/components/SkLayout/index.d.ts.map +1 -0
  26. package/dist/components/SkPage/SkPage.vue.d.ts +35 -0
  27. package/dist/components/SkPage/SkPage.vue.d.ts.map +1 -0
  28. package/dist/components/SkPage/index.d.ts +2 -0
  29. package/dist/components/SkPage/index.d.ts.map +1 -0
  30. package/dist/components/SkSection/SkSection.vue.d.ts +29 -0
  31. package/dist/components/SkSection/SkSection.vue.d.ts.map +1 -0
  32. package/dist/components/SkSection/index.d.ts +2 -0
  33. package/dist/components/SkSection/index.d.ts.map +1 -0
  34. package/dist/components/controls/SkActionsControl/SkActionsControl.vue.d.ts +37 -0
  35. package/dist/components/controls/SkActionsControl/SkActionsControl.vue.d.ts.map +1 -0
  36. package/dist/components/controls/SkActionsControl/index.d.ts +2 -0
  37. package/dist/components/controls/SkActionsControl/index.d.ts.map +1 -0
  38. package/dist/components/controls/SkCheckboxControl/SkCheckboxControl.vue.d.ts +35 -0
  39. package/dist/components/controls/SkCheckboxControl/SkCheckboxControl.vue.d.ts.map +1 -0
  40. package/dist/components/controls/SkCheckboxControl/index.d.ts +2 -0
  41. package/dist/components/controls/SkCheckboxControl/index.d.ts.map +1 -0
  42. package/dist/components/controls/SkColorControl/SkColorControl.vue.d.ts +35 -0
  43. package/dist/components/controls/SkColorControl/SkColorControl.vue.d.ts.map +1 -0
  44. package/dist/components/controls/SkColorControl/index.d.ts +2 -0
  45. package/dist/components/controls/SkColorControl/index.d.ts.map +1 -0
  46. package/dist/components/controls/SkFileUpload/SkFilePlaceholder.vue.d.ts +11 -0
  47. package/dist/components/controls/SkFileUpload/SkFilePlaceholder.vue.d.ts.map +1 -0
  48. package/dist/components/controls/SkFileUpload/SkFileUpload.vue.d.ts +46 -0
  49. package/dist/components/controls/SkFileUpload/SkFileUpload.vue.d.ts.map +1 -0
  50. package/dist/components/controls/SkFileUpload/index.d.ts +2 -0
  51. package/dist/components/controls/SkFileUpload/index.d.ts.map +1 -0
  52. package/dist/components/controls/SkPeriodControl/SkPeriodControl.vue.d.ts +35 -0
  53. package/dist/components/controls/SkPeriodControl/SkPeriodControl.vue.d.ts.map +1 -0
  54. package/dist/components/controls/SkPeriodControl/index.d.ts +2 -0
  55. package/dist/components/controls/SkPeriodControl/index.d.ts.map +1 -0
  56. package/dist/components/controls/SkSelectControl/SkSelectControl.vue.d.ts +40 -0
  57. package/dist/components/controls/SkSelectControl/SkSelectControl.vue.d.ts.map +1 -0
  58. package/dist/components/controls/SkSelectControl/index.d.ts +2 -0
  59. package/dist/components/controls/SkSelectControl/index.d.ts.map +1 -0
  60. package/dist/components/controls/SkTelControl/SKTelPrefixControl.vue.d.ts +16 -0
  61. package/dist/components/controls/SkTelControl/SKTelPrefixControl.vue.d.ts.map +1 -0
  62. package/dist/components/controls/SkTelControl/SkTelControl.vue.d.ts +35 -0
  63. package/dist/components/controls/SkTelControl/SkTelControl.vue.d.ts.map +1 -0
  64. package/dist/components/controls/SkTelControl/index.d.ts +4 -0
  65. package/dist/components/controls/SkTelControl/index.d.ts.map +1 -0
  66. package/dist/components/controls/SkTelControl/prefixes.d.ts +26 -0
  67. package/dist/components/controls/SkTelControl/prefixes.d.ts.map +1 -0
  68. package/dist/components/controls/SkTextControl/SkTextControl.vue.d.ts +45 -0
  69. package/dist/components/controls/SkTextControl/SkTextControl.vue.d.ts.map +1 -0
  70. package/dist/components/controls/SkTextControl/index.d.ts +2 -0
  71. package/dist/components/controls/SkTextControl/index.d.ts.map +1 -0
  72. package/dist/components/controls/SkUnsupportedControl/SkUnsupportedControl.vue.d.ts +8 -0
  73. package/dist/components/controls/SkUnsupportedControl/SkUnsupportedControl.vue.d.ts.map +1 -0
  74. package/dist/components/controls/storyEventLog.d.ts +33 -0
  75. package/dist/components/controls/storyEventLog.d.ts.map +1 -0
  76. package/dist/components/index.d.ts +8 -0
  77. package/dist/components/index.d.ts.map +1 -0
  78. package/dist/components/index.js +14 -0
  79. package/dist/composables/UseFileConvertor/UseFileConvertor.d.ts +7 -0
  80. package/dist/composables/UseFileConvertor/UseFileConvertor.d.ts.map +1 -0
  81. package/dist/composables/index.d.ts +14 -0
  82. package/dist/composables/index.d.ts.map +1 -0
  83. package/dist/composables/useFieldInheritance/useFieldInheritance.d.ts +24 -0
  84. package/dist/composables/useFieldInheritance/useFieldInheritance.d.ts.map +1 -0
  85. package/dist/composables/useFieldValidator/useFieldValidator.d.ts +50 -0
  86. package/dist/composables/useFieldValidator/useFieldValidator.d.ts.map +1 -0
  87. package/dist/composables/useSettingField/useSettingField.d.ts +24 -0
  88. package/dist/composables/useSettingField/useSettingField.d.ts.map +1 -0
  89. package/dist/composables/useSettingsForm/useSettingsForm.d.ts +12 -0
  90. package/dist/composables/useSettingsForm/useSettingsForm.d.ts.map +1 -0
  91. package/dist/composables/useSettingsLayout/useSettingsLayout.d.ts +71 -0
  92. package/dist/composables/useSettingsLayout/useSettingsLayout.d.ts.map +1 -0
  93. package/dist/composables/useSettingsLocale/useSettingsLocale.d.ts +38 -0
  94. package/dist/composables/useSettingsLocale/useSettingsLocale.d.ts.map +1 -0
  95. package/dist/composables/useStateManager/useStateManager.d.ts +10 -0
  96. package/dist/composables/useStateManager/useStateManager.d.ts.map +1 -0
  97. package/dist/core/controls/controlDefinitions.d.ts +33 -0
  98. package/dist/core/controls/controlDefinitions.d.ts.map +1 -0
  99. package/dist/core/controls/index.d.ts +26 -0
  100. package/dist/core/controls/index.d.ts.map +1 -0
  101. package/dist/core/index.d.ts +18 -0
  102. package/dist/core/index.d.ts.map +1 -0
  103. package/dist/core/layout/index.d.ts +8 -0
  104. package/dist/core/layout/index.d.ts.map +1 -0
  105. package/dist/core/layout/navigation.d.ts +33 -0
  106. package/dist/core/layout/navigation.d.ts.map +1 -0
  107. package/dist/core/layout/resolve.d.ts +41 -0
  108. package/dist/core/layout/resolve.d.ts.map +1 -0
  109. package/dist/core/layout/types.d.ts +160 -0
  110. package/dist/core/layout/types.d.ts.map +1 -0
  111. package/dist/core/layout/validate.d.ts +26 -0
  112. package/dist/core/layout/validate.d.ts.map +1 -0
  113. package/dist/core/types.d.ts +541 -0
  114. package/dist/core/types.d.ts.map +1 -0
  115. package/dist/core/useControlModel.d.ts +13 -0
  116. package/dist/core/useControlModel.d.ts.map +1 -0
  117. package/dist/core/utils/a11y.d.ts +25 -0
  118. package/dist/core/utils/a11y.d.ts.map +1 -0
  119. package/dist/core/utils/cast.d.ts +8 -0
  120. package/dist/core/utils/cast.d.ts.map +1 -0
  121. package/dist/core/utils/consts.d.ts +978 -0
  122. package/dist/core/utils/consts.d.ts.map +1 -0
  123. package/dist/core/utils/kitMessages.d.ts +165 -0
  124. package/dist/core/utils/kitMessages.d.ts.map +1 -0
  125. package/dist/core/utils/localizedText.d.ts +10 -0
  126. package/dist/core/utils/localizedText.d.ts.map +1 -0
  127. package/dist/core/utils/useName.d.ts +7 -0
  128. package/dist/core/utils/useName.d.ts.map +1 -0
  129. package/dist/core/validate/constraints.d.ts +20 -0
  130. package/dist/core/validate/constraints.d.ts.map +1 -0
  131. package/dist/core/validate/rules.d.ts +29 -0
  132. package/dist/core/validate/rules.d.ts.map +1 -0
  133. package/dist/favicon.ico +0 -0
  134. package/dist/generators/defineSettingUnit.d.ts +12 -0
  135. package/dist/generators/defineSettingUnit.d.ts.map +1 -0
  136. package/dist/generators/index.d.ts +2 -0
  137. package/dist/generators/index.d.ts.map +1 -0
  138. package/dist/generators/index.js +13 -0
  139. package/dist/index-BQ6z6MK4.js +214 -0
  140. package/dist/index-BXs-0JdT.js +168 -0
  141. package/dist/index-BynIH0EE.js +92 -0
  142. package/dist/index-C-WLhRod.js +100 -0
  143. package/dist/index-CFMv8jSO.js +4 -0
  144. package/dist/index-CGYERet5.js +373 -0
  145. package/dist/index-KAbhkO1J.js +81 -0
  146. package/dist/index.d.ts +11 -0
  147. package/dist/index.d.ts.map +1 -0
  148. package/dist/index.js +52 -0
  149. package/dist/service/index.d.ts +2 -0
  150. package/dist/service/index.d.ts.map +1 -0
  151. package/dist/shell/SkShell.vue.d.ts +80 -0
  152. package/dist/shell/SkShell.vue.d.ts.map +1 -0
  153. package/dist/shell/SkShellFrame.vue.d.ts +46 -0
  154. package/dist/shell/SkShellFrame.vue.d.ts.map +1 -0
  155. package/dist/shell/SkShellNav.vue.d.ts +19 -0
  156. package/dist/shell/SkShellNav.vue.d.ts.map +1 -0
  157. package/dist/shell/history.d.ts +9 -0
  158. package/dist/shell/history.d.ts.map +1 -0
  159. package/dist/shell/index.d.ts +12 -0
  160. package/dist/shell/index.d.ts.map +1 -0
  161. package/dist/shell/index.js +848 -0
  162. package/dist/shell/labels.d.ts +25 -0
  163. package/dist/shell/labels.d.ts.map +1 -0
  164. package/dist/shell/location.d.ts +18 -0
  165. package/dist/shell/location.d.ts.map +1 -0
  166. package/dist/shell/routes.d.ts +19 -0
  167. package/dist/shell/routes.d.ts.map +1 -0
  168. package/dist/shell/useMediaQuery.d.ts +4 -0
  169. package/dist/shell/useMediaQuery.d.ts.map +1 -0
  170. package/dist/shell/useShellLocation.d.ts +37 -0
  171. package/dist/shell/useShellLocation.d.ts.map +1 -0
  172. package/dist/types.d.ts +17 -0
  173. package/dist/types.d.ts.map +1 -0
  174. package/package.json +110 -3
@@ -0,0 +1,373 @@
1
+ import { defineAsyncComponent, defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString, normalizeStyle, createCommentVNode, nextTick, createElementBlock, Fragment, renderSlot, mergeProps, mergeDefaults } from "vue";
2
+ import { UiDropdownMenu, UiDropdownMenuTrigger, UiInputGroupButton, UiIcon, UiDropdownMenuContent, UiListbox, UiListboxFilter, UiDropdownMenuSeparator, UiListboxContent, UiListboxVirtualizer, UiDropdownMenuItem, UiInputGroup, UiInputGroupAddon, UiInputGroupInput } from "@aleph-alpha/ui-library";
3
+ import { U as skCountries, I as useSettingsLocale, N as useControlModel, O as useName, P as useA11yAttrs, Q as skBaseControlDefaults } from "./SkLayoutPage-DGbCpQFm.js";
4
+ import { ChevronDownIcon, SearchIcon, CheckIcon } from "@aleph-alpha/ui-library/icons";
5
+ function getCountryFlag(code) {
6
+ const country = skCountries[code];
7
+ if (!country) {
8
+ throw new Error(`No flag icon for country code "${code}"`);
9
+ }
10
+ return defineAsyncComponent(async () => {
11
+ const icons = await import("@aleph-alpha/ui-library/icons");
12
+ const icon = icons[country.flag];
13
+ if (!icon) {
14
+ throw new Error(`No flag icon for country code "${code}"`);
15
+ }
16
+ return icon;
17
+ });
18
+ }
19
+ const englishNames = new Intl.DisplayNames(["en"], { type: "region" });
20
+ function createCountryNames(locales) {
21
+ let names = englishNames;
22
+ try {
23
+ names = new Intl.DisplayNames(
24
+ [...new Set([...locales, "en"].filter((l) => !!l))],
25
+ { type: "region" }
26
+ );
27
+ } catch {
28
+ }
29
+ return (code) => names.of(code) ?? code;
30
+ }
31
+ const dialPrefixes = Object.entries(skCountries).map(
32
+ ([code, country]) => ({
33
+ code,
34
+ dialCode: country.number,
35
+ icon: getCountryFlag(code)
36
+ })
37
+ );
38
+ const prefixByCode = new Map(
39
+ dialPrefixes.map((prefix) => [prefix.code, prefix])
40
+ );
41
+ function findPrefixByCode(code) {
42
+ return prefixByCode.get(code);
43
+ }
44
+ const germany = findPrefixByCode("DE");
45
+ if (!germany) {
46
+ throw new Error("skCountries must contain the DE default prefix");
47
+ }
48
+ const defaultPrefix = germany;
49
+ const prefixesByDialCodeLength = [...dialPrefixes].sort(
50
+ (a, b) => b.dialCode.length - a.dialCode.length
51
+ );
52
+ function normalizeTel(value) {
53
+ return value.replace(/[\s().-]/g, "");
54
+ }
55
+ function parseTel(value) {
56
+ const normalized = normalizeTel(value);
57
+ if (!normalized.startsWith("+")) {
58
+ return { national: value };
59
+ }
60
+ const prefix = prefixesByDialCodeLength.find(
61
+ (candidate) => normalized.startsWith(candidate.dialCode)
62
+ );
63
+ if (!prefix) {
64
+ return { national: value };
65
+ }
66
+ return { prefix, national: normalized.slice(prefix.dialCode.length) };
67
+ }
68
+ function composeTel(dialCode, national) {
69
+ const digits = normalizeTel(national).replace(/\D/g, "").replace(/^0+/, "");
70
+ return digits ? `${dialCode}${digits}` : "";
71
+ }
72
+ const _hoisted_1 = { class: "tabular-nums body-m-regular !font-medium text-content-on-surface-primary" };
73
+ const _hoisted_2 = { class: "flex items-center gap-2 px-3" };
74
+ const _hoisted_3 = { class: "flex-1 body-s-regular text-content-on-surface-primary" };
75
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
76
+ ...{
77
+ name: "SkTelPrefixControl"
78
+ },
79
+ __name: "SKTelPrefixControl",
80
+ props: {
81
+ modelValue: { default: void 0 },
82
+ disabled: { type: Boolean, default: false }
83
+ },
84
+ emits: ["update:modelValue"],
85
+ setup(__props, { emit: __emit }) {
86
+ const props = __props;
87
+ const emit = __emit;
88
+ const open = ref(false);
89
+ const internalCode = ref(defaultPrefix.code);
90
+ const prefixCode = computed({
91
+ get: () => props.modelValue ?? internalCode.value,
92
+ set: (value) => {
93
+ internalCode.value = value;
94
+ emit("update:modelValue", value);
95
+ }
96
+ });
97
+ const { message, locale, fallbackLocale } = useSettingsLocale();
98
+ const countryName = computed(
99
+ () => createCountryNames([locale.value, fallbackLocale.value])
100
+ );
101
+ const selectedPrefix = computed(
102
+ () => findPrefixByCode(prefixCode.value) ?? defaultPrefix
103
+ );
104
+ const prefixCodes = dialPrefixes.map((prefix) => prefix.code);
105
+ const query = ref("");
106
+ const filteredCodes = computed(() => {
107
+ const q = query.value.trim().toLowerCase();
108
+ if (!q) return prefixCodes;
109
+ return dialPrefixes.filter(
110
+ (prefix) => countryName.value(prefix.code).toLowerCase().includes(q) || prefix.dialCode.includes(q)
111
+ ).map((prefix) => prefix.code);
112
+ });
113
+ function prefixFor(code) {
114
+ return findPrefixByCode(code) ?? defaultPrefix;
115
+ }
116
+ function selectPrefix(code) {
117
+ prefixCode.value = code;
118
+ }
119
+ const trigger = ref(null);
120
+ const filter = ref(null);
121
+ const menuStyle = ref();
122
+ const alignOffset = ref(0);
123
+ watch(open, (isOpen) => {
124
+ if (!isOpen) return;
125
+ query.value = "";
126
+ const triggerEl = trigger.value?.$el;
127
+ const groupEl = triggerEl?.closest('[data-slot="input-group"]');
128
+ if (!triggerEl || !groupEl) return;
129
+ const groupRect = groupEl.getBoundingClientRect();
130
+ if (groupRect.width > 0) {
131
+ menuStyle.value = { width: `${groupRect.width}px` };
132
+ alignOffset.value = groupRect.left - triggerEl.getBoundingClientRect().left;
133
+ }
134
+ });
135
+ function focusFilter(event) {
136
+ event.preventDefault();
137
+ void nextTick(() => {
138
+ filter.value?.$el?.focus();
139
+ });
140
+ }
141
+ return (_ctx, _cache) => {
142
+ return openBlock(), createBlock(unref(UiDropdownMenu), {
143
+ open: open.value,
144
+ "onUpdate:open": _cache[2] || (_cache[2] = ($event) => open.value = $event)
145
+ }, {
146
+ default: withCtx(() => [
147
+ createVNode(unref(UiDropdownMenuTrigger), { "as-child": "" }, {
148
+ default: withCtx(() => [
149
+ createVNode(unref(UiInputGroupButton), {
150
+ ref_key: "trigger",
151
+ ref: trigger,
152
+ disabled: __props.disabled,
153
+ "aria-label": unref(message)("tel.countryCode", {
154
+ country: countryName.value(selectedPrefix.value.code),
155
+ dialCode: selectedPrefix.value.dialCode
156
+ })
157
+ }, {
158
+ default: withCtx(() => [
159
+ createVNode(unref(UiIcon), {
160
+ name: selectedPrefix.value.icon,
161
+ size: 16,
162
+ class: "shrink-0"
163
+ }, null, 8, ["name"]),
164
+ createElementVNode("span", _hoisted_1, toDisplayString(selectedPrefix.value.dialCode), 1),
165
+ createVNode(unref(UiIcon), {
166
+ name: unref(ChevronDownIcon),
167
+ class: "shrink-0 text-content-on-surface-primary"
168
+ }, null, 8, ["name"])
169
+ ]),
170
+ _: 1
171
+ }, 8, ["disabled", "aria-label"])
172
+ ]),
173
+ _: 1
174
+ }),
175
+ createVNode(unref(UiDropdownMenuContent), {
176
+ align: "start",
177
+ "align-offset": alignOffset.value,
178
+ style: normalizeStyle(menuStyle.value),
179
+ class: "!p-0 !shadow-md",
180
+ onOpenAutoFocus: focusFilter
181
+ }, {
182
+ default: withCtx(() => [
183
+ createVNode(unref(UiListbox), {
184
+ modelValue: prefixCode.value,
185
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => prefixCode.value = $event),
186
+ "highlight-on-hover": ""
187
+ }, {
188
+ default: withCtx(() => [
189
+ createElementVNode("div", _hoisted_2, [
190
+ createVNode(unref(UiIcon), {
191
+ name: unref(SearchIcon),
192
+ size: 16,
193
+ class: "text-content-on-surface-muted shrink-0"
194
+ }, null, 8, ["name"]),
195
+ createVNode(unref(UiListboxFilter), {
196
+ ref_key: "filter",
197
+ ref: filter,
198
+ modelValue: query.value,
199
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => query.value = $event),
200
+ placeholder: unref(message)("tel.search"),
201
+ "aria-label": unref(message)("tel.searchCountry"),
202
+ class: "px-0"
203
+ }, null, 8, ["modelValue", "placeholder", "aria-label"])
204
+ ]),
205
+ createVNode(unref(UiDropdownMenuSeparator)),
206
+ createVNode(unref(UiListboxContent), {
207
+ "aria-label": unref(message)("tel.countryCodes")
208
+ }, {
209
+ default: withCtx(() => [
210
+ createVNode(unref(UiListboxVirtualizer), {
211
+ options: filteredCodes.value,
212
+ "estimate-size": 36,
213
+ "text-content": (code) => countryName.value(code)
214
+ }, {
215
+ default: withCtx(({ option }) => [
216
+ createVNode(unref(UiDropdownMenuItem), {
217
+ class: "px-3 py-2",
218
+ "text-value": countryName.value(option),
219
+ onSelect: ($event) => selectPrefix(option)
220
+ }, {
221
+ default: withCtx(() => [
222
+ createVNode(unref(UiIcon), {
223
+ size: "s",
224
+ name: prefixFor(option).icon
225
+ }, null, 8, ["name"]),
226
+ createElementVNode("span", _hoisted_3, toDisplayString(countryName.value(option)) + " (" + toDisplayString(prefixFor(option).dialCode) + ")", 1),
227
+ option === prefixCode.value ? (openBlock(), createBlock(unref(UiIcon), {
228
+ key: 0,
229
+ name: unref(CheckIcon),
230
+ size: "s",
231
+ class: "shrink-0"
232
+ }, null, 8, ["name"])) : createCommentVNode("", true)
233
+ ]),
234
+ _: 2
235
+ }, 1032, ["text-value", "onSelect"])
236
+ ]),
237
+ _: 1
238
+ }, 8, ["options", "text-content"])
239
+ ]),
240
+ _: 1
241
+ }, 8, ["aria-label"])
242
+ ]),
243
+ _: 1
244
+ }, 8, ["modelValue"])
245
+ ]),
246
+ _: 1
247
+ }, 8, ["align-offset", "style"])
248
+ ]),
249
+ _: 1
250
+ }, 8, ["open"]);
251
+ };
252
+ }
253
+ });
254
+ const _sfc_main = /* @__PURE__ */ defineComponent({
255
+ ...{
256
+ name: "SkTelControl",
257
+ inheritAttrs: false
258
+ },
259
+ __name: "SkTelControl",
260
+ props: /* @__PURE__ */ mergeDefaults({
261
+ modelValue: {},
262
+ id: {},
263
+ name: {},
264
+ placeholder: {},
265
+ disabled: { type: Boolean },
266
+ inheriting: { type: Boolean },
267
+ required: { type: Boolean },
268
+ label: {},
269
+ tooltip: {},
270
+ errors: {}
271
+ }, {
272
+ ...skBaseControlDefaults
273
+ }),
274
+ emits: ["update:modelValue", "change"],
275
+ setup(__props, { emit: __emit }) {
276
+ const props = __props;
277
+ const emit = __emit;
278
+ const model = useControlModel(props, emit, "");
279
+ const controlName = useName(props?.name ?? props?.id);
280
+ const a11yAttrs = useA11yAttrs([
281
+ "aria-label",
282
+ "aria-labelledby",
283
+ "aria-describedby",
284
+ "aria-invalid",
285
+ "aria-required",
286
+ "aria-errormessage"
287
+ ]);
288
+ const prefixCode = ref(defaultPrefix.code);
289
+ const nationalNumber = ref("");
290
+ const selectedDialCode = computed(
291
+ () => (findPrefixByCode(prefixCode.value) ?? defaultPrefix).dialCode
292
+ );
293
+ const composedTel = computed(
294
+ () => composeTel(selectedDialCode.value, nationalNumber.value)
295
+ );
296
+ watch(
297
+ () => model.value ?? "",
298
+ (value) => {
299
+ if (value === composedTel.value) return;
300
+ const { prefix, national } = parseTel(value);
301
+ if (prefix) {
302
+ prefixCode.value = prefix.code;
303
+ }
304
+ nationalNumber.value = national;
305
+ },
306
+ { immediate: true }
307
+ );
308
+ function handleNationalInput(value) {
309
+ const { prefix, national } = parseTel(value);
310
+ if (prefix) {
311
+ prefixCode.value = prefix.code;
312
+ }
313
+ nationalNumber.value = national;
314
+ model.value = composedTel.value;
315
+ }
316
+ function handlePrefixChange() {
317
+ model.value = composedTel.value;
318
+ emit("change", composedTel.value);
319
+ }
320
+ const nationalInput = computed({
321
+ get: () => nationalNumber.value,
322
+ set: (value) => handleNationalInput(String(value ?? ""))
323
+ });
324
+ return (_ctx, _cache) => {
325
+ return openBlock(), createElementBlock(Fragment, null, [
326
+ renderSlot(_ctx.$slots, "label"),
327
+ createVNode(unref(UiInputGroup), null, {
328
+ default: withCtx(() => [
329
+ createVNode(unref(UiInputGroupAddon), { align: "inline-start" }, {
330
+ default: withCtx(() => [
331
+ createVNode(_sfc_main$1, {
332
+ modelValue: prefixCode.value,
333
+ "onUpdate:modelValue": [
334
+ _cache[0] || (_cache[0] = ($event) => prefixCode.value = $event),
335
+ handlePrefixChange
336
+ ],
337
+ disabled: __props.disabled
338
+ }, null, 8, ["modelValue", "disabled"])
339
+ ]),
340
+ _: 1
341
+ }),
342
+ createVNode(unref(UiInputGroupInput), mergeProps({
343
+ id: __props.id,
344
+ modelValue: nationalInput.value,
345
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => nationalInput.value = $event)
346
+ }, unref(a11yAttrs), {
347
+ type: "tel",
348
+ name: unref(controlName),
349
+ placeholder: __props.placeholder,
350
+ disabled: __props.disabled,
351
+ required: __props.required,
352
+ onChange: _cache[2] || (_cache[2] = ($event) => emit("change", composedTel.value))
353
+ }), null, 16, ["id", "modelValue", "name", "placeholder", "disabled", "required"])
354
+ ]),
355
+ _: 1
356
+ }),
357
+ renderSlot(_ctx.$slots, "error")
358
+ ], 64);
359
+ };
360
+ }
361
+ });
362
+ export {
363
+ _sfc_main as SkTelControl,
364
+ _sfc_main$1 as SkTelPrefixControl,
365
+ composeTel,
366
+ createCountryNames,
367
+ defaultPrefix,
368
+ dialPrefixes,
369
+ findPrefixByCode,
370
+ getCountryFlag,
371
+ normalizeTel,
372
+ parseTel
373
+ };
@@ -0,0 +1,81 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderSlot, createElementVNode, mergeProps, unref, renderList, createBlock, withCtx, createTextVNode, toDisplayString, mergeDefaults } from "vue";
2
+ import { UiButton } from "@aleph-alpha/ui-library";
3
+ import { P as useA11yAttrs, I as useSettingsLocale, Q as skBaseControlDefaults } from "./SkLayoutPage-DGbCpQFm.js";
4
+ const _hoisted_1 = ["id", "aria-label"];
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ ...{
7
+ name: "SkActionsControl",
8
+ inheritAttrs: false
9
+ },
10
+ __name: "SkActionsControl",
11
+ props: /* @__PURE__ */ mergeDefaults({
12
+ options: {},
13
+ modelValue: {},
14
+ id: {},
15
+ name: {},
16
+ placeholder: {},
17
+ disabled: { type: Boolean },
18
+ inheriting: { type: Boolean },
19
+ required: { type: Boolean },
20
+ label: {},
21
+ tooltip: {},
22
+ errors: {}
23
+ }, {
24
+ ...skBaseControlDefaults,
25
+ options: () => []
26
+ }),
27
+ emits: ["action"],
28
+ setup(__props, { emit: __emit }) {
29
+ const props = __props;
30
+ const emit = __emit;
31
+ const a11yAttrs = useA11yAttrs([
32
+ "aria-label",
33
+ "aria-labelledby",
34
+ "aria-describedby",
35
+ "aria-errormessage"
36
+ ]);
37
+ const { resolveText } = useSettingsLocale();
38
+ const buttons = computed(
39
+ () => props.options.map((option, index) => ({
40
+ method: option.value,
41
+ label: resolveText(option.label),
42
+ disabled: props.disabled || option.disabled === true,
43
+ // The last option is the primary action; the ones before it are quiet.
44
+ variant: index === props.options.length - 1 ? "default" : "ghost",
45
+ type: index === props.options.length - 1 ? "submit" : "button"
46
+ }))
47
+ );
48
+ function press(method) {
49
+ emit("action", method);
50
+ }
51
+ return (_ctx, _cache) => {
52
+ return openBlock(), createElementBlock(Fragment, null, [
53
+ renderSlot(_ctx.$slots, "label"),
54
+ createElementVNode("div", mergeProps({
55
+ id: __props.id,
56
+ role: "group",
57
+ "aria-label": unref(a11yAttrs)["aria-labelledby"] ? void 0 : __props.label || void 0
58
+ }, unref(a11yAttrs), { class: "flex flex-wrap justify-end gap-2" }), [
59
+ (openBlock(true), createElementBlock(Fragment, null, renderList(buttons.value, (button, index) => {
60
+ return openBlock(), createBlock(unref(UiButton), {
61
+ key: `${index}-${button.method}`,
62
+ type: button.type,
63
+ variant: button.variant,
64
+ disabled: button.disabled,
65
+ onClick: ($event) => press(button.method)
66
+ }, {
67
+ default: withCtx(() => [
68
+ createTextVNode(toDisplayString(button.label), 1)
69
+ ]),
70
+ _: 2
71
+ }, 1032, ["type", "variant", "disabled", "onClick"]);
72
+ }), 128))
73
+ ], 16, _hoisted_1),
74
+ renderSlot(_ctx.$slots, "error")
75
+ ], 64);
76
+ };
77
+ }
78
+ });
79
+ export {
80
+ _sfc_main as SkActionsControl
81
+ };
@@ -0,0 +1,11 @@
1
+ export type { SettingUnit, ToggleSettingUnit } from './types';
2
+ export { defineSettingUnit, createToggleUnit } from './generators';
3
+ export { defaultBlocks, provideSkLayoutContext, SkField, SkGroup, SkItem, SkLayout, SkLayoutPage, skLayoutContextKey, SkPage, SkSection, } from './components';
4
+ export type { ProvideSkLayoutContextOptions, SkLayoutActionEvent, SkLayoutBlocks, SkLayoutContext, } from './components';
5
+ export { createStateManager, settingsFormSessionKey, useFieldInheritance, useFieldValidator, UseFileConvertor, useFileConvertor, provideSettingsLocale, useSettingField, useSettingsForm, useSettingsFormSession, useSettingsLayout, useSettingsLocale, useStateManager, } from './composables';
6
+ export type { FieldInheritanceModel, SettingsLayoutModel, SettingsLocale, SettingsLocaleOptions, UseFieldValidatorOptions, UseFieldValidatorReturn, UseSettingFieldOptions, UseSettingsLayoutOptions, } from './composables';
7
+ export { byOrder, checkFieldConstraints, evaluateCondition, evaluateFieldRules, evaluateRuleStates, keysOf, layoutIdSegment, layoutPageId, resolveConstraintMessage, resolveLayout, resolveLocalizedText, toNavigation, validateFieldRules, validateLayout, } from './core';
8
+ export { createFieldInput, provideControls, resolveControlDefinition, resolveFieldControl, skControlRegistryKey, useControlRegistry, } from './core/controls';
9
+ export type { ControlDefinition, ControlKind, ControlPropsContext, ControlRegistry, } from './core/controls';
10
+ export type { SettingFieldHandle, SettingFieldStoreState, SettingsArea, SettingsAreaOptions, SettingsAreaStatus, StateManager, StateManagerOptions, SkFieldProps, SkFieldEmits, SkBaseControlProps, SkBaseControlEmits, SkActionControlEmits, AnySettingField, SettingField, SettingFieldType, SettingFieldValue, SettingValueByType, BuiltinSettingFieldControl, SettingFieldControl, SettingFieldConstraints, SettingFieldIssue, SettingFieldIssueSource, ReportedFieldIssue, SettingFieldOption, SettingFieldPresentation, SettingFieldModel, SettingFieldRule, SettingFieldRuleEffect, SettingFieldCondition, SettingFieldConditionLeaf, SettingFieldRuleState, SettingFieldSessionState, SettingFieldState, SettingsFormSession, SettingsFormSessionOptions, SettingsSaveResult, StandardSchemaIssue, StandardSchemaResult, StandardSchemaV1, LocalizedText, KitMessageKey, KitMessageOverrides, LayoutCategory, LayoutGridSettings, LayoutGroup, LayoutIssue, LayoutIssueCode, LayoutItem, LayoutNavigationNode, LayoutNavigationOptions, LayoutNodeKind, LayoutPage, LayoutPagePresentation, LayoutPresentation, LayoutSection, LayoutSidebarMode, ResolveLayoutOptions, ResolveLayoutSource, ResolvedCategory, ResolvedGroup, ResolvedItem, ResolvedLayout, ResolvedLayoutNode, ResolvedPage, ResolvedSection, SettingsLayout, } from './core';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAInE,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,OAAO,EACP,OAAO,EACP,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,MAAM,EACN,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,6BAA6B,EAC7B,mBAAmB,EACnB,cAAc,EACd,eAAe,GAChB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,OAAO,EACP,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,EACN,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,cAAc,GACf,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,UAAU,EACV,sBAAsB,EACtB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,cAAc,GACf,MAAM,QAAQ,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,52 @@
1
+ import { createToggleUnit, defineSettingUnit } from "./generators/index.js";
2
+ import { _, a, b, S, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L } from "./SkLayoutPage-DGbCpQFm.js";
3
+ import { _ as _2 } from "./SkLayout.vue_vue_type_script_setup_true_lang-ZjV2AMdR.js";
4
+ import { U, U as U2 } from "./UseFileConvertor-DN6cCXNi.js";
5
+ import "vue";
6
+ export {
7
+ _ as SkField,
8
+ a as SkGroup,
9
+ b as SkItem,
10
+ _2 as SkLayout,
11
+ S as SkLayoutPage,
12
+ c as SkPage,
13
+ d as SkSection,
14
+ U as UseFileConvertor,
15
+ e as byOrder,
16
+ f as checkFieldConstraints,
17
+ g as createFieldInput,
18
+ h as createStateManager,
19
+ createToggleUnit,
20
+ i as defaultBlocks,
21
+ defineSettingUnit,
22
+ j as evaluateCondition,
23
+ k as evaluateFieldRules,
24
+ l as evaluateRuleStates,
25
+ m as keysOf,
26
+ n as layoutIdSegment,
27
+ o as layoutPageId,
28
+ p as provideControls,
29
+ q as provideSettingsLocale,
30
+ r as provideSkLayoutContext,
31
+ s as resolveConstraintMessage,
32
+ t as resolveControlDefinition,
33
+ u as resolveFieldControl,
34
+ v as resolveLayout,
35
+ w as resolveLocalizedText,
36
+ x as settingsFormSessionKey,
37
+ y as skControlRegistryKey,
38
+ z as skLayoutContextKey,
39
+ A as toNavigation,
40
+ B as useControlRegistry,
41
+ C as useFieldInheritance,
42
+ D as useFieldValidator,
43
+ U2 as useFileConvertor,
44
+ E as useSettingField,
45
+ F as useSettingsForm,
46
+ G as useSettingsFormSession,
47
+ H as useSettingsLayout,
48
+ I as useSettingsLocale,
49
+ J as useStateManager,
50
+ K as validateFieldRules,
51
+ L as validateLayout
52
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC"}
@@ -0,0 +1,80 @@
1
+ import type { ResolvedCategory, ResolvedPage, SettingsLayout } from '../core/layout';
2
+ import type { SettingField, StandardSchemaV1, StateManager } from '../core/types';
3
+ import type { SkLayoutActionEvent, SkLayoutBlocks } from '../components/SkLayout/context';
4
+ import type { SkShellLabels } from './labels';
5
+ type __VLS_Props = {
6
+ /** Category > page > section > group > item delivered with the fields. */
7
+ layout: SettingsLayout;
8
+ /** State manager to read and stage in; see `useSettingsLayout`. */
9
+ session?: StateManager;
10
+ /** Field descriptors; registered into the session, or its `fields`. */
11
+ fields?: SettingField[];
12
+ /**
13
+ * URL prefix of the settings pages: a page is published as
14
+ * `${base}/<category>/<page>`. With a host router, the shell only
15
+ * navigates within the route that rendered it.
16
+ */
17
+ base?: string;
18
+ /** Destination of the back control; without it, `back` is emitted. */
19
+ backHref?: string;
20
+ /** Text the chrome renders; merged over the kit wording in the current locale. */
21
+ labels?: Partial<SkShellLabels>;
22
+ /** External validators per setting key. */
23
+ validators?: Record<string, StandardSchemaV1>;
24
+ /** Replacement components per layout level. */
25
+ blocks?: Partial<SkLayoutBlocks>;
26
+ /** Heading level of page titles; sections and groups follow. */
27
+ headingLevel?: number;
28
+ };
29
+ type __VLS_Slots = {
30
+ /** Product mark at the start of the top bar. */
31
+ logo?: () => unknown;
32
+ /** Account menu at the end of the top bar. */
33
+ profile?: () => unknown;
34
+ /** Content sidebar, for pages with `presentation.sidebar`. */
35
+ sidebar?: (props: {
36
+ page: ResolvedPage;
37
+ category: ResolvedCategory;
38
+ }) => unknown;
39
+ /** Shown when the layout has no pages. */
40
+ empty?: () => unknown;
41
+ };
42
+ type __VLS_ModelProps = {
43
+ /** Id (`<category>/<page>`) of the page on screen. */
44
+ 'page'?: string;
45
+ };
46
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
47
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
48
+ /** The layout model: session, resolved tree, navigation, validator. */
49
+ model: import("..").SettingsLayoutModel;
50
+ /** Opens a page by id, updating the URL where the shell may. */
51
+ openPage: (id: string | undefined) => void;
52
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
53
+ action: (event: SkLayoutActionEvent) => any;
54
+ error: (error: unknown) => any;
55
+ "update:page": (value: string | undefined) => any;
56
+ back: () => any;
57
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
58
+ onAction?: ((event: SkLayoutActionEvent) => any) | undefined;
59
+ onError?: ((error: unknown) => any) | undefined;
60
+ "onUpdate:page"?: ((value: string | undefined) => any) | undefined;
61
+ onBack?: (() => any) | undefined;
62
+ }>, {
63
+ base: string;
64
+ fields: SettingField[];
65
+ validators: Record<string, StandardSchemaV1>;
66
+ session: StateManager;
67
+ blocks: Partial<SkLayoutBlocks>;
68
+ headingLevel: number;
69
+ backHref: string;
70
+ labels: Partial<SkShellLabels>;
71
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
72
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
73
+ declare const _default: typeof __VLS_export;
74
+ export default _default;
75
+ type __VLS_WithSlots<T, S> = T & {
76
+ new (): {
77
+ $slots: S;
78
+ };
79
+ };
80
+ //# sourceMappingURL=SkShell.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkShell.vue.d.ts","sourceRoot":"","sources":["../../src/shell/SkShell.vue"],"names":[],"mappings":"AAoMA,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACb,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,gCAAgC,CAAC;AAGxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAgB9C,KAAK,WAAW,GAAG;IACf,0EAA0E;IAC1E,MAAM,EAAE,cAAc,CAAC;IACvB,mEAAmE;IACnE,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,uEAAuE;IACvE,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAChC,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC9C,+CAA+C;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACjC,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AA+BJ,KAAK,WAAW,GAAG;IACjB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC;IACrB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;IACxB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAChB,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE,gBAAgB,CAAC;KAC5B,KAAK,OAAO,CAAC;IACd,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;CACvB,CAAC;AAmEF,KAAK,gBAAgB,GAAG;IACxB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAeF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA4GxD,QAAA,MAAM,UAAU;IAtId,uEAAuE;;IAEvE,gEAAgE;;;;;;;;;;;;;UAnHvD,MAAM;YANJ,YAAY,EAAE;gBAYV,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC;aAdnC,YAAY;YAgBb,OAAO,CAAC,cAAc,CAAC;kBAEjB,MAAM;cARV,MAAM;YAER,OAAO,CAAC,aAAa,CAAC;6EAwPjC,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { LayoutNavigationNode, LayoutSidebarMode } from '../core/layout';
2
+ import type { SkShellLabels } from './labels';
3
+ type __VLS_Props = {
4
+ /** Categories > pages, as built by `toNavigation`. */
5
+ navigation: LayoutNavigationNode[];
6
+ /** Id of the page on screen. */
7
+ activeId?: string;
8
+ /** `href` of a page link. */
9
+ hrefOf: (id: string) => string;
10
+ /** Column split while the content sidebar is shown. */
11
+ sidebarMode?: LayoutSidebarMode;
12
+ /** Destination of the back control; else a button emitting `back`. */
13
+ backHref?: string;
14
+ /** Text the chrome renders. */
15
+ labels: SkShellLabels;
16
+ };
17
+ type __VLS_Slots = {
18
+ /** Product mark at the start of the top bar. */
19
+ logo?: () => unknown;
20
+ /** Account menu at the end of the top bar. */
21
+ profile?: () => unknown;
22
+ /** The page. */
23
+ default?: () => unknown;
24
+ /** Content sidebar beside the page. */
25
+ sidebar?: () => unknown;
26
+ };
27
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ navigate: (id: string) => any;
29
+ back: () => any;
30
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
31
+ onNavigate?: ((id: string) => any) | undefined;
32
+ onBack?: (() => any) | undefined;
33
+ }>, {
34
+ sidebarMode: LayoutSidebarMode;
35
+ activeId: string;
36
+ backHref: string;
37
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
39
+ declare const _default: typeof __VLS_export;
40
+ export default _default;
41
+ type __VLS_WithSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
46
+ //# sourceMappingURL=SkShellFrame.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkShellFrame.vue.d.ts","sourceRoot":"","sources":["../../src/shell/SkShellFrame.vue"],"names":[],"mappings":"AAsWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAa9C,KAAK,WAAW,GAAG;IACf,sDAAsD;IACtD,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,uDAAuD;IACvD,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAcJ,KAAK,WAAW,GAAG;IACjB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC;IACrB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;IACxB,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;IACxB,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;CACzB,CAAC;AAyqBF,QAAA,MAAM,UAAU;;;;;;;iBArsBE,iBAAiB;cAJpB,MAAM;cAMN,MAAM;6EAusBnB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}