@ecsplico/editor 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +3 -4
  3. package/dist/core/notify.d.ts +1 -1
  4. package/dist/core/notify.js.map +1 -1
  5. package/dist/i18n/de/common.js +1 -2
  6. package/dist/i18n/de/common.js.map +1 -1
  7. package/dist/i18n/de.d.ts +0 -1
  8. package/dist/i18n/en/common.js +1 -2
  9. package/dist/i18n/en/common.js.map +1 -1
  10. package/dist/nuxt/module.d.ts +0 -6
  11. package/dist/nuxt/module.js +3 -5
  12. package/dist/nuxt/module.js.map +1 -1
  13. package/dist/nuxt/runtime/install-context.d.ts +2 -3
  14. package/dist/nuxt/runtime/install-context.js +2 -3
  15. package/dist/nuxt/runtime/install-context.js.map +1 -1
  16. package/dist/nuxt/runtime/plugins/editor-context-nuxt-ui.client.ts +1 -1
  17. package/dist/react/styles/ui-vars.css +2 -2
  18. package/dist/styles/ai.css +1 -1
  19. package/dist/styles/authors.css +1 -1
  20. package/dist/styles/block-ui.css +1 -1
  21. package/dist/styles/collab.css +1 -1
  22. package/dist/styles/comments.css +1 -1
  23. package/dist/styles/core.css +2 -2
  24. package/dist/styles/media.css +1 -1
  25. package/dist/styles/mentions.css +1 -1
  26. package/dist/styles/themes.css +1 -1
  27. package/dist/styles/transcript.css +1 -1
  28. package/dist/vue/context.d.ts +3 -3
  29. package/dist/vue/context.js +3 -2
  30. package/dist/vue/context.js.map +1 -1
  31. package/dist/vue/kit/types.d.ts +1 -1
  32. package/dist/vue/kit/use-ui-kit.d.ts +2 -2
  33. package/dist/vue/kit/use-ui-kit.js +3 -3
  34. package/dist/vue/kit/use-ui-kit.js.map +1 -1
  35. package/docs/integration.md +1 -1
  36. package/docs/llms.md +1 -1
  37. package/package.json +4 -19
  38. package/dist/nuxt/runtime/plugins/editor-context-primevue.client.ts +0 -8
  39. package/dist/vue/kit/primevue/Alert.js +0 -49
  40. package/dist/vue/kit/primevue/Alert.js.map +0 -1
  41. package/dist/vue/kit/primevue/Avatar.js +0 -54
  42. package/dist/vue/kit/primevue/Avatar.js.map +0 -1
  43. package/dist/vue/kit/primevue/Badge.js +0 -41
  44. package/dist/vue/kit/primevue/Badge.js.map +0 -1
  45. package/dist/vue/kit/primevue/Button.js +0 -112
  46. package/dist/vue/kit/primevue/Button.js.map +0 -1
  47. package/dist/vue/kit/primevue/Chip.js +0 -38
  48. package/dist/vue/kit/primevue/Chip.js.map +0 -1
  49. package/dist/vue/kit/primevue/DropdownMenu.js +0 -98
  50. package/dist/vue/kit/primevue/DropdownMenu.js.map +0 -1
  51. package/dist/vue/kit/primevue/FieldGroup.js +0 -22
  52. package/dist/vue/kit/primevue/FieldGroup.js.map +0 -1
  53. package/dist/vue/kit/primevue/FormField.js +0 -56
  54. package/dist/vue/kit/primevue/FormField.js.map +0 -1
  55. package/dist/vue/kit/primevue/Icon.js +0 -23
  56. package/dist/vue/kit/primevue/Icon.js.map +0 -1
  57. package/dist/vue/kit/primevue/Input.js +0 -96
  58. package/dist/vue/kit/primevue/Input.js.map +0 -1
  59. package/dist/vue/kit/primevue/InputMenu.js +0 -122
  60. package/dist/vue/kit/primevue/InputMenu.js.map +0 -1
  61. package/dist/vue/kit/primevue/Modal.js +0 -59
  62. package/dist/vue/kit/primevue/Modal.js.map +0 -1
  63. package/dist/vue/kit/primevue/Popover.js +0 -135
  64. package/dist/vue/kit/primevue/Popover.js.map +0 -1
  65. package/dist/vue/kit/primevue/RadioGroup.js +0 -58
  66. package/dist/vue/kit/primevue/RadioGroup.js.map +0 -1
  67. package/dist/vue/kit/primevue/Select.js +0 -68
  68. package/dist/vue/kit/primevue/Select.js.map +0 -1
  69. package/dist/vue/kit/primevue/SelectMenu.js +0 -94
  70. package/dist/vue/kit/primevue/SelectMenu.js.map +0 -1
  71. package/dist/vue/kit/primevue/Separator.js +0 -16
  72. package/dist/vue/kit/primevue/Separator.js.map +0 -1
  73. package/dist/vue/kit/primevue/Switch.js +0 -46
  74. package/dist/vue/kit/primevue/Switch.js.map +0 -1
  75. package/dist/vue/kit/primevue/Table.js +0 -54
  76. package/dist/vue/kit/primevue/Table.js.map +0 -1
  77. package/dist/vue/kit/primevue/Tabs.js +0 -49
  78. package/dist/vue/kit/primevue/Tabs.js.map +0 -1
  79. package/dist/vue/kit/primevue/Textarea.js +0 -55
  80. package/dist/vue/kit/primevue/Textarea.js.map +0 -1
  81. package/dist/vue/kit/primevue/Tooltip.js +0 -43
  82. package/dist/vue/kit/primevue/Tooltip.js.map +0 -1
  83. package/dist/vue/kit/primevue/Tree.js +0 -75
  84. package/dist/vue/kit/primevue/Tree.js.map +0 -1
  85. package/dist/vue/kit/primevue/select-options.js +0 -55
  86. package/dist/vue/kit/primevue/select-options.js.map +0 -1
  87. package/dist/vue/kit/primevue/shared.js +0 -49
  88. package/dist/vue/kit/primevue/shared.js.map +0 -1
  89. package/dist/vue/kit/primevue/trigger.js +0 -25
  90. package/dist/vue/kit/primevue/trigger.js.map +0 -1
  91. package/dist/vue/kit/primevue.css +0 -86
  92. package/dist/vue/kit/primevue.d.ts +0 -33
  93. package/dist/vue/kit/primevue.js +0 -96
  94. package/dist/vue/kit/primevue.js.map +0 -1
@@ -1,96 +0,0 @@
1
- import { sizeOf } from "./shared.js";
2
- import _sfc_main$1 from "./Icon.js";
3
- import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderSlot, unref, useTemplateRef } from "vue";
4
- import InputText from "primevue/inputtext";
5
- //#region src/vue/kit/primevue/Input.vue
6
- const _hoisted_1 = {
7
- key: 1,
8
- class: "sk-input-trailing"
9
- };
10
- const _sfc_main = /*@__PURE__*/ defineComponent({
11
- inheritAttrs: false,
12
- __name: "Input",
13
- props: {
14
- modelValue: {},
15
- type: {},
16
- size: {},
17
- color: {},
18
- highlight: { type: Boolean },
19
- icon: {},
20
- placeholder: {},
21
- disabled: { type: Boolean },
22
- readonly: { type: Boolean },
23
- maxlength: {},
24
- autofocus: { type: Boolean },
25
- autocomplete: {},
26
- accept: {},
27
- modelModifiers: {}
28
- },
29
- emits: ["update:modelValue"],
30
- setup(__props, { expose: __expose, emit: __emit }) {
31
- const props = __props;
32
- const emit = __emit;
33
- const input = useTemplateRef("input");
34
- __expose({ inputRef: computed(() => input.value?.$el ?? null) });
35
- function onInput(event) {
36
- let value = event.target.value;
37
- if (props.modelModifiers?.trim) value = value.trim();
38
- if (props.modelModifiers?.number) {
39
- const parsed = Number.parseFloat(value);
40
- if (!Number.isNaN(parsed)) value = parsed;
41
- }
42
- emit("update:modelValue", value);
43
- }
44
- return (_ctx, _cache) => {
45
- return openBlock(), createElementBlock("span", {
46
- class: normalizeClass(["sk-input", [_ctx.$attrs.class, __props.icon && "sk-input-icon"]]),
47
- style: normalizeStyle(_ctx.$attrs.style)
48
- }, [
49
- __props.icon ? (openBlock(), createBlock(_sfc_main$1, {
50
- key: 0,
51
- name: __props.icon,
52
- class: "sk-input-leading"
53
- }, null, 8, ["name"])) : createCommentVNode("v-if", true),
54
- createVNode(unref(InputText), mergeProps({
55
- ref_key: "input",
56
- ref: input
57
- }, {
58
- ..._ctx.$attrs,
59
- class: void 0,
60
- style: void 0
61
- }, {
62
- "model-value": __props.modelValue === void 0 ? void 0 : String(__props.modelValue),
63
- type: __props.type,
64
- size: unref(sizeOf)(__props.size),
65
- invalid: __props.color === "error" || __props.highlight,
66
- placeholder: __props.placeholder,
67
- disabled: __props.disabled,
68
- readonly: __props.readonly,
69
- maxlength: __props.maxlength === void 0 ? void 0 : Number(__props.maxlength),
70
- autofocus: __props.autofocus,
71
- autocomplete: __props.autocomplete,
72
- accept: __props.accept,
73
- fluid: "",
74
- onInput
75
- }), null, 16, [
76
- "model-value",
77
- "type",
78
- "size",
79
- "invalid",
80
- "placeholder",
81
- "disabled",
82
- "readonly",
83
- "maxlength",
84
- "autofocus",
85
- "autocomplete",
86
- "accept"
87
- ]),
88
- _ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_1, [renderSlot(_ctx.$slots, "trailing")])) : createCommentVNode("v-if", true)
89
- ], 6);
90
- };
91
- }
92
- });
93
- //#endregion
94
- export { _sfc_main as default };
95
-
96
- //# sourceMappingURL=Input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input.js","names":["$attrs","$slots","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createBlock","Icon","_createCommentVNode","_createVNode","_unref","_mergeProps","_renderSlot"],"sources":["../../../../src/vue/kit/primevue/Input.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport InputText from 'primevue/inputtext'\nimport { computed, useTemplateRef } from 'vue'\nimport type { InputProps } from '../types'\nimport Icon from './Icon.vue'\nimport { sizeOf } from './shared'\n\ndefineOptions({ inheritAttrs: false })\nconst props = defineProps<InputProps & { modelModifiers?: { number?: boolean, trim?: boolean } }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: string | number] }>()\n\nconst input = useTemplateRef<{ $el: HTMLInputElement }>('input')\ndefineExpose({ inputRef: computed(() => input.value?.$el ?? null) })\n\nfunction onInput(event: Event) {\n let value: string | number = (event.target as HTMLInputElement).value\n if (props.modelModifiers?.trim) value = value.trim()\n if (props.modelModifiers?.number) {\n const parsed = Number.parseFloat(value)\n if (!Number.isNaN(parsed)) value = parsed\n }\n emit('update:modelValue', value)\n}\n</script>\n\n<template>\n <span class=\"sk-input\" :class=\"[$attrs.class, icon && 'sk-input-icon']\" :style=\"$attrs.style as never\">\n <Icon v-if=\"icon\" :name=\"icon\" class=\"sk-input-leading\" />\n <InputText\n ref=\"input\"\n v-bind=\"{ ...$attrs, class: undefined, style: undefined }\"\n :model-value=\"modelValue === undefined ? undefined : String(modelValue)\"\n :type=\"type\"\n :size=\"sizeOf(size)\"\n :invalid=\"color === 'error' || highlight\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :maxlength=\"maxlength === undefined ? undefined : Number(maxlength)\"\n :autofocus=\"autofocus\"\n :autocomplete=\"autocomplete\"\n :accept=\"accept\"\n fluid\n @input=\"onInput\"\n />\n <span v-if=\"$slots.trailing\" class=\"sk-input-trailing\"><slot name=\"trailing\" /></span>\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQA,MAAM,QAAQ;EACd,MAAM,OAAO;EAEb,MAAM,QAAQ,eAA0C,OAAO;EAC/D,SAAa,EAAE,UAAU,eAAe,MAAM,OAAO,OAAO,IAAI,EAAE,CAAC;EAEnE,SAAS,QAAQ,OAAc;GAC7B,IAAI,QAA0B,MAAM,OAA4B;GAChE,IAAI,MAAM,gBAAgB,MAAM,QAAQ,MAAM,KAAK;GACnD,IAAI,MAAM,gBAAgB,QAAQ;IAChC,MAAM,SAAS,OAAO,WAAW,KAAK;IACtC,IAAI,CAAC,OAAO,MAAM,MAAM,GAAG,QAAQ;GACrC;GACA,KAAK,qBAAqB,KAAK;EACjC;;GAIE,OAAAE,UAAA,GAAAC,mBAoBO,QAAA;IApBD,OAAKC,eAAA,CAAC,YAAU,CAAUJ,KAAAA,OAAO,OAAO,QAAA,QAAI,eAAA,CAAA,CAAA;IAAuB,OAAKK,eAAEL,KAAAA,OAAO,KAAK;;IAC9E,QAAA,QAAZE,UAAA,GAAAI,YAA0DC,aAAA;;KAAvC,MAAM,QAAA;KAAM,OAAM;;IACrCE,YAgBEC,MAAA,SAAA,GAhBFC,WAgBE;KAfI,SAAA;KAAJ,KAAI;IACSX,GAAAA;KAAAA,GAAAA,KAAAA;KAAM,OAAS,KAAA;KAAS,OAAS,KAAA;IAAS,GAAA;KACtD,eAAa,QAAA,eAAe,KAAA,IAAY,KAAA,IAAY,OAAO,QAAA,UAAU;KACrE,MAAM,QAAA;KACN,MAAMU,MAAA,MAAA,CAAM,CAAC,QAAA,IAAI;KACjB,SAAS,QAAA,UAAK,WAAgB,QAAA;KAC9B,aAAa,QAAA;KACb,UAAU,QAAA;KACV,UAAU,QAAA;KACV,WAAW,QAAA,cAAc,KAAA,IAAY,KAAA,IAAY,OAAO,QAAA,SAAS;KACjE,WAAW,QAAA;KACX,cAAc,QAAA;KACd,QAAQ,QAAA;KACT,OAAA;KACQ;;;;;;;;;;;;;;IAEET,KAAAA,OAAO,YAAnBC,UAAA,GAAAC,mBAAsF,QAAtF,YAAsF,CAA/BS,WAAwB,KAAA,QAAA,UAAA,CAAA,CAAA,KAAAJ,mBAAA,QAAA,IAAA"}
@@ -1,122 +0,0 @@
1
- import { useEditorI18n } from "../../use-editor-i18n.js";
2
- import { sizeOf } from "./shared.js";
3
- import { computed, createBlock, createElementBlock, createTextVNode, defineComponent, openBlock, ref, renderSlot, toDisplayString, unref, watch, withCtx } from "vue";
4
- import AutoComplete from "primevue/autocomplete";
5
- //#region src/vue/kit/primevue/InputMenu.vue
6
- const _hoisted_1 = { key: 1 };
7
- const _sfc_main = /*@__PURE__*/ defineComponent({
8
- __name: "InputMenu",
9
- props: {
10
- modelValue: {},
11
- items: {},
12
- multiple: { type: Boolean },
13
- searchTerm: {},
14
- ignoreFilter: { type: Boolean },
15
- createItem: { type: [Boolean, Object] },
16
- placeholder: {},
17
- icon: {},
18
- size: {},
19
- disabled: { type: Boolean },
20
- open: { type: Boolean }
21
- },
22
- emits: [
23
- "update:modelValue",
24
- "update:searchTerm",
25
- "update:open",
26
- "create"
27
- ],
28
- setup(__props, { emit: __emit }) {
29
- const { t } = useEditorI18n();
30
- const props = __props;
31
- const emit = __emit;
32
- const term = ref(props.searchTerm ?? "");
33
- watch(() => props.searchTerm, (value) => {
34
- if (value !== void 0 && value !== term.value) term.value = value;
35
- });
36
- function optionOf(item) {
37
- return typeof item === "string" ? {
38
- label: item,
39
- value: item
40
- } : {
41
- label: item.label,
42
- value: item.value ?? item.label,
43
- ...item.disabled !== void 0 && { disabled: item.disabled }
44
- };
45
- }
46
- const options = computed(() => (props.items ?? []).map(optionOf));
47
- /** The suggestions: the items (filtered by the typed text unless the host searches) and, when asked for, a row that creates the typed text. */
48
- const suggestions = computed(() => {
49
- const text = term.value.trim();
50
- const query = text.toLowerCase();
51
- const list = props.ignoreFilter || !query ? options.value : options.value.filter((option) => option.label.toLowerCase().includes(query));
52
- const create = props.createItem;
53
- if (!create || !text) return list;
54
- const exact = options.value.some((option) => option.label.toLowerCase() === query);
55
- const when = create.when ?? "empty";
56
- if (!(when === "always" ? true : when === "no-match" ? !exact : list.length === 0)) return list;
57
- const row = {
58
- label: text,
59
- value: text,
60
- create: true
61
- };
62
- return create.position === "top" ? [row, ...list] : [...list, row];
63
- });
64
- const selected = computed(() => {
65
- const toOption = (value) => options.value.find((option) => option.value === value) ?? {
66
- label: value,
67
- value
68
- };
69
- if (props.multiple) return (props.modelValue ?? []).map(toOption);
70
- return props.modelValue ? toOption(props.modelValue) : null;
71
- });
72
- function onModel(value) {
73
- const picked = value == null ? [] : Array.isArray(value) ? value : [value];
74
- const created = picked.find((option) => option.create);
75
- if (created) {
76
- emit("create", created.value);
77
- term.value = "";
78
- emit("update:searchTerm", "");
79
- }
80
- const values = picked.filter((option) => !option.create).map((option) => option.value);
81
- emit("update:modelValue", props.multiple ? values : values[0] ?? "");
82
- }
83
- function onComplete(event) {
84
- term.value = event.query;
85
- emit("update:searchTerm", event.query);
86
- }
87
- return (_ctx, _cache) => {
88
- return openBlock(), createBlock(unref(AutoComplete), {
89
- "model-value": selected.value,
90
- suggestions: suggestions.value,
91
- "option-label": "label",
92
- "option-disabled": "disabled",
93
- multiple: __props.multiple,
94
- placeholder: __props.placeholder,
95
- size: unref(sizeOf)(__props.size),
96
- disabled: __props.disabled,
97
- delay: 0,
98
- "min-length": 0,
99
- "complete-on-focus": "",
100
- fluid: "",
101
- "onUpdate:modelValue": onModel,
102
- onComplete,
103
- onShow: _cache[0] || (_cache[0] = ($event) => emit("update:open", true)),
104
- onHide: _cache[1] || (_cache[1] = ($event) => emit("update:open", false))
105
- }, {
106
- option: withCtx(({ option }) => [option.create ? renderSlot(_ctx.$slots, "create-item-label", { item: option.value }, () => [createTextVNode(toDisplayString(unref(t)("common.createItem", { value: option.value })), 1)], void 0, 0) : (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(option.label), 1))]),
107
- _: 3
108
- }, 8, [
109
- "model-value",
110
- "suggestions",
111
- "multiple",
112
- "placeholder",
113
- "size",
114
- "disabled"
115
- ]);
116
- };
117
- }
118
- });
119
- //#endregion
120
- export { _sfc_main as default };
121
-
122
- //# sourceMappingURL=InputMenu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InputMenu.js","names":["_openBlock","_createBlock","_unref","_withCtx","_renderSlot","_createTextVNode","_toDisplayString","_createElementBlock"],"sources":["../../../../src/vue/kit/primevue/InputMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport AutoComplete from 'primevue/autocomplete'\nimport { computed, ref, watch } from 'vue'\nimport type { InputMenuItem, InputMenuProps } from '../types'\nimport { useEditorI18n } from '../../use-editor-i18n'\nimport { sizeOf } from './shared'\n\ninterface Option { label: string, value: string, create?: boolean, disabled?: boolean }\n\nconst { t } = useEditorI18n()\nconst props = defineProps<InputMenuProps>()\nconst emit = defineEmits<{\n 'update:modelValue': [value: string[] | string]\n 'update:searchTerm': [value: string]\n 'update:open': [open: boolean]\n 'create': [text: string]\n}>()\n\nconst term = ref(props.searchTerm ?? '')\nwatch(() => props.searchTerm, (value) => { if (value !== undefined && value !== term.value) term.value = value })\n\nfunction optionOf(item: InputMenuItem): Option {\n return typeof item === 'string'\n ? { label: item, value: item }\n : { label: item.label, value: item.value ?? item.label, ...(item.disabled !== undefined && { disabled: item.disabled }) }\n}\n\nconst options = computed(() => (props.items ?? []).map(optionOf))\n\n/** The suggestions: the items (filtered by the typed text unless the host searches) and, when asked for, a row that creates the typed text. */\nconst suggestions = computed<Option[]>(() => {\n const text = term.value.trim()\n const query = text.toLowerCase()\n const list = props.ignoreFilter || !query ? options.value : options.value.filter(option => option.label.toLowerCase().includes(query))\n const create = props.createItem\n if (!create || !text) return list\n const exact = options.value.some(option => option.label.toLowerCase() === query)\n const when = create.when ?? 'empty'\n const offer = when === 'always' ? true : when === 'no-match' ? !exact : list.length === 0\n if (!offer) return list\n const row: Option = { label: text, value: text, create: true }\n return create.position === 'top' ? [row, ...list] : [...list, row]\n})\n\nconst selected = computed<Option[] | Option | null>(() => {\n const toOption = (value: string): Option => options.value.find(option => option.value === value) ?? { label: value, value }\n if (props.multiple) return ((props.modelValue as string[] | undefined) ?? []).map(toOption)\n return props.modelValue ? toOption(props.modelValue as string) : null\n})\n\nfunction onModel(value: Option | Option[] | null | undefined) {\n const picked = value == null ? [] : Array.isArray(value) ? value : [value]\n const created = picked.find(option => option.create)\n if (created) {\n emit('create', created.value)\n term.value = ''\n emit('update:searchTerm', '')\n }\n const values = picked.filter(option => !option.create).map(option => option.value)\n emit('update:modelValue', props.multiple ? values : (values[0] ?? ''))\n}\n\nfunction onComplete(event: { query: string }) {\n term.value = event.query\n emit('update:searchTerm', event.query)\n}\n</script>\n\n<template>\n <AutoComplete\n :model-value=\"selected\"\n :suggestions=\"suggestions\"\n option-label=\"label\"\n option-disabled=\"disabled\"\n :multiple=\"multiple\"\n :placeholder=\"placeholder\"\n :size=\"sizeOf(size)\"\n :disabled=\"disabled\"\n :delay=\"0\"\n :min-length=\"0\"\n complete-on-focus\n fluid\n @update:model-value=\"onModel\"\n @complete=\"onComplete\"\n @show=\"emit('update:open', true)\"\n @hide=\"emit('update:open', false)\"\n >\n <template #option=\"{ option }\">\n <slot v-if=\"option.create\" name=\"create-item-label\" :item=\"option.value\">{{ t('common.createItem', { value: option.value }) }}</slot>\n <span v-else>{{ option.label }}</span>\n </template>\n </AutoComplete>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA,MAAM,EAAE,MAAM,cAAc;EAC5B,MAAM,QAAQ;EACd,MAAM,OAAO;EAOb,MAAM,OAAO,IAAI,MAAM,cAAc,EAAE;EACvC,YAAY,MAAM,a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AsC,QAAA,YAAAD,gBAAtB,OAAO,KAAK,GAAA,CAAA,EAAA,CAAA"}
@@ -1,59 +0,0 @@
1
- import { Fragment, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
2
- import Dialog from "primevue/dialog";
3
- //#region src/vue/kit/primevue/Modal.vue
4
- const _hoisted_1 = {
5
- key: 0,
6
- class: "sk-modal-description"
7
- };
8
- const _sfc_main = /*@__PURE__*/ defineComponent({
9
- __name: "Modal",
10
- props: {
11
- open: { type: Boolean },
12
- title: {},
13
- description: {},
14
- dismissible: { type: Boolean },
15
- close: { type: [Boolean, Object] },
16
- ui: {}
17
- },
18
- emits: ["update:open", "after:leave"],
19
- setup(__props, { emit: __emit }) {
20
- const props = __props;
21
- const emit = __emit;
22
- const closable = () => props.close !== false;
23
- const dismissible = () => props.dismissible !== false;
24
- return (_ctx, _cache) => {
25
- return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(Dialog), {
26
- visible: __props.open ?? false,
27
- modal: "",
28
- header: __props.title,
29
- closable: closable(),
30
- "dismissable-mask": dismissible(),
31
- "close-on-escape": dismissible(),
32
- pt: {
33
- root: { class: __props.ui?.content },
34
- mask: { class: __props.ui?.overlay }
35
- },
36
- "onUpdate:visible": _cache[0] || (_cache[0] = (visible) => emit("update:open", visible)),
37
- onAfterHide: _cache[1] || (_cache[1] = ($event) => emit("after:leave"))
38
- }, createSlots({
39
- default: withCtx(() => [__props.description ? (openBlock(), createElementBlock("p", _hoisted_1, toDisplayString(__props.description), 1)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "body")]),
40
- _: 2
41
- }, [_ctx.$slots.footer ? {
42
- name: "footer",
43
- fn: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
44
- key: "0"
45
- } : void 0]), 1032, [
46
- "visible",
47
- "header",
48
- "closable",
49
- "dismissable-mask",
50
- "close-on-escape",
51
- "pt"
52
- ]), renderSlot(_ctx.$slots, "default")], 64);
53
- };
54
- }
55
- });
56
- //#endregion
57
- export { _sfc_main as default };
58
-
59
- //# sourceMappingURL=Modal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Modal.js","names":["$slots","_openBlock","_createElementBlock","_Fragment","_createVNode","_unref","_createSlots","_withCtx","_toDisplayString","_createCommentVNode","_renderSlot"],"sources":["../../../../src/vue/kit/primevue/Modal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport Dialog from 'primevue/dialog'\nimport type { ModalProps } from '../types'\n\nconst props = defineProps<ModalProps>()\nconst emit = defineEmits<{ 'update:open': [open: boolean], 'after:leave': [] }>()\n\nconst closable = () => props.close !== false\nconst dismissible = () => props.dismissible !== false\n</script>\n\n<template>\n <Dialog\n :visible=\"open ?? false\"\n modal\n :header=\"title\"\n :closable=\"closable()\"\n :dismissable-mask=\"dismissible()\"\n :close-on-escape=\"dismissible()\"\n :pt=\"{ root: { class: ui?.content }, mask: { class: ui?.overlay } }\"\n @update:visible=\"(visible: boolean) => emit('update:open', visible)\"\n @after-hide=\"emit('after:leave')\"\n >\n <p v-if=\"description\" class=\"sk-modal-description\">{{ description }}</p>\n <slot name=\"body\" />\n <template v-if=\"$slots.footer\" #footer>\n <slot name=\"footer\" />\n </template>\n </Dialog>\n <slot />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAIA,MAAM,QAAQ;EACd,MAAM,OAAO;EAEb,MAAM,iBAAiB,MAAM,UAAU;EACvC,MAAM,oBAAoB,MAAM,gBAAgB;;GAI9C,OAAA,UAAA,GAAA,mBAAA,UAAA,MAAA,CAAAI,YAgBSC,MAAA,MAAA,GAAA;IAfN,SAAS,QAAA,QAAI;IACd,OAAA;IACC,QAAQ,QAAA;IACR,UAAU,SAAQ;IAClB,oBAAkB,YAAW;IAC7B,mBAAiB,YAAW;IAC5B,IAAE;KAAA,MAAA,EAAA,OAAmB,QAAA,IAAI,QAAO;KAAA,MAAA,EAAA,OAAmB,QAAA,IAAI,QAAO;IAAA;IAC9D,oBAAc,OAAA,OAAA,OAAA,MAAG,YAAqB,KAAI,eAAgB,OAAO;IACjE,aAAU,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,aAAA;;IAEjB,SAAAE,cAAwE,CAA/D,QAAA,eAATN,UAAA,GAAAC,mBAAwE,KAAxE,YAAwEM,gBAAlB,QAAA,WAAW,GAAA,CAAA,KAAAC,mBAAA,QAAA,IAAA,GACjEC,WAAoB,KAAA,QAAA,MAAA,CAAA,CAAA;;GACJV,GAAAA,CAAAA,KAAAA,OAAO,SAAA;IAAS,MAAA;IAC9B,IAAAO,cAAsB,CAAtBG,WAAsB,KAAA,QAAA,QAAA,CAAA,CAAA;;;;;;;;;GAG1B,CAAA,GAAAA,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,EAAA"}
@@ -1,135 +0,0 @@
1
- import { decorate, triggerNodes } from "./trigger.js";
2
- import { defineComponent, h, nextTick, onBeforeUnmount, ref, watch } from "vue";
3
- import PPopover from "primevue/popover";
4
- //#region src/vue/kit/primevue/Popover.ts
5
- /**
6
- * A PrimeVue `Popover` anchored to its trigger (default slot) or, with `reference`, to a virtual anchor (a text
7
- * range): an invisible fixed element is laid over the reference's rectangle each time the popover opens and while it is
8
- * open. `open` is two-way. `content.onInteractOutside` is honoured (a pointer press outside the panel and the trigger asks
9
- * it first; `preventDefault()` keeps the panel open). Limits: Prime aligns below the anchor (`content.side/align/sideOffset`
10
- * are ignored) and does not move focus into the panel (`onOpenAutoFocus`/`onCloseAutoFocus` never fire).
11
- */
12
- var Popover_default = defineComponent({
13
- name: "KitPopover",
14
- inheritAttrs: false,
15
- props: {
16
- open: {
17
- type: Boolean,
18
- default: void 0
19
- },
20
- reference: {
21
- type: Object,
22
- default: void 0
23
- },
24
- dismissible: {
25
- type: Boolean,
26
- default: true
27
- },
28
- content: {
29
- type: Object,
30
- default: void 0
31
- },
32
- ui: {
33
- type: Object,
34
- default: void 0
35
- }
36
- },
37
- emits: ["update:open"],
38
- setup(props, { slots, emit }) {
39
- const popover = ref(null);
40
- const anchor = ref(null);
41
- const isOpen = ref(false);
42
- let triggerEl = null;
43
- let frame = 0;
44
- function place() {
45
- const rect = props.reference?.getBoundingClientRect();
46
- const el = anchor.value;
47
- if (!rect || !el) return;
48
- Object.assign(el.style, {
49
- left: `${rect.left}px`,
50
- top: `${rect.top}px`,
51
- width: `${rect.width}px`,
52
- height: `${rect.height}px`
53
- });
54
- }
55
- function follow() {
56
- place();
57
- if (isOpen.value && props.content?.updatePositionStrategy === "always") frame = requestAnimationFrame(follow);
58
- }
59
- async function show() {
60
- if (isOpen.value) return;
61
- if (props.reference) {
62
- place();
63
- await nextTick();
64
- }
65
- const target = props.reference ? anchor.value : triggerEl;
66
- if (!target) return;
67
- popover.value?.show({ currentTarget: target }, target);
68
- }
69
- function hide() {
70
- popover.value?.hide();
71
- }
72
- /**
73
- * Outside dismissal is the kit's own, never Prime's: Prime listens for `click`, so a popover opened from a `mousedown`
74
- * (the editor's menu buttons keep the selection that way) was closed by the click that followed. A capture-phase
75
- * `pointerdown` registered on show precedes the click that opened it, and lets the host decide (`onInteractOutside`).
76
- */
77
- function onPressOutside(event) {
78
- const container = popover.value?.container;
79
- const target = event.target;
80
- if (!isOpen.value || !target || container?.contains(target) || triggerEl?.contains(target)) return;
81
- props.content?.onInteractOutside?.(event);
82
- if (!event.defaultPrevented && props.dismissible) hide();
83
- }
84
- watch(() => props.open, (open) => {
85
- if (open === void 0) return;
86
- if (open) show();
87
- else hide();
88
- }, {
89
- flush: "post",
90
- immediate: true
91
- });
92
- onBeforeUnmount(() => {
93
- cancelAnimationFrame(frame);
94
- document.removeEventListener("pointerdown", onPressOutside, true);
95
- });
96
- return () => [props.reference ? h("span", {
97
- "ref": anchor,
98
- "aria-hidden": "true",
99
- "style": {
100
- position: "fixed",
101
- pointerEvents: "none",
102
- visibility: "hidden"
103
- }
104
- }) : decorate(triggerNodes(slots.default?.()), {
105
- "data-state": isOpen.value ? "open" : "closed",
106
- "aria-haspopup": "dialog",
107
- "aria-expanded": isOpen.value,
108
- "onClick": (event) => {
109
- triggerEl = event.currentTarget;
110
- if (props.open === void 0) popover.value?.toggle(event);
111
- else emit("update:open", !isOpen.value);
112
- }
113
- }), h(PPopover, {
114
- ref: popover,
115
- dismissable: false,
116
- class: props.ui?.content,
117
- onShow: () => {
118
- isOpen.value = true;
119
- document.addEventListener("pointerdown", onPressOutside, true);
120
- emit("update:open", true);
121
- cancelAnimationFrame(frame);
122
- follow();
123
- },
124
- onHide: () => {
125
- isOpen.value = false;
126
- document.removeEventListener("pointerdown", onPressOutside, true);
127
- emit("update:open", false);
128
- }
129
- }, { default: () => slots.content?.() })];
130
- }
131
- });
132
- //#endregion
133
- export { Popover_default as default };
134
-
135
- //# sourceMappingURL=Popover.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Popover.js","names":[],"sources":["../../../../src/vue/kit/primevue/Popover.ts"],"sourcesContent":["import PPopover from 'primevue/popover'\nimport { defineComponent, h, nextTick, onBeforeUnmount, ref, watch } from 'vue'\nimport type { PropType } from 'vue'\nimport type { KitAnchor, KitOverlayContent, KitOverlayUi } from '../types'\nimport { decorate, triggerNodes } from './trigger'\n\n/**\n * A PrimeVue `Popover` anchored to its trigger (default slot) or, with `reference`, to a virtual anchor (a text\n * range): an invisible fixed element is laid over the reference's rectangle each time the popover opens and while it is\n * open. `open` is two-way. `content.onInteractOutside` is honoured (a pointer press outside the panel and the trigger asks\n * it first; `preventDefault()` keeps the panel open). Limits: Prime aligns below the anchor (`content.side/align/sideOffset`\n * are ignored) and does not move focus into the panel (`onOpenAutoFocus`/`onCloseAutoFocus` never fire).\n */\nexport default defineComponent({\n name: 'KitPopover',\n inheritAttrs: false,\n props: {\n open: { type: Boolean, default: undefined },\n reference: { type: Object as PropType<KitAnchor>, default: undefined },\n dismissible: { type: Boolean, default: true },\n content: { type: Object as PropType<KitOverlayContent>, default: undefined },\n ui: { type: Object as PropType<KitOverlayUi>, default: undefined },\n },\n emits: ['update:open'],\n setup(props, { slots, emit }) {\n const popover = ref<InstanceType<typeof PPopover> | null>(null)\n const anchor = ref<HTMLElement | null>(null)\n const isOpen = ref(false)\n let triggerEl: HTMLElement | null = null\n let frame = 0\n\n function place() {\n const rect = props.reference?.getBoundingClientRect()\n const el = anchor.value\n if (!rect || !el) return\n Object.assign(el.style, { left: `${rect.left}px`, top: `${rect.top}px`, width: `${rect.width}px`, height: `${rect.height}px` })\n }\n function follow() {\n place()\n if (isOpen.value && props.content?.updatePositionStrategy === 'always') frame = requestAnimationFrame(follow)\n }\n async function show() {\n if (isOpen.value) return\n if (props.reference) {\n place()\n await nextTick()\n }\n const target = props.reference ? anchor.value : triggerEl\n if (!target) return\n popover.value?.show({ currentTarget: target } as unknown as Event, target)\n }\n function hide() {\n popover.value?.hide()\n }\n /**\n * Outside dismissal is the kit's own, never Prime's: Prime listens for `click`, so a popover opened from a `mousedown`\n * (the editor's menu buttons keep the selection that way) was closed by the click that followed. A capture-phase\n * `pointerdown` registered on show precedes the click that opened it, and lets the host decide (`onInteractOutside`).\n */\n function onPressOutside(event: Event) {\n const container = (popover.value as unknown as { container?: HTMLElement } | null)?.container\n const target = event.target as Node | null\n if (!isOpen.value || !target || container?.contains(target) || triggerEl?.contains(target)) return\n props.content?.onInteractOutside?.(event)\n if (!event.defaultPrevented && props.dismissible) hide()\n }\n\n watch(() => props.open, (open) => {\n if (open === undefined) return\n if (open) void show()\n else hide()\n }, { flush: 'post', immediate: true })\n onBeforeUnmount(() => {\n cancelAnimationFrame(frame)\n document.removeEventListener('pointerdown', onPressOutside, true)\n })\n\n return () => [\n props.reference\n ? h('span', { 'ref': anchor, 'aria-hidden': 'true', 'style': { position: 'fixed', pointerEvents: 'none', visibility: 'hidden' } })\n : decorate(triggerNodes(slots.default?.()), {\n 'data-state': isOpen.value ? 'open' : 'closed',\n 'aria-haspopup': 'dialog',\n 'aria-expanded': isOpen.value,\n 'onClick': (event: Event) => {\n triggerEl = event.currentTarget as HTMLElement\n if (props.open === undefined) popover.value?.toggle(event)\n else emit('update:open', !isOpen.value)\n },\n }),\n h(PPopover, {\n ref: popover,\n dismissable: false,\n class: props.ui?.content,\n onShow: () => {\n isOpen.value = true\n document.addEventListener('pointerdown', onPressOutside, true)\n emit('update:open', true)\n cancelAnimationFrame(frame)\n follow()\n },\n onHide: () => {\n isOpen.value = false\n document.removeEventListener('pointerdown', onPressOutside, true)\n emit('update:open', false)\n },\n }, { default: () => slots.content?.() }),\n ]\n },\n})\n"],"mappings":";;;;;;;;;;;AAaA,IAAA,kBAAe,gBAAgB;CAC7B,MAAM;CACN,cAAc;CACd,OAAO;EACL,MAAM;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;EAC1C,WAAW;GAAE,MAAM;GAA+B,SAAS,KAAA;EAAU;EACrE,aAAa;GAAE,MAAM;GAAS,SAAS;EAAK;EAC5C,SAAS;GAAE,MAAM;GAAuC,SAAS,KAAA;EAAU;EAC3E,IAAI;GAAE,MAAM;GAAkC,SAAS,KAAA;EAAU;CACnE;CACA,OAAO,CAAC,aAAa;CACrB,MAAM,OAAO,EAAE,OAAO,QAAQ;EAC5B,MAAM,UAAU,IAA0C,IAAI;EAC9D,MAAM,SAAS,IAAwB,IAAI;EAC3C,MAAM,SAAS,IAAI,KAAK;EACxB,IAAI,YAAgC;EACpC,IAAI,QAAQ;EAEZ,SAAS,QAAQ;GACf,MAAM,OAAO,MAAM,WAAW,sBAAsB;GACpD,MAAM,KAAK,OAAO;GAClB,IAAI,CAAC,QAAQ,CAAC,IAAI;GAClB,OAAO,OAAO,GAAG,OAAO;IAAE,MAAM,GAAG,KAAK,KAAK;IAAK,KAAK,GAAG,KAAK,IAAI;IAAK,OAAO,GAAG,KAAK,MAAM;IAAK,QAAQ,GAAG,KAAK,OAAO;GAAI,CAAC;EAChI;EACA,SAAS,SAAS;GAChB,MAAM;GACN,IAAI,OAAO,SAAS,MAAM,SAAS,2BAA2B,UAAU,QAAQ,sBAAsB,MAAM;EAC9G;EACA,eAAe,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Ac;IACZ,OAAO,QAAQ;IACf,SAAS,iBAAiB,eAAe,gBAAgB,IAAI;IAC7D,KAAK,eAAe,IAAI;IACxB,qBAAqB,KAAK;IAC1B,OAAO;GACT;GACA,cAAc;IACZ,OAAO,QAAQ;IACf,SAAS,oBAAoB,eAAe,gBAAgB,IAAI;IAChE,KAAK,eAAe,KAAK;GAC3B;EACF,GAAG,EAAE,eAAe,MAAM,UAAU,EAAE,CAAC,CACzC;CACF;AACF,CAAC"}
@@ -1,58 +0,0 @@
1
- import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, useId, withCtx } from "vue";
2
- import RadioButton from "primevue/radiobutton";
3
- import RadioButtonGroup from "primevue/radiobuttongroup";
4
- //#region src/vue/kit/primevue/RadioGroup.vue
5
- const _hoisted_1 = {
6
- key: 0,
7
- class: "sk-radio-legend"
8
- };
9
- const _hoisted_2 = ["for"];
10
- const _hoisted_3 = { class: "sk-radio-label" };
11
- const _hoisted_4 = {
12
- key: 0,
13
- class: "sk-radio-description"
14
- };
15
- const _sfc_main = /*@__PURE__*/ defineComponent({
16
- __name: "RadioGroup",
17
- props: {
18
- modelValue: {},
19
- items: {},
20
- orientation: {},
21
- legend: {}
22
- },
23
- emits: ["update:modelValue"],
24
- setup(__props) {
25
- const id = useId();
26
- return (_ctx, _cache) => {
27
- return openBlock(), createElementBlock("fieldset", { class: normalizeClass(["sk-radio-group", __props.orientation === "horizontal" ? "sk-radio-group-row" : void 0]) }, [__props.legend ? (openBlock(), createElementBlock("legend", _hoisted_1, toDisplayString(__props.legend), 1)) : createCommentVNode("v-if", true), createVNode(unref(RadioButtonGroup), {
28
- "model-value": __props.modelValue,
29
- name: unref(id),
30
- class: "sk-radio-items",
31
- "onUpdate:modelValue": _cache[0] || (_cache[0] = (value) => _ctx.$emit("update:modelValue", value))
32
- }, {
33
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
34
- return openBlock(), createElementBlock("div", {
35
- key: item.value,
36
- class: "sk-radio-item"
37
- }, [createVNode(unref(RadioButton), {
38
- "input-id": `${unref(id)}-${index}`,
39
- value: item.value,
40
- disabled: item.disabled
41
- }, null, 8, [
42
- "input-id",
43
- "value",
44
- "disabled"
45
- ]), createElementVNode("label", {
46
- for: `${unref(id)}-${index}`,
47
- class: "sk-radio-text"
48
- }, [createElementVNode("span", _hoisted_3, toDisplayString(item.label), 1), item.description ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(item.description), 1)) : createCommentVNode("v-if", true)], 8, _hoisted_2)]);
49
- }), 128))]),
50
- _: 1
51
- }, 8, ["model-value", "name"])], 2);
52
- };
53
- }
54
- });
55
- //#endregion
56
- export { _sfc_main as default };
57
-
58
- //# sourceMappingURL=RadioGroup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioGroup.js","names":["$emit","_openBlock","_createElementBlock","_normalizeClass","_toDisplayString","_createCommentVNode","_createVNode","_unref","_withCtx","_Fragment","_renderList","_createElementVNode"],"sources":["../../../../src/vue/kit/primevue/RadioGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport RadioButton from 'primevue/radiobutton'\nimport RadioButtonGroup from 'primevue/radiobuttongroup'\nimport { useId } from 'vue'\nimport type { RadioGroupProps } from '../types'\n\ndefineProps<RadioGroupProps>()\ndefineEmits<{ 'update:modelValue': [value: string | number] }>()\nconst id = useId()\n</script>\n\n<template>\n <fieldset class=\"sk-radio-group\" :class=\"orientation === 'horizontal' ? 'sk-radio-group-row' : undefined\">\n <legend v-if=\"legend\" class=\"sk-radio-legend\">{{ legend }}</legend>\n <RadioButtonGroup :model-value=\"modelValue\" :name=\"id\" class=\"sk-radio-items\" @update:model-value=\"(value: string | number) => $emit('update:modelValue', value)\">\n <div v-for=\"(item, index) in items\" :key=\"item.value\" class=\"sk-radio-item\">\n <RadioButton :input-id=\"`${id}-${index}`\" :value=\"item.value\" :disabled=\"item.disabled\" />\n <label :for=\"`${id}-${index}`\" class=\"sk-radio-text\">\n <span class=\"sk-radio-label\">{{ item.label }}</span>\n <span v-if=\"item.description\" class=\"sk-radio-description\">{{ item.description }}</span>\n </label>\n </div>\n </RadioButtonGroup>\n </fieldset>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAQA,MAAM,KAAK,MAAM;;GAIf,OAAAC,UAAA,GAAAC,mBAWW,YAAA,EAXD,OAAKC,eAAA,CAAC,kBAAyB,QAAA,gBAAW,eAAA,uBAA2C,KAAA,CAAS,CAAA,EAAA,GACxF,CAAA,QAAA,UAAdF,UAAA,GAAAC,mBAAmE,UAAnE,YAAmEE,gBAAlB,QAAA,MAAM,GAAA,CAAA,KAAAC,mBAAA,QAAA,IAAA,GACvDC,YAQmBC,MAAA,gBAAA,GAAA;IARA,eAAa,QAAA;IAAa,MAAMA,MAAA,EAAA;IAAI,OAAM;IAAkB,uBAAkB,OAAA,OAAA,OAAA,MAAG,UAA2BP,KAAAA,MAAK,qBAAsB,KAAK;;IACxJ,SAAAQ,cAA8B,EAAnCP,UAAA,IAAA,GAAAC,mBAMMO,UAAA,MAAAC,WANuB,QAAA,QAAhB,MAAM,UAAK;KAAxB,OAAAT,UAAA,GAAAC,mBAMM,OAAA;MAN+B,KAAK,KAAK;MAAO,OAAM;KAC1D,GAAA,CAAAI,YAA0FC,MAAA,WAAA,GAAA;MAA5E,YAAQ,GAAKA,MAAA,EAAA,EAAE,GAAI;MAAU,OAAO,KAAK;MAAQ,UAAU,KAAK;;;;;KAC9E,CAAA,GAAAI,mBAGQ,SAAA;MAHA,KAAG,GAAKJ,MAAA,EAAA,EAAE,GAAI;MAAS,OAAM;KACnC,GAAA,CAAAI,mBAAoD,QAApD,YAAoDP,gBAApB,KAAK,KAAK,GAAA,CAAA,GAC9B,KAAK,eAAjBH,UAAA,GAAAC,mBAAwF,QAAxF,YAAwFE,gBAA1B,KAAK,WAAW,GAAA,CAAA,KAAAC,mBAAA,QAAA,IAAA,CAAA,GAAA,GAAA,UAAA,CAAA,CAAA"}
@@ -1,68 +0,0 @@
1
- import { sizeOf } from "./shared.js";
2
- import _sfc_main$1 from "./Icon.js";
3
- import { choiceOf, choicesOf } from "./select-options.js";
4
- import { computed, createBlock, createCommentVNode, createElementVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
5
- import PSelect from "primevue/select";
6
- //#region src/vue/kit/primevue/Select.vue
7
- const _hoisted_1 = { class: "inline-flex min-w-0 items-center gap-2" };
8
- const _hoisted_2 = { class: "truncate" };
9
- const _sfc_main = /*@__PURE__*/ defineComponent({
10
- __name: "Select",
11
- props: {
12
- modelValue: {},
13
- items: {},
14
- placeholder: {},
15
- size: {},
16
- disabled: { type: Boolean }
17
- },
18
- emits: ["update:modelValue"],
19
- setup(__props, { emit: __emit }) {
20
- const props = __props;
21
- const emit = __emit;
22
- const choices = computed(() => choicesOf(props.items));
23
- /** A choice's `onSelect` may `preventDefault()` the change, like in the Nuxt UI kit. */
24
- function onChange(value) {
25
- if (value === void 0) return;
26
- const choice = choiceOf(choices.value.options, value);
27
- if (choice?.onSelect) {
28
- const event = new Event("select", { cancelable: true });
29
- choice.onSelect(event);
30
- if (event.defaultPrevented) return;
31
- }
32
- emit("update:modelValue", value);
33
- }
34
- return (_ctx, _cache) => {
35
- return openBlock(), createBlock(unref(PSelect), {
36
- "model-value": __props.modelValue,
37
- options: choices.value.options,
38
- "option-label": "label",
39
- "option-value": "value",
40
- "option-disabled": "disabled",
41
- "option-group-label": choices.value.grouped ? "label" : void 0,
42
- "option-group-children": choices.value.grouped ? "items" : void 0,
43
- placeholder: __props.placeholder,
44
- size: unref(sizeOf)(__props.size),
45
- disabled: __props.disabled,
46
- "onUpdate:modelValue": onChange
47
- }, {
48
- option: withCtx(({ option }) => [createElementVNode("span", _hoisted_1, [option.icon ? (openBlock(), createBlock(_sfc_main$1, {
49
- key: 0,
50
- name: option.icon
51
- }, null, 8, ["name"])) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_2, toDisplayString(option.label), 1)])]),
52
- _: 1
53
- }, 8, [
54
- "model-value",
55
- "options",
56
- "option-group-label",
57
- "option-group-children",
58
- "placeholder",
59
- "size",
60
- "disabled"
61
- ]);
62
- };
63
- }
64
- });
65
- //#endregion
66
- export { _sfc_main as default };
67
-
68
- //# sourceMappingURL=Select.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Select.js","names":["_openBlock","_createBlock","_unref","_withCtx","_createElementVNode","Icon","_createCommentVNode","_toDisplayString"],"sources":["../../../../src/vue/kit/primevue/Select.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport PSelect from 'primevue/select'\nimport { computed } from 'vue'\nimport type { SelectProps } from '../types'\nimport Icon from './Icon.vue'\nimport { choiceOf, choicesOf } from './select-options'\nimport { sizeOf } from './shared'\n\nconst props = defineProps<SelectProps>()\nconst emit = defineEmits<{ 'update:modelValue': [value: string | number] }>()\n\nconst choices = computed(() => choicesOf(props.items))\n\n/** A choice's `onSelect` may `preventDefault()` the change, like in the Nuxt UI kit. */\nfunction onChange(value: string | number | undefined) {\n if (value === undefined) return\n const choice = choiceOf(choices.value.options, value)\n if (choice?.onSelect) {\n const event = new Event('select', { cancelable: true })\n choice.onSelect(event)\n if (event.defaultPrevented) return\n }\n emit('update:modelValue', value)\n}\n</script>\n\n<template>\n <PSelect\n :model-value=\"modelValue\"\n :options=\"choices.options\"\n option-label=\"label\"\n option-value=\"value\"\n option-disabled=\"disabled\"\n :option-group-label=\"choices.grouped ? 'label' : undefined\"\n :option-group-children=\"choices.grouped ? 'items' : undefined\"\n :placeholder=\"placeholder\"\n :size=\"sizeOf(size)\"\n :disabled=\"disabled\"\n @update:model-value=\"onChange\"\n >\n <template #option=\"{ option }\">\n <span class=\"inline-flex min-w-0 items-center gap-2\">\n <Icon v-if=\"option.icon\" :name=\"option.icon\" />\n <span class=\"truncate\">{{ option.label }}</span>\n </span>\n </template>\n </PSelect>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAQA,MAAM,QAAQ;EACd,MAAM,OAAO;EAEb,MAAM,UAAU,eAAe,UAAU,MAAM,KAAK,CAAC;;EAGrD,SAAS,SAAS,OAAoC;GACpD,IAAI,UAAU,KAAA,GAAW;GACzB,MAAM,SAAS,SAAS,QAAQ,MAAM,SAAS,KAAK;GACpD,IAAI,QAAQ,UAAU;IACpB,MAAM,QAAQ,IAAI,MAAM,UAAU,EAAE,YAAY,KAAK,CAAC;IACtD,OAAO,SAAS,KAAK;IACrB,IAAI,MAAM,kBAAkB;GAC9B;GACA,KAAK,qBAAqB,KAAK;EACjC;;GAIE,OAAAA,UAAA,GAAAC,YAmBUC,MAAA,OAAA,GAAA;IAlBP,eAAa,QAAA;IACb,SAAS,QAAA,MAAQ;IAClB,gBAAa;IACb,gBAAa;IACb,mBAAgB;IACf,sBAAoB,QAAA,MAAQ,UAAO,UAAa,KAAA;IAChD,yBAAuB,QAAA,MAAQ,UAAO,UAAa,KAAA;IACnD,aAAa,QAAA;IACb,MAAMA,MAAA,MAAA,CAAM,CAAC,QAAA,IAAI;IACjB,UAAU,QAAA;IACV,uBAAoB;;IAEV,QAAMC,SAIR,EAJY,aAAM,CACzBC,mBAGO,QAHP,YAGO,CAFO,OAAO,QAAnBJ,UAAA,GAAAC,YAA+CI,aAAA;;KAArB,MAAM,OAAO;IACvC,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,KAAAC,mBAAA,QAAA,IAAA,GAAAF,mBAAgD,QAAhD,YAAgDG,gBAAtB,OAAO,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}