@cscfi/csc-ui 4.0.0-alpha.15 → 4.0.0-alpha.17
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 +7486 -7189
- package/dist/custom-elements.json +45 -8
- package/dist/docs/c-autocomplete/usage.md +9 -9
- 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 +9 -9
- package/dist/docs/c-tab-buttons/usage.md +7 -0
- package/dist/docs/c-toolbar/usage.md +17 -0
- package/dist/docs/c-tree-select/usage.md +9 -9
- package/dist/vscode.css-custom-data.json +11 -3
- package/dist/vscode.html-custom-data.json +12 -6
- package/dist/web-types.json +43 -13
- 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/useAnchoredPanel.d.ts +14 -10
- package/dist-types/shared/useScrollStrip.d.ts +39 -0
- package/dist-types/shared/visualViewport.d.ts +29 -13
- package/dist-types/tag-name-map.d.ts +8 -2
- package/package.json +1 -1
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Visual viewport tracking for the **fullscreen panel** (CONTEXT.md,
|
|
3
|
-
* ADR-0050).
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
3
|
+
* ADR-0050). Two layers. The *surface* — the panel element itself,
|
|
4
|
+
* `position: fixed; inset: 0` — spans the layout viewport, which the
|
|
5
|
+
* on-screen keyboard overlays but never shrinks, so it covers everything
|
|
6
|
+
* visible whatever the keyboard does. The *content box* inside it (heading
|
|
7
|
+
* row, search input, list) follows `visualViewport` — the only API that sees
|
|
8
|
+
* the iOS keyboard — so it ends above the keyboard. A late or wrong box then
|
|
9
|
+
* shows more surface, never the page. Both fullscreen implementations (the
|
|
10
|
+
* anchored-panel composable and `c-dropdown`'s dialog) go through this one
|
|
11
|
+
* helper while they are open.
|
|
8
12
|
*/
|
|
9
13
|
/** Stop following the visual viewport. Idempotent. */
|
|
10
14
|
export type StopTracking = () => void;
|
|
@@ -15,7 +19,7 @@ export interface ViewportBox {
|
|
|
15
19
|
top: number;
|
|
16
20
|
width: number;
|
|
17
21
|
}
|
|
18
|
-
/** The current visual viewport box; `null` where the API is missing (then
|
|
22
|
+
/** The current visual viewport box; `null` where the API is missing (then the content box fills the surface). */
|
|
19
23
|
export declare const readVisualViewport: () => null | ViewportBox;
|
|
20
24
|
/**
|
|
21
25
|
* Report the visual viewport's box now and on every resize / scroll of it
|
|
@@ -25,11 +29,23 @@ export declare const readVisualViewport: () => null | ViewportBox;
|
|
|
25
29
|
*/
|
|
26
30
|
export declare const trackVisualViewport: (onBox: (box: null | ViewportBox) => void) => StopTracking;
|
|
27
31
|
/**
|
|
28
|
-
* Inline declarations that make a
|
|
29
|
-
* viewport's box
|
|
30
|
-
*
|
|
31
|
-
* auto margins).
|
|
32
|
+
* Inline declarations that make a top-layer element the surface: the layout
|
|
33
|
+
* viewport's box. Overrides the UA popover / dialog defaults (`inset: 0` is
|
|
34
|
+
* theirs too, but with fit-content sizing and auto margins).
|
|
32
35
|
*/
|
|
33
|
-
export declare const
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
+
export declare const FULLSCREEN_SURFACE_STYLE = "position:fixed;inset:0;margin:0;width:auto;height:auto;";
|
|
37
|
+
/**
|
|
38
|
+
* Inline declarations placing the content box inside the surface on the
|
|
39
|
+
* visual viewport's box; with no box (no API) it fills the surface.
|
|
40
|
+
*/
|
|
41
|
+
export declare const contentBoxStyle: (box: null | ViewportBox) => string;
|
|
42
|
+
/**
|
|
43
|
+
* `FULLSCREEN_SURFACE_STYLE` written straight onto an element's inline style,
|
|
44
|
+
* for a surface whose placement is imperative (`c-dropdown`'s dialog). Margins
|
|
45
|
+
* are left to its classes.
|
|
46
|
+
*/
|
|
47
|
+
export declare const applyFullscreenSurface: (el: HTMLElement) => void;
|
|
48
|
+
/** `contentBoxStyle(box)` written straight onto an element's inline style. */
|
|
49
|
+
export declare const applyContentBox: (el: HTMLElement, box: null | ViewportBox) => void;
|
|
50
|
+
/** Remove exactly what `applyContentBox` set. */
|
|
51
|
+
export declare const clearContentBox: (el: HTMLElement) => void;
|
|
@@ -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;
|
|
@@ -1671,7 +1671,13 @@ export interface CToastsElement extends Omit<HTMLElement, 'absolute' | 'horizont
|
|
|
1671
1671
|
/** Remove a message by id (id should be specified in the addToast params) */
|
|
1672
1672
|
removeToast(id: string): void;
|
|
1673
1673
|
}
|
|
1674
|
-
|
|
1674
|
+
/** 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. */
|
|
1675
|
+
export interface CToolbarElement extends Omit<HTMLElement, 'static'> {
|
|
1676
|
+
/**
|
|
1677
|
+
* Keep the toolbar in the page flow so it scrolls away with the content
|
|
1678
|
+
* instead of staying pinned to the top of its scroll container
|
|
1679
|
+
*/
|
|
1680
|
+
static?: boolean;
|
|
1675
1681
|
}
|
|
1676
1682
|
/** Events dispatched by `<c-tooltip>`. */
|
|
1677
1683
|
export interface CTooltipElementEventMap {
|
package/package.json
CHANGED