@bluepic/embed 0.7.0-layouts.1 → 0.7.0-layouts.2
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/bluepic-embed.iife.js +137 -137
- package/dist/bluepic-embed.umd.js +137 -137
- package/dist/components/BxCarousel.vue.d.ts +55 -0
- package/dist/components/BxChips.vue.d.ts +35 -0
- package/dist/components/BxDrawer.vue.d.ts +27 -1
- package/dist/components/BxDrawerSheetBody.vue.d.ts +18 -0
- package/dist/components/BxNavMenu.vue.d.ts +35 -0
- package/dist/components/BxTreeNav.vue.d.ts +47 -0
- package/dist/components/BxTreeNavBranch.vue.d.ts +7 -0
- package/dist/components/Tabs.vue.d.ts +10 -0
- package/dist/components/treeNav.d.ts +32 -0
- package/dist/main.cjs +17 -17
- package/dist/main.d.ts +9 -0
- package/dist/main.mjs +10323 -9075
- package/dist/style.css +1 -1
- package/dist/util/a11y/reducedMotion.d.ts +5 -0
- package/dist/util/layout/scrollLock.d.ts +1 -0
- package/dist/util/layout/useScrollSpy.d.ts +24 -0
- package/dist/util/pageView.d.ts +127 -0
- package/package.json +4 -2
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
3
|
+
readonly "onUpdate:index"?: ((value: number) => any) | undefined;
|
|
4
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:index"> & ({
|
|
5
|
+
items: readonly T[];
|
|
6
|
+
mode?: "3d" | "flat";
|
|
7
|
+
/** Stable key of an item. Default: its index. */
|
|
8
|
+
itemKey?: (item: T, index: number) => string | number;
|
|
9
|
+
/** Wrap around at the ends. */
|
|
10
|
+
loop?: boolean;
|
|
11
|
+
/** Side cards per side on the 3D stage. */
|
|
12
|
+
visible?: number;
|
|
13
|
+
/** CSS width of a card. */
|
|
14
|
+
cardWidth?: string;
|
|
15
|
+
/** Gap between cards in flat mode. */
|
|
16
|
+
gap?: string;
|
|
17
|
+
arrows?: boolean;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** Accessible name of a slide, also announced after a change. */
|
|
20
|
+
slideLabel?: (index: number, count: number) => string;
|
|
21
|
+
prevLabel?: string;
|
|
22
|
+
nextLabel?: string;
|
|
23
|
+
/** Extra attributes on the flat row (for example a host's sortable contract). */
|
|
24
|
+
listAttrs?: Record<string, string | number | boolean | undefined>;
|
|
25
|
+
/** Extra attributes per card. */
|
|
26
|
+
itemAttrs?: (item: T, index: number) => Record<string, string | number | boolean | undefined>;
|
|
27
|
+
} & {
|
|
28
|
+
index?: number;
|
|
29
|
+
}) & Partial<{}>> & import("vue").PublicProps;
|
|
30
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
31
|
+
go: (i: number) => void;
|
|
32
|
+
mode: import("vue").ComputedRef<"flat" | "3d">;
|
|
33
|
+
}>): void;
|
|
34
|
+
attrs: any;
|
|
35
|
+
slots: {
|
|
36
|
+
/** The front card. Optional: without it the front card renders `item` too. */
|
|
37
|
+
front?: (scope: {
|
|
38
|
+
item: T;
|
|
39
|
+
index: number;
|
|
40
|
+
}) => unknown;
|
|
41
|
+
item?: (scope: {
|
|
42
|
+
item: T;
|
|
43
|
+
index: number;
|
|
44
|
+
active: boolean;
|
|
45
|
+
offset: number;
|
|
46
|
+
}) => unknown;
|
|
47
|
+
};
|
|
48
|
+
emit: (evt: "update:index", value: number) => void;
|
|
49
|
+
}>) => import("vue").VNode & {
|
|
50
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
51
|
+
};
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_PrettifyLocal<T> = {
|
|
54
|
+
[K in keyof T]: T[K];
|
|
55
|
+
} & {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type BxChipOption = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
count?: number | null;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
options: readonly BxChipOption[];
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
/** Label of a leading "all" chip. Omitted: no such chip. */
|
|
11
|
+
allLabel?: string | null;
|
|
12
|
+
/** Wrap onto several lines instead of scrolling sideways. */
|
|
13
|
+
wrap?: boolean;
|
|
14
|
+
size?: 'small' | 'medium';
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
ariaLabelledby?: string;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
19
|
+
modelValue?: string | null | string[];
|
|
20
|
+
};
|
|
21
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
toggle: (id: string | null, selected: boolean) => any;
|
|
23
|
+
"update:modelValue": (value: string | string[] | null) => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
|
+
onToggle?: ((id: string | null, selected: boolean) => any) | undefined;
|
|
26
|
+
"onUpdate:modelValue"?: ((value: string | string[] | null) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
ariaLabel: string;
|
|
29
|
+
ariaLabelledby: string;
|
|
30
|
+
multiple: boolean;
|
|
31
|
+
size: "small" | "medium";
|
|
32
|
+
wrap: boolean;
|
|
33
|
+
allLabel: string | null;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
export default _default;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Side drawer on the global popup stack. Focus trap, Escape and focus return
|
|
3
|
+
* come from the popup provider (`useFocusTrap`).
|
|
4
|
+
*
|
|
5
|
+
* `sheet` (opt-in, default off) turns it into a modal editor sheet:
|
|
6
|
+
* `role="dialog"` + `aria-modal`, named by its heading; focus moves to the
|
|
7
|
+
* heading on open; full screen below `fullscreenBelow` px viewport width
|
|
8
|
+
* (default 600); safe-area insets; the page behind does not scroll
|
|
9
|
+
* (`lockScroll`); a sticky `footer` slot. Without `sheet` nothing changes.
|
|
10
|
+
*/
|
|
11
|
+
import { type VNode } from 'vue';
|
|
2
12
|
export type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
|
|
3
13
|
type __VLS_Props = {
|
|
4
14
|
trigger?: 'manual' | 'click';
|
|
@@ -11,6 +21,14 @@ type __VLS_Props = {
|
|
|
11
21
|
customClasses?: string[];
|
|
12
22
|
wrapperCustomClasses?: string[];
|
|
13
23
|
disableBackgroundEffect?: boolean;
|
|
24
|
+
/** Modal editor sheet (see above). Default false: today's drawer. */
|
|
25
|
+
sheet?: boolean;
|
|
26
|
+
/** Sheet only: below this viewport width (px) the sheet covers the screen. 0 = never. Default 600. */
|
|
27
|
+
fullscreenBelow?: number;
|
|
28
|
+
/** Sheet only: lock the page scroll while open. `true` locks the document; an element locks that scroll container. Default true. */
|
|
29
|
+
lockScroll?: boolean | HTMLElement | null;
|
|
30
|
+
/** Sheet only: accessible name when there is no heading. */
|
|
31
|
+
ariaLabel?: string;
|
|
14
32
|
};
|
|
15
33
|
type __VLS_Slots = {
|
|
16
34
|
default: (scope: {
|
|
@@ -26,12 +44,17 @@ type __VLS_Slots = {
|
|
|
26
44
|
['close-btn']?: (scope: {
|
|
27
45
|
close: () => void;
|
|
28
46
|
}) => VNode[];
|
|
47
|
+
/** Sheet only: sticky bar at the bottom (actions). */
|
|
48
|
+
footer?: (scope: {
|
|
49
|
+
close: () => void;
|
|
50
|
+
}) => VNode[];
|
|
29
51
|
};
|
|
30
52
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
53
|
"update:show": (args_0: boolean) => any;
|
|
32
54
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
33
55
|
"onUpdate:show"?: ((args_0: boolean) => any) | undefined;
|
|
34
56
|
}>, {
|
|
57
|
+
ariaLabel: string;
|
|
35
58
|
width: string;
|
|
36
59
|
disableBackgroundEffect: boolean;
|
|
37
60
|
wrapperCustomClasses: string[];
|
|
@@ -41,6 +64,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
41
64
|
closeable: boolean;
|
|
42
65
|
customClasses: string[];
|
|
43
66
|
height: string;
|
|
67
|
+
sheet: boolean;
|
|
68
|
+
fullscreenBelow: number;
|
|
69
|
+
lockScroll: boolean | HTMLElement | null;
|
|
44
70
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
71
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
46
72
|
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
headingId: string;
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
} & {
|
|
9
|
+
footer?: (props: typeof __VLS_3) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type BxNavItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
count?: number | null;
|
|
5
|
+
href?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
children?: readonly BxNavItem[] | null;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
items: readonly BxNavItem[];
|
|
11
|
+
overflow?: 'more' | 'scroll' | 'wrap';
|
|
12
|
+
align?: 'start' | 'center' | 'end';
|
|
13
|
+
moreLabel?: string;
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
};
|
|
16
|
+
declare function measure(): void;
|
|
17
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
18
|
+
'active'?: string | null;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
21
|
+
close: () => null;
|
|
22
|
+
measure: typeof measure;
|
|
23
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
select: (item: BxNavItem) => any;
|
|
25
|
+
"update:active": (value: string | null) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
+
onSelect?: ((item: BxNavItem) => any) | undefined;
|
|
28
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
ariaLabel: string;
|
|
31
|
+
align: "start" | "center" | "end";
|
|
32
|
+
overflow: "more" | "scroll" | "wrap";
|
|
33
|
+
moreLabel: string;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type BxTreeNode } from './treeNav';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
nodes: readonly BxTreeNode[];
|
|
4
|
+
showCounts?: boolean;
|
|
5
|
+
/** Selecting a node with children also opens it. */
|
|
6
|
+
expandOnSelect?: boolean;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
ariaLabelledby?: string;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {
|
|
11
|
+
/** Replaces the label text of a row. */
|
|
12
|
+
label?: (scope: {
|
|
13
|
+
node: BxTreeNode;
|
|
14
|
+
level: number;
|
|
15
|
+
expanded: boolean;
|
|
16
|
+
active: boolean;
|
|
17
|
+
}) => unknown;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
20
|
+
'active'?: string | null;
|
|
21
|
+
'expanded'?: string[];
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
24
|
+
focus: () => void | "";
|
|
25
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
select: (node: BxTreeNode) => any;
|
|
27
|
+
toggle: (id: string, expanded: boolean) => any;
|
|
28
|
+
"update:active": (value: string | null) => any;
|
|
29
|
+
"update:expanded": (value: string[]) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
31
|
+
onSelect?: ((node: BxTreeNode) => any) | undefined;
|
|
32
|
+
onToggle?: ((id: string, expanded: boolean) => any) | undefined;
|
|
33
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
34
|
+
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
ariaLabel: string;
|
|
37
|
+
ariaLabelledby: string;
|
|
38
|
+
showCounts: boolean;
|
|
39
|
+
expandOnSelect: boolean;
|
|
40
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
42
|
+
export default _default;
|
|
43
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
44
|
+
new (): {
|
|
45
|
+
$slots: S;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BxTreeNode } from './treeNav';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
nodes: readonly BxTreeNode[];
|
|
4
|
+
level: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -9,10 +9,15 @@
|
|
|
9
9
|
* A tab is a plain string (id = label, the old API) or `{ id, label }`, so two
|
|
10
10
|
* entries may share a label. Many tabs scroll horizontally; soft fades mark the
|
|
11
11
|
* hidden ones and the active tab is scrolled into view.
|
|
12
|
+
*
|
|
13
|
+
* `variant`: `boxed` (default, bordered buttons), `underline` (a bar with an
|
|
14
|
+
* indicator under the active tab), `pill` (rounded, the active one filled).
|
|
15
|
+
* An object tab may carry a `count`, shown after the label.
|
|
12
16
|
*/
|
|
13
17
|
type TabEntry = string | {
|
|
14
18
|
id: string;
|
|
15
19
|
label: string;
|
|
20
|
+
count?: number | null;
|
|
16
21
|
};
|
|
17
22
|
type __VLS_Props = {
|
|
18
23
|
tabs: TabEntry[];
|
|
@@ -22,6 +27,9 @@ type __VLS_Props = {
|
|
|
22
27
|
panelId?: string;
|
|
23
28
|
/** Prefix of every tab button's DOM id (`<prefix>-<tab id>`). */
|
|
24
29
|
idPrefix?: string;
|
|
30
|
+
variant?: 'boxed' | 'underline' | 'pill';
|
|
31
|
+
/** `start`: tabs start at the left edge instead of centring. */
|
|
32
|
+
align?: 'center' | 'start';
|
|
25
33
|
};
|
|
26
34
|
declare function tabElementId(id: string): string;
|
|
27
35
|
type __VLS_PublicProps = __VLS_Props & {
|
|
@@ -38,6 +46,8 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
38
46
|
}>, {
|
|
39
47
|
ariaLabel: string;
|
|
40
48
|
mode: "anchors" | "tabs";
|
|
49
|
+
variant: "boxed" | "underline" | "pill";
|
|
50
|
+
align: "center" | "start";
|
|
41
51
|
panelId: string;
|
|
42
52
|
idPrefix: string;
|
|
43
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { InjectionKey, Slot } from 'vue';
|
|
2
|
+
export type BxTreeNode = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Shown after the label. */
|
|
6
|
+
count?: number | null;
|
|
7
|
+
/** Hover text (`title`). */
|
|
8
|
+
description?: string | null;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
children?: readonly BxTreeNode[] | null;
|
|
11
|
+
};
|
|
12
|
+
export type BxTreeNavContext = {
|
|
13
|
+
isExpanded: (id: string) => boolean;
|
|
14
|
+
isActive: (id: string) => boolean;
|
|
15
|
+
isTabbable: (id: string) => boolean;
|
|
16
|
+
showCounts: () => boolean;
|
|
17
|
+
activate: (node: BxTreeNode) => void;
|
|
18
|
+
toggle: (node: BxTreeNode) => void;
|
|
19
|
+
focus: (id: string) => void;
|
|
20
|
+
setItemEl: (id: string, el: HTMLElement | null) => void;
|
|
21
|
+
labelSlot: () => Slot | undefined;
|
|
22
|
+
};
|
|
23
|
+
export declare const TREE_NAV_KEY: InjectionKey<BxTreeNavContext>;
|
|
24
|
+
export type TreeRow = {
|
|
25
|
+
node: BxTreeNode;
|
|
26
|
+
level: number;
|
|
27
|
+
parentId: string | null;
|
|
28
|
+
};
|
|
29
|
+
/** Rows a keyboard user can reach: every node whose ancestors are all expanded, in display order. */
|
|
30
|
+
export declare function visibleTreeRows(nodes: readonly BxTreeNode[], isExpanded: (id: string) => boolean, level?: number, parentId?: string | null, out?: TreeRow[]): TreeRow[];
|
|
31
|
+
/** Ids from the root down to the node's parent, or null when the id is not in the tree. */
|
|
32
|
+
export declare function treeAncestors(nodes: readonly BxTreeNode[], id: string, path?: string[]): string[] | null;
|