@openpen/module-api 1.1.1 → 1.3.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.
- package/CHANGELOG.md +16 -0
- package/dist/_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-B9dHU-LE.js +246 -0
- package/dist/_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-B9dHU-LE.js.map +1 -0
- package/dist/_chunks/inject-keys-CRXCpN-M.js +196 -0
- package/dist/_chunks/inject-keys-CRXCpN-M.js.map +1 -0
- package/dist/_chunks/module-context-registry-Cn1IWYu9.js +16 -0
- package/dist/_chunks/module-context-registry-Cn1IWYu9.js.map +1 -0
- package/dist/_chunks/passthrough-DKU7JYuQ.js +6 -0
- package/dist/_chunks/passthrough-DKU7JYuQ.js.map +1 -0
- package/dist/cursors.d.ts +83 -0
- package/dist/define-module.d.ts +17 -0
- package/dist/host/color-utils.d.ts +11 -0
- package/{src/host/event-bus.ts → dist/host/event-bus.d.ts} +7 -5
- package/dist/host/host-commands.d.ts +1 -0
- package/dist/host/index.d.ts +24 -0
- package/dist/host/index.js +51 -0
- package/dist/host/index.js.map +1 -0
- package/{src/host/module-context-registry.ts → dist/host/module-context-registry.d.ts} +5 -19
- package/dist/host/passthrough.d.ts +2 -0
- package/dist/host/popup-anchor.d.ts +3 -0
- package/dist/host/registry.d.ts +39 -0
- package/dist/host/registry.js +37 -0
- package/dist/host/registry.js.map +1 -0
- package/dist/host/slot-entries.d.ts +2 -0
- package/dist/host/stroke-store.d.ts +6 -0
- package/dist/host/stroke-style.d.ts +3 -0
- package/dist/host/types.d.ts +176 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +349 -0
- package/dist/index.js.map +1 -0
- package/{src/inject-keys.ts → dist/inject-keys.d.ts} +37 -66
- package/{src/locale.ts → dist/locale.d.ts} +3 -22
- package/dist/slots.d.ts +57 -0
- package/dist/types/contributions.d.ts +288 -0
- package/dist/types/control-bar-layout.d.ts +227 -0
- package/dist/types/module.d.ts +208 -0
- package/{src/types/notification.ts → dist/types/notification.d.ts} +12 -14
- package/dist/types/tool.d.ts +77 -0
- package/dist/uikit/components/AppBanner.vue.d.ts +34 -0
- package/dist/uikit/components/AppButton.vue.d.ts +30 -0
- package/dist/uikit/components/AppButtonDropdown.vue.d.ts +52 -0
- package/dist/uikit/components/AppDialog.vue.d.ts +53 -0
- package/dist/uikit/components/AppPopover.vue.d.ts +43 -0
- package/dist/uikit/components/AppSegmented.vue.d.ts +19 -0
- package/dist/uikit/components/AppSelect.vue.d.ts +26 -0
- package/dist/uikit/components/AppSlider.vue.d.ts +43 -0
- package/dist/uikit/components/AppTabs.vue.d.ts +35 -0
- package/dist/uikit/components/AppToggle.vue.d.ts +15 -0
- package/dist/uikit/components/AppTooltip.vue.d.ts +27 -0
- package/dist/uikit/components/DialogHost.vue.d.ts +3 -0
- package/{src/uikit/composables/dialog-internal-keys.ts → dist/uikit/composables/dialog-internal-keys.d.ts} +3 -5
- package/dist/uikit/composables/useDialog.d.ts +399 -0
- package/dist/uikit/composables/useDialogPluginComponent.d.ts +9 -0
- package/dist/uikit/index.d.ts +42 -0
- package/dist/uikit/index.js +898 -0
- package/dist/uikit/index.js.map +1 -0
- package/{src/uikit/internal.ts → dist/uikit/internal.d.ts} +1 -1
- package/dist/uikit/internal.js +157 -0
- package/dist/uikit/internal.js.map +1 -0
- package/dist/uikit/module-api.css +851 -0
- package/dist/uikit/primitives.d.ts +42 -0
- package/{src/use-module-context.ts → dist/use-module-context.d.ts} +2 -15
- package/{src/validation.ts → dist/validation.d.ts} +2 -6
- package/package.json +28 -14
- package/src/cursors.ts +0 -369
- package/src/define-module.ts +0 -55
- package/src/host/color-utils.ts +0 -18
- package/src/host/host-commands.ts +0 -9
- package/src/host/index.ts +0 -53
- package/src/host/passthrough.ts +0 -10
- package/src/host/popup-anchor.ts +0 -14
- package/src/host/slot-entries.ts +0 -9
- package/src/host/stroke-store.ts +0 -20
- package/src/host/stroke-style.ts +0 -15
- package/src/index.ts +0 -131
- package/src/slots.ts +0 -135
- package/src/types/contributions.ts +0 -333
- package/src/types/control-bar-layout.ts +0 -174
- package/src/types/module.ts +0 -225
- package/src/types/tool.ts +0 -82
- package/src/uikit/components/.gitkeep +0 -0
- package/src/uikit/components/AppBanner.vue +0 -131
- package/src/uikit/components/AppButton.vue +0 -135
- package/src/uikit/components/AppDialog.vue +0 -393
- package/src/uikit/components/AppPopover.vue +0 -268
- package/src/uikit/components/AppSegmented.vue +0 -128
- package/src/uikit/components/AppSelect.vue +0 -235
- package/src/uikit/components/AppSlider.vue +0 -204
- package/src/uikit/components/AppTabs.vue +0 -163
- package/src/uikit/components/AppToggle.vue +0 -96
- package/src/uikit/components/AppTooltip.vue +0 -118
- package/src/uikit/components/DialogHost.vue +0 -272
- package/src/uikit/composables/useDialog.ts +0 -141
- package/src/uikit/composables/useDialogPluginComponent.ts +0 -27
- package/src/uikit/index.ts +0 -79
- package/src/uikit/primitives.ts +0 -150
- /package/{src → dist}/uikit/tokens.css +0 -0
|
@@ -0,0 +1,898 @@
|
|
|
1
|
+
import { defineComponent, onMounted, inject, computed, watch, useTemplateRef, ref, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, normalizeStyle, normalizeClass, createElementBlock, Fragment, renderList, createElementVNode, createCommentVNode, toDisplayString, createTextVNode } from "vue";
|
|
2
|
+
import { PopoverRoot, PopoverTrigger, PopoverPortal, PopoverContent, PopoverArrow, SliderRoot, SliderTrack, SliderRange, SliderThumb, SwitchRoot, SwitchThumb, RadioGroupRoot, RadioGroupItem, SelectRoot, SelectTrigger, SelectValue, SelectIcon, SelectPortal, SelectContent, SelectViewport, SelectItem, SelectItemIndicator, SelectItemText, TooltipProvider, TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, TabsRoot, TabsList, TabsTrigger, TabsContent } from "reka-ui";
|
|
3
|
+
import { ComboboxAnchor, ComboboxArrow, ComboboxCancel, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxPortal, ComboboxRoot, ComboboxSeparator, ComboboxTrigger, ComboboxViewport, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger, NumberFieldDecrement, NumberFieldIncrement, NumberFieldInput, NumberFieldRoot, PopoverAnchor, PopoverArrow as PopoverArrow2, PopoverClose, PopoverContent as PopoverContent2, PopoverPortal as PopoverPortal2, PopoverRoot as PopoverRoot2, PopoverTrigger as PopoverTrigger2, RadioGroupIndicator, RadioGroupItem as RadioGroupItem2, RadioGroupRoot as RadioGroupRoot2, SelectArrow, SelectContent as SelectContent2, SelectGroup, SelectIcon as SelectIcon2, SelectItem as SelectItem2, SelectItemIndicator as SelectItemIndicator2, SelectItemText as SelectItemText2, SelectLabel, SelectPortal as SelectPortal2, SelectRoot as SelectRoot2, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger as SelectTrigger2, SelectValue as SelectValue2, SelectViewport as SelectViewport2, SliderRange as SliderRange2, SliderRoot as SliderRoot2, SliderThumb as SliderThumb2, SliderTrack as SliderTrack2, SwitchRoot as SwitchRoot2, SwitchThumb as SwitchThumb2, TabsContent as TabsContent2, TabsList as TabsList2, TabsRoot as TabsRoot2, TabsTrigger as TabsTrigger2, TagsInputClear, TagsInputInput, TagsInputItem, TagsInputItemDelete, TagsInputItemText, TagsInputRoot, TooltipArrow as TooltipArrow2, TooltipContent as TooltipContent2, TooltipPortal as TooltipPortal2, TooltipProvider as TooltipProvider2, TooltipRoot as TooltipRoot2, TooltipTrigger as TooltipTrigger2 } from "reka-ui";
|
|
4
|
+
import { W as WRAPPER_EL_KEY, M as MODAL_MANAGER_KEY, c as CONTROL_BAR_ANIMATING_KEY, P as POPOVER_PLACEMENT_HINT_KEY, I as IS_VERTICAL_KEY, S as SNAP_EDGE_KEY, T as TOOLTIP_FLIP_DOWN_KEY } from "../_chunks/inject-keys-CRXCpN-M.js";
|
|
5
|
+
import "dompurify";
|
|
6
|
+
import "zod";
|
|
7
|
+
import { u as usePassthroughGuard } from "../_chunks/passthrough-DKU7JYuQ.js";
|
|
8
|
+
import { D as DIALOG_PLUGIN_HANDLE_KEY } from "../_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-B9dHU-LE.js";
|
|
9
|
+
import { _, a, b, u } from "../_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-B9dHU-LE.js";
|
|
10
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
11
|
+
__name: "AppPopover",
|
|
12
|
+
props: {
|
|
13
|
+
popoverId: {},
|
|
14
|
+
placement: { default: "auto" },
|
|
15
|
+
gap: { default: 8 }
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
onMounted(() => {
|
|
20
|
+
return;
|
|
21
|
+
});
|
|
22
|
+
const wrapperElRef = inject(WRAPPER_EL_KEY);
|
|
23
|
+
const wrapperEl = computed(() => (wrapperElRef == null ? void 0 : wrapperElRef.value) ?? null);
|
|
24
|
+
const modalManager = inject(MODAL_MANAGER_KEY);
|
|
25
|
+
const animating = inject(CONTROL_BAR_ANIMATING_KEY);
|
|
26
|
+
const popoverPlacementHint = inject(POPOVER_PLACEMENT_HINT_KEY);
|
|
27
|
+
const isOpen = computed(() => (modalManager == null ? void 0 : modalManager.isOpen(props.popoverId)) ?? false);
|
|
28
|
+
function open() {
|
|
29
|
+
modalManager == null ? void 0 : modalManager.open(props.popoverId);
|
|
30
|
+
}
|
|
31
|
+
function close() {
|
|
32
|
+
modalManager == null ? void 0 : modalManager.close(props.popoverId);
|
|
33
|
+
}
|
|
34
|
+
function toggle() {
|
|
35
|
+
if (isOpen.value) {
|
|
36
|
+
close();
|
|
37
|
+
} else {
|
|
38
|
+
open();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function onUpdateOpen(v) {
|
|
42
|
+
if (v) {
|
|
43
|
+
open();
|
|
44
|
+
} else {
|
|
45
|
+
close();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
watch(
|
|
49
|
+
() => animating == null ? void 0 : animating.value,
|
|
50
|
+
(isAnimating) => {
|
|
51
|
+
if (isAnimating && isOpen.value) {
|
|
52
|
+
close();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
const rekaSide = computed(() => {
|
|
57
|
+
if (props.placement !== "auto") return props.placement;
|
|
58
|
+
return (popoverPlacementHint == null ? void 0 : popoverPlacementHint.value) ?? "bottom";
|
|
59
|
+
});
|
|
60
|
+
const contentInstance = useTemplateRef("content");
|
|
61
|
+
const contentEl = ref(null);
|
|
62
|
+
watch(contentInstance, (instance) => {
|
|
63
|
+
if (!instance) {
|
|
64
|
+
contentEl.value = null;
|
|
65
|
+
} else if (instance instanceof HTMLElement) {
|
|
66
|
+
contentEl.value = instance;
|
|
67
|
+
} else if (typeof instance === "object" && "$el" in instance && instance.$el instanceof HTMLElement) {
|
|
68
|
+
contentEl.value = instance.$el;
|
|
69
|
+
} else {
|
|
70
|
+
contentEl.value = null;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
usePassthroughGuard(contentEl);
|
|
74
|
+
return (_ctx, _cache) => {
|
|
75
|
+
return openBlock(), createBlock(unref(PopoverRoot), {
|
|
76
|
+
open: isOpen.value,
|
|
77
|
+
"onUpdate:open": onUpdateOpen
|
|
78
|
+
}, {
|
|
79
|
+
default: withCtx(() => [
|
|
80
|
+
createVNode(unref(PopoverTrigger), { "as-child": "" }, {
|
|
81
|
+
default: withCtx(() => [
|
|
82
|
+
renderSlot(_ctx.$slots, "trigger", {
|
|
83
|
+
active: isOpen.value,
|
|
84
|
+
toggle,
|
|
85
|
+
open,
|
|
86
|
+
close
|
|
87
|
+
})
|
|
88
|
+
]),
|
|
89
|
+
_: 3
|
|
90
|
+
}),
|
|
91
|
+
createVNode(unref(PopoverPortal), {
|
|
92
|
+
to: wrapperEl.value ?? void 0
|
|
93
|
+
}, {
|
|
94
|
+
default: withCtx(() => [
|
|
95
|
+
createVNode(unref(PopoverContent), {
|
|
96
|
+
ref: "content",
|
|
97
|
+
side: rekaSide.value,
|
|
98
|
+
"avoid-collisions": true,
|
|
99
|
+
"side-offset": props.gap,
|
|
100
|
+
class: "openpen-popover-content openpen-interactive",
|
|
101
|
+
"data-testid": "controlbar-popover"
|
|
102
|
+
}, {
|
|
103
|
+
default: withCtx(() => [
|
|
104
|
+
renderSlot(_ctx.$slots, "content"),
|
|
105
|
+
createVNode(unref(PopoverArrow), {
|
|
106
|
+
class: "openpen-popover-arrow",
|
|
107
|
+
width: 14,
|
|
108
|
+
height: 8
|
|
109
|
+
})
|
|
110
|
+
]),
|
|
111
|
+
_: 3
|
|
112
|
+
}, 8, ["side", "side-offset"])
|
|
113
|
+
]),
|
|
114
|
+
_: 3
|
|
115
|
+
}, 8, ["to"])
|
|
116
|
+
]),
|
|
117
|
+
_: 3
|
|
118
|
+
}, 8, ["open"]);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
123
|
+
__name: "AppSlider",
|
|
124
|
+
props: {
|
|
125
|
+
modelValue: {},
|
|
126
|
+
min: { default: 0 },
|
|
127
|
+
max: { default: 100 },
|
|
128
|
+
step: { default: 1 },
|
|
129
|
+
width: { default: "100%" },
|
|
130
|
+
orientation: { default: "horizontal" },
|
|
131
|
+
trackHeight: { default: "4px" },
|
|
132
|
+
trackRadius: { default: "2px" },
|
|
133
|
+
thumbWidth: { default: "14px" },
|
|
134
|
+
thumbHeight: { default: "14px" },
|
|
135
|
+
thumbRadius: { default: "50%" },
|
|
136
|
+
inverted: { type: Boolean, default: false }
|
|
137
|
+
},
|
|
138
|
+
emits: ["update:modelValue"],
|
|
139
|
+
setup(__props, { emit: __emit }) {
|
|
140
|
+
const props = __props;
|
|
141
|
+
const emit = __emit;
|
|
142
|
+
const isVertical = computed(() => props.orientation === "vertical");
|
|
143
|
+
const rootStyle = computed(() => {
|
|
144
|
+
if (isVertical.value) {
|
|
145
|
+
return {
|
|
146
|
+
"--thumb-w": props.thumbWidth,
|
|
147
|
+
"--thumb-h": props.thumbHeight,
|
|
148
|
+
"--thumb-r": props.thumbRadius,
|
|
149
|
+
"--track-height": props.trackHeight,
|
|
150
|
+
"--track-radius": props.trackRadius,
|
|
151
|
+
height: props.width,
|
|
152
|
+
width: "16px"
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
"--thumb-w": props.thumbWidth,
|
|
157
|
+
"--thumb-h": props.thumbHeight,
|
|
158
|
+
"--thumb-r": props.thumbRadius,
|
|
159
|
+
"--track-height": props.trackHeight,
|
|
160
|
+
"--track-radius": props.trackRadius,
|
|
161
|
+
width: props.width
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
function onValueChange(val) {
|
|
165
|
+
if (val && val.length > 0) {
|
|
166
|
+
emit("update:modelValue", val[0]);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return (_ctx, _cache) => {
|
|
170
|
+
return openBlock(), createBlock(unref(SliderRoot), {
|
|
171
|
+
class: normalizeClass(["app-slider-root", { "app-slider-root--vertical": isVertical.value, "app-slider-root--inverted": __props.inverted }]),
|
|
172
|
+
"data-testid": "app-slider-root",
|
|
173
|
+
style: normalizeStyle(rootStyle.value),
|
|
174
|
+
"model-value": [__props.modelValue],
|
|
175
|
+
min: __props.min,
|
|
176
|
+
max: __props.max,
|
|
177
|
+
step: __props.step,
|
|
178
|
+
orientation: __props.orientation,
|
|
179
|
+
inverted: __props.inverted,
|
|
180
|
+
"onUpdate:modelValue": onValueChange
|
|
181
|
+
}, {
|
|
182
|
+
default: withCtx(() => [
|
|
183
|
+
createVNode(unref(SliderTrack), {
|
|
184
|
+
class: "app-slider-track",
|
|
185
|
+
"data-testid": "app-slider-track"
|
|
186
|
+
}, {
|
|
187
|
+
default: withCtx(() => [
|
|
188
|
+
createVNode(unref(SliderRange), {
|
|
189
|
+
class: "app-slider-range",
|
|
190
|
+
"data-testid": "app-slider-range"
|
|
191
|
+
})
|
|
192
|
+
]),
|
|
193
|
+
_: 1
|
|
194
|
+
}),
|
|
195
|
+
createVNode(unref(SliderThumb), {
|
|
196
|
+
class: "app-slider-thumb",
|
|
197
|
+
"data-testid": "app-slider-thumb"
|
|
198
|
+
})
|
|
199
|
+
]),
|
|
200
|
+
_: 1
|
|
201
|
+
}, 8, ["class", "style", "model-value", "min", "max", "step", "orientation", "inverted"]);
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
const _export_sfc = (sfc, props) => {
|
|
206
|
+
const target = sfc.__vccOpts || sfc;
|
|
207
|
+
for (const [key, val] of props) {
|
|
208
|
+
target[key] = val;
|
|
209
|
+
}
|
|
210
|
+
return target;
|
|
211
|
+
};
|
|
212
|
+
const AppSlider = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-ae09a023"]]);
|
|
213
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
214
|
+
__name: "AppToggle",
|
|
215
|
+
props: {
|
|
216
|
+
modelValue: { type: Boolean },
|
|
217
|
+
ariaLabel: { default: "" },
|
|
218
|
+
testid: { default: void 0 }
|
|
219
|
+
},
|
|
220
|
+
emits: ["update:modelValue"],
|
|
221
|
+
setup(__props, { emit: __emit }) {
|
|
222
|
+
const emit = __emit;
|
|
223
|
+
function onCheckedChange(val) {
|
|
224
|
+
emit("update:modelValue", val);
|
|
225
|
+
}
|
|
226
|
+
return (_ctx, _cache) => {
|
|
227
|
+
return openBlock(), createBlock(unref(SwitchRoot), {
|
|
228
|
+
class: normalizeClass(["app-toggle", { on: __props.modelValue }]),
|
|
229
|
+
"model-value": __props.modelValue,
|
|
230
|
+
"aria-label": __props.ariaLabel,
|
|
231
|
+
"aria-pressed": __props.modelValue,
|
|
232
|
+
"data-testid": __props.testid,
|
|
233
|
+
"onUpdate:modelValue": onCheckedChange
|
|
234
|
+
}, {
|
|
235
|
+
default: withCtx(() => [
|
|
236
|
+
createVNode(unref(SwitchThumb), { class: "app-toggle-thumb" })
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
}, 8, ["class", "model-value", "aria-label", "aria-pressed", "data-testid"]);
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
const AppToggle = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-d23dd615"]]);
|
|
244
|
+
const _hoisted_1$3 = ["data-testid"];
|
|
245
|
+
const _hoisted_2$1 = ["innerHTML"];
|
|
246
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
247
|
+
__name: "AppSegmented",
|
|
248
|
+
props: {
|
|
249
|
+
modelValue: {},
|
|
250
|
+
options: {},
|
|
251
|
+
disabled: { type: Boolean }
|
|
252
|
+
},
|
|
253
|
+
emits: ["update:modelValue"],
|
|
254
|
+
setup(__props, { emit: __emit }) {
|
|
255
|
+
const emit = __emit;
|
|
256
|
+
function onValueChange(val) {
|
|
257
|
+
if (typeof val === "string") {
|
|
258
|
+
emit("update:modelValue", val);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return (_ctx, _cache) => {
|
|
262
|
+
return openBlock(), createBlock(unref(RadioGroupRoot), {
|
|
263
|
+
class: normalizeClass(["app-seg", { "app-seg--disabled": __props.disabled }]),
|
|
264
|
+
"data-testid": "app-seg",
|
|
265
|
+
"model-value": __props.modelValue,
|
|
266
|
+
disabled: __props.disabled,
|
|
267
|
+
orientation: "horizontal",
|
|
268
|
+
"onUpdate:modelValue": onValueChange
|
|
269
|
+
}, {
|
|
270
|
+
default: withCtx(() => [
|
|
271
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (opt) => {
|
|
272
|
+
return openBlock(), createBlock(unref(RadioGroupItem), {
|
|
273
|
+
key: opt.value,
|
|
274
|
+
value: opt.value,
|
|
275
|
+
"as-child": ""
|
|
276
|
+
}, {
|
|
277
|
+
default: withCtx(() => [
|
|
278
|
+
createElementVNode("button", {
|
|
279
|
+
class: normalizeClass(["app-seg-btn", { active: __props.modelValue === opt.value }]),
|
|
280
|
+
"data-testid": opt.testid
|
|
281
|
+
}, [
|
|
282
|
+
opt.icon ? (openBlock(), createElementBlock("span", {
|
|
283
|
+
key: 0,
|
|
284
|
+
class: "app-seg-icon",
|
|
285
|
+
"aria-hidden": "true",
|
|
286
|
+
innerHTML: opt.icon
|
|
287
|
+
}, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
|
|
288
|
+
createElementVNode("span", null, toDisplayString(opt.label), 1)
|
|
289
|
+
], 10, _hoisted_1$3)
|
|
290
|
+
]),
|
|
291
|
+
_: 2
|
|
292
|
+
}, 1032, ["value"]);
|
|
293
|
+
}), 128))
|
|
294
|
+
]),
|
|
295
|
+
_: 1
|
|
296
|
+
}, 8, ["class", "model-value", "disabled"]);
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
const AppSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-eaacab1f"]]);
|
|
301
|
+
function useDialogPluginComponent() {
|
|
302
|
+
const handle = inject(DIALOG_PLUGIN_HANDLE_KEY);
|
|
303
|
+
if (!handle) {
|
|
304
|
+
throw new Error(
|
|
305
|
+
"useDialogPluginComponent() must be called inside a component rendered via useDialog().custom()"
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
return handle;
|
|
309
|
+
}
|
|
310
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
311
|
+
__name: "AppSelect",
|
|
312
|
+
props: {
|
|
313
|
+
modelValue: {},
|
|
314
|
+
options: {},
|
|
315
|
+
placeholder: {},
|
|
316
|
+
disabled: { type: Boolean, default: false }
|
|
317
|
+
},
|
|
318
|
+
emits: ["update:modelValue"],
|
|
319
|
+
setup(__props, { emit: __emit }) {
|
|
320
|
+
const emit = __emit;
|
|
321
|
+
function onValueChange(v) {
|
|
322
|
+
emit("update:modelValue", v);
|
|
323
|
+
}
|
|
324
|
+
return (_ctx, _cache) => {
|
|
325
|
+
return openBlock(), createBlock(unref(SelectRoot), {
|
|
326
|
+
"model-value": __props.modelValue,
|
|
327
|
+
disabled: __props.disabled,
|
|
328
|
+
"onUpdate:modelValue": onValueChange
|
|
329
|
+
}, {
|
|
330
|
+
default: withCtx(() => [
|
|
331
|
+
createVNode(unref(SelectTrigger), { class: "openpen-select-trigger" }, {
|
|
332
|
+
default: withCtx(() => [
|
|
333
|
+
createVNode(unref(SelectValue), { placeholder: __props.placeholder }, null, 8, ["placeholder"]),
|
|
334
|
+
createVNode(unref(SelectIcon), {
|
|
335
|
+
class: "openpen-select-icon",
|
|
336
|
+
"aria-hidden": "true"
|
|
337
|
+
}, {
|
|
338
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
339
|
+
createElementVNode("svg", {
|
|
340
|
+
width: "12",
|
|
341
|
+
height: "12",
|
|
342
|
+
viewBox: "0 0 12 12",
|
|
343
|
+
fill: "none"
|
|
344
|
+
}, [
|
|
345
|
+
createElementVNode("path", {
|
|
346
|
+
d: "M2 4L6 8L10 4",
|
|
347
|
+
stroke: "currentColor",
|
|
348
|
+
"stroke-width": "1.5",
|
|
349
|
+
"stroke-linecap": "round",
|
|
350
|
+
"stroke-linejoin": "round"
|
|
351
|
+
})
|
|
352
|
+
], -1)
|
|
353
|
+
])]),
|
|
354
|
+
_: 1
|
|
355
|
+
})
|
|
356
|
+
]),
|
|
357
|
+
_: 1
|
|
358
|
+
}),
|
|
359
|
+
createVNode(unref(SelectPortal), null, {
|
|
360
|
+
default: withCtx(() => [
|
|
361
|
+
createVNode(unref(SelectContent), {
|
|
362
|
+
class: "openpen-select-content",
|
|
363
|
+
position: "popper",
|
|
364
|
+
"side-offset": 4
|
|
365
|
+
}, {
|
|
366
|
+
default: withCtx(() => [
|
|
367
|
+
createVNode(unref(SelectViewport), { class: "openpen-select-viewport" }, {
|
|
368
|
+
default: withCtx(() => [
|
|
369
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
|
|
370
|
+
return openBlock(), createBlock(unref(SelectItem), {
|
|
371
|
+
key: option.value,
|
|
372
|
+
value: option.value,
|
|
373
|
+
class: "openpen-select-item"
|
|
374
|
+
}, {
|
|
375
|
+
default: withCtx(() => [
|
|
376
|
+
createVNode(unref(SelectItemIndicator), { class: "openpen-select-item-indicator" }, {
|
|
377
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
378
|
+
createElementVNode("svg", {
|
|
379
|
+
width: "12",
|
|
380
|
+
height: "12",
|
|
381
|
+
viewBox: "0 0 12 12",
|
|
382
|
+
fill: "none",
|
|
383
|
+
"aria-hidden": "true"
|
|
384
|
+
}, [
|
|
385
|
+
createElementVNode("path", {
|
|
386
|
+
d: "M2 6L5 9L10 3",
|
|
387
|
+
stroke: "currentColor",
|
|
388
|
+
"stroke-width": "1.5",
|
|
389
|
+
"stroke-linecap": "round",
|
|
390
|
+
"stroke-linejoin": "round"
|
|
391
|
+
})
|
|
392
|
+
], -1)
|
|
393
|
+
])]),
|
|
394
|
+
_: 1
|
|
395
|
+
}),
|
|
396
|
+
createVNode(unref(SelectItemText), null, {
|
|
397
|
+
default: withCtx(() => [
|
|
398
|
+
createTextVNode(toDisplayString(option.label), 1)
|
|
399
|
+
]),
|
|
400
|
+
_: 2
|
|
401
|
+
}, 1024)
|
|
402
|
+
]),
|
|
403
|
+
_: 2
|
|
404
|
+
}, 1032, ["value"]);
|
|
405
|
+
}), 128))
|
|
406
|
+
]),
|
|
407
|
+
_: 1
|
|
408
|
+
})
|
|
409
|
+
]),
|
|
410
|
+
_: 1
|
|
411
|
+
})
|
|
412
|
+
]),
|
|
413
|
+
_: 1
|
|
414
|
+
})
|
|
415
|
+
]),
|
|
416
|
+
_: 1
|
|
417
|
+
}, 8, ["model-value", "disabled"]);
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
422
|
+
__name: "AppTooltip",
|
|
423
|
+
props: {
|
|
424
|
+
content: {},
|
|
425
|
+
side: { default: "top" },
|
|
426
|
+
delay: { default: 200 }
|
|
427
|
+
},
|
|
428
|
+
setup(__props) {
|
|
429
|
+
const props = __props;
|
|
430
|
+
return (_ctx, _cache) => {
|
|
431
|
+
return openBlock(), createBlock(unref(TooltipProvider), {
|
|
432
|
+
"delay-duration": props.delay
|
|
433
|
+
}, {
|
|
434
|
+
default: withCtx(() => [
|
|
435
|
+
createVNode(unref(TooltipRoot), null, {
|
|
436
|
+
default: withCtx(() => [
|
|
437
|
+
createVNode(unref(TooltipTrigger), { "as-child": "" }, {
|
|
438
|
+
default: withCtx(() => [
|
|
439
|
+
renderSlot(_ctx.$slots, "default")
|
|
440
|
+
]),
|
|
441
|
+
_: 3
|
|
442
|
+
}),
|
|
443
|
+
createVNode(unref(TooltipPortal), null, {
|
|
444
|
+
default: withCtx(() => [
|
|
445
|
+
createVNode(unref(TooltipContent), {
|
|
446
|
+
side: props.side,
|
|
447
|
+
"side-offset": 6,
|
|
448
|
+
"avoid-collisions": true,
|
|
449
|
+
"collision-padding": 8,
|
|
450
|
+
class: "openpen-tooltip-content"
|
|
451
|
+
}, {
|
|
452
|
+
default: withCtx(() => [
|
|
453
|
+
createTextVNode(toDisplayString(props.content) + " ", 1),
|
|
454
|
+
createVNode(unref(TooltipArrow), {
|
|
455
|
+
class: "openpen-tooltip-arrow",
|
|
456
|
+
width: 10,
|
|
457
|
+
height: 5
|
|
458
|
+
})
|
|
459
|
+
]),
|
|
460
|
+
_: 1
|
|
461
|
+
}, 8, ["side"])
|
|
462
|
+
]),
|
|
463
|
+
_: 1
|
|
464
|
+
})
|
|
465
|
+
]),
|
|
466
|
+
_: 3
|
|
467
|
+
})
|
|
468
|
+
]),
|
|
469
|
+
_: 3
|
|
470
|
+
}, 8, ["delay-duration"]);
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
475
|
+
__name: "AppTabs",
|
|
476
|
+
props: {
|
|
477
|
+
modelValue: {},
|
|
478
|
+
tabs: {}
|
|
479
|
+
},
|
|
480
|
+
emits: ["update:modelValue"],
|
|
481
|
+
setup(__props, { emit: __emit }) {
|
|
482
|
+
const props = __props;
|
|
483
|
+
const emit = __emit;
|
|
484
|
+
function onTabChange(val) {
|
|
485
|
+
if (typeof val === "string") {
|
|
486
|
+
emit("update:modelValue", val);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
return (_ctx, _cache) => {
|
|
490
|
+
return openBlock(), createBlock(unref(TabsRoot), {
|
|
491
|
+
"model-value": props.modelValue,
|
|
492
|
+
class: "openpen-tabs",
|
|
493
|
+
"onUpdate:modelValue": onTabChange
|
|
494
|
+
}, {
|
|
495
|
+
default: withCtx(() => [
|
|
496
|
+
createVNode(unref(TabsList), { class: "openpen-tabs-list" }, {
|
|
497
|
+
default: withCtx(() => [
|
|
498
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.tabs, (tab) => {
|
|
499
|
+
return openBlock(), createBlock(unref(TabsTrigger), {
|
|
500
|
+
key: tab.id,
|
|
501
|
+
value: tab.id,
|
|
502
|
+
class: "openpen-tabs-trigger"
|
|
503
|
+
}, {
|
|
504
|
+
default: withCtx(() => [
|
|
505
|
+
createTextVNode(toDisplayString(tab.label), 1)
|
|
506
|
+
]),
|
|
507
|
+
_: 2
|
|
508
|
+
}, 1032, ["value"]);
|
|
509
|
+
}), 128))
|
|
510
|
+
]),
|
|
511
|
+
_: 1
|
|
512
|
+
}),
|
|
513
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.tabs, (tab) => {
|
|
514
|
+
return openBlock(), createBlock(unref(TabsContent), {
|
|
515
|
+
key: tab.id,
|
|
516
|
+
value: tab.id,
|
|
517
|
+
class: "openpen-tabs-content"
|
|
518
|
+
}, {
|
|
519
|
+
default: withCtx(() => [
|
|
520
|
+
renderSlot(_ctx.$slots, "default", {
|
|
521
|
+
activeTabId: tab.id
|
|
522
|
+
}, void 0, true)
|
|
523
|
+
]),
|
|
524
|
+
_: 2
|
|
525
|
+
}, 1032, ["value"]);
|
|
526
|
+
}), 128))
|
|
527
|
+
]),
|
|
528
|
+
_: 3
|
|
529
|
+
}, 8, ["model-value"]);
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
const AppTabs = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-5bab1555"]]);
|
|
534
|
+
const _hoisted_1$2 = ["role"];
|
|
535
|
+
const _hoisted_2 = {
|
|
536
|
+
class: "app-banner-icon",
|
|
537
|
+
"aria-hidden": "true"
|
|
538
|
+
};
|
|
539
|
+
const _hoisted_3 = {
|
|
540
|
+
key: 0,
|
|
541
|
+
width: "15",
|
|
542
|
+
height: "15",
|
|
543
|
+
viewBox: "0 0 24 24",
|
|
544
|
+
fill: "none",
|
|
545
|
+
stroke: "currentColor",
|
|
546
|
+
"stroke-width": "2",
|
|
547
|
+
"stroke-linecap": "round",
|
|
548
|
+
"stroke-linejoin": "round"
|
|
549
|
+
};
|
|
550
|
+
const _hoisted_4 = {
|
|
551
|
+
key: 1,
|
|
552
|
+
width: "15",
|
|
553
|
+
height: "15",
|
|
554
|
+
viewBox: "0 0 24 24",
|
|
555
|
+
fill: "none",
|
|
556
|
+
stroke: "currentColor",
|
|
557
|
+
"stroke-width": "2",
|
|
558
|
+
"stroke-linecap": "round",
|
|
559
|
+
"stroke-linejoin": "round"
|
|
560
|
+
};
|
|
561
|
+
const _hoisted_5 = {
|
|
562
|
+
key: 2,
|
|
563
|
+
width: "15",
|
|
564
|
+
height: "15",
|
|
565
|
+
viewBox: "0 0 24 24",
|
|
566
|
+
fill: "none",
|
|
567
|
+
stroke: "currentColor",
|
|
568
|
+
"stroke-width": "2",
|
|
569
|
+
"stroke-linecap": "round",
|
|
570
|
+
"stroke-linejoin": "round"
|
|
571
|
+
};
|
|
572
|
+
const _hoisted_6 = {
|
|
573
|
+
key: 3,
|
|
574
|
+
width: "15",
|
|
575
|
+
height: "15",
|
|
576
|
+
viewBox: "0 0 24 24",
|
|
577
|
+
fill: "none",
|
|
578
|
+
stroke: "currentColor",
|
|
579
|
+
"stroke-width": "2",
|
|
580
|
+
"stroke-linecap": "round",
|
|
581
|
+
"stroke-linejoin": "round"
|
|
582
|
+
};
|
|
583
|
+
const _hoisted_7 = { class: "app-banner-body" };
|
|
584
|
+
const _hoisted_8 = {
|
|
585
|
+
key: 0,
|
|
586
|
+
class: "app-banner-actions"
|
|
587
|
+
};
|
|
588
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
589
|
+
__name: "AppBanner",
|
|
590
|
+
props: {
|
|
591
|
+
variant: {},
|
|
592
|
+
inline: { type: Boolean, default: false }
|
|
593
|
+
},
|
|
594
|
+
setup(__props) {
|
|
595
|
+
return (_ctx, _cache) => {
|
|
596
|
+
return openBlock(), createElementBlock("div", {
|
|
597
|
+
class: normalizeClass(["app-banner", `app-banner-${__props.variant}`, { "app-banner-inline": __props.inline }]),
|
|
598
|
+
role: __props.variant === "error" ? "alert" : "status"
|
|
599
|
+
}, [
|
|
600
|
+
createElementVNode("span", _hoisted_2, [
|
|
601
|
+
__props.variant === "info" ? (openBlock(), createElementBlock("svg", _hoisted_3, [..._cache[0] || (_cache[0] = [
|
|
602
|
+
createElementVNode("circle", {
|
|
603
|
+
cx: "12",
|
|
604
|
+
cy: "12",
|
|
605
|
+
r: "10"
|
|
606
|
+
}, null, -1),
|
|
607
|
+
createElementVNode("line", {
|
|
608
|
+
x1: "12",
|
|
609
|
+
y1: "8",
|
|
610
|
+
x2: "12",
|
|
611
|
+
y2: "12"
|
|
612
|
+
}, null, -1),
|
|
613
|
+
createElementVNode("line", {
|
|
614
|
+
x1: "12",
|
|
615
|
+
y1: "16",
|
|
616
|
+
x2: "12.01",
|
|
617
|
+
y2: "16"
|
|
618
|
+
}, null, -1)
|
|
619
|
+
])])) : __props.variant === "warning" ? (openBlock(), createElementBlock("svg", _hoisted_4, [..._cache[1] || (_cache[1] = [
|
|
620
|
+
createElementVNode("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }, null, -1),
|
|
621
|
+
createElementVNode("line", {
|
|
622
|
+
x1: "12",
|
|
623
|
+
y1: "9",
|
|
624
|
+
x2: "12",
|
|
625
|
+
y2: "13"
|
|
626
|
+
}, null, -1),
|
|
627
|
+
createElementVNode("line", {
|
|
628
|
+
x1: "12",
|
|
629
|
+
y1: "17",
|
|
630
|
+
x2: "12.01",
|
|
631
|
+
y2: "17"
|
|
632
|
+
}, null, -1)
|
|
633
|
+
])])) : __props.variant === "success" ? (openBlock(), createElementBlock("svg", _hoisted_5, [..._cache[2] || (_cache[2] = [
|
|
634
|
+
createElementVNode("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
|
|
635
|
+
createElementVNode("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
|
|
636
|
+
])])) : (openBlock(), createElementBlock("svg", _hoisted_6, [..._cache[3] || (_cache[3] = [
|
|
637
|
+
createElementVNode("circle", {
|
|
638
|
+
cx: "12",
|
|
639
|
+
cy: "12",
|
|
640
|
+
r: "10"
|
|
641
|
+
}, null, -1),
|
|
642
|
+
createElementVNode("line", {
|
|
643
|
+
x1: "15",
|
|
644
|
+
y1: "9",
|
|
645
|
+
x2: "9",
|
|
646
|
+
y2: "15"
|
|
647
|
+
}, null, -1),
|
|
648
|
+
createElementVNode("line", {
|
|
649
|
+
x1: "9",
|
|
650
|
+
y1: "9",
|
|
651
|
+
x2: "15",
|
|
652
|
+
y2: "15"
|
|
653
|
+
}, null, -1)
|
|
654
|
+
])]))
|
|
655
|
+
]),
|
|
656
|
+
createElementVNode("span", _hoisted_7, [
|
|
657
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
658
|
+
]),
|
|
659
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("span", _hoisted_8, [
|
|
660
|
+
renderSlot(_ctx.$slots, "actions", {}, void 0, true)
|
|
661
|
+
])) : createCommentVNode("", true)
|
|
662
|
+
], 10, _hoisted_1$2);
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
const AppBanner = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-c68deb55"]]);
|
|
667
|
+
const _hoisted_1$1 = ["data-tip", "aria-label", "aria-disabled"];
|
|
668
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
669
|
+
__name: "AppButton",
|
|
670
|
+
props: {
|
|
671
|
+
variant: { default: "default" },
|
|
672
|
+
active: { type: Boolean, default: false },
|
|
673
|
+
disabled: { type: Boolean, default: false },
|
|
674
|
+
tooltip: { default: void 0 },
|
|
675
|
+
ariaLabel: { default: void 0 }
|
|
676
|
+
},
|
|
677
|
+
emits: ["click"],
|
|
678
|
+
setup(__props, { emit: __emit }) {
|
|
679
|
+
const props = __props;
|
|
680
|
+
const emit = __emit;
|
|
681
|
+
function handleClick() {
|
|
682
|
+
if (!props.disabled) {
|
|
683
|
+
emit("click");
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
const isVertical = inject(IS_VERTICAL_KEY, void 0);
|
|
687
|
+
const snapEdge = inject(SNAP_EDGE_KEY, void 0);
|
|
688
|
+
const tooltipFlipDown = inject(TOOLTIP_FLIP_DOWN_KEY, void 0);
|
|
689
|
+
const tooltipSide = computed(() => {
|
|
690
|
+
if (isVertical == null ? void 0 : isVertical.value) {
|
|
691
|
+
return (snapEdge == null ? void 0 : snapEdge.value) === "right" ? "left" : "right";
|
|
692
|
+
}
|
|
693
|
+
return (tooltipFlipDown == null ? void 0 : tooltipFlipDown.value) ? "top-flip" : "top";
|
|
694
|
+
});
|
|
695
|
+
return (_ctx, _cache) => {
|
|
696
|
+
return openBlock(), createElementBlock("button", {
|
|
697
|
+
class: normalizeClass(["app-btn", [
|
|
698
|
+
`app-btn--tooltip-${tooltipSide.value}`,
|
|
699
|
+
{
|
|
700
|
+
"app-btn--vertical": unref(isVertical),
|
|
701
|
+
active: __props.active,
|
|
702
|
+
danger: __props.variant === "danger",
|
|
703
|
+
"app-btn-disabled": __props.disabled
|
|
704
|
+
}
|
|
705
|
+
]]),
|
|
706
|
+
"data-tip": __props.tooltip,
|
|
707
|
+
"aria-label": __props.ariaLabel,
|
|
708
|
+
"aria-disabled": __props.disabled || void 0,
|
|
709
|
+
onClick: handleClick
|
|
710
|
+
}, [
|
|
711
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
712
|
+
], 10, _hoisted_1$1);
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
const AppButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-2d853b64"]]);
|
|
717
|
+
const _hoisted_1 = ["aria-label", "aria-disabled", "data-testid"];
|
|
718
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
719
|
+
__name: "AppButtonDropdown",
|
|
720
|
+
props: {
|
|
721
|
+
popoverId: {},
|
|
722
|
+
popoverPlacement: { default: "auto" },
|
|
723
|
+
active: { type: Boolean, default: false },
|
|
724
|
+
disabled: { type: Boolean, default: false },
|
|
725
|
+
variant: { default: "default" },
|
|
726
|
+
mainTooltip: { default: void 0 },
|
|
727
|
+
mainAriaLabel: { default: void 0 },
|
|
728
|
+
caretAriaLabel: { default: void 0 },
|
|
729
|
+
mainTestid: { default: void 0 },
|
|
730
|
+
caretTestid: { default: void 0 }
|
|
731
|
+
},
|
|
732
|
+
emits: ["mainClick", "caretClick"],
|
|
733
|
+
setup(__props, { emit: __emit }) {
|
|
734
|
+
const props = __props;
|
|
735
|
+
const emit = __emit;
|
|
736
|
+
const isVertical = inject(IS_VERTICAL_KEY, void 0);
|
|
737
|
+
const snapEdge = inject(SNAP_EDGE_KEY, void 0);
|
|
738
|
+
function caretRotation(open) {
|
|
739
|
+
if (!open) return "down";
|
|
740
|
+
if (!(isVertical == null ? void 0 : isVertical.value)) return "up";
|
|
741
|
+
return (snapEdge == null ? void 0 : snapEdge.value) === "right" ? "left" : "right";
|
|
742
|
+
}
|
|
743
|
+
function onMainClick() {
|
|
744
|
+
if (!props.disabled) emit("mainClick");
|
|
745
|
+
}
|
|
746
|
+
function onCaretClick() {
|
|
747
|
+
if (!props.disabled) emit("caretClick");
|
|
748
|
+
}
|
|
749
|
+
return (_ctx, _cache) => {
|
|
750
|
+
return openBlock(), createElementBlock("div", {
|
|
751
|
+
class: normalizeClass(["app-btn-dropdown-wrap", { "app-btn-dropdown-wrap--vertical": unref(isVertical) }])
|
|
752
|
+
}, [
|
|
753
|
+
createVNode(AppButton, {
|
|
754
|
+
variant: __props.variant,
|
|
755
|
+
active: __props.active,
|
|
756
|
+
disabled: __props.disabled,
|
|
757
|
+
tooltip: __props.mainTooltip,
|
|
758
|
+
"aria-label": __props.mainAriaLabel,
|
|
759
|
+
"data-testid": __props.mainTestid,
|
|
760
|
+
onClick: onMainClick
|
|
761
|
+
}, {
|
|
762
|
+
default: withCtx(() => [
|
|
763
|
+
renderSlot(_ctx.$slots, "main-content")
|
|
764
|
+
]),
|
|
765
|
+
_: 3
|
|
766
|
+
}, 8, ["variant", "active", "disabled", "tooltip", "aria-label", "data-testid"]),
|
|
767
|
+
createVNode(_sfc_main$9, {
|
|
768
|
+
"popover-id": __props.popoverId,
|
|
769
|
+
placement: __props.popoverPlacement
|
|
770
|
+
}, {
|
|
771
|
+
trigger: withCtx(({ active: open }) => [
|
|
772
|
+
createElementVNode("button", {
|
|
773
|
+
type: "button",
|
|
774
|
+
class: normalizeClass(["app-btn-dropdown-caret", {
|
|
775
|
+
active: open,
|
|
776
|
+
"app-btn-dropdown-caret--vertical": unref(isVertical),
|
|
777
|
+
"app-btn-dropdown-caret--disabled": __props.disabled
|
|
778
|
+
}]),
|
|
779
|
+
"aria-label": __props.caretAriaLabel,
|
|
780
|
+
"aria-disabled": __props.disabled || void 0,
|
|
781
|
+
"data-testid": __props.caretTestid,
|
|
782
|
+
onClick: onCaretClick
|
|
783
|
+
}, [
|
|
784
|
+
(openBlock(), createElementBlock("svg", {
|
|
785
|
+
class: normalizeClass(["app-btn-dropdown-caret-icon", `app-btn-dropdown-caret-icon--${caretRotation(open)}`]),
|
|
786
|
+
width: "10",
|
|
787
|
+
height: "10",
|
|
788
|
+
viewBox: "0 0 24 24",
|
|
789
|
+
fill: "none",
|
|
790
|
+
stroke: "currentColor",
|
|
791
|
+
"stroke-width": "2.5"
|
|
792
|
+
}, [..._cache[0] || (_cache[0] = [
|
|
793
|
+
createElementVNode("path", { d: "m6 9 6 6 6-6" }, null, -1)
|
|
794
|
+
])], 2))
|
|
795
|
+
], 10, _hoisted_1)
|
|
796
|
+
]),
|
|
797
|
+
content: withCtx(() => [
|
|
798
|
+
renderSlot(_ctx.$slots, "popover-content")
|
|
799
|
+
]),
|
|
800
|
+
_: 3
|
|
801
|
+
}, 8, ["popover-id", "placement"])
|
|
802
|
+
], 2);
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
export {
|
|
807
|
+
AppBanner,
|
|
808
|
+
AppButton,
|
|
809
|
+
_sfc_main as AppButtonDropdown,
|
|
810
|
+
_ as AppDialog,
|
|
811
|
+
_sfc_main$9 as AppPopover,
|
|
812
|
+
AppSegmented,
|
|
813
|
+
_sfc_main$5 as AppSelect,
|
|
814
|
+
AppSlider,
|
|
815
|
+
AppTabs,
|
|
816
|
+
AppToggle,
|
|
817
|
+
_sfc_main$4 as AppTooltip,
|
|
818
|
+
ComboboxAnchor,
|
|
819
|
+
ComboboxArrow,
|
|
820
|
+
ComboboxCancel,
|
|
821
|
+
ComboboxContent,
|
|
822
|
+
ComboboxEmpty,
|
|
823
|
+
ComboboxGroup,
|
|
824
|
+
ComboboxInput,
|
|
825
|
+
ComboboxItem,
|
|
826
|
+
ComboboxItemIndicator,
|
|
827
|
+
ComboboxLabel,
|
|
828
|
+
ComboboxPortal,
|
|
829
|
+
ComboboxRoot,
|
|
830
|
+
ComboboxSeparator,
|
|
831
|
+
ComboboxTrigger,
|
|
832
|
+
ComboboxViewport,
|
|
833
|
+
DialogClose,
|
|
834
|
+
DialogContent,
|
|
835
|
+
DialogDescription,
|
|
836
|
+
DialogOverlay,
|
|
837
|
+
DialogPortal,
|
|
838
|
+
DialogRoot,
|
|
839
|
+
DialogTitle,
|
|
840
|
+
DialogTrigger,
|
|
841
|
+
NumberFieldDecrement,
|
|
842
|
+
NumberFieldIncrement,
|
|
843
|
+
NumberFieldInput,
|
|
844
|
+
NumberFieldRoot,
|
|
845
|
+
PopoverAnchor,
|
|
846
|
+
PopoverArrow2 as PopoverArrow,
|
|
847
|
+
PopoverClose,
|
|
848
|
+
PopoverContent2 as PopoverContent,
|
|
849
|
+
PopoverPortal2 as PopoverPortal,
|
|
850
|
+
PopoverRoot2 as PopoverRoot,
|
|
851
|
+
PopoverTrigger2 as PopoverTrigger,
|
|
852
|
+
RadioGroupIndicator,
|
|
853
|
+
RadioGroupItem2 as RadioGroupItem,
|
|
854
|
+
RadioGroupRoot2 as RadioGroupRoot,
|
|
855
|
+
SelectArrow,
|
|
856
|
+
SelectContent2 as SelectContent,
|
|
857
|
+
SelectGroup,
|
|
858
|
+
SelectIcon2 as SelectIcon,
|
|
859
|
+
SelectItem2 as SelectItem,
|
|
860
|
+
SelectItemIndicator2 as SelectItemIndicator,
|
|
861
|
+
SelectItemText2 as SelectItemText,
|
|
862
|
+
SelectLabel,
|
|
863
|
+
SelectPortal2 as SelectPortal,
|
|
864
|
+
SelectRoot2 as SelectRoot,
|
|
865
|
+
SelectScrollDownButton,
|
|
866
|
+
SelectScrollUpButton,
|
|
867
|
+
SelectSeparator,
|
|
868
|
+
SelectTrigger2 as SelectTrigger,
|
|
869
|
+
SelectValue2 as SelectValue,
|
|
870
|
+
SelectViewport2 as SelectViewport,
|
|
871
|
+
SliderRange2 as SliderRange,
|
|
872
|
+
SliderRoot2 as SliderRoot,
|
|
873
|
+
SliderThumb2 as SliderThumb,
|
|
874
|
+
SliderTrack2 as SliderTrack,
|
|
875
|
+
SwitchRoot2 as SwitchRoot,
|
|
876
|
+
SwitchThumb2 as SwitchThumb,
|
|
877
|
+
TabsContent2 as TabsContent,
|
|
878
|
+
TabsList2 as TabsList,
|
|
879
|
+
TabsRoot2 as TabsRoot,
|
|
880
|
+
TabsTrigger2 as TabsTrigger,
|
|
881
|
+
TagsInputClear,
|
|
882
|
+
TagsInputInput,
|
|
883
|
+
TagsInputItem,
|
|
884
|
+
TagsInputItemDelete,
|
|
885
|
+
TagsInputItemText,
|
|
886
|
+
TagsInputRoot,
|
|
887
|
+
TooltipArrow2 as TooltipArrow,
|
|
888
|
+
TooltipContent2 as TooltipContent,
|
|
889
|
+
TooltipPortal2 as TooltipPortal,
|
|
890
|
+
TooltipProvider2 as TooltipProvider,
|
|
891
|
+
TooltipRoot2 as TooltipRoot,
|
|
892
|
+
TooltipTrigger2 as TooltipTrigger,
|
|
893
|
+
a as _activeRequest,
|
|
894
|
+
b as _resolveActive,
|
|
895
|
+
u as useDialog,
|
|
896
|
+
useDialogPluginComponent
|
|
897
|
+
};
|
|
898
|
+
//# sourceMappingURL=index.js.map
|