@skewedaspect/sleekspace-ui 0.7.1 → 0.8.1
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/Button/SkButton.vue.d.ts +8 -0
- package/dist/components/NavBar/SkNavBar.vue.d.ts +1 -0
- package/dist/components/NavBar/context.d.ts +3 -0
- package/dist/components/Page/SkPage.vue.d.ts +127 -30
- package/dist/components/Page/SkPageSidebarToggle.vue.d.ts +41 -0
- package/dist/components/Page/index.d.ts +1 -0
- package/dist/components/Page/types.d.ts +28 -5
- package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +9 -0
- package/dist/components/Select/SkSelectItem.vue.d.ts +6 -18
- package/dist/components/Sidebar/SkSidebar.vue.d.ts +9 -1
- package/dist/components/Skeleton/SkSkeleton.vue.d.ts +2 -2
- package/dist/components/Tabs/SkTabs.vue.d.ts +1 -1
- package/dist/components/TreeView/SkTreeView.vue.d.ts +5 -5
- package/dist/composables/useFocusTrap.d.ts +17 -0
- package/dist/composables/useFocusTrap.test.d.ts +1 -0
- package/dist/composables/usePageDrawer.d.ts +35 -0
- package/dist/index.d.ts +2 -0
- package/dist/sleekspace-ui.css +984 -291
- package/dist/sleekspace-ui.es.js +31559 -29868
- package/dist/sleekspace-ui.umd.js +32210 -30438
- package/dist/styles/mixins/fluidSize.test.d.ts +1 -0
- package/dist/tokens.css +60 -0
- package/llms-full.txt +6349 -0
- package/llms.txt +46 -0
- package/package.json +16 -11
- package/src/components/Button/SkButton.vue +25 -13
- package/src/components/NavBar/SkNavBar.vue +12 -1
- package/src/components/NavBar/context.ts +16 -0
- package/src/components/Page/SkPage.vue +460 -72
- package/src/components/Page/SkPageSidebarToggle.vue +148 -0
- package/src/components/Page/index.ts +1 -0
- package/src/components/Page/types.ts +30 -5
- package/src/components/ScrollArea/SkScrollArea.vue +12 -0
- package/src/components/Select/SkSelectItem.vue +2 -2
- package/src/components/Sidebar/SkSidebar.vue +10 -0
- package/src/components/TreeView/SkTreeView.vue +6 -6
- package/src/composables/useFocusTrap.test.ts +184 -0
- package/src/composables/useFocusTrap.ts +141 -0
- package/src/composables/usePageDrawer.ts +96 -0
- package/src/global.d.ts +1 -0
- package/src/index.ts +5 -0
- package/src/styles/components/_accordion.scss +15 -0
- package/src/styles/components/_alert.scss +1 -0
- package/src/styles/components/_avatar.scss +1 -0
- package/src/styles/components/_breadcrumbs.scss +7 -0
- package/src/styles/components/_button.scss +291 -214
- package/src/styles/components/_checkbox.scss +9 -1
- package/src/styles/components/_collapsible.scss +15 -0
- package/src/styles/components/_color-picker.scss +4 -1
- package/src/styles/components/_input.scss +1 -0
- package/src/styles/components/_listbox.scss +8 -2
- package/src/styles/components/_menu.scss +9 -2
- package/src/styles/components/_modal.scss +18 -2
- package/src/styles/components/_navbar.scss +22 -6
- package/src/styles/components/_number-input.scss +1 -0
- package/src/styles/components/_page.scss +220 -12
- package/src/styles/components/_pagination.scss +10 -1
- package/src/styles/components/_panel.scss +8 -3
- package/src/styles/components/_popover.scss +15 -2
- package/src/styles/components/_progress.scss +14 -0
- package/src/styles/components/_radio.scss +8 -1
- package/src/styles/components/_scroll-area.scss +56 -0
- package/src/styles/components/_select.scss +3 -1
- package/src/styles/components/_sidebar.scss +78 -38
- package/src/styles/components/_skeleton.scss +18 -0
- package/src/styles/components/_slider.scss +1 -0
- package/src/styles/components/_spinner.scss +15 -0
- package/src/styles/components/_switch.scss +5 -0
- package/src/styles/components/_table.scss +1 -0
- package/src/styles/components/_tabs.scss +6 -0
- package/src/styles/components/_tag.scss +2 -0
- package/src/styles/components/_tags-input.scss +1 -0
- package/src/styles/components/_textarea.scss +1 -0
- package/src/styles/components/_toast.scss +16 -1
- package/src/styles/components/_toolbar.scss +2 -0
- package/src/styles/components/_tooltip.scss +14 -1
- package/src/styles/components/_tree-view.scss +6 -1
- package/src/styles/mixins/_index.scss +1 -0
- package/src/styles/mixins/_responsive.scss +184 -0
- package/src/styles/mixins/fluidSize.test.ts +149 -0
- package/src/styles/tokens/_foundation-breakpoints.scss +26 -0
- package/src/styles/tokens/_foundation-z-index.scss +38 -0
- package/src/styles/tokens/index.scss +2 -0
- package/web-types.json +194 -14
|
@@ -50,6 +50,13 @@ export interface SkButtonComponentProps extends ComponentCustomColors {
|
|
|
50
50
|
* @default false
|
|
51
51
|
*/
|
|
52
52
|
pressed?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Opts out of the coarse-pointer touch-target floor (44px minimum on touch devices).
|
|
55
|
+
* Use for tight toolbars, data tables, or other contexts where a compact size is preferable
|
|
56
|
+
* to the default touch-friendly floor. On fine-pointer devices (mouse) this has no effect.
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
dense?: boolean;
|
|
53
60
|
/**
|
|
54
61
|
* URL for the button to navigate to. When provided, the button renders as an `<a>` element
|
|
55
62
|
* instead of a `<button>`. Use for external links or simple navigation that doesn't require
|
|
@@ -87,6 +94,7 @@ declare const __VLS_component: import('vue').DefineComponent<SkButtonComponentPr
|
|
|
87
94
|
variant: SkButtonVariant;
|
|
88
95
|
loading: boolean;
|
|
89
96
|
pressed: boolean;
|
|
97
|
+
dense: boolean;
|
|
90
98
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
91
99
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
92
100
|
export default _default;
|
|
@@ -1,60 +1,157 @@
|
|
|
1
1
|
import { SkThemeName } from '../Theme/types';
|
|
2
|
-
import {
|
|
2
|
+
import { SkPagePanelMode } from './types';
|
|
3
3
|
export interface SkPageComponentProps {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* will be positioned on the specified side, with the main content area filling the
|
|
7
|
-
* remaining space. Has no effect if the sidebar slot is not provided.
|
|
8
|
-
* @default 'left'
|
|
9
|
-
*/
|
|
10
|
-
sidebarPosition?: SkPageSidebarPosition;
|
|
11
|
-
/**
|
|
12
|
-
* When true, the header remains fixed at the top of the viewport while the main
|
|
13
|
-
* content scrolls beneath it. Useful for keeping navigation always accessible.
|
|
14
|
-
* The content area adjusts its top padding to prevent overlap with the fixed header.
|
|
5
|
+
* When true, the header remains sticky at the top of the viewport while the main content scrolls.
|
|
15
6
|
* @default false
|
|
16
7
|
*/
|
|
17
8
|
fixedHeader?: boolean;
|
|
18
9
|
/**
|
|
19
|
-
* When true, the footer remains
|
|
20
|
-
* content scrolls above it. Useful for persistent action bars or important links.
|
|
21
|
-
* The content area adjusts its bottom padding to prevent overlap with the fixed footer.
|
|
10
|
+
* When true, the footer remains sticky at the bottom of the viewport while the main content scrolls.
|
|
22
11
|
* @default false
|
|
23
12
|
*/
|
|
24
13
|
fixedFooter?: boolean;
|
|
25
14
|
/**
|
|
26
|
-
* Custom width for the sidebar
|
|
27
|
-
*
|
|
28
|
-
* Only applies when the sidebar slot is provided.
|
|
15
|
+
* Custom width for the sidebar (persistent and drawer). Accepts any CSS length. When not specified,
|
|
16
|
+
* uses the `--sk-page-sidebar-width` token default (16rem).
|
|
29
17
|
*/
|
|
30
18
|
sidebarWidth?: string;
|
|
31
19
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
* Custom width for the aside (persistent and drawer). Accepts any CSS length. When not specified,
|
|
21
|
+
* uses the `--sk-page-aside-width` token default (16rem).
|
|
22
|
+
*/
|
|
23
|
+
asideWidth?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Sidebar rendering mode.
|
|
26
|
+
* - `auto`: persistent above `sidebarBreakpoint`, drawer below. Default.
|
|
27
|
+
* - `persistent`: always inline.
|
|
28
|
+
* - `drawer`: always off-canvas.
|
|
29
|
+
* @default 'auto'
|
|
30
|
+
*/
|
|
31
|
+
sidebarMode?: SkPagePanelMode;
|
|
32
|
+
/**
|
|
33
|
+
* Aside rendering mode. Mirror of `sidebarMode` for the right-side panel.
|
|
34
|
+
* @default 'auto'
|
|
35
|
+
*/
|
|
36
|
+
asideMode?: SkPagePanelMode;
|
|
37
|
+
/**
|
|
38
|
+
* Viewport width below which the sidebar's `auto` mode switches to drawer. Accepts any CSS length.
|
|
39
|
+
* @default '1024px'
|
|
40
|
+
*/
|
|
41
|
+
sidebarBreakpoint?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Viewport width below which the aside's `auto` mode switches to drawer. Accepts any CSS length.
|
|
44
|
+
* @default '1024px'
|
|
45
|
+
*/
|
|
46
|
+
asideBreakpoint?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Controlled sidebar drawer open state. Bind via `v-model:sidebarOpen` to control programmatically.
|
|
49
|
+
* When omitted, SkPage manages state internally.
|
|
50
|
+
*/
|
|
51
|
+
sidebarOpen?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Controlled aside drawer open state. Bind via `v-model:asideOpen` to control programmatically.
|
|
54
|
+
* When omitted, SkPage manages state internally.
|
|
55
|
+
*/
|
|
56
|
+
asideOpen?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Optional theme name. When provided, SkPage acts as a theme provider -- setting `data-scheme`
|
|
59
|
+
* on the root element and providing theme context for descendant components (including portal
|
|
60
|
+
* components like dropdowns and modals).
|
|
36
61
|
*/
|
|
37
62
|
theme?: SkThemeName;
|
|
63
|
+
/**
|
|
64
|
+
* When true, zeroes out `--sk-page-gap` and `--sk-page-content-padding` so panels and content
|
|
65
|
+
* sit flush against the header, footer, edges, and each other.
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
flush?: boolean;
|
|
38
69
|
}
|
|
39
70
|
declare function __VLS_template(): {
|
|
40
71
|
attrs: Partial<{}>;
|
|
41
|
-
slots: {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
72
|
+
slots: Readonly<{
|
|
73
|
+
default?: () => unknown;
|
|
74
|
+
header?: () => unknown;
|
|
75
|
+
subheader?: () => unknown;
|
|
76
|
+
sidebar?: (props: {
|
|
77
|
+
isDrawer: boolean;
|
|
78
|
+
}) => unknown;
|
|
79
|
+
'sidebar-header'?: (props: {
|
|
80
|
+
isDrawer: boolean;
|
|
81
|
+
}) => unknown;
|
|
82
|
+
'sidebar-footer'?: (props: {
|
|
83
|
+
isDrawer: boolean;
|
|
84
|
+
}) => unknown;
|
|
85
|
+
'main-header'?: () => unknown;
|
|
86
|
+
'main-footer'?: () => unknown;
|
|
87
|
+
aside?: (props: {
|
|
88
|
+
isDrawer: boolean;
|
|
89
|
+
}) => unknown;
|
|
90
|
+
'aside-header'?: (props: {
|
|
91
|
+
isDrawer: boolean;
|
|
92
|
+
}) => unknown;
|
|
93
|
+
'aside-footer'?: (props: {
|
|
94
|
+
isDrawer: boolean;
|
|
95
|
+
}) => unknown;
|
|
96
|
+
footer?: () => unknown;
|
|
97
|
+
}> & {
|
|
98
|
+
default?: () => unknown;
|
|
99
|
+
header?: () => unknown;
|
|
100
|
+
subheader?: () => unknown;
|
|
101
|
+
sidebar?: (props: {
|
|
102
|
+
isDrawer: boolean;
|
|
103
|
+
}) => unknown;
|
|
104
|
+
'sidebar-header'?: (props: {
|
|
105
|
+
isDrawer: boolean;
|
|
106
|
+
}) => unknown;
|
|
107
|
+
'sidebar-footer'?: (props: {
|
|
108
|
+
isDrawer: boolean;
|
|
109
|
+
}) => unknown;
|
|
110
|
+
'main-header'?: () => unknown;
|
|
111
|
+
'main-footer'?: () => unknown;
|
|
112
|
+
aside?: (props: {
|
|
113
|
+
isDrawer: boolean;
|
|
114
|
+
}) => unknown;
|
|
115
|
+
'aside-header'?: (props: {
|
|
116
|
+
isDrawer: boolean;
|
|
117
|
+
}) => unknown;
|
|
118
|
+
'aside-footer'?: (props: {
|
|
119
|
+
isDrawer: boolean;
|
|
120
|
+
}) => unknown;
|
|
121
|
+
footer?: () => unknown;
|
|
122
|
+
};
|
|
123
|
+
refs: {
|
|
124
|
+
rootRef: HTMLDivElement;
|
|
125
|
+
sidebarDrawerRef: HTMLElement;
|
|
126
|
+
asideDrawerRef: HTMLElement;
|
|
46
127
|
};
|
|
47
|
-
refs: {};
|
|
48
128
|
rootEl: HTMLDivElement;
|
|
49
129
|
};
|
|
50
130
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
51
|
-
declare const __VLS_component: import('vue').DefineComponent<SkPageComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
131
|
+
declare const __VLS_component: import('vue').DefineComponent<SkPageComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
132
|
+
"update:sidebarOpen": (value: boolean) => any;
|
|
133
|
+
"update:asideOpen": (value: boolean) => any;
|
|
134
|
+
}, string, import('vue').PublicProps, Readonly<SkPageComponentProps> & Readonly<{
|
|
135
|
+
"onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
|
|
136
|
+
"onUpdate:asideOpen"?: ((value: boolean) => any) | undefined;
|
|
137
|
+
}>, {
|
|
52
138
|
theme: SkThemeName;
|
|
53
|
-
sidebarPosition: SkPageSidebarPosition;
|
|
54
139
|
fixedHeader: boolean;
|
|
55
140
|
fixedFooter: boolean;
|
|
56
141
|
sidebarWidth: string;
|
|
57
|
-
|
|
142
|
+
asideWidth: string;
|
|
143
|
+
sidebarMode: SkPagePanelMode;
|
|
144
|
+
asideMode: SkPagePanelMode;
|
|
145
|
+
sidebarBreakpoint: string;
|
|
146
|
+
asideBreakpoint: string;
|
|
147
|
+
sidebarOpen: boolean;
|
|
148
|
+
asideOpen: boolean;
|
|
149
|
+
flush: boolean;
|
|
150
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
151
|
+
rootRef: HTMLDivElement;
|
|
152
|
+
sidebarDrawerRef: HTMLElement;
|
|
153
|
+
asideDrawerRef: HTMLElement;
|
|
154
|
+
}, HTMLDivElement>;
|
|
58
155
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
59
156
|
export default _default;
|
|
60
157
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SkButtonKind } from '../Button/types';
|
|
2
|
+
import { SkPageDrawerSide } from './types';
|
|
3
|
+
export interface SkPageSidebarToggleComponentProps {
|
|
4
|
+
/**
|
|
5
|
+
* Which drawer this toggle controls. `sidebar` binds to the left drawer; `aside` binds to the right.
|
|
6
|
+
* @default 'sidebar'
|
|
7
|
+
*/
|
|
8
|
+
side?: SkPageDrawerSide;
|
|
9
|
+
/**
|
|
10
|
+
* Override the toggle's color kind. By default the toggle inherits the enclosing SkNavBar's
|
|
11
|
+
* kind (when placed inside one) and falls back to `neutral` otherwise. Pass a kind explicitly
|
|
12
|
+
* to force a specific color scheme.
|
|
13
|
+
*/
|
|
14
|
+
kind?: SkButtonKind;
|
|
15
|
+
/**
|
|
16
|
+
* Accessible label for the toggle. Screen readers announce this; sighted users see only the glyph.
|
|
17
|
+
* Defaults to a label matching `side`.
|
|
18
|
+
*/
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
declare function __VLS_template(): {
|
|
22
|
+
attrs: Partial<{}>;
|
|
23
|
+
slots: {
|
|
24
|
+
default?(_: {}): any;
|
|
25
|
+
};
|
|
26
|
+
refs: {};
|
|
27
|
+
rootEl: any;
|
|
28
|
+
};
|
|
29
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
30
|
+
declare const __VLS_component: import('vue').DefineComponent<SkPageSidebarToggleComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SkPageSidebarToggleComponentProps> & Readonly<{}>, {
|
|
31
|
+
kind: SkButtonKind;
|
|
32
|
+
side: SkPageDrawerSide;
|
|
33
|
+
ariaLabel: string;
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
import { SkThemeName } from '../Theme/types';
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Sidebar / aside rendering mode.
|
|
4
|
+
* - `auto`: persistent above the matching breakpoint, drawer below. Default.
|
|
5
|
+
* - `persistent`: always inline, regardless of viewport size.
|
|
6
|
+
* - `drawer`: always off-canvas, opens over content.
|
|
7
|
+
*/
|
|
8
|
+
export type SkPagePanelMode = 'auto' | 'persistent' | 'drawer';
|
|
9
|
+
/** @deprecated Use `SkPagePanelMode`. Retained as an alias. */
|
|
10
|
+
export type SkPageSidebarMode = SkPagePanelMode;
|
|
11
|
+
/** Which drawer a toggle button controls. */
|
|
12
|
+
export type SkPageDrawerSide = 'sidebar' | 'aside';
|
|
4
13
|
/** Page props interface */
|
|
5
14
|
export interface SkPageProps {
|
|
6
|
-
/** Sidebar position */
|
|
7
|
-
sidebarPosition?: SkPageSidebarPosition;
|
|
8
15
|
/** Fixed header (stays at top when scrolling) */
|
|
9
16
|
fixedHeader?: boolean;
|
|
10
17
|
/** Fixed footer (stays at bottom when scrolling) */
|
|
11
18
|
fixedFooter?: boolean;
|
|
12
|
-
/** Custom sidebar width */
|
|
19
|
+
/** Custom sidebar width. CSS length. */
|
|
13
20
|
sidebarWidth?: string;
|
|
21
|
+
/** Custom aside width. CSS length. */
|
|
22
|
+
asideWidth?: string;
|
|
23
|
+
/** Sidebar rendering mode. Defaults to 'auto' (persistent above breakpoint, drawer below) */
|
|
24
|
+
sidebarMode?: SkPagePanelMode;
|
|
25
|
+
/** Aside rendering mode. Defaults to 'auto'. */
|
|
26
|
+
asideMode?: SkPagePanelMode;
|
|
27
|
+
/** Breakpoint below which sidebar `auto` mode switches to drawer. CSS length. Default: 1024px */
|
|
28
|
+
sidebarBreakpoint?: string;
|
|
29
|
+
/** Breakpoint below which aside `auto` mode switches to drawer. CSS length. Default: 1024px */
|
|
30
|
+
asideBreakpoint?: string;
|
|
31
|
+
/** Controlled sidebar drawer open state. When omitted, SkPage manages state internally */
|
|
32
|
+
sidebarOpen?: boolean;
|
|
33
|
+
/** Controlled aside drawer open state. When omitted, SkPage manages state internally */
|
|
34
|
+
asideOpen?: boolean;
|
|
14
35
|
/** Optional theme name — when provided, SkPage acts as a theme provider */
|
|
15
36
|
theme?: SkThemeName;
|
|
37
|
+
/** Flush layout (no default gap/padding around main area or inside content) */
|
|
38
|
+
flush?: boolean;
|
|
16
39
|
}
|
|
@@ -5,6 +5,14 @@ export interface SkScrollAreaComponentProps {
|
|
|
5
5
|
kind?: SkScrollAreaKind;
|
|
6
6
|
baseColor?: string;
|
|
7
7
|
textColor?: string;
|
|
8
|
+
/**
|
|
9
|
+
* When true, fade the scrollable edges with a CSS mask so content visibly tapers
|
|
10
|
+
* into/out of the viewport. Applies to whichever axis (or both) is scrollable.
|
|
11
|
+
* Override the fade distance via the `--sk-scroll-area-fade` custom property
|
|
12
|
+
* (default 1.5rem).
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
fade?: boolean;
|
|
8
16
|
}
|
|
9
17
|
declare function __VLS_template(): {
|
|
10
18
|
attrs: Partial<{}>;
|
|
@@ -21,6 +29,7 @@ declare const __VLS_component: import('vue').DefineComponent<SkScrollAreaCompone
|
|
|
21
29
|
baseColor: string;
|
|
22
30
|
textColor: string;
|
|
23
31
|
orientation: SkScrollAreaOrientation;
|
|
32
|
+
fade: boolean;
|
|
24
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
34
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
35
|
export default _default;
|
|
@@ -24,9 +24,7 @@ declare function __VLS_template(): {
|
|
|
24
24
|
readonly asChild?: boolean | undefined;
|
|
25
25
|
readonly as?: (import('reka-ui').AsTag | import('vue').Component) | undefined;
|
|
26
26
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
27
|
-
$attrs:
|
|
28
|
-
[x: string]: unknown;
|
|
29
|
-
};
|
|
27
|
+
$attrs: import('vue').Attrs;
|
|
30
28
|
$refs: {
|
|
31
29
|
[x: string]: unknown;
|
|
32
30
|
};
|
|
@@ -38,9 +36,7 @@ declare function __VLS_template(): {
|
|
|
38
36
|
$host: Element | null;
|
|
39
37
|
$emit: (event: string, ...args: any[]) => void;
|
|
40
38
|
$el: any;
|
|
41
|
-
$options: import('vue').ComponentOptionsBase<Readonly<import('reka-ui').SelectItemTextProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
42
|
-
as: import('reka-ui').AsTag | import('vue').Component;
|
|
43
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
39
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('reka-ui').SelectItemTextProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
44
40
|
beforeCreate?: (() => void) | (() => void)[];
|
|
45
41
|
created?: (() => void) | (() => void)[];
|
|
46
42
|
beforeMount?: (() => void) | (() => void)[];
|
|
@@ -60,9 +56,7 @@ declare function __VLS_template(): {
|
|
|
60
56
|
$forceUpdate: () => void;
|
|
61
57
|
$nextTick: typeof import('vue').nextTick;
|
|
62
58
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
63
|
-
} & Readonly<{
|
|
64
|
-
as: import('reka-ui').AsTag | import('vue').Component;
|
|
65
|
-
}> & Omit<Readonly<import('reka-ui').SelectItemTextProps> & Readonly<{}>, "as"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
59
|
+
} & Readonly<{}> & Omit<Readonly<import('reka-ui').SelectItemTextProps> & Readonly<{}>, never> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
66
60
|
$slots: {
|
|
67
61
|
default?: (props: {}) => any;
|
|
68
62
|
};
|
|
@@ -81,9 +75,7 @@ declare const __VLS_component: import('vue').DefineComponent<SkSelectItemCompone
|
|
|
81
75
|
readonly asChild?: boolean | undefined;
|
|
82
76
|
readonly as?: (import('reka-ui').AsTag | import('vue').Component) | undefined;
|
|
83
77
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
84
|
-
$attrs:
|
|
85
|
-
[x: string]: unknown;
|
|
86
|
-
};
|
|
78
|
+
$attrs: import('vue').Attrs;
|
|
87
79
|
$refs: {
|
|
88
80
|
[x: string]: unknown;
|
|
89
81
|
};
|
|
@@ -95,9 +87,7 @@ declare const __VLS_component: import('vue').DefineComponent<SkSelectItemCompone
|
|
|
95
87
|
$host: Element | null;
|
|
96
88
|
$emit: (event: string, ...args: any[]) => void;
|
|
97
89
|
$el: any;
|
|
98
|
-
$options: import('vue').ComponentOptionsBase<Readonly<import('reka-ui').SelectItemTextProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
99
|
-
as: import('reka-ui').AsTag | import('vue').Component;
|
|
100
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
90
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('reka-ui').SelectItemTextProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
101
91
|
beforeCreate?: (() => void) | (() => void)[];
|
|
102
92
|
created?: (() => void) | (() => void)[];
|
|
103
93
|
beforeMount?: (() => void) | (() => void)[];
|
|
@@ -117,9 +107,7 @@ declare const __VLS_component: import('vue').DefineComponent<SkSelectItemCompone
|
|
|
117
107
|
$forceUpdate: () => void;
|
|
118
108
|
$nextTick: typeof import('vue').nextTick;
|
|
119
109
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
120
|
-
} & Readonly<{
|
|
121
|
-
as: import('reka-ui').AsTag | import('vue').Component;
|
|
122
|
-
}> & Omit<Readonly<import('reka-ui').SelectItemTextProps> & Readonly<{}>, "as"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
110
|
+
} & Readonly<{}> & Omit<Readonly<import('reka-ui').SelectItemTextProps> & Readonly<{}>, never> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
123
111
|
$slots: {
|
|
124
112
|
default?: (props: {}) => any;
|
|
125
113
|
};
|
|
@@ -21,6 +21,13 @@ export interface SkSidebarComponentProps extends ComponentCustomColors {
|
|
|
21
21
|
* @default 'left'
|
|
22
22
|
*/
|
|
23
23
|
side?: SkSidebarSide;
|
|
24
|
+
/**
|
|
25
|
+
* Opts out of the coarse-pointer touch-target floor on sidebar items (44px minimum on
|
|
26
|
+
* touch devices). Use in compact navigation contexts where density matters more than
|
|
27
|
+
* tap comfort. No effect on fine-pointer (mouse) devices.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
dense?: boolean;
|
|
24
31
|
}
|
|
25
32
|
declare function __VLS_template(): {
|
|
26
33
|
attrs: Partial<{}>;
|
|
@@ -33,8 +40,9 @@ declare function __VLS_template(): {
|
|
|
33
40
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
34
41
|
declare const __VLS_component: import('vue').DefineComponent<SkSidebarComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SkSidebarComponentProps> & Readonly<{}>, {
|
|
35
42
|
kind: SkSidebarKind;
|
|
36
|
-
|
|
43
|
+
dense: boolean;
|
|
37
44
|
side: SkSidebarSide;
|
|
45
|
+
width: string;
|
|
38
46
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
39
47
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
40
48
|
export default _default;
|
|
@@ -48,8 +48,8 @@ declare const _default: import('vue').DefineComponent<SkSkeletonComponentProps,
|
|
|
48
48
|
bevel: string;
|
|
49
49
|
variant: SkSkeletonVariant;
|
|
50
50
|
corners: SkSkeletonCorner[];
|
|
51
|
-
height: string;
|
|
52
|
-
width: string;
|
|
53
51
|
animation: SkSkeletonAnimation;
|
|
52
|
+
width: string;
|
|
53
|
+
height: string;
|
|
54
54
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
55
55
|
export default _default;
|
|
@@ -48,8 +48,8 @@ declare const __VLS_component: import('vue').DefineComponent<SkTabsComponentProp
|
|
|
48
48
|
}>, {
|
|
49
49
|
kind: ComponentKind;
|
|
50
50
|
orientation: SkTabsOrientation;
|
|
51
|
-
placement: SkTabsPlacement;
|
|
52
51
|
flush: boolean;
|
|
52
|
+
placement: SkTabsPlacement;
|
|
53
53
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
54
54
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
55
55
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SkTreeViewDefaultExpanded, SkTreeViewKind } from './types';
|
|
2
|
-
export interface SkTreeViewComponentProps {
|
|
3
|
-
items:
|
|
4
|
-
getKey: (item:
|
|
5
|
-
modelValue?:
|
|
2
|
+
export interface SkTreeViewComponentProps<TItem extends Record<string, unknown> = Record<string, unknown>> {
|
|
3
|
+
items: TItem[];
|
|
4
|
+
getKey: (item: TItem) => string;
|
|
5
|
+
modelValue?: TItem | TItem[];
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
propagateSelect?: boolean;
|
|
8
8
|
kind?: SkTreeViewKind;
|
|
@@ -13,7 +13,7 @@ export interface SkTreeViewComponentProps {
|
|
|
13
13
|
declare const _default: <T extends Record<string, unknown>>(__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<{
|
|
14
14
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
15
15
|
readonly "onUpdate:modelValue"?: ((value: T | T[]) => any) | undefined;
|
|
16
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & SkTreeViewComponentProps & Partial<{}>> & import('vue').PublicProps;
|
|
16
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & SkTreeViewComponentProps<T> & Partial<{}>> & import('vue').PublicProps;
|
|
17
17
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
18
18
|
attrs: any;
|
|
19
19
|
slots: {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export interface UseFocusTrapOptions {
|
|
3
|
+
/** When true, the trap is active: focus moves inside and tab cycling is constrained. */
|
|
4
|
+
active: Ref<boolean>;
|
|
5
|
+
/** Element whose descendants form the trap region. */
|
|
6
|
+
container: Ref<HTMLElement | null>;
|
|
7
|
+
/**
|
|
8
|
+
* Optional callback fired when the user presses Escape. Most consumers will use this to
|
|
9
|
+
* close the modal/drawer.
|
|
10
|
+
*/
|
|
11
|
+
onEscape?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Trap focus inside a container while `active` is true. Restores focus to the previously
|
|
15
|
+
* active element when deactivated.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useFocusTrap(options: UseFocusTrapOptions): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export type PageDrawerSide = 'sidebar' | 'aside';
|
|
3
|
+
export interface PageDrawerContext {
|
|
4
|
+
/** Whether the drawer is currently open. */
|
|
5
|
+
isOpen: Ref<boolean>;
|
|
6
|
+
/** Whether drawer mode is actually available (false on purely persistent layouts). */
|
|
7
|
+
isAvailable: Ref<boolean>;
|
|
8
|
+
open: () => void;
|
|
9
|
+
close: () => void;
|
|
10
|
+
toggle: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface PageDrawersContext {
|
|
13
|
+
sidebar: PageDrawerContext;
|
|
14
|
+
aside: PageDrawerContext;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Expose drawer state for both the sidebar and aside from SkPage so descendants (like toggle
|
|
18
|
+
* buttons) can wire into either without prop drilling.
|
|
19
|
+
*/
|
|
20
|
+
export declare function providePageDrawers(sidebar: {
|
|
21
|
+
isOpen: Ref<boolean>;
|
|
22
|
+
isAvailable: Ref<boolean>;
|
|
23
|
+
setOpen: (value: boolean) => void;
|
|
24
|
+
}, aside: {
|
|
25
|
+
isOpen: Ref<boolean>;
|
|
26
|
+
isAvailable: Ref<boolean>;
|
|
27
|
+
setOpen: (value: boolean) => void;
|
|
28
|
+
}): PageDrawersContext;
|
|
29
|
+
/**
|
|
30
|
+
* Consume drawer state inside SkPage. Returns a safe no-op context when used outside SkPage
|
|
31
|
+
* so components like SkPageSidebarToggle can still render without throwing.
|
|
32
|
+
*
|
|
33
|
+
* @param side - Which drawer to bind to. Defaults to the left sidebar.
|
|
34
|
+
*/
|
|
35
|
+
export declare function usePageDrawer(side?: PageDrawerSide): PageDrawerContext;
|
package/dist/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ import { default as SkModal, SkModalComponentProps } from './components/Modal/Sk
|
|
|
39
39
|
import { default as SkNavBar, SkNavBarComponentProps } from './components/NavBar/SkNavBar.vue';
|
|
40
40
|
import { default as SkNumberInput, SkNumberInputComponentProps } from './components/NumberInput/SkNumberInput.vue';
|
|
41
41
|
import { default as SkPage, SkPageComponentProps } from './components/Page/SkPage.vue';
|
|
42
|
+
import { default as SkPageSidebarToggle, SkPageSidebarToggleComponentProps } from './components/Page/SkPageSidebarToggle.vue';
|
|
42
43
|
import { default as SkPagination, SkPaginationComponentProps } from './components/Pagination/SkPagination.vue';
|
|
43
44
|
import { default as SkPaginationItem, SkPaginationItemComponentProps } from './components/Pagination/SkPaginationItem.vue';
|
|
44
45
|
import { default as SkPanel, SkPanelComponentProps } from './components/Panel/SkPanel.vue';
|
|
@@ -165,6 +166,7 @@ export { SkModal, type SkModalComponentProps };
|
|
|
165
166
|
export { SkNavBar, type SkNavBarComponentProps };
|
|
166
167
|
export { SkNumberInput, type SkNumberInputComponentProps };
|
|
167
168
|
export { SkPage, type SkPageComponentProps };
|
|
169
|
+
export { SkPageSidebarToggle, type SkPageSidebarToggleComponentProps };
|
|
168
170
|
export { SkPagination, type SkPaginationComponentProps };
|
|
169
171
|
export { SkPaginationItem, type SkPaginationItemComponentProps };
|
|
170
172
|
export { SkPanel, type SkPanelComponentProps };
|