@fkui/vue 6.31.1 → 6.32.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/dist/cjs/index.cjs.js +54 -19
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/esm/index.esm.js +54 -19
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +38 -38
- package/package.json +5 -5
package/dist/esm/index.esm.js
CHANGED
|
@@ -313,7 +313,7 @@ function requireSymbolConstructorDetection() {
|
|
|
313
313
|
var globalThis2 = requireGlobalThis();
|
|
314
314
|
var $String = globalThis2.String;
|
|
315
315
|
symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails2(function() {
|
|
316
|
-
var symbol = Symbol("symbol detection");
|
|
316
|
+
var symbol = /* @__PURE__ */ Symbol("symbol detection");
|
|
317
317
|
return !$String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
318
318
|
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
319
319
|
});
|
|
@@ -6868,7 +6868,7 @@ function requireEs_set_union_v2() {
|
|
|
6868
6868
|
return es_set_union_v2;
|
|
6869
6869
|
}
|
|
6870
6870
|
requireEs_set_union_v2();
|
|
6871
|
-
const internalKey = Symbol("internal-key");
|
|
6871
|
+
const internalKey = /* @__PURE__ */ Symbol("internal-key");
|
|
6872
6872
|
let internalIndex = 0;
|
|
6873
6873
|
function getInternalKey() {
|
|
6874
6874
|
return internalKey;
|
|
@@ -7998,7 +7998,7 @@ function useMutationObserver(target, callback, options = {}) {
|
|
|
7998
7998
|
takeRecords
|
|
7999
7999
|
};
|
|
8000
8000
|
}
|
|
8001
|
-
const ssrWidthSymbol = Symbol("vueuse-ssr-width");
|
|
8001
|
+
const ssrWidthSymbol = /* @__PURE__ */ Symbol("vueuse-ssr-width");
|
|
8002
8002
|
function useSSRWidth() {
|
|
8003
8003
|
const ssrWidth = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;
|
|
8004
8004
|
return typeof ssrWidth === "number" ? ssrWidth : void 0;
|
|
@@ -9052,6 +9052,11 @@ const _sfc_main$16 = defineComponent({
|
|
|
9052
9052
|
"open",
|
|
9053
9053
|
/**
|
|
9054
9054
|
* Emitted when clicked outside of popup.
|
|
9055
|
+
*
|
|
9056
|
+
* Includes the reason for closing as event argument. One of:
|
|
9057
|
+
*
|
|
9058
|
+
* - `"click-outside"` - when clicking outside the popup with the mouse
|
|
9059
|
+
* - `"escape"` - when closing the popup with the escape key.
|
|
9055
9060
|
*/
|
|
9056
9061
|
"close"
|
|
9057
9062
|
],
|
|
@@ -9204,7 +9209,7 @@ const _sfc_main$16 = defineComponent({
|
|
|
9204
9209
|
return window.innerWidth < MIN_DESKTOP_WIDTH;
|
|
9205
9210
|
},
|
|
9206
9211
|
onDocumentClickHandler() {
|
|
9207
|
-
this.$emit("close");
|
|
9212
|
+
this.$emit("close", "click-outside");
|
|
9208
9213
|
},
|
|
9209
9214
|
onWindowResizeDebounced() {
|
|
9210
9215
|
},
|
|
@@ -9240,7 +9245,7 @@ const _sfc_main$16 = defineComponent({
|
|
|
9240
9245
|
event.stopPropagation();
|
|
9241
9246
|
},
|
|
9242
9247
|
onKeyEsc() {
|
|
9243
|
-
this.$emit("close");
|
|
9248
|
+
this.$emit("close", "escape");
|
|
9244
9249
|
},
|
|
9245
9250
|
onKeyTab(event) {
|
|
9246
9251
|
if (this.keyboardTrap) {
|
|
@@ -10703,7 +10708,7 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10703
10708
|
}, 8, ["onEnter", "onAfterEnter", "onLeave"]);
|
|
10704
10709
|
}
|
|
10705
10710
|
const FExpand = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$u]]);
|
|
10706
|
-
const tooltipAttachTo = Symbol("tooltipAttachTo");
|
|
10711
|
+
const tooltipAttachTo = /* @__PURE__ */ Symbol("tooltipAttachTo");
|
|
10707
10712
|
let initialized = false;
|
|
10708
10713
|
const reducedMotion = ref(false);
|
|
10709
10714
|
function useAnimation(options) {
|
|
@@ -11048,9 +11053,9 @@ function* labelClasses(options) {
|
|
|
11048
11053
|
yield labelClass;
|
|
11049
11054
|
}
|
|
11050
11055
|
const injectionKeys = {
|
|
11051
|
-
sharedName: Symbol("sharedName"),
|
|
11052
|
-
showDetails: Symbol("showDetails"),
|
|
11053
|
-
getFieldsetLabelText: Symbol("getFieldsetLabelText")
|
|
11056
|
+
sharedName: /* @__PURE__ */ Symbol("sharedName"),
|
|
11057
|
+
showDetails: /* @__PURE__ */ Symbol("showDetails"),
|
|
11058
|
+
getFieldsetLabelText: /* @__PURE__ */ Symbol("getFieldsetLabelText")
|
|
11054
11059
|
};
|
|
11055
11060
|
function useFieldset() {
|
|
11056
11061
|
return {
|
|
@@ -11747,6 +11752,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11747
11752
|
const currentFocusedItemIndex = ref(-1);
|
|
11748
11753
|
const popupItems = computed(() => __props.items.filter(isContextMenuTextItem));
|
|
11749
11754
|
const hasIcons = computed(() => __props.items.some((it) => isContextMenuTextItem(it) && it.icon));
|
|
11755
|
+
let focusHandle = null;
|
|
11750
11756
|
const ariaLabel = computed(() => {
|
|
11751
11757
|
if (__props.ariaLabel) {
|
|
11752
11758
|
return __props.ariaLabel;
|
|
@@ -11779,6 +11785,18 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11779
11785
|
if (isOpen) {
|
|
11780
11786
|
currentFocusedItemIndex.value = -1;
|
|
11781
11787
|
selectedItem.value = "";
|
|
11788
|
+
nextTick(() => {
|
|
11789
|
+
if (contextmenuRef.value) {
|
|
11790
|
+
focusHandle = pushFocus(contextmenuRef.value);
|
|
11791
|
+
}
|
|
11792
|
+
});
|
|
11793
|
+
} else {
|
|
11794
|
+
if (focusHandle) {
|
|
11795
|
+
popFocus(focusHandle, {
|
|
11796
|
+
restoreFocus: true
|
|
11797
|
+
});
|
|
11798
|
+
focusHandle = null;
|
|
11799
|
+
}
|
|
11782
11800
|
}
|
|
11783
11801
|
}, {
|
|
11784
11802
|
immediate: true
|
|
@@ -11786,14 +11804,32 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11786
11804
|
function hasSeparatorAfterItemAt(index) {
|
|
11787
11805
|
return separatorPositions.value.includes(index);
|
|
11788
11806
|
}
|
|
11789
|
-
function closePopup() {
|
|
11807
|
+
function closePopup(reason) {
|
|
11808
|
+
if (focusHandle) {
|
|
11809
|
+
switch (reason) {
|
|
11810
|
+
case "click-outside":
|
|
11811
|
+
popFocus(focusHandle, {
|
|
11812
|
+
restoreFocus: false
|
|
11813
|
+
});
|
|
11814
|
+
break;
|
|
11815
|
+
case "tab":
|
|
11816
|
+
case "escape":
|
|
11817
|
+
case "select":
|
|
11818
|
+
default:
|
|
11819
|
+
popFocus(focusHandle, {
|
|
11820
|
+
restoreFocus: true
|
|
11821
|
+
});
|
|
11822
|
+
break;
|
|
11823
|
+
}
|
|
11824
|
+
focusHandle = null;
|
|
11825
|
+
}
|
|
11790
11826
|
emit("close");
|
|
11791
11827
|
}
|
|
11792
11828
|
function onClickItem(item) {
|
|
11793
11829
|
if (isContextMenuTextItem(item) && item.key) {
|
|
11794
11830
|
selectedItem.value = item.key;
|
|
11795
11831
|
emit("select", selectedItem.value);
|
|
11796
|
-
closePopup();
|
|
11832
|
+
closePopup("select");
|
|
11797
11833
|
}
|
|
11798
11834
|
}
|
|
11799
11835
|
function tabIndex(index) {
|
|
@@ -11809,12 +11845,12 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11809
11845
|
return;
|
|
11810
11846
|
}
|
|
11811
11847
|
if (event.key === "Escape") {
|
|
11812
|
-
closePopup();
|
|
11848
|
+
closePopup("escape");
|
|
11813
11849
|
return;
|
|
11814
11850
|
}
|
|
11815
11851
|
if (event.key === "Tab") {
|
|
11816
11852
|
event.preventDefault();
|
|
11817
|
-
closePopup();
|
|
11853
|
+
closePopup("tab");
|
|
11818
11854
|
return;
|
|
11819
11855
|
}
|
|
11820
11856
|
const action = actionFromKeyboardEvent(event);
|
|
@@ -11859,10 +11895,9 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11859
11895
|
"is-open": __props.isOpen,
|
|
11860
11896
|
"keyboard-trap": false,
|
|
11861
11897
|
anchor: __props.anchor,
|
|
11862
|
-
"set-focus":
|
|
11863
|
-
"focus-element": () => contextmenuRef.value,
|
|
11898
|
+
"set-focus": false,
|
|
11864
11899
|
inline: "never",
|
|
11865
|
-
onClose: _cache[0] || (_cache[0] = ($event) => closePopup())
|
|
11900
|
+
onClose: _cache[0] || (_cache[0] = ($event) => closePopup($event))
|
|
11866
11901
|
}, {
|
|
11867
11902
|
default: withCtx(() => [createElementVNode("nav", {
|
|
11868
11903
|
class: "contextmenu",
|
|
@@ -11890,7 +11925,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11890
11925
|
}, toDisplayString(item.label), 513)], 8, _hoisted_4$k), _cache[2] || (_cache[2] = createTextVNode()), hasSeparatorAfterItemAt(index) ? (openBlock(), createElementBlock("hr", _hoisted_5$h)) : createCommentVNode("", true)], 8, _hoisted_3$o);
|
|
11891
11926
|
}), 128))], 512)], 40, _hoisted_1$G)]),
|
|
11892
11927
|
_: 1
|
|
11893
|
-
}, 8, ["is-open", "anchor"
|
|
11928
|
+
}, 8, ["is-open", "anchor"]);
|
|
11894
11929
|
};
|
|
11895
11930
|
}
|
|
11896
11931
|
});
|
|
@@ -16000,7 +16035,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
16000
16035
|
});
|
|
16001
16036
|
const _style_0$3 = '/* background color */\n/* highlight color */\n/* the width of the visible handle */\n/* how much extra click/hover area the handle has */\n/* how much extra space the handle occupies when hovering (not counting the click area) */\n/* how long before visually indicating the hover state */\n/* how long the animation for the visual indicator is */\n:host {\n display: contents;\n}\n:host([hidden]) {\n display: none;\n}\n:host ::slotted(*) {\n display: contents;\n}\n.resize {\n flex-grow: 1;\n display: flex;\n align-items: stretch;\n}\n.resize--overlay {\n position: absolute;\n z-index: 1;\n background: var(--f-page-layout-background);\n}\n.resize--left {\n flex-direction: row;\n}\n.resize--left:not(.resize--disabled) {\n width: calc(var(--size) + 2px);\n}\n.resize--left .resize__content {\n flex-direction: row;\n}\n.resize--left.resize--overlay {\n left: 0;\n top: 0;\n bottom: 0;\n}\n.resize--right {\n flex-direction: row-reverse;\n}\n.resize--right:not(.resize--disabled) {\n width: calc(var(--size) + 2px);\n}\n.resize--right .resize__content {\n flex-direction: row;\n}\n.resize--right.resize--overlay {\n right: 0;\n top: 0;\n bottom: 0;\n}\n.resize--top {\n flex-direction: column;\n}\n.resize--top:not(.resize--disabled) {\n height: calc(var(--size) + 2px);\n}\n.resize--bottom {\n flex-direction: column-reverse;\n}\n.resize--bottom:not(.resize--disabled) {\n height: calc(var(--size) + 2px);\n}\n.resize__offset {\n width: calc(var(--offset) + 2px);\n}\n.resize__content {\n flex: 1 1 auto;\n overflow: auto;\n box-sizing: border-box;\n display: flex;\n}\n.resize--column .resize__content {\n flex-direction: column;\n}\n.resize--row .resize__content {\n flex-direction: row;\n}\n.resize--left:not(.resize--disabled) .resize__content, .resize--right:not(.resize--disabled) .resize__content {\n min-width: var(--min);\n max-width: var(--max);\n flex-basis: var(--size);\n}\n.resize--top:not(.resize--disabled) .resize__content, .resize--bottom:not(.resize--disabled) .resize__content {\n min-height: var(--min);\n max-height: var(--max);\n flex-basis: var(--size);\n}\n.resize__handle {\n flex: 0 0 2px;\n background: var(--fkds-color-border-primary);\n touch-action: none;\n user-select: none;\n z-index: 1;\n position: relative;\n transition: z-index 0s 200ms;\n}\n@media (forced-colors: active) {\n.resize__handle {\n background: CanvasText;\n}\n}\n.resize__handle[aria-orientation=horizontal] {\n cursor: row-resize;\n height: 2px;\n}\n.resize__handle[aria-orientation=horizontal]::before {\n inset: -2px 0;\n}\n.resize__handle[aria-orientation=horizontal]::after {\n inset: -4px 0;\n}\n.resize__handle[aria-orientation=vertical] {\n cursor: col-resize;\n width: 2px;\n}\n.resize__handle[aria-orientation=vertical]::before {\n inset: 0 -2px;\n}\n.resize__handle[aria-orientation=vertical]::after {\n inset: 0 -4px;\n}\n.resize__handle::before {\n content: "";\n pointer-events: none;\n position: absolute;\n background-color: transparent;\n transition: background-color 200ms ease-in;\n}\n.resize__handle::after {\n content: "";\n position: absolute;\n}\n.resize__handle:focus::before, .resize__handle:hover::before, .resize__handle.drag::before {\n background-color: var(--fkds-color-action-border-primary-hover);\n transition-delay: 200ms;\n}\n@media (forced-colors: active) {\n.resize__handle:focus::before, .resize__handle:hover::before, .resize__handle.drag::before {\n background-color: Highlight;\n}\n}\n.resize__handle {\n /* disable regular focus indicator as this component has its own */\n}\n.resize__handle:focus {\n outline: none;\n box-shadow: none;\n}\n.resize__handle {\n /* when focus by keyboard we dont want the delay or transition */\n}\n.resize__handle:focus::before {\n transition: none;\n}\n.resize__handle {\n /* as the handle area expand we increase z-index for the handle to make sure it covers other separators */\n}\n.resize__handle:hover, .resize__handle:focus, .resize__handle.drag {\n z-index: 2;\n transition: z-index 0s 0s;\n}\n.resize__handle.disabled {\n cursor: auto;\n}\n.resize__handle.disabled::before {\n display: none;\n}';
|
|
16002
16037
|
const FResizePane = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["styles", [_style_0$3]]]);
|
|
16003
|
-
const injectionKey = Symbol.for("FResizePane:useResize");
|
|
16038
|
+
const injectionKey = /* @__PURE__ */ Symbol.for("FResizePane:useResize");
|
|
16004
16039
|
function toOptionalRef(value) {
|
|
16005
16040
|
if (typeof value === "undefined") {
|
|
16006
16041
|
return value;
|
|
@@ -19869,7 +19904,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19869
19904
|
})), _cache[1] || (_cache[1] = createTextVNode()), createElementVNode("div", _hoisted_5$2, [createElementVNode("div", _hoisted_6$2, [renderSlot(_ctx.$slots, "right")])])], 512)]);
|
|
19870
19905
|
}
|
|
19871
19906
|
const FPageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$4]]);
|
|
19872
|
-
const paginateDatasetKey = Symbol("paginateDataset");
|
|
19907
|
+
const paginateDatasetKey = /* @__PURE__ */ Symbol("paginateDataset");
|
|
19873
19908
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
19874
19909
|
__name: "FPaginateDataset",
|
|
19875
19910
|
props: {
|