@atscript/vue-form 0.1.163 → 0.1.165

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 (187) hide show
  1. package/dist/as-action.d.cts +1 -1
  2. package/dist/as-action.d.mts +1 -1
  3. package/dist/{as-action.vue-wcB6Dkpu.d.cts → as-action.vue-CYGG4gUQ.d.mts} +1 -1
  4. package/dist/{as-action.vue-yDKx8hC0.d.mts → as-action.vue-Cp9Q8a-6.d.cts} +1 -1
  5. package/dist/{as-array-CD_Z7lZV.mjs → as-array-B2axGw3v.mjs} +15 -12
  6. package/dist/{as-array-CX52_z_L.cjs → as-array-C97cLzdA.cjs} +16 -13
  7. package/dist/{as-array-clear-btn-COfRUzeb.cjs → as-array-clear-btn-BBFccQjO.cjs} +5 -3
  8. package/dist/{as-array-clear-btn-BY1IBwBP.mjs → as-array-clear-btn-DEH8a3_N.mjs} +6 -4
  9. package/dist/as-array.cjs +1 -1
  10. package/dist/as-array.d.cts +1 -1
  11. package/dist/as-array.d.mts +1 -1
  12. package/dist/as-array.mjs +1 -1
  13. package/dist/{as-array.vue-BoKbyO1a.d.cts → as-array.vue-Cgfjz2I-.d.cts} +1 -1
  14. package/dist/{as-array.vue-DKcxkmjP.d.mts → as-array.vue-Wj9giGdu.d.mts} +1 -1
  15. package/dist/{as-checkbox-DosdhEuS.mjs → as-checkbox-BO8xW0OM.mjs} +36 -12
  16. package/dist/{as-checkbox-QO5Oh13K.cjs → as-checkbox-Wn-PmHi-.cjs} +35 -11
  17. package/dist/as-checkbox.cjs +1 -1
  18. package/dist/as-checkbox.d.cts +1 -1
  19. package/dist/as-checkbox.d.mts +1 -1
  20. package/dist/as-checkbox.mjs +1 -1
  21. package/dist/{as-checkbox.vue-BXS5v6Ru.d.mts → as-checkbox.vue-CWe73b3Z.d.mts} +1 -1
  22. package/dist/{as-checkbox.vue-DdttMJAS.d.cts → as-checkbox.vue-CXiUHIZj.d.cts} +1 -1
  23. package/dist/{as-collapsible-CQyuXwj9.cjs → as-collapsible-BGeuF2Bn.cjs} +4 -2
  24. package/dist/{as-collapsible-DHSlSMfY.mjs → as-collapsible-Cb9SgJh9.mjs} +5 -3
  25. package/dist/as-collapsible.cjs +1 -1
  26. package/dist/as-collapsible.d.cts +1 -1
  27. package/dist/as-collapsible.d.mts +1 -1
  28. package/dist/as-collapsible.mjs +1 -1
  29. package/dist/{as-collapsible.vue-1JSWgRMg.d.cts → as-collapsible.vue-BXwe24OV.d.cts} +1 -1
  30. package/dist/{as-collapsible.vue-DowxhNde.d.mts → as-collapsible.vue-hfAqxx1w.d.mts} +1 -1
  31. package/dist/{as-date-DTUQP2Dc.cjs → as-date-B2dgUoau.cjs} +1 -1
  32. package/dist/{as-date-DyQsn7Mu.mjs → as-date-jQpwe6sr.mjs} +1 -1
  33. package/dist/as-date.cjs +1 -1
  34. package/dist/as-date.d.cts +1 -1
  35. package/dist/as-date.d.mts +1 -1
  36. package/dist/as-date.mjs +1 -1
  37. package/dist/{as-date.vue-BVvALvZ_.d.mts → as-date.vue-BTm9X4fW.d.mts} +1 -1
  38. package/dist/{as-date.vue-BiUgcOwZ.d.cts → as-date.vue-axahL_Zv.d.cts} +1 -1
  39. package/dist/{as-datetime-BDJtlZLz.cjs → as-datetime-CmBLyjgU.cjs} +1 -1
  40. package/dist/{as-datetime-CrstxtPJ.mjs → as-datetime-DYn9NndT.mjs} +1 -1
  41. package/dist/as-datetime.cjs +1 -1
  42. package/dist/as-datetime.d.cts +1 -1
  43. package/dist/as-datetime.d.mts +1 -1
  44. package/dist/as-datetime.mjs +1 -1
  45. package/dist/{as-datetime.vue-BVc6jcUI.d.cts → as-datetime.vue-C6ILTI-7.d.cts} +1 -1
  46. package/dist/{as-datetime.vue-CCQqZsKA.d.mts → as-datetime.vue-vysHc3Ug.d.mts} +1 -1
  47. package/dist/{as-decimal-Bimpnzo2.mjs → as-decimal-C-OJ8ygU.mjs} +4 -3
  48. package/dist/{as-decimal-BZWqiKXZ.cjs → as-decimal-C0Eqd9nM.cjs} +4 -3
  49. package/dist/as-decimal.cjs +1 -1
  50. package/dist/as-decimal.d.cts +1 -1
  51. package/dist/as-decimal.d.mts +1 -1
  52. package/dist/as-decimal.mjs +1 -1
  53. package/dist/{as-decimal.vue-BDfM2ICc.d.mts → as-decimal.vue-CAq25zbX.d.mts} +1 -1
  54. package/dist/{as-decimal.vue-Cc9pNTqj.d.cts → as-decimal.vue-Dgfz9UDJ.d.cts} +1 -1
  55. package/dist/{as-field-DqK4Yiev.mjs → as-field-BZpWLPcM.mjs} +32 -16
  56. package/dist/{as-field-C_DB6Lbi.cjs → as-field-D0HgywQY.cjs} +31 -15
  57. package/dist/{as-field-shell-Bxqa_ZsU.mjs → as-field-shell-D7XovzgJ.mjs} +14 -7
  58. package/dist/{as-field-shell-BrJpCzIA.cjs → as-field-shell-DSj3CqN6.cjs} +14 -7
  59. package/dist/as-field-shell.cjs +1 -1
  60. package/dist/as-field-shell.d.cts +1 -1
  61. package/dist/as-field-shell.d.mts +1 -1
  62. package/dist/as-field-shell.mjs +1 -1
  63. package/dist/{as-field-shell.vue-B1ep312_.d.cts → as-field-shell.vue-BU0_8-uI.d.mts} +1 -1
  64. package/dist/{as-field-shell.vue-DisEXQI1.d.mts → as-field-shell.vue-DAcRqi7G.d.cts} +1 -1
  65. package/dist/as-field.cjs +1 -1
  66. package/dist/as-field.mjs +1 -1
  67. package/dist/{as-form-DLYEF8Ez.mjs → as-form-0VCxVsGo.mjs} +20 -11
  68. package/dist/{as-form-DgbRGqD8.cjs → as-form-ChyW9bj2.cjs} +19 -10
  69. package/dist/as-form.cjs +1 -1
  70. package/dist/as-form.d.cts +1 -1
  71. package/dist/as-form.d.mts +1 -1
  72. package/dist/as-form.mjs +1 -1
  73. package/dist/{as-form.vue-BmKBCn6P.d.cts → as-form.vue-CjNW1L-x.d.cts} +55 -326
  74. package/dist/{as-form.vue-hHJm_Rxq.d.mts → as-form.vue-NCTvXZUy.d.mts} +55 -326
  75. package/dist/{as-input-UkZxRSD4.cjs → as-input-Bf94SAOY.cjs} +1 -1
  76. package/dist/{as-input-65rtLZt3.mjs → as-input-DlLLiAYI.mjs} +1 -1
  77. package/dist/as-input.cjs +1 -1
  78. package/dist/as-input.d.cts +1 -1
  79. package/dist/as-input.d.mts +1 -1
  80. package/dist/as-input.mjs +1 -1
  81. package/dist/{as-input.vue-CL-Om6Ed.d.mts → as-input.vue-CyLveDWK.d.mts} +1 -1
  82. package/dist/{as-input.vue-D-RM35Rp.d.cts → as-input.vue-mZ0h1Q2J.d.cts} +1 -1
  83. package/dist/{as-iterator-DHNJwo-R.cjs → as-iterator-Bty6f5Bq.cjs} +2 -2
  84. package/dist/{as-iterator-mOyaYJiN.mjs → as-iterator-Dp1OiwU7.mjs} +2 -2
  85. package/dist/as-iterator.cjs +1 -1
  86. package/dist/as-iterator.mjs +1 -1
  87. package/dist/{as-multi-select-AC05uVzY.mjs → as-multi-select-DT0M_1_O.mjs} +97 -26
  88. package/dist/{as-multi-select-BedSzod1.cjs → as-multi-select-ZGBYoI48.cjs} +95 -24
  89. package/dist/as-multi-select.cjs +1 -1
  90. package/dist/as-multi-select.d.cts +1 -1
  91. package/dist/as-multi-select.d.mts +1 -1
  92. package/dist/as-multi-select.mjs +1 -1
  93. package/dist/{as-multi-select.vue-5GHWrbim.d.mts → as-multi-select.vue-BS9bNhCB.d.mts} +1 -1
  94. package/dist/{as-multi-select.vue-D1OnCH-x.d.cts → as-multi-select.vue-DAFz9hZR.d.cts} +1 -1
  95. package/dist/{as-number-BMsgxGQw.cjs → as-number-DXQCnc9d.cjs} +2 -2
  96. package/dist/{as-number-6DTZnVfg.mjs → as-number-DkG5GuGW.mjs} +2 -2
  97. package/dist/as-number.cjs +1 -1
  98. package/dist/as-number.d.cts +1 -1
  99. package/dist/as-number.d.mts +1 -1
  100. package/dist/as-number.mjs +1 -1
  101. package/dist/{as-number.vue-BiZ2B2iJ.d.mts → as-number.vue-BsJdJS36.d.cts} +1 -1
  102. package/dist/{as-number.vue-DE33Giq3.d.cts → as-number.vue-DSP2S_xP.d.mts} +1 -1
  103. package/dist/{as-object-YYxV2y77.cjs → as-object-DLdKOhxb.cjs} +14 -8
  104. package/dist/{as-object-B_x-yycI.mjs → as-object-mpRxIKVB.mjs} +14 -8
  105. package/dist/as-object.cjs +1 -1
  106. package/dist/as-object.d.cts +1 -1
  107. package/dist/as-object.d.mts +1 -1
  108. package/dist/as-object.mjs +1 -1
  109. package/dist/{as-object.vue-Dg4IT2JT.d.mts → as-object.vue-CpDhlJ_D.d.mts} +1 -1
  110. package/dist/{as-object.vue-PUhmGqhY.d.cts → as-object.vue-DduGoHKD.d.cts} +1 -1
  111. package/dist/as-paragraph.d.cts +1 -1
  112. package/dist/as-paragraph.d.mts +1 -1
  113. package/dist/{as-paragraph.vue-BUfbXaiy.d.cts → as-paragraph.vue-BJSA27kd.d.cts} +1 -1
  114. package/dist/{as-paragraph.vue-Bp-MUDcH.d.mts → as-paragraph.vue-CMUaF6WV.d.mts} +1 -1
  115. package/dist/{as-radio-Dg9c4dGh.mjs → as-radio-CW9YWBnC.mjs} +3 -3
  116. package/dist/{as-radio-C06SIAFY.cjs → as-radio-D9sctKpc.cjs} +2 -2
  117. package/dist/as-radio.cjs +1 -1
  118. package/dist/as-radio.d.cts +1 -1
  119. package/dist/as-radio.d.mts +1 -1
  120. package/dist/as-radio.mjs +1 -1
  121. package/dist/{as-radio.vue-NmjJm8Pj.d.mts → as-radio.vue-BR2ThEbi.d.mts} +1 -1
  122. package/dist/{as-radio.vue-h4XkpaW0.d.cts → as-radio.vue-Dw1QaJoY.d.cts} +1 -1
  123. package/dist/{as-ref-BEhS_vo9.cjs → as-ref-CpHMAAJu.cjs} +5 -3
  124. package/dist/{as-ref-BWJlIf5G.mjs → as-ref-DaCGfshO.mjs} +5 -3
  125. package/dist/as-ref.cjs +1 -1
  126. package/dist/as-ref.d.cts +1 -1
  127. package/dist/as-ref.d.mts +1 -1
  128. package/dist/as-ref.mjs +1 -1
  129. package/dist/{as-ref.vue-ec447Bmx.d.cts → as-ref.vue-CZzOVBz1.d.mts} +1 -1
  130. package/dist/{as-ref.vue-vP2P1ePF.d.mts → as-ref.vue-CvY88H7p.d.cts} +1 -1
  131. package/dist/{as-select-CrTKlmhd.mjs → as-select-CrjlxcgR.mjs} +3 -3
  132. package/dist/{as-select-DzEUs8Od.cjs → as-select-DAbNosmB.cjs} +2 -2
  133. package/dist/as-select.cjs +1 -1
  134. package/dist/as-select.d.cts +1 -1
  135. package/dist/as-select.d.mts +1 -1
  136. package/dist/as-select.mjs +1 -1
  137. package/dist/{as-select.vue-9mQ6cjW7.d.mts → as-select.vue-7xiuC9JG.d.cts} +1 -1
  138. package/dist/{as-select.vue-DV0C1MsH.d.cts → as-select.vue-BPPctxZT.d.mts} +1 -1
  139. package/dist/{as-time-BQ6KXMyV.mjs → as-time-BmXXgfCZ.mjs} +1 -1
  140. package/dist/{as-time-Cu-8mKpR.cjs → as-time-NaICaSIj.cjs} +1 -1
  141. package/dist/as-time.cjs +1 -1
  142. package/dist/as-time.d.cts +1 -1
  143. package/dist/as-time.d.mts +1 -1
  144. package/dist/as-time.mjs +1 -1
  145. package/dist/{as-time.vue-CmvsgHJd.d.cts → as-time.vue-CQhIKAs0.d.cts} +1 -1
  146. package/dist/{as-time.vue-DGfZPnWK.d.mts → as-time.vue-CjzRrsFg.d.mts} +1 -1
  147. package/dist/{as-tuple-Dny4Ov_j.mjs → as-tuple-BBx6P6xb.mjs} +8 -6
  148. package/dist/{as-tuple-CfgSnsT9.cjs → as-tuple-DkI9fp4G.cjs} +8 -6
  149. package/dist/as-tuple.cjs +1 -1
  150. package/dist/as-tuple.d.cts +1 -1
  151. package/dist/as-tuple.d.mts +1 -1
  152. package/dist/as-tuple.mjs +1 -1
  153. package/dist/{as-tuple.vue-CInEbMRo.d.mts → as-tuple.vue-BSh2-1uv.d.cts} +1 -1
  154. package/dist/{as-tuple.vue-zZkuYxet.d.cts → as-tuple.vue-DvHHrn-6.d.mts} +1 -1
  155. package/dist/{as-union-DT8XDZSt.cjs → as-union-BjmrvD80.cjs} +8 -6
  156. package/dist/{as-union-Gz8gEjmn.mjs → as-union-C3QiGYlE.mjs} +7 -5
  157. package/dist/as-union.cjs +1 -1
  158. package/dist/as-union.d.cts +1 -1
  159. package/dist/as-union.d.mts +1 -1
  160. package/dist/as-union.mjs +1 -1
  161. package/dist/{as-union.vue-Bz3EO0Gg.d.mts → as-union.vue-BJ8xFYYb.d.mts} +1 -1
  162. package/dist/{as-union.vue-K9ZSRg0G.d.cts → as-union.vue-CnF4bNex.d.cts} +1 -1
  163. package/dist/{as-variant-picker-B3GLhKyt.mjs → as-variant-picker-BUF7Am9t.mjs} +13 -8
  164. package/dist/{as-variant-picker-JlEhh7YO.cjs → as-variant-picker-BcJx7Zt7.cjs} +14 -9
  165. package/dist/index.cjs +30 -27
  166. package/dist/index.d.cts +23 -22
  167. package/dist/index.d.mts +23 -22
  168. package/dist/index.mjs +29 -26
  169. package/dist/locale.cjs +5 -0
  170. package/dist/locale.d.cts +2 -0
  171. package/dist/locale.d.mts +2 -0
  172. package/dist/locale.mjs +2 -0
  173. package/dist/{types-BLoV3zIo.d.mts → types-BoguW89D.d.mts} +24 -19
  174. package/dist/{types-Crwu2D-w.d.cts → types-DoLxVJhd.d.cts} +24 -19
  175. package/dist/use-as-locale-1k9NBn-G.mjs +56 -0
  176. package/dist/use-as-locale-BVcC0l75.d.mts +35 -0
  177. package/dist/use-as-locale-C2tFUenv.cjs +73 -0
  178. package/dist/use-as-locale-CnGzoVWd.d.cts +35 -0
  179. package/dist/{use-as-value-help-CDmkz6A7.cjs → use-as-value-help-BE-fAZRP.cjs} +4 -2
  180. package/dist/{use-as-value-help-CYMlEubv.mjs → use-as-value-help-nIpEFMqD.mjs} +4 -2
  181. package/dist/{use-form-context-cDW2GW4-.mjs → use-form-context-C3FxL3eF.mjs} +4 -1
  182. package/dist/{use-form-context-B6ZnzfxG.cjs → use-form-context-CXsLnG7l.cjs} +4 -1
  183. package/dist/{use-as-dropdown-B2Shb7wn.mjs → variant-label-B065kts3.mjs} +13 -1
  184. package/dist/{use-as-dropdown-Bj9toVdw.cjs → variant-label-C-rLK7Z3.cjs} +18 -0
  185. package/package.json +16 -11
  186. package/dist/use-as-locale-BrFdAgnU.mjs +0 -23
  187. package/dist/use-as-locale-C4z5stwD.cjs +0 -34
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-date.vue-BVvALvZ_.mjs";
1
+ import { t as _default } from "./as-date.vue-BTm9X4fW.mjs";
2
2
  export { _default as default };
package/dist/as-date.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as as_date_default } from "./as-date-DyQsn7Mu.mjs";
1
+ import { t as as_date_default } from "./as-date-jQpwe6sr.mjs";
2
2
  export { as_date_default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-BLoV3zIo.mjs";
1
+ import { o as TAsComponentProps } from "./types-BoguW89D.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-date.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-Crwu2D-w.cjs";
1
+ import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-date.vue.d.ts
@@ -1,4 +1,4 @@
1
- const require_as_field_shell = require("./as-field-shell-BrJpCzIA.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-DSj3CqN6.cjs");
2
2
  const require_as_adornment_shell = require("./as-adornment-shell-DptUMWNk.cjs");
3
3
  const require__shape = require("./_shape-JEtANIMR.cjs");
4
4
  const require_use_as_date = require("./use-as-date-U_aHShPD.cjs");
@@ -1,4 +1,4 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-Bxqa_ZsU.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-D7XovzgJ.mjs";
2
2
  import { t as as_adornment_shell_default } from "./as-adornment-shell-C4A2fnDp.mjs";
3
3
  import { t as committedValue } from "./_shape-CpbGJMWP.mjs";
4
4
  import { n as as_date_control_default, t as useAsDate } from "./use-as-date-pbhMXyU8.mjs";
@@ -1,2 +1,2 @@
1
- const require_as_datetime = require("./as-datetime-BDJtlZLz.cjs");
1
+ const require_as_datetime = require("./as-datetime-CmBLyjgU.cjs");
2
2
  module.exports = require_as_datetime.as_datetime_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-datetime.vue-BVc6jcUI.cjs";
1
+ import { t as _default } from "./as-datetime.vue-C6ILTI-7.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-datetime.vue-CCQqZsKA.mjs";
1
+ import { t as _default } from "./as-datetime.vue-vysHc3Ug.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_datetime_default } from "./as-datetime-CrstxtPJ.mjs";
1
+ import { t as as_datetime_default } from "./as-datetime-DYn9NndT.mjs";
2
2
  export { as_datetime_default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-Crwu2D-w.cjs";
1
+ import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-datetime.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-BLoV3zIo.mjs";
1
+ import { o as TAsComponentProps } from "./types-BoguW89D.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-datetime.vue.d.ts
@@ -1,5 +1,5 @@
1
- import { n as useAsLocale } from "./use-as-locale-BrFdAgnU.mjs";
2
- import { t as as_field_shell_default } from "./as-field-shell-Bxqa_ZsU.mjs";
1
+ import { n as useAsLocale, r as useAsTexts } from "./use-as-locale-1k9NBn-G.mjs";
2
+ import { t as as_field_shell_default } from "./as-field-shell-D7XovzgJ.mjs";
3
3
  import { n as preserveShape, t as committedValue } from "./_shape-CpbGJMWP.mjs";
4
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, nextTick, normalizeClass, normalizeProps, openBlock, ref, toDisplayString, unref, watch, withCtx } from "vue";
5
5
  import { enforceScale, formatDecimalForDisplay, getDecimalSeparator, getThousandsSeparator, groupInteger, joinDecimalString, parseDecimalInput, splitDecimalString } from "@atscript/ui";
@@ -614,6 +614,7 @@ var as_decimal_default = /* @__PURE__ */ defineComponent({
614
614
  });
615
615
  const isNegative = computed(() => parts.value.sign === "-");
616
616
  const shellTitle = computed(() => props.currencyCode ?? props.unitCode ?? void 0);
617
+ const { t } = useAsTexts();
617
618
  return (_ctx, _cache) => {
618
619
  return openBlock(), createBlock(as_field_shell_default, normalizeProps(guardReactiveProps(_ctx.$props)), {
619
620
  default: withCtx(({ inputId }) => [createElementVNode("div", {
@@ -670,7 +671,7 @@ var as_decimal_default = /* @__PURE__ */ defineComponent({
670
671
  onBlur: _cache[9] || (_cache[9] = (...args) => unref(onBlurAll) && unref(onBlurAll)(...args)),
671
672
  disabled: __props.disabled,
672
673
  readonly: __props.readonly,
673
- "aria-label": `decimals of ${__props.label ?? __props.name ?? ""}`
674
+ "aria-label": unref(t)("UI_FORM_DECIMALS_OF", { field: __props.label ?? __props.name ?? "" })
674
675
  }, null, 40, _hoisted_5)], 64)) : createCommentVNode("v-if", true),
675
676
  __props.suffix ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(__props.suffix), 1)) : createCommentVNode("v-if", true),
676
677
  __props.suffixIcon ? (openBlock(), createElementBlock("span", {
@@ -1,5 +1,5 @@
1
- const require_use_as_locale = require("./use-as-locale-C4z5stwD.cjs");
2
- const require_as_field_shell = require("./as-field-shell-BrJpCzIA.cjs");
1
+ const require_use_as_locale = require("./use-as-locale-C2tFUenv.cjs");
2
+ const require_as_field_shell = require("./as-field-shell-DSj3CqN6.cjs");
3
3
  const require__shape = require("./_shape-JEtANIMR.cjs");
4
4
  let vue = require("vue");
5
5
  let _atscript_ui = require("@atscript/ui");
@@ -614,6 +614,7 @@ var as_decimal_default = /* @__PURE__ */ (0, vue.defineComponent)({
614
614
  });
615
615
  const isNegative = (0, vue.computed)(() => parts.value.sign === "-");
616
616
  const shellTitle = (0, vue.computed)(() => props.currencyCode ?? props.unitCode ?? void 0);
617
+ const { t } = require_use_as_locale.useAsTexts();
617
618
  return (_ctx, _cache) => {
618
619
  return (0, vue.openBlock)(), (0, vue.createBlock)(require_as_field_shell.as_field_shell_default, (0, vue.normalizeProps)((0, vue.guardReactiveProps)(_ctx.$props)), {
619
620
  default: (0, vue.withCtx)(({ inputId }) => [(0, vue.createElementVNode)("div", {
@@ -670,7 +671,7 @@ var as_decimal_default = /* @__PURE__ */ (0, vue.defineComponent)({
670
671
  onBlur: _cache[9] || (_cache[9] = (...args) => (0, vue.unref)(onBlurAll) && (0, vue.unref)(onBlurAll)(...args)),
671
672
  disabled: __props.disabled,
672
673
  readonly: __props.readonly,
673
- "aria-label": `decimals of ${__props.label ?? __props.name ?? ""}`
674
+ "aria-label": (0, vue.unref)(t)("UI_FORM_DECIMALS_OF", { field: __props.label ?? __props.name ?? "" })
674
675
  }, null, 40, _hoisted_5)], 64)) : (0, vue.createCommentVNode)("v-if", true),
675
676
  __props.suffix ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_6, (0, vue.toDisplayString)(__props.suffix), 1)) : (0, vue.createCommentVNode)("v-if", true),
676
677
  __props.suffixIcon ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
@@ -1,2 +1,2 @@
1
- const require_as_decimal = require("./as-decimal-BZWqiKXZ.cjs");
1
+ const require_as_decimal = require("./as-decimal-C0Eqd9nM.cjs");
2
2
  module.exports = require_as_decimal.as_decimal_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-decimal.vue-Cc9pNTqj.cjs";
1
+ import { t as _default } from "./as-decimal.vue-Dgfz9UDJ.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-decimal.vue-BDfM2ICc.mjs";
1
+ import { t as _default } from "./as-decimal.vue-CAq25zbX.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_decimal_default } from "./as-decimal-Bimpnzo2.mjs";
1
+ import { t as as_decimal_default } from "./as-decimal-C-OJ8ygU.mjs";
2
2
  export { as_decimal_default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-BLoV3zIo.mjs";
1
+ import { o as TAsComponentProps } from "./types-BoguW89D.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-decimal.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-Crwu2D-w.cjs";
1
+ import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-decimal.vue.d.ts
@@ -1,7 +1,7 @@
1
- import { _ as TYPES_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_PATCH_KEY, f as FORM_STATE_KEY, g as ROOT_DATA_KEY, h as PATH_PREFIX_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as LEVEL_KEY, o as COMPONENTS_KEY, p as HIDE_ROOT_TITLE_KEY, r as useFormContext, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY } from "./use-form-context-cDW2GW4-.mjs";
2
- import { n as useAsLocale } from "./use-as-locale-BrFdAgnU.mjs";
1
+ import { _ as TYPES_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_PATCH_KEY, f as FORM_STATE_KEY, g as ROOT_DATA_KEY, h as PATH_PREFIX_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as LEVEL_KEY, o as COMPONENTS_KEY, p as HIDE_ROOT_TITLE_KEY, r as useFormContext, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY } from "./use-form-context-C3FxL3eF.mjs";
2
+ import { n as useAsLocale, r as useAsTexts } from "./use-as-locale-1k9NBn-G.mjs";
3
3
  import { computed, createBlock, createElementBlock, defineComponent, inject, isRef, mergeProps, onUnmounted, openBlock, provide, ref, resolveDynamicComponent, toDisplayString, unref, useId, watch } from "vue";
4
- import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_UNIT, DB_UNIT_REF, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_LABEL, META_READONLY, META_REQUIRED, UI_FORM_ACTION, UI_FORM_ATTR, UI_FORM_AUTOCOMPLETE, UI_FORM_CLASSES, UI_FORM_COMPONENT, UI_FORM_DISABLED, UI_FORM_FN_CLASSES, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_DISABLED, UI_FORM_FN_HINT, UI_FORM_FN_LABEL, UI_FORM_FN_PLACEHOLDER, UI_FORM_FN_PREFIX, UI_FORM_FN_READONLY, UI_FORM_FN_STYLES, UI_FORM_FN_TITLE, UI_FORM_FN_VALUE, UI_FORM_GRID_COL_SPAN, UI_FORM_GRID_ROW_SPAN, UI_FORM_HIDDEN, UI_FORM_HINT, UI_FORM_PLACEHOLDER, UI_FORM_PREFIX, UI_FORM_PREFIX_ICON, UI_FORM_PREFIX_REF, UI_FORM_STYLES, UI_FORM_SUFFIX, UI_FORM_SUFFIX_ICON, UI_FORM_SUFFIX_REF, UI_FORM_VALIDATE, WF_ACTION_WITH_DATA, buildGridClasses, createFieldValidator, createFormData, createFormValueResolver, getByPath, getCurrencyDecimals, getCurrencyDisplayParts, getFieldMeta, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isTupleField, isUnionField, joinPath, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel } from "@atscript/ui";
4
+ import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_UNIT, DB_UNIT_REF, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_LABEL, META_READONLY, META_REQUIRED, UI_FORM_ACTION, UI_FORM_ATTR, UI_FORM_AUTOCOMPLETE, UI_FORM_CLASSES, UI_FORM_COMPONENT, UI_FORM_DISABLED, UI_FORM_FN_CLASSES, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_DISABLED, UI_FORM_FN_HINT, UI_FORM_FN_LABEL, UI_FORM_FN_PLACEHOLDER, UI_FORM_FN_PREFIX, UI_FORM_FN_READONLY, UI_FORM_FN_STYLES, UI_FORM_FN_TITLE, UI_FORM_FN_VALUE, UI_FORM_GRID_COL_SPAN, UI_FORM_GRID_ROW_SPAN, UI_FORM_HIDDEN, UI_FORM_HINT, UI_FORM_LABEL_SINGULAR, UI_FORM_PLACEHOLDER, UI_FORM_PREFIX, UI_FORM_PREFIX_ICON, UI_FORM_PREFIX_REF, UI_FORM_STYLES, UI_FORM_SUFFIX, UI_FORM_SUFFIX_ICON, UI_FORM_SUFFIX_REF, UI_FORM_VALIDATE, WF_ACTION_WITH_DATA, buildGridClasses, createFieldValidator, createFormData, createFormValueResolver, getByPath, getCurrencyDecimals, getCurrencyDisplayParts, getFieldMeta, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isTupleField, isUnionField, joinPath, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel, setByPath } from "@atscript/ui";
5
5
  import { buildFieldEntry } from "@atscript/ui-fns";
6
6
  //#region src/composables/use-as-field.ts
7
7
  function useAsField(opts) {
@@ -9,6 +9,7 @@ function useAsField(opts) {
9
9
  const formData = inject(FORM_DATA_KEY);
10
10
  const formContext = inject(FORM_CONTEXT_KEY);
11
11
  const patch = inject(FORM_PATCH_KEY, void 0);
12
+ const { t } = useAsTexts();
12
13
  const id = Symbol("form-field");
13
14
  const submitError = ref();
14
15
  const externalError = ref();
@@ -39,7 +40,7 @@ function useAsField(opts) {
39
40
  function validate() {
40
41
  if (opts.rules?.length) for (const rule of opts.rules) {
41
42
  const result = rule(model.value, formData?.value, formContext?.value);
42
- if (result !== true) return result || "Wrong value";
43
+ if (result !== true) return result || t("UI_FORM_WRONG_VALUE");
43
44
  }
44
45
  }
45
46
  const error = computed(() => {
@@ -158,8 +159,9 @@ function useAsOptionalField(field) {
158
159
  const EMPTY_PATH = computed(() => "");
159
160
  const EMPTY_DATA = computed(() => void 0);
160
161
  /**
161
- * Reactive read-only access to form data at any point in the
162
- * `<AsForm>` tree. Outside a form, all readers return `undefined`.
162
+ * Reactive access to form data at any point in the `<AsForm>` tree: readers
163
+ * plus `setValueAt` / `setSibling` writers. Outside a form, all readers
164
+ * return `undefined` and the writers do nothing.
163
165
  *
164
166
  * Call sites get a `ComputedRef` so they can compose it directly with
165
167
  * other reactive primitives without an extra `computed()` wrapper.
@@ -167,6 +169,7 @@ const EMPTY_DATA = computed(() => void 0);
167
169
  function useAsData() {
168
170
  const wrapped = inject(ROOT_DATA_KEY, EMPTY_DATA);
169
171
  const pathPrefix = inject(PATH_PREFIX_KEY, EMPTY_PATH);
172
+ const handleChange = inject(CHANGE_HANDLER_KEY, void 0);
170
173
  const rootData = computed(() => {
171
174
  return wrapped.value?.value;
172
175
  });
@@ -184,10 +187,21 @@ function useAsData() {
184
187
  return getByPath(w, joinPath(pathPrefix.value, name));
185
188
  });
186
189
  }
190
+ function setValueAt(path, value) {
191
+ const w = wrapped.value;
192
+ if (!w) return;
193
+ setByPath(w, path, value);
194
+ handleChange?.("update", path, value);
195
+ }
196
+ function setSibling(name, value) {
197
+ setValueAt(joinPath(pathPrefix.value, name), value);
198
+ }
187
199
  return {
188
200
  rootData,
189
201
  getValueAt,
190
- siblingValue
202
+ siblingValue,
203
+ setValueAt,
204
+ setSibling
191
205
  };
192
206
  }
193
207
  //#endregion
@@ -235,6 +249,7 @@ var as_field_default = /* @__PURE__ */ defineComponent({
235
249
  const handleAction = inject(ACTION_HANDLER_KEY, () => {});
236
250
  const handleChange = inject(CHANGE_HANDLER_KEY, () => {});
237
251
  const dismissExternalAt = inject(DISMISS_EXTERNAL_AT_KEY, () => {});
252
+ const { t } = useAsTexts();
238
253
  const { rootFormData, formContext, joinPath, buildPath, getByPath, setByPath, buildScope } = useFormContext("AsField");
239
254
  const absolutePath = joinPath(() => props.field.path);
240
255
  const isStructured = isObjectField(props.field) || isArrayField(props.field) || isTupleField(props.field);
@@ -327,10 +342,7 @@ var as_field_default = /* @__PURE__ */ defineComponent({
327
342
  });
328
343
  }
329
344
  let singularLabel;
330
- if (isArrayField(props.field)) {
331
- const fromArray = resolveSingularLabel(prop);
332
- singularLabel = fromArray !== "item" ? fromArray : resolveSingularLabel(props.field.itemField.prop);
333
- }
345
+ if (isArrayField(props.field)) singularLabel = getFieldMeta(prop, UI_FORM_LABEL_SINGULAR) || resolveSingularLabel(props.field.itemField.prop, t);
334
346
  const inputId = `as-field-${useId()}`;
335
347
  const errorId = `${inputId}-err`;
336
348
  const descId = `${inputId}-desc`;
@@ -345,7 +357,10 @@ var as_field_default = /* @__PURE__ */ defineComponent({
345
357
  label: getFieldMeta(prop, META_LABEL) ?? props.field.name
346
358
  } : void 0;
347
359
  const gridClasses = buildGridClasses(resolveGridSpec(getFieldMeta(prop, UI_FORM_GRID_COL_SPAN), getFieldMeta(prop, UI_FORM_GRID_ROW_SPAN)));
348
- const formValidate = createFieldValidator(prop, isStructured || isUnion ? { rootOnly: true } : void 0);
360
+ const formValidate = createFieldValidator(prop, {
361
+ rootOnly: isStructured || isUnion,
362
+ t
363
+ });
349
364
  function getModel() {
350
365
  return getByPath(absolutePath.value);
351
366
  }
@@ -388,9 +403,9 @@ var as_field_default = /* @__PURE__ */ defineComponent({
388
403
  label = getFieldMeta(prop, META_LABEL) ?? props.field.name;
389
404
  description = getFieldMeta(prop, META_DESCRIPTION);
390
405
  hint = getFieldMeta(prop, UI_FORM_HINT);
391
- placeholder = getFieldMeta(prop, UI_FORM_PLACEHOLDER) ?? (prop.metadata.has("db.writeOnly") ? "(hidden — enter a value to replace)" : void 0);
406
+ placeholder = getFieldMeta(prop, UI_FORM_PLACEHOLDER) ?? (prop.metadata.has("db.writeOnly") ? t("UI_FORM_HIDDEN_PLACEHOLDER") : void 0);
392
407
  styles = getFieldMeta(prop, UI_FORM_STYLES);
393
- options = resolveOptions(prop, emptyScope);
408
+ options = resolveOptions(prop, emptyScope, props.field.labelsFrom, t);
394
409
  attrs = getFieldMeta(prop, UI_FORM_ATTR) !== void 0 ? resolveAttrs(prop, emptyScope) : void 0;
395
410
  title = isStructured || isUnion ? getFieldMeta(prop, META_LABEL) ?? props.field.name : void 0;
396
411
  classesBase = buildFieldClasses(getFieldMeta(prop, UI_FORM_CLASSES), disabled, hasMetaRequired, optional);
@@ -427,7 +442,7 @@ var as_field_default = /* @__PURE__ */ defineComponent({
427
442
  hint = maybeComputed(hasFn.has("hint"), () => resolveFieldProp(prop, UI_FORM_FN_HINT, UI_FORM_HINT, fs.value), getFieldMeta(prop, UI_FORM_HINT));
428
443
  placeholder = maybeComputed(hasFn.has("placeholder"), () => resolveFieldProp(prop, UI_FORM_FN_PLACEHOLDER, UI_FORM_PLACEHOLDER, fs.value), getFieldMeta(prop, UI_FORM_PLACEHOLDER));
429
444
  styles = maybeComputed(hasFn.has("styles"), () => resolveFieldProp(prop, UI_FORM_FN_STYLES, UI_FORM_STYLES, fs.value), getFieldMeta(prop, UI_FORM_STYLES));
430
- options = maybeComputed(hasFn.has("options"), () => resolveOptions(prop, fs.value), resolveOptions(prop, emptyScope));
445
+ options = hasFn.has("options") ? computed(() => resolveOptions(prop, fs.value, props.field.labelsFrom, t)) : resolveOptions(prop, emptyScope, props.field.labelsFrom, t);
431
446
  attrs = hasFn.has("attr") ? computed(() => resolveAttrs(prop, fs.value)) : getFieldMeta(prop, UI_FORM_ATTR) !== void 0 ? resolveAttrs(prop, emptyScope) : void 0;
432
447
  title = isStructured || isUnion ? maybeComputed(hasFn.has("title"), () => resolveHeaderProp(UI_FORM_FN_TITLE, META_LABEL) ?? props.field.name, getFieldMeta(prop, META_LABEL) ?? props.field.name) : void 0;
433
448
  const hasFnClasses = hasFn.has("classes");
@@ -442,7 +457,8 @@ var as_field_default = /* @__PURE__ */ defineComponent({
442
457
  function formRule(v) {
443
458
  return formValidate(v, {
444
459
  data: rootFormData().value ?? {},
445
- context: formContext.value
460
+ context: formContext.value,
461
+ t
446
462
  });
447
463
  }
448
464
  const { model, error: formError, onBlur: _onBlur, isDirty } = useAsField({
@@ -1,5 +1,5 @@
1
- const require_use_form_context = require("./use-form-context-B6ZnzfxG.cjs");
2
- const require_use_as_locale = require("./use-as-locale-C4z5stwD.cjs");
1
+ const require_use_form_context = require("./use-form-context-CXsLnG7l.cjs");
2
+ const require_use_as_locale = require("./use-as-locale-C2tFUenv.cjs");
3
3
  let vue = require("vue");
4
4
  let _atscript_ui = require("@atscript/ui");
5
5
  let _atscript_ui_fns = require("@atscript/ui-fns");
@@ -9,6 +9,7 @@ function useAsField(opts) {
9
9
  const formData = (0, vue.inject)(require_use_form_context.FORM_DATA_KEY);
10
10
  const formContext = (0, vue.inject)(require_use_form_context.FORM_CONTEXT_KEY);
11
11
  const patch = (0, vue.inject)(require_use_form_context.FORM_PATCH_KEY, void 0);
12
+ const { t } = require_use_as_locale.useAsTexts();
12
13
  const id = Symbol("form-field");
13
14
  const submitError = (0, vue.ref)();
14
15
  const externalError = (0, vue.ref)();
@@ -39,7 +40,7 @@ function useAsField(opts) {
39
40
  function validate() {
40
41
  if (opts.rules?.length) for (const rule of opts.rules) {
41
42
  const result = rule(model.value, formData?.value, formContext?.value);
42
- if (result !== true) return result || "Wrong value";
43
+ if (result !== true) return result || t("UI_FORM_WRONG_VALUE");
43
44
  }
44
45
  }
45
46
  const error = (0, vue.computed)(() => {
@@ -158,8 +159,9 @@ function useAsOptionalField(field) {
158
159
  const EMPTY_PATH = (0, vue.computed)(() => "");
159
160
  const EMPTY_DATA = (0, vue.computed)(() => void 0);
160
161
  /**
161
- * Reactive read-only access to form data at any point in the
162
- * `<AsForm>` tree. Outside a form, all readers return `undefined`.
162
+ * Reactive access to form data at any point in the `<AsForm>` tree: readers
163
+ * plus `setValueAt` / `setSibling` writers. Outside a form, all readers
164
+ * return `undefined` and the writers do nothing.
163
165
  *
164
166
  * Call sites get a `ComputedRef` so they can compose it directly with
165
167
  * other reactive primitives without an extra `computed()` wrapper.
@@ -167,6 +169,7 @@ const EMPTY_DATA = (0, vue.computed)(() => void 0);
167
169
  function useAsData() {
168
170
  const wrapped = (0, vue.inject)(require_use_form_context.ROOT_DATA_KEY, EMPTY_DATA);
169
171
  const pathPrefix = (0, vue.inject)(require_use_form_context.PATH_PREFIX_KEY, EMPTY_PATH);
172
+ const handleChange = (0, vue.inject)(require_use_form_context.CHANGE_HANDLER_KEY, void 0);
170
173
  const rootData = (0, vue.computed)(() => {
171
174
  return wrapped.value?.value;
172
175
  });
@@ -184,10 +187,21 @@ function useAsData() {
184
187
  return (0, _atscript_ui.getByPath)(w, (0, _atscript_ui.joinPath)(pathPrefix.value, name));
185
188
  });
186
189
  }
190
+ function setValueAt(path, value) {
191
+ const w = wrapped.value;
192
+ if (!w) return;
193
+ (0, _atscript_ui.setByPath)(w, path, value);
194
+ handleChange?.("update", path, value);
195
+ }
196
+ function setSibling(name, value) {
197
+ setValueAt((0, _atscript_ui.joinPath)(pathPrefix.value, name), value);
198
+ }
187
199
  return {
188
200
  rootData,
189
201
  getValueAt,
190
- siblingValue
202
+ siblingValue,
203
+ setValueAt,
204
+ setSibling
191
205
  };
192
206
  }
193
207
  //#endregion
@@ -235,6 +249,7 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
235
249
  const handleAction = (0, vue.inject)(require_use_form_context.ACTION_HANDLER_KEY, () => {});
236
250
  const handleChange = (0, vue.inject)(require_use_form_context.CHANGE_HANDLER_KEY, () => {});
237
251
  const dismissExternalAt = (0, vue.inject)(require_use_form_context.DISMISS_EXTERNAL_AT_KEY, () => {});
252
+ const { t } = require_use_as_locale.useAsTexts();
238
253
  const { rootFormData, formContext, joinPath, buildPath, getByPath, setByPath, buildScope } = require_use_form_context.useFormContext("AsField");
239
254
  const absolutePath = joinPath(() => props.field.path);
240
255
  const isStructured = (0, _atscript_ui.isObjectField)(props.field) || (0, _atscript_ui.isArrayField)(props.field) || (0, _atscript_ui.isTupleField)(props.field);
@@ -327,10 +342,7 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
327
342
  });
328
343
  }
329
344
  let singularLabel;
330
- if ((0, _atscript_ui.isArrayField)(props.field)) {
331
- const fromArray = (0, _atscript_ui.resolveSingularLabel)(prop);
332
- singularLabel = fromArray !== "item" ? fromArray : (0, _atscript_ui.resolveSingularLabel)(props.field.itemField.prop);
333
- }
345
+ if ((0, _atscript_ui.isArrayField)(props.field)) singularLabel = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_LABEL_SINGULAR) || (0, _atscript_ui.resolveSingularLabel)(props.field.itemField.prop, t);
334
346
  const inputId = `as-field-${(0, vue.useId)()}`;
335
347
  const errorId = `${inputId}-err`;
336
348
  const descId = `${inputId}-desc`;
@@ -345,7 +357,10 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
345
357
  label: (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.META_LABEL) ?? props.field.name
346
358
  } : void 0;
347
359
  const gridClasses = (0, _atscript_ui.buildGridClasses)((0, _atscript_ui.resolveGridSpec)((0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_GRID_COL_SPAN), (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_GRID_ROW_SPAN)));
348
- const formValidate = (0, _atscript_ui.createFieldValidator)(prop, isStructured || isUnion ? { rootOnly: true } : void 0);
360
+ const formValidate = (0, _atscript_ui.createFieldValidator)(prop, {
361
+ rootOnly: isStructured || isUnion,
362
+ t
363
+ });
349
364
  function getModel() {
350
365
  return getByPath(absolutePath.value);
351
366
  }
@@ -388,9 +403,9 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
388
403
  label = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.META_LABEL) ?? props.field.name;
389
404
  description = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.META_DESCRIPTION);
390
405
  hint = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_HINT);
391
- placeholder = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_PLACEHOLDER) ?? (prop.metadata.has("db.writeOnly") ? "(hidden — enter a value to replace)" : void 0);
406
+ placeholder = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_PLACEHOLDER) ?? (prop.metadata.has("db.writeOnly") ? t("UI_FORM_HIDDEN_PLACEHOLDER") : void 0);
392
407
  styles = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_STYLES);
393
- options = (0, _atscript_ui.resolveOptions)(prop, emptyScope);
408
+ options = (0, _atscript_ui.resolveOptions)(prop, emptyScope, props.field.labelsFrom, t);
394
409
  attrs = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_ATTR) !== void 0 ? (0, _atscript_ui.resolveAttrs)(prop, emptyScope) : void 0;
395
410
  title = isStructured || isUnion ? (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.META_LABEL) ?? props.field.name : void 0;
396
411
  classesBase = buildFieldClasses((0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_CLASSES), disabled, hasMetaRequired, optional);
@@ -427,7 +442,7 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
427
442
  hint = maybeComputed(hasFn.has("hint"), () => (0, _atscript_ui.resolveFieldProp)(prop, _atscript_ui.UI_FORM_FN_HINT, _atscript_ui.UI_FORM_HINT, fs.value), (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_HINT));
428
443
  placeholder = maybeComputed(hasFn.has("placeholder"), () => (0, _atscript_ui.resolveFieldProp)(prop, _atscript_ui.UI_FORM_FN_PLACEHOLDER, _atscript_ui.UI_FORM_PLACEHOLDER, fs.value), (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_PLACEHOLDER));
429
444
  styles = maybeComputed(hasFn.has("styles"), () => (0, _atscript_ui.resolveFieldProp)(prop, _atscript_ui.UI_FORM_FN_STYLES, _atscript_ui.UI_FORM_STYLES, fs.value), (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_STYLES));
430
- options = maybeComputed(hasFn.has("options"), () => (0, _atscript_ui.resolveOptions)(prop, fs.value), (0, _atscript_ui.resolveOptions)(prop, emptyScope));
445
+ options = hasFn.has("options") ? (0, vue.computed)(() => (0, _atscript_ui.resolveOptions)(prop, fs.value, props.field.labelsFrom, t)) : (0, _atscript_ui.resolveOptions)(prop, emptyScope, props.field.labelsFrom, t);
431
446
  attrs = hasFn.has("attr") ? (0, vue.computed)(() => (0, _atscript_ui.resolveAttrs)(prop, fs.value)) : (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_ATTR) !== void 0 ? (0, _atscript_ui.resolveAttrs)(prop, emptyScope) : void 0;
432
447
  title = isStructured || isUnion ? maybeComputed(hasFn.has("title"), () => resolveHeaderProp(_atscript_ui.UI_FORM_FN_TITLE, _atscript_ui.META_LABEL) ?? props.field.name, (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.META_LABEL) ?? props.field.name) : void 0;
433
448
  const hasFnClasses = hasFn.has("classes");
@@ -442,7 +457,8 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
442
457
  function formRule(v) {
443
458
  return formValidate(v, {
444
459
  data: rootFormData().value ?? {},
445
- context: formContext.value
460
+ context: formContext.value,
461
+ t
446
462
  });
447
463
  }
448
464
  const { model, error: formError, onBlur: _onBlur, isDirty } = useAsField({
@@ -1,6 +1,7 @@
1
- import { n as useAsUnionVariant, t as formatIndexedLabelParts } from "./use-form-context-cDW2GW4-.mjs";
1
+ import { n as useAsUnionVariant, t as formatIndexedLabelParts } from "./use-form-context-C3FxL3eF.mjs";
2
+ import { r as useAsTexts } from "./use-as-locale-1k9NBn-G.mjs";
2
3
  import { r as useAsFocusFirstAfter } from "./focus-after-toggle-Dtl3P6CS.mjs";
3
- import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-B3GLhKyt.mjs";
4
+ import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-BUF7Am9t.mjs";
4
5
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, toDisplayString, unref, vShow, withDirectives, withKeys, withModifiers } from "vue";
5
6
  //#region src/components/internal/as-no-data.vue?vue&type=script&setup=true&lang.ts
6
7
  const _hoisted_1$1 = {
@@ -25,6 +26,7 @@ var as_no_data_default = /* @__PURE__ */ defineComponent({
25
26
  },
26
27
  setup(__props) {
27
28
  const props = __props;
29
+ const { t } = useAsTexts();
28
30
  const hovered = ref(false);
29
31
  const rootClass = computed(() => props.kind === "textarea" ? "as-no-data-textarea" : "as-no-data");
30
32
  return (_ctx, _cache) => {
@@ -36,7 +38,7 @@ var as_no_data_default = /* @__PURE__ */ defineComponent({
36
38
  role: "button",
37
39
  tabindex: "0",
38
40
  onKeydown: [_cache[3] || (_cache[3] = withKeys((...args) => __props.onEdit && __props.onEdit(...args), ["enter"])), _cache[4] || (_cache[4] = withKeys(withModifiers((...args) => __props.onEdit && __props.onEdit(...args), ["prevent"]), ["space"]))]
39
- }, [createElementVNode("span", _hoisted_1$1, [createElementVNode("span", { class: normalizeClass(hovered.value ? "i-as-field-fill" : "i-as-field-empty") }, null, 2)]), createElementVNode("span", _hoisted_2$1, toDisplayString(hovered.value ? "Click to edit" : "Not set"), 1)], 34);
41
+ }, [createElementVNode("span", _hoisted_1$1, [createElementVNode("span", { class: normalizeClass(hovered.value ? "i-as-field-fill" : "i-as-field-empty") }, null, 2)]), createElementVNode("span", _hoisted_2$1, toDisplayString(unref(t)(hovered.value ? "UI_FORM_CLICK_TO_EDIT" : "UI_FORM_NOT_SET")), 1)], 34);
40
42
  };
41
43
  }
42
44
  });
@@ -57,7 +59,11 @@ const _hoisted_6 = {
57
59
  key: 0,
58
60
  class: "as-field-header-actions"
59
61
  };
60
- const _hoisted_7 = ["disabled"];
62
+ const _hoisted_7 = [
63
+ "disabled",
64
+ "aria-label",
65
+ "title"
66
+ ];
61
67
  const _hoisted_8 = ["id"];
62
68
  const _hoisted_9 = { class: "as-field-input-row" };
63
69
  const _hoisted_10 = {
@@ -293,6 +299,7 @@ var as_field_shell_default = /* @__PURE__ */ defineComponent({
293
299
  const showOptionalClear = computed(() => !!props.optional && optionalEnabled.value && !props.chromeless);
294
300
  const statusId = computed(() => props.statusId || `${props.inputId}-status`);
295
301
  const showEmptyPlaceholder = computed(() => !!props.optional && !optionalEnabled.value && !props.chromeless && !props.hideEmptyPlaceholder);
302
+ const { t } = useAsTexts();
296
303
  return (_ctx, _cache) => {
297
304
  return withDirectives((openBlock(), createElementBlock("div", {
298
305
  ref_key: "rootRef",
@@ -329,8 +336,8 @@ var as_field_shell_default = /* @__PURE__ */ defineComponent({
329
336
  type: "button",
330
337
  class: "as-field-remove-btn",
331
338
  disabled: !__props.canRemove,
332
- "aria-label": "Remove",
333
- title: "Remove",
339
+ "aria-label": unref(t)("UI_REMOVE"),
340
+ title: unref(t)("UI_REMOVE"),
334
341
  onClick: _cache[1] || (_cache[1] = (...args) => __props.onRemove && __props.onRemove(...args))
335
342
  }, [..._cache[3] || (_cache[3] = [createElementVNode("span", {
336
343
  class: "as-field-remove-btn-icon",
@@ -372,7 +379,7 @@ var as_field_shell_default = /* @__PURE__ */ defineComponent({
372
379
  key: 2,
373
380
  id: statusId.value,
374
381
  class: "as-field-status"
375
- }, "Modified", 8, _hoisted_13)) : createCommentVNode("v-if", true)
382
+ }, toDisplayString(unref(t)("UI_FORM_MODIFIED")), 9, _hoisted_13)) : createCommentVNode("v-if", true)
376
383
  ]),
377
384
  __props.formAction ? (openBlock(), createElementBlock("button", {
378
385
  key: 0,
@@ -1,6 +1,7 @@
1
- const require_use_form_context = require("./use-form-context-B6ZnzfxG.cjs");
1
+ const require_use_form_context = require("./use-form-context-CXsLnG7l.cjs");
2
+ const require_use_as_locale = require("./use-as-locale-C2tFUenv.cjs");
2
3
  const require_focus_after_toggle = require("./focus-after-toggle-CWxiPZWi.cjs");
3
- const require_as_variant_picker = require("./as-variant-picker-JlEhh7YO.cjs");
4
+ const require_as_variant_picker = require("./as-variant-picker-BcJx7Zt7.cjs");
4
5
  let vue = require("vue");
5
6
  //#region src/components/internal/as-no-data.vue?vue&type=script&setup=true&lang.ts
6
7
  const _hoisted_1$1 = {
@@ -25,6 +26,7 @@ var as_no_data_default = /* @__PURE__ */ (0, vue.defineComponent)({
25
26
  },
26
27
  setup(__props) {
27
28
  const props = __props;
29
+ const { t } = require_use_as_locale.useAsTexts();
28
30
  const hovered = (0, vue.ref)(false);
29
31
  const rootClass = (0, vue.computed)(() => props.kind === "textarea" ? "as-no-data-textarea" : "as-no-data");
30
32
  return (_ctx, _cache) => {
@@ -36,7 +38,7 @@ var as_no_data_default = /* @__PURE__ */ (0, vue.defineComponent)({
36
38
  role: "button",
37
39
  tabindex: "0",
38
40
  onKeydown: [_cache[3] || (_cache[3] = (0, vue.withKeys)((...args) => __props.onEdit && __props.onEdit(...args), ["enter"])), _cache[4] || (_cache[4] = (0, vue.withKeys)((0, vue.withModifiers)((...args) => __props.onEdit && __props.onEdit(...args), ["prevent"]), ["space"]))]
39
- }, [(0, vue.createElementVNode)("span", _hoisted_1$1, [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(hovered.value ? "i-as-field-fill" : "i-as-field-empty") }, null, 2)]), (0, vue.createElementVNode)("span", _hoisted_2$1, (0, vue.toDisplayString)(hovered.value ? "Click to edit" : "Not set"), 1)], 34);
41
+ }, [(0, vue.createElementVNode)("span", _hoisted_1$1, [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(hovered.value ? "i-as-field-fill" : "i-as-field-empty") }, null, 2)]), (0, vue.createElementVNode)("span", _hoisted_2$1, (0, vue.toDisplayString)((0, vue.unref)(t)(hovered.value ? "UI_FORM_CLICK_TO_EDIT" : "UI_FORM_NOT_SET")), 1)], 34);
40
42
  };
41
43
  }
42
44
  });
@@ -57,7 +59,11 @@ const _hoisted_6 = {
57
59
  key: 0,
58
60
  class: "as-field-header-actions"
59
61
  };
60
- const _hoisted_7 = ["disabled"];
62
+ const _hoisted_7 = [
63
+ "disabled",
64
+ "aria-label",
65
+ "title"
66
+ ];
61
67
  const _hoisted_8 = ["id"];
62
68
  const _hoisted_9 = { class: "as-field-input-row" };
63
69
  const _hoisted_10 = {
@@ -293,6 +299,7 @@ var as_field_shell_default = /* @__PURE__ */ (0, vue.defineComponent)({
293
299
  const showOptionalClear = (0, vue.computed)(() => !!props.optional && optionalEnabled.value && !props.chromeless);
294
300
  const statusId = (0, vue.computed)(() => props.statusId || `${props.inputId}-status`);
295
301
  const showEmptyPlaceholder = (0, vue.computed)(() => !!props.optional && !optionalEnabled.value && !props.chromeless && !props.hideEmptyPlaceholder);
302
+ const { t } = require_use_as_locale.useAsTexts();
296
303
  return (_ctx, _cache) => {
297
304
  return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
298
305
  ref_key: "rootRef",
@@ -329,8 +336,8 @@ var as_field_shell_default = /* @__PURE__ */ (0, vue.defineComponent)({
329
336
  type: "button",
330
337
  class: "as-field-remove-btn",
331
338
  disabled: !__props.canRemove,
332
- "aria-label": "Remove",
333
- title: "Remove",
339
+ "aria-label": (0, vue.unref)(t)("UI_REMOVE"),
340
+ title: (0, vue.unref)(t)("UI_REMOVE"),
334
341
  onClick: _cache[1] || (_cache[1] = (...args) => __props.onRemove && __props.onRemove(...args))
335
342
  }, [..._cache[3] || (_cache[3] = [(0, vue.createElementVNode)("span", {
336
343
  class: "as-field-remove-btn-icon",
@@ -372,7 +379,7 @@ var as_field_shell_default = /* @__PURE__ */ (0, vue.defineComponent)({
372
379
  key: 2,
373
380
  id: statusId.value,
374
381
  class: "as-field-status"
375
- }, "Modified", 8, _hoisted_13)) : (0, vue.createCommentVNode)("v-if", true)
382
+ }, (0, vue.toDisplayString)((0, vue.unref)(t)("UI_FORM_MODIFIED")), 9, _hoisted_13)) : (0, vue.createCommentVNode)("v-if", true)
376
383
  ]),
377
384
  __props.formAction ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
378
385
  key: 0,
@@ -1,2 +1,2 @@
1
- const require_as_field_shell = require("./as-field-shell-BrJpCzIA.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-DSj3CqN6.cjs");
2
2
  module.exports = require_as_field_shell.as_field_shell_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-field-shell.vue-B1ep312_.cjs";
1
+ import { t as _default } from "./as-field-shell.vue-DAcRqi7G.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-field-shell.vue-DisEXQI1.mjs";
1
+ import { t as _default } from "./as-field-shell.vue-BU0_8-uI.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-Bxqa_ZsU.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-D7XovzgJ.mjs";
2
2
  export { as_field_shell_default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-Crwu2D-w.cjs";
1
+ import { o as TAsComponentProps } from "./types-BoguW89D.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-field-shell.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-BLoV3zIo.mjs";
1
+ import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-field-shell.vue.d.ts
package/dist/as-field.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_field = require("./as-field-C_DB6Lbi.cjs");
1
+ const require_as_field = require("./as-field-D0HgywQY.cjs");
2
2
  module.exports = require_as_field.as_field_default;
package/dist/as-field.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as as_field_default } from "./as-field-DqK4Yiev.mjs";
1
+ import { t as as_field_default } from "./as-field-BZpWLPcM.mjs";
2
2
  export { as_field_default as default };