@cscfi/csc-ui 4.0.0-alpha.5 → 4.0.0-alpha.7
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 +7233 -6932
- package/dist/custom-elements.json +206 -9
- package/dist/docs/c-alert/usage.md +24 -0
- package/dist/docs/c-checkbox/usage.md +53 -0
- package/dist/docs/c-popover/usage.md +8 -0
- package/dist/docs/c-radio/usage.md +18 -0
- package/dist/docs/c-switch/usage.md +36 -0
- package/dist/docs/c-table/usage.md +14 -0
- package/dist/docs/c-tooltip/usage.md +3 -1
- package/dist/styles/css/tailwind-theme.css +1 -0
- package/dist/styles/css/tokens.css +3 -0
- package/dist/vscode.css-custom-data.json +11 -3
- package/dist/vscode.html-custom-data.json +25 -5
- package/dist/web-types.json +67 -11
- package/dist-types/components/c-alert/CAlert.vue.d.ts +8 -1
- package/dist-types/components/c-menu/CMenu.vue.d.ts +10 -0
- package/dist-types/components/c-popover/CPopover.vue.d.ts +9 -0
- package/dist-types/components/c-radio/CRadio.vue.d.ts +7 -1
- package/dist-types/components/c-table/CTable.vue.d.ts +11 -1
- package/dist-types/components/c-table/injectTableStyles.d.ts +1 -0
- package/dist-types/components/c-tooltip/CTooltip.vue.d.ts +10 -0
- package/dist-types/shared/popoverChain.d.ts +62 -0
- package/dist-types/shared/useDesignatedTrigger.d.ts +40 -0
- package/dist-types/shared/useHostStates.d.ts +25 -0
- package/dist-types/tag-name-map.d.ts +39 -4
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
A persistent, in-flow status message: a tinted box whose type carries a status family's colours through the icon, heading and accent edge, while the body copy stays neutral.
|
|
2
|
+
|
|
3
|
+
Give the alert a `heading` with the prop for plain text; the `heading` slot overrides the prop when rich content (links, emphasis) is needed. The message goes in the default slot.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- Persistent status that belongs to the page or a section: a maintenance notice, a failed validation summary, a quota warning.
|
|
8
|
+
- Not for transient feedback on an action — use `c-toasts`, which overlays and dismisses itself; the alert stays in the layout until the consumer removes it.
|
|
9
|
+
|
|
10
|
+
## Types
|
|
11
|
+
|
|
12
|
+
The four status types (`error`, `info`, `success`, `warning`) carry their status family's colours and icon; `default` — equivalently, omitting the attribute — renders the brand-primary look. Severity is signalled by the icon, the heading's ink and the accent edge, never by colouring the body text.
|
|
13
|
+
|
|
14
|
+
## Dismissal
|
|
15
|
+
|
|
16
|
+
`dismissible` renders a dismiss button, but pressing it only emits the `dismiss` event — removing the alert from the page stays the consumer's job.
|
|
17
|
+
|
|
18
|
+
## Accessibility
|
|
19
|
+
|
|
20
|
+
The alert manages its own live-region role: `warning` and `error` interrupt (`role="alert"`), while the other types announce politely (`role="status"`). Content that is present at page load is not announced — live regions only announce changes.
|
|
21
|
+
|
|
22
|
+
## Customization
|
|
23
|
+
|
|
24
|
+
Structural styling via `::part(root)`, `::part(icon)`, `::part(content)`, `::part(heading)` and `::part(dismiss)`. Colours come from the status-family semantic tokens; override the tokens to re-theme.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
A form control for a single on/off choice: a native checkbox with a label,
|
|
2
|
+
an optional hint, and validation messaging.
|
|
3
|
+
|
|
4
|
+
Bind the state with a plain `v-model` (or the `checked` prop); `true-value` /
|
|
5
|
+
`false-value` map the checked state onto custom values. Set `indeterminate`
|
|
6
|
+
for the mixed "some but not all" state of a parent checkbox.
|
|
7
|
+
|
|
8
|
+
```html
|
|
9
|
+
<c-checkbox v-model="accepted" label="I accept the terms" />
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Set `hint` for a persistent helper line below the control; while `valid` is
|
|
13
|
+
`false`, `error-message` replaces it. `hide-details` removes the message area
|
|
14
|
+
entirely.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- A single independent yes/no choice (consent, feature toggle in a form).
|
|
19
|
+
- A list where several options can be selected at once.
|
|
20
|
+
|
|
21
|
+
## When not to use
|
|
22
|
+
|
|
23
|
+
- Choosing exactly one of several options — use `c-radio-group`.
|
|
24
|
+
- Switching a setting that takes effect immediately — use `c-switch`.
|
|
25
|
+
|
|
26
|
+
## Customization
|
|
27
|
+
|
|
28
|
+
Restyle via CSS parts from your own stylesheet. The `indicator` part is the
|
|
29
|
+
checkbox box and `mark` is the check glyph inside it. The indicator's border,
|
|
30
|
+
its checked fill and its keyboard focus ring all draw with `currentColor`, so
|
|
31
|
+
one `color` recolours the three together; the host exposes the `checked` and
|
|
32
|
+
`indeterminate` custom states, so the box is also stylable per state:
|
|
33
|
+
|
|
34
|
+
```css
|
|
35
|
+
/* Border, checked fill and focus ring follow `color`. */
|
|
36
|
+
c-checkbox::part(indicator) {
|
|
37
|
+
color: var(--my-green);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* The mark draws with currentColor too — recolour it via `color`. */
|
|
41
|
+
c-checkbox:state(checked)::part(mark) {
|
|
42
|
+
color: black;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Finer control still works per property and per state (the focus ring
|
|
46
|
+
keeps following `color`, not these). */
|
|
47
|
+
c-checkbox:not(:state(checked))::part(indicator) {
|
|
48
|
+
border-color: gray;
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For app-wide recolouring prefer the design tokens (`--c-primary` seed) over
|
|
53
|
+
per-component rules.
|
|
@@ -2,6 +2,10 @@ A click-opened, non-modal surface anchored to its trigger, floating in the top l
|
|
|
2
2
|
|
|
3
3
|
Put the element that opens the popover in the `trigger` slot and the content in the default slot. An optional `heading` prop renders a heading and doubles as the panel's accessible name (it is not called `title` — a `title` attribute would trigger the browser's native tooltip). The popover is deliberately minimal: compose footers, actions, or a close button from existing components (e.g. `c-button`) inside the body.
|
|
4
4
|
|
|
5
|
+
## Designated trigger
|
|
6
|
+
|
|
7
|
+
When the opener cannot be slotted — a button living elsewhere in the layout — point the `trigger` prop at it instead: the ID of the element, or the element itself via property binding. The two routes are the same concept: the popover wires click-to-toggle onto the designated element, mirrors `aria-haspopup`/`aria-expanded`, returns focus to it on Escape, anchors the panel to it, and clicking it never counts as a light dismiss. Supplying both routes is a misuse: the prop wins, the slotted element gets no wiring, and a console warning flags it.
|
|
8
|
+
|
|
5
9
|
## When to use
|
|
6
10
|
|
|
7
11
|
- Contextual, dismissable UI attached to a control: a small settings panel, a confirm-lite prompt, help content with links.
|
|
@@ -12,6 +16,10 @@ Put the element that opens the popover in the `trigger` slot and the content in
|
|
|
12
16
|
|
|
13
17
|
Clicking outside the popover or pressing Escape closes it. Escape returns focus to the trigger when focus was inside the panel; light dismiss leaves focus where the user clicked. Focus is not moved into the panel on open — Tab reaches the content naturally from the trigger.
|
|
14
18
|
|
|
19
|
+
## Nesting
|
|
20
|
+
|
|
21
|
+
Popovers nest: a control inside one popover's panel can open another. The open popovers form a popover chain — each nested in the previous one; opening a popover whose trigger is not inside the open one closes it first, so sibling popovers never coexist. Escape closes only the innermost popover, one press per layer; clicking outside closes every popover that does not contain the click (clicking in a parent panel closes just its child); closing a popover closes everything nested inside it. Nesting follows the trigger, not the markup — a popover opened from a designated trigger inside another popover's panel chains under it even though its host element lives elsewhere.
|
|
22
|
+
|
|
15
23
|
## Accessibility
|
|
16
24
|
|
|
17
25
|
The panel is a non-modal `role="dialog"` and needs an accessible name: the `heading` prop provides one, or set `aria-label` on the `c-popover` element (`aria-labelledby` cannot reference slotted content across the shadow boundary). The component warns in the console when it opens unnamed. `aria-haspopup="dialog"` and `aria-expanded` are mirrored onto the slotted trigger.
|
|
@@ -25,3 +25,21 @@ Outside a group a radio still renders and operates — it can be selected but
|
|
|
25
25
|
never unselected, like a native radio without siblings. Grouping behavior
|
|
26
26
|
(exclusivity, arrow-key navigation, form value) requires the parent
|
|
27
27
|
`c-radio-group`.
|
|
28
|
+
|
|
29
|
+
## Customization
|
|
30
|
+
|
|
31
|
+
Restyle via CSS parts from your own stylesheet. The `indicator` part is the
|
|
32
|
+
radio ring; the selection dot is its `::after` pseudo-element and the keyboard
|
|
33
|
+
focus ring its `::before`. Ring, dot and focus ring all draw with
|
|
34
|
+
`currentColor`, so `color` recolours the whole indicator, focus ring included.
|
|
35
|
+
The host exposes the `checked` and `disabled` custom states (both also cover
|
|
36
|
+
group-driven selection and disabling):
|
|
37
|
+
|
|
38
|
+
```css
|
|
39
|
+
c-radio:state(checked)::part(indicator) {
|
|
40
|
+
color: var(--my-green);
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
For app-wide recolouring prefer the design tokens (`--c-primary` seed) over
|
|
45
|
+
per-component rules.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
A toggle for a binary setting that takes effect immediately: a native
|
|
2
|
+
switch control with a label, an optional hint, and validation messaging.
|
|
3
|
+
|
|
4
|
+
Bind the state with a plain `v-model` (or the `checked` prop); `true-value` /
|
|
5
|
+
`false-value` map the on/off state onto custom values.
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<c-switch v-model="notifications">Email notifications</c-switch>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
|
|
13
|
+
- Turning a setting or mode on/off with immediate effect (no submit step).
|
|
14
|
+
|
|
15
|
+
## When not to use
|
|
16
|
+
|
|
17
|
+
- A choice that is collected and submitted with a form — use `c-checkbox`.
|
|
18
|
+
|
|
19
|
+
## Customization
|
|
20
|
+
|
|
21
|
+
Restyle via CSS parts from your own stylesheet. The `slider` part is the
|
|
22
|
+
toggle track (its `::before` pseudo-element is the handle); the host exposes
|
|
23
|
+
the `checked` custom state, so the track is stylable per state:
|
|
24
|
+
|
|
25
|
+
```css
|
|
26
|
+
c-switch:state(checked)::part(slider) {
|
|
27
|
+
background: var(--my-green);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
c-switch:state(checked)::part(slider)::before {
|
|
31
|
+
background: white;
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
For app-wide recolouring prefer the design tokens (`--c-primary` seed) over
|
|
36
|
+
per-component rules.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
A styled wrapper for a table you author yourself: slot in a plain `<table>` and c-table gives it the CSC look plus an optional responsive card layout on narrow screens. The table stays in your own DOM — your stylesheets, your framework's rendering, and `::part()` selectors on components nested in cells (a `c-tag` status chip, a `c-pagination` footer) all keep working.
|
|
2
|
+
|
|
3
|
+
Write regular, semantic table markup: `<thead>` with `<th>` headers, `<tbody>` rows, optionally a `<tfoot>`. c-table styles it through a scoped stylesheet it installs once per page; it never takes the markup over, so rows added or removed by your framework are picked up automatically.
|
|
4
|
+
|
|
5
|
+
## Responsive mode
|
|
6
|
+
|
|
7
|
+
With `responsive`, the table collapses into stacked cards when it is narrower than `mobile-breakpoint` (pixels, default 600). Each cell then shows a label cloned from its column header so the card stays readable without the header row.
|
|
8
|
+
|
|
9
|
+
- Rows that should not receive labels (a full-width action row, a `colspan` summary) opt out with a `no-mobile-labels` attribute on the `<tr>`.
|
|
10
|
+
- The labels are real `<span class="c-table__mobile-label">` elements prepended into your cells, so your framework will see them. Label creation is idempotent, but if a keyed re-render replaces the cell elements, call the element's `updateMobileLabels()` method afterwards to restore them.
|
|
11
|
+
|
|
12
|
+
## Styling
|
|
13
|
+
|
|
14
|
+
Cell content is yours to style: page CSS reaches everything inside the table, including `::part()` on nested components. The table's own defaults are applied at `c-table > table.c-table …` specificity — to override one of them (say, cell padding), match that scope: `c-table table.c-table td { padding: 8px; }`.
|
|
@@ -4,6 +4,8 @@ Put the element the tooltip describes in the `trigger` slot and the hint in the
|
|
|
4
4
|
|
|
5
5
|
The tooltip shows after a short hover delay (configurable via the `delay` prop) and immediately on keyboard focus. The trigger must be focusable for keyboard and screen-reader users to reach the hint — a `c-icon-button` or `c-button` qualifies; a bare `<span>` does not.
|
|
6
6
|
|
|
7
|
+
When the described element cannot be slotted, point the `trigger` prop at it instead — its document ID, or the element itself via property binding. The tooltip then wires hover/focus onto that element, mirrors the `aria-description` there, and anchors the bubble to it. Supplying both routes is a misuse: the prop wins, the slotted element gets no wiring, and a console warning flags it.
|
|
8
|
+
|
|
7
9
|
## When to use
|
|
8
10
|
|
|
9
11
|
- To name an icon-only control or clarify a truncated label.
|
|
@@ -17,7 +19,7 @@ The tooltip hides when the pointer leaves the trigger and panel, when focus leav
|
|
|
17
19
|
|
|
18
20
|
The tooltip implements the WCAG 1.4.13 (Content on Hover or Focus) contract: dismissable, hoverable, persistent.
|
|
19
21
|
|
|
20
|
-
The tooltip content is mirrored onto the slotted
|
|
22
|
+
The tooltip content is mirrored onto the trigger (slotted or designated) as `aria-description`, so screen readers announce it with the trigger even while the bubble is closed. `aria-describedby` is not used because ARIA ID references cannot cross the shadow boundary between the light-DOM trigger and the shadow-DOM panel (ADR-0033).
|
|
21
23
|
|
|
22
24
|
## Layering
|
|
23
25
|
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
--color-on-surface-sunken: var(--c-on-surface-sunken);
|
|
36
36
|
--color-border: var(--c-border);
|
|
37
37
|
--color-border-strong: var(--c-border-strong);
|
|
38
|
+
--color-divider: var(--c-divider);
|
|
38
39
|
--color-ring: var(--c-ring);
|
|
39
40
|
|
|
40
41
|
/* Inverted-surface tier (ADR-0032): mode-aware contrast flip — not the
|
|
@@ -158,6 +158,7 @@
|
|
|
158
158
|
--c-on-surface-sunken: var(--c-primary-700);
|
|
159
159
|
--c-border: var(--c-tertiary-200);
|
|
160
160
|
--c-border-strong: var(--c-tertiary-600);
|
|
161
|
+
--c-divider: color-mix(in srgb, var(--c-black) 12%, transparent);
|
|
161
162
|
--c-ring: var(--c-primary-500);
|
|
162
163
|
--c-surface-inverted: var(--c-slate-950);
|
|
163
164
|
--c-on-surface-inverted: var(--c-white);
|
|
@@ -252,6 +253,7 @@
|
|
|
252
253
|
--c-on-surface-sunken: var(--c-slate-100);
|
|
253
254
|
--c-border: var(--c-slate-700);
|
|
254
255
|
--c-border-strong: var(--c-slate-400);
|
|
256
|
+
--c-divider: color-mix(in srgb, var(--c-white) 12%, transparent);
|
|
255
257
|
--c-ring: var(--c-primary-300);
|
|
256
258
|
--c-surface-inverted: var(--c-white);
|
|
257
259
|
--c-on-surface-inverted: var(--c-slate-900);
|
|
@@ -347,6 +349,7 @@
|
|
|
347
349
|
--c-on-surface-sunken: var(--c-slate-100);
|
|
348
350
|
--c-border: var(--c-slate-700);
|
|
349
351
|
--c-border-strong: var(--c-slate-400);
|
|
352
|
+
--c-divider: color-mix(in srgb, var(--c-white) 12%, transparent);
|
|
350
353
|
--c-ring: var(--c-primary-300);
|
|
351
354
|
--c-surface-inverted: var(--c-white);
|
|
352
355
|
--c-on-surface-inverted: var(--c-slate-900);
|
|
@@ -36,7 +36,11 @@
|
|
|
36
36
|
{ "name": "::part(icon)", "description": "The status icon svg" },
|
|
37
37
|
{
|
|
38
38
|
"name": "::part(content)",
|
|
39
|
-
"description": "The wrapper around the
|
|
39
|
+
"description": "The wrapper around the heading and message content"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "::part(heading)",
|
|
43
|
+
"description": "The heading paragraph rendered from the `heading` prop"
|
|
40
44
|
},
|
|
41
45
|
{
|
|
42
46
|
"name": "::part(dismiss)",
|
|
@@ -133,7 +137,11 @@
|
|
|
133
137
|
},
|
|
134
138
|
{
|
|
135
139
|
"name": "::part(indicator)",
|
|
136
|
-
"description": "The
|
|
140
|
+
"description": "The checkbox box itself — the bordered square that fills when checked; border, fill and the keyboard focus ring (its `::before`) all draw with `currentColor`, so `color` recolours them together"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "::part(mark)",
|
|
144
|
+
"description": "The SVG check / indeterminate glyph revealed inside the indicator; draws with `currentColor`, so `color` recolours it"
|
|
137
145
|
},
|
|
138
146
|
{
|
|
139
147
|
"name": "::part(content)",
|
|
@@ -437,7 +445,7 @@
|
|
|
437
445
|
},
|
|
438
446
|
{
|
|
439
447
|
"name": "::part(indicator)",
|
|
440
|
-
"description": "The
|
|
448
|
+
"description": "The radio ring itself; the selection dot is its `::after` and the keyboard focus ring its `::before` — all three follow `currentColor`, so `color` recolours the whole indicator, focus ring included"
|
|
441
449
|
},
|
|
442
450
|
{
|
|
443
451
|
"name": "::part(content)",
|
|
@@ -58,13 +58,18 @@
|
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"name": "c-alert",
|
|
61
|
-
"description": "
|
|
61
|
+
"description": "A persistent, in-flow status message: a tinted box whose type carries a status family's colours through the icon, heading and accent edge, while the body copy stays neutral.\n---\n\n\n### **Events:**\n - **dismiss** - Fired when the dismiss button is pressed. The alert does not hide\nitself — the consumer owns removal.\n\n### **Slots:**\n - **heading** - Rich heading content; overrides the `heading` prop\n- **default** - Default slot\n\n### **CSS Parts:**\n - **root** - The tinted box carrying the type's wash, hairline border and accent edge\n- **icon** - The status icon svg\n- **content** - The wrapper around the heading and message content\n- **heading** - The heading paragraph rendered from the `heading` prop\n- **dismiss** - The dismiss button rendered when `dismissible` is set",
|
|
62
62
|
"attributes": [
|
|
63
63
|
{
|
|
64
64
|
"name": "dismissible",
|
|
65
65
|
"description": "Show a dismiss button. The alert only emits `dismiss` — removing it from\nthe page stays the consumer's job.",
|
|
66
66
|
"values": []
|
|
67
67
|
},
|
|
68
|
+
{
|
|
69
|
+
"name": "heading",
|
|
70
|
+
"description": "Heading rendered above the message. The `heading` slot overrides it for\nrich content.",
|
|
71
|
+
"values": []
|
|
72
|
+
},
|
|
68
73
|
{
|
|
69
74
|
"name": "type",
|
|
70
75
|
"description": "Type of the alert",
|
|
@@ -355,7 +360,7 @@
|
|
|
355
360
|
},
|
|
356
361
|
{
|
|
357
362
|
"name": "c-checkbox",
|
|
358
|
-
"description": "
|
|
363
|
+
"description": "A form control for a single on/off choice: a native checkbox with a label, an optional hint, and validation messaging.\n---\n\n\n### **Events:**\n - **change** - Standard bubbling DOM change event, re-dispatched from the host when the\ncheckbox is toggled (the inner input's change does not cross the shadow\nboundary). No detail; read the new value from the host's `value` property.\n- **changeValue** - Fired when the checkbox is toggled, carrying the new value —\n`trueValue` when checked, `falseValue` when unchecked. Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event fired on toggle so a plain Vue `v-model`\nworks without the `v-control` directive. No detail.\n- **update:value** - v-model contract event fired on toggle, carrying the new value —\n`trueValue` when checked, `falseValue` when unchecked.\n\n### **Slots:**\n - **default** - Default slot for the label\n\n### **CSS Parts:**\n - **root** - The outer wrapper containing the checkbox, label and message\n- **label** - The `<label>` element wrapping the indicator and the label content\n- **indicator** - The checkbox box itself — the bordered square that fills when checked; border, fill and the keyboard focus ring (its `::before`) all draw with `currentColor`, so `color` recolours them together\n- **mark** - The SVG check / indeterminate glyph revealed inside the indicator; draws with `currentColor`, so `color` recolours it\n- **content** - Wrapper around the label text or slotted label content\n- **message** - The hint / error message area below the checkbox (always reserved unless `hide-details`)",
|
|
359
364
|
"attributes": [
|
|
360
365
|
{
|
|
361
366
|
"name": "checked",
|
|
@@ -948,6 +953,11 @@
|
|
|
948
953
|
{ "name": "top-start" },
|
|
949
954
|
{ "name": "top" }
|
|
950
955
|
]
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"name": "trigger",
|
|
959
|
+
"description": "Designated trigger: an element elsewhere in the document that opens the\nmenu — its document ID, or the element itself. The same trigger concept\nas the `trigger` slot, supplied by reference: the menu wires\nclick-to-toggle, arrow-key opening, ARIA and focus return onto it and\nanchors the panel to it. When both routes are supplied, this prop wins\nover the slot.",
|
|
960
|
+
"values": [{ "name": "HTMLElement" }]
|
|
951
961
|
}
|
|
952
962
|
],
|
|
953
963
|
"references": []
|
|
@@ -1204,6 +1214,11 @@
|
|
|
1204
1214
|
{ "name": "top-start" },
|
|
1205
1215
|
{ "name": "top" }
|
|
1206
1216
|
]
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
"name": "trigger",
|
|
1220
|
+
"description": "Designated trigger: an element elsewhere in the document that opens the\npopover — its document ID, or the element itself. The same trigger\nconcept as the `trigger` slot, supplied by reference: the popover wires\nclick-to-toggle, ARIA and focus return onto it and anchors the panel to\nit. When both routes are supplied, this prop wins over the slot.",
|
|
1221
|
+
"values": [{ "name": "HTMLElement" }]
|
|
1207
1222
|
}
|
|
1208
1223
|
],
|
|
1209
1224
|
"references": []
|
|
@@ -1264,7 +1279,7 @@
|
|
|
1264
1279
|
},
|
|
1265
1280
|
{
|
|
1266
1281
|
"name": "c-radio",
|
|
1267
|
-
"description": "A single radio option inside a `c-radio-group`: a native radio input whose default slot is its clickable, announced label.\n---\n\n\n### **Events:**\n - **change** - Fired when the radio is selected by the user, carrying its `value`.\nBubbles composed so the parent `<c-radio-group>` — whose shadow root a\nlight-DOM event never enters — catches it on its host; a consumer\nlistening on the group hears it too, with the radio as `target`.\n\n### **Slots:**\n - **default** - The radio's label content, rendered inside the shadow `<label>` so it stays click-associated and announced\n\n### **CSS Parts:**\n - **root** - The `<label>` row wrapping the input, indicator and label content\n- **indicator** - The
|
|
1282
|
+
"description": "A single radio option inside a `c-radio-group`: a native radio input whose default slot is its clickable, announced label.\n---\n\n\n### **Events:**\n - **change** - Fired when the radio is selected by the user, carrying its `value`.\nBubbles composed so the parent `<c-radio-group>` — whose shadow root a\nlight-DOM event never enters — catches it on its host; a consumer\nlistening on the group hears it too, with the radio as `target`.\n\n### **Slots:**\n - **default** - The radio's label content, rendered inside the shadow `<label>` so it stays click-associated and announced\n\n### **CSS Parts:**\n - **root** - The `<label>` row wrapping the input, indicator and label content\n- **indicator** - The radio ring itself; the selection dot is its `::after` and the keyboard focus ring its `::before` — all three follow `currentColor`, so `color` recolours the whole indicator, focus ring included\n- **content** - Wrapper around the slotted label content",
|
|
1268
1283
|
"attributes": [
|
|
1269
1284
|
{
|
|
1270
1285
|
"name": "disabled",
|
|
@@ -1563,7 +1578,7 @@
|
|
|
1563
1578
|
},
|
|
1564
1579
|
{
|
|
1565
1580
|
"name": "c-switch",
|
|
1566
|
-
"description": "
|
|
1581
|
+
"description": "A toggle for a binary setting that takes effect immediately: a native switch control with a label, an optional hint, and validation messaging.\n---\n\n\n### **Events:**\n - **change** - Standard bubbling DOM change event, re-dispatched from the host when the\nswitch is toggled (the inner input's change does not cross the shadow\nboundary). No detail; read the new value from the host's `value` property.\n- **changeValue** - Fired when the switch is toggled, carrying the new value —\n`trueValue` when on, `falseValue` when off. Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event fired on toggle so a plain Vue `v-model`\nworks without the `v-control` directive. No detail.\n- **update:value** - v-model contract event fired on toggle, carrying the new value —\n`trueValue` when on, `falseValue` when off.\n\n### **Slots:**\n - **default** - The visible label of the switch (fallback when the `label` prop is not set)\n\n### **CSS Parts:**\n - **root** - The `<label>` element wrapping the toggle and the label text\n- **slider** - The toggle track (its `::before` pseudo-element is the handle)\n- **label** - Wrapper around the label text or slotted label content",
|
|
1567
1582
|
"attributes": [
|
|
1568
1583
|
{
|
|
1569
1584
|
"name": "checked",
|
|
@@ -1676,7 +1691,7 @@
|
|
|
1676
1691
|
},
|
|
1677
1692
|
{
|
|
1678
1693
|
"name": "c-table",
|
|
1679
|
-
"description": "
|
|
1694
|
+
"description": "A styled wrapper for a table you author yourself: slot in a plain `<table>` and c-table gives it the CSC look plus an optional responsive card layout on narrow screens. The table stays in your own DOM — your stylesheets, your framework's rendering, and `::part()` selectors on components nested in cells (a `c-tag` status chip, a `c-pagination` footer) all keep working.\n---\n\n\n### **Slots:**\n - **default** - The consumer-authored `<table>` element",
|
|
1680
1695
|
"attributes": [
|
|
1681
1696
|
{
|
|
1682
1697
|
"name": "mobile-breakpoint",
|
|
@@ -1983,6 +1998,11 @@
|
|
|
1983
1998
|
"name": "text",
|
|
1984
1999
|
"description": "The tooltip text. Overridden by the `content` slot when that is\npopulated.",
|
|
1985
2000
|
"values": []
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"name": "trigger",
|
|
2004
|
+
"description": "Designated trigger: an element elsewhere in the document that the\ntooltip describes — its document ID, or the element itself. The same\ntrigger concept as the `trigger` slot, supplied by reference: the\ntooltip wires hover/focus, mirrors `aria-description` onto it and\nanchors the bubble to it. When both routes are supplied, this prop wins\nover the slot.",
|
|
2005
|
+
"values": [{ "name": "HTMLElement" }]
|
|
1986
2006
|
}
|
|
1987
2007
|
],
|
|
1988
2008
|
"references": []
|
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.7",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
"name": "c-alert",
|
|
190
|
-
"description": "
|
|
190
|
+
"description": "A persistent, in-flow status message: a tinted box whose type carries a status family's colours through the icon, heading and accent edge, while the body copy stays neutral.\n---\n\n\n### **Events:**\n - **dismiss** - Fired when the dismiss button is pressed. The alert does not hide\nitself — the consumer owns removal.\n\n### **Slots:**\n - **heading** - Rich heading content; overrides the `heading` prop\n- **default** - Default slot\n\n### **CSS Parts:**\n - **root** - The tinted box carrying the type's wash, hairline border and accent edge\n- **icon** - The status icon svg\n- **content** - The wrapper around the heading and message content\n- **heading** - The heading paragraph rendered from the `heading` prop\n- **dismiss** - The dismiss button rendered when `dismissible` is set",
|
|
191
191
|
"doc-url": "",
|
|
192
192
|
"attributes": [
|
|
193
193
|
{
|
|
@@ -195,6 +195,11 @@
|
|
|
195
195
|
"description": "Show a dismiss button. The alert only emits `dismiss` — removing it from\nthe page stays the consumer's job.",
|
|
196
196
|
"value": { "type": "boolean", "default": "false" }
|
|
197
197
|
},
|
|
198
|
+
{
|
|
199
|
+
"name": "heading",
|
|
200
|
+
"description": "Heading rendered above the message. The `heading` slot overrides it for\nrich content.",
|
|
201
|
+
"value": { "type": "string" }
|
|
202
|
+
},
|
|
198
203
|
{
|
|
199
204
|
"name": "type",
|
|
200
205
|
"description": "Type of the alert",
|
|
@@ -205,7 +210,10 @@
|
|
|
205
210
|
}
|
|
206
211
|
],
|
|
207
212
|
"slots": [
|
|
208
|
-
{
|
|
213
|
+
{
|
|
214
|
+
"name": "heading",
|
|
215
|
+
"description": "Rich heading content; overrides the `heading` prop"
|
|
216
|
+
},
|
|
209
217
|
{ "name": "default", "description": "Default slot" }
|
|
210
218
|
],
|
|
211
219
|
"events": [
|
|
@@ -222,6 +230,11 @@
|
|
|
222
230
|
"description": "Show a dismiss button. The alert only emits `dismiss` — removing it from\nthe page stays the consumer's job.",
|
|
223
231
|
"type": "boolean"
|
|
224
232
|
},
|
|
233
|
+
{
|
|
234
|
+
"name": "heading",
|
|
235
|
+
"description": "Heading rendered above the message. The `heading` slot overrides it for\nrich content.",
|
|
236
|
+
"type": "string"
|
|
237
|
+
},
|
|
225
238
|
{
|
|
226
239
|
"name": "type",
|
|
227
240
|
"description": "Type of the alert",
|
|
@@ -949,7 +962,7 @@
|
|
|
949
962
|
},
|
|
950
963
|
{
|
|
951
964
|
"name": "c-checkbox",
|
|
952
|
-
"description": "
|
|
965
|
+
"description": "A form control for a single on/off choice: a native checkbox with a label, an optional hint, and validation messaging.\n---\n\n\n### **Events:**\n - **change** - Standard bubbling DOM change event, re-dispatched from the host when the\ncheckbox is toggled (the inner input's change does not cross the shadow\nboundary). No detail; read the new value from the host's `value` property.\n- **changeValue** - Fired when the checkbox is toggled, carrying the new value —\n`trueValue` when checked, `falseValue` when unchecked. Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event fired on toggle so a plain Vue `v-model`\nworks without the `v-control` directive. No detail.\n- **update:value** - v-model contract event fired on toggle, carrying the new value —\n`trueValue` when checked, `falseValue` when unchecked.\n\n### **Slots:**\n - **default** - Default slot for the label\n\n### **CSS Parts:**\n - **root** - The outer wrapper containing the checkbox, label and message\n- **label** - The `<label>` element wrapping the indicator and the label content\n- **indicator** - The checkbox box itself — the bordered square that fills when checked; border, fill and the keyboard focus ring (its `::before`) all draw with `currentColor`, so `color` recolours them together\n- **mark** - The SVG check / indeterminate glyph revealed inside the indicator; draws with `currentColor`, so `color` recolours it\n- **content** - Wrapper around the label text or slotted label content\n- **message** - The hint / error message area below the checkbox (always reserved unless `hide-details`)",
|
|
953
966
|
"doc-url": "",
|
|
954
967
|
"attributes": [
|
|
955
968
|
{
|
|
@@ -2414,6 +2427,11 @@
|
|
|
2414
2427
|
"type": "'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top'",
|
|
2415
2428
|
"default": "'bottom-start'"
|
|
2416
2429
|
}
|
|
2430
|
+
},
|
|
2431
|
+
{
|
|
2432
|
+
"name": "trigger",
|
|
2433
|
+
"description": "Designated trigger: an element elsewhere in the document that opens the\nmenu — its document ID, or the element itself. The same trigger concept\nas the `trigger` slot, supplied by reference: the menu wires\nclick-to-toggle, arrow-key opening, ARIA and focus return onto it and\nanchors the panel to it. When both routes are supplied, this prop wins\nover the slot.",
|
|
2434
|
+
"value": { "type": "HTMLElement | string" }
|
|
2417
2435
|
}
|
|
2418
2436
|
],
|
|
2419
2437
|
"slots": [
|
|
@@ -2454,6 +2472,11 @@
|
|
|
2454
2472
|
"name": "position",
|
|
2455
2473
|
"description": "Preferred placement of the panel relative to the trigger.",
|
|
2456
2474
|
"type": "'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top'"
|
|
2475
|
+
},
|
|
2476
|
+
{
|
|
2477
|
+
"name": "trigger",
|
|
2478
|
+
"description": "Designated trigger: an element elsewhere in the document that opens the\nmenu — its document ID, or the element itself. The same trigger concept\nas the `trigger` slot, supplied by reference: the menu wires\nclick-to-toggle, arrow-key opening, ARIA and focus return onto it and\nanchors the panel to it. When both routes are supplied, this prop wins\nover the slot.",
|
|
2479
|
+
"type": "HTMLElement | string"
|
|
2457
2480
|
}
|
|
2458
2481
|
],
|
|
2459
2482
|
"events": [
|
|
@@ -3100,6 +3123,11 @@
|
|
|
3100
3123
|
"type": "'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top'",
|
|
3101
3124
|
"default": "'bottom'"
|
|
3102
3125
|
}
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
"name": "trigger",
|
|
3129
|
+
"description": "Designated trigger: an element elsewhere in the document that opens the\npopover — its document ID, or the element itself. The same trigger\nconcept as the `trigger` slot, supplied by reference: the popover wires\nclick-to-toggle, ARIA and focus return onto it and anchors the panel to\nit. When both routes are supplied, this prop wins over the slot.",
|
|
3130
|
+
"value": { "type": "HTMLElement | string" }
|
|
3103
3131
|
}
|
|
3104
3132
|
],
|
|
3105
3133
|
"slots": [
|
|
@@ -3140,6 +3168,11 @@
|
|
|
3140
3168
|
"name": "position",
|
|
3141
3169
|
"description": "Preferred placement of the panel relative to the trigger.",
|
|
3142
3170
|
"type": "'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top'"
|
|
3171
|
+
},
|
|
3172
|
+
{
|
|
3173
|
+
"name": "trigger",
|
|
3174
|
+
"description": "Designated trigger: an element elsewhere in the document that opens the\npopover — its document ID, or the element itself. The same trigger\nconcept as the `trigger` slot, supplied by reference: the popover wires\nclick-to-toggle, ARIA and focus return onto it and anchors the panel to\nit. When both routes are supplied, this prop wins over the slot.",
|
|
3175
|
+
"type": "HTMLElement | string"
|
|
3143
3176
|
}
|
|
3144
3177
|
],
|
|
3145
3178
|
"events": [
|
|
@@ -3266,7 +3299,7 @@
|
|
|
3266
3299
|
},
|
|
3267
3300
|
{
|
|
3268
3301
|
"name": "c-radio",
|
|
3269
|
-
"description": "A single radio option inside a `c-radio-group`: a native radio input whose default slot is its clickable, announced label.\n---\n\n\n### **Events:**\n - **change** - Fired when the radio is selected by the user, carrying its `value`.\nBubbles composed so the parent `<c-radio-group>` — whose shadow root a\nlight-DOM event never enters — catches it on its host; a consumer\nlistening on the group hears it too, with the radio as `target`.\n\n### **Slots:**\n - **default** - The radio's label content, rendered inside the shadow `<label>` so it stays click-associated and announced\n\n### **CSS Parts:**\n - **root** - The `<label>` row wrapping the input, indicator and label content\n- **indicator** - The
|
|
3302
|
+
"description": "A single radio option inside a `c-radio-group`: a native radio input whose default slot is its clickable, announced label.\n---\n\n\n### **Events:**\n - **change** - Fired when the radio is selected by the user, carrying its `value`.\nBubbles composed so the parent `<c-radio-group>` — whose shadow root a\nlight-DOM event never enters — catches it on its host; a consumer\nlistening on the group hears it too, with the radio as `target`.\n\n### **Slots:**\n - **default** - The radio's label content, rendered inside the shadow `<label>` so it stays click-associated and announced\n\n### **CSS Parts:**\n - **root** - The `<label>` row wrapping the input, indicator and label content\n- **indicator** - The radio ring itself; the selection dot is its `::after` and the keyboard focus ring its `::before` — all three follow `currentColor`, so `color` recolours the whole indicator, focus ring included\n- **content** - Wrapper around the slotted label content",
|
|
3270
3303
|
"doc-url": "",
|
|
3271
3304
|
"attributes": [
|
|
3272
3305
|
{
|
|
@@ -4244,7 +4277,7 @@
|
|
|
4244
4277
|
},
|
|
4245
4278
|
{
|
|
4246
4279
|
"name": "c-switch",
|
|
4247
|
-
"description": "
|
|
4280
|
+
"description": "A toggle for a binary setting that takes effect immediately: a native switch control with a label, an optional hint, and validation messaging.\n---\n\n\n### **Events:**\n - **change** - Standard bubbling DOM change event, re-dispatched from the host when the\nswitch is toggled (the inner input's change does not cross the shadow\nboundary). No detail; read the new value from the host's `value` property.\n- **changeValue** - Fired when the switch is toggled, carrying the new value —\n`trueValue` when on, `falseValue` when off. Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event fired on toggle so a plain Vue `v-model`\nworks without the `v-control` directive. No detail.\n- **update:value** - v-model contract event fired on toggle, carrying the new value —\n`trueValue` when on, `falseValue` when off.\n\n### **Slots:**\n - **default** - The visible label of the switch (fallback when the `label` prop is not set)\n\n### **CSS Parts:**\n - **root** - The `<label>` element wrapping the toggle and the label text\n- **slider** - The toggle track (its `::before` pseudo-element is the handle)\n- **label** - Wrapper around the label text or slotted label content",
|
|
4248
4281
|
"doc-url": "",
|
|
4249
4282
|
"attributes": [
|
|
4250
4283
|
{
|
|
@@ -4637,7 +4670,7 @@
|
|
|
4637
4670
|
},
|
|
4638
4671
|
{
|
|
4639
4672
|
"name": "c-table",
|
|
4640
|
-
"description": "
|
|
4673
|
+
"description": "A styled wrapper for a table you author yourself: slot in a plain `<table>` and c-table gives it the CSC look plus an optional responsive card layout on narrow screens. The table stays in your own DOM — your stylesheets, your framework's rendering, and `::part()` selectors on components nested in cells (a `c-tag` status chip, a `c-pagination` footer) all keep working.\n---\n\n\n### **Slots:**\n - **default** - The consumer-authored `<table>` element",
|
|
4641
4674
|
"doc-url": "",
|
|
4642
4675
|
"attributes": [
|
|
4643
4676
|
{
|
|
@@ -4651,7 +4684,12 @@
|
|
|
4651
4684
|
"value": { "type": "boolean", "default": "false" }
|
|
4652
4685
|
}
|
|
4653
4686
|
],
|
|
4654
|
-
"slots": [
|
|
4687
|
+
"slots": [
|
|
4688
|
+
{
|
|
4689
|
+
"name": "default",
|
|
4690
|
+
"description": "The consumer-authored `<table>` element"
|
|
4691
|
+
}
|
|
4692
|
+
],
|
|
4655
4693
|
"events": [],
|
|
4656
4694
|
"js": {
|
|
4657
4695
|
"properties": [
|
|
@@ -5347,6 +5385,11 @@
|
|
|
5347
5385
|
"name": "text",
|
|
5348
5386
|
"description": "The tooltip text. Overridden by the `content` slot when that is\npopulated.",
|
|
5349
5387
|
"value": { "type": "string", "default": "''" }
|
|
5388
|
+
},
|
|
5389
|
+
{
|
|
5390
|
+
"name": "trigger",
|
|
5391
|
+
"description": "Designated trigger: an element elsewhere in the document that the\ntooltip describes — its document ID, or the element itself. The same\ntrigger concept as the `trigger` slot, supplied by reference: the\ntooltip wires hover/focus, mirrors `aria-description` onto it and\nanchors the bubble to it. When both routes are supplied, this prop wins\nover the slot.",
|
|
5392
|
+
"value": { "type": "HTMLElement | string" }
|
|
5350
5393
|
}
|
|
5351
5394
|
],
|
|
5352
5395
|
"slots": [
|
|
@@ -5392,6 +5435,11 @@
|
|
|
5392
5435
|
"name": "text",
|
|
5393
5436
|
"description": "The tooltip text. Overridden by the `content` slot when that is\npopulated.",
|
|
5394
5437
|
"type": "string"
|
|
5438
|
+
},
|
|
5439
|
+
{
|
|
5440
|
+
"name": "trigger",
|
|
5441
|
+
"description": "Designated trigger: an element elsewhere in the document that the\ntooltip describes — its document ID, or the element itself. The same\ntrigger concept as the `trigger` slot, supplied by reference: the\ntooltip wires hover/focus, mirrors `aria-description` onto it and\nanchors the bubble to it. When both routes are supplied, this prop wins\nover the slot.",
|
|
5442
|
+
"type": "HTMLElement | string"
|
|
5395
5443
|
}
|
|
5396
5444
|
],
|
|
5397
5445
|
"events": [
|
|
@@ -5440,7 +5488,11 @@
|
|
|
5440
5488
|
{ "name": "part(icon)", "description": "The status icon svg" },
|
|
5441
5489
|
{
|
|
5442
5490
|
"name": "part(content)",
|
|
5443
|
-
"description": "The wrapper around the
|
|
5491
|
+
"description": "The wrapper around the heading and message content"
|
|
5492
|
+
},
|
|
5493
|
+
{
|
|
5494
|
+
"name": "part(heading)",
|
|
5495
|
+
"description": "The heading paragraph rendered from the `heading` prop"
|
|
5444
5496
|
},
|
|
5445
5497
|
{
|
|
5446
5498
|
"name": "part(dismiss)",
|
|
@@ -5540,7 +5592,11 @@
|
|
|
5540
5592
|
},
|
|
5541
5593
|
{
|
|
5542
5594
|
"name": "part(indicator)",
|
|
5543
|
-
"description": "The
|
|
5595
|
+
"description": "The checkbox box itself — the bordered square that fills when checked; border, fill and the keyboard focus ring (its `::before`) all draw with `currentColor`, so `color` recolours them together"
|
|
5596
|
+
},
|
|
5597
|
+
{
|
|
5598
|
+
"name": "part(mark)",
|
|
5599
|
+
"description": "The SVG check / indeterminate glyph revealed inside the indicator; draws with `currentColor`, so `color` recolours it"
|
|
5544
5600
|
},
|
|
5545
5601
|
{
|
|
5546
5602
|
"name": "part(content)",
|
|
@@ -5850,7 +5906,7 @@
|
|
|
5850
5906
|
},
|
|
5851
5907
|
{
|
|
5852
5908
|
"name": "part(indicator)",
|
|
5853
|
-
"description": "The
|
|
5909
|
+
"description": "The radio ring itself; the selection dot is its `::after` and the keyboard focus ring its `::before` — all three follow `currentColor`, so `color` recolours the whole indicator, focus ring included"
|
|
5854
5910
|
},
|
|
5855
5911
|
{
|
|
5856
5912
|
"name": "part(content)",
|
|
@@ -9,6 +9,13 @@ export interface CAlertProps {
|
|
|
9
9
|
* the page stays the consumer's job.
|
|
10
10
|
*/
|
|
11
11
|
dismissible?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Heading rendered above the message. The `heading` slot overrides it for
|
|
14
|
+
* rich content.
|
|
15
|
+
*
|
|
16
|
+
* @freeform
|
|
17
|
+
*/
|
|
18
|
+
heading?: string;
|
|
12
19
|
/**
|
|
13
20
|
* Type of the alert
|
|
14
21
|
*
|
|
@@ -28,7 +35,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAlert
|
|
|
28
35
|
type: CAlertType;
|
|
29
36
|
dismissible: boolean;
|
|
30
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
31
|
-
|
|
38
|
+
heading?: (props: {}) => any;
|
|
32
39
|
} & {
|
|
33
40
|
default?: (props: {}) => any;
|
|
34
41
|
}>;
|
|
@@ -6,6 +6,15 @@ interface CMenuProps {
|
|
|
6
6
|
open?: boolean;
|
|
7
7
|
/** Preferred placement of the panel relative to the trigger. */
|
|
8
8
|
position?: CPlacement;
|
|
9
|
+
/**
|
|
10
|
+
* Designated trigger: an element elsewhere in the document that opens the
|
|
11
|
+
* menu — its document ID, or the element itself. The same trigger concept
|
|
12
|
+
* as the `trigger` slot, supplied by reference: the menu wires
|
|
13
|
+
* click-to-toggle, arrow-key opening, ARIA and focus return onto it and
|
|
14
|
+
* anchors the panel to it. When both routes are supplied, this prop wins
|
|
15
|
+
* over the slot.
|
|
16
|
+
*/
|
|
17
|
+
trigger?: HTMLElement | string;
|
|
9
18
|
}
|
|
10
19
|
declare var __VLS_1: {}, __VLS_3: {};
|
|
11
20
|
type __VLS_Slots = {} & {
|
|
@@ -17,6 +26,7 @@ declare const __VLS_base: import("vue").DefineComponent<CMenuProps, {}, {}, {},
|
|
|
17
26
|
open: boolean;
|
|
18
27
|
distance: number | string;
|
|
19
28
|
position: CPlacement;
|
|
29
|
+
trigger: HTMLElement | string;
|
|
20
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
32
|
declare const _default: typeof __VLS_export;
|