@fibrae/semi-foundation 0.2.0 → 0.3.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/anchor/foundation.d.ts +0 -3
- package/dist/anchor/foundation.js +0 -1
- package/dist/audio-player/foundation.d.ts +0 -3
- package/dist/audio-player/foundation.js +0 -1
- package/dist/auto-complete/foundation.d.ts +0 -2
- package/dist/auto-complete/foundation.js +0 -1
- package/dist/avatar/foundation.d.ts +0 -1
- package/dist/avatar/variables.scss +0 -1
- package/dist/backtop/foundation.d.ts +0 -3
- package/dist/backtop/foundation.js +0 -1
- package/dist/base/auto-close-foundation.d.ts +0 -1
- package/dist/base/foundation.d.ts +0 -1
- package/dist/base/list-store.d.ts +0 -1
- package/dist/calendar/event-util.d.ts +0 -10
- package/dist/calendar/event-util.js +0 -10
- package/dist/calendar/foundation.d.ts +1 -6
- package/dist/calendar/foundation.js +1 -5
- package/dist/calendar/month-foundation.d.ts +0 -1
- package/dist/calendar/month-foundation.js +0 -1
- package/dist/carousel/foundation.d.ts +0 -2
- package/dist/cascader/foundation.d.ts +2 -6
- package/dist/cascader/foundation.js +2 -11
- package/dist/cascader/util.d.ts +1 -8
- package/dist/cascader/util.js +1 -8
- package/dist/checkbox/checkbox-foundation.d.ts +1 -5
- package/dist/checkbox/checkbox-foundation.js +0 -2
- package/dist/checkbox/checkbox-group-foundation.d.ts +0 -1
- package/dist/code-highlight/index.d.ts +0 -1
- package/dist/color-picker/color-picker.scss +0 -2
- package/dist/color-picker/interface.d.ts +0 -1
- package/dist/config-provider/responsive-types.d.ts +0 -16
- package/dist/cropper/foundation.d.ts +0 -1
- package/dist/cropper/foundation.js +0 -1
- package/dist/date-picker/_utils/get-default-picker-date.d.ts +0 -3
- package/dist/date-picker/_utils/get-default-picker-date.js +0 -3
- package/dist/date-picker/_utils/get-inset-input-format-token.d.ts +0 -2
- package/dist/date-picker/_utils/get-inset-input-format-token.js +0 -2
- package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.d.ts +0 -2
- package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.js +0 -2
- package/dist/date-picker/_utils/parser.d.ts +0 -3
- package/dist/date-picker/_utils/parser.js +0 -7
- package/dist/date-picker/_utils/picker-type.d.ts +0 -2
- package/dist/date-picker/_utils/picker-type.js +0 -2
- package/dist/date-picker/_utils/to-callback-args.d.ts +0 -1
- package/dist/date-picker/_utils/to-callback-args.js +0 -1
- package/dist/date-picker/date-picker.scss +0 -3
- package/dist/date-picker/foundation.d.ts +3 -22
- package/dist/date-picker/foundation.js +1 -24
- package/dist/date-picker/input-foundation.d.ts +1 -7
- package/dist/date-picker/input-foundation.js +0 -2
- package/dist/date-picker/month-foundation.d.ts +0 -3
- package/dist/date-picker/month-foundation.js +0 -2
- package/dist/date-picker/months-grid-foundation.d.ts +1 -10
- package/dist/date-picker/months-grid-foundation.js +1 -10
- package/dist/drag-move/foundation.d.ts +0 -1
- package/dist/dropdown/foundation.d.ts +0 -2
- package/dist/dropdown/menu-foundation.d.ts +0 -1
- package/dist/feedback/foundation.d.ts +0 -1
- package/dist/feedback/variables.scss +1 -5
- package/dist/float-button/float-button.css +0 -1
- package/dist/float-button/float-button.scss +0 -2
- package/dist/form/form.scss +0 -12
- package/dist/form/foundation.js +0 -15
- package/dist/form/interface.d.ts +2 -15
- package/dist/form/utils.d.ts +0 -8
- package/dist/form/utils.js +0 -7
- package/dist/form/variables.scss +1 -4
- package/dist/grid/variables.scss +0 -10
- package/dist/highlight/foundation.d.ts +0 -2
- package/dist/highlight/foundation.js +0 -2
- package/dist/hot-keys/foundation.d.ts +0 -1
- package/dist/image/image-foundation.d.ts +0 -2
- package/dist/image/preview-footer-foundation.d.ts +0 -1
- package/dist/image/preview-foundation.d.ts +0 -3
- package/dist/image/preview-image-foundation.d.ts +0 -1
- package/dist/image/preview-inner-foundation.d.ts +0 -1
- package/dist/input/foundation.d.ts +0 -1
- package/dist/input/text-entry-foundation.d.ts +0 -2
- package/dist/input/text-entry-foundation.js +0 -1
- package/dist/input/textarea-foundation.d.ts +0 -1
- package/dist/input-number/caret.d.ts +0 -1
- package/dist/input-number/caret.js +0 -1
- package/dist/input-number/foundation.d.ts +0 -5
- package/dist/input-number/foundation.js +0 -5
- package/dist/json-viewer/foundation.d.ts +0 -2
- package/dist/json-viewer/foundation.js +0 -1
- package/dist/locale/interface.d.ts +0 -3
- package/dist/markdown-render/foundation.d.ts +1 -6
- package/dist/markdown-render/foundation.js +1 -5
- package/dist/navigation/foundation.d.ts +0 -7
- package/dist/navigation/foundation.js +0 -6
- package/dist/navigation/sub-nav-foundation.d.ts +0 -1
- package/dist/notification/notification-list-foundation.d.ts +0 -1
- package/dist/notification/notification-list-foundation.js +0 -1
- package/dist/notification/variables.scss +0 -1
- package/dist/overflow-list/foundation.d.ts +0 -2
- package/dist/overflow-list/foundation.js +0 -1
- package/dist/pagination/foundation.d.ts +0 -2
- package/dist/pincode/foundation.d.ts +1 -4
- package/dist/pincode/foundation.js +1 -4
- package/dist/popconfirm/popconfirm-foundation.d.ts +0 -2
- package/dist/progress/generates.d.ts +1 -4
- package/dist/progress/generates.js +1 -4
- package/dist/progress/utils.d.ts +1 -1
- package/dist/progress/utils.js +1 -1
- package/dist/radio/radio-foundation.d.ts +0 -4
- package/dist/radio/radio-foundation.js +0 -1
- package/dist/radio/radio-group-foundation.d.ts +0 -1
- package/dist/rating/foundation.d.ts +0 -5
- package/dist/rating/foundation.js +0 -3
- package/dist/resizable/group/index.d.ts +0 -4
- package/dist/resizable/group/index.js +0 -4
- package/dist/resizable/resizable.scss +0 -1
- package/dist/resizable/single/index.d.ts +1 -5
- package/dist/resizable/single/index.js +1 -4
- package/dist/scroll-list/item-foundation.d.ts +0 -2
- package/dist/scroll-list/item-foundation.js +0 -1
- package/dist/scroll-list/variables.scss +1 -6
- package/dist/select/foundation.d.ts +0 -1
- package/dist/select/option-foundation.d.ts +2 -3
- package/dist/select/option-foundation.js +0 -1
- package/dist/select/variables.scss +1 -8
- package/dist/side-sheet/side-sheet-foundation.d.ts +1 -6
- package/dist/side-sheet/side-sheet-foundation.js +1 -5
- package/dist/side-sheet/variables.scss +1 -3
- package/dist/slider/foundation.d.ts +1 -12
- package/dist/slider/foundation.js +1 -13
- package/dist/slider/variables.scss +1 -5
- package/dist/spin/foundation.d.ts +0 -2
- package/dist/spin/foundation.js +0 -1
- package/dist/spin/variables.scss +1 -3
- package/dist/switch/foundation.d.ts +0 -1
- package/dist/switch/switch.scss +1 -1
- package/dist/switch/variables.scss +1 -5
- package/dist/table/foundation.d.ts +12 -21
- package/dist/table/foundation.js +51 -15
- package/dist/table/table.scss +0 -1
- package/dist/table/utils.d.ts +0 -8
- package/dist/table/utils.js +0 -13
- package/dist/table/variables.scss +1 -5
- package/dist/tabs/foundation.d.ts +0 -9
- package/dist/tabs/foundation.js +0 -4
- package/dist/tabs/tabs.scss +1 -1
- package/dist/tag/focus.js +0 -1
- package/dist/tag-input/foundation.d.ts +0 -2
- package/dist/tag-input/foundation.js +0 -1
- package/dist/tag-input/tag-input.scss +0 -1
- package/dist/tag-input/utils/tag-focus.d.ts +0 -1
- package/dist/tag-input/utils/tag-focus.js +0 -1
- package/dist/time-picker/combox-foundation.d.ts +3 -11
- package/dist/time-picker/combox-foundation.js +3 -10
- package/dist/time-picker/foundation.d.ts +0 -10
- package/dist/time-picker/foundation.js +0 -9
- package/dist/time-picker/utils/index.d.ts +0 -11
- package/dist/time-picker/utils/index.js +0 -11
- package/dist/tooltip/adjust-position.d.ts +1 -2
- package/dist/tooltip/constants.d.ts +0 -3
- package/dist/tooltip/constants.js +0 -3
- package/dist/tooltip/foundation.d.ts +0 -3
- package/dist/tooltip/foundation.js +0 -2
- package/dist/tooltip/position.scss +0 -1
- package/dist/transfer/foundation.d.ts +0 -4
- package/dist/transfer/foundation.js +0 -1
- package/dist/tree/foundation.d.ts +0 -2
- package/dist/tree/foundation.js +0 -1
- package/dist/tree/shared.d.ts +1 -3
- package/dist/tree/shared.js +0 -2
- package/dist/tree/tree-util.d.ts +0 -5
- package/dist/tree/tree-util.js +0 -5
- package/dist/tree-select/foundation.d.ts +0 -2
- package/dist/tree-select/foundation.js +0 -3
- package/dist/typography/ellipsis.d.ts +1 -3
- package/dist/typography/ellipsis.js +0 -2
- package/dist/typography/typography.scss +0 -1
- package/dist/upload/constants.d.ts +1 -1
- package/dist/upload/foundation.d.ts +0 -6
- package/dist/upload/foundation.js +1 -11
- package/dist/upload/utils.d.ts +0 -5
- package/dist/upload/utils.js +0 -5
- package/dist/user-guide/foundation.d.ts +0 -2
- package/dist/utils/a11y.d.ts +1 -5
- package/dist/utils/a11y.js +1 -4
- package/dist/utils/array.d.ts +0 -6
- package/dist/utils/array.js +0 -6
- package/dist/utils/date-fns-extra.js +1 -5
- package/dist/utils/dom.d.ts +0 -1
- package/dist/utils/dom.js +0 -1
- package/dist/utils/escape-html.js +0 -3
- package/dist/utils/field-sizing.d.ts +0 -2
- package/dist/utils/field-sizing.js +0 -2
- package/dist/utils/focus-handle.d.ts +0 -1
- package/dist/utils/focus-handle.js +0 -1
- package/dist/utils/focus-scope.d.ts +0 -1
- package/dist/utils/focus-scope.js +0 -1
- package/dist/utils/scroll-lock.d.ts +3 -4
- package/dist/utils/scroll-lock.js +3 -4
- package/dist/utils/tween.d.ts +0 -1
- package/dist/utils/tween.js +0 -1
- package/dist/utils/uuid.d.ts +0 -1
- package/dist/utils/uuid.js +0 -1
- package/dist/utils/warning.d.ts +0 -1
- package/dist/utils/warning.js +0 -1
- package/dist/video-player/progress-foundation.d.ts +0 -1
- package/dist/video-player/progress-foundation.js +0 -1
- package/dist/video-player/variables.scss +1 -1
- package/package.json +2 -2
package/dist/utils/a11y.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export declare function setFocusToItem(itemNodes: HTMLElement[], targetItem: HTM
|
|
|
8
8
|
export declare function setFocusToFirstItem(itemNodes: HTMLElement[]): void;
|
|
9
9
|
export declare function setFocusToLastItem(itemNodes: HTMLElement[]): void;
|
|
10
10
|
export interface ListNavigationOptions {
|
|
11
|
-
/** Arrows past either end wrap around instead of staying */
|
|
12
11
|
loop?: boolean;
|
|
13
12
|
/** Which arrows step: Up and Down for a vertical list, Left and Right (swapped in RTL) for a horizontal one */
|
|
14
13
|
orientation?: 'vertical' | 'horizontal';
|
|
@@ -87,10 +86,7 @@ export declare class Typeahead {
|
|
|
87
86
|
*/
|
|
88
87
|
match(key: string, labels: string[], current: number): number;
|
|
89
88
|
}
|
|
90
|
-
/**
|
|
91
|
-
* Development-only: warns when a dialog has no accessible name, which screen readers would announce as just
|
|
92
|
-
* "dialog". The name comes from `aria-label` or from the element `aria-labelledby` points at (usually the title).
|
|
93
|
-
*/
|
|
89
|
+
/** Development-only: warns when a dialog has no accessible name, which screen readers would announce as just "dialog" */
|
|
94
90
|
export declare function warnIfDialogUnnamed(dialog: HTMLElement | null, component: string): void;
|
|
95
91
|
/**
|
|
96
92
|
* `root`: the document or shadow root the popup lives in, which also holds its trigger (the popup is portaled into the
|
package/dist/utils/a11y.js
CHANGED
|
@@ -147,10 +147,7 @@ var Typeahead = class {
|
|
|
147
147
|
return -1;
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
-
/**
|
|
151
|
-
* Development-only: warns when a dialog has no accessible name, which screen readers would announce as just
|
|
152
|
-
* "dialog". The name comes from `aria-label` or from the element `aria-labelledby` points at (usually the title).
|
|
153
|
-
*/
|
|
150
|
+
/** Development-only: warns when a dialog has no accessible name, which screen readers would announce as just "dialog" */
|
|
154
151
|
function warnIfDialogUnnamed(dialog, component) {
|
|
155
152
|
if (!isDev() || !dialog) return;
|
|
156
153
|
const labelledBy = dialog.getAttribute("aria-labelledby");
|
package/dist/utils/array.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A new array of the unique items of source that are not in removed
|
|
3
|
-
*
|
|
4
|
-
* differenceUnique(['a', 'b', 'c', 'a', 'b', 'c'], ['a', 'c']) => ['b']
|
|
5
|
-
*/
|
|
6
1
|
export declare function differenceUnique<T>(source: T[], removed: T[]): T[];
|
|
7
2
|
type CompareFn<T> = (a: T, b: T, sortOrder: 'ascend' | 'descend') => number;
|
|
8
|
-
/** Wraps a compare function so that `descend` flips its sign */
|
|
9
3
|
export declare function withOrderSort<T = any>(fn: CompareFn<T>, order?: 'ascend' | 'descend'): (a: T, b: T) => number;
|
|
10
4
|
export {};
|
package/dist/utils/array.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { difference, uniq } from "es-toolkit";
|
|
2
2
|
// src/utils/array.ts
|
|
3
|
-
/**
|
|
4
|
-
* A new array of the unique items of source that are not in removed
|
|
5
|
-
*
|
|
6
|
-
* differenceUnique(['a', 'b', 'c', 'a', 'b', 'c'], ['a', 'c']) => ['b']
|
|
7
|
-
*/
|
|
8
3
|
function differenceUnique(source, removed) {
|
|
9
4
|
return difference(uniq(source), removed);
|
|
10
5
|
}
|
|
11
|
-
/** Wraps a compare function so that `descend` flips its sign */
|
|
12
6
|
function withOrderSort(fn, order = "ascend") {
|
|
13
7
|
switch (order) {
|
|
14
8
|
case "descend": return (a, b) => {
|
|
@@ -29,10 +29,7 @@ function isValidTimezoneIANAString(timeZoneString) {
|
|
|
29
29
|
}
|
|
30
30
|
const MILLISECONDS_IN_MINUTE = 6e4;
|
|
31
31
|
const MILLISECONDS_IN_DAY = 864e5;
|
|
32
|
-
/**
|
|
33
|
-
* UTC offset of `timeZone` (IANA name or ±HH[:MM]) at the instant `time` in milliseconds, positive east of UTC. No
|
|
34
|
-
* zone or Z means UTC; an unknown zone gives NaN.
|
|
35
|
-
*/
|
|
32
|
+
/** UTC offset of `timeZone` (IANA name or ±HH[:MM]) at the instant `time` in milliseconds, positive east of UTC */
|
|
36
33
|
function zoneOffset(timeZone, time) {
|
|
37
34
|
if (!timeZone || timeZone === "Z") return 0;
|
|
38
35
|
if (!isValidTimezoneIANAString(timeZone)) return NaN;
|
|
@@ -48,7 +45,6 @@ function wallTimeToInstant(wallTime, timeZone) {
|
|
|
48
45
|
const offsetAfter = zoneOffset(timeZone, wallTime + MILLISECONDS_IN_DAY);
|
|
49
46
|
return [wallTime - Math.max(offsetBefore, offsetAfter), wallTime - Math.min(offsetBefore, offsetAfter)].find((time) => time + zoneOffset(timeZone, time) === wallTime) ?? wallTime - offsetBefore;
|
|
50
47
|
}
|
|
51
|
-
/** Wall-clock fields of a system-local Date read as UTC */
|
|
52
48
|
function wallTimeAsUtc(date) {
|
|
53
49
|
const utc = /* @__PURE__ */ new Date(0);
|
|
54
50
|
utc.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());
|
package/dist/utils/dom.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export interface RegisterMediaQueryOption {
|
|
|
11
11
|
unmatch?: (e: MediaQueryList | MediaQueryListEvent) => void;
|
|
12
12
|
callInInit?: boolean;
|
|
13
13
|
}
|
|
14
|
-
/** Returns the function that removes the listener */
|
|
15
14
|
export declare function registerMediaQuery(media: string, { match, unmatch, callInInit }: RegisterMediaQueryOption): () => void;
|
|
16
15
|
/**
|
|
17
16
|
* Whether an overlay rendered through `getPopupContainer` covers the page: no container, or one that resolves to body.
|
package/dist/utils/dom.js
CHANGED
|
@@ -11,7 +11,6 @@ function isEventInside(e, ...nodes) {
|
|
|
11
11
|
const path = e.composedPath();
|
|
12
12
|
return nodes.some((node) => node != null && path.includes(node));
|
|
13
13
|
}
|
|
14
|
-
/** Returns the function that removes the listener */
|
|
15
14
|
function registerMediaQuery(media, { match, unmatch, callInInit = true }) {
|
|
16
15
|
if (typeof window !== "undefined") {
|
|
17
16
|
const mediaQueryList = window.matchMedia(media);
|
|
@@ -29,9 +29,6 @@ function escapeHtmlInMarkdown(text) {
|
|
|
29
29
|
}
|
|
30
30
|
return result.join("\n");
|
|
31
31
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Escape `<` to `<` in a single line, but preserve content inside inline code spans.
|
|
34
|
-
*/
|
|
35
32
|
function escapeAngleBracketsOutsideInlineCode(line) {
|
|
36
33
|
const parts = [];
|
|
37
34
|
let i = 0;
|
|
@@ -9,7 +9,5 @@ export declare function supportsFieldSizing(): boolean;
|
|
|
9
9
|
* min-block-size and max-block-size clamp the height.
|
|
10
10
|
*/
|
|
11
11
|
export declare function fitTextareaHeight(textarea: HTMLTextAreaElement): number;
|
|
12
|
-
/** Sets the input's inline width to fit its value, or its placeholder while empty. */
|
|
13
12
|
export declare function fitInputWidth(input: HTMLInputElement): number;
|
|
14
|
-
/** Calls `refit` when web fonts finish loading, which changes text metrics after the first measurement. */
|
|
15
13
|
export declare function onFontsLoaded(refit: () => void, signal: AbortSignal): void;
|
|
@@ -20,7 +20,6 @@ function fitTextareaHeight(textarea) {
|
|
|
20
20
|
textarea.scrollTop = scrollTop;
|
|
21
21
|
return height;
|
|
22
22
|
}
|
|
23
|
-
/** Sets the input's inline width to fit its value, or its placeholder while empty. */
|
|
24
23
|
function fitInputWidth(input) {
|
|
25
24
|
const style = getComputedStyle(input);
|
|
26
25
|
const mirror = document.createElement("span");
|
|
@@ -45,7 +44,6 @@ function fitInputWidth(input) {
|
|
|
45
44
|
input.style.width = `${width}px`;
|
|
46
45
|
return width;
|
|
47
46
|
}
|
|
48
|
-
/** Calls `refit` when web fonts finish loading, which changes text metrics after the first measurement. */
|
|
49
47
|
function onFontsLoaded(refit, signal) {
|
|
50
48
|
document.fonts.addEventListener("loadingdone", refit, { signal });
|
|
51
49
|
}
|
|
@@ -23,7 +23,6 @@ export default class FocusTrapHandle {
|
|
|
23
23
|
static shouldRestoreFocus(container: HTMLElement | null | undefined, modal: boolean): boolean;
|
|
24
24
|
/** Whether focus is inside `container` and was moved there by the keyboard, so closing it should hand focus back */
|
|
25
25
|
static isFocusVisibleWithin(container?: HTMLElement | null): boolean;
|
|
26
|
-
/** Focuses the first focusable element in `container`, or the container itself when it holds none */
|
|
27
26
|
static focusFirstOrSelf(container?: HTMLElement | null, options?: FocusOptions): void;
|
|
28
27
|
/** The first focusable element marked autofocus; neither the browser nor Vue focuses one that is inserted later */
|
|
29
28
|
static findAutofocus(container: HTMLElement): FocusableElement | undefined;
|
|
@@ -63,7 +63,6 @@ var FocusTrapHandle = class FocusTrapHandle {
|
|
|
63
63
|
const active = FocusTrapHandle.getActiveElement(container);
|
|
64
64
|
return Boolean(container && active && container.contains(active) && active.matches(":focus-visible"));
|
|
65
65
|
}
|
|
66
|
-
/** Focuses the first focusable element in `container`, or the container itself when it holds none */
|
|
67
66
|
static focusFirstOrSelf(container, options) {
|
|
68
67
|
(container ? FocusTrapHandle.getFocusableElements(container)[0] ?? container : void 0)?.focus(options);
|
|
69
68
|
}
|
|
@@ -12,7 +12,6 @@ export default class FocusScope {
|
|
|
12
12
|
activate(container: HTMLElement, preventScroll?: boolean): void;
|
|
13
13
|
/** Focuses `container` without trapping Tab, for a non-modal overlay; an element inside may already have focus */
|
|
14
14
|
enter(container: HTMLElement, preventScroll?: boolean): void;
|
|
15
|
-
/** `activate` for a modal overlay, `enter` for a non-modal one */
|
|
16
15
|
engage: (container: HTMLElement, modal: boolean, preventScroll?: boolean) => void;
|
|
17
16
|
deactivate: () => void;
|
|
18
17
|
/** Focuses the recorded element again; call it after the inert around the overlay is released */
|
|
@@ -54,7 +54,6 @@ var FocusScope = class {
|
|
|
54
54
|
if (!container.contains(FocusTrapHandle.getActiveElement(container))) container.focus({ preventScroll });
|
|
55
55
|
if (!container.contains(FocusTrapHandle.getActiveElement(container))) FocusTrapHandle.getFocusableElements(container)[0]?.focus({ preventScroll });
|
|
56
56
|
}
|
|
57
|
-
/** `activate` for a modal overlay, `enter` for a non-modal one */
|
|
58
57
|
engage = (container, modal, preventScroll) => {
|
|
59
58
|
if (modal) this.activate(container, preventScroll);
|
|
60
59
|
else this.enter(container, preventScroll);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* the body's own margin and any width set by the page's stylesheet.
|
|
2
|
+
* Locks are counted, so stacked overlays release the page only when the last one closes. The body's end padding grows
|
|
3
|
+
* by the scrollbar width, so the page does not shift sideways when its scrollbar disappears; padding rather than width
|
|
4
|
+
* keeps the body's own margin and any width set by the page's stylesheet.
|
|
6
5
|
*/
|
|
7
6
|
export declare function lockBodyScroll(): () => void;
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
let lockCount = 0;
|
|
3
3
|
let restore = null;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* the body's own margin and any width set by the page's stylesheet.
|
|
5
|
+
* Locks are counted, so stacked overlays release the page only when the last one closes. The body's end padding grows
|
|
6
|
+
* by the scrollbar width, so the page does not shift sideways when its scrollbar disappears; padding rather than width
|
|
7
|
+
* keeps the body's own margin and any width set by the page's stylesheet.
|
|
9
8
|
*/
|
|
10
9
|
function lockBodyScroll() {
|
|
11
10
|
if (lockCount === 0) {
|
package/dist/utils/tween.d.ts
CHANGED
|
@@ -10,5 +10,4 @@ export interface TweenOptions {
|
|
|
10
10
|
onFrame: (value: number) => void;
|
|
11
11
|
onEnd?: () => void;
|
|
12
12
|
}
|
|
13
|
-
/** Animates a number from `from` to `to` once per frame; returns a function that cancels it */
|
|
14
13
|
export declare function tween({ from, to, duration, easing, onFrame, onEnd }: TweenOptions): () => void;
|
package/dist/utils/tween.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// src/utils/tween.ts
|
|
2
2
|
const linear = (t) => t;
|
|
3
3
|
const easeInOutCubic = (t) => t < .5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2;
|
|
4
|
-
/** Animates a number from `from` to `to` once per frame; returns a function that cancels it */
|
|
5
4
|
function tween({ from, to, duration, easing = linear, onFrame, onEnd }) {
|
|
6
5
|
let start;
|
|
7
6
|
let frame = requestAnimationFrame(function step(now) {
|
package/dist/utils/uuid.d.ts
CHANGED
package/dist/utils/uuid.js
CHANGED
package/dist/utils/warning.d.ts
CHANGED
package/dist/utils/warning.js
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
function isDev() {
|
|
8
8
|
return process.env.NODE_ENV !== "production";
|
|
9
9
|
}
|
|
10
|
-
/** Prints `info` as a development-time warning when `flag` holds; production builds print nothing */
|
|
11
10
|
function warning(flag, info) {
|
|
12
11
|
if (flag && isDev()) console.warn(`Warning: ${info}`);
|
|
13
12
|
}
|
|
@@ -58,7 +58,6 @@ export default class VideoProgressFoundation<P extends VideoProgressBaseProps =
|
|
|
58
58
|
static getMarkerTitle(list: MarkerListItem[], value: number): string | undefined;
|
|
59
59
|
/** The handle's `left`; the 8px is half the handle's width in the stylesheet */
|
|
60
60
|
static getHandleLeft(value: number, max: number): string;
|
|
61
|
-
/** How much of a marker `value` covers, as a CSS width */
|
|
62
61
|
static getValueWidth({ start, end }: MarkerListItem, value: number): string;
|
|
63
62
|
/** The APG slider keys: arrows move by `step`, PageUp and PageDown by a tenth of `max`, Home and End to the ends */
|
|
64
63
|
handleKeyDown: (e: ProgressKeyboardEvent) => void;
|
|
@@ -53,7 +53,6 @@ var VideoProgressFoundation = class VideoProgressFoundation extends BaseFoundati
|
|
|
53
53
|
static getHandleLeft(value, max) {
|
|
54
54
|
return `calc(${(max ? value / max : 0) * 100}% - 8px)`;
|
|
55
55
|
}
|
|
56
|
-
/** How much of a marker `value` covers, as a CSS width */
|
|
57
56
|
static getValueWidth({ start, end }, value) {
|
|
58
57
|
if (end <= start) return "0%";
|
|
59
58
|
if (value > end) return "calc(100% - 2px)";
|
|
@@ -9,7 +9,7 @@ $color-videoPlayer_notification-bg: var(--semi-color-overlay-bg); // notificatio
|
|
|
9
9
|
$color-videoPlayer_notification-text: var(--semi-color-default); // notification 字体色
|
|
10
10
|
$color-videoPlayer_controls-bg: rgba(28, 31, 35, 0.8); // 控制栏背景色
|
|
11
11
|
$color-videoPlayer_controls-text: #fff; // 控制栏文字色
|
|
12
|
-
//
|
|
12
|
+
// control bar text is always white, so this cannot use --semi-grey-8, which flips with the theme
|
|
13
13
|
$color-videoPlayer_controls_popup-bg: rgb(46, 50, 56); // 音量弹层与菜单背景色
|
|
14
14
|
$color-videoPlayer_controls_item_popup-bg-default: var(--semi-color-overlay-bg); // 控制栏弹层背景色
|
|
15
15
|
$color-videoPlayer_controls_item_popup-bg-hover: rgba(67, 68, 74, 1); // 控制栏弹层背景色 - hover
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibrae/semi-foundation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://semi-design-next.pages.dev",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@date-fns/tz": "^1.5.0",
|
|
27
27
|
"@dnd-kit/dom": "~0.5.1",
|
|
28
|
-
"@fibrae/semi-json-viewer-core": "0.
|
|
28
|
+
"@fibrae/semi-json-viewer-core": "0.3.0",
|
|
29
29
|
"@mdx-js/mdx": "^3.1.1",
|
|
30
30
|
"@shikijs/core": "^4.5.0",
|
|
31
31
|
"async-validator": "^4.2.5",
|