@cscfi/csc-ui 4.0.0-alpha.16 → 4.0.0-alpha.18
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/csc-ui.js +7695 -7414
- package/dist/custom-elements.json +56 -12
- package/dist/docs/c-button-group/usage.md +7 -0
- package/dist/docs/c-main/usage.md +21 -1
- package/dist/docs/c-select/usage.md +3 -3
- package/dist/docs/c-side-navigation/usage.md +21 -0
- package/dist/docs/c-tab-buttons/usage.md +7 -0
- package/dist/docs/c-toolbar/usage.md +17 -0
- package/dist/styles/css/tailwind-theme.css +1 -0
- package/dist/styles/css/tokens.css +3 -0
- package/dist/vscode.css-custom-data.json +20 -4
- package/dist/vscode.html-custom-data.json +13 -7
- package/dist/web-types.json +60 -17
- package/dist-types/components/c-main/CMain.vue.d.ts +9 -2
- package/dist-types/components/c-toolbar/CToolbar.vue.d.ts +10 -1
- package/dist-types/shared/useScrollStrip.d.ts +39 -0
- package/dist-types/tag-name-map.d.ts +9 -2
- package/package.json +1 -1
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
interface CToolbarProps {
|
|
2
|
+
/**
|
|
3
|
+
* Keep the toolbar in the page flow so it scrolls away with the content
|
|
4
|
+
* instead of staying pinned to the top of its scroll container
|
|
5
|
+
*/
|
|
6
|
+
static?: boolean;
|
|
7
|
+
}
|
|
1
8
|
declare var __VLS_1: {};
|
|
2
9
|
type __VLS_Slots = {} & {
|
|
3
10
|
default?: (props: typeof __VLS_1) => any;
|
|
4
11
|
};
|
|
5
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<CToolbarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CToolbarProps> & Readonly<{}>, {
|
|
13
|
+
static: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
16
|
declare const _default: typeof __VLS_export;
|
|
8
17
|
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll strip: a single-row list that scrolls sideways when it is wider
|
|
3
|
+
* than its box — the tab strip of `c-tab-buttons` (CONTEXT.md "Tab
|
|
4
|
+
* buttons"). Built on a native horizontal scroll container with its
|
|
5
|
+
* scrollbar hidden, so touch panning, momentum and keyboard focus
|
|
6
|
+
* scrolling come from the browser; this composable adds what a bare
|
|
7
|
+
* scroller lacks: overflow state for edge arrows, an arrow step, mouse
|
|
8
|
+
* drag, a vertical-wheel translation and a `reveal` that brings one child
|
|
9
|
+
* into view without scrolling the page.
|
|
10
|
+
*/
|
|
11
|
+
import type { Ref } from 'vue';
|
|
12
|
+
export interface ScrollStrip {
|
|
13
|
+
/** Scroll back by half the visible width. */
|
|
14
|
+
back(): void;
|
|
15
|
+
/** True while the strip can scroll back (its start is out of view). */
|
|
16
|
+
canBack: Ref<boolean>;
|
|
17
|
+
/** True while the strip can scroll forward (its end is out of view). */
|
|
18
|
+
canForward: Ref<boolean>;
|
|
19
|
+
/** Scroll forward by half the visible width. */
|
|
20
|
+
forward(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Mouse drag scrolling: bind to the scroller's `pointerdown`. Touch and
|
|
23
|
+
* pen pan natively and are ignored here. A drag that moved swallows the
|
|
24
|
+
* `click` it would otherwise end in.
|
|
25
|
+
*/
|
|
26
|
+
onPointerDown(event: PointerEvent): void;
|
|
27
|
+
/**
|
|
28
|
+
* Translate a vertical wheel into horizontal scrolling while the strip
|
|
29
|
+
* overflows: bind to the scroller's `wheel`.
|
|
30
|
+
*/
|
|
31
|
+
onWheel(event: WheelEvent): void;
|
|
32
|
+
/** True while the content is wider than the scroller. */
|
|
33
|
+
overflowing: Ref<boolean>;
|
|
34
|
+
/** Scroll the strip just enough to bring `el` fully into view. */
|
|
35
|
+
reveal(el: Element | null | undefined): void;
|
|
36
|
+
/** Re-read the overflow state (after content changed size). */
|
|
37
|
+
update(): void;
|
|
38
|
+
}
|
|
39
|
+
export declare const useScrollStrip: (scroller: Ref<HTMLElement | null>) => ScrollStrip;
|
|
@@ -745,7 +745,7 @@ export interface CLoginCardContentElement extends HTMLElement {
|
|
|
745
745
|
}
|
|
746
746
|
export interface CLoginCardTitleElement extends HTMLElement {
|
|
747
747
|
}
|
|
748
|
-
/**
|
|
748
|
+
/** The page shell of an application: it paints the page canvas and lays out the toolbar, the side navigation and the page in the dashboard layout. It is at least a viewport tall and grows with its content, so the document — not a component — is what scrolls. */
|
|
749
749
|
export interface CMainElement extends Omit<HTMLElement, 'disableLayout'> {
|
|
750
750
|
/** Disable the default dashboard layout */
|
|
751
751
|
disableLayout?: boolean;
|
|
@@ -1212,6 +1212,7 @@ export interface CSideNavigationElementEventMap {
|
|
|
1212
1212
|
*/
|
|
1213
1213
|
'change:menu-visible': CustomEvent<boolean>;
|
|
1214
1214
|
}
|
|
1215
|
+
/** The dashboard layout's left-hand menu: section titles, navigation items and their sub-items in a drawer that is pinned beside the page on desktop and slides in over it on mobile. */
|
|
1215
1216
|
export interface CSideNavigationElement extends Omit<HTMLElement, 'menuVisible' | 'mobile' | 'styles'> {
|
|
1216
1217
|
/** Mobile version menu visibility */
|
|
1217
1218
|
menuVisible?: boolean;
|
|
@@ -1671,7 +1672,13 @@ export interface CToastsElement extends Omit<HTMLElement, 'absolute' | 'horizont
|
|
|
1671
1672
|
/** Remove a message by id (id should be specified in the addToast params) */
|
|
1672
1673
|
removeToast(id: string): void;
|
|
1673
1674
|
}
|
|
1674
|
-
|
|
1675
|
+
/** The app-wide bar at the top of the dashboard layout: the logo, the service name and global actions such as the user menu or log out. It is pinned to the top of the viewport by default and stays there while the page scrolls; `static` keeps it in the page flow so it scrolls away with the content. */
|
|
1676
|
+
export interface CToolbarElement extends Omit<HTMLElement, 'static'> {
|
|
1677
|
+
/**
|
|
1678
|
+
* Keep the toolbar in the page flow so it scrolls away with the content
|
|
1679
|
+
* instead of staying pinned to the top of its scroll container
|
|
1680
|
+
*/
|
|
1681
|
+
static?: boolean;
|
|
1675
1682
|
}
|
|
1676
1683
|
/** Events dispatched by `<c-tooltip>`. */
|
|
1677
1684
|
export interface CTooltipElementEventMap {
|
package/package.json
CHANGED