sit-onyx 1.1.0 → 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.
|
@@ -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,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 }))
|
|
@@ -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, [
|