@atscript/vue-form 0.1.58

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 (190) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +35 -0
  3. package/dist/as-action-71f9E_bL.cjs +208 -0
  4. package/dist/as-action-DU17rykn.mjs +203 -0
  5. package/dist/as-action.cjs +2 -0
  6. package/dist/as-action.d.cts +2 -0
  7. package/dist/as-action.d.mts +2 -0
  8. package/dist/as-action.mjs +2 -0
  9. package/dist/as-action.vue-BdbAOZCL.d.cts +13 -0
  10. package/dist/as-action.vue-CmY3eil1.d.mts +13 -0
  11. package/dist/as-adornment-shell-9UmdNIPR.cjs +97 -0
  12. package/dist/as-adornment-shell-knFiB7Ct.mjs +92 -0
  13. package/dist/as-array-Bn27x9cq.cjs +466 -0
  14. package/dist/as-array-DwarTaKP.mjs +455 -0
  15. package/dist/as-array-clear-btn-DAGervXL.cjs +48 -0
  16. package/dist/as-array-clear-btn-DIhzCKC9.mjs +43 -0
  17. package/dist/as-array.cjs +11 -0
  18. package/dist/as-array.d.cts +2 -0
  19. package/dist/as-array.d.mts +2 -0
  20. package/dist/as-array.mjs +11 -0
  21. package/dist/as-array.vue-C5r_ycIa.d.mts +9 -0
  22. package/dist/as-array.vue-CeBZRVm7.d.cts +9 -0
  23. package/dist/as-checkbox-B_9mwla6.mjs +285 -0
  24. package/dist/as-checkbox-DXGTVHPE.cjs +296 -0
  25. package/dist/as-checkbox.cjs +6 -0
  26. package/dist/as-checkbox.d.cts +2 -0
  27. package/dist/as-checkbox.d.mts +2 -0
  28. package/dist/as-checkbox.mjs +6 -0
  29. package/dist/as-checkbox.vue-BL53Xjmi.d.mts +9 -0
  30. package/dist/as-checkbox.vue-Da1KVG5J.d.cts +9 -0
  31. package/dist/as-collapsible-CqxeJut7.cjs +148 -0
  32. package/dist/as-collapsible-DtNCofNT.mjs +143 -0
  33. package/dist/as-date-C7tFQDkh.mjs +253 -0
  34. package/dist/as-date-k3MW3dmA.cjs +258 -0
  35. package/dist/as-date.cjs +8 -0
  36. package/dist/as-date.d.cts +2 -0
  37. package/dist/as-date.d.mts +2 -0
  38. package/dist/as-date.mjs +8 -0
  39. package/dist/as-date.vue-C5JaS3Sd.d.mts +9 -0
  40. package/dist/as-date.vue-e2ewS_V4.d.cts +9 -0
  41. package/dist/as-datetime-C030mzI5.cjs +258 -0
  42. package/dist/as-datetime-elcOoDT5.mjs +253 -0
  43. package/dist/as-datetime.cjs +8 -0
  44. package/dist/as-datetime.d.cts +2 -0
  45. package/dist/as-datetime.d.mts +2 -0
  46. package/dist/as-datetime.mjs +8 -0
  47. package/dist/as-datetime.vue-ClsSnJSV.d.mts +9 -0
  48. package/dist/as-datetime.vue-vfHFsby6.d.cts +9 -0
  49. package/dist/as-decimal-BJIGgPXU.cjs +711 -0
  50. package/dist/as-decimal-DtXjFPhe.mjs +694 -0
  51. package/dist/as-decimal.cjs +7 -0
  52. package/dist/as-decimal.d.cts +2 -0
  53. package/dist/as-decimal.d.mts +2 -0
  54. package/dist/as-decimal.mjs +7 -0
  55. package/dist/as-decimal.vue-B1pEKdjM.d.cts +25 -0
  56. package/dist/as-decimal.vue-CSCtYRRa.d.mts +25 -0
  57. package/dist/as-field-CXVjrEPQ.mjs +481 -0
  58. package/dist/as-field-shell-B2iTn-iM.cjs +346 -0
  59. package/dist/as-field-shell-Pdy3sAvr.mjs +341 -0
  60. package/dist/as-field-shell.cjs +5 -0
  61. package/dist/as-field-shell.d.cts +2 -0
  62. package/dist/as-field-shell.d.mts +2 -0
  63. package/dist/as-field-shell.mjs +5 -0
  64. package/dist/as-field-shell.vue-Ddnp8KxY.d.mts +37 -0
  65. package/dist/as-field-shell.vue-Dmt05vGD.d.cts +37 -0
  66. package/dist/as-field-wLYoaZnT.cjs +498 -0
  67. package/dist/as-field.cjs +4 -0
  68. package/dist/as-field.d.cts +25 -0
  69. package/dist/as-field.d.mts +26 -0
  70. package/dist/as-field.mjs +4 -0
  71. package/dist/as-form-CWwgyvfw.mjs +425 -0
  72. package/dist/as-form-DAIkyt7H.cjs +448 -0
  73. package/dist/as-form.cjs +7 -0
  74. package/dist/as-form.d.cts +2 -0
  75. package/dist/as-form.d.mts +2 -0
  76. package/dist/as-form.mjs +7 -0
  77. package/dist/as-form.vue-B4Bn0pbC.d.cts +158 -0
  78. package/dist/as-form.vue-DRrb_yoj.d.mts +158 -0
  79. package/dist/as-input-CpbV2k3s.cjs +231 -0
  80. package/dist/as-input-DIa8BzLv.mjs +226 -0
  81. package/dist/as-input-control-BzELjheN.mjs +266 -0
  82. package/dist/as-input-control-C5-DelZT.cjs +271 -0
  83. package/dist/as-input.cjs +8 -0
  84. package/dist/as-input.d.cts +2 -0
  85. package/dist/as-input.d.mts +2 -0
  86. package/dist/as-input.mjs +8 -0
  87. package/dist/as-input.vue-11ldp9uT.d.cts +17 -0
  88. package/dist/as-input.vue-fUhcvfv2.d.mts +17 -0
  89. package/dist/as-iterator-BYMNe6UJ.cjs +61 -0
  90. package/dist/as-iterator-CT5y1jyn.mjs +56 -0
  91. package/dist/as-iterator.cjs +5 -0
  92. package/dist/as-iterator.d.cts +14 -0
  93. package/dist/as-iterator.d.mts +15 -0
  94. package/dist/as-iterator.mjs +5 -0
  95. package/dist/as-number-BA55JIq1.cjs +387 -0
  96. package/dist/as-number-JPEwPK8Q.mjs +376 -0
  97. package/dist/as-number.cjs +8 -0
  98. package/dist/as-number.d.cts +2 -0
  99. package/dist/as-number.d.mts +2 -0
  100. package/dist/as-number.mjs +8 -0
  101. package/dist/as-number.vue-Bk-W7Vwv.d.mts +26 -0
  102. package/dist/as-number.vue-C2Aih98s.d.cts +26 -0
  103. package/dist/as-object-CT6lNEqt.mjs +300 -0
  104. package/dist/as-object-qUL7l8V1.cjs +305 -0
  105. package/dist/as-object.cjs +11 -0
  106. package/dist/as-object.d.cts +2 -0
  107. package/dist/as-object.d.mts +2 -0
  108. package/dist/as-object.mjs +11 -0
  109. package/dist/as-object.vue-CKwMyM_F.d.cts +13 -0
  110. package/dist/as-object.vue-Cg52b61-.d.mts +13 -0
  111. package/dist/as-paragraph-BGO-j4US.cjs +203 -0
  112. package/dist/as-paragraph-jIG_dg7_.mjs +198 -0
  113. package/dist/as-paragraph.cjs +2 -0
  114. package/dist/as-paragraph.d.cts +2 -0
  115. package/dist/as-paragraph.d.mts +2 -0
  116. package/dist/as-paragraph.mjs +2 -0
  117. package/dist/as-paragraph.vue-BDt0pBG-.d.cts +9 -0
  118. package/dist/as-paragraph.vue-C3FgTEt5.d.mts +9 -0
  119. package/dist/as-radio-B1N-gmoI.mjs +242 -0
  120. package/dist/as-radio-U3OK7bTg.cjs +247 -0
  121. package/dist/as-radio.cjs +6 -0
  122. package/dist/as-radio.d.cts +2 -0
  123. package/dist/as-radio.d.mts +2 -0
  124. package/dist/as-radio.mjs +6 -0
  125. package/dist/as-radio.vue-D_fweoN1.d.mts +9 -0
  126. package/dist/as-radio.vue-ZC4kLBnT.d.cts +9 -0
  127. package/dist/as-ref-CIifSSCQ.mjs +337 -0
  128. package/dist/as-ref-SImaIrwK.cjs +342 -0
  129. package/dist/as-ref.cjs +7 -0
  130. package/dist/as-ref.d.cts +2 -0
  131. package/dist/as-ref.d.mts +2 -0
  132. package/dist/as-ref.mjs +7 -0
  133. package/dist/as-ref.vue-BNeQeQpO.d.cts +9 -0
  134. package/dist/as-ref.vue-Cr5jeNDn.d.mts +9 -0
  135. package/dist/as-select-BB3uxACS.cjs +246 -0
  136. package/dist/as-select-UBGCVhku.mjs +241 -0
  137. package/dist/as-select.cjs +6 -0
  138. package/dist/as-select.d.cts +2 -0
  139. package/dist/as-select.d.mts +2 -0
  140. package/dist/as-select.mjs +6 -0
  141. package/dist/as-select.vue-Dd7huPq2.d.cts +9 -0
  142. package/dist/as-select.vue-RYpbZbKt.d.mts +9 -0
  143. package/dist/as-time-C24rvslH.cjs +258 -0
  144. package/dist/as-time-CQsxUs8P.mjs +253 -0
  145. package/dist/as-time.cjs +8 -0
  146. package/dist/as-time.d.cts +2 -0
  147. package/dist/as-time.d.mts +2 -0
  148. package/dist/as-time.mjs +8 -0
  149. package/dist/as-time.vue-huLx2B4l.d.mts +9 -0
  150. package/dist/as-time.vue-nMEHLXke.d.cts +9 -0
  151. package/dist/as-tuple-BU--cuuI.cjs +351 -0
  152. package/dist/as-tuple-DkI9swlW.mjs +340 -0
  153. package/dist/as-tuple.cjs +11 -0
  154. package/dist/as-tuple.d.cts +2 -0
  155. package/dist/as-tuple.d.mts +2 -0
  156. package/dist/as-tuple.mjs +11 -0
  157. package/dist/as-tuple.vue-CQhzOJsn.d.mts +9 -0
  158. package/dist/as-tuple.vue-DyskCkf-.d.cts +9 -0
  159. package/dist/as-union-BGvdxr3G.mjs +351 -0
  160. package/dist/as-union-C0btoJn3.cjs +368 -0
  161. package/dist/as-union.cjs +6 -0
  162. package/dist/as-union.d.cts +2 -0
  163. package/dist/as-union.d.mts +2 -0
  164. package/dist/as-union.mjs +6 -0
  165. package/dist/as-union.vue-BjlDPZn0.d.mts +9 -0
  166. package/dist/as-union.vue-CqjU3O10.d.cts +9 -0
  167. package/dist/as-variant-picker-BVs0AvjK.mjs +96 -0
  168. package/dist/as-variant-picker-DObQZHmm.cjs +107 -0
  169. package/dist/index.cjs +173 -0
  170. package/dist/index.d.cts +966 -0
  171. package/dist/index.d.mts +966 -0
  172. package/dist/index.mjs +105 -0
  173. package/dist/types-C4HRSxgV.d.cts +233 -0
  174. package/dist/types-Czm-Gtud.d.mts +233 -0
  175. package/dist/use-as-date-B7CtcRQd.cjs +329 -0
  176. package/dist/use-as-date-C39i9mzE.mjs +318 -0
  177. package/dist/use-as-dropdown-BMnEm6jF.mjs +82 -0
  178. package/dist/use-as-dropdown-C-Qy7Vt0.cjs +105 -0
  179. package/dist/use-as-locale-BrFdAgnU.mjs +23 -0
  180. package/dist/use-as-locale-C4z5stwD.cjs +34 -0
  181. package/dist/use-as-nested-sections-store-jdMRxjBE.cjs +80 -0
  182. package/dist/use-as-nested-sections-store-lhi0z5z1.mjs +63 -0
  183. package/dist/use-as-optional-add-flow-CuXEir_i.mjs +43 -0
  184. package/dist/use-as-optional-add-flow-STOaQWo9.cjs +48 -0
  185. package/dist/use-as-value-help-CBykDEjZ.mjs +89 -0
  186. package/dist/use-as-value-help-uANI3zWa.cjs +100 -0
  187. package/dist/use-form-context-Dwr8Ai1v.cjs +207 -0
  188. package/dist/use-form-context-bAj7UoSe.mjs +106 -0
  189. package/package.json +180 -0
  190. package/styles.d.ts +2 -0
@@ -0,0 +1,376 @@
1
+ import { n as useAsLocale } from "./use-as-locale-BrFdAgnU.mjs";
2
+ import { t as as_field_shell_default } from "./as-field-shell-Pdy3sAvr.mjs";
3
+ import { t as as_input_control_default } from "./as-input-control-BzELjheN.mjs";
4
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, ref, toDisplayString, withCtx } from "vue";
5
+ import { getDecimalSeparator, parseDecimalInput } from "@atscript/ui";
6
+ //#region src/composables/use-as-number.ts
7
+ /**
8
+ * Reactive composable that powers the default `AsNumber` SFC. Single-
9
+ * input shape — currency-agnostic, scale-agnostic, just a plain number
10
+ * with optional prefix/suffix chrome owned by the SFC.
11
+ *
12
+ * Commit shape is always a `number` (or `null` for empty input).
13
+ * atscript `number` fields are primitive `number` in the model — there
14
+ * is no precision-preservation reason to ship a string the way decimals
15
+ * do. The SFC owns prefix/suffix render concerns; this composable only
16
+ * knows about the value.
17
+ */
18
+ function useAsNumber(opts) {
19
+ const localeCtx = useAsLocale();
20
+ const locale = computed(() => {
21
+ const explicit = opts.locale?.();
22
+ if (explicit) return explicit;
23
+ return localeCtx.locale.value;
24
+ });
25
+ const decimalSeparator = computed(() => getDecimalSeparator(locale.value));
26
+ const rawValue = computed(() => {
27
+ const v = opts.modelValue();
28
+ if (v === null || v === void 0) return "";
29
+ return typeof v === "number" ? Number.isFinite(v) ? String(v) : "" : v;
30
+ });
31
+ const displayValue = computed(() => {
32
+ const s = rawValue.value;
33
+ if (s === "") return "";
34
+ const sep = decimalSeparator.value;
35
+ return sep === "." ? s : s.replace(".", sep);
36
+ });
37
+ function setFromInput(raw) {
38
+ if (raw.trim() === "") {
39
+ opts.onCommit(null);
40
+ return;
41
+ }
42
+ const parsed = parseDecimalInput(raw, locale.value);
43
+ if (parsed === null) return;
44
+ opts.onCommit(Number(parsed));
45
+ }
46
+ return {
47
+ decimalSeparator,
48
+ displayValue,
49
+ rawValue,
50
+ setFromInput
51
+ };
52
+ }
53
+ //#endregion
54
+ //#region src/components/defaults/as-number.vue?vue&type=script&setup=true&lang.ts
55
+ const _hoisted_1 = ["title"];
56
+ const _hoisted_2 = {
57
+ key: 1,
58
+ class: "as-prefix",
59
+ "aria-hidden": "true"
60
+ };
61
+ const _hoisted_3 = [
62
+ "id",
63
+ "value",
64
+ "placeholder",
65
+ "name",
66
+ "disabled",
67
+ "readonly",
68
+ "aria-required",
69
+ "aria-invalid",
70
+ "aria-describedby",
71
+ "aria-label"
72
+ ];
73
+ const _hoisted_4 = {
74
+ key: 2,
75
+ class: "as-suffix",
76
+ "aria-hidden": "true"
77
+ };
78
+ //#endregion
79
+ //#region src/components/defaults/as-number.vue
80
+ var as_number_default = /* @__PURE__ */ defineComponent({
81
+ __name: "as-number",
82
+ props: {
83
+ onBlur: {
84
+ type: Function,
85
+ required: true
86
+ },
87
+ error: {
88
+ type: String,
89
+ required: false
90
+ },
91
+ model: {
92
+ type: Object,
93
+ required: true
94
+ },
95
+ value: {
96
+ type: null,
97
+ required: false
98
+ },
99
+ label: {
100
+ type: String,
101
+ required: false
102
+ },
103
+ description: {
104
+ type: String,
105
+ required: false
106
+ },
107
+ hint: {
108
+ type: String,
109
+ required: false
110
+ },
111
+ placeholder: {
112
+ type: String,
113
+ required: false
114
+ },
115
+ prefixIcon: {
116
+ type: String,
117
+ required: false
118
+ },
119
+ suffixIcon: {
120
+ type: String,
121
+ required: false
122
+ },
123
+ class: {
124
+ type: [Object, String],
125
+ required: false
126
+ },
127
+ style: {
128
+ type: [Object, String],
129
+ required: false
130
+ },
131
+ optional: {
132
+ type: Boolean,
133
+ required: false,
134
+ skipCheck: true
135
+ },
136
+ onToggleOptional: {
137
+ type: Function,
138
+ required: false
139
+ },
140
+ required: {
141
+ type: Boolean,
142
+ required: false,
143
+ skipCheck: true
144
+ },
145
+ readonly: {
146
+ type: Boolean,
147
+ required: false,
148
+ skipCheck: true
149
+ },
150
+ type: {
151
+ type: String,
152
+ required: true
153
+ },
154
+ formAction: {
155
+ type: Object,
156
+ required: false
157
+ },
158
+ name: {
159
+ type: String,
160
+ required: false
161
+ },
162
+ field: {
163
+ type: Object,
164
+ required: false
165
+ },
166
+ options: {
167
+ type: Array,
168
+ required: false
169
+ },
170
+ maxLength: {
171
+ type: Number,
172
+ required: false
173
+ },
174
+ autocomplete: {
175
+ type: String,
176
+ required: false
177
+ },
178
+ title: {
179
+ type: String,
180
+ required: false
181
+ },
182
+ level: {
183
+ type: Number,
184
+ required: false
185
+ },
186
+ onRemove: {
187
+ type: Function,
188
+ required: false
189
+ },
190
+ canRemove: {
191
+ type: Boolean,
192
+ required: false
193
+ },
194
+ removeLabel: {
195
+ type: String,
196
+ required: false
197
+ },
198
+ arrayIndex: {
199
+ type: Number,
200
+ required: false
201
+ },
202
+ path: {
203
+ type: String,
204
+ required: true
205
+ },
206
+ valueHelp: {
207
+ type: Object,
208
+ required: false
209
+ },
210
+ singularLabel: {
211
+ type: String,
212
+ required: false
213
+ },
214
+ inputId: {
215
+ type: String,
216
+ required: true
217
+ },
218
+ errorId: {
219
+ type: String,
220
+ required: true
221
+ },
222
+ descId: {
223
+ type: String,
224
+ required: true
225
+ },
226
+ ariaDescribedBy: {
227
+ type: String,
228
+ required: false
229
+ },
230
+ currencyCode: {
231
+ type: String,
232
+ required: false
233
+ },
234
+ unitCode: {
235
+ type: String,
236
+ required: false
237
+ },
238
+ precisionScale: {
239
+ type: Number,
240
+ required: false
241
+ },
242
+ prefix: {
243
+ type: String,
244
+ required: false
245
+ },
246
+ suffix: {
247
+ type: String,
248
+ required: false
249
+ },
250
+ scale: {
251
+ type: Number,
252
+ required: false
253
+ },
254
+ hasAdornment: {
255
+ type: Boolean,
256
+ required: false
257
+ },
258
+ disabled: {
259
+ type: Boolean,
260
+ required: false
261
+ },
262
+ hidden: {
263
+ type: Boolean,
264
+ required: false
265
+ }
266
+ },
267
+ setup(__props) {
268
+ const props = __props;
269
+ const { displayValue, rawValue, setFromInput } = useAsNumber({
270
+ modelValue: () => props.model.value,
271
+ onCommit: (v) => {
272
+ props.model.value = v;
273
+ }
274
+ });
275
+ const focusActive = ref(false);
276
+ const editValue = computed(() => focusActive.value ? rawValue.value : displayValue.value);
277
+ function onFocus(e) {
278
+ focusActive.value = true;
279
+ const el = e.target;
280
+ if (el && typeof el.select === "function") el.select();
281
+ }
282
+ function onBlurField() {
283
+ focusActive.value = false;
284
+ props.onBlur();
285
+ }
286
+ /**
287
+ * Sanitize raw decimal input to keep only chars that could form a valid
288
+ * decimal: optional leading "-", digits, and at most one decimal separator
289
+ * (`.` or `,` — locale handling lives in `parseDecimalInput` downstream).
290
+ * Without this, the composable correctly rejects garbage but the DOM input
291
+ * keeps showing the typed letters until blur.
292
+ */
293
+ function sanitizeDecimal(raw) {
294
+ let s = raw;
295
+ let sign = "";
296
+ if (s.startsWith("-")) {
297
+ sign = "-";
298
+ s = s.slice(1);
299
+ }
300
+ s = s.replace(/[^0-9.,]/g, "");
301
+ const firstSep = s.search(/[.,]/);
302
+ if (firstSep !== -1) s = s.slice(0, firstSep + 1) + s.slice(firstSep + 1).replace(/[.,]/g, "");
303
+ return sign + s;
304
+ }
305
+ function onInput(e) {
306
+ const el = e.target;
307
+ const cleaned = sanitizeDecimal(el.value);
308
+ if (cleaned !== el.value) el.value = cleaned;
309
+ setFromInput(cleaned);
310
+ }
311
+ /**
312
+ * Arrow-key step support for the merged-chrome path. The single input
313
+ * inside the `as-number` shell is `type="text"` (so we can paint
314
+ * prefix/suffix pills) — that means the browser doesn't ship the
315
+ * native `<input type="number">` arrow-key behaviour. Re-introduce a
316
+ * minimal +/- 1 step here. Commit goes through `setFromInput` so the
317
+ * composable's null + number-coercion logic is single-sourced.
318
+ */
319
+ function onKeyDown(e) {
320
+ const delta = e.key === "ArrowUp" ? 1 : e.key === "ArrowDown" ? -1 : 0;
321
+ if (!delta) return;
322
+ e.preventDefault();
323
+ const base = Number(rawValue.value);
324
+ setFromInput(String((Number.isFinite(base) ? base : 0) + delta));
325
+ }
326
+ const shellTitle = computed(() => props.currencyCode ?? props.unitCode ?? void 0);
327
+ return (_ctx, _cache) => {
328
+ return openBlock(), createBlock(as_field_shell_default, normalizeProps(guardReactiveProps(_ctx.$props)), {
329
+ default: withCtx(({ inputId }) => [createCommentVNode(" Adornment path: bordered shell with prefix / suffix pills. The\n shell paints whenever AsField saw an adornment-driving\n annotation on the field — even when the resolved prefix/suffix\n is currently empty (sibling-ref source not selected yet),\n keeping the layout stable. "), __props.hasAdornment ? (openBlock(), createElementBlock("div", {
330
+ key: 0,
331
+ class: normalizeClass(["as-number", {
332
+ error: !!__props.error,
333
+ required: __props.required
334
+ }]),
335
+ title: shellTitle.value
336
+ }, [
337
+ __props.prefixIcon ? (openBlock(), createElementBlock("span", {
338
+ key: 0,
339
+ class: normalizeClass(["as-prefix-icon", __props.prefixIcon]),
340
+ "aria-hidden": "true"
341
+ }, null, 2)) : createCommentVNode("v-if", true),
342
+ __props.prefix ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(__props.prefix), 1)) : createCommentVNode("v-if", true),
343
+ createElementVNode("input", {
344
+ id: inputId,
345
+ class: "as-number-input",
346
+ type: "text",
347
+ inputmode: "decimal",
348
+ autocomplete: "off",
349
+ value: editValue.value,
350
+ onInput,
351
+ onKeydown: onKeyDown,
352
+ onFocus,
353
+ onBlur: onBlurField,
354
+ placeholder: __props.placeholder,
355
+ name: __props.name,
356
+ disabled: __props.disabled,
357
+ readonly: __props.readonly,
358
+ "aria-required": __props.required || void 0,
359
+ "aria-invalid": !!__props.error || void 0,
360
+ "aria-describedby": __props.ariaDescribedBy,
361
+ "aria-label": !__props.label ? __props.name : void 0
362
+ }, null, 40, _hoisted_3),
363
+ __props.suffix ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(__props.suffix), 1)) : createCommentVNode("v-if", true),
364
+ __props.suffixIcon ? (openBlock(), createElementBlock("span", {
365
+ key: 3,
366
+ class: normalizeClass(["as-suffix-icon", __props.suffixIcon]),
367
+ "aria-hidden": "true"
368
+ }, null, 2)) : createCommentVNode("v-if", true)
369
+ ], 10, _hoisted_1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Plain-number fallback: defer to AsInputControl (visually unchanged\n from the pre-Phase-6 single <input type=\"number\"> rendering). "), createVNode(as_input_control_default, mergeProps(_ctx.$props, { "input-id": inputId }), null, 16, ["input-id"])], 2112))]),
370
+ _: 1
371
+ }, 16);
372
+ };
373
+ }
374
+ });
375
+ //#endregion
376
+ export { useAsNumber as n, as_number_default as t };
@@ -0,0 +1,8 @@
1
+ require("./use-form-context-Dwr8Ai1v.cjs");
2
+ require("./use-as-locale-C4z5stwD.cjs");
3
+ require("./use-as-dropdown-C-Qy7Vt0.cjs");
4
+ require("./as-field-shell-B2iTn-iM.cjs");
5
+ require("./as-variant-picker-DObQZHmm.cjs");
6
+ require("./as-input-control-C5-DelZT.cjs");
7
+ const require_as_number = require("./as-number-BA55JIq1.cjs");
8
+ module.exports = require_as_number.as_number_default;
@@ -0,0 +1,2 @@
1
+ import { t as _default } from "./as-number.vue-C2Aih98s.cjs";
2
+ export = _default;
@@ -0,0 +1,2 @@
1
+ import { t as _default } from "./as-number.vue-Bk-W7Vwv.mjs";
2
+ export { _default as default };
@@ -0,0 +1,8 @@
1
+ import "./use-form-context-bAj7UoSe.mjs";
2
+ import "./use-as-locale-BrFdAgnU.mjs";
3
+ import "./use-as-dropdown-BMnEm6jF.mjs";
4
+ import "./as-field-shell-Pdy3sAvr.mjs";
5
+ import "./as-variant-picker-BVs0AvjK.mjs";
6
+ import "./as-input-control-BzELjheN.mjs";
7
+ import { t as as_number_default } from "./as-number-JPEwPK8Q.mjs";
8
+ export { as_number_default as default };
@@ -0,0 +1,26 @@
1
+ import { i as TAsComponentProps } from "./types-Czm-Gtud.mjs";
2
+ import * as vue from "vue";
3
+
4
+ //#region src/components/defaults/as-number.vue.d.ts
5
+ /**
6
+ * Default number renderer — single input with optional leading prefix
7
+ * pill and trailing suffix pill. Shares the merged-chrome family with
8
+ * `AsDecimal`; numbers aren't precision-critical, so there's no integer/
9
+ * decimal split.
10
+ *
11
+ * Picks up `prefix` (resolved at AsField from `@ui.form.prefix` /
12
+ * `.ref` / currency) and `suffix` (`@ui.form.suffix` / `.ref` /
13
+ * `@db.unit*`) as plain string props.
14
+ *
15
+ * **Plain-number fallback** — when neither prefix nor suffix is set
16
+ * (and the dispatcher only landed on this renderer because the field
17
+ * is design-type `number` without adornments), this SFC delegates to
18
+ * `AsInputControl` with the standard input chrome instead of painting
19
+ * the merged-chrome shell. This keeps plain `<input type="number">`
20
+ * rendering visually unchanged from the pre-Phase-6 behaviour.
21
+ */
22
+ type __VLS_Props = TAsComponentProps;
23
+ declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ //#endregion
26
+ export { _default as t };
@@ -0,0 +1,26 @@
1
+ import { i as TAsComponentProps } from "./types-C4HRSxgV.cjs";
2
+ import * as vue from "vue";
3
+
4
+ //#region src/components/defaults/as-number.vue.d.ts
5
+ /**
6
+ * Default number renderer — single input with optional leading prefix
7
+ * pill and trailing suffix pill. Shares the merged-chrome family with
8
+ * `AsDecimal`; numbers aren't precision-critical, so there's no integer/
9
+ * decimal split.
10
+ *
11
+ * Picks up `prefix` (resolved at AsField from `@ui.form.prefix` /
12
+ * `.ref` / currency) and `suffix` (`@ui.form.suffix` / `.ref` /
13
+ * `@db.unit*`) as plain string props.
14
+ *
15
+ * **Plain-number fallback** — when neither prefix nor suffix is set
16
+ * (and the dispatcher only landed on this renderer because the field
17
+ * is design-type `number` without adornments), this SFC delegates to
18
+ * `AsInputControl` with the standard input chrome instead of painting
19
+ * the merged-chrome shell. This keeps plain `<input type="number">`
20
+ * rendering visually unchanged from the pre-Phase-6 behaviour.
21
+ */
22
+ type __VLS_Props = TAsComponentProps;
23
+ declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ //#endregion
26
+ export { _default as t };