sit-onyx 1.1.0-dev-20250930120837 → 1.2.0-dev-20251008133229
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/dist/components/OnyxBasicPopover/OnyxBasicPopover.d.vue.ts +1 -1
- package/dist/components/OnyxBasicPopover/types.d.ts +1 -1
- package/dist/components/OnyxDialog/OnyxDialog.d.vue.ts +1 -1
- package/dist/components/OnyxInfoCard/OnyxInfoCard.d.vue.ts +14 -0
- package/dist/components/OnyxInfoCard/types.d.ts +2 -0
- package/dist/composables/{useClipping.d.ts → useSticky.d.ts} +5 -5
- package/dist/index.esm-bundler.js +113 -91
- package/dist/index.esm-bundler.js.map +1 -1
- package/dist/index.js +368 -349
- package/dist/style.css +1 -1
- package/package.json +8 -8
|
@@ -49,9 +49,9 @@ declare const __VLS_component: import('vue').DefineComponent<OnyxBasicPopoverPro
|
|
|
49
49
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
50
50
|
}>, {
|
|
51
51
|
role: "menu" | "listbox" | "tree" | "grid" | "dialog";
|
|
52
|
+
sticky: boolean;
|
|
52
53
|
alignment: import('../../composables/useOpenAlignment.js', { with: { "resolution-mode": "import" } }).OpenAlignment | "auto";
|
|
53
54
|
position: import('../../composables/useAnchorPositionPolyfill.js', { with: { "resolution-mode": "import" } }).AnchorPosition | "auto";
|
|
54
|
-
clipping: boolean;
|
|
55
55
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
56
56
|
popoverWrapper: HTMLDivElement;
|
|
57
57
|
popover: HTMLDivElement;
|
|
@@ -35,5 +35,5 @@ export type OnyxBasicPopoverProps = {
|
|
|
35
35
|
*/
|
|
36
36
|
role?: "menu" | "listbox" | "tree" | "grid" | "dialog";
|
|
37
37
|
/** If true, the popover remains visible within the viewport even if its parent element scrolls out of view. */
|
|
38
|
-
|
|
38
|
+
sticky?: boolean;
|
|
39
39
|
};
|
|
@@ -57,8 +57,8 @@ declare const __VLS_component: import('vue').DefineComponent<OnyxDialogProps, {}
|
|
|
57
57
|
}, string, import('vue').PublicProps, Readonly<OnyxDialogProps> & Readonly<{
|
|
58
58
|
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
59
59
|
}>, {
|
|
60
|
+
sticky: boolean;
|
|
60
61
|
open: boolean | null;
|
|
61
|
-
clipping: boolean;
|
|
62
62
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
63
63
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
64
64
|
export default _default;
|
|
@@ -10,6 +10,13 @@ declare function __VLS_template(): {
|
|
|
10
10
|
* Slot to provide optional buttons/actions.
|
|
11
11
|
*/
|
|
12
12
|
buttons?(): unknown;
|
|
13
|
+
/**
|
|
14
|
+
* Optional custom header actions to display inside a flyout menu.
|
|
15
|
+
* Note that the `closable` property will not have any effect when custom header actions are set.
|
|
16
|
+
* Please provide a close menu item manually via the header actions then.
|
|
17
|
+
* You must only put [OnyxMenuItem](https://storybook.onyx.schwarz/?path=/docs/basic-menuitem--docs) components here.
|
|
18
|
+
*/
|
|
19
|
+
headerActions?(): unknown;
|
|
13
20
|
}> & {
|
|
14
21
|
/**
|
|
15
22
|
* Slot to provide description / further information.
|
|
@@ -19,6 +26,13 @@ declare function __VLS_template(): {
|
|
|
19
26
|
* Slot to provide optional buttons/actions.
|
|
20
27
|
*/
|
|
21
28
|
buttons?(): unknown;
|
|
29
|
+
/**
|
|
30
|
+
* Optional custom header actions to display inside a flyout menu.
|
|
31
|
+
* Note that the `closable` property will not have any effect when custom header actions are set.
|
|
32
|
+
* Please provide a close menu item manually via the header actions then.
|
|
33
|
+
* You must only put [OnyxMenuItem](https://storybook.onyx.schwarz/?path=/docs/basic-menuitem--docs) components here.
|
|
34
|
+
*/
|
|
35
|
+
headerActions?(): unknown;
|
|
22
36
|
};
|
|
23
37
|
refs: {};
|
|
24
38
|
rootEl: HTMLDivElement;
|
|
@@ -16,6 +16,8 @@ export type OnyxInfoCardProps = DensityProp & {
|
|
|
16
16
|
icon?: string | false;
|
|
17
17
|
/**
|
|
18
18
|
* Whether the info card can be closed. Will show an "x" icon.
|
|
19
|
+
* If you provide custom `headerActions`, the close button will not be visible.
|
|
20
|
+
* Please provide a custom menu item inside your header actions then.
|
|
19
21
|
*/
|
|
20
22
|
closable?: boolean;
|
|
21
23
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { CSSProperties, Ref } from 'vue';
|
|
2
2
|
import { AnchorPosition } from './useAnchorPositionPolyfill.js';
|
|
3
3
|
import { OpenDirection } from './useOpenDirection.js';
|
|
4
|
-
export type
|
|
4
|
+
export type UseStickyOptions = {
|
|
5
5
|
popoverRef: Ref<HTMLElement | null>;
|
|
6
6
|
popoverWrapperRef: Ref<HTMLElement | null>;
|
|
7
7
|
popoverPosition: Ref<AnchorPosition | OpenDirection>;
|
|
8
8
|
isVisible: Ref<boolean>;
|
|
9
|
-
|
|
9
|
+
sticky: Ref<boolean>;
|
|
10
10
|
};
|
|
11
|
-
export declare function
|
|
12
|
-
|
|
11
|
+
export declare function useSticky(options: UseStickyOptions): {
|
|
12
|
+
stickyStyles: Ref<CSSProperties | undefined, CSSProperties | undefined>;
|
|
13
13
|
scrolledOut: Ref<OpenDirection | undefined, OpenDirection | undefined>;
|
|
14
|
-
|
|
14
|
+
isSticky: Ref<boolean, boolean>;
|
|
15
15
|
checkVisibilityOnScroll: () => void;
|
|
16
16
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, provide, inject, toRef, ref, watch, defineComponent, watchEffect, toRefs, createElementBlock, openBlock, normalizeClass, renderSlot, onMounted, createBlock, resolveDynamicComponent, withCtx, createVNode, createElementVNode, withModifiers, readonly, reactive, onBeforeMount, onBeforeUnmount, useId, toValue, nextTick, unref, shallowRef, useTemplateRef, createCommentVNode, createTextVNode, toDisplayString, normalizeProps, mergeProps, Fragment, useAttrs, isProxy, toRaw, customRef, onUnmounted, normalizeStyle, useSlots, createSlots, renderList, toHandlers, resolveComponent, withDirectives, guardReactiveProps, vShow, Teleport, vModelCheckbox, vModelText, h, vModelDynamic, withKeys, createStaticVNode, useModel } from "vue";
|
|
2
|
-
import { iconChevronDownSmall, iconCircleAttention, iconXSmall, iconX, iconMoreHorizontalSmall, iconCircleCheck, iconCircleX, iconCircleInformation, iconUser, iconArrowSmallUpRight, iconChevronRightSmall, iconArrowSmallLeft, iconMoreHorizontal, iconHome, iconChevronLeftSmall, iconSearch, iconCheck, iconSearchX, iconChevronDownUp, iconCheckSmall, iconPlusSmall, iconEyeDisabled, iconListArrowUp, iconListArrowDown, iconArrowsSort, iconCircleBlock, iconFileDisabled, iconEyeClosed, iconEye, iconCircleContrast, iconTranslate,
|
|
2
|
+
import { iconChevronDownSmall, iconCircleAttention, iconXSmall, iconX, iconMoreHorizontalSmall, iconMoreVertical, iconCircleCheck, iconCircleX, iconCircleInformation, iconUser, iconArrowSmallUpRight, iconChevronRightSmall, iconArrowSmallLeft, iconMoreHorizontal, iconHome, iconChevronLeftSmall, iconSearch, iconCheck, iconSearchX, iconChevronDownUp, iconCheckSmall, iconPlusSmall, iconEyeDisabled, iconListArrowUp, iconListArrowDown, iconArrowsSort, iconCircleBlock, iconFileDisabled, iconEyeClosed, iconEye, iconCircleContrast, iconTranslate, iconMenu, iconNotificationFlag, iconPlus, iconMinus, iconFile, iconFilePdf, iconFileCsv, iconAudio, iconVideocam, iconPicture, iconFileRtf, iconFilePpt, iconFileXls, iconFileXlsx, iconFileDoc, iconFileGlobe, iconFileArchive, iconFileText, iconTrash, iconCloudArrowUp, iconShareIos, iconSettings, iconLogout, iconArrowSmallRight } from "@sit-onyx/icons";
|
|
3
3
|
const DENSITIES = ["compact", "default", "cozy"];
|
|
4
4
|
const useDensity = (props) => ({
|
|
5
5
|
densityClass: computed(() => ({ [`onyx-density-${props.density}`]: !!props.density }))
|
|
@@ -2296,82 +2296,6 @@ const useAnchorPositionPolyfill = ({
|
|
|
2296
2296
|
useragentSupportsAnchorApi
|
|
2297
2297
|
};
|
|
2298
2298
|
};
|
|
2299
|
-
function useClipping(options) {
|
|
2300
|
-
const clippingStyles = ref();
|
|
2301
|
-
const scrolledOut = ref();
|
|
2302
|
-
const isClipping = ref(false);
|
|
2303
|
-
const checkVisibilityOnScroll = () => {
|
|
2304
|
-
const MIN_DISTANCE_TO_BORDER = 16;
|
|
2305
|
-
const MARGIN = 8;
|
|
2306
|
-
if (!options.popoverRef.value || !options.popoverWrapperRef.value || !options.isVisible.value)
|
|
2307
|
-
return;
|
|
2308
|
-
if (isClipping.value) {
|
|
2309
|
-
const popoverRect = options.popoverRef.value.getBoundingClientRect();
|
|
2310
|
-
const wrapperRect = options.popoverWrapperRef.value.getBoundingClientRect();
|
|
2311
|
-
const requiredHeight = popoverRect.height + MIN_DISTANCE_TO_BORDER + MARGIN;
|
|
2312
|
-
if (options.popoverPosition.value.includes("top")) {
|
|
2313
|
-
if (scrolledOut.value === "top" && wrapperRect.top > requiredHeight) {
|
|
2314
|
-
isClipping.value = false;
|
|
2315
|
-
return;
|
|
2316
|
-
}
|
|
2317
|
-
if (scrolledOut.value === "bottom" && wrapperRect.top + MARGIN < window.innerHeight) {
|
|
2318
|
-
isClipping.value = false;
|
|
2319
|
-
return;
|
|
2320
|
-
}
|
|
2321
|
-
} else if (options.popoverPosition.value.includes("bottom")) {
|
|
2322
|
-
if (scrolledOut.value === "top" && wrapperRect.bottom > MARGIN) {
|
|
2323
|
-
isClipping.value = false;
|
|
2324
|
-
return;
|
|
2325
|
-
}
|
|
2326
|
-
if (scrolledOut.value === "bottom" && window.innerHeight - wrapperRect.bottom > requiredHeight) {
|
|
2327
|
-
isClipping.value = false;
|
|
2328
|
-
return;
|
|
2329
|
-
}
|
|
2330
|
-
} else {
|
|
2331
|
-
if (scrolledOut.value === "top" && wrapperRect.top + MIN_DISTANCE_TO_BORDER > popoverRect.height) {
|
|
2332
|
-
isClipping.value = false;
|
|
2333
|
-
return;
|
|
2334
|
-
}
|
|
2335
|
-
if (scrolledOut.value === "bottom" && wrapperRect.bottom + MIN_DISTANCE_TO_BORDER < window.innerHeight) {
|
|
2336
|
-
isClipping.value = false;
|
|
2337
|
-
return;
|
|
2338
|
-
}
|
|
2339
|
-
}
|
|
2340
|
-
} else {
|
|
2341
|
-
const rect = options.popoverRef.value.getBoundingClientRect();
|
|
2342
|
-
const isTooHigh = rect.top < MIN_DISTANCE_TO_BORDER;
|
|
2343
|
-
const isTooLow = rect.bottom > window.innerHeight - MIN_DISTANCE_TO_BORDER;
|
|
2344
|
-
if (isTooHigh || isTooLow) {
|
|
2345
|
-
isClipping.value = true;
|
|
2346
|
-
if (isTooHigh) {
|
|
2347
|
-
scrolledOut.value = "top";
|
|
2348
|
-
clippingStyles.value = { left: rect.left + "px", top: "var(--onyx-density-md)" };
|
|
2349
|
-
} else if (isTooLow) {
|
|
2350
|
-
scrolledOut.value = "bottom";
|
|
2351
|
-
clippingStyles.value = { left: rect.left + "px", bottom: "var(--onyx-density-md)" };
|
|
2352
|
-
}
|
|
2353
|
-
}
|
|
2354
|
-
}
|
|
2355
|
-
};
|
|
2356
|
-
const disableClipping = computed(() => {
|
|
2357
|
-
return !options.clipping.value || !options.isVisible.value;
|
|
2358
|
-
});
|
|
2359
|
-
useGlobalEventListener({
|
|
2360
|
-
type: "scroll",
|
|
2361
|
-
listener: () => checkVisibilityOnScroll(),
|
|
2362
|
-
disabled: disableClipping
|
|
2363
|
-
});
|
|
2364
|
-
useGlobalEventListener({
|
|
2365
|
-
type: "resize",
|
|
2366
|
-
listener: () => checkVisibilityOnScroll(),
|
|
2367
|
-
disabled: disableClipping
|
|
2368
|
-
});
|
|
2369
|
-
onMounted(async () => {
|
|
2370
|
-
await nextTick();
|
|
2371
|
-
if (!disableClipping.value) checkVisibilityOnScroll();
|
|
2372
|
-
});
|
|
2373
|
-
return { clippingStyles, scrolledOut, isClipping, checkVisibilityOnScroll };
|
|
2374
|
-
}
|
|
2375
2299
|
const useOpenAlignment = (element, tooltipElement, defaultPosition = "center") => {
|
|
2376
2300
|
const minMargin = 16;
|
|
2377
2301
|
const openAlignment = ref(defaultPosition);
|
|
@@ -2451,6 +2375,82 @@ const findParentWithHiddenOverflow = (element) => {
|
|
|
2451
2375
|
}
|
|
2452
2376
|
return element.parentElement ? findParentWithHiddenOverflow(element.parentElement) : void 0;
|
|
2453
2377
|
};
|
|
2378
|
+
function useSticky(options) {
|
|
2379
|
+
const stickyStyles = ref();
|
|
2380
|
+
const scrolledOut = ref();
|
|
2381
|
+
const isSticky = ref(false);
|
|
2382
|
+
const checkVisibilityOnScroll = () => {
|
|
2383
|
+
const MIN_DISTANCE_TO_BORDER = 16;
|
|
2384
|
+
const MARGIN = 8;
|
|
2385
|
+
if (!options.popoverRef.value || !options.popoverWrapperRef.value || !options.isVisible.value)
|
|
2386
|
+
return;
|
|
2387
|
+
if (isSticky.value) {
|
|
2388
|
+
const popoverRect = options.popoverRef.value.getBoundingClientRect();
|
|
2389
|
+
const wrapperRect = options.popoverWrapperRef.value.getBoundingClientRect();
|
|
2390
|
+
const requiredHeight = popoverRect.height + MIN_DISTANCE_TO_BORDER + MARGIN;
|
|
2391
|
+
if (options.popoverPosition.value.includes("top")) {
|
|
2392
|
+
if (scrolledOut.value === "top" && wrapperRect.top > requiredHeight) {
|
|
2393
|
+
isSticky.value = false;
|
|
2394
|
+
return;
|
|
2395
|
+
}
|
|
2396
|
+
if (scrolledOut.value === "bottom" && wrapperRect.top + MARGIN < window.innerHeight) {
|
|
2397
|
+
isSticky.value = false;
|
|
2398
|
+
return;
|
|
2399
|
+
}
|
|
2400
|
+
} else if (options.popoverPosition.value.includes("bottom")) {
|
|
2401
|
+
if (scrolledOut.value === "top" && wrapperRect.bottom > MARGIN) {
|
|
2402
|
+
isSticky.value = false;
|
|
2403
|
+
return;
|
|
2404
|
+
}
|
|
2405
|
+
if (scrolledOut.value === "bottom" && window.innerHeight - wrapperRect.bottom > requiredHeight) {
|
|
2406
|
+
isSticky.value = false;
|
|
2407
|
+
return;
|
|
2408
|
+
}
|
|
2409
|
+
} else {
|
|
2410
|
+
if (scrolledOut.value === "top" && wrapperRect.top + MIN_DISTANCE_TO_BORDER > popoverRect.height) {
|
|
2411
|
+
isSticky.value = false;
|
|
2412
|
+
return;
|
|
2413
|
+
}
|
|
2414
|
+
if (scrolledOut.value === "bottom" && wrapperRect.bottom + MIN_DISTANCE_TO_BORDER < window.innerHeight) {
|
|
2415
|
+
isSticky.value = false;
|
|
2416
|
+
return;
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
} else {
|
|
2420
|
+
const rect = options.popoverRef.value.getBoundingClientRect();
|
|
2421
|
+
const isTooHigh = rect.top < MIN_DISTANCE_TO_BORDER;
|
|
2422
|
+
const isTooLow = rect.bottom > window.innerHeight - MIN_DISTANCE_TO_BORDER;
|
|
2423
|
+
if (isTooHigh || isTooLow) {
|
|
2424
|
+
isSticky.value = true;
|
|
2425
|
+
if (isTooHigh) {
|
|
2426
|
+
scrolledOut.value = "top";
|
|
2427
|
+
stickyStyles.value = { left: rect.left + "px", top: "var(--onyx-density-md)" };
|
|
2428
|
+
} else if (isTooLow) {
|
|
2429
|
+
scrolledOut.value = "bottom";
|
|
2430
|
+
stickyStyles.value = { left: rect.left + "px", bottom: "var(--onyx-density-md)" };
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
};
|
|
2435
|
+
const disableSticky = computed(() => {
|
|
2436
|
+
return !options.sticky.value || !options.isVisible.value;
|
|
2437
|
+
});
|
|
2438
|
+
useGlobalEventListener({
|
|
2439
|
+
type: "scroll",
|
|
2440
|
+
listener: () => checkVisibilityOnScroll(),
|
|
2441
|
+
disabled: disableSticky
|
|
2442
|
+
});
|
|
2443
|
+
useGlobalEventListener({
|
|
2444
|
+
type: "resize",
|
|
2445
|
+
listener: () => checkVisibilityOnScroll(),
|
|
2446
|
+
disabled: disableSticky
|
|
2447
|
+
});
|
|
2448
|
+
onMounted(async () => {
|
|
2449
|
+
await nextTick();
|
|
2450
|
+
if (!disableSticky.value) checkVisibilityOnScroll();
|
|
2451
|
+
});
|
|
2452
|
+
return { stickyStyles, scrolledOut, isSticky, checkVisibilityOnScroll };
|
|
2453
|
+
}
|
|
2454
2454
|
const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
2455
2455
|
__name: "OnyxBasicPopover",
|
|
2456
2456
|
props: {
|
|
@@ -2461,7 +2461,7 @@ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
|
2461
2461
|
fitParent: { type: Boolean, required: false },
|
|
2462
2462
|
disabled: { type: Boolean, required: false },
|
|
2463
2463
|
role: { type: String, required: false, default: "dialog" },
|
|
2464
|
-
|
|
2464
|
+
sticky: { type: Boolean, required: false, default: false }
|
|
2465
2465
|
},
|
|
2466
2466
|
emits: ["update:open"],
|
|
2467
2467
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -2532,12 +2532,12 @@ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
|
2532
2532
|
updateOpenDirection();
|
|
2533
2533
|
updateOpenAlignment();
|
|
2534
2534
|
};
|
|
2535
|
-
const {
|
|
2535
|
+
const { stickyStyles, isSticky } = useSticky({
|
|
2536
2536
|
popoverRef,
|
|
2537
2537
|
popoverWrapperRef,
|
|
2538
2538
|
popoverPosition,
|
|
2539
2539
|
isVisible,
|
|
2540
|
-
|
|
2540
|
+
sticky: toRef(() => props.sticky)
|
|
2541
2541
|
});
|
|
2542
2542
|
useGlobalEventListener({
|
|
2543
2543
|
type: "resize",
|
|
@@ -2573,7 +2573,7 @@ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
|
2573
2573
|
[`onyx-basic-popover__dialog--alignment-${popoverAlignment.value}`]: true,
|
|
2574
2574
|
"onyx-basic-popover__dialog--fitparent": props.fitParent,
|
|
2575
2575
|
"onyx-basic-popover__dialog--disabled": disabled.value,
|
|
2576
|
-
"onyx-basic-popover__dialog--
|
|
2576
|
+
"onyx-basic-popover__dialog--sticky": isSticky.value,
|
|
2577
2577
|
"onyx-basic-popover__dialog--dont-support-anchor": !useragentSupportsAnchorApi.value
|
|
2578
2578
|
};
|
|
2579
2579
|
});
|
|
@@ -2604,7 +2604,7 @@ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
|
2604
2604
|
top: topPosition.value
|
|
2605
2605
|
};
|
|
2606
2606
|
});
|
|
2607
|
-
const __returned__ = { props, emit, _isVisible, isVisible, popoverPosition, popoverAlignment, disabled, positionAndAlignment, popoverRef, popoverWrapperRef, openDirection, updateOpenDirection, openAlignment, updateOpenAlignment, leftPosition, topPosition, updateAnchorPositionPolyfill, useragentSupportsAnchorApi, width, handleOpening, updateDirections,
|
|
2607
|
+
const __returned__ = { props, emit, _isVisible, isVisible, popoverPosition, popoverAlignment, disabled, positionAndAlignment, popoverRef, popoverWrapperRef, openDirection, updateOpenDirection, openAlignment, updateOpenAlignment, leftPosition, topPosition, updateAnchorPositionPolyfill, useragentSupportsAnchorApi, width, handleOpening, updateDirections, stickyStyles, isSticky, toggle, trigger, id, anchorName, popoverClasses, popoverStyles };
|
|
2608
2608
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
2609
2609
|
return __returned__;
|
|
2610
2610
|
}
|
|
@@ -2626,7 +2626,7 @@ function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2626
2626
|
"aria-label": $setup.props.label,
|
|
2627
2627
|
popover: "manual",
|
|
2628
2628
|
class: normalizeClass(["onyx-basic-popover__dialog", $setup.popoverClasses]),
|
|
2629
|
-
style: normalizeStyle(!$setup.
|
|
2629
|
+
style: normalizeStyle(!$setup.isSticky ? $setup.popoverStyles : $setup.stickyStyles)
|
|
2630
2630
|
}, [
|
|
2631
2631
|
renderSlot(_ctx.$slots, "content")
|
|
2632
2632
|
], 14, _hoisted_1$11)
|
|
@@ -3156,20 +3156,23 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
3156
3156
|
const slots = useSlots();
|
|
3157
3157
|
const { t } = injectI18n();
|
|
3158
3158
|
const { densityClass } = useDensity(props);
|
|
3159
|
-
const
|
|
3159
|
+
const systemButtonColor = computed(() => props.color === "neutral" ? "soft" : "medium");
|
|
3160
|
+
const __returned__ = { props, emit, slots, t, densityClass, systemButtonColor, get iconMoreVertical() {
|
|
3161
|
+
return iconMoreVertical;
|
|
3162
|
+
}, get iconXSmall() {
|
|
3160
3163
|
return iconXSmall;
|
|
3161
|
-
}, OnyxHeadline, OnyxIcon, OnyxSystemButton };
|
|
3164
|
+
}, OnyxHeadline, OnyxIcon, OnyxFlyoutMenu, OnyxSystemButton };
|
|
3162
3165
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
3163
3166
|
return __returned__;
|
|
3164
3167
|
}
|
|
3165
3168
|
});
|
|
3166
3169
|
const _hoisted_1$X = { class: "onyx-info-card__content" };
|
|
3167
3170
|
const _hoisted_2$J = {
|
|
3168
|
-
key:
|
|
3171
|
+
key: 3,
|
|
3169
3172
|
class: "onyx-info-card__description onyx-text--small"
|
|
3170
3173
|
};
|
|
3171
3174
|
const _hoisted_3$v = {
|
|
3172
|
-
key:
|
|
3175
|
+
key: 4,
|
|
3173
3176
|
class: "onyx-info-card__buttons onyx-density-compact"
|
|
3174
3177
|
};
|
|
3175
3178
|
function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -3200,12 +3203,31 @@ function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3200
3203
|
_: 1
|
|
3201
3204
|
/* STABLE */
|
|
3202
3205
|
})) : createCommentVNode("v-if", true),
|
|
3203
|
-
$setup.
|
|
3206
|
+
$setup.slots.headerActions ? (openBlock(), createBlock($setup["OnyxFlyoutMenu"], {
|
|
3204
3207
|
key: 1,
|
|
3205
|
-
class: "onyx-info-
|
|
3208
|
+
class: "onyx-info-card__action",
|
|
3209
|
+
label: $setup.t("notificationCard.moreActions"),
|
|
3210
|
+
trigger: "click",
|
|
3211
|
+
alignment: "right"
|
|
3212
|
+
}, {
|
|
3213
|
+
button: withCtx(({ trigger }) => [
|
|
3214
|
+
createVNode($setup["OnyxSystemButton"], mergeProps(trigger, {
|
|
3215
|
+
label: $setup.t("notificationCard.toggleActions"),
|
|
3216
|
+
icon: $setup.iconMoreVertical,
|
|
3217
|
+
color: $setup.systemButtonColor
|
|
3218
|
+
}), null, 16, ["label", "icon", "color"])
|
|
3219
|
+
]),
|
|
3220
|
+
options: withCtx(() => [
|
|
3221
|
+
renderSlot(_ctx.$slots, "headerActions")
|
|
3222
|
+
]),
|
|
3223
|
+
_: 3
|
|
3224
|
+
/* FORWARDED */
|
|
3225
|
+
}, 8, ["label"])) : $setup.props.closable ? (openBlock(), createBlock($setup["OnyxSystemButton"], {
|
|
3226
|
+
key: 2,
|
|
3227
|
+
class: "onyx-info-card__close onyx-info-card__action",
|
|
3206
3228
|
icon: $setup.iconXSmall,
|
|
3207
3229
|
label: $setup.t("close"),
|
|
3208
|
-
color: $setup.
|
|
3230
|
+
color: $setup.systemButtonColor,
|
|
3209
3231
|
onClick: _cache[0] || (_cache[0] = ($event) => $setup.emit("close"))
|
|
3210
3232
|
}, null, 8, ["icon", "label", "color"])) : createCommentVNode("v-if", true),
|
|
3211
3233
|
!!$setup.slots.default ? (openBlock(), createElementBlock("p", _hoisted_2$J, [
|
|
@@ -8983,7 +9005,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
8983
9005
|
position: { type: String, required: false },
|
|
8984
9006
|
alignment: { type: String, required: false },
|
|
8985
9007
|
disabled: { type: Boolean, required: false },
|
|
8986
|
-
|
|
9008
|
+
sticky: { type: Boolean, required: false, default: true },
|
|
8987
9009
|
nonDismissible: { type: Boolean, required: false }
|
|
8988
9010
|
},
|
|
8989
9011
|
emits: ["update:open"],
|