@openpen/module-api 1.2.0 → 1.4.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 +22 -0
- package/README.md +7 -1
- package/dist/_chunks/{AppButtonDropdown.vue_vue_type_style_index_0_lang-DBVFUpxc.js → AppButtonDropdown.vue_vue_type_style_index_0_lang-B9dHU-LE.js} +3 -2
- package/dist/_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-B9dHU-LE.js.map +1 -0
- package/dist/host/index.d.ts +1 -1
- package/dist/host/index.js +2 -0
- package/dist/host/index.js.map +1 -1
- package/dist/host/stroke-store.d.ts +1 -0
- package/dist/host/tools.d.ts +9 -0
- package/dist/host/types.d.ts +19 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/types/contributions.d.ts +7 -5
- package/dist/types/control-bar-layout.d.ts +19 -148
- package/dist/types/module.d.ts +7 -1
- package/dist/types/tool.d.ts +14 -3
- package/dist/uikit/components/AppButtonDropdown.vue.d.ts +1 -1
- package/dist/uikit/components/AppPopoverPanel.vue.d.ts +28 -0
- package/dist/uikit/components/AppPopoverRow.vue.d.ts +26 -0
- package/dist/uikit/components/AppSegmented.vue.d.ts +6 -1
- package/dist/uikit/components/AppSelect.vue.d.ts +7 -0
- package/dist/uikit/components/AppSlider.vue.d.ts +14 -0
- package/dist/uikit/components/AppSwatchPicker.vue.d.ts +37 -0
- package/dist/uikit/components/AppToggle.vue.d.ts +2 -0
- package/dist/uikit/components/AppToggleButton.vue.d.ts +28 -0
- package/dist/uikit/index.d.ts +9 -3
- package/dist/uikit/index.js +346 -109
- package/dist/uikit/index.js.map +1 -1
- package/dist/uikit/internal.js +1 -1
- package/dist/uikit/module-api.css +287 -86
- package/dist/uikit/primitives.d.ts +4 -2
- package/dist/uikit/tokens.css +7 -6
- package/dist/use-module-context.d.ts +1 -2
- package/package.json +4 -4
- package/dist/_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-DBVFUpxc.js.map +0 -1
package/dist/uikit/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent, onMounted, inject, computed, watch, useTemplateRef, ref, openBlock, createBlock, unref, withCtx, createVNode, renderSlot,
|
|
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,
|
|
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";
|
|
1
|
+
import { defineComponent, onMounted, inject, computed, watch, useTemplateRef, ref, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, createElementBlock, toDisplayString, createCommentVNode, normalizeClass, onBeforeUnmount, normalizeStyle, createTextVNode, Fragment, renderList, createElementVNode } from "vue";
|
|
2
|
+
import { PopoverRoot, PopoverTrigger, PopoverPortal, PopoverContent, PopoverArrow, SliderRoot, SliderTrack, SliderRange, SliderThumb, SwitchRoot, SwitchThumb, TooltipProvider, TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, RadioGroupRoot, RadioGroupItem, Toggle, SelectRoot, SelectTrigger, SelectValue, SelectIcon, SelectPortal, SelectContent, SelectViewport, SelectItem, SelectItemIndicator, SelectItemText, 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, Toggle as Toggle2, TooltipArrow as TooltipArrow2, TooltipContent as TooltipContent2, TooltipPortal as TooltipPortal2, TooltipProvider as TooltipProvider2, TooltipRoot as TooltipRoot2, TooltipTrigger as TooltipTrigger2 } from "reka-ui";
|
|
4
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
5
|
import "dompurify";
|
|
6
6
|
import "zod";
|
|
7
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-
|
|
9
|
-
import { _, a, b, u } from "../_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-
|
|
10
|
-
const _sfc_main$
|
|
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$d = /* @__PURE__ */ defineComponent({
|
|
11
11
|
__name: "AppPopover",
|
|
12
12
|
props: {
|
|
13
13
|
popoverId: {},
|
|
@@ -97,7 +97,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
97
97
|
side: rekaSide.value,
|
|
98
98
|
"avoid-collisions": true,
|
|
99
99
|
"side-offset": props.gap,
|
|
100
|
-
class: "openpen-popover-content openpen-interactive"
|
|
100
|
+
class: "openpen-popover-content openpen-interactive",
|
|
101
|
+
"data-testid": "controlbar-popover"
|
|
101
102
|
}, {
|
|
102
103
|
default: withCtx(() => [
|
|
103
104
|
renderSlot(_ctx.$slots, "content"),
|
|
@@ -118,7 +119,66 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
118
119
|
};
|
|
119
120
|
}
|
|
120
121
|
});
|
|
121
|
-
const
|
|
122
|
+
const _hoisted_1$7 = {
|
|
123
|
+
class: "openpen-popover-panel",
|
|
124
|
+
"data-testid": "app-popover-panel"
|
|
125
|
+
};
|
|
126
|
+
const _hoisted_2$2 = {
|
|
127
|
+
key: 0,
|
|
128
|
+
class: "openpen-popover-title",
|
|
129
|
+
"data-testid": "app-popover-panel-title"
|
|
130
|
+
};
|
|
131
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
132
|
+
__name: "AppPopoverPanel",
|
|
133
|
+
props: {
|
|
134
|
+
title: {}
|
|
135
|
+
},
|
|
136
|
+
setup(__props) {
|
|
137
|
+
return (_ctx, _cache) => {
|
|
138
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
139
|
+
__props.title ? (openBlock(), createElementBlock("div", _hoisted_2$2, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
140
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
141
|
+
]);
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
const _export_sfc = (sfc, props) => {
|
|
146
|
+
const target = sfc.__vccOpts || sfc;
|
|
147
|
+
for (const [key, val] of props) {
|
|
148
|
+
target[key] = val;
|
|
149
|
+
}
|
|
150
|
+
return target;
|
|
151
|
+
};
|
|
152
|
+
const AppPopoverPanel = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-ffa56c48"]]);
|
|
153
|
+
const _hoisted_1$6 = {
|
|
154
|
+
key: 0,
|
|
155
|
+
class: "openpen-popover-row-label"
|
|
156
|
+
};
|
|
157
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
158
|
+
__name: "AppPopoverRow",
|
|
159
|
+
props: {
|
|
160
|
+
label: {}
|
|
161
|
+
},
|
|
162
|
+
setup(__props) {
|
|
163
|
+
return (_ctx, _cache) => {
|
|
164
|
+
return openBlock(), createElementBlock("div", {
|
|
165
|
+
class: normalizeClass(["openpen-popover-row", { "openpen-popover-row--bare": !__props.label }]),
|
|
166
|
+
"data-testid": "app-popover-row"
|
|
167
|
+
}, [
|
|
168
|
+
__props.label ? (openBlock(), createElementBlock("span", _hoisted_1$6, toDisplayString(__props.label), 1)) : createCommentVNode("", true),
|
|
169
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
170
|
+
], 2);
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
const AppPopoverRow = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-6d95e79e"]]);
|
|
175
|
+
const _hoisted_1$5 = {
|
|
176
|
+
key: 0,
|
|
177
|
+
class: "app-slider-bubble",
|
|
178
|
+
"data-testid": "app-slider-bubble",
|
|
179
|
+
"aria-hidden": "true"
|
|
180
|
+
};
|
|
181
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
122
182
|
__name: "AppSlider",
|
|
123
183
|
props: {
|
|
124
184
|
modelValue: {},
|
|
@@ -126,19 +186,36 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
126
186
|
max: { default: 100 },
|
|
127
187
|
step: { default: 1 },
|
|
128
188
|
width: { default: "100%" },
|
|
189
|
+
ariaLabel: { default: void 0 },
|
|
129
190
|
orientation: { default: "horizontal" },
|
|
130
191
|
trackHeight: { default: "4px" },
|
|
131
192
|
trackRadius: { default: "2px" },
|
|
132
193
|
thumbWidth: { default: "14px" },
|
|
133
194
|
thumbHeight: { default: "14px" },
|
|
134
195
|
thumbRadius: { default: "50%" },
|
|
135
|
-
inverted: { type: Boolean, default: false }
|
|
196
|
+
inverted: { type: Boolean, default: false },
|
|
197
|
+
valueLabel: { default: void 0 }
|
|
136
198
|
},
|
|
137
199
|
emits: ["update:modelValue"],
|
|
138
200
|
setup(__props, { emit: __emit }) {
|
|
139
201
|
const props = __props;
|
|
140
202
|
const emit = __emit;
|
|
141
203
|
const isVertical = computed(() => props.orientation === "vertical");
|
|
204
|
+
const dragging = ref(false);
|
|
205
|
+
const showBubble = computed(
|
|
206
|
+
() => dragging.value && !!props.valueLabel && !isVertical.value
|
|
207
|
+
);
|
|
208
|
+
function endDrag() {
|
|
209
|
+
dragging.value = false;
|
|
210
|
+
document.removeEventListener("pointerup", endDrag);
|
|
211
|
+
document.removeEventListener("pointercancel", endDrag);
|
|
212
|
+
}
|
|
213
|
+
function onPointerDown() {
|
|
214
|
+
dragging.value = true;
|
|
215
|
+
document.addEventListener("pointerup", endDrag);
|
|
216
|
+
document.addEventListener("pointercancel", endDrag);
|
|
217
|
+
}
|
|
218
|
+
onBeforeUnmount(endDrag);
|
|
142
219
|
const rootStyle = computed(() => {
|
|
143
220
|
if (isVertical.value) {
|
|
144
221
|
return {
|
|
@@ -168,6 +245,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
168
245
|
return (_ctx, _cache) => {
|
|
169
246
|
return openBlock(), createBlock(unref(SliderRoot), {
|
|
170
247
|
class: normalizeClass(["app-slider-root", { "app-slider-root--vertical": isVertical.value, "app-slider-root--inverted": __props.inverted }]),
|
|
248
|
+
"data-testid": "app-slider-root",
|
|
171
249
|
style: normalizeStyle(rootStyle.value),
|
|
172
250
|
"model-value": [__props.modelValue],
|
|
173
251
|
min: __props.min,
|
|
@@ -175,35 +253,46 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
175
253
|
step: __props.step,
|
|
176
254
|
orientation: __props.orientation,
|
|
177
255
|
inverted: __props.inverted,
|
|
178
|
-
"onUpdate:modelValue": onValueChange
|
|
256
|
+
"onUpdate:modelValue": onValueChange,
|
|
257
|
+
onPointerdown: onPointerDown
|
|
179
258
|
}, {
|
|
180
259
|
default: withCtx(() => [
|
|
181
|
-
createVNode(unref(SliderTrack), {
|
|
260
|
+
createVNode(unref(SliderTrack), {
|
|
261
|
+
class: "app-slider-track",
|
|
262
|
+
"data-testid": "app-slider-track"
|
|
263
|
+
}, {
|
|
182
264
|
default: withCtx(() => [
|
|
183
|
-
createVNode(unref(SliderRange), {
|
|
265
|
+
createVNode(unref(SliderRange), {
|
|
266
|
+
class: "app-slider-range",
|
|
267
|
+
"data-testid": "app-slider-range"
|
|
268
|
+
})
|
|
184
269
|
]),
|
|
185
270
|
_: 1
|
|
186
271
|
}),
|
|
187
|
-
createVNode(unref(SliderThumb), {
|
|
272
|
+
createVNode(unref(SliderThumb), {
|
|
273
|
+
class: "app-slider-thumb",
|
|
274
|
+
"data-testid": "app-slider-thumb",
|
|
275
|
+
"aria-label": __props.ariaLabel,
|
|
276
|
+
"aria-valuetext": __props.valueLabel
|
|
277
|
+
}, {
|
|
278
|
+
default: withCtx(() => [
|
|
279
|
+
showBubble.value ? (openBlock(), createElementBlock("span", _hoisted_1$5, toDisplayString(__props.valueLabel), 1)) : createCommentVNode("", true)
|
|
280
|
+
]),
|
|
281
|
+
_: 1
|
|
282
|
+
}, 8, ["aria-label", "aria-valuetext"])
|
|
188
283
|
]),
|
|
189
284
|
_: 1
|
|
190
285
|
}, 8, ["class", "style", "model-value", "min", "max", "step", "orientation", "inverted"]);
|
|
191
286
|
};
|
|
192
287
|
}
|
|
193
288
|
});
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
for (const [key, val] of props) {
|
|
197
|
-
target[key] = val;
|
|
198
|
-
}
|
|
199
|
-
return target;
|
|
200
|
-
};
|
|
201
|
-
const AppSlider = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-946ec6af"]]);
|
|
202
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
289
|
+
const AppSlider = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-49f1dd0d"]]);
|
|
290
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
203
291
|
__name: "AppToggle",
|
|
204
292
|
props: {
|
|
205
293
|
modelValue: { type: Boolean },
|
|
206
|
-
ariaLabel: { default: "" }
|
|
294
|
+
ariaLabel: { default: "" },
|
|
295
|
+
testid: { default: void 0 }
|
|
207
296
|
},
|
|
208
297
|
emits: ["update:modelValue"],
|
|
209
298
|
setup(__props, { emit: __emit }) {
|
|
@@ -216,26 +305,83 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
216
305
|
class: normalizeClass(["app-toggle", { on: __props.modelValue }]),
|
|
217
306
|
"model-value": __props.modelValue,
|
|
218
307
|
"aria-label": __props.ariaLabel,
|
|
219
|
-
"
|
|
308
|
+
"data-testid": __props.testid,
|
|
220
309
|
"onUpdate:modelValue": onCheckedChange
|
|
221
310
|
}, {
|
|
222
311
|
default: withCtx(() => [
|
|
223
312
|
createVNode(unref(SwitchThumb), { class: "app-toggle-thumb" })
|
|
224
313
|
]),
|
|
225
314
|
_: 1
|
|
226
|
-
}, 8, ["class", "model-value", "aria-label", "
|
|
315
|
+
}, 8, ["class", "model-value", "aria-label", "data-testid"]);
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
const AppToggle = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-a8ed9b2b"]]);
|
|
320
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
321
|
+
__name: "AppTooltip",
|
|
322
|
+
props: {
|
|
323
|
+
content: {},
|
|
324
|
+
side: { default: "top" },
|
|
325
|
+
delay: { default: 200 }
|
|
326
|
+
},
|
|
327
|
+
setup(__props) {
|
|
328
|
+
const props = __props;
|
|
329
|
+
return (_ctx, _cache) => {
|
|
330
|
+
return openBlock(), createBlock(unref(TooltipProvider), {
|
|
331
|
+
"delay-duration": props.delay
|
|
332
|
+
}, {
|
|
333
|
+
default: withCtx(() => [
|
|
334
|
+
createVNode(unref(TooltipRoot), null, {
|
|
335
|
+
default: withCtx(() => [
|
|
336
|
+
createVNode(unref(TooltipTrigger), { "as-child": "" }, {
|
|
337
|
+
default: withCtx(() => [
|
|
338
|
+
renderSlot(_ctx.$slots, "default")
|
|
339
|
+
]),
|
|
340
|
+
_: 3
|
|
341
|
+
}),
|
|
342
|
+
createVNode(unref(TooltipPortal), null, {
|
|
343
|
+
default: withCtx(() => [
|
|
344
|
+
createVNode(unref(TooltipContent), {
|
|
345
|
+
side: props.side,
|
|
346
|
+
"side-offset": 6,
|
|
347
|
+
"avoid-collisions": true,
|
|
348
|
+
"collision-padding": 8,
|
|
349
|
+
class: "openpen-tooltip-content"
|
|
350
|
+
}, {
|
|
351
|
+
default: withCtx(() => [
|
|
352
|
+
createTextVNode(toDisplayString(props.content) + " ", 1),
|
|
353
|
+
createVNode(unref(TooltipArrow), {
|
|
354
|
+
class: "openpen-tooltip-arrow",
|
|
355
|
+
width: 10,
|
|
356
|
+
height: 5
|
|
357
|
+
})
|
|
358
|
+
]),
|
|
359
|
+
_: 1
|
|
360
|
+
}, 8, ["side"])
|
|
361
|
+
]),
|
|
362
|
+
_: 1
|
|
363
|
+
})
|
|
364
|
+
]),
|
|
365
|
+
_: 3
|
|
366
|
+
})
|
|
367
|
+
]),
|
|
368
|
+
_: 3
|
|
369
|
+
}, 8, ["delay-duration"]);
|
|
227
370
|
};
|
|
228
371
|
}
|
|
229
372
|
});
|
|
230
|
-
const
|
|
231
|
-
const _hoisted_1$3 = ["data-testid"];
|
|
373
|
+
const _hoisted_1$4 = ["aria-label", "data-testid"];
|
|
232
374
|
const _hoisted_2$1 = ["innerHTML"];
|
|
233
|
-
const
|
|
375
|
+
const _hoisted_3$1 = { key: 1 };
|
|
376
|
+
const _hoisted_4$1 = ["data-testid"];
|
|
377
|
+
const _hoisted_5$1 = ["innerHTML"];
|
|
378
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
234
379
|
__name: "AppSegmented",
|
|
235
380
|
props: {
|
|
236
381
|
modelValue: {},
|
|
237
382
|
options: {},
|
|
238
|
-
disabled: { type: Boolean }
|
|
383
|
+
disabled: { type: Boolean },
|
|
384
|
+
ariaLabel: {}
|
|
239
385
|
},
|
|
240
386
|
emits: ["update:modelValue"],
|
|
241
387
|
setup(__props, { emit: __emit }) {
|
|
@@ -245,45 +391,174 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
245
391
|
emit("update:modelValue", val);
|
|
246
392
|
}
|
|
247
393
|
}
|
|
394
|
+
const tipOf = (o) => o.tooltip ?? (o.iconOnly ? o.label : void 0);
|
|
248
395
|
return (_ctx, _cache) => {
|
|
249
396
|
return openBlock(), createBlock(unref(RadioGroupRoot), {
|
|
250
397
|
class: normalizeClass(["app-seg", { "app-seg--disabled": __props.disabled }]),
|
|
398
|
+
"data-testid": "app-seg",
|
|
251
399
|
"model-value": __props.modelValue,
|
|
252
400
|
disabled: __props.disabled,
|
|
401
|
+
"aria-label": __props.ariaLabel,
|
|
253
402
|
orientation: "horizontal",
|
|
254
403
|
"onUpdate:modelValue": onValueChange
|
|
255
404
|
}, {
|
|
256
405
|
default: withCtx(() => [
|
|
257
406
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (opt) => {
|
|
407
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
408
|
+
key: opt.value
|
|
409
|
+
}, [
|
|
410
|
+
tipOf(opt) ? (openBlock(), createBlock(_sfc_main$8, {
|
|
411
|
+
key: 0,
|
|
412
|
+
content: tipOf(opt)
|
|
413
|
+
}, {
|
|
414
|
+
default: withCtx(() => [
|
|
415
|
+
createVNode(unref(RadioGroupItem), {
|
|
416
|
+
value: opt.value,
|
|
417
|
+
"as-child": ""
|
|
418
|
+
}, {
|
|
419
|
+
default: withCtx(() => [
|
|
420
|
+
createElementVNode("button", {
|
|
421
|
+
class: normalizeClass(["app-seg-btn", { active: __props.modelValue === opt.value, "app-seg-btn--icon": opt.iconOnly }]),
|
|
422
|
+
"aria-label": opt.iconOnly ? opt.label : void 0,
|
|
423
|
+
"data-testid": opt.testid
|
|
424
|
+
}, [
|
|
425
|
+
opt.icon ? (openBlock(), createElementBlock("span", {
|
|
426
|
+
key: 0,
|
|
427
|
+
class: "app-seg-icon",
|
|
428
|
+
"aria-hidden": "true",
|
|
429
|
+
innerHTML: opt.icon
|
|
430
|
+
}, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
|
|
431
|
+
!opt.iconOnly ? (openBlock(), createElementBlock("span", _hoisted_3$1, toDisplayString(opt.label), 1)) : createCommentVNode("", true)
|
|
432
|
+
], 10, _hoisted_1$4)
|
|
433
|
+
]),
|
|
434
|
+
_: 2
|
|
435
|
+
}, 1032, ["value"])
|
|
436
|
+
]),
|
|
437
|
+
_: 2
|
|
438
|
+
}, 1032, ["content"])) : (openBlock(), createBlock(unref(RadioGroupItem), {
|
|
439
|
+
key: 1,
|
|
440
|
+
value: opt.value,
|
|
441
|
+
"as-child": ""
|
|
442
|
+
}, {
|
|
443
|
+
default: withCtx(() => [
|
|
444
|
+
createElementVNode("button", {
|
|
445
|
+
class: normalizeClass(["app-seg-btn", { active: __props.modelValue === opt.value }]),
|
|
446
|
+
"data-testid": opt.testid
|
|
447
|
+
}, [
|
|
448
|
+
opt.icon ? (openBlock(), createElementBlock("span", {
|
|
449
|
+
key: 0,
|
|
450
|
+
class: "app-seg-icon",
|
|
451
|
+
"aria-hidden": "true",
|
|
452
|
+
innerHTML: opt.icon
|
|
453
|
+
}, null, 8, _hoisted_5$1)) : createCommentVNode("", true),
|
|
454
|
+
createElementVNode("span", null, toDisplayString(opt.label), 1)
|
|
455
|
+
], 10, _hoisted_4$1)
|
|
456
|
+
]),
|
|
457
|
+
_: 2
|
|
458
|
+
}, 1032, ["value"]))
|
|
459
|
+
], 64);
|
|
460
|
+
}), 128))
|
|
461
|
+
]),
|
|
462
|
+
_: 1
|
|
463
|
+
}, 8, ["class", "model-value", "disabled", "aria-label"]);
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
const AppSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-a90b77a6"]]);
|
|
468
|
+
const _hoisted_1$3 = ["aria-label", "title", "data-testid"];
|
|
469
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
470
|
+
__name: "AppSwatchPicker",
|
|
471
|
+
props: {
|
|
472
|
+
modelValue: {},
|
|
473
|
+
colors: {},
|
|
474
|
+
ariaLabel: {},
|
|
475
|
+
shape: { default: "circular" },
|
|
476
|
+
size: { default: "medium" },
|
|
477
|
+
spacing: { default: "medium" },
|
|
478
|
+
background: { type: Function, default: void 0 },
|
|
479
|
+
disabled: { type: Boolean, default: false },
|
|
480
|
+
testid: { default: "app-swatch-picker" }
|
|
481
|
+
},
|
|
482
|
+
emits: ["update:modelValue"],
|
|
483
|
+
setup(__props, { emit: __emit }) {
|
|
484
|
+
const props = __props;
|
|
485
|
+
const emit = __emit;
|
|
486
|
+
const isSelected = (value) => value.toLowerCase() === props.modelValue.toLowerCase();
|
|
487
|
+
const selectedValue = () => {
|
|
488
|
+
var _a;
|
|
489
|
+
return ((_a = props.colors.find((c) => isSelected(c.value))) == null ? void 0 : _a.value) ?? "";
|
|
490
|
+
};
|
|
491
|
+
function onValueChange(val) {
|
|
492
|
+
if (typeof val === "string") emit("update:modelValue", val);
|
|
493
|
+
}
|
|
494
|
+
return (_ctx, _cache) => {
|
|
495
|
+
return openBlock(), createBlock(unref(RadioGroupRoot), {
|
|
496
|
+
class: normalizeClass(["app-swatch-picker", [`app-swatch-picker--${__props.shape}`, `app-swatch-picker--${__props.size}`, `app-swatch-picker--spacing-${__props.spacing}`]]),
|
|
497
|
+
"data-testid": __props.testid,
|
|
498
|
+
"model-value": selectedValue(),
|
|
499
|
+
"aria-label": __props.ariaLabel,
|
|
500
|
+
disabled: __props.disabled,
|
|
501
|
+
"onUpdate:modelValue": onValueChange
|
|
502
|
+
}, {
|
|
503
|
+
default: withCtx(() => [
|
|
504
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.colors, (c) => {
|
|
258
505
|
return openBlock(), createBlock(unref(RadioGroupItem), {
|
|
259
|
-
key:
|
|
260
|
-
value:
|
|
506
|
+
key: c.value,
|
|
507
|
+
value: c.value,
|
|
261
508
|
"as-child": ""
|
|
262
509
|
}, {
|
|
263
510
|
default: withCtx(() => [
|
|
264
511
|
createElementVNode("button", {
|
|
265
|
-
|
|
266
|
-
"
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
innerHTML: opt.icon
|
|
273
|
-
}, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
|
|
274
|
-
createElementVNode("span", null, toDisplayString(opt.label), 1)
|
|
275
|
-
], 10, _hoisted_1$3)
|
|
512
|
+
type: "button",
|
|
513
|
+
class: normalizeClass(["app-swatch", { selected: isSelected(c.value) }]),
|
|
514
|
+
style: normalizeStyle({ background: __props.background ? __props.background(c) : c.value }),
|
|
515
|
+
"aria-label": c.label,
|
|
516
|
+
title: c.label,
|
|
517
|
+
"data-testid": c.testid
|
|
518
|
+
}, null, 14, _hoisted_1$3)
|
|
276
519
|
]),
|
|
277
520
|
_: 2
|
|
278
521
|
}, 1032, ["value"]);
|
|
279
522
|
}), 128))
|
|
280
523
|
]),
|
|
281
524
|
_: 1
|
|
282
|
-
}, 8, ["class", "model-value", "disabled"]);
|
|
525
|
+
}, 8, ["class", "data-testid", "model-value", "aria-label", "disabled"]);
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
const AppSwatchPicker = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-c62ade43"]]);
|
|
530
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
531
|
+
__name: "AppToggleButton",
|
|
532
|
+
props: {
|
|
533
|
+
modelValue: { type: Boolean },
|
|
534
|
+
ariaLabel: {},
|
|
535
|
+
disabled: { type: Boolean, default: false },
|
|
536
|
+
testid: { default: void 0 }
|
|
537
|
+
},
|
|
538
|
+
emits: ["update:modelValue"],
|
|
539
|
+
setup(__props, { emit: __emit }) {
|
|
540
|
+
const emit = __emit;
|
|
541
|
+
function onPressedChange(val) {
|
|
542
|
+
if (typeof val === "boolean") emit("update:modelValue", val);
|
|
543
|
+
}
|
|
544
|
+
return (_ctx, _cache) => {
|
|
545
|
+
return openBlock(), createBlock(unref(Toggle), {
|
|
546
|
+
class: normalizeClass(["app-toggle-btn", { pressed: __props.modelValue }]),
|
|
547
|
+
"model-value": __props.modelValue,
|
|
548
|
+
"aria-label": __props.ariaLabel,
|
|
549
|
+
disabled: __props.disabled,
|
|
550
|
+
"data-testid": __props.testid,
|
|
551
|
+
"onUpdate:modelValue": onPressedChange
|
|
552
|
+
}, {
|
|
553
|
+
default: withCtx(() => [
|
|
554
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
555
|
+
]),
|
|
556
|
+
_: 3
|
|
557
|
+
}, 8, ["class", "model-value", "aria-label", "disabled", "data-testid"]);
|
|
283
558
|
};
|
|
284
559
|
}
|
|
285
560
|
});
|
|
286
|
-
const
|
|
561
|
+
const AppToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-1d1a1150"]]);
|
|
287
562
|
function useDialogPluginComponent() {
|
|
288
563
|
const handle = inject(DIALOG_PLUGIN_HANDLE_KEY);
|
|
289
564
|
if (!handle) {
|
|
@@ -293,13 +568,14 @@ function useDialogPluginComponent() {
|
|
|
293
568
|
}
|
|
294
569
|
return handle;
|
|
295
570
|
}
|
|
296
|
-
const _sfc_main$
|
|
571
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
297
572
|
__name: "AppSelect",
|
|
298
573
|
props: {
|
|
299
574
|
modelValue: {},
|
|
300
575
|
options: {},
|
|
301
576
|
placeholder: {},
|
|
302
|
-
disabled: { type: Boolean, default: false }
|
|
577
|
+
disabled: { type: Boolean, default: false },
|
|
578
|
+
ariaLabel: { default: void 0 }
|
|
303
579
|
},
|
|
304
580
|
emits: ["update:modelValue"],
|
|
305
581
|
setup(__props, { emit: __emit }) {
|
|
@@ -314,7 +590,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
314
590
|
"onUpdate:modelValue": onValueChange
|
|
315
591
|
}, {
|
|
316
592
|
default: withCtx(() => [
|
|
317
|
-
createVNode(unref(SelectTrigger), {
|
|
593
|
+
createVNode(unref(SelectTrigger), {
|
|
594
|
+
class: "openpen-select-trigger",
|
|
595
|
+
"aria-label": __props.ariaLabel
|
|
596
|
+
}, {
|
|
318
597
|
default: withCtx(() => [
|
|
319
598
|
createVNode(unref(SelectValue), { placeholder: __props.placeholder }, null, 8, ["placeholder"]),
|
|
320
599
|
createVNode(unref(SelectIcon), {
|
|
@@ -341,7 +620,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
341
620
|
})
|
|
342
621
|
]),
|
|
343
622
|
_: 1
|
|
344
|
-
}),
|
|
623
|
+
}, 8, ["aria-label"]),
|
|
345
624
|
createVNode(unref(SelectPortal), null, {
|
|
346
625
|
default: withCtx(() => [
|
|
347
626
|
createVNode(unref(SelectContent), {
|
|
@@ -404,59 +683,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
404
683
|
};
|
|
405
684
|
}
|
|
406
685
|
});
|
|
407
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
408
|
-
__name: "AppTooltip",
|
|
409
|
-
props: {
|
|
410
|
-
content: {},
|
|
411
|
-
side: { default: "top" },
|
|
412
|
-
delay: { default: 200 }
|
|
413
|
-
},
|
|
414
|
-
setup(__props) {
|
|
415
|
-
const props = __props;
|
|
416
|
-
return (_ctx, _cache) => {
|
|
417
|
-
return openBlock(), createBlock(unref(TooltipProvider), {
|
|
418
|
-
"delay-duration": props.delay
|
|
419
|
-
}, {
|
|
420
|
-
default: withCtx(() => [
|
|
421
|
-
createVNode(unref(TooltipRoot), null, {
|
|
422
|
-
default: withCtx(() => [
|
|
423
|
-
createVNode(unref(TooltipTrigger), { "as-child": "" }, {
|
|
424
|
-
default: withCtx(() => [
|
|
425
|
-
renderSlot(_ctx.$slots, "default")
|
|
426
|
-
]),
|
|
427
|
-
_: 3
|
|
428
|
-
}),
|
|
429
|
-
createVNode(unref(TooltipPortal), null, {
|
|
430
|
-
default: withCtx(() => [
|
|
431
|
-
createVNode(unref(TooltipContent), {
|
|
432
|
-
side: props.side,
|
|
433
|
-
"side-offset": 6,
|
|
434
|
-
"avoid-collisions": true,
|
|
435
|
-
"collision-padding": 8,
|
|
436
|
-
class: "openpen-tooltip-content"
|
|
437
|
-
}, {
|
|
438
|
-
default: withCtx(() => [
|
|
439
|
-
createTextVNode(toDisplayString(props.content) + " ", 1),
|
|
440
|
-
createVNode(unref(TooltipArrow), {
|
|
441
|
-
class: "openpen-tooltip-arrow",
|
|
442
|
-
width: 10,
|
|
443
|
-
height: 5
|
|
444
|
-
})
|
|
445
|
-
]),
|
|
446
|
-
_: 1
|
|
447
|
-
}, 8, ["side"])
|
|
448
|
-
]),
|
|
449
|
-
_: 1
|
|
450
|
-
})
|
|
451
|
-
]),
|
|
452
|
-
_: 3
|
|
453
|
-
})
|
|
454
|
-
]),
|
|
455
|
-
_: 3
|
|
456
|
-
}, 8, ["delay-duration"]);
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
686
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
461
687
|
__name: "AppTabs",
|
|
462
688
|
props: {
|
|
@@ -566,10 +792,14 @@ const _hoisted_6 = {
|
|
|
566
792
|
"stroke-linecap": "round",
|
|
567
793
|
"stroke-linejoin": "round"
|
|
568
794
|
};
|
|
569
|
-
const _hoisted_7 = {
|
|
795
|
+
const _hoisted_7 = {
|
|
796
|
+
class: "app-banner-body",
|
|
797
|
+
"data-testid": "app-banner-body"
|
|
798
|
+
};
|
|
570
799
|
const _hoisted_8 = {
|
|
571
800
|
key: 0,
|
|
572
|
-
class: "app-banner-actions"
|
|
801
|
+
class: "app-banner-actions",
|
|
802
|
+
"data-testid": "app-banner-actions"
|
|
573
803
|
};
|
|
574
804
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
575
805
|
__name: "AppBanner",
|
|
@@ -649,7 +879,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
649
879
|
};
|
|
650
880
|
}
|
|
651
881
|
});
|
|
652
|
-
const AppBanner = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
882
|
+
const AppBanner = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-4f309880"]]);
|
|
653
883
|
const _hoisted_1$1 = ["data-tip", "aria-label", "aria-disabled"];
|
|
654
884
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
655
885
|
__name: "AppButton",
|
|
@@ -734,7 +964,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
734
964
|
}
|
|
735
965
|
return (_ctx, _cache) => {
|
|
736
966
|
return openBlock(), createElementBlock("div", {
|
|
737
|
-
class: normalizeClass(["app-btn-dropdown-wrap", { "app-btn-dropdown-wrap--vertical": unref(isVertical) }])
|
|
967
|
+
class: normalizeClass(["app-btn-dropdown-wrap", { "app-btn-dropdown-wrap--vertical": unref(isVertical) }]),
|
|
968
|
+
"data-testid": "app-button-dropdown-wrap"
|
|
738
969
|
}, [
|
|
739
970
|
createVNode(AppButton, {
|
|
740
971
|
variant: __props.variant,
|
|
@@ -750,7 +981,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
750
981
|
]),
|
|
751
982
|
_: 3
|
|
752
983
|
}, 8, ["variant", "active", "disabled", "tooltip", "aria-label", "data-testid"]),
|
|
753
|
-
createVNode(_sfc_main$
|
|
984
|
+
createVNode(_sfc_main$d, {
|
|
754
985
|
"popover-id": __props.popoverId,
|
|
755
986
|
placement: __props.popoverPlacement
|
|
756
987
|
}, {
|
|
@@ -769,6 +1000,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
769
1000
|
}, [
|
|
770
1001
|
(openBlock(), createElementBlock("svg", {
|
|
771
1002
|
class: normalizeClass(["app-btn-dropdown-caret-icon", `app-btn-dropdown-caret-icon--${caretRotation(open)}`]),
|
|
1003
|
+
"data-testid": "app-button-dropdown-caret-icon",
|
|
772
1004
|
width: "10",
|
|
773
1005
|
height: "10",
|
|
774
1006
|
viewBox: "0 0 24 24",
|
|
@@ -794,13 +1026,17 @@ export {
|
|
|
794
1026
|
AppButton,
|
|
795
1027
|
_sfc_main as AppButtonDropdown,
|
|
796
1028
|
_ as AppDialog,
|
|
797
|
-
_sfc_main$
|
|
1029
|
+
_sfc_main$d as AppPopover,
|
|
1030
|
+
AppPopoverPanel,
|
|
1031
|
+
AppPopoverRow,
|
|
798
1032
|
AppSegmented,
|
|
799
|
-
_sfc_main$
|
|
1033
|
+
_sfc_main$4 as AppSelect,
|
|
800
1034
|
AppSlider,
|
|
1035
|
+
AppSwatchPicker,
|
|
801
1036
|
AppTabs,
|
|
802
1037
|
AppToggle,
|
|
803
|
-
|
|
1038
|
+
AppToggleButton,
|
|
1039
|
+
_sfc_main$8 as AppTooltip,
|
|
804
1040
|
ComboboxAnchor,
|
|
805
1041
|
ComboboxArrow,
|
|
806
1042
|
ComboboxCancel,
|
|
@@ -870,6 +1106,7 @@ export {
|
|
|
870
1106
|
TagsInputItemDelete,
|
|
871
1107
|
TagsInputItemText,
|
|
872
1108
|
TagsInputRoot,
|
|
1109
|
+
Toggle2 as Toggle,
|
|
873
1110
|
TooltipArrow2 as TooltipArrow,
|
|
874
1111
|
TooltipContent2 as TooltipContent,
|
|
875
1112
|
TooltipPortal2 as TooltipPortal,
|