@featherk/ui 0.17.1 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +73 -12
  2. package/dist/address.cjs +2 -0
  3. package/dist/address.cjs.map +1 -0
  4. package/dist/address.mjs +237 -0
  5. package/dist/address.mjs.map +1 -0
  6. package/dist/chunks/picker.css +1 -0
  7. package/dist/chunks/shared-BHFhmbuH.cjs +2 -0
  8. package/dist/chunks/shared-BHFhmbuH.cjs.map +1 -0
  9. package/dist/chunks/shared-CHgC5LLL.mjs +10 -0
  10. package/dist/chunks/shared-CHgC5LLL.mjs.map +1 -0
  11. package/dist/{docs-manifest.d.ts → docs-manifest.d.mts} +3 -0
  12. package/dist/docs-manifest.mjs +25 -0
  13. package/dist/index.cjs +2 -0
  14. package/dist/index.cjs.map +1 -0
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.mjs +12 -0
  17. package/dist/index.mjs.map +1 -0
  18. package/dist/picker/DateField.vue.d.ts +28 -0
  19. package/dist/picker/DateRangeField.vue.d.ts +34 -0
  20. package/dist/picker/TimeField.vue.d.ts +28 -0
  21. package/dist/picker/errorKey.d.ts +1 -0
  22. package/dist/picker/index.d.ts +4 -0
  23. package/dist/picker/types.d.ts +18 -0
  24. package/dist/picker.cjs +2 -0
  25. package/dist/picker.cjs.map +1 -0
  26. package/dist/picker.mjs +384 -0
  27. package/dist/picker.mjs.map +1 -0
  28. package/dist/table/types.d.ts +1 -1
  29. package/dist/table/useActionCellMenu.d.ts +2 -1
  30. package/dist/table.cjs +2 -0
  31. package/dist/table.cjs.map +1 -0
  32. package/dist/table.mjs +157 -0
  33. package/dist/table.mjs.map +1 -0
  34. package/docs/README.md +4 -4
  35. package/docs/address/USAddress.md +1 -2
  36. package/docs/picker/DateField.md +89 -0
  37. package/docs/picker/DateRangeField.md +99 -0
  38. package/docs/picker/TimeField.md +88 -0
  39. package/package.json +36 -22
  40. package/dist/docs-manifest.js +0 -19
  41. package/dist/featherk-ui.es.js +0 -392
  42. package/dist/featherk-ui.es.js.map +0 -1
  43. package/dist/featherk-ui.umd.js +0 -2
  44. package/dist/featherk-ui.umd.js.map +0 -1
  45. /package/dist/{ui.css → chunks/address.css} +0 -0
@@ -0,0 +1,34 @@
1
+ import { type SelectionRange } from "@progress/kendo-vue-dateinputs";
2
+ import type { UseMaskedDateRangeInputReturn } from "@featherk/composables/range";
3
+ import type { DateRangeFieldMessages } from "./types";
4
+ type __VLS_Props = {
5
+ /** Return value of `useMaskedDateRangeInput`. */
6
+ input: UseMaskedDateRangeInputReturn;
7
+ label?: string;
8
+ /** Calendar bounds; default to the composable's `min`/`max`. */
9
+ min?: Date;
10
+ max?: Date;
11
+ messages?: DateRangeFieldMessages;
12
+ disabled?: boolean;
13
+ readonly?: boolean;
14
+ /** Hidden while disabled or readonly, since Kendo's clear button ignores both. */
15
+ showClearButton?: boolean;
16
+ /** Months shown in the calendar, 1 to 4 (default 4). */
17
+ views?: 1 | 2 | 3 | 4;
18
+ };
19
+ type __VLS_PublicProps = __VLS_Props & {
20
+ /** Must be the same ref passed to `useMaskedDateRangeInput` as `externalValue`. */
21
+ modelValue?: SelectionRange | null | undefined;
22
+ /** Must be the same ref passed to the composable as `isOpen`. */
23
+ "show"?: boolean;
24
+ };
25
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ "update:modelValue": (value: SelectionRange) => any;
27
+ "update:show": (value: boolean) => any;
28
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
29
+ "onUpdate:modelValue"?: (value: SelectionRange) => any;
30
+ "onUpdate:show"?: (value: boolean) => any;
31
+ }>, {
32
+ showClearButton: boolean;
33
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import type { UseMaskedTimeInputReturn } from "@featherk/composables/time";
2
+ import type { TimeFieldMessages } from "./types";
3
+ type __VLS_Props = {
4
+ /** Return value of `useMaskedTimeInput`. */
5
+ input: UseMaskedTimeInputReturn;
6
+ label?: string;
7
+ /** Time list bounds; default to the composable's `min`/`max`. */
8
+ min?: Date;
9
+ max?: Date;
10
+ messages?: TimeFieldMessages;
11
+ /** Also applied to the masked input, which Kendo's picker does not reach. */
12
+ disabled?: boolean;
13
+ readonly?: boolean;
14
+ };
15
+ type __VLS_PublicProps = __VLS_Props & {
16
+ /** Must be the same ref passed to `useMaskedTimeInput` as `externalValue`. */
17
+ modelValue?: Date | string | null | undefined;
18
+ /** Must be the same ref the composable's `onShowPicker` opens. */
19
+ "show"?: boolean;
20
+ };
21
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ "update:modelValue": (value: string | Date) => any;
23
+ "update:show": (value: boolean) => any;
24
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
+ "onUpdate:modelValue"?: (value: string | Date) => any;
26
+ "onUpdate:show"?: (value: boolean) => any;
27
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const toErrorKey: <TKey extends string>(reason: string | undefined) => TKey | undefined;
@@ -0,0 +1,4 @@
1
+ export { default as DateField } from "./DateField.vue";
2
+ export { default as DateRangeField } from "./DateRangeField.vue";
3
+ export { default as TimeField } from "./TimeField.vue";
4
+ export type { DateFieldErrorKey, DateFieldMessages, DateRangeFieldErrorKey, DateRangeFieldMessages, TimeFieldErrorKey, TimeFieldMessages, } from "./types";
@@ -0,0 +1,18 @@
1
+ type FieldMessages<TKey extends string> = {
2
+ /** Input placeholder. */
3
+ placeholder?: string;
4
+ /** Hint shown under the input while there is no error. */
5
+ hint?: string;
6
+ /** Error text per error key. Keys left out use the composable's message. */
7
+ error?: Partial<Record<TKey, string>>;
8
+ };
9
+ /** Error keys for `DateField`: the composable's `reason`, with "incomplete" as "required". */
10
+ export type DateFieldErrorKey = "required" | "invalid-date" | "out-of-bounds";
11
+ /** Error keys for `TimeField`: the composable's `reason`, with "incomplete" as "required". */
12
+ export type TimeFieldErrorKey = "required" | "invalid-time" | "out-of-bounds";
13
+ /** Error keys for `DateRangeField`: the composable's `reason`, with "incomplete" as "required". */
14
+ export type DateRangeFieldErrorKey = "required" | "invalid-date" | "out-of-bounds" | "reversed-range" | "span-exceeds-limit";
15
+ export type DateFieldMessages = FieldMessages<DateFieldErrorKey>;
16
+ export type TimeFieldMessages = FieldMessages<TimeFieldErrorKey>;
17
+ export type DateRangeFieldMessages = FieldMessages<DateRangeFieldErrorKey>;
18
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("@progress/kendo-vue-dateinputs"),g=require("@progress/kendo-vue-inputs"),r=require("@progress/kendo-vue-labels"),b=require("@featherk/composables/trap"),C=require("./chunks/shared-BHFhmbuH.cjs"),V=require("@progress/kendo-vue-common"),M=require("@progress/kendo-vue-popup"),D=require("@progress/kendo-vue-tooltip"),N=require("@featherk/icons"),w=a=>a==="incomplete"?"required":a,T=e.defineComponent({inheritAttrs:!1,__name:"DateField",props:e.mergeModels({input:{},label:{},min:{},max:{},messages:{},disabled:{type:Boolean},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{},show:{type:Boolean,default:!1},showModifiers:{}}),emits:["update:modelValue","update:show"],setup(a){const t=a,u=e.useModel(a,"modelValue"),l=e.useModel(a,"show"),m=e.ref(null),v=e.computed(()=>l.value&&!t.disabled&&!t.readonly),s=e.computed(()=>`${t.input.id}-error`),f=e.computed(()=>`${t.input.id}-hint`),d=e.computed(()=>{const c=t.input.validationMessage.value;if(!c)return"";const n=w(t.input.reason.value);return n&&t.messages?.error?.[n]||c}),k=e.computed(()=>d.value?s.value:t.messages?.hint?f.value:void 0);return b.usePopupTrap({isOpen:v,onRequestClose:()=>l.value=!1,triggerEl:m}),(c,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:m,class:"fk-datepicker fkui-picker"},[a.label?(e.openBlock(),e.createBlock(e.unref(r.Label),{key:0,"editor-id":a.input.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),_:1},8,["editor-id"])):e.createCommentVNode("",!0),e.createVNode(e.unref(p.DatePicker),e.mergeProps({"fill-mode":"outline",rounded:"medium",size:"medium"},c.$attrs,{"model-value":u.value instanceof Date?u.value:void 0,"date-input":"masked",min:a.min??a.input.min??void 0,max:a.max??a.input.max??void 0,valid:a.input.isValid.value,"validation-message":d.value,disabled:a.disabled,show:v.value,"onUpdate:modelValue":n[0]||(n[0]=i=>u.value=i),onOpen:n[1]||(n[1]=i=>l.value=!a.readonly),onClose:n[2]||(n[2]=i=>l.value=!1)}),{masked:e.withCtx(()=>[e.createVNode(e.unref(g.MaskedTextBox),{id:a.input.id,mask:"00/00/0000",value:a.input.raw.value,placeholder:a.messages?.placeholder??a.input.placeholder.value,"show-clear-button":!1,disabled:a.disabled,readonly:a.readonly,"aria-described-by":k.value,"input-attributes":{"aria-invalid":!a.input.isValid.value},onChange:a.input.handleChange,onKeydown:a.input.handleKeyDown,onKeyup:a.input.handleKeyUp,onClick:a.input.handleClick,onWheel:a.input.handleWheel,onBlur:a.input.handleBlur},null,8,["id","value","placeholder","disabled","readonly","aria-described-by","input-attributes","onChange","onKeydown","onKeyup","onClick","onWheel","onBlur"])]),_:1},16,["model-value","min","max","valid","validation-message","disabled","show"]),d.value?(e.openBlock(),e.createBlock(e.unref(r.Error),{key:1,id:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value),1)]),_:1},8,["id"])):a.messages?.hint?(e.openBlock(),e.createBlock(e.unref(r.Hint),{key:2,id:f.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.messages.hint),1)]),_:1},8,["id"])):e.createCommentVNode("",!0)],512))}}),K=C._export_sfc(T,[["__scopeId","data-v-9598aad4"]]),$={class:"fk-daterangepicker fkui-picker"},S={class:"fkui-picker-row"},R=e.defineComponent({inheritAttrs:!1,__name:"DateRangeField",props:e.mergeModels({input:{},label:{},min:{},max:{},messages:{},disabled:{type:Boolean},readonly:{type:Boolean},showClearButton:{type:Boolean,default:!0},views:{}},{modelValue:{},modelModifiers:{},show:{type:Boolean,default:!1},showModifiers:{}}),emits:["update:modelValue","update:show"],setup(a){const t=a,u=e.useModel(a,"modelValue"),l=e.useModel(a,"show"),m=o=>u.value=o,v=e.ref(null),s=e.computed(()=>l.value&&!t.disabled&&!t.readonly),f=()=>{!t.disabled&&!t.readonly&&(l.value=!l.value)},d=e.computed(()=>{const o=Math.trunc(t.views??4);return Number.isFinite(o)?Math.min(Math.max(o,1),4):4}),k=e.computed(()=>`${t.input.id}-calendar`),c=e.computed(()=>`${t.input.id}-error`),n=e.computed(()=>`${t.input.id}-hint`),i=e.computed(()=>`${t.input.id}-span`),h=e.computed(()=>{if(t.input.validComputed.value!==!1)return"";const o=w(t.input.reason.value);return o&&t.messages?.error?.[o]||t.input.validationMessage.value}),x=e.computed(()=>{if(h.value)return c.value;const o=[t.input.validComputed.value&&t.input.spanDays.value?i.value:"",t.messages?.hint?n.value:""].filter(Boolean);return o.length?o.join(" "):void 0});return b.usePopupTrap({isOpen:s,onRequestClose:()=>l.value=!1,triggerEl:e.computed(()=>v.value?.$el??null),popupSelector:[".k-calendar",".k-popup"]}),(o,y)=>(e.openBlock(),e.createElementBlock("div",$,[a.label?(e.openBlock(),e.createBlock(e.unref(r.Label),{key:0,"editor-id":a.input.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),_:1},8,["editor-id"])):e.createCommentVNode("",!0),e.createElementVNode("div",S,[e.createVNode(e.unref(g.MaskedTextBox),e.mergeProps({ref_key:"maskedTextBoxRef",ref:v,"fill-mode":"outline",rounded:"medium",size:"medium"},o.$attrs,{id:a.input.id,disabled:a.disabled,readonly:a.readonly,"show-clear-button":a.showClearButton&&!a.disabled&&!a.readonly,placeholder:a.messages?.placeholder??"Start Date - End Date",mask:"00/00/0000 - 00/00/0000",value:a.input.raw.value,valid:a.input.validComputed.value,"aria-described-by":x.value,"input-attributes":{"aria-invalid":a.input.validComputed.value===!1,"aria-haspopup":"grid","aria-expanded":s.value,"aria-controls":k.value},"input-suffix":"calendar-suffix",onChange:a.input.handleChange,onKeydown:a.input.handleKeyDown,onKeyup:a.input.handleKeyUp,onWheel:a.input.handleWheel,onClick:a.input.handleClick,onBlur:a.input.handleBlur,onFocus:y[0]||(y[0]=B=>l.value=!1)}),{"calendar-suffix":e.withCtx(()=>[e.createVNode(e.unref(V.SvgIcon),{icon:e.unref(N.dateRangeIcon),class:"fkui-calendar-toggle",onMousedown:e.withModifiers(f,["prevent","stop"])},null,8,["icon"])]),_:1},16,["id","disabled","readonly","show-clear-button","placeholder","value","valid","aria-described-by","input-attributes","onChange","onKeydown","onKeyup","onWheel","onClick","onBlur"]),a.input.validComputed.value&&a.input.spanDays.value?(e.openBlock(),e.createBlock(e.unref(r.Hint),{key:0,id:i.value},{default:e.withCtx(()=>[e.createTextVNode(" ("+e.toDisplayString(a.input.spanDays.value)+" day"+e.toDisplayString(a.input.spanDays.value===1?"":"s")+") ",1)]),_:1},8,["id"])):e.createCommentVNode("",!0)]),h.value?(e.openBlock(),e.createBlock(e.unref(r.Error),{key:1,id:c.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1},8,["id"])):a.messages?.hint?(e.openBlock(),e.createBlock(e.unref(r.Hint),{key:2,id:n.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.messages.hint),1)]),_:1},8,["id"])):e.createCommentVNode("",!0),e.createVNode(e.unref(M.Popup),{anchor:"maskedTextBoxRef",show:s.value,animate:!1,class:"fkui-range-popup"},{default:e.withCtx(()=>[e.createVNode(e.unref(D.Tooltip),{"anchor-element":"pointer",position:"top","open-delay":280,"parent-title":!0},{default:e.withCtx(()=>[e.createVNode(e.unref(p.Calendar),{id:k.value,"model-value":u.value??void 0,class:"fkui-range-calendar",mode:"range","allow-reverse":!1,views:d.value,min:a.min??a.input.min,max:a.max??a.input.max,"onUpdate:modelValue":m,onChange:a.input.onCalendarChange,onKeydown:y[1]||(y[1]=e.withKeys(B=>l.value=!1,["escape"]))},null,8,["id","model-value","views","min","max","onChange"])]),_:1})]),_:1},8,["show"])]))}}),q=C._export_sfc(R,[["__scopeId","data-v-43893bc7"]]),I=e.defineComponent({inheritAttrs:!1,__name:"TimeField",props:e.mergeModels({input:{},label:{},min:{},max:{},messages:{},disabled:{type:Boolean},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{},show:{type:Boolean,default:!1},showModifiers:{}}),emits:["update:modelValue","update:show"],setup(a){const t=a,u=e.useModel(a,"modelValue"),l=e.useModel(a,"show"),m=e.ref(null),v=e.computed(()=>l.value&&!t.disabled&&!t.readonly),s=e.computed(()=>`${t.input.id}-error`),f=e.computed(()=>`${t.input.id}-hint`),d=e.computed(()=>{const n=t.input.validationMessage.value;if(!n)return"";const i=w(t.input.reason.value);return i&&t.messages?.error?.[i]||n}),k=e.computed(()=>d.value?s.value:t.messages?.hint?f.value:void 0),c=b.usePopupTrap({isOpen:v,onRequestClose:()=>l.value=!1,triggerEl:m,popupSelector:[".k-timeselector",".k-popup"],focusTrapOptions:{setReturnFocus:()=>c.lastCloseReason.value==="outside"?!1:m.value?.querySelector("input")??!1}});return(n,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:m,class:"fk-timepicker fkui-picker"},[a.label?(e.openBlock(),e.createBlock(e.unref(r.Label),{key:0,"editor-id":a.input.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),_:1},8,["editor-id"])):e.createCommentVNode("",!0),e.createVNode(e.unref(p.TimePicker),e.mergeProps({"fill-mode":"outline",rounded:"medium",size:"medium",format:"hh:mm a"},n.$attrs,{"model-value":u.value instanceof Date?u.value:void 0,"date-input":"masked",min:a.min??a.input.min??void 0,max:a.max??a.input.max??void 0,valid:a.input.isValid.value,"validation-message":d.value,disabled:a.disabled,show:v.value,onChange:a.input.handleChange,"onUpdate:modelValue":i[0]||(i[0]=h=>u.value=h),onOpen:i[1]||(i[1]=h=>l.value=!a.readonly),onClose:i[2]||(i[2]=h=>l.value=!1)}),{masked:e.withCtx(()=>[e.createVNode(e.unref(g.MaskedTextBox),{id:a.input.id,mask:"Hh:Mm Aa",rules:a.input.rules,value:a.input.raw.value,placeholder:a.messages?.placeholder??a.input.placeholder.value,"show-clear-button":!1,disabled:a.disabled,readonly:a.readonly,"aria-described-by":k.value,"input-attributes":{"aria-invalid":!a.input.isValid.value},onChange:a.input.handleChange,onKeydown:a.input.handleKeyDown,onKeyup:a.input.handleKeyUp,onClick:a.input.handleClick,onWheel:a.input.handleWheel,onBlur:a.input.handleBlur},null,8,["id","rules","value","placeholder","disabled","readonly","aria-described-by","input-attributes","onChange","onKeydown","onKeyup","onClick","onWheel","onBlur"])]),_:1},16,["model-value","min","max","valid","validation-message","disabled","show","onChange"]),d.value?(e.openBlock(),e.createBlock(e.unref(r.Error),{key:1,id:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value),1)]),_:1},8,["id"])):a.messages?.hint?(e.openBlock(),e.createBlock(e.unref(r.Hint),{key:2,id:f.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.messages.hint),1)]),_:1},8,["id"])):e.createCommentVNode("",!0)],512))}}),E=C._export_sfc(I,[["__scopeId","data-v-33cb65f4"]]);exports.DateField=K;exports.DateRangeField=q;exports.TimeField=E;
2
+ //# sourceMappingURL=picker.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"picker.cjs","sources":["../src/picker/errorKey.ts","../src/picker/DateField.vue","../src/picker/DateRangeField.vue","../src/picker/TimeField.vue"],"sourcesContent":["// The composables report a missing value as \"incomplete\"; messages call it\n// \"required\" to match USAddressMessages.\nexport const toErrorKey = <TKey extends string>(reason: string | undefined) =>\n (reason === \"incomplete\" ? \"required\" : reason) as TKey | undefined;\n","<template>\n <div ref=\"rootRef\" class=\"fk-datepicker fkui-picker\">\n <Label v-if=\"label\" :editor-id=\"input.id\">{{ label }}</Label>\n <DatePicker\n fill-mode=\"outline\"\n rounded=\"medium\"\n size=\"medium\"\n v-bind=\"$attrs\"\n :model-value=\"model instanceof Date ? model : undefined\"\n date-input=\"masked\"\n :min=\"min ?? input.min ?? undefined\"\n :max=\"max ?? input.max ?? undefined\"\n :valid=\"input.isValid.value\"\n :validation-message=\"errorMessage\"\n :disabled=\"disabled\"\n :show=\"isOpen\"\n @update:model-value=\"model = $event\"\n @open=\"show = !readonly\"\n @close=\"show = false\"\n >\n <template #masked>\n <MaskedTextBox\n :id=\"input.id\"\n mask=\"00/00/0000\"\n :value=\"input.raw.value\"\n :placeholder=\"messages?.placeholder ?? input.placeholder.value\"\n :show-clear-button=\"false\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :aria-described-by=\"describedBy\"\n :input-attributes=\"{ 'aria-invalid': !input.isValid.value }\"\n @change=\"input.handleChange\"\n @keydown=\"input.handleKeyDown\"\n @keyup=\"input.handleKeyUp\"\n @click=\"input.handleClick\"\n @wheel=\"input.handleWheel\"\n @blur=\"input.handleBlur\"\n />\n </template>\n </DatePicker>\n <Error v-if=\"errorMessage\" :id=\"errorId\">{{ errorMessage }}</Error>\n <Hint v-else-if=\"messages?.hint\" :id=\"hintId\">{{ messages.hint }}</Hint>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { DatePicker } from \"@progress/kendo-vue-dateinputs\";\nimport { MaskedTextBox } from \"@progress/kendo-vue-inputs\";\nimport { Error, Hint, Label } from \"@progress/kendo-vue-labels\";\nimport { usePopupTrap } from \"@featherk/composables/trap\";\nimport type { UseMaskedDateInputReturn } from \"@featherk/composables/date\";\nimport type { DateFieldMessages, DateFieldErrorKey } from \"./types\";\nimport { toErrorKey } from \"./errorKey\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = defineProps<{\n /** Return value of `useMaskedDateInput`. */\n input: UseMaskedDateInputReturn;\n label?: string;\n /** Calendar bounds; default to the composable's `min`/`max`. */\n min?: Date;\n max?: Date;\n messages?: DateFieldMessages;\n /** Also applied to the masked input, which Kendo's picker does not reach. */\n disabled?: boolean;\n readonly?: boolean;\n}>();\n\n/** Must be the same ref passed to `useMaskedDateInput` as `externalValue`. */\nconst model = defineModel<Date | string | null | undefined>();\n/** Must be the same ref the composable's `onShowCalendar` opens. */\nconst show = defineModel<boolean>(\"show\", { default: false });\n\nconst rootRef = ref<HTMLElement | null>(null);\n// A locked field never shows its popup, even if the parent sets `show`, so its selection can't write the model.\nconst isOpen = computed(() => show.value && !props.disabled && !props.readonly);\nconst errorId = computed(() => `${props.input.id}-error`);\nconst hintId = computed(() => `${props.input.id}-hint`);\n\n// The composable decides when an error shows; messages only replace its text.\nconst errorMessage = computed(() => {\n const fallback = props.input.validationMessage.value;\n if (!fallback) return \"\";\n const key = toErrorKey<DateFieldErrorKey>(props.input.reason.value);\n return (key && props.messages?.error?.[key]) || fallback;\n});\n\nconst describedBy = computed(() => {\n if (errorMessage.value) return errorId.value;\n return props.messages?.hint ? hintId.value : undefined;\n});\n\nusePopupTrap({\n isOpen,\n onRequestClose: () => (show.value = false),\n triggerEl: rootRef,\n});\n</script>\n\n<style scoped>\n.fkui-picker {\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n}\n</style>\n","<template>\n <div class=\"fk-daterangepicker fkui-picker\">\n <Label v-if=\"label\" :editor-id=\"input.id\">{{ label }}</Label>\n <div class=\"fkui-picker-row\">\n <MaskedTextBox\n ref=\"maskedTextBoxRef\"\n fill-mode=\"outline\"\n rounded=\"medium\"\n size=\"medium\"\n v-bind=\"$attrs\"\n :id=\"input.id\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :show-clear-button=\"showClearButton && !disabled && !readonly\"\n :placeholder=\"messages?.placeholder ?? 'Start Date - End Date'\"\n mask=\"00/00/0000 - 00/00/0000\"\n :value=\"input.raw.value\"\n :valid=\"input.validComputed.value\"\n :aria-described-by=\"describedBy\"\n :input-attributes=\"{\n 'aria-invalid': input.validComputed.value === false,\n 'aria-haspopup': 'grid',\n 'aria-expanded': isOpen,\n 'aria-controls': calendarId,\n }\"\n input-suffix=\"calendar-suffix\"\n @change=\"input.handleChange\"\n @keydown=\"input.handleKeyDown\"\n @keyup=\"input.handleKeyUp\"\n @wheel=\"input.handleWheel\"\n @click=\"input.handleClick\"\n @blur=\"input.handleBlur\"\n @focus=\"show = false\"\n >\n <template #calendar-suffix>\n <!-- mousedown.prevent keeps focus in the input; keyboard users open the calendar from the input. -->\n <SvgIcon\n :icon=\"dateRangeIcon\"\n class=\"fkui-calendar-toggle\"\n @mousedown.prevent.stop=\"toggleCalendar\"\n />\n </template>\n </MaskedTextBox>\n <Hint\n v-if=\"input.validComputed.value && input.spanDays.value\"\n :id=\"spanId\"\n >\n ({{ input.spanDays.value }} day{{\n input.spanDays.value === 1 ? \"\" : \"s\"\n }})\n </Hint>\n </div>\n <Error v-if=\"errorMessage\" :id=\"errorId\">{{ errorMessage }}</Error>\n <Hint v-else-if=\"messages?.hint\" :id=\"hintId\">{{ messages.hint }}</Hint>\n\n <Popup\n anchor=\"maskedTextBoxRef\"\n :show=\"isOpen\"\n :animate=\"false\"\n class=\"fkui-range-popup\"\n >\n <Tooltip\n anchor-element=\"pointer\"\n position=\"top\"\n :open-delay=\"280\"\n :parent-title=\"true\"\n >\n <Calendar\n :id=\"calendarId\"\n :model-value=\"model ?? undefined\"\n class=\"fkui-range-calendar\"\n mode=\"range\"\n :allow-reverse=\"false\"\n :views=\"calendarViews\"\n :min=\"min ?? input.min\"\n :max=\"max ?? input.max\"\n @update:model-value=\"onCalendarValue\"\n @change=\"input.onCalendarChange\"\n @keydown.escape=\"show = false\"\n />\n </Tooltip>\n </Popup>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { Calendar, type SelectionRange } from \"@progress/kendo-vue-dateinputs\";\nimport { MaskedTextBox } from \"@progress/kendo-vue-inputs\";\nimport { Error, Hint, Label } from \"@progress/kendo-vue-labels\";\nimport { SvgIcon } from \"@progress/kendo-vue-common\";\nimport { Popup } from \"@progress/kendo-vue-popup\";\nimport { Tooltip } from \"@progress/kendo-vue-tooltip\";\nimport { dateRangeIcon } from \"@featherk/icons\";\nimport { usePopupTrap } from \"@featherk/composables/trap\";\nimport type { UseMaskedDateRangeInputReturn } from \"@featherk/composables/range\";\nimport type { DateRangeFieldErrorKey, DateRangeFieldMessages } from \"./types\";\nimport { toErrorKey } from \"./errorKey\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(\n defineProps<{\n /** Return value of `useMaskedDateRangeInput`. */\n input: UseMaskedDateRangeInputReturn;\n label?: string;\n /** Calendar bounds; default to the composable's `min`/`max`. */\n min?: Date;\n max?: Date;\n messages?: DateRangeFieldMessages;\n disabled?: boolean;\n readonly?: boolean;\n /** Hidden while disabled or readonly, since Kendo's clear button ignores both. */\n showClearButton?: boolean;\n /** Months shown in the calendar, 1 to 4 (default 4). */\n views?: 1 | 2 | 3 | 4;\n }>(),\n { showClearButton: true },\n);\n\n/** Must be the same ref passed to `useMaskedDateRangeInput` as `externalValue`. */\nconst model = defineModel<SelectionRange | null | undefined>();\n/** Must be the same ref passed to the composable as `isOpen`. */\nconst show = defineModel<boolean>(\"show\", { default: false });\n\n// Kendo Calendar's model type has no null, and in range mode it always emits a SelectionRange.\nconst onCalendarValue = (value: unknown) =>\n (model.value = value as SelectionRange);\n\nconst maskedTextBoxRef = ref<InstanceType<typeof MaskedTextBox> | null>(null);\n\n// A locked field never shows its popup, even if the parent sets `show`, so its selection can't write the model.\nconst isOpen = computed(() => show.value && !props.disabled && !props.readonly);\n\nconst toggleCalendar = () => {\n if (!props.disabled && !props.readonly) show.value = !show.value;\n};\n\n// Clamped for untyped callers; the external styles are laid out for at most four months.\nconst calendarViews = computed(() => {\n const views = Math.trunc(props.views ?? 4);\n return Number.isFinite(views) ? Math.min(Math.max(views, 1), 4) : 4;\n});\n\nconst calendarId = computed(() => `${props.input.id}-calendar`);\nconst errorId = computed(() => `${props.input.id}-error`);\nconst hintId = computed(() => `${props.input.id}-hint`);\nconst spanId = computed(() => `${props.input.id}-span`);\n\n// The composable decides when an error shows; messages only replace its text.\nconst errorMessage = computed(() => {\n if (props.input.validComputed.value !== false) return \"\";\n const key = toErrorKey<DateRangeFieldErrorKey>(props.input.reason.value);\n return (\n (key && props.messages?.error?.[key]) || props.input.validationMessage.value\n );\n});\n\nconst describedBy = computed(() => {\n if (errorMessage.value) return errorId.value;\n const ids = [\n props.input.validComputed.value && props.input.spanDays.value\n ? spanId.value\n : \"\",\n props.messages?.hint ? hintId.value : \"\",\n ].filter(Boolean);\n return ids.length ? ids.join(\" \") : undefined;\n});\n\nusePopupTrap({\n isOpen,\n onRequestClose: () => (show.value = false),\n triggerEl: computed(\n () => (maskedTextBoxRef.value?.$el as HTMLElement | undefined) ?? null,\n ),\n popupSelector: [\".k-calendar\", \".k-popup\"],\n});\n</script>\n\n<style scoped>\n.fkui-picker {\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n}\n.fkui-picker-row {\n display: inline-flex;\n align-items: center;\n gap: 1em;\n}\n.fkui-range-calendar {\n overscroll-behavior: contain;\n}\n</style>\n","<template>\n <div ref=\"rootRef\" class=\"fk-timepicker fkui-picker\">\n <Label v-if=\"label\" :editor-id=\"input.id\">{{ label }}</Label>\n <TimePicker\n fill-mode=\"outline\"\n rounded=\"medium\"\n size=\"medium\"\n format=\"hh:mm a\"\n v-bind=\"$attrs\"\n :model-value=\"model instanceof Date ? model : undefined\"\n date-input=\"masked\"\n :min=\"min ?? input.min ?? undefined\"\n :max=\"max ?? input.max ?? undefined\"\n :valid=\"input.isValid.value\"\n :validation-message=\"errorMessage\"\n :disabled=\"disabled\"\n :show=\"isOpen\"\n @change=\"input.handleChange\"\n @update:model-value=\"model = $event\"\n @open=\"show = !readonly\"\n @close=\"show = false\"\n >\n <template #masked>\n <MaskedTextBox\n :id=\"input.id\"\n mask=\"Hh:Mm Aa\"\n :rules=\"input.rules\"\n :value=\"input.raw.value\"\n :placeholder=\"messages?.placeholder ?? input.placeholder.value\"\n :show-clear-button=\"false\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :aria-described-by=\"describedBy\"\n :input-attributes=\"{ 'aria-invalid': !input.isValid.value }\"\n @change=\"input.handleChange\"\n @keydown=\"input.handleKeyDown\"\n @keyup=\"input.handleKeyUp\"\n @click=\"input.handleClick\"\n @wheel=\"input.handleWheel\"\n @blur=\"input.handleBlur\"\n />\n </template>\n </TimePicker>\n <Error v-if=\"errorMessage\" :id=\"errorId\">{{ errorMessage }}</Error>\n <Hint v-else-if=\"messages?.hint\" :id=\"hintId\">{{ messages.hint }}</Hint>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { TimePicker } from \"@progress/kendo-vue-dateinputs\";\nimport { MaskedTextBox } from \"@progress/kendo-vue-inputs\";\nimport { Error, Hint, Label } from \"@progress/kendo-vue-labels\";\nimport { usePopupTrap } from \"@featherk/composables/trap\";\nimport type { UseMaskedTimeInputReturn } from \"@featherk/composables/time\";\nimport type { TimeFieldMessages, TimeFieldErrorKey } from \"./types\";\nimport { toErrorKey } from \"./errorKey\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = defineProps<{\n /** Return value of `useMaskedTimeInput`. */\n input: UseMaskedTimeInputReturn;\n label?: string;\n /** Time list bounds; default to the composable's `min`/`max`. */\n min?: Date;\n max?: Date;\n messages?: TimeFieldMessages;\n /** Also applied to the masked input, which Kendo's picker does not reach. */\n disabled?: boolean;\n readonly?: boolean;\n}>();\n\n/** Must be the same ref passed to `useMaskedTimeInput` as `externalValue`. */\nconst model = defineModel<Date | string | null | undefined>();\n/** Must be the same ref the composable's `onShowPicker` opens. */\nconst show = defineModel<boolean>(\"show\", { default: false });\n\nconst rootRef = ref<HTMLElement | null>(null);\n// A locked field never shows its popup, even if the parent sets `show`, so its selection can't write the model.\nconst isOpen = computed(() => show.value && !props.disabled && !props.readonly);\nconst errorId = computed(() => `${props.input.id}-error`);\nconst hintId = computed(() => `${props.input.id}-hint`);\n\n// The composable decides when an error shows; messages only replace its text.\nconst errorMessage = computed(() => {\n const fallback = props.input.validationMessage.value;\n if (!fallback) return \"\";\n const key = toErrorKey<TimeFieldErrorKey>(props.input.reason.value);\n return (key && props.messages?.error?.[key]) || fallback;\n});\n\nconst describedBy = computed(() => {\n if (errorMessage.value) return errorId.value;\n return props.messages?.hint ? hintId.value : undefined;\n});\n\nconst trap = usePopupTrap({\n isOpen,\n onRequestClose: () => (show.value = false),\n triggerEl: rootRef,\n popupSelector: [\".k-timeselector\", \".k-popup\"],\n focusTrapOptions: {\n // TimePicker focuses its time list before the trap activates, so the\n // trap's default return target is removed with the popup (Set, Now, Cancel).\n setReturnFocus: () =>\n trap.lastCloseReason.value === \"outside\"\n ? false\n : (rootRef.value?.querySelector(\"input\") ?? false),\n },\n});\n</script>\n\n<style scoped>\n.fkui-picker {\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n}\n</style>\n"],"names":["toErrorKey","reason","props","__props","model","_useModel","show","rootRef","ref","isOpen","computed","errorId","hintId","errorMessage","fallback","key","describedBy","usePopupTrap","_createElementBlock","_createBlock","_unref","Label","_createVNode","_mergeProps","$attrs","_cache","$event","MaskedTextBox","Error","Hint","_createTextVNode","_toDisplayString","onCalendarValue","value","maskedTextBoxRef","toggleCalendar","calendarViews","views","calendarId","spanId","ids","_openBlock","_hoisted_1","_createElementVNode","_hoisted_2","SvgIcon","dateRangeIcon","Popup","Tooltip","Calendar","trap"],"mappings":"0cAEaA,EAAmCC,GAC7CA,IAAW,aAAe,WAAaA,kTCsD1C,MAAMC,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AhBkB,EAAAA,gBAAAC,EAAAA,gBAAA5B,EAAA,SAAS,IAAI,EAAA,CAAA,CAAA"}
@@ -0,0 +1,384 @@
1
+ import "./chunks/picker.css";import { defineComponent as M, useModel as B, ref as $, computed as n, openBlock as o, createElementBlock as D, createBlock as c, unref as l, withCtx as u, createTextVNode as f, toDisplayString as m, createCommentVNode as p, createVNode as g, mergeProps as R, mergeModels as I, createElementVNode as N, withModifiers as P, withKeys as A } from "vue";
2
+ import { DatePicker as z, Calendar as H, TimePicker as j } from "@progress/kendo-vue-dateinputs";
3
+ import { MaskedTextBox as T } from "@progress/kendo-vue-inputs";
4
+ import { Label as F, Error as W, Hint as K } from "@progress/kendo-vue-labels";
5
+ import { usePopupTrap as E } from "@featherk/composables/trap";
6
+ import { _ as O } from "./chunks/shared-CHgC5LLL.mjs";
7
+ import { SvgIcon as L } from "@progress/kendo-vue-common";
8
+ import { Popup as G } from "@progress/kendo-vue-popup";
9
+ import { Tooltip as J } from "@progress/kendo-vue-tooltip";
10
+ import { dateRangeIcon as Q } from "@featherk/icons";
11
+ const S = (e) => e === "incomplete" ? "required" : e, X = /* @__PURE__ */ M({
12
+ inheritAttrs: !1,
13
+ __name: "DateField",
14
+ props: /* @__PURE__ */ I({
15
+ input: {},
16
+ label: {},
17
+ min: {},
18
+ max: {},
19
+ messages: {},
20
+ disabled: { type: Boolean },
21
+ readonly: { type: Boolean }
22
+ }, {
23
+ modelValue: {},
24
+ modelModifiers: {},
25
+ show: { type: Boolean, default: !1 },
26
+ showModifiers: {}
27
+ }),
28
+ emits: ["update:modelValue", "update:show"],
29
+ setup(e) {
30
+ const a = e, v = B(e, "modelValue"), t = B(e, "show"), k = $(null), b = n(() => t.value && !a.disabled && !a.readonly), h = n(() => `${a.input.id}-error`), w = n(() => `${a.input.id}-hint`), r = n(() => {
31
+ const y = a.input.validationMessage.value;
32
+ if (!y) return "";
33
+ const i = S(a.input.reason.value);
34
+ return i && a.messages?.error?.[i] || y;
35
+ }), x = n(() => r.value ? h.value : a.messages?.hint ? w.value : void 0);
36
+ return E({
37
+ isOpen: b,
38
+ onRequestClose: () => t.value = !1,
39
+ triggerEl: k
40
+ }), (y, i) => (o(), D("div", {
41
+ ref_key: "rootRef",
42
+ ref: k,
43
+ class: "fk-datepicker fkui-picker"
44
+ }, [
45
+ e.label ? (o(), c(l(F), {
46
+ key: 0,
47
+ "editor-id": e.input.id
48
+ }, {
49
+ default: u(() => [
50
+ f(m(e.label), 1)
51
+ ]),
52
+ _: 1
53
+ }, 8, ["editor-id"])) : p("", !0),
54
+ g(l(z), R({
55
+ "fill-mode": "outline",
56
+ rounded: "medium",
57
+ size: "medium"
58
+ }, y.$attrs, {
59
+ "model-value": v.value instanceof Date ? v.value : void 0,
60
+ "date-input": "masked",
61
+ min: e.min ?? e.input.min ?? void 0,
62
+ max: e.max ?? e.input.max ?? void 0,
63
+ valid: e.input.isValid.value,
64
+ "validation-message": r.value,
65
+ disabled: e.disabled,
66
+ show: b.value,
67
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => v.value = d),
68
+ onOpen: i[1] || (i[1] = (d) => t.value = !e.readonly),
69
+ onClose: i[2] || (i[2] = (d) => t.value = !1)
70
+ }), {
71
+ masked: u(() => [
72
+ g(l(T), {
73
+ id: e.input.id,
74
+ mask: "00/00/0000",
75
+ value: e.input.raw.value,
76
+ placeholder: e.messages?.placeholder ?? e.input.placeholder.value,
77
+ "show-clear-button": !1,
78
+ disabled: e.disabled,
79
+ readonly: e.readonly,
80
+ "aria-described-by": x.value,
81
+ "input-attributes": { "aria-invalid": !e.input.isValid.value },
82
+ onChange: e.input.handleChange,
83
+ onKeydown: e.input.handleKeyDown,
84
+ onKeyup: e.input.handleKeyUp,
85
+ onClick: e.input.handleClick,
86
+ onWheel: e.input.handleWheel,
87
+ onBlur: e.input.handleBlur
88
+ }, null, 8, ["id", "value", "placeholder", "disabled", "readonly", "aria-described-by", "input-attributes", "onChange", "onKeydown", "onKeyup", "onClick", "onWheel", "onBlur"])
89
+ ]),
90
+ _: 1
91
+ }, 16, ["model-value", "min", "max", "valid", "validation-message", "disabled", "show"]),
92
+ r.value ? (o(), c(l(W), {
93
+ key: 1,
94
+ id: h.value
95
+ }, {
96
+ default: u(() => [
97
+ f(m(r.value), 1)
98
+ ]),
99
+ _: 1
100
+ }, 8, ["id"])) : e.messages?.hint ? (o(), c(l(K), {
101
+ key: 2,
102
+ id: w.value
103
+ }, {
104
+ default: u(() => [
105
+ f(m(e.messages.hint), 1)
106
+ ]),
107
+ _: 1
108
+ }, 8, ["id"])) : p("", !0)
109
+ ], 512));
110
+ }
111
+ }), me = /* @__PURE__ */ O(X, [["__scopeId", "data-v-9598aad4"]]), Y = { class: "fk-daterangepicker fkui-picker" }, Z = { class: "fkui-picker-row" }, _ = /* @__PURE__ */ M({
112
+ inheritAttrs: !1,
113
+ __name: "DateRangeField",
114
+ props: /* @__PURE__ */ I({
115
+ input: {},
116
+ label: {},
117
+ min: {},
118
+ max: {},
119
+ messages: {},
120
+ disabled: { type: Boolean },
121
+ readonly: { type: Boolean },
122
+ showClearButton: { type: Boolean, default: !0 },
123
+ views: {}
124
+ }, {
125
+ modelValue: {},
126
+ modelModifiers: {},
127
+ show: { type: Boolean, default: !1 },
128
+ showModifiers: {}
129
+ }),
130
+ emits: ["update:modelValue", "update:show"],
131
+ setup(e) {
132
+ const a = e, v = B(e, "modelValue"), t = B(e, "show"), k = (s) => v.value = s, b = $(null), h = n(() => t.value && !a.disabled && !a.readonly), w = () => {
133
+ !a.disabled && !a.readonly && (t.value = !t.value);
134
+ }, r = n(() => {
135
+ const s = Math.trunc(a.views ?? 4);
136
+ return Number.isFinite(s) ? Math.min(Math.max(s, 1), 4) : 4;
137
+ }), x = n(() => `${a.input.id}-calendar`), y = n(() => `${a.input.id}-error`), i = n(() => `${a.input.id}-hint`), d = n(() => `${a.input.id}-span`), C = n(() => {
138
+ if (a.input.validComputed.value !== !1) return "";
139
+ const s = S(a.input.reason.value);
140
+ return s && a.messages?.error?.[s] || a.input.validationMessage.value;
141
+ }), U = n(() => {
142
+ if (C.value) return y.value;
143
+ const s = [
144
+ a.input.validComputed.value && a.input.spanDays.value ? d.value : "",
145
+ a.messages?.hint ? i.value : ""
146
+ ].filter(Boolean);
147
+ return s.length ? s.join(" ") : void 0;
148
+ });
149
+ return E({
150
+ isOpen: h,
151
+ onRequestClose: () => t.value = !1,
152
+ triggerEl: n(
153
+ () => b.value?.$el ?? null
154
+ ),
155
+ popupSelector: [".k-calendar", ".k-popup"]
156
+ }), (s, V) => (o(), D("div", Y, [
157
+ e.label ? (o(), c(l(F), {
158
+ key: 0,
159
+ "editor-id": e.input.id
160
+ }, {
161
+ default: u(() => [
162
+ f(m(e.label), 1)
163
+ ]),
164
+ _: 1
165
+ }, 8, ["editor-id"])) : p("", !0),
166
+ N("div", Z, [
167
+ g(l(T), R({
168
+ ref_key: "maskedTextBoxRef",
169
+ ref: b,
170
+ "fill-mode": "outline",
171
+ rounded: "medium",
172
+ size: "medium"
173
+ }, s.$attrs, {
174
+ id: e.input.id,
175
+ disabled: e.disabled,
176
+ readonly: e.readonly,
177
+ "show-clear-button": e.showClearButton && !e.disabled && !e.readonly,
178
+ placeholder: e.messages?.placeholder ?? "Start Date - End Date",
179
+ mask: "00/00/0000 - 00/00/0000",
180
+ value: e.input.raw.value,
181
+ valid: e.input.validComputed.value,
182
+ "aria-described-by": U.value,
183
+ "input-attributes": {
184
+ "aria-invalid": e.input.validComputed.value === !1,
185
+ "aria-haspopup": "grid",
186
+ "aria-expanded": h.value,
187
+ "aria-controls": x.value
188
+ },
189
+ "input-suffix": "calendar-suffix",
190
+ onChange: e.input.handleChange,
191
+ onKeydown: e.input.handleKeyDown,
192
+ onKeyup: e.input.handleKeyUp,
193
+ onWheel: e.input.handleWheel,
194
+ onClick: e.input.handleClick,
195
+ onBlur: e.input.handleBlur,
196
+ onFocus: V[0] || (V[0] = (q) => t.value = !1)
197
+ }), {
198
+ "calendar-suffix": u(() => [
199
+ g(l(L), {
200
+ icon: l(Q),
201
+ class: "fkui-calendar-toggle",
202
+ onMousedown: P(w, ["prevent", "stop"])
203
+ }, null, 8, ["icon"])
204
+ ]),
205
+ _: 1
206
+ }, 16, ["id", "disabled", "readonly", "show-clear-button", "placeholder", "value", "valid", "aria-described-by", "input-attributes", "onChange", "onKeydown", "onKeyup", "onWheel", "onClick", "onBlur"]),
207
+ e.input.validComputed.value && e.input.spanDays.value ? (o(), c(l(K), {
208
+ key: 0,
209
+ id: d.value
210
+ }, {
211
+ default: u(() => [
212
+ f(" (" + m(e.input.spanDays.value) + " day" + m(e.input.spanDays.value === 1 ? "" : "s") + ") ", 1)
213
+ ]),
214
+ _: 1
215
+ }, 8, ["id"])) : p("", !0)
216
+ ]),
217
+ C.value ? (o(), c(l(W), {
218
+ key: 1,
219
+ id: y.value
220
+ }, {
221
+ default: u(() => [
222
+ f(m(C.value), 1)
223
+ ]),
224
+ _: 1
225
+ }, 8, ["id"])) : e.messages?.hint ? (o(), c(l(K), {
226
+ key: 2,
227
+ id: i.value
228
+ }, {
229
+ default: u(() => [
230
+ f(m(e.messages.hint), 1)
231
+ ]),
232
+ _: 1
233
+ }, 8, ["id"])) : p("", !0),
234
+ g(l(G), {
235
+ anchor: "maskedTextBoxRef",
236
+ show: h.value,
237
+ animate: !1,
238
+ class: "fkui-range-popup"
239
+ }, {
240
+ default: u(() => [
241
+ g(l(J), {
242
+ "anchor-element": "pointer",
243
+ position: "top",
244
+ "open-delay": 280,
245
+ "parent-title": !0
246
+ }, {
247
+ default: u(() => [
248
+ g(l(H), {
249
+ id: x.value,
250
+ "model-value": v.value ?? void 0,
251
+ class: "fkui-range-calendar",
252
+ mode: "range",
253
+ "allow-reverse": !1,
254
+ views: r.value,
255
+ min: e.min ?? e.input.min,
256
+ max: e.max ?? e.input.max,
257
+ "onUpdate:modelValue": k,
258
+ onChange: e.input.onCalendarChange,
259
+ onKeydown: V[1] || (V[1] = A((q) => t.value = !1, ["escape"]))
260
+ }, null, 8, ["id", "model-value", "views", "min", "max", "onChange"])
261
+ ]),
262
+ _: 1
263
+ })
264
+ ]),
265
+ _: 1
266
+ }, 8, ["show"])
267
+ ]));
268
+ }
269
+ }), ve = /* @__PURE__ */ O(_, [["__scopeId", "data-v-43893bc7"]]), ee = /* @__PURE__ */ M({
270
+ inheritAttrs: !1,
271
+ __name: "TimeField",
272
+ props: /* @__PURE__ */ I({
273
+ input: {},
274
+ label: {},
275
+ min: {},
276
+ max: {},
277
+ messages: {},
278
+ disabled: { type: Boolean },
279
+ readonly: { type: Boolean }
280
+ }, {
281
+ modelValue: {},
282
+ modelModifiers: {},
283
+ show: { type: Boolean, default: !1 },
284
+ showModifiers: {}
285
+ }),
286
+ emits: ["update:modelValue", "update:show"],
287
+ setup(e) {
288
+ const a = e, v = B(e, "modelValue"), t = B(e, "show"), k = $(null), b = n(() => t.value && !a.disabled && !a.readonly), h = n(() => `${a.input.id}-error`), w = n(() => `${a.input.id}-hint`), r = n(() => {
289
+ const i = a.input.validationMessage.value;
290
+ if (!i) return "";
291
+ const d = S(a.input.reason.value);
292
+ return d && a.messages?.error?.[d] || i;
293
+ }), x = n(() => r.value ? h.value : a.messages?.hint ? w.value : void 0), y = E({
294
+ isOpen: b,
295
+ onRequestClose: () => t.value = !1,
296
+ triggerEl: k,
297
+ popupSelector: [".k-timeselector", ".k-popup"],
298
+ focusTrapOptions: {
299
+ // TimePicker focuses its time list before the trap activates, so the
300
+ // trap's default return target is removed with the popup (Set, Now, Cancel).
301
+ setReturnFocus: () => y.lastCloseReason.value === "outside" ? !1 : k.value?.querySelector("input") ?? !1
302
+ }
303
+ });
304
+ return (i, d) => (o(), D("div", {
305
+ ref_key: "rootRef",
306
+ ref: k,
307
+ class: "fk-timepicker fkui-picker"
308
+ }, [
309
+ e.label ? (o(), c(l(F), {
310
+ key: 0,
311
+ "editor-id": e.input.id
312
+ }, {
313
+ default: u(() => [
314
+ f(m(e.label), 1)
315
+ ]),
316
+ _: 1
317
+ }, 8, ["editor-id"])) : p("", !0),
318
+ g(l(j), R({
319
+ "fill-mode": "outline",
320
+ rounded: "medium",
321
+ size: "medium",
322
+ format: "hh:mm a"
323
+ }, i.$attrs, {
324
+ "model-value": v.value instanceof Date ? v.value : void 0,
325
+ "date-input": "masked",
326
+ min: e.min ?? e.input.min ?? void 0,
327
+ max: e.max ?? e.input.max ?? void 0,
328
+ valid: e.input.isValid.value,
329
+ "validation-message": r.value,
330
+ disabled: e.disabled,
331
+ show: b.value,
332
+ onChange: e.input.handleChange,
333
+ "onUpdate:modelValue": d[0] || (d[0] = (C) => v.value = C),
334
+ onOpen: d[1] || (d[1] = (C) => t.value = !e.readonly),
335
+ onClose: d[2] || (d[2] = (C) => t.value = !1)
336
+ }), {
337
+ masked: u(() => [
338
+ g(l(T), {
339
+ id: e.input.id,
340
+ mask: "Hh:Mm Aa",
341
+ rules: e.input.rules,
342
+ value: e.input.raw.value,
343
+ placeholder: e.messages?.placeholder ?? e.input.placeholder.value,
344
+ "show-clear-button": !1,
345
+ disabled: e.disabled,
346
+ readonly: e.readonly,
347
+ "aria-described-by": x.value,
348
+ "input-attributes": { "aria-invalid": !e.input.isValid.value },
349
+ onChange: e.input.handleChange,
350
+ onKeydown: e.input.handleKeyDown,
351
+ onKeyup: e.input.handleKeyUp,
352
+ onClick: e.input.handleClick,
353
+ onWheel: e.input.handleWheel,
354
+ onBlur: e.input.handleBlur
355
+ }, null, 8, ["id", "rules", "value", "placeholder", "disabled", "readonly", "aria-described-by", "input-attributes", "onChange", "onKeydown", "onKeyup", "onClick", "onWheel", "onBlur"])
356
+ ]),
357
+ _: 1
358
+ }, 16, ["model-value", "min", "max", "valid", "validation-message", "disabled", "show", "onChange"]),
359
+ r.value ? (o(), c(l(W), {
360
+ key: 1,
361
+ id: h.value
362
+ }, {
363
+ default: u(() => [
364
+ f(m(r.value), 1)
365
+ ]),
366
+ _: 1
367
+ }, 8, ["id"])) : e.messages?.hint ? (o(), c(l(K), {
368
+ key: 2,
369
+ id: w.value
370
+ }, {
371
+ default: u(() => [
372
+ f(m(e.messages.hint), 1)
373
+ ]),
374
+ _: 1
375
+ }, 8, ["id"])) : p("", !0)
376
+ ], 512));
377
+ }
378
+ }), ce = /* @__PURE__ */ O(ee, [["__scopeId", "data-v-33cb65f4"]]);
379
+ export {
380
+ me as DateField,
381
+ ve as DateRangeField,
382
+ ce as TimeField
383
+ };
384
+ //# sourceMappingURL=picker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"picker.mjs","sources":["../src/picker/errorKey.ts","../src/picker/DateField.vue","../src/picker/DateRangeField.vue","../src/picker/TimeField.vue"],"sourcesContent":["// The composables report a missing value as \"incomplete\"; messages call it\n// \"required\" to match USAddressMessages.\nexport const toErrorKey = <TKey extends string>(reason: string | undefined) =>\n (reason === \"incomplete\" ? \"required\" : reason) as TKey | undefined;\n","<template>\n <div ref=\"rootRef\" class=\"fk-datepicker fkui-picker\">\n <Label v-if=\"label\" :editor-id=\"input.id\">{{ label }}</Label>\n <DatePicker\n fill-mode=\"outline\"\n rounded=\"medium\"\n size=\"medium\"\n v-bind=\"$attrs\"\n :model-value=\"model instanceof Date ? model : undefined\"\n date-input=\"masked\"\n :min=\"min ?? input.min ?? undefined\"\n :max=\"max ?? input.max ?? undefined\"\n :valid=\"input.isValid.value\"\n :validation-message=\"errorMessage\"\n :disabled=\"disabled\"\n :show=\"isOpen\"\n @update:model-value=\"model = $event\"\n @open=\"show = !readonly\"\n @close=\"show = false\"\n >\n <template #masked>\n <MaskedTextBox\n :id=\"input.id\"\n mask=\"00/00/0000\"\n :value=\"input.raw.value\"\n :placeholder=\"messages?.placeholder ?? input.placeholder.value\"\n :show-clear-button=\"false\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :aria-described-by=\"describedBy\"\n :input-attributes=\"{ 'aria-invalid': !input.isValid.value }\"\n @change=\"input.handleChange\"\n @keydown=\"input.handleKeyDown\"\n @keyup=\"input.handleKeyUp\"\n @click=\"input.handleClick\"\n @wheel=\"input.handleWheel\"\n @blur=\"input.handleBlur\"\n />\n </template>\n </DatePicker>\n <Error v-if=\"errorMessage\" :id=\"errorId\">{{ errorMessage }}</Error>\n <Hint v-else-if=\"messages?.hint\" :id=\"hintId\">{{ messages.hint }}</Hint>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { DatePicker } from \"@progress/kendo-vue-dateinputs\";\nimport { MaskedTextBox } from \"@progress/kendo-vue-inputs\";\nimport { Error, Hint, Label } from \"@progress/kendo-vue-labels\";\nimport { usePopupTrap } from \"@featherk/composables/trap\";\nimport type { UseMaskedDateInputReturn } from \"@featherk/composables/date\";\nimport type { DateFieldMessages, DateFieldErrorKey } from \"./types\";\nimport { toErrorKey } from \"./errorKey\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = defineProps<{\n /** Return value of `useMaskedDateInput`. */\n input: UseMaskedDateInputReturn;\n label?: string;\n /** Calendar bounds; default to the composable's `min`/`max`. */\n min?: Date;\n max?: Date;\n messages?: DateFieldMessages;\n /** Also applied to the masked input, which Kendo's picker does not reach. */\n disabled?: boolean;\n readonly?: boolean;\n}>();\n\n/** Must be the same ref passed to `useMaskedDateInput` as `externalValue`. */\nconst model = defineModel<Date | string | null | undefined>();\n/** Must be the same ref the composable's `onShowCalendar` opens. */\nconst show = defineModel<boolean>(\"show\", { default: false });\n\nconst rootRef = ref<HTMLElement | null>(null);\n// A locked field never shows its popup, even if the parent sets `show`, so its selection can't write the model.\nconst isOpen = computed(() => show.value && !props.disabled && !props.readonly);\nconst errorId = computed(() => `${props.input.id}-error`);\nconst hintId = computed(() => `${props.input.id}-hint`);\n\n// The composable decides when an error shows; messages only replace its text.\nconst errorMessage = computed(() => {\n const fallback = props.input.validationMessage.value;\n if (!fallback) return \"\";\n const key = toErrorKey<DateFieldErrorKey>(props.input.reason.value);\n return (key && props.messages?.error?.[key]) || fallback;\n});\n\nconst describedBy = computed(() => {\n if (errorMessage.value) return errorId.value;\n return props.messages?.hint ? hintId.value : undefined;\n});\n\nusePopupTrap({\n isOpen,\n onRequestClose: () => (show.value = false),\n triggerEl: rootRef,\n});\n</script>\n\n<style scoped>\n.fkui-picker {\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n}\n</style>\n","<template>\n <div class=\"fk-daterangepicker fkui-picker\">\n <Label v-if=\"label\" :editor-id=\"input.id\">{{ label }}</Label>\n <div class=\"fkui-picker-row\">\n <MaskedTextBox\n ref=\"maskedTextBoxRef\"\n fill-mode=\"outline\"\n rounded=\"medium\"\n size=\"medium\"\n v-bind=\"$attrs\"\n :id=\"input.id\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :show-clear-button=\"showClearButton && !disabled && !readonly\"\n :placeholder=\"messages?.placeholder ?? 'Start Date - End Date'\"\n mask=\"00/00/0000 - 00/00/0000\"\n :value=\"input.raw.value\"\n :valid=\"input.validComputed.value\"\n :aria-described-by=\"describedBy\"\n :input-attributes=\"{\n 'aria-invalid': input.validComputed.value === false,\n 'aria-haspopup': 'grid',\n 'aria-expanded': isOpen,\n 'aria-controls': calendarId,\n }\"\n input-suffix=\"calendar-suffix\"\n @change=\"input.handleChange\"\n @keydown=\"input.handleKeyDown\"\n @keyup=\"input.handleKeyUp\"\n @wheel=\"input.handleWheel\"\n @click=\"input.handleClick\"\n @blur=\"input.handleBlur\"\n @focus=\"show = false\"\n >\n <template #calendar-suffix>\n <!-- mousedown.prevent keeps focus in the input; keyboard users open the calendar from the input. -->\n <SvgIcon\n :icon=\"dateRangeIcon\"\n class=\"fkui-calendar-toggle\"\n @mousedown.prevent.stop=\"toggleCalendar\"\n />\n </template>\n </MaskedTextBox>\n <Hint\n v-if=\"input.validComputed.value && input.spanDays.value\"\n :id=\"spanId\"\n >\n ({{ input.spanDays.value }} day{{\n input.spanDays.value === 1 ? \"\" : \"s\"\n }})\n </Hint>\n </div>\n <Error v-if=\"errorMessage\" :id=\"errorId\">{{ errorMessage }}</Error>\n <Hint v-else-if=\"messages?.hint\" :id=\"hintId\">{{ messages.hint }}</Hint>\n\n <Popup\n anchor=\"maskedTextBoxRef\"\n :show=\"isOpen\"\n :animate=\"false\"\n class=\"fkui-range-popup\"\n >\n <Tooltip\n anchor-element=\"pointer\"\n position=\"top\"\n :open-delay=\"280\"\n :parent-title=\"true\"\n >\n <Calendar\n :id=\"calendarId\"\n :model-value=\"model ?? undefined\"\n class=\"fkui-range-calendar\"\n mode=\"range\"\n :allow-reverse=\"false\"\n :views=\"calendarViews\"\n :min=\"min ?? input.min\"\n :max=\"max ?? input.max\"\n @update:model-value=\"onCalendarValue\"\n @change=\"input.onCalendarChange\"\n @keydown.escape=\"show = false\"\n />\n </Tooltip>\n </Popup>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { Calendar, type SelectionRange } from \"@progress/kendo-vue-dateinputs\";\nimport { MaskedTextBox } from \"@progress/kendo-vue-inputs\";\nimport { Error, Hint, Label } from \"@progress/kendo-vue-labels\";\nimport { SvgIcon } from \"@progress/kendo-vue-common\";\nimport { Popup } from \"@progress/kendo-vue-popup\";\nimport { Tooltip } from \"@progress/kendo-vue-tooltip\";\nimport { dateRangeIcon } from \"@featherk/icons\";\nimport { usePopupTrap } from \"@featherk/composables/trap\";\nimport type { UseMaskedDateRangeInputReturn } from \"@featherk/composables/range\";\nimport type { DateRangeFieldErrorKey, DateRangeFieldMessages } from \"./types\";\nimport { toErrorKey } from \"./errorKey\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(\n defineProps<{\n /** Return value of `useMaskedDateRangeInput`. */\n input: UseMaskedDateRangeInputReturn;\n label?: string;\n /** Calendar bounds; default to the composable's `min`/`max`. */\n min?: Date;\n max?: Date;\n messages?: DateRangeFieldMessages;\n disabled?: boolean;\n readonly?: boolean;\n /** Hidden while disabled or readonly, since Kendo's clear button ignores both. */\n showClearButton?: boolean;\n /** Months shown in the calendar, 1 to 4 (default 4). */\n views?: 1 | 2 | 3 | 4;\n }>(),\n { showClearButton: true },\n);\n\n/** Must be the same ref passed to `useMaskedDateRangeInput` as `externalValue`. */\nconst model = defineModel<SelectionRange | null | undefined>();\n/** Must be the same ref passed to the composable as `isOpen`. */\nconst show = defineModel<boolean>(\"show\", { default: false });\n\n// Kendo Calendar's model type has no null, and in range mode it always emits a SelectionRange.\nconst onCalendarValue = (value: unknown) =>\n (model.value = value as SelectionRange);\n\nconst maskedTextBoxRef = ref<InstanceType<typeof MaskedTextBox> | null>(null);\n\n// A locked field never shows its popup, even if the parent sets `show`, so its selection can't write the model.\nconst isOpen = computed(() => show.value && !props.disabled && !props.readonly);\n\nconst toggleCalendar = () => {\n if (!props.disabled && !props.readonly) show.value = !show.value;\n};\n\n// Clamped for untyped callers; the external styles are laid out for at most four months.\nconst calendarViews = computed(() => {\n const views = Math.trunc(props.views ?? 4);\n return Number.isFinite(views) ? Math.min(Math.max(views, 1), 4) : 4;\n});\n\nconst calendarId = computed(() => `${props.input.id}-calendar`);\nconst errorId = computed(() => `${props.input.id}-error`);\nconst hintId = computed(() => `${props.input.id}-hint`);\nconst spanId = computed(() => `${props.input.id}-span`);\n\n// The composable decides when an error shows; messages only replace its text.\nconst errorMessage = computed(() => {\n if (props.input.validComputed.value !== false) return \"\";\n const key = toErrorKey<DateRangeFieldErrorKey>(props.input.reason.value);\n return (\n (key && props.messages?.error?.[key]) || props.input.validationMessage.value\n );\n});\n\nconst describedBy = computed(() => {\n if (errorMessage.value) return errorId.value;\n const ids = [\n props.input.validComputed.value && props.input.spanDays.value\n ? spanId.value\n : \"\",\n props.messages?.hint ? hintId.value : \"\",\n ].filter(Boolean);\n return ids.length ? ids.join(\" \") : undefined;\n});\n\nusePopupTrap({\n isOpen,\n onRequestClose: () => (show.value = false),\n triggerEl: computed(\n () => (maskedTextBoxRef.value?.$el as HTMLElement | undefined) ?? null,\n ),\n popupSelector: [\".k-calendar\", \".k-popup\"],\n});\n</script>\n\n<style scoped>\n.fkui-picker {\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n}\n.fkui-picker-row {\n display: inline-flex;\n align-items: center;\n gap: 1em;\n}\n.fkui-range-calendar {\n overscroll-behavior: contain;\n}\n</style>\n","<template>\n <div ref=\"rootRef\" class=\"fk-timepicker fkui-picker\">\n <Label v-if=\"label\" :editor-id=\"input.id\">{{ label }}</Label>\n <TimePicker\n fill-mode=\"outline\"\n rounded=\"medium\"\n size=\"medium\"\n format=\"hh:mm a\"\n v-bind=\"$attrs\"\n :model-value=\"model instanceof Date ? model : undefined\"\n date-input=\"masked\"\n :min=\"min ?? input.min ?? undefined\"\n :max=\"max ?? input.max ?? undefined\"\n :valid=\"input.isValid.value\"\n :validation-message=\"errorMessage\"\n :disabled=\"disabled\"\n :show=\"isOpen\"\n @change=\"input.handleChange\"\n @update:model-value=\"model = $event\"\n @open=\"show = !readonly\"\n @close=\"show = false\"\n >\n <template #masked>\n <MaskedTextBox\n :id=\"input.id\"\n mask=\"Hh:Mm Aa\"\n :rules=\"input.rules\"\n :value=\"input.raw.value\"\n :placeholder=\"messages?.placeholder ?? input.placeholder.value\"\n :show-clear-button=\"false\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :aria-described-by=\"describedBy\"\n :input-attributes=\"{ 'aria-invalid': !input.isValid.value }\"\n @change=\"input.handleChange\"\n @keydown=\"input.handleKeyDown\"\n @keyup=\"input.handleKeyUp\"\n @click=\"input.handleClick\"\n @wheel=\"input.handleWheel\"\n @blur=\"input.handleBlur\"\n />\n </template>\n </TimePicker>\n <Error v-if=\"errorMessage\" :id=\"errorId\">{{ errorMessage }}</Error>\n <Hint v-else-if=\"messages?.hint\" :id=\"hintId\">{{ messages.hint }}</Hint>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { TimePicker } from \"@progress/kendo-vue-dateinputs\";\nimport { MaskedTextBox } from \"@progress/kendo-vue-inputs\";\nimport { Error, Hint, Label } from \"@progress/kendo-vue-labels\";\nimport { usePopupTrap } from \"@featherk/composables/trap\";\nimport type { UseMaskedTimeInputReturn } from \"@featherk/composables/time\";\nimport type { TimeFieldMessages, TimeFieldErrorKey } from \"./types\";\nimport { toErrorKey } from \"./errorKey\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = defineProps<{\n /** Return value of `useMaskedTimeInput`. */\n input: UseMaskedTimeInputReturn;\n label?: string;\n /** Time list bounds; default to the composable's `min`/`max`. */\n min?: Date;\n max?: Date;\n messages?: TimeFieldMessages;\n /** Also applied to the masked input, which Kendo's picker does not reach. */\n disabled?: boolean;\n readonly?: boolean;\n}>();\n\n/** Must be the same ref passed to `useMaskedTimeInput` as `externalValue`. */\nconst model = defineModel<Date | string | null | undefined>();\n/** Must be the same ref the composable's `onShowPicker` opens. */\nconst show = defineModel<boolean>(\"show\", { default: false });\n\nconst rootRef = ref<HTMLElement | null>(null);\n// A locked field never shows its popup, even if the parent sets `show`, so its selection can't write the model.\nconst isOpen = computed(() => show.value && !props.disabled && !props.readonly);\nconst errorId = computed(() => `${props.input.id}-error`);\nconst hintId = computed(() => `${props.input.id}-hint`);\n\n// The composable decides when an error shows; messages only replace its text.\nconst errorMessage = computed(() => {\n const fallback = props.input.validationMessage.value;\n if (!fallback) return \"\";\n const key = toErrorKey<TimeFieldErrorKey>(props.input.reason.value);\n return (key && props.messages?.error?.[key]) || fallback;\n});\n\nconst describedBy = computed(() => {\n if (errorMessage.value) return errorId.value;\n return props.messages?.hint ? hintId.value : undefined;\n});\n\nconst trap = usePopupTrap({\n isOpen,\n onRequestClose: () => (show.value = false),\n triggerEl: rootRef,\n popupSelector: [\".k-timeselector\", \".k-popup\"],\n focusTrapOptions: {\n // TimePicker focuses its time list before the trap activates, so the\n // trap's default return target is removed with the popup (Set, Now, Cancel).\n setReturnFocus: () =>\n trap.lastCloseReason.value === \"outside\"\n ? false\n : (rootRef.value?.querySelector(\"input\") ?? false),\n },\n});\n</script>\n\n<style scoped>\n.fkui-picker {\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n}\n</style>\n"],"names":["toErrorKey","reason","props","__props","model","_useModel","show","rootRef","ref","isOpen","computed","errorId","hintId","errorMessage","fallback","key","describedBy","usePopupTrap","_createElementBlock","_createBlock","_unref","Label","_createVNode","_mergeProps","$attrs","_cache","$event","MaskedTextBox","Error","Hint","_createTextVNode","_toDisplayString","onCalendarValue","value","maskedTextBoxRef","toggleCalendar","calendarViews","views","calendarId","spanId","ids","_openBlock","_hoisted_1","_createElementVNode","_hoisted_2","SvgIcon","dateRangeIcon","Popup","Tooltip","Calendar","trap"],"mappings":";;;;;;;;;;AAEO,MAAMA,IAAa,CAAsBC,MAC7CA,MAAW,eAAe,aAAaA;;;;;;;;;;;;;;;;;;;ACsD1C,UAAMC,IAAQC,GAcRC,IAAQC,EAA6CF,GAAA,YAAC,GAEtDG,IAAOD,EAAoBF,GAAC,MAA0B,GAEtDI,IAAUC,EAAwB,IAAI,GAEtCC,IAASC,EAAS,MAAMJ,EAAK,SAAS,CAACJ,EAAM,YAAY,CAACA,EAAM,QAAQ,GACxES,IAAUD,EAAS,MAAM,GAAGR,EAAM,MAAM,EAAE,QAAQ,GAClDU,IAASF,EAAS,MAAM,GAAGR,EAAM,MAAM,EAAE,OAAO,GAGhDW,IAAeH,EAAS,MAAM;AAClC,YAAMI,IAAWZ,EAAM,MAAM,kBAAkB;AAC/C,UAAI,CAACY,EAAU,QAAO;AACtB,YAAMC,IAAMf,EAA8BE,EAAM,MAAM,OAAO,KAAK;AAClE,aAAQa,KAAOb,EAAM,UAAU,QAAQa,CAAG,KAAMD;AAAA,IAClD,CAAC,GAEKE,IAAcN,EAAS,MACvBG,EAAa,QAAcF,EAAQ,QAChCT,EAAM,UAAU,OAAOU,EAAO,QAAQ,MAC9C;AAED,WAAAK,EAAa;AAAA,MACX,QAAAR;AAAA,MACA,gBAAgB,MAAOH,EAAK,QAAQ;AAAA,MACpC,WAAWC;AAAA,IAAA,CACZ,mBAjGCW,EAyCM,OAAA;AAAA,eAzCG;AAAA,MAAJ,KAAIX;AAAA,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1,5 @@
1
1
  import type { SVGIcon } from "@progress/kendo-svg-icons";
2
- import type { UseActiveIdRegistryReturn } from "@featherk/composables";
2
+ import type { UseActiveIdRegistryReturn } from "@featherk/composables/registry";
3
3
  export type ActionCellMenuItem = {
4
4
  text: string;
5
5
  id: string;