@cscfi/csc-ui 4.0.0-alpha.16 → 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 +7413 -7143
- package/dist/custom-elements.json +45 -8
- 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-tab-buttons/usage.md +7 -0
- package/dist/docs/c-toolbar/usage.md +17 -0
- 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/useScrollStrip.d.ts +39 -0
- package/dist-types/tag-name-map.d.ts +8 -2
- package/package.json +1 -1
|
@@ -2649,7 +2649,7 @@
|
|
|
2649
2649
|
},
|
|
2650
2650
|
{
|
|
2651
2651
|
"name": "actions",
|
|
2652
|
-
"description": "Action controls shown to the right of the title"
|
|
2652
|
+
"description": "Action controls shown to the right of the title, or under it when the two do not fit side by side"
|
|
2653
2653
|
}
|
|
2654
2654
|
]
|
|
2655
2655
|
}
|
|
@@ -6036,7 +6036,7 @@
|
|
|
6036
6036
|
"kind": "class",
|
|
6037
6037
|
"name": "CMain",
|
|
6038
6038
|
"tagName": "c-main",
|
|
6039
|
-
"description": "
|
|
6039
|
+
"description": "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.",
|
|
6040
6040
|
"csc": {
|
|
6041
6041
|
"usage": "docs/c-main/usage.md"
|
|
6042
6042
|
},
|
|
@@ -6054,7 +6054,7 @@
|
|
|
6054
6054
|
"cssParts": [
|
|
6055
6055
|
{
|
|
6056
6056
|
"name": "root",
|
|
6057
|
-
"description": "The main element carrying the page
|
|
6057
|
+
"description": "The main element carrying the page canvas and the dashboard grid layout"
|
|
6058
6058
|
}
|
|
6059
6059
|
],
|
|
6060
6060
|
"cssProperties": [],
|
|
@@ -6075,7 +6075,11 @@
|
|
|
6075
6075
|
"slots": [
|
|
6076
6076
|
{
|
|
6077
6077
|
"name": "default",
|
|
6078
|
-
"description": "Contents of the page"
|
|
6078
|
+
"description": "Contents of the page: the toolbar, side navigation and page"
|
|
6079
|
+
},
|
|
6080
|
+
{
|
|
6081
|
+
"name": "banner",
|
|
6082
|
+
"description": "A full-width message strip above the toolbar; it scrolls away with the page"
|
|
6079
6083
|
}
|
|
6080
6084
|
]
|
|
6081
6085
|
}
|
|
@@ -7371,7 +7375,7 @@
|
|
|
7371
7375
|
"cssParts": [
|
|
7372
7376
|
{
|
|
7373
7377
|
"name": "scroll-indicator",
|
|
7374
|
-
"description": "The fixed progress bar at the top of the viewport tracking
|
|
7378
|
+
"description": "The fixed progress bar at the top of the viewport tracking how far the document is scrolled"
|
|
7375
7379
|
},
|
|
7376
7380
|
{
|
|
7377
7381
|
"name": "container",
|
|
@@ -10847,6 +10851,14 @@
|
|
|
10847
10851
|
{
|
|
10848
10852
|
"name": "indicator",
|
|
10849
10853
|
"description": "The sliding fill highlighting the active tab"
|
|
10854
|
+
},
|
|
10855
|
+
{
|
|
10856
|
+
"name": "scroll-back",
|
|
10857
|
+
"description": "The edge arrow that scrolls an overflowing strip back"
|
|
10858
|
+
},
|
|
10859
|
+
{
|
|
10860
|
+
"name": "scroll-forward",
|
|
10861
|
+
"description": "The edge arrow that scrolls an overflowing strip forward"
|
|
10850
10862
|
}
|
|
10851
10863
|
],
|
|
10852
10864
|
"cssProperties": [],
|
|
@@ -12591,17 +12603,42 @@
|
|
|
12591
12603
|
"kind": "class",
|
|
12592
12604
|
"name": "CToolbar",
|
|
12593
12605
|
"tagName": "c-toolbar",
|
|
12594
|
-
"
|
|
12606
|
+
"description": "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.",
|
|
12607
|
+
"csc": {
|
|
12608
|
+
"usage": "docs/c-toolbar/usage.md"
|
|
12609
|
+
},
|
|
12610
|
+
"attributes": [
|
|
12611
|
+
{
|
|
12612
|
+
"fieldName": "static",
|
|
12613
|
+
"name": "static",
|
|
12614
|
+
"description": "Keep the toolbar in the page flow so it scrolls away with the content\ninstead of staying pinned to the top of its scroll container",
|
|
12615
|
+
"type": {
|
|
12616
|
+
"text": "boolean"
|
|
12617
|
+
},
|
|
12618
|
+
"default": "false"
|
|
12619
|
+
}
|
|
12620
|
+
],
|
|
12595
12621
|
"cssParts": [
|
|
12596
12622
|
{
|
|
12597
12623
|
"name": "root",
|
|
12598
|
-
"description": "The toolbar bar itself
|
|
12624
|
+
"description": "The toolbar bar itself: pinned to the top of its scroll container by default, in flow when `static`"
|
|
12599
12625
|
}
|
|
12600
12626
|
],
|
|
12601
12627
|
"cssProperties": [],
|
|
12602
12628
|
"cssStates": [],
|
|
12603
12629
|
"events": [],
|
|
12604
|
-
"members": [
|
|
12630
|
+
"members": [
|
|
12631
|
+
{
|
|
12632
|
+
"kind": "field",
|
|
12633
|
+
"name": "static",
|
|
12634
|
+
"privacy": "public",
|
|
12635
|
+
"description": "Keep the toolbar in the page flow so it scrolls away with the content\ninstead of staying pinned to the top of its scroll container",
|
|
12636
|
+
"type": {
|
|
12637
|
+
"text": "boolean"
|
|
12638
|
+
},
|
|
12639
|
+
"default": "false"
|
|
12640
|
+
}
|
|
12641
|
+
],
|
|
12605
12642
|
"slots": [
|
|
12606
12643
|
{
|
|
12607
12644
|
"name": "default",
|
|
@@ -55,6 +55,13 @@ The track keeps an opaque fill under its labels and a hairline frame that
|
|
|
55
55
|
reads on any surface, so the group can sit on a card, a muted panel, or
|
|
56
56
|
directly on the page canvas with no extra styling.
|
|
57
57
|
|
|
58
|
+
The buttons are equal columns as wide as the longest label. Given room, the
|
|
59
|
+
group is one row — its natural width in a flex row, the full width of a
|
|
60
|
+
block container. Narrower than one row of its buttons, the group wraps them
|
|
61
|
+
onto further rows inside the same frame rather than letting them overflow.
|
|
62
|
+
Keep the labels short (see above): a group that wraps on a phone is fine, a
|
|
63
|
+
group that wraps on a laptop wants `c-select`.
|
|
64
|
+
|
|
58
65
|
## Accessibility
|
|
59
66
|
|
|
60
67
|
Setting `label` names the group for assistive technology (`role="group"` +
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## Dashboard layout
|
|
4
|
+
|
|
5
|
+
Slot the layout components as direct children and `c-main` places them: `c-toolbar` spans the top, `c-side-navigation` takes the left column and `c-page` fills the rest. The toolbar pins itself to the top of the viewport; `c-main` pins the desktop side navigation beneath it, gives a long menu its own scrollbar, and moves its pin to the top edge when the toolbar is `static`. The mobile drawer is not touched.
|
|
6
|
+
|
|
7
|
+
## Banner
|
|
8
|
+
|
|
9
|
+
A full-width message strip above the toolbar — a service notice, an environment warning — goes in the `banner` slot. Slot a `c-alert` or your own markup; `c-main` only places it. The banner scrolls away with the page and the toolbar pins in its place. This is a message strip, not the ARIA `banner` landmark.
|
|
10
|
+
|
|
11
|
+
## Disabling the layout
|
|
12
|
+
|
|
13
|
+
`disable-layout` turns the grid into a plain column, still at least a viewport tall, for pages that arrange their own chrome. The banner slot renders first in the column.
|
|
14
|
+
|
|
15
|
+
## Scrolling
|
|
16
|
+
|
|
17
|
+
The document scrolls, so browser scroll restoration, anchors, find-in-page and mobile browser chrome all behave natively, and a modal inside `c-main` stops the page behind it. `c-page` has no fixed height and no scrollbar of its own; its `scroll-indicator` tracks the document. Set `html { scroll-behavior: smooth }` for smooth anchor scrolling.
|
|
18
|
+
|
|
19
|
+
## Customization
|
|
20
|
+
|
|
21
|
+
Structural styling via `::part(root)`. To show the layout inside a bounded box — a demo, a preview — give the part a height together with `min-height: 0` and `overflow-y: auto`; the toolbar and side navigation then pin inside that box.
|
|
@@ -111,9 +111,9 @@ c-select::part(list) {
|
|
|
111
111
|
|
|
112
112
|
On a viewport narrower than 760px the panel opens as a **fullscreen panel**
|
|
113
113
|
instead of dropping under the field: a heading row with the field's `label` and
|
|
114
|
-
a close button, the
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
a close button, then the options filling the rest of the screen — the field
|
|
115
|
+
itself stays where it is in the page. The panel keeps covering the screen and
|
|
116
|
+
the heading row stays in view while the on-screen keyboard is open; the close button and
|
|
117
117
|
Escape both return focus to the field; the page behind the panel is inert until
|
|
118
118
|
it closes, and the list has no half-row cut — the screen edge is the cue. The
|
|
119
119
|
threshold is the viewport's width, never the field's, so a narrow field on a
|
|
@@ -9,3 +9,10 @@ has an active tab. The sliding indicator that glides to the active tab is
|
|
|
9
9
|
this component's own affordance. For a standalone segmented control that
|
|
10
10
|
holds a form value, use `c-button-group` (which this component wraps
|
|
11
11
|
internally); there, active buttons paint their own fill and nothing slides.
|
|
12
|
+
|
|
13
|
+
A tab strip is always one row. When it is wider than its box it scrolls
|
|
14
|
+
sideways — by touch, by a mouse drag, by the wheel, or with the edge arrows
|
|
15
|
+
that appear while it overflows — and the tab `c-tabs` makes active is
|
|
16
|
+
scrolled into view. The scrollbar is hidden; the half-visible tab at the
|
|
17
|
+
edge and the arrows are the cue. This is the same rule as the underlined
|
|
18
|
+
tab row of `c-tabs`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## Pinned or static
|
|
4
|
+
|
|
5
|
+
Pinned is the default: the bar sticks to the top edge of its scroll container — the document in the dashboard layout — as soon as the page scrolls past it. Set `static` to leave the bar in flow instead; it then scrolls away with the page and returns when the user scrolls back to the top. The 3.x `class="relative"` switch is gone; `static` replaces it.
|
|
6
|
+
|
|
7
|
+
## Inside c-main
|
|
8
|
+
|
|
9
|
+
In `c-main`'s dashboard layout the toolbar spans both columns above the side navigation and the page, below an optional banner. `c-main` follows the toolbar's mode: the desktop side navigation is pinned beneath a pinned toolbar, or to the top edge once a static toolbar has scrolled away. No extra markup is needed.
|
|
10
|
+
|
|
11
|
+
## Content
|
|
12
|
+
|
|
13
|
+
The bar is a horizontal flex row with a small gap. Push trailing actions to the right with `margin-inline-start: auto` on the first of them.
|
|
14
|
+
|
|
15
|
+
## Customization
|
|
16
|
+
|
|
17
|
+
Structural styling via `::part(root)`. The height is the library's layout value shared with `c-main`, so changing it on the part does not move the pinned side navigation.
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
},
|
|
370
370
|
{
|
|
371
371
|
"name": "::part(root)",
|
|
372
|
-
"description": "The main element carrying the page
|
|
372
|
+
"description": "The main element carrying the page canvas and the dashboard grid layout"
|
|
373
373
|
},
|
|
374
374
|
{
|
|
375
375
|
"name": "::part(trigger)",
|
|
@@ -445,7 +445,7 @@
|
|
|
445
445
|
},
|
|
446
446
|
{
|
|
447
447
|
"name": "::part(scroll-indicator)",
|
|
448
|
-
"description": "The fixed progress bar at the top of the viewport tracking
|
|
448
|
+
"description": "The fixed progress bar at the top of the viewport tracking how far the document is scrolled"
|
|
449
449
|
},
|
|
450
450
|
{
|
|
451
451
|
"name": "::part(container)",
|
|
@@ -686,6 +686,14 @@
|
|
|
686
686
|
"name": "::part(indicator)",
|
|
687
687
|
"description": "The sliding fill highlighting the active tab"
|
|
688
688
|
},
|
|
689
|
+
{
|
|
690
|
+
"name": "::part(scroll-back)",
|
|
691
|
+
"description": "The edge arrow that scrolls an overflowing strip back"
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"name": "::part(scroll-forward)",
|
|
695
|
+
"description": "The edge arrow that scrolls an overflowing strip forward"
|
|
696
|
+
},
|
|
689
697
|
{
|
|
690
698
|
"name": "::part(root)",
|
|
691
699
|
"description": "The panel's padded content wrapper"
|
|
@@ -756,7 +764,7 @@
|
|
|
756
764
|
},
|
|
757
765
|
{
|
|
758
766
|
"name": "::part(root)",
|
|
759
|
-
"description": "The toolbar bar itself
|
|
767
|
+
"description": "The toolbar bar itself: pinned to the top of its scroll container by default, in flow when `static`"
|
|
760
768
|
},
|
|
761
769
|
{
|
|
762
770
|
"name": "::part(trigger)",
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
},
|
|
360
360
|
{
|
|
361
361
|
"name": "c-card-title",
|
|
362
|
-
"description": "\n---\n\n\n### **Slots:**\n - **default** - Card title text\n- **actions** - Action controls shown to the right of the title\n\n### **CSS Parts:**\n - **root** - The outer header element carrying the title typography and padding\n- **header** - The wrapper around the heading and its underline\n- **heading** - The paragraph holding the slotted title text\n- **underline** - The decorative accent bar under the heading\n- **actions** - The wrapper around the slotted action controls",
|
|
362
|
+
"description": "\n---\n\n\n### **Slots:**\n - **default** - Card title text\n- **actions** - Action controls shown to the right of the title, or under it when the two do not fit side by side\n\n### **CSS Parts:**\n - **root** - The outer header element carrying the title typography and padding\n- **header** - The wrapper around the heading and its underline\n- **heading** - The paragraph holding the slotted title text\n- **underline** - The decorative accent bar under the heading\n- **actions** - The wrapper around the slotted action controls",
|
|
363
363
|
"attributes": [],
|
|
364
364
|
"references": []
|
|
365
365
|
},
|
|
@@ -937,7 +937,7 @@
|
|
|
937
937
|
},
|
|
938
938
|
{
|
|
939
939
|
"name": "c-main",
|
|
940
|
-
"description": "
|
|
940
|
+
"description": "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.\n---\n\n\n### **Slots:**\n - **default** - Contents of the page: the toolbar, side navigation and page\n- **banner** - A full-width message strip above the toolbar; it scrolls away with the page\n\n### **CSS Parts:**\n - **root** - The main element carrying the page canvas and the dashboard grid layout",
|
|
941
941
|
"attributes": [
|
|
942
942
|
{
|
|
943
943
|
"name": "disable-layout",
|
|
@@ -1166,7 +1166,7 @@
|
|
|
1166
1166
|
},
|
|
1167
1167
|
{
|
|
1168
1168
|
"name": "c-page",
|
|
1169
|
-
"description": "\n---\n\n\n### **Slots:**\n - **default** - Default slot\n- **footer** - Footer slot\n\n### **CSS Parts:**\n - **scroll-indicator** - The fixed progress bar at the top of the viewport tracking
|
|
1169
|
+
"description": "\n---\n\n\n### **Slots:**\n - **default** - Default slot\n- **footer** - Footer slot\n\n### **CSS Parts:**\n - **scroll-indicator** - The fixed progress bar at the top of the viewport tracking how far the document is scrolled\n- **container** - The max-width content wrapper around the default slot",
|
|
1170
1170
|
"attributes": [
|
|
1171
1171
|
{
|
|
1172
1172
|
"name": "scroll-indicator",
|
|
@@ -1682,7 +1682,7 @@
|
|
|
1682
1682
|
},
|
|
1683
1683
|
{
|
|
1684
1684
|
"name": "c-tab-buttons",
|
|
1685
|
-
"description": "Tab buttons present a `c-tabs` tab list as a segmented control instead of the underlined tab row. Author it only inside `<c-tabs>`, with plain `<c-button>` children whose `value`s match the `c-tab-item` panels; `c-tabs` owns the active value and pushes it down.\n---\n\n\n### **Events:**\n - **tabChange** - Fired when the user activates a tab button, carrying the newly selected\nvalue. The parent `<c-tabs>` listens for it and pushes the accepted value\nback down; consumers should listen to `c-tabs` instead. Also dispatched as `tab-change` — bind that name in Vue templates.\n\n### **Slots:**\n - **default** - Default slot for the c-button elements\n\n### **CSS Parts:**\n - **root** - The segmented-control box framing the buttons\n- **indicator** - The sliding fill highlighting the active tab",
|
|
1685
|
+
"description": "Tab buttons present a `c-tabs` tab list as a segmented control instead of the underlined tab row. Author it only inside `<c-tabs>`, with plain `<c-button>` children whose `value`s match the `c-tab-item` panels; `c-tabs` owns the active value and pushes it down.\n---\n\n\n### **Events:**\n - **tabChange** - Fired when the user activates a tab button, carrying the newly selected\nvalue. The parent `<c-tabs>` listens for it and pushes the accepted value\nback down; consumers should listen to `c-tabs` instead. Also dispatched as `tab-change` — bind that name in Vue templates.\n\n### **Slots:**\n - **default** - Default slot for the c-button elements\n\n### **CSS Parts:**\n - **root** - The segmented-control box framing the buttons\n- **indicator** - The sliding fill highlighting the active tab\n- **scroll-back** - The edge arrow that scrolls an overflowing strip back\n- **scroll-forward** - The edge arrow that scrolls an overflowing strip forward",
|
|
1686
1686
|
"attributes": [
|
|
1687
1687
|
{
|
|
1688
1688
|
"name": "disabled",
|
|
@@ -1993,8 +1993,14 @@
|
|
|
1993
1993
|
},
|
|
1994
1994
|
{
|
|
1995
1995
|
"name": "c-toolbar",
|
|
1996
|
-
"description": "
|
|
1997
|
-
"attributes": [
|
|
1996
|
+
"description": "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.\n---\n\n\n### **Slots:**\n - **default** - Content of toolbar\n\n### **CSS Parts:**\n - **root** - The toolbar bar itself: pinned to the top of its scroll container by default, in flow when `static`",
|
|
1997
|
+
"attributes": [
|
|
1998
|
+
{
|
|
1999
|
+
"name": "static",
|
|
2000
|
+
"description": "Keep the toolbar in the page flow so it scrolls away with the content\ninstead of staying pinned to the top of its scroll container",
|
|
2001
|
+
"values": []
|
|
2002
|
+
}
|
|
2003
|
+
],
|
|
1998
2004
|
"references": []
|
|
1999
2005
|
},
|
|
2000
2006
|
{
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@cscfi/csc-ui",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.17",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -964,14 +964,14 @@
|
|
|
964
964
|
},
|
|
965
965
|
{
|
|
966
966
|
"name": "c-card-title",
|
|
967
|
-
"description": "\n---\n\n\n### **Slots:**\n - **default** - Card title text\n- **actions** - Action controls shown to the right of the title\n\n### **CSS Parts:**\n - **root** - The outer header element carrying the title typography and padding\n- **header** - The wrapper around the heading and its underline\n- **heading** - The paragraph holding the slotted title text\n- **underline** - The decorative accent bar under the heading\n- **actions** - The wrapper around the slotted action controls",
|
|
967
|
+
"description": "\n---\n\n\n### **Slots:**\n - **default** - Card title text\n- **actions** - Action controls shown to the right of the title, or under it when the two do not fit side by side\n\n### **CSS Parts:**\n - **root** - The outer header element carrying the title typography and padding\n- **header** - The wrapper around the heading and its underline\n- **heading** - The paragraph holding the slotted title text\n- **underline** - The decorative accent bar under the heading\n- **actions** - The wrapper around the slotted action controls",
|
|
968
968
|
"doc-url": "",
|
|
969
969
|
"attributes": [],
|
|
970
970
|
"slots": [
|
|
971
971
|
{ "name": "default", "description": "Card title text" },
|
|
972
972
|
{
|
|
973
973
|
"name": "actions",
|
|
974
|
-
"description": "Action controls shown to the right of the title"
|
|
974
|
+
"description": "Action controls shown to the right of the title, or under it when the two do not fit side by side"
|
|
975
975
|
}
|
|
976
976
|
],
|
|
977
977
|
"events": [],
|
|
@@ -2456,7 +2456,7 @@
|
|
|
2456
2456
|
},
|
|
2457
2457
|
{
|
|
2458
2458
|
"name": "c-main",
|
|
2459
|
-
"description": "
|
|
2459
|
+
"description": "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.\n---\n\n\n### **Slots:**\n - **default** - Contents of the page: the toolbar, side navigation and page\n- **banner** - A full-width message strip above the toolbar; it scrolls away with the page\n\n### **CSS Parts:**\n - **root** - The main element carrying the page canvas and the dashboard grid layout",
|
|
2460
2460
|
"doc-url": "",
|
|
2461
2461
|
"attributes": [
|
|
2462
2462
|
{
|
|
@@ -2466,7 +2466,14 @@
|
|
|
2466
2466
|
}
|
|
2467
2467
|
],
|
|
2468
2468
|
"slots": [
|
|
2469
|
-
{
|
|
2469
|
+
{
|
|
2470
|
+
"name": "default",
|
|
2471
|
+
"description": "Contents of the page: the toolbar, side navigation and page"
|
|
2472
|
+
},
|
|
2473
|
+
{
|
|
2474
|
+
"name": "banner",
|
|
2475
|
+
"description": "A full-width message strip above the toolbar; it scrolls away with the page"
|
|
2476
|
+
}
|
|
2470
2477
|
],
|
|
2471
2478
|
"events": [],
|
|
2472
2479
|
"js": {
|
|
@@ -3055,7 +3062,7 @@
|
|
|
3055
3062
|
},
|
|
3056
3063
|
{
|
|
3057
3064
|
"name": "c-page",
|
|
3058
|
-
"description": "\n---\n\n\n### **Slots:**\n - **default** - Default slot\n- **footer** - Footer slot\n\n### **CSS Parts:**\n - **scroll-indicator** - The fixed progress bar at the top of the viewport tracking
|
|
3065
|
+
"description": "\n---\n\n\n### **Slots:**\n - **default** - Default slot\n- **footer** - Footer slot\n\n### **CSS Parts:**\n - **scroll-indicator** - The fixed progress bar at the top of the viewport tracking how far the document is scrolled\n- **container** - The max-width content wrapper around the default slot",
|
|
3059
3066
|
"doc-url": "",
|
|
3060
3067
|
"attributes": [
|
|
3061
3068
|
{
|
|
@@ -4635,7 +4642,7 @@
|
|
|
4635
4642
|
},
|
|
4636
4643
|
{
|
|
4637
4644
|
"name": "c-tab-buttons",
|
|
4638
|
-
"description": "Tab buttons present a `c-tabs` tab list as a segmented control instead of the underlined tab row. Author it only inside `<c-tabs>`, with plain `<c-button>` children whose `value`s match the `c-tab-item` panels; `c-tabs` owns the active value and pushes it down.\n---\n\n\n### **Events:**\n - **tabChange** - Fired when the user activates a tab button, carrying the newly selected\nvalue. The parent `<c-tabs>` listens for it and pushes the accepted value\nback down; consumers should listen to `c-tabs` instead. Also dispatched as `tab-change` — bind that name in Vue templates.\n\n### **Slots:**\n - **default** - Default slot for the c-button elements\n\n### **CSS Parts:**\n - **root** - The segmented-control box framing the buttons\n- **indicator** - The sliding fill highlighting the active tab",
|
|
4645
|
+
"description": "Tab buttons present a `c-tabs` tab list as a segmented control instead of the underlined tab row. Author it only inside `<c-tabs>`, with plain `<c-button>` children whose `value`s match the `c-tab-item` panels; `c-tabs` owns the active value and pushes it down.\n---\n\n\n### **Events:**\n - **tabChange** - Fired when the user activates a tab button, carrying the newly selected\nvalue. The parent `<c-tabs>` listens for it and pushes the accepted value\nback down; consumers should listen to `c-tabs` instead. Also dispatched as `tab-change` — bind that name in Vue templates.\n\n### **Slots:**\n - **default** - Default slot for the c-button elements\n\n### **CSS Parts:**\n - **root** - The segmented-control box framing the buttons\n- **indicator** - The sliding fill highlighting the active tab\n- **scroll-back** - The edge arrow that scrolls an overflowing strip back\n- **scroll-forward** - The edge arrow that scrolls an overflowing strip forward",
|
|
4639
4646
|
"doc-url": "",
|
|
4640
4647
|
"attributes": [
|
|
4641
4648
|
{
|
|
@@ -5458,12 +5465,27 @@
|
|
|
5458
5465
|
},
|
|
5459
5466
|
{
|
|
5460
5467
|
"name": "c-toolbar",
|
|
5461
|
-
"description": "
|
|
5468
|
+
"description": "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.\n---\n\n\n### **Slots:**\n - **default** - Content of toolbar\n\n### **CSS Parts:**\n - **root** - The toolbar bar itself: pinned to the top of its scroll container by default, in flow when `static`",
|
|
5462
5469
|
"doc-url": "",
|
|
5463
|
-
"attributes": [
|
|
5470
|
+
"attributes": [
|
|
5471
|
+
{
|
|
5472
|
+
"name": "static",
|
|
5473
|
+
"description": "Keep the toolbar in the page flow so it scrolls away with the content\ninstead of staying pinned to the top of its scroll container",
|
|
5474
|
+
"value": { "type": "boolean", "default": "false" }
|
|
5475
|
+
}
|
|
5476
|
+
],
|
|
5464
5477
|
"slots": [{ "name": "default", "description": "Content of toolbar" }],
|
|
5465
5478
|
"events": [],
|
|
5466
|
-
"js": {
|
|
5479
|
+
"js": {
|
|
5480
|
+
"properties": [
|
|
5481
|
+
{
|
|
5482
|
+
"name": "static",
|
|
5483
|
+
"description": "Keep the toolbar in the page flow so it scrolls away with the content\ninstead of staying pinned to the top of its scroll container",
|
|
5484
|
+
"type": "boolean"
|
|
5485
|
+
}
|
|
5486
|
+
],
|
|
5487
|
+
"events": []
|
|
5488
|
+
}
|
|
5467
5489
|
},
|
|
5468
5490
|
{
|
|
5469
5491
|
"name": "c-tooltip",
|
|
@@ -6198,7 +6220,7 @@
|
|
|
6198
6220
|
},
|
|
6199
6221
|
{
|
|
6200
6222
|
"name": "part(root)",
|
|
6201
|
-
"description": "The main element carrying the page
|
|
6223
|
+
"description": "The main element carrying the page canvas and the dashboard grid layout"
|
|
6202
6224
|
},
|
|
6203
6225
|
{
|
|
6204
6226
|
"name": "part(trigger)",
|
|
@@ -6274,7 +6296,7 @@
|
|
|
6274
6296
|
},
|
|
6275
6297
|
{
|
|
6276
6298
|
"name": "part(scroll-indicator)",
|
|
6277
|
-
"description": "The fixed progress bar at the top of the viewport tracking
|
|
6299
|
+
"description": "The fixed progress bar at the top of the viewport tracking how far the document is scrolled"
|
|
6278
6300
|
},
|
|
6279
6301
|
{
|
|
6280
6302
|
"name": "part(container)",
|
|
@@ -6518,6 +6540,14 @@
|
|
|
6518
6540
|
"name": "part(indicator)",
|
|
6519
6541
|
"description": "The sliding fill highlighting the active tab"
|
|
6520
6542
|
},
|
|
6543
|
+
{
|
|
6544
|
+
"name": "part(scroll-back)",
|
|
6545
|
+
"description": "The edge arrow that scrolls an overflowing strip back"
|
|
6546
|
+
},
|
|
6547
|
+
{
|
|
6548
|
+
"name": "part(scroll-forward)",
|
|
6549
|
+
"description": "The edge arrow that scrolls an overflowing strip forward"
|
|
6550
|
+
},
|
|
6521
6551
|
{
|
|
6522
6552
|
"name": "part(root)",
|
|
6523
6553
|
"description": "The panel's padded content wrapper"
|
|
@@ -6588,7 +6618,7 @@
|
|
|
6588
6618
|
},
|
|
6589
6619
|
{
|
|
6590
6620
|
"name": "part(root)",
|
|
6591
|
-
"description": "The toolbar bar itself
|
|
6621
|
+
"description": "The toolbar bar itself: pinned to the top of its scroll container by default, in flow when `static`"
|
|
6592
6622
|
},
|
|
6593
6623
|
{
|
|
6594
6624
|
"name": "part(trigger)",
|
|
@@ -6,9 +6,16 @@ interface CMainProps {
|
|
|
6
6
|
*/
|
|
7
7
|
disableLayout?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare var __VLS_1: {
|
|
9
|
+
declare var __VLS_1: {
|
|
10
|
+
class: string;
|
|
11
|
+
}, __VLS_3: {
|
|
12
|
+
ref: string;
|
|
13
|
+
onSlotchange: () => void;
|
|
14
|
+
};
|
|
10
15
|
type __VLS_Slots = {} & {
|
|
11
|
-
|
|
16
|
+
banner?: (props: typeof __VLS_1) => any;
|
|
17
|
+
} & {
|
|
18
|
+
default?: (props: typeof __VLS_3) => any;
|
|
12
19
|
};
|
|
13
20
|
declare const __VLS_base: import("vue").DefineComponent<CMainProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CMainProps> & Readonly<{}>, {
|
|
14
21
|
disableLayout: boolean;
|
|
@@ -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;
|
|
@@ -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