@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.
- package/dist/as-action.d.cts +1 -1
- package/dist/as-action.d.mts +1 -1
- package/dist/{as-action.vue-wcB6Dkpu.d.cts → as-action.vue-CYGG4gUQ.d.mts} +1 -1
- package/dist/{as-action.vue-yDKx8hC0.d.mts → as-action.vue-Cp9Q8a-6.d.cts} +1 -1
- package/dist/{as-array-CD_Z7lZV.mjs → as-array-B2axGw3v.mjs} +15 -12
- package/dist/{as-array-CX52_z_L.cjs → as-array-C97cLzdA.cjs} +16 -13
- package/dist/{as-array-clear-btn-COfRUzeb.cjs → as-array-clear-btn-BBFccQjO.cjs} +5 -3
- package/dist/{as-array-clear-btn-BY1IBwBP.mjs → as-array-clear-btn-DEH8a3_N.mjs} +6 -4
- package/dist/as-array.cjs +1 -1
- package/dist/as-array.d.cts +1 -1
- package/dist/as-array.d.mts +1 -1
- package/dist/as-array.mjs +1 -1
- package/dist/{as-array.vue-BoKbyO1a.d.cts → as-array.vue-Cgfjz2I-.d.cts} +1 -1
- package/dist/{as-array.vue-DKcxkmjP.d.mts → as-array.vue-Wj9giGdu.d.mts} +1 -1
- package/dist/{as-checkbox-DosdhEuS.mjs → as-checkbox-BO8xW0OM.mjs} +36 -12
- package/dist/{as-checkbox-QO5Oh13K.cjs → as-checkbox-Wn-PmHi-.cjs} +35 -11
- package/dist/as-checkbox.cjs +1 -1
- package/dist/as-checkbox.d.cts +1 -1
- package/dist/as-checkbox.d.mts +1 -1
- package/dist/as-checkbox.mjs +1 -1
- package/dist/{as-checkbox.vue-BXS5v6Ru.d.mts → as-checkbox.vue-CWe73b3Z.d.mts} +1 -1
- package/dist/{as-checkbox.vue-DdttMJAS.d.cts → as-checkbox.vue-CXiUHIZj.d.cts} +1 -1
- package/dist/{as-collapsible-CQyuXwj9.cjs → as-collapsible-BGeuF2Bn.cjs} +4 -2
- package/dist/{as-collapsible-DHSlSMfY.mjs → as-collapsible-Cb9SgJh9.mjs} +5 -3
- package/dist/as-collapsible.cjs +1 -1
- package/dist/as-collapsible.d.cts +1 -1
- package/dist/as-collapsible.d.mts +1 -1
- package/dist/as-collapsible.mjs +1 -1
- package/dist/{as-collapsible.vue-1JSWgRMg.d.cts → as-collapsible.vue-BXwe24OV.d.cts} +1 -1
- package/dist/{as-collapsible.vue-DowxhNde.d.mts → as-collapsible.vue-hfAqxx1w.d.mts} +1 -1
- package/dist/{as-date-DTUQP2Dc.cjs → as-date-B2dgUoau.cjs} +1 -1
- package/dist/{as-date-DyQsn7Mu.mjs → as-date-jQpwe6sr.mjs} +1 -1
- package/dist/as-date.cjs +1 -1
- package/dist/as-date.d.cts +1 -1
- package/dist/as-date.d.mts +1 -1
- package/dist/as-date.mjs +1 -1
- package/dist/{as-date.vue-BVvALvZ_.d.mts → as-date.vue-BTm9X4fW.d.mts} +1 -1
- package/dist/{as-date.vue-BiUgcOwZ.d.cts → as-date.vue-axahL_Zv.d.cts} +1 -1
- package/dist/{as-datetime-BDJtlZLz.cjs → as-datetime-CmBLyjgU.cjs} +1 -1
- package/dist/{as-datetime-CrstxtPJ.mjs → as-datetime-DYn9NndT.mjs} +1 -1
- package/dist/as-datetime.cjs +1 -1
- package/dist/as-datetime.d.cts +1 -1
- package/dist/as-datetime.d.mts +1 -1
- package/dist/as-datetime.mjs +1 -1
- package/dist/{as-datetime.vue-BVc6jcUI.d.cts → as-datetime.vue-C6ILTI-7.d.cts} +1 -1
- package/dist/{as-datetime.vue-CCQqZsKA.d.mts → as-datetime.vue-vysHc3Ug.d.mts} +1 -1
- package/dist/{as-decimal-Bimpnzo2.mjs → as-decimal-C-OJ8ygU.mjs} +4 -3
- package/dist/{as-decimal-BZWqiKXZ.cjs → as-decimal-C0Eqd9nM.cjs} +4 -3
- package/dist/as-decimal.cjs +1 -1
- package/dist/as-decimal.d.cts +1 -1
- package/dist/as-decimal.d.mts +1 -1
- package/dist/as-decimal.mjs +1 -1
- package/dist/{as-decimal.vue-BDfM2ICc.d.mts → as-decimal.vue-CAq25zbX.d.mts} +1 -1
- package/dist/{as-decimal.vue-Cc9pNTqj.d.cts → as-decimal.vue-Dgfz9UDJ.d.cts} +1 -1
- package/dist/{as-field-DqK4Yiev.mjs → as-field-BZpWLPcM.mjs} +32 -16
- package/dist/{as-field-C_DB6Lbi.cjs → as-field-D0HgywQY.cjs} +31 -15
- package/dist/{as-field-shell-Bxqa_ZsU.mjs → as-field-shell-D7XovzgJ.mjs} +14 -7
- package/dist/{as-field-shell-BrJpCzIA.cjs → as-field-shell-DSj3CqN6.cjs} +14 -7
- package/dist/as-field-shell.cjs +1 -1
- package/dist/as-field-shell.d.cts +1 -1
- package/dist/as-field-shell.d.mts +1 -1
- package/dist/as-field-shell.mjs +1 -1
- package/dist/{as-field-shell.vue-B1ep312_.d.cts → as-field-shell.vue-BU0_8-uI.d.mts} +1 -1
- package/dist/{as-field-shell.vue-DisEXQI1.d.mts → as-field-shell.vue-DAcRqi7G.d.cts} +1 -1
- package/dist/as-field.cjs +1 -1
- package/dist/as-field.mjs +1 -1
- package/dist/{as-form-DLYEF8Ez.mjs → as-form-0VCxVsGo.mjs} +20 -11
- package/dist/{as-form-DgbRGqD8.cjs → as-form-ChyW9bj2.cjs} +19 -10
- package/dist/as-form.cjs +1 -1
- package/dist/as-form.d.cts +1 -1
- package/dist/as-form.d.mts +1 -1
- package/dist/as-form.mjs +1 -1
- package/dist/{as-form.vue-BmKBCn6P.d.cts → as-form.vue-CjNW1L-x.d.cts} +55 -326
- package/dist/{as-form.vue-hHJm_Rxq.d.mts → as-form.vue-NCTvXZUy.d.mts} +55 -326
- package/dist/{as-input-UkZxRSD4.cjs → as-input-Bf94SAOY.cjs} +1 -1
- package/dist/{as-input-65rtLZt3.mjs → as-input-DlLLiAYI.mjs} +1 -1
- package/dist/as-input.cjs +1 -1
- package/dist/as-input.d.cts +1 -1
- package/dist/as-input.d.mts +1 -1
- package/dist/as-input.mjs +1 -1
- package/dist/{as-input.vue-CL-Om6Ed.d.mts → as-input.vue-CyLveDWK.d.mts} +1 -1
- package/dist/{as-input.vue-D-RM35Rp.d.cts → as-input.vue-mZ0h1Q2J.d.cts} +1 -1
- package/dist/{as-iterator-DHNJwo-R.cjs → as-iterator-Bty6f5Bq.cjs} +2 -2
- package/dist/{as-iterator-mOyaYJiN.mjs → as-iterator-Dp1OiwU7.mjs} +2 -2
- package/dist/as-iterator.cjs +1 -1
- package/dist/as-iterator.mjs +1 -1
- package/dist/{as-multi-select-AC05uVzY.mjs → as-multi-select-DT0M_1_O.mjs} +97 -26
- package/dist/{as-multi-select-BedSzod1.cjs → as-multi-select-ZGBYoI48.cjs} +95 -24
- package/dist/as-multi-select.cjs +1 -1
- package/dist/as-multi-select.d.cts +1 -1
- package/dist/as-multi-select.d.mts +1 -1
- package/dist/as-multi-select.mjs +1 -1
- package/dist/{as-multi-select.vue-5GHWrbim.d.mts → as-multi-select.vue-BS9bNhCB.d.mts} +1 -1
- package/dist/{as-multi-select.vue-D1OnCH-x.d.cts → as-multi-select.vue-DAFz9hZR.d.cts} +1 -1
- package/dist/{as-number-BMsgxGQw.cjs → as-number-DXQCnc9d.cjs} +2 -2
- package/dist/{as-number-6DTZnVfg.mjs → as-number-DkG5GuGW.mjs} +2 -2
- package/dist/as-number.cjs +1 -1
- package/dist/as-number.d.cts +1 -1
- package/dist/as-number.d.mts +1 -1
- package/dist/as-number.mjs +1 -1
- package/dist/{as-number.vue-BiZ2B2iJ.d.mts → as-number.vue-BsJdJS36.d.cts} +1 -1
- package/dist/{as-number.vue-DE33Giq3.d.cts → as-number.vue-DSP2S_xP.d.mts} +1 -1
- package/dist/{as-object-YYxV2y77.cjs → as-object-DLdKOhxb.cjs} +14 -8
- package/dist/{as-object-B_x-yycI.mjs → as-object-mpRxIKVB.mjs} +14 -8
- package/dist/as-object.cjs +1 -1
- package/dist/as-object.d.cts +1 -1
- package/dist/as-object.d.mts +1 -1
- package/dist/as-object.mjs +1 -1
- package/dist/{as-object.vue-Dg4IT2JT.d.mts → as-object.vue-CpDhlJ_D.d.mts} +1 -1
- package/dist/{as-object.vue-PUhmGqhY.d.cts → as-object.vue-DduGoHKD.d.cts} +1 -1
- package/dist/as-paragraph.d.cts +1 -1
- package/dist/as-paragraph.d.mts +1 -1
- package/dist/{as-paragraph.vue-BUfbXaiy.d.cts → as-paragraph.vue-BJSA27kd.d.cts} +1 -1
- package/dist/{as-paragraph.vue-Bp-MUDcH.d.mts → as-paragraph.vue-CMUaF6WV.d.mts} +1 -1
- package/dist/{as-radio-Dg9c4dGh.mjs → as-radio-CW9YWBnC.mjs} +3 -3
- package/dist/{as-radio-C06SIAFY.cjs → as-radio-D9sctKpc.cjs} +2 -2
- package/dist/as-radio.cjs +1 -1
- package/dist/as-radio.d.cts +1 -1
- package/dist/as-radio.d.mts +1 -1
- package/dist/as-radio.mjs +1 -1
- package/dist/{as-radio.vue-NmjJm8Pj.d.mts → as-radio.vue-BR2ThEbi.d.mts} +1 -1
- package/dist/{as-radio.vue-h4XkpaW0.d.cts → as-radio.vue-Dw1QaJoY.d.cts} +1 -1
- package/dist/{as-ref-BEhS_vo9.cjs → as-ref-CpHMAAJu.cjs} +5 -3
- package/dist/{as-ref-BWJlIf5G.mjs → as-ref-DaCGfshO.mjs} +5 -3
- package/dist/as-ref.cjs +1 -1
- package/dist/as-ref.d.cts +1 -1
- package/dist/as-ref.d.mts +1 -1
- package/dist/as-ref.mjs +1 -1
- package/dist/{as-ref.vue-ec447Bmx.d.cts → as-ref.vue-CZzOVBz1.d.mts} +1 -1
- package/dist/{as-ref.vue-vP2P1ePF.d.mts → as-ref.vue-CvY88H7p.d.cts} +1 -1
- package/dist/{as-select-CrTKlmhd.mjs → as-select-CrjlxcgR.mjs} +3 -3
- package/dist/{as-select-DzEUs8Od.cjs → as-select-DAbNosmB.cjs} +2 -2
- package/dist/as-select.cjs +1 -1
- package/dist/as-select.d.cts +1 -1
- package/dist/as-select.d.mts +1 -1
- package/dist/as-select.mjs +1 -1
- package/dist/{as-select.vue-9mQ6cjW7.d.mts → as-select.vue-7xiuC9JG.d.cts} +1 -1
- package/dist/{as-select.vue-DV0C1MsH.d.cts → as-select.vue-BPPctxZT.d.mts} +1 -1
- package/dist/{as-time-BQ6KXMyV.mjs → as-time-BmXXgfCZ.mjs} +1 -1
- package/dist/{as-time-Cu-8mKpR.cjs → as-time-NaICaSIj.cjs} +1 -1
- package/dist/as-time.cjs +1 -1
- package/dist/as-time.d.cts +1 -1
- package/dist/as-time.d.mts +1 -1
- package/dist/as-time.mjs +1 -1
- package/dist/{as-time.vue-CmvsgHJd.d.cts → as-time.vue-CQhIKAs0.d.cts} +1 -1
- package/dist/{as-time.vue-DGfZPnWK.d.mts → as-time.vue-CjzRrsFg.d.mts} +1 -1
- package/dist/{as-tuple-Dny4Ov_j.mjs → as-tuple-BBx6P6xb.mjs} +8 -6
- package/dist/{as-tuple-CfgSnsT9.cjs → as-tuple-DkI9fp4G.cjs} +8 -6
- package/dist/as-tuple.cjs +1 -1
- package/dist/as-tuple.d.cts +1 -1
- package/dist/as-tuple.d.mts +1 -1
- package/dist/as-tuple.mjs +1 -1
- package/dist/{as-tuple.vue-CInEbMRo.d.mts → as-tuple.vue-BSh2-1uv.d.cts} +1 -1
- package/dist/{as-tuple.vue-zZkuYxet.d.cts → as-tuple.vue-DvHHrn-6.d.mts} +1 -1
- package/dist/{as-union-DT8XDZSt.cjs → as-union-BjmrvD80.cjs} +8 -6
- package/dist/{as-union-Gz8gEjmn.mjs → as-union-C3QiGYlE.mjs} +7 -5
- package/dist/as-union.cjs +1 -1
- package/dist/as-union.d.cts +1 -1
- package/dist/as-union.d.mts +1 -1
- package/dist/as-union.mjs +1 -1
- package/dist/{as-union.vue-Bz3EO0Gg.d.mts → as-union.vue-BJ8xFYYb.d.mts} +1 -1
- package/dist/{as-union.vue-K9ZSRg0G.d.cts → as-union.vue-CnF4bNex.d.cts} +1 -1
- package/dist/{as-variant-picker-B3GLhKyt.mjs → as-variant-picker-BUF7Am9t.mjs} +13 -8
- package/dist/{as-variant-picker-JlEhh7YO.cjs → as-variant-picker-BcJx7Zt7.cjs} +14 -9
- package/dist/index.cjs +30 -27
- package/dist/index.d.cts +23 -22
- package/dist/index.d.mts +23 -22
- package/dist/index.mjs +29 -26
- package/dist/locale.cjs +5 -0
- package/dist/locale.d.cts +2 -0
- package/dist/locale.d.mts +2 -0
- package/dist/locale.mjs +2 -0
- package/dist/{types-BLoV3zIo.d.mts → types-BoguW89D.d.mts} +24 -19
- package/dist/{types-Crwu2D-w.d.cts → types-DoLxVJhd.d.cts} +24 -19
- package/dist/use-as-locale-1k9NBn-G.mjs +56 -0
- package/dist/use-as-locale-BVcC0l75.d.mts +35 -0
- package/dist/use-as-locale-C2tFUenv.cjs +73 -0
- package/dist/use-as-locale-CnGzoVWd.d.cts +35 -0
- package/dist/{use-as-value-help-CDmkz6A7.cjs → use-as-value-help-BE-fAZRP.cjs} +4 -2
- package/dist/{use-as-value-help-CYMlEubv.mjs → use-as-value-help-nIpEFMqD.mjs} +4 -2
- package/dist/{use-form-context-cDW2GW4-.mjs → use-form-context-C3FxL3eF.mjs} +4 -1
- package/dist/{use-form-context-B6ZnzfxG.cjs → use-form-context-CXsLnG7l.cjs} +4 -1
- package/dist/{use-as-dropdown-B2Shb7wn.mjs → variant-label-B065kts3.mjs} +13 -1
- package/dist/{use-as-dropdown-Bj9toVdw.cjs → variant-label-C-rLK7Z3.cjs} +18 -0
- package/package.json +16 -11
- package/dist/use-as-locale-BrFdAgnU.mjs +0 -23
- package/dist/use-as-locale-C4z5stwD.cjs +0 -34
package/dist/as-action.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-action.vue-
|
|
1
|
+
import { t as _default } from "./as-action.vue-Cp9Q8a-6.cjs";
|
|
2
2
|
export = _default;
|
package/dist/as-action.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-action.vue-
|
|
1
|
+
import { t as _default } from "./as-action.vue-CYGG4gUQ.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { a as CHANGE_HANDLER_KEY, n as useAsUnionVariant, r as useFormContext } from "./use-form-context-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
1
|
+
import { a as CHANGE_HANDLER_KEY, n as useAsUnionVariant, r as useFormContext } from "./use-form-context-C3FxL3eF.mjs";
|
|
2
|
+
import { r as useAsTexts } from "./use-as-locale-1k9NBn-G.mjs";
|
|
3
|
+
import { t as as_field_default } from "./as-field-BZpWLPcM.mjs";
|
|
4
|
+
import { t as as_collapsible_default } from "./as-collapsible-Cb9SgJh9.mjs";
|
|
5
|
+
import { t as as_variant_picker_default } from "./as-variant-picker-BUF7Am9t.mjs";
|
|
6
|
+
import { n as useAsDropdown, t as variantLabel } from "./variant-label-B065kts3.mjs";
|
|
6
7
|
import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-BdjKNx9P.mjs";
|
|
7
|
-
import { t as as_array_clear_btn_default } from "./as-array-clear-btn-
|
|
8
|
+
import { t as as_array_clear_btn_default } from "./as-array-clear-btn-DEH8a3_N.mjs";
|
|
8
9
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, normalizeClass, openBlock, reactive, ref, renderList, toDisplayString, unref, useTemplateRef, vShow, watch, withCtx, withDirectives } from "vue";
|
|
9
10
|
import { createFormData, createFormValueResolver, getFieldMeta, isUnionField } from "@atscript/ui";
|
|
10
11
|
//#region src/composables/use-as-array.ts
|
|
@@ -121,8 +122,9 @@ var as_items_chip_default = /* @__PURE__ */ defineComponent({
|
|
|
121
122
|
required: true
|
|
122
123
|
} },
|
|
123
124
|
setup(__props) {
|
|
125
|
+
const { t } = useAsTexts();
|
|
124
126
|
return (_ctx, _cache) => {
|
|
125
|
-
return openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(__props.count)
|
|
127
|
+
return openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(unref(t)("UI_FORM_ITEMS_COUNT", { count: __props.count })), 1);
|
|
126
128
|
};
|
|
127
129
|
}
|
|
128
130
|
});
|
|
@@ -346,7 +348,8 @@ var as_array_default = /* @__PURE__ */ defineComponent({
|
|
|
346
348
|
const disabled = computed(() => props.disabled ?? false);
|
|
347
349
|
const { arrayValue, itemKeys, isUnion, unionVariants, isOptional, isEmpty, getItemField, addItem, removeItem, clear, canAdd, canRemove } = useAsArray(arrayField, disabled);
|
|
348
350
|
const level = computed(() => props.level ?? 0);
|
|
349
|
-
const
|
|
351
|
+
const { t } = useAsTexts();
|
|
352
|
+
const singular = props.singularLabel ?? t("UI_ITEM");
|
|
350
353
|
const defaultOpen = !isOptional;
|
|
351
354
|
const addDropdownRef = ref(null);
|
|
352
355
|
const { isOpen: addOpen, toggle: toggleAdd, select: selectAdd } = useAsDropdown(addDropdownRef);
|
|
@@ -422,7 +425,7 @@ var as_array_default = /* @__PURE__ */ defineComponent({
|
|
|
422
425
|
class: "as-array-add-btn",
|
|
423
426
|
disabled: !unref(canAdd),
|
|
424
427
|
onClick: _cache[0] || (_cache[0] = ($event) => handleAdd(0))
|
|
425
|
-
}, "
|
|
428
|
+
}, toDisplayString(unref(t)("UI_FORM_ADD", { item: unref(singular) })), 9, _hoisted_2)) : (openBlock(), createElementBlock("div", {
|
|
426
429
|
key: 1,
|
|
427
430
|
ref_key: "addDropdownRef",
|
|
428
431
|
ref: addDropdownRef,
|
|
@@ -432,13 +435,13 @@ var as_array_default = /* @__PURE__ */ defineComponent({
|
|
|
432
435
|
class: "as-array-add-btn",
|
|
433
436
|
disabled: !unref(canAdd),
|
|
434
437
|
onClick: _cache[1] || (_cache[1] = (...args) => unref(toggleAdd) && unref(toggleAdd)(...args))
|
|
435
|
-
}, "
|
|
438
|
+
}, toDisplayString(unref(t)("UI_FORM_ADD", { item: unref(singular) })), 9, _hoisted_3), unref(addOpen) ? (openBlock(), createElementBlock("div", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(unionVariants), (v, vi) => {
|
|
436
439
|
return openBlock(), createElementBlock("button", {
|
|
437
440
|
key: vi,
|
|
438
441
|
type: "button",
|
|
439
442
|
class: "as-dropdown-item",
|
|
440
443
|
onClick: ($event) => unref(selectAdd)(() => handleAdd(vi))
|
|
441
|
-
}, toDisplayString(v
|
|
444
|
+
}, toDisplayString(unref(variantLabel)(v, unref(t))), 9, _hoisted_5);
|
|
442
445
|
}), 128))])) : createCommentVNode("v-if", true)], 512))])]),
|
|
443
446
|
empty: withCtx(() => [withDirectives(createElementVNode("div", { class: normalizeClass(["as-object-empty as-grid-item", _ctx.$props.class]) }, [createElementVNode("button", {
|
|
444
447
|
type: "button",
|
|
@@ -447,7 +450,7 @@ var as_array_default = /* @__PURE__ */ defineComponent({
|
|
|
447
450
|
}, [_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
448
451
|
class: "i-as-field-fill as-object-empty-add-icon",
|
|
449
452
|
"aria-hidden": "true"
|
|
450
|
-
}, null, -1)), createTextVNode("
|
|
453
|
+
}, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("UI_FORM_ADD", { item: __props.title })), 1)]), __props.description ? (openBlock(), createElementBlock("p", _hoisted_6, toDisplayString(__props.description), 1)) : createCommentVNode("v-if", true)], 2), [[vShow, !__props.hidden]])]),
|
|
451
454
|
_: 1
|
|
452
455
|
}, 8, [
|
|
453
456
|
"class",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
const require_use_form_context = require("./use-form-context-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
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
|
+
const require_as_field = require("./as-field-D0HgywQY.cjs");
|
|
4
|
+
const require_as_collapsible = require("./as-collapsible-BGeuF2Bn.cjs");
|
|
5
|
+
const require_as_variant_picker = require("./as-variant-picker-BcJx7Zt7.cjs");
|
|
6
|
+
const require_variant_label = require("./variant-label-C-rLK7Z3.cjs");
|
|
6
7
|
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-CD8seN3C.cjs");
|
|
7
|
-
const require_as_array_clear_btn = require("./as-array-clear-btn-
|
|
8
|
+
const require_as_array_clear_btn = require("./as-array-clear-btn-BBFccQjO.cjs");
|
|
8
9
|
let vue = require("vue");
|
|
9
10
|
let _atscript_ui = require("@atscript/ui");
|
|
10
11
|
//#region src/composables/use-as-array.ts
|
|
@@ -121,8 +122,9 @@ var as_items_chip_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
121
122
|
required: true
|
|
122
123
|
} },
|
|
123
124
|
setup(__props) {
|
|
125
|
+
const { t } = require_use_as_locale.useAsTexts();
|
|
124
126
|
return (_ctx, _cache) => {
|
|
125
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_1$1, (0, vue.toDisplayString)(
|
|
127
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_1$1, (0, vue.toDisplayString)((0, vue.unref)(t)("UI_FORM_ITEMS_COUNT", { count: __props.count })), 1);
|
|
126
128
|
};
|
|
127
129
|
}
|
|
128
130
|
});
|
|
@@ -346,10 +348,11 @@ var as_array_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
346
348
|
const disabled = (0, vue.computed)(() => props.disabled ?? false);
|
|
347
349
|
const { arrayValue, itemKeys, isUnion, unionVariants, isOptional, isEmpty, getItemField, addItem, removeItem, clear, canAdd, canRemove } = useAsArray(arrayField, disabled);
|
|
348
350
|
const level = (0, vue.computed)(() => props.level ?? 0);
|
|
349
|
-
const
|
|
351
|
+
const { t } = require_use_as_locale.useAsTexts();
|
|
352
|
+
const singular = props.singularLabel ?? t("UI_ITEM");
|
|
350
353
|
const defaultOpen = !isOptional;
|
|
351
354
|
const addDropdownRef = (0, vue.ref)(null);
|
|
352
|
-
const { isOpen: addOpen, toggle: toggleAdd, select: selectAdd } =
|
|
355
|
+
const { isOpen: addOpen, toggle: toggleAdd, select: selectAdd } = require_variant_label.useAsDropdown(addDropdownRef);
|
|
353
356
|
const collapsibleRef = (0, vue.useTemplateRef)("collapsibleRef");
|
|
354
357
|
const { composeAction } = require_use_as_optional_add_flow.useAsOptionalAddFlow({ path: () => props.path });
|
|
355
358
|
function fieldFor(idx) {
|
|
@@ -422,7 +425,7 @@ var as_array_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
422
425
|
class: "as-array-add-btn",
|
|
423
426
|
disabled: !(0, vue.unref)(canAdd),
|
|
424
427
|
onClick: _cache[0] || (_cache[0] = ($event) => handleAdd(0))
|
|
425
|
-
},
|
|
428
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("UI_FORM_ADD", { item: (0, vue.unref)(singular) })), 9, _hoisted_2)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
426
429
|
key: 1,
|
|
427
430
|
ref_key: "addDropdownRef",
|
|
428
431
|
ref: addDropdownRef,
|
|
@@ -432,13 +435,13 @@ var as_array_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
432
435
|
class: "as-array-add-btn",
|
|
433
436
|
disabled: !(0, vue.unref)(canAdd),
|
|
434
437
|
onClick: _cache[1] || (_cache[1] = (...args) => (0, vue.unref)(toggleAdd) && (0, vue.unref)(toggleAdd)(...args))
|
|
435
|
-
},
|
|
438
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("UI_FORM_ADD", { item: (0, vue.unref)(singular) })), 9, _hoisted_3), (0, vue.unref)(addOpen) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)((0, vue.unref)(unionVariants), (v, vi) => {
|
|
436
439
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
437
440
|
key: vi,
|
|
438
441
|
type: "button",
|
|
439
442
|
class: "as-dropdown-item",
|
|
440
443
|
onClick: ($event) => (0, vue.unref)(selectAdd)(() => handleAdd(vi))
|
|
441
|
-
}, (0, vue.toDisplayString)(v.
|
|
444
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(require_variant_label.variantLabel)(v, (0, vue.unref)(t))), 9, _hoisted_5);
|
|
442
445
|
}), 128))])) : (0, vue.createCommentVNode)("v-if", true)], 512))])]),
|
|
443
446
|
empty: (0, vue.withCtx)(() => [(0, vue.withDirectives)((0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)(["as-object-empty as-grid-item", _ctx.$props.class]) }, [(0, vue.createElementVNode)("button", {
|
|
444
447
|
type: "button",
|
|
@@ -447,7 +450,7 @@ var as_array_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
447
450
|
}, [_cache[2] || (_cache[2] = (0, vue.createElementVNode)("span", {
|
|
448
451
|
class: "i-as-field-fill as-object-empty-add-icon",
|
|
449
452
|
"aria-hidden": "true"
|
|
450
|
-
}, null, -1)), (0, vue.createTextVNode)("
|
|
453
|
+
}, null, -1)), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(t)("UI_FORM_ADD", { item: __props.title })), 1)]), __props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_6, (0, vue.toDisplayString)(__props.description), 1)) : (0, vue.createCommentVNode)("v-if", true)], 2), [[vue.vShow, !__props.hidden]])]),
|
|
451
454
|
_: 1
|
|
452
455
|
}, 8, [
|
|
453
456
|
"class",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_use_as_locale = require("./use-as-locale-C2tFUenv.cjs");
|
|
2
|
+
const require_as_variant_picker = require("./as-variant-picker-BcJx7Zt7.cjs");
|
|
2
3
|
let vue = require("vue");
|
|
3
4
|
//#region src/components/internal/as-array-clear-btn.vue?vue&type=script&setup=true&lang.ts
|
|
4
5
|
const _hoisted_1 = ["disabled", "aria-label"];
|
|
@@ -22,6 +23,7 @@ var as_array_clear_btn_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
22
23
|
},
|
|
23
24
|
emits: ["clear"],
|
|
24
25
|
setup(__props) {
|
|
26
|
+
const { t } = require_use_as_locale.useAsTexts();
|
|
25
27
|
return (_ctx, _cache) => {
|
|
26
28
|
return __props.optional ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_variant_picker.as_optional_clear_default, {
|
|
27
29
|
key: 0,
|
|
@@ -33,9 +35,9 @@ var as_array_clear_btn_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
33
35
|
type: "button",
|
|
34
36
|
class: "as-optional-clear",
|
|
35
37
|
disabled: __props.disabled,
|
|
36
|
-
"aria-label": __props.label ?
|
|
38
|
+
"aria-label": __props.label ? (0, vue.unref)(t)("UI_FORM_CLEAR_FIELD", { field: __props.label }) : (0, vue.unref)(t)("UI_CLEAR"),
|
|
37
39
|
onClick: _cache[1] || (_cache[1] = (0, vue.withModifiers)(($event) => _ctx.$emit("clear"), ["stop", "prevent"]))
|
|
38
|
-
},
|
|
40
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("UI_CLEAR")), 9, _hoisted_1));
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
43
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { r as useAsTexts } from "./use-as-locale-1k9NBn-G.mjs";
|
|
2
|
+
import { n as as_optional_clear_default } from "./as-variant-picker-BUF7Am9t.mjs";
|
|
3
|
+
import { createBlock, createElementBlock, defineComponent, openBlock, toDisplayString, unref, withModifiers } from "vue";
|
|
3
4
|
//#region src/components/internal/as-array-clear-btn.vue?vue&type=script&setup=true&lang.ts
|
|
4
5
|
const _hoisted_1 = ["disabled", "aria-label"];
|
|
5
6
|
//#endregion
|
|
@@ -22,6 +23,7 @@ var as_array_clear_btn_default = /* @__PURE__ */ defineComponent({
|
|
|
22
23
|
},
|
|
23
24
|
emits: ["clear"],
|
|
24
25
|
setup(__props) {
|
|
26
|
+
const { t } = useAsTexts();
|
|
25
27
|
return (_ctx, _cache) => {
|
|
26
28
|
return __props.optional ? (openBlock(), createBlock(as_optional_clear_default, {
|
|
27
29
|
key: 0,
|
|
@@ -33,9 +35,9 @@ var as_array_clear_btn_default = /* @__PURE__ */ defineComponent({
|
|
|
33
35
|
type: "button",
|
|
34
36
|
class: "as-optional-clear",
|
|
35
37
|
disabled: __props.disabled,
|
|
36
|
-
"aria-label": __props.label ?
|
|
38
|
+
"aria-label": __props.label ? unref(t)("UI_FORM_CLEAR_FIELD", { field: __props.label }) : unref(t)("UI_CLEAR"),
|
|
37
39
|
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.$emit("clear"), ["stop", "prevent"]))
|
|
38
|
-
}, "
|
|
40
|
+
}, toDisplayString(unref(t)("UI_CLEAR")), 9, _hoisted_1));
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
43
|
});
|
package/dist/as-array.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_array = require("./as-array-
|
|
1
|
+
const require_as_array = require("./as-array-C97cLzdA.cjs");
|
|
2
2
|
module.exports = require_as_array.as_array_default;
|
package/dist/as-array.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-array.vue-
|
|
1
|
+
import { t as _default } from "./as-array.vue-Cgfjz2I-.cjs";
|
|
2
2
|
export = _default;
|
package/dist/as-array.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-array.vue-
|
|
1
|
+
import { t as _default } from "./as-array.vue-Wj9giGdu.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-array.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_array_default } from "./as-array-
|
|
1
|
+
import { t as as_array_default } from "./as-array-B2axGw3v.mjs";
|
|
2
2
|
export { as_array_default as default };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { 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
|
+
import { n as as_optional_clear_default } from "./as-variant-picker-BUF7Am9t.mjs";
|
|
4
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, toDisplayString, unref, watchEffect, withCtx } from "vue";
|
|
5
|
+
import { optKey, optLabel } from "@atscript/ui";
|
|
4
6
|
//#region src/composables/use-as-tri-state-checkbox.ts
|
|
5
7
|
/**
|
|
6
8
|
* Tri-state checkbox helper. The visible state is derived from the
|
|
@@ -34,17 +36,22 @@ function useAsTriStateCheckbox(options) {
|
|
|
34
36
|
//#endregion
|
|
35
37
|
//#region src/components/defaults/as-checkbox.vue?vue&type=script&setup=true&lang.ts
|
|
36
38
|
const _hoisted_1 = { class: "as-checkbox-row" };
|
|
37
|
-
const _hoisted_2 = ["
|
|
39
|
+
const _hoisted_2 = ["id"];
|
|
38
40
|
const _hoisted_3 = [
|
|
41
|
+
"id",
|
|
42
|
+
"aria-labelledby",
|
|
43
|
+
"aria-describedby"
|
|
44
|
+
];
|
|
45
|
+
const _hoisted_4 = ["for"];
|
|
46
|
+
const _hoisted_5 = [
|
|
39
47
|
"id",
|
|
40
48
|
"checked",
|
|
41
49
|
"name",
|
|
42
50
|
"disabled",
|
|
43
|
-
"readonly",
|
|
44
51
|
"aria-invalid",
|
|
45
52
|
"aria-describedby"
|
|
46
53
|
];
|
|
47
|
-
const
|
|
54
|
+
const _hoisted_6 = ["id"];
|
|
48
55
|
//#endregion
|
|
49
56
|
//#region src/components/defaults/as-checkbox.vue
|
|
50
57
|
var as_checkbox_default = /* @__PURE__ */ defineComponent({
|
|
@@ -250,13 +257,31 @@ var as_checkbox_default = /* @__PURE__ */ defineComponent({
|
|
|
250
257
|
props.model.value = v;
|
|
251
258
|
}
|
|
252
259
|
});
|
|
260
|
+
const { t } = useAsTexts();
|
|
261
|
+
const valueLabel = computed(() => {
|
|
262
|
+
const value = props.model.value;
|
|
263
|
+
if (typeof value !== "boolean") return "";
|
|
264
|
+
const key = value ? "true" : "false";
|
|
265
|
+
const option = props.options?.find((o) => optKey(o) === key);
|
|
266
|
+
return option === void 0 ? t(value ? "UI_YES" : "UI_NO") : optLabel(option);
|
|
267
|
+
});
|
|
253
268
|
return (_ctx, _cache) => {
|
|
254
269
|
return openBlock(), createBlock(as_field_shell_default, mergeProps(_ctx.$props, {
|
|
255
270
|
"field-class": "as-checkbox-field",
|
|
256
271
|
chromeless: true
|
|
257
272
|
}), {
|
|
258
273
|
default: withCtx(({ inputId }) => [createElementVNode("div", _hoisted_1, [
|
|
259
|
-
createElementVNode("
|
|
274
|
+
__props.readonly ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("span", {
|
|
275
|
+
id: `${inputId}-label`,
|
|
276
|
+
class: "as-field-label"
|
|
277
|
+
}, toDisplayString(__props.label), 9, _hoisted_2), createElementVNode("span", {
|
|
278
|
+
id: inputId,
|
|
279
|
+
class: "as-checkbox-value",
|
|
280
|
+
role: "group",
|
|
281
|
+
"aria-labelledby": `${inputId}-label`,
|
|
282
|
+
"aria-describedby": __props.ariaDescribedBy
|
|
283
|
+
}, toDisplayString(valueLabel.value), 9, _hoisted_3)], 64)) : (openBlock(), createElementBlock("label", {
|
|
284
|
+
key: 1,
|
|
260
285
|
for: inputId,
|
|
261
286
|
class: normalizeClass(["as-field-label", { "as-checkbox-indeterminate": unref(indeterminate) }])
|
|
262
287
|
}, [createElementVNode("input", {
|
|
@@ -269,13 +294,12 @@ var as_checkbox_default = /* @__PURE__ */ defineComponent({
|
|
|
269
294
|
onBlur: _cache[1] || (_cache[1] = (...args) => __props.onBlur && __props.onBlur(...args)),
|
|
270
295
|
name: __props.name,
|
|
271
296
|
disabled: __props.disabled,
|
|
272
|
-
readonly: __props.readonly,
|
|
273
297
|
"aria-invalid": !!__props.error || void 0,
|
|
274
298
|
"aria-describedby": __props.ariaDescribedBy
|
|
275
|
-
}, null, 40,
|
|
299
|
+
}, null, 40, _hoisted_5), createTextVNode(" " + toDisplayString(__props.label), 1)], 10, _hoisted_4)),
|
|
276
300
|
createCommentVNode(" Treat both undefined and null as 'unset' — DB-roundtripped null otherwise renders as \"set\". "),
|
|
277
|
-
__props.optional && __props.model.value != null ? (openBlock(), createBlock(as_optional_clear_default, {
|
|
278
|
-
key:
|
|
301
|
+
__props.optional && !__props.readonly && __props.model.value != null ? (openBlock(), createBlock(as_optional_clear_default, {
|
|
302
|
+
key: 2,
|
|
279
303
|
onClear: _cache[2] || (_cache[2] = ($event) => __props.onToggleOptional?.(false))
|
|
280
304
|
})) : createCommentVNode("v-if", true)
|
|
281
305
|
])]),
|
|
@@ -283,7 +307,7 @@ var as_checkbox_default = /* @__PURE__ */ defineComponent({
|
|
|
283
307
|
key: 0,
|
|
284
308
|
id: descId,
|
|
285
309
|
class: "as-field-description"
|
|
286
|
-
}, toDisplayString(__props.description), 9,
|
|
310
|
+
}, toDisplayString(__props.description), 9, _hoisted_6)) : createCommentVNode("v-if", true)]),
|
|
287
311
|
_: 1
|
|
288
312
|
}, 16);
|
|
289
313
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
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
|
+
const require_as_variant_picker = require("./as-variant-picker-BcJx7Zt7.cjs");
|
|
3
4
|
let vue = require("vue");
|
|
5
|
+
let _atscript_ui = require("@atscript/ui");
|
|
4
6
|
//#region src/composables/use-as-tri-state-checkbox.ts
|
|
5
7
|
/**
|
|
6
8
|
* Tri-state checkbox helper. The visible state is derived from the
|
|
@@ -34,17 +36,22 @@ function useAsTriStateCheckbox(options) {
|
|
|
34
36
|
//#endregion
|
|
35
37
|
//#region src/components/defaults/as-checkbox.vue?vue&type=script&setup=true&lang.ts
|
|
36
38
|
const _hoisted_1 = { class: "as-checkbox-row" };
|
|
37
|
-
const _hoisted_2 = ["
|
|
39
|
+
const _hoisted_2 = ["id"];
|
|
38
40
|
const _hoisted_3 = [
|
|
41
|
+
"id",
|
|
42
|
+
"aria-labelledby",
|
|
43
|
+
"aria-describedby"
|
|
44
|
+
];
|
|
45
|
+
const _hoisted_4 = ["for"];
|
|
46
|
+
const _hoisted_5 = [
|
|
39
47
|
"id",
|
|
40
48
|
"checked",
|
|
41
49
|
"name",
|
|
42
50
|
"disabled",
|
|
43
|
-
"readonly",
|
|
44
51
|
"aria-invalid",
|
|
45
52
|
"aria-describedby"
|
|
46
53
|
];
|
|
47
|
-
const
|
|
54
|
+
const _hoisted_6 = ["id"];
|
|
48
55
|
//#endregion
|
|
49
56
|
//#region src/components/defaults/as-checkbox.vue
|
|
50
57
|
var as_checkbox_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -250,13 +257,31 @@ var as_checkbox_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
250
257
|
props.model.value = v;
|
|
251
258
|
}
|
|
252
259
|
});
|
|
260
|
+
const { t } = require_use_as_locale.useAsTexts();
|
|
261
|
+
const valueLabel = (0, vue.computed)(() => {
|
|
262
|
+
const value = props.model.value;
|
|
263
|
+
if (typeof value !== "boolean") return "";
|
|
264
|
+
const key = value ? "true" : "false";
|
|
265
|
+
const option = props.options?.find((o) => (0, _atscript_ui.optKey)(o) === key);
|
|
266
|
+
return option === void 0 ? t(value ? "UI_YES" : "UI_NO") : (0, _atscript_ui.optLabel)(option);
|
|
267
|
+
});
|
|
253
268
|
return (_ctx, _cache) => {
|
|
254
269
|
return (0, vue.openBlock)(), (0, vue.createBlock)(require_as_field_shell.as_field_shell_default, (0, vue.mergeProps)(_ctx.$props, {
|
|
255
270
|
"field-class": "as-checkbox-field",
|
|
256
271
|
chromeless: true
|
|
257
272
|
}), {
|
|
258
273
|
default: (0, vue.withCtx)(({ inputId }) => [(0, vue.createElementVNode)("div", _hoisted_1, [
|
|
259
|
-
(0, vue.createElementVNode)("
|
|
274
|
+
__props.readonly ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [(0, vue.createElementVNode)("span", {
|
|
275
|
+
id: `${inputId}-label`,
|
|
276
|
+
class: "as-field-label"
|
|
277
|
+
}, (0, vue.toDisplayString)(__props.label), 9, _hoisted_2), (0, vue.createElementVNode)("span", {
|
|
278
|
+
id: inputId,
|
|
279
|
+
class: "as-checkbox-value",
|
|
280
|
+
role: "group",
|
|
281
|
+
"aria-labelledby": `${inputId}-label`,
|
|
282
|
+
"aria-describedby": __props.ariaDescribedBy
|
|
283
|
+
}, (0, vue.toDisplayString)(valueLabel.value), 9, _hoisted_3)], 64)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("label", {
|
|
284
|
+
key: 1,
|
|
260
285
|
for: inputId,
|
|
261
286
|
class: (0, vue.normalizeClass)(["as-field-label", { "as-checkbox-indeterminate": (0, vue.unref)(indeterminate) }])
|
|
262
287
|
}, [(0, vue.createElementVNode)("input", {
|
|
@@ -269,13 +294,12 @@ var as_checkbox_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
269
294
|
onBlur: _cache[1] || (_cache[1] = (...args) => __props.onBlur && __props.onBlur(...args)),
|
|
270
295
|
name: __props.name,
|
|
271
296
|
disabled: __props.disabled,
|
|
272
|
-
readonly: __props.readonly,
|
|
273
297
|
"aria-invalid": !!__props.error || void 0,
|
|
274
298
|
"aria-describedby": __props.ariaDescribedBy
|
|
275
|
-
}, null, 40,
|
|
299
|
+
}, null, 40, _hoisted_5), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)(__props.label), 1)], 10, _hoisted_4)),
|
|
276
300
|
(0, vue.createCommentVNode)(" Treat both undefined and null as 'unset' — DB-roundtripped null otherwise renders as \"set\". "),
|
|
277
|
-
__props.optional && __props.model.value != null ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_variant_picker.as_optional_clear_default, {
|
|
278
|
-
key:
|
|
301
|
+
__props.optional && !__props.readonly && __props.model.value != null ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_variant_picker.as_optional_clear_default, {
|
|
302
|
+
key: 2,
|
|
279
303
|
onClear: _cache[2] || (_cache[2] = ($event) => __props.onToggleOptional?.(false))
|
|
280
304
|
})) : (0, vue.createCommentVNode)("v-if", true)
|
|
281
305
|
])]),
|
|
@@ -283,7 +307,7 @@ var as_checkbox_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
283
307
|
key: 0,
|
|
284
308
|
id: descId,
|
|
285
309
|
class: "as-field-description"
|
|
286
|
-
}, (0, vue.toDisplayString)(__props.description), 9,
|
|
310
|
+
}, (0, vue.toDisplayString)(__props.description), 9, _hoisted_6)) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
287
311
|
_: 1
|
|
288
312
|
}, 16);
|
|
289
313
|
};
|
package/dist/as-checkbox.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_checkbox = require("./as-checkbox-
|
|
1
|
+
const require_as_checkbox = require("./as-checkbox-Wn-PmHi-.cjs");
|
|
2
2
|
module.exports = require_as_checkbox.as_checkbox_default;
|
package/dist/as-checkbox.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-checkbox.vue-
|
|
1
|
+
import { t as _default } from "./as-checkbox.vue-CXiUHIZj.cjs";
|
|
2
2
|
export = _default;
|
package/dist/as-checkbox.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-checkbox.vue-
|
|
1
|
+
import { t as _default } from "./as-checkbox.vue-CWe73b3Z.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-checkbox.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_checkbox_default } from "./as-checkbox-
|
|
1
|
+
import { t as as_checkbox_default } from "./as-checkbox-BO8xW0OM.mjs";
|
|
2
2
|
export { as_checkbox_default as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const require_use_form_context = require("./use-form-context-
|
|
1
|
+
const require_use_form_context = require("./use-form-context-CXsLnG7l.cjs");
|
|
2
2
|
const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-u1VgBJAP.cjs");
|
|
3
|
+
const require_use_as_locale = require("./use-as-locale-C2tFUenv.cjs");
|
|
3
4
|
const require_focus_after_toggle = require("./focus-after-toggle-CWxiPZWi.cjs");
|
|
4
5
|
let vue = require("vue");
|
|
5
6
|
//#region src/components/as-collapsible.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -116,6 +117,7 @@ var as_collapsible_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
116
117
|
runAndFocus,
|
|
117
118
|
runAndFocusNew
|
|
118
119
|
});
|
|
120
|
+
const { t } = require_use_as_locale.useAsTexts();
|
|
119
121
|
return (_ctx, _cache) => {
|
|
120
122
|
return __props.optional && !__props.optionalEnabled ? (0, vue.renderSlot)(_ctx.$slots, "empty", { key: 0 }) : (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("details", {
|
|
121
123
|
key: 1,
|
|
@@ -143,7 +145,7 @@ var as_collapsible_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
143
145
|
!isOpen.value && descendantErrorCount.value > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
144
146
|
key: 0,
|
|
145
147
|
class: "as-collapsible-error-badge",
|
|
146
|
-
"aria-label":
|
|
148
|
+
"aria-label": (0, vue.unref)(t)(descendantErrorCount.value === 1 ? "UI_FORM_ERRORS_INSIDE_ONE" : "UI_FORM_ERRORS_INSIDE", { count: descendantErrorCount.value })
|
|
147
149
|
}, (0, vue.toDisplayString)(descendantErrorCount.value), 9, _hoisted_7)) : (0, vue.createCommentVNode)("v-if", true),
|
|
148
150
|
(0, vue.createElementVNode)("span", {
|
|
149
151
|
class: (0, vue.normalizeClass)(["as-collapsible-chevron", { "as-collapsible-chevron-collapsed": !isOpen.value }]),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { t as formatIndexedLabelParts } from "./use-form-context-
|
|
1
|
+
import { t as formatIndexedLabelParts } from "./use-form-context-C3FxL3eF.mjs";
|
|
2
2
|
import { i as useAsNestedSectionsStore, t as DESCENDANT_ERROR_COUNTS_KEY } from "./use-as-nested-sections-store-Dfo971PK.mjs";
|
|
3
|
+
import { r as useAsTexts } from "./use-as-locale-1k9NBn-G.mjs";
|
|
3
4
|
import { r as useAsFocusFirstAfter } from "./focus-after-toggle-Dtl3P6CS.mjs";
|
|
4
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, inject, normalizeClass, onBeforeUnmount, onMounted, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, vShow, withCtx, withDirectives } from "vue";
|
|
5
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, inject, normalizeClass, onBeforeUnmount, onMounted, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, vShow, withCtx, withDirectives } from "vue";
|
|
5
6
|
//#region src/components/as-collapsible.vue?vue&type=script&setup=true&lang.ts
|
|
6
7
|
const _hoisted_1 = [
|
|
7
8
|
"open",
|
|
@@ -116,6 +117,7 @@ var as_collapsible_default = /* @__PURE__ */ defineComponent({
|
|
|
116
117
|
runAndFocus,
|
|
117
118
|
runAndFocusNew
|
|
118
119
|
});
|
|
120
|
+
const { t } = useAsTexts();
|
|
119
121
|
return (_ctx, _cache) => {
|
|
120
122
|
return __props.optional && !__props.optionalEnabled ? renderSlot(_ctx.$slots, "empty", { key: 0 }) : withDirectives((openBlock(), createElementBlock("details", {
|
|
121
123
|
key: 1,
|
|
@@ -143,7 +145,7 @@ var as_collapsible_default = /* @__PURE__ */ defineComponent({
|
|
|
143
145
|
!isOpen.value && descendantErrorCount.value > 0 ? (openBlock(), createElementBlock("span", {
|
|
144
146
|
key: 0,
|
|
145
147
|
class: "as-collapsible-error-badge",
|
|
146
|
-
"aria-label":
|
|
148
|
+
"aria-label": unref(t)(descendantErrorCount.value === 1 ? "UI_FORM_ERRORS_INSIDE_ONE" : "UI_FORM_ERRORS_INSIDE", { count: descendantErrorCount.value })
|
|
147
149
|
}, toDisplayString(descendantErrorCount.value), 9, _hoisted_7)) : createCommentVNode("v-if", true),
|
|
148
150
|
createElementVNode("span", {
|
|
149
151
|
class: normalizeClass(["as-collapsible-chevron", { "as-collapsible-chevron-collapsed": !isOpen.value }]),
|
package/dist/as-collapsible.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_collapsible = require("./as-collapsible-
|
|
1
|
+
const require_as_collapsible = require("./as-collapsible-BGeuF2Bn.cjs");
|
|
2
2
|
module.exports = require_as_collapsible.as_collapsible_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-collapsible.vue-
|
|
1
|
+
import { t as _default } from "./as-collapsible.vue-BXwe24OV.cjs";
|
|
2
2
|
export = _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-collapsible.vue-
|
|
1
|
+
import { t as _default } from "./as-collapsible.vue-hfAqxx1w.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-collapsible.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_collapsible_default } from "./as-collapsible-
|
|
1
|
+
import { t as as_collapsible_default } from "./as-collapsible-Cb9SgJh9.mjs";
|
|
2
2
|
export { as_collapsible_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
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-
|
|
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";
|
package/dist/as-date.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_date = require("./as-date-
|
|
1
|
+
const require_as_date = require("./as-date-B2dgUoau.cjs");
|
|
2
2
|
module.exports = require_as_date.as_date_default;
|
package/dist/as-date.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-date.vue-
|
|
1
|
+
import { t as _default } from "./as-date.vue-axahL_Zv.cjs";
|
|
2
2
|
export = _default;
|