@openpen/module-api 1.3.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 +15 -0
- package/README.md +7 -1
- package/dist/host/tools.d.ts +9 -0
- package/dist/host/types.d.ts +7 -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/AppToggleButton.vue.d.ts +28 -0
- package/dist/uikit/index.d.ts +9 -3
- package/dist/uikit/index.js +327 -104
- package/dist/uikit/index.js.map +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/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
8
|
import { D as DIALOG_PLUGIN_HANDLE_KEY } from "../_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-B9dHU-LE.js";
|
|
9
9
|
import { _, a, b, u } from "../_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-B9dHU-LE.js";
|
|
10
|
-
const _sfc_main$
|
|
10
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
11
11
|
__name: "AppPopover",
|
|
12
12
|
props: {
|
|
13
13
|
popoverId: {},
|
|
@@ -119,7 +119,66 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
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({
|
|
123
182
|
__name: "AppSlider",
|
|
124
183
|
props: {
|
|
125
184
|
modelValue: {},
|
|
@@ -127,19 +186,36 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
127
186
|
max: { default: 100 },
|
|
128
187
|
step: { default: 1 },
|
|
129
188
|
width: { default: "100%" },
|
|
189
|
+
ariaLabel: { default: void 0 },
|
|
130
190
|
orientation: { default: "horizontal" },
|
|
131
191
|
trackHeight: { default: "4px" },
|
|
132
192
|
trackRadius: { default: "2px" },
|
|
133
193
|
thumbWidth: { default: "14px" },
|
|
134
194
|
thumbHeight: { default: "14px" },
|
|
135
195
|
thumbRadius: { default: "50%" },
|
|
136
|
-
inverted: { type: Boolean, default: false }
|
|
196
|
+
inverted: { type: Boolean, default: false },
|
|
197
|
+
valueLabel: { default: void 0 }
|
|
137
198
|
},
|
|
138
199
|
emits: ["update:modelValue"],
|
|
139
200
|
setup(__props, { emit: __emit }) {
|
|
140
201
|
const props = __props;
|
|
141
202
|
const emit = __emit;
|
|
142
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);
|
|
143
219
|
const rootStyle = computed(() => {
|
|
144
220
|
if (isVertical.value) {
|
|
145
221
|
return {
|
|
@@ -177,7 +253,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
177
253
|
step: __props.step,
|
|
178
254
|
orientation: __props.orientation,
|
|
179
255
|
inverted: __props.inverted,
|
|
180
|
-
"onUpdate:modelValue": onValueChange
|
|
256
|
+
"onUpdate:modelValue": onValueChange,
|
|
257
|
+
onPointerdown: onPointerDown
|
|
181
258
|
}, {
|
|
182
259
|
default: withCtx(() => [
|
|
183
260
|
createVNode(unref(SliderTrack), {
|
|
@@ -194,23 +271,23 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
194
271
|
}),
|
|
195
272
|
createVNode(unref(SliderThumb), {
|
|
196
273
|
class: "app-slider-thumb",
|
|
197
|
-
"data-testid": "app-slider-thumb"
|
|
198
|
-
|
|
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"])
|
|
199
283
|
]),
|
|
200
284
|
_: 1
|
|
201
285
|
}, 8, ["class", "style", "model-value", "min", "max", "step", "orientation", "inverted"]);
|
|
202
286
|
};
|
|
203
287
|
}
|
|
204
288
|
});
|
|
205
|
-
const
|
|
206
|
-
|
|
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({
|
|
289
|
+
const AppSlider = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-49f1dd0d"]]);
|
|
290
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
214
291
|
__name: "AppToggle",
|
|
215
292
|
props: {
|
|
216
293
|
modelValue: { type: Boolean },
|
|
@@ -228,7 +305,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
228
305
|
class: normalizeClass(["app-toggle", { on: __props.modelValue }]),
|
|
229
306
|
"model-value": __props.modelValue,
|
|
230
307
|
"aria-label": __props.ariaLabel,
|
|
231
|
-
"aria-pressed": __props.modelValue,
|
|
232
308
|
"data-testid": __props.testid,
|
|
233
309
|
"onUpdate:modelValue": onCheckedChange
|
|
234
310
|
}, {
|
|
@@ -236,19 +312,76 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
236
312
|
createVNode(unref(SwitchThumb), { class: "app-toggle-thumb" })
|
|
237
313
|
]),
|
|
238
314
|
_: 1
|
|
239
|
-
}, 8, ["class", "model-value", "aria-label", "
|
|
315
|
+
}, 8, ["class", "model-value", "aria-label", "data-testid"]);
|
|
240
316
|
};
|
|
241
317
|
}
|
|
242
318
|
});
|
|
243
|
-
const AppToggle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
244
|
-
const
|
|
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"]);
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
const _hoisted_1$4 = ["aria-label", "data-testid"];
|
|
245
374
|
const _hoisted_2$1 = ["innerHTML"];
|
|
246
|
-
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({
|
|
247
379
|
__name: "AppSegmented",
|
|
248
380
|
props: {
|
|
249
381
|
modelValue: {},
|
|
250
382
|
options: {},
|
|
251
|
-
disabled: { type: Boolean }
|
|
383
|
+
disabled: { type: Boolean },
|
|
384
|
+
ariaLabel: {}
|
|
252
385
|
},
|
|
253
386
|
emits: ["update:modelValue"],
|
|
254
387
|
setup(__props, { emit: __emit }) {
|
|
@@ -258,46 +391,174 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
258
391
|
emit("update:modelValue", val);
|
|
259
392
|
}
|
|
260
393
|
}
|
|
394
|
+
const tipOf = (o) => o.tooltip ?? (o.iconOnly ? o.label : void 0);
|
|
261
395
|
return (_ctx, _cache) => {
|
|
262
396
|
return openBlock(), createBlock(unref(RadioGroupRoot), {
|
|
263
397
|
class: normalizeClass(["app-seg", { "app-seg--disabled": __props.disabled }]),
|
|
264
398
|
"data-testid": "app-seg",
|
|
265
399
|
"model-value": __props.modelValue,
|
|
266
400
|
disabled: __props.disabled,
|
|
401
|
+
"aria-label": __props.ariaLabel,
|
|
267
402
|
orientation: "horizontal",
|
|
268
403
|
"onUpdate:modelValue": onValueChange
|
|
269
404
|
}, {
|
|
270
405
|
default: withCtx(() => [
|
|
271
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) => {
|
|
272
505
|
return openBlock(), createBlock(unref(RadioGroupItem), {
|
|
273
|
-
key:
|
|
274
|
-
value:
|
|
506
|
+
key: c.value,
|
|
507
|
+
value: c.value,
|
|
275
508
|
"as-child": ""
|
|
276
509
|
}, {
|
|
277
510
|
default: withCtx(() => [
|
|
278
511
|
createElementVNode("button", {
|
|
279
|
-
|
|
280
|
-
"
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
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)
|
|
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)
|
|
290
519
|
]),
|
|
291
520
|
_: 2
|
|
292
521
|
}, 1032, ["value"]);
|
|
293
522
|
}), 128))
|
|
294
523
|
]),
|
|
295
524
|
_: 1
|
|
296
|
-
}, 8, ["class", "model-value", "disabled"]);
|
|
525
|
+
}, 8, ["class", "data-testid", "model-value", "aria-label", "disabled"]);
|
|
297
526
|
};
|
|
298
527
|
}
|
|
299
528
|
});
|
|
300
|
-
const
|
|
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"]);
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
const AppToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-1d1a1150"]]);
|
|
301
562
|
function useDialogPluginComponent() {
|
|
302
563
|
const handle = inject(DIALOG_PLUGIN_HANDLE_KEY);
|
|
303
564
|
if (!handle) {
|
|
@@ -307,13 +568,14 @@ function useDialogPluginComponent() {
|
|
|
307
568
|
}
|
|
308
569
|
return handle;
|
|
309
570
|
}
|
|
310
|
-
const _sfc_main$
|
|
571
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
311
572
|
__name: "AppSelect",
|
|
312
573
|
props: {
|
|
313
574
|
modelValue: {},
|
|
314
575
|
options: {},
|
|
315
576
|
placeholder: {},
|
|
316
|
-
disabled: { type: Boolean, default: false }
|
|
577
|
+
disabled: { type: Boolean, default: false },
|
|
578
|
+
ariaLabel: { default: void 0 }
|
|
317
579
|
},
|
|
318
580
|
emits: ["update:modelValue"],
|
|
319
581
|
setup(__props, { emit: __emit }) {
|
|
@@ -328,7 +590,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
328
590
|
"onUpdate:modelValue": onValueChange
|
|
329
591
|
}, {
|
|
330
592
|
default: withCtx(() => [
|
|
331
|
-
createVNode(unref(SelectTrigger), {
|
|
593
|
+
createVNode(unref(SelectTrigger), {
|
|
594
|
+
class: "openpen-select-trigger",
|
|
595
|
+
"aria-label": __props.ariaLabel
|
|
596
|
+
}, {
|
|
332
597
|
default: withCtx(() => [
|
|
333
598
|
createVNode(unref(SelectValue), { placeholder: __props.placeholder }, null, 8, ["placeholder"]),
|
|
334
599
|
createVNode(unref(SelectIcon), {
|
|
@@ -355,7 +620,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
355
620
|
})
|
|
356
621
|
]),
|
|
357
622
|
_: 1
|
|
358
|
-
}),
|
|
623
|
+
}, 8, ["aria-label"]),
|
|
359
624
|
createVNode(unref(SelectPortal), null, {
|
|
360
625
|
default: withCtx(() => [
|
|
361
626
|
createVNode(unref(SelectContent), {
|
|
@@ -418,59 +683,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
418
683
|
};
|
|
419
684
|
}
|
|
420
685
|
});
|
|
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
686
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
475
687
|
__name: "AppTabs",
|
|
476
688
|
props: {
|
|
@@ -580,10 +792,14 @@ const _hoisted_6 = {
|
|
|
580
792
|
"stroke-linecap": "round",
|
|
581
793
|
"stroke-linejoin": "round"
|
|
582
794
|
};
|
|
583
|
-
const _hoisted_7 = {
|
|
795
|
+
const _hoisted_7 = {
|
|
796
|
+
class: "app-banner-body",
|
|
797
|
+
"data-testid": "app-banner-body"
|
|
798
|
+
};
|
|
584
799
|
const _hoisted_8 = {
|
|
585
800
|
key: 0,
|
|
586
|
-
class: "app-banner-actions"
|
|
801
|
+
class: "app-banner-actions",
|
|
802
|
+
"data-testid": "app-banner-actions"
|
|
587
803
|
};
|
|
588
804
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
589
805
|
__name: "AppBanner",
|
|
@@ -663,7 +879,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
663
879
|
};
|
|
664
880
|
}
|
|
665
881
|
});
|
|
666
|
-
const AppBanner = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
882
|
+
const AppBanner = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-4f309880"]]);
|
|
667
883
|
const _hoisted_1$1 = ["data-tip", "aria-label", "aria-disabled"];
|
|
668
884
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
669
885
|
__name: "AppButton",
|
|
@@ -748,7 +964,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
748
964
|
}
|
|
749
965
|
return (_ctx, _cache) => {
|
|
750
966
|
return openBlock(), createElementBlock("div", {
|
|
751
|
-
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"
|
|
752
969
|
}, [
|
|
753
970
|
createVNode(AppButton, {
|
|
754
971
|
variant: __props.variant,
|
|
@@ -764,7 +981,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
764
981
|
]),
|
|
765
982
|
_: 3
|
|
766
983
|
}, 8, ["variant", "active", "disabled", "tooltip", "aria-label", "data-testid"]),
|
|
767
|
-
createVNode(_sfc_main$
|
|
984
|
+
createVNode(_sfc_main$d, {
|
|
768
985
|
"popover-id": __props.popoverId,
|
|
769
986
|
placement: __props.popoverPlacement
|
|
770
987
|
}, {
|
|
@@ -783,6 +1000,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
783
1000
|
}, [
|
|
784
1001
|
(openBlock(), createElementBlock("svg", {
|
|
785
1002
|
class: normalizeClass(["app-btn-dropdown-caret-icon", `app-btn-dropdown-caret-icon--${caretRotation(open)}`]),
|
|
1003
|
+
"data-testid": "app-button-dropdown-caret-icon",
|
|
786
1004
|
width: "10",
|
|
787
1005
|
height: "10",
|
|
788
1006
|
viewBox: "0 0 24 24",
|
|
@@ -808,13 +1026,17 @@ export {
|
|
|
808
1026
|
AppButton,
|
|
809
1027
|
_sfc_main as AppButtonDropdown,
|
|
810
1028
|
_ as AppDialog,
|
|
811
|
-
_sfc_main$
|
|
1029
|
+
_sfc_main$d as AppPopover,
|
|
1030
|
+
AppPopoverPanel,
|
|
1031
|
+
AppPopoverRow,
|
|
812
1032
|
AppSegmented,
|
|
813
|
-
_sfc_main$
|
|
1033
|
+
_sfc_main$4 as AppSelect,
|
|
814
1034
|
AppSlider,
|
|
1035
|
+
AppSwatchPicker,
|
|
815
1036
|
AppTabs,
|
|
816
1037
|
AppToggle,
|
|
817
|
-
|
|
1038
|
+
AppToggleButton,
|
|
1039
|
+
_sfc_main$8 as AppTooltip,
|
|
818
1040
|
ComboboxAnchor,
|
|
819
1041
|
ComboboxArrow,
|
|
820
1042
|
ComboboxCancel,
|
|
@@ -884,6 +1106,7 @@ export {
|
|
|
884
1106
|
TagsInputItemDelete,
|
|
885
1107
|
TagsInputItemText,
|
|
886
1108
|
TagsInputRoot,
|
|
1109
|
+
Toggle2 as Toggle,
|
|
887
1110
|
TooltipArrow2 as TooltipArrow,
|
|
888
1111
|
TooltipContent2 as TooltipContent,
|
|
889
1112
|
TooltipPortal2 as TooltipPortal,
|