@nldd/design-system 0.8.58 → 0.8.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/actions/menu/menu.d.ts +25 -4
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.i18n.d.ts +1 -1
- package/dist/components/actions/menu/menu.i18n.js +1 -1
- package/dist/components/actions/menu/menu.i18n.js.map +1 -1
- package/dist/components/actions/menu/menu.js +50 -6
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.styles.js +18 -4
- package/dist/components/actions/menu/menu.styles.js.map +1 -1
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +99 -50
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/components.js +1 -1
- package/dist/components/content/byline/byline.d.ts +8 -0
- package/dist/components/content/byline/byline.d.ts.map +1 -1
- package/dist/components/content/byline/byline.js +18 -5
- package/dist/components/content/byline/byline.js.map +1 -1
- package/dist/components/content/byline/byline.styles.d.ts.map +1 -1
- package/dist/components/content/byline/byline.styles.js +23 -6
- package/dist/components/content/byline/byline.styles.js.map +1 -1
- package/dist/components/content/byline/byline.template.d.ts.map +1 -1
- package/dist/components/content/byline/byline.template.js +17 -13
- package/dist/components/content/byline/byline.template.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +27 -2
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +33 -2
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +72 -13
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -1
- package/dist/components/{index-C2jQOZa6.js → index-CtsEx0-K.js} +992 -644
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +6 -0
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +11 -5
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +4 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +18 -3
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.js +29 -1
- package/dist/components/layout/page-sections/hero/hero.styles.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +18 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +130 -24
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/{prism-python-BzzeiWRd.js → prism-python-SgP2Rws4.js} +1 -1
- package/dist/components/{prism-rust-DzgIGUtE.js → prism-rust-CSuFXPDt.js} +1 -1
- package/dist/components/{prism-typescript-KyVBIohW.js → prism-typescript-DrsfPuKI.js} +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts +6 -0
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +9 -0
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js +30 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.js +1 -0
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.js.map +1 -1
- package/package.json +4 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { html, nothing } from 'lit';
|
|
2
|
+
import { sanitizeUrl } from '../../../utilities/sanitize-url.js';
|
|
2
3
|
const menuRoleMap = {
|
|
3
4
|
menu: 'menu',
|
|
4
5
|
listbox: 'listbox',
|
|
@@ -33,7 +34,7 @@ export function menuTemplate(isEmpty, variant) {
|
|
|
33
34
|
@click=${this._handleBack}
|
|
34
35
|
@mouseenter=${this._handleBackMouseenter}
|
|
35
36
|
>
|
|
36
|
-
<nldd-icon-cell
|
|
37
|
+
<nldd-icon-cell
|
|
37
38
|
size="20"
|
|
38
39
|
icon="chevron-left"
|
|
39
40
|
></nldd-icon-cell>
|
|
@@ -73,54 +74,102 @@ export function menuItemTemplate(variant = 'menu') {
|
|
|
73
74
|
const hasCheckState = this.type !== 'button' && variant === 'menu';
|
|
74
75
|
const role = itemRoleMap[this.type][variant];
|
|
75
76
|
const hasSubmenu = this._hasSubmenu;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
77
|
+
// A plain button item with an href renders as a real link. Submenu openers,
|
|
78
|
+
// checkbox/radio items, and disabled items keep the button — they need its
|
|
79
|
+
// richer behaviour (popover invoker, check state, inert disabling).
|
|
80
|
+
// Sanitize the href so a caller-supplied javascript:/data:/vbscript:/blob:
|
|
81
|
+
// URL can't become an XSS vector; a blocked URL yields '' and falls back to
|
|
82
|
+
// the button branch. Mirrors the nav-bar sheet (top-navigation-bar.ts).
|
|
83
|
+
const safeHref = sanitizeUrl(this.href) ?? '';
|
|
84
|
+
const asLink = !!safeHref && this.type === 'button' && !hasSubmenu && !this.disabled;
|
|
85
|
+
const content = html `
|
|
86
|
+
${hasCheckState ? html `
|
|
87
|
+
<nldd-icon-cell
|
|
88
|
+
size="24"
|
|
89
|
+
horizontal-alignment="center"
|
|
90
|
+
icon=${this.selected ? 'check-mark' : nothing}
|
|
91
|
+
></nldd-icon-cell>
|
|
92
|
+
<nldd-spacer-cell size="4"></nldd-spacer-cell>
|
|
93
|
+
` : nothing}
|
|
94
|
+
${this.icon ? html `
|
|
95
|
+
<nldd-icon-cell
|
|
96
|
+
size="20"
|
|
97
|
+
icon=${this.icon}
|
|
98
|
+
></nldd-icon-cell>
|
|
99
|
+
<nldd-spacer-cell size="8"></nldd-spacer-cell>
|
|
100
|
+
` : nothing}
|
|
101
|
+
<nldd-text-cell
|
|
102
|
+
text=${this.text}
|
|
103
|
+
query=${this.query}
|
|
104
|
+
query-mark-mode=${this.queryMarkMode}
|
|
105
|
+
></nldd-text-cell>
|
|
106
|
+
${this.details ? html `
|
|
107
|
+
<nldd-spacer-cell size="8"></nldd-spacer-cell>
|
|
108
|
+
<nldd-text-cell
|
|
109
|
+
width="fit-content"
|
|
110
|
+
horizontal-alignment="right"
|
|
111
|
+
color="secondary"
|
|
112
|
+
text=${this.details}
|
|
106
113
|
></nldd-text-cell>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
114
|
+
` : nothing}
|
|
115
|
+
<!--
|
|
116
|
+
Accessibility (intentional decision): the shortcut is deliberately NOT
|
|
117
|
+
aria-hidden. It is announced as part of the item's accessible name —
|
|
118
|
+
e.g. "Ongedaan maken Ctrl Z" — so screen-reader users learn the
|
|
119
|
+
accelerator, the way native OS menus surface it. aria-keyshortcuts was
|
|
120
|
+
considered and rejected: the menu item itself does not handle the key
|
|
121
|
+
(the application's global shortcut does), so the plain announcement is
|
|
122
|
+
the deliberate choice rather than a missing aria-hidden.
|
|
123
|
+
-->
|
|
124
|
+
${(this.shortcut || this.shortcutMac || this.shortcutWindows || this.shortcutLinux) ? html `
|
|
125
|
+
<nldd-spacer-cell size="8"></nldd-spacer-cell>
|
|
126
|
+
<nldd-text-cell
|
|
127
|
+
width="fit-content"
|
|
128
|
+
size="md"
|
|
129
|
+
color="secondary"
|
|
130
|
+
horizontal-alignment="right"
|
|
131
|
+
>
|
|
132
|
+
<nldd-keyboard-shortcut
|
|
133
|
+
size="inherit"
|
|
134
|
+
variant="simple"
|
|
135
|
+
color="inherit"
|
|
136
|
+
keys=${this.shortcut || nothing}
|
|
137
|
+
mac-keys=${this.shortcutMac || nothing}
|
|
138
|
+
windows-keys=${this.shortcutWindows || nothing}
|
|
139
|
+
linux-keys=${this.shortcutLinux || nothing}
|
|
140
|
+
></nldd-keyboard-shortcut>
|
|
141
|
+
</nldd-text-cell>
|
|
142
|
+
` : nothing}
|
|
143
|
+
${hasSubmenu ? html `
|
|
144
|
+
<nldd-spacer-cell size="6"></nldd-spacer-cell>
|
|
145
|
+
<nldd-icon-cell
|
|
146
|
+
size="20"
|
|
147
|
+
icon="chevron-right"
|
|
148
|
+
></nldd-icon-cell>
|
|
149
|
+
` : nothing}
|
|
150
|
+
`;
|
|
151
|
+
return html `
|
|
152
|
+
${asLink ? html `
|
|
153
|
+
<a class="menu__item"
|
|
154
|
+
href=${safeHref}
|
|
155
|
+
role=${role}
|
|
156
|
+
aria-current=${this.selected ? 'page' : nothing}
|
|
157
|
+
@click=${this._handleClick}
|
|
158
|
+
>${content}</a>
|
|
159
|
+
` : html `
|
|
160
|
+
<button class="menu__item"
|
|
161
|
+
type="button"
|
|
162
|
+
role=${role}
|
|
163
|
+
?disabled=${this.disabled}
|
|
164
|
+
aria-checked=${hasCheckState ? String(this.selected) : nothing}
|
|
165
|
+
aria-selected=${variant === 'listbox' ? String(this.selected) : nothing}
|
|
166
|
+
aria-haspopup=${hasSubmenu ? 'menu' : nothing}
|
|
167
|
+
aria-expanded=${hasSubmenu ? String(this._submenuOpen) : nothing}
|
|
168
|
+
aria-controls=${hasSubmenu && this._submenuEl?.id ? this._submenuEl.id : nothing}
|
|
169
|
+
.popoverTargetElement=${this._submenuEl}
|
|
170
|
+
@click=${this._handleClick}
|
|
171
|
+
>${content}</button>
|
|
172
|
+
`}
|
|
124
173
|
<!--
|
|
125
174
|
Project the slotted nldd-menu (the submenu, if any) into the flat
|
|
126
175
|
tree. Without this slot, a light-DOM child nldd-menu sits outside
|
|
@@ -145,11 +194,11 @@ export function menuGroupTemplate(component) {
|
|
|
145
194
|
// label reference still reads the hidden node's text content, which is
|
|
146
195
|
// the standard pattern for this kind of labelling.
|
|
147
196
|
return html `
|
|
148
|
-
<div class="
|
|
197
|
+
<div class="menu__group-title"
|
|
149
198
|
id=${component._titleId}
|
|
150
199
|
aria-hidden="true"
|
|
151
200
|
>${component.text}</div>
|
|
152
|
-
<div class="
|
|
201
|
+
<div class="menu__group-items"
|
|
153
202
|
role="group"
|
|
154
203
|
aria-labelledby=${component._titleId}
|
|
155
204
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.template.js","sourceRoot":"","sources":["../../../../src/components/actions/menu/menu.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,E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AE,CAAC,CAAC,CAAC,OAAO;4BACxD,IAAI,CAAC,UAAU;aAC9B,IAAI,CAAC,YAAY;MACxB,OAAO;GACV;;;;;;;;;;;;EAYD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB;IAClC,OAAO,IAAI,CAAA;;SAEH,CAAC;AACV,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,SAAwB;IACzD,0EAA0E;IAC1E,wEAAwE;IACxE,uEAAuE;IACvE,mDAAmD;IACnD,OAAO,IAAI,CAAA;;QAEJ,SAAS,CAAC,QAAQ;;KAErB,SAAS,CAAC,IAAI;;;qBAGE,SAAS,CAAC,QAAQ;;;;EAIrC,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N, a, b, c, d, e, f, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ } from "./index-
|
|
1
|
+
import { N, a, b, c, d, e, f, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ } from "./index-CtsEx0-K.js";
|
|
2
2
|
export {
|
|
3
3
|
N as NLDDActivityIndicator,
|
|
4
4
|
a as NLDDAppView,
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
* zodat ze visueel gescheiden blijven. Op een gekleurde ondergrond kan de
|
|
17
17
|
* ringkleur meegegeven worden via `--context-parent-background-color`.
|
|
18
18
|
*
|
|
19
|
+
* Op smalle breedtes (een sm-container, ≤ 640px) met meerdere avatars komt
|
|
20
|
+
* de avatarrij boven de namen te staan, zodat de tekst de volle breedte
|
|
21
|
+
* houdt; met één avatar blijft de byline op één regel.
|
|
22
|
+
*
|
|
19
23
|
* Avatars worden geslot als `<img slot="avatars">`. Zet `alt=""` wanneer
|
|
20
24
|
* de namen al in de tekst staan (decoratief); geef anders een
|
|
21
25
|
* beschrijvende alt-tekst op.
|
|
@@ -35,6 +39,10 @@ export declare class NLDDByline extends LitElement {
|
|
|
35
39
|
text: string;
|
|
36
40
|
supportingText: string;
|
|
37
41
|
_hasSlottedAvatars: boolean;
|
|
42
|
+
/** Number of slotted avatars. Drives the responsive layout: with two or
|
|
43
|
+
* more avatars, a small-container byline stacks the avatars above the
|
|
44
|
+
* names (see the `data-multiple-avatars` hook in the template/styles). */
|
|
45
|
+
_avatarCount: number;
|
|
38
46
|
_hasSlottedText: boolean;
|
|
39
47
|
_hasSlottedSupportingText: boolean;
|
|
40
48
|
/** Tracks slot content so the text / supporting-text attribute fallbacks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byline.d.ts","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"byline.d.ts","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,qBACa,UAAW,SAAQ,UAAU;IACzC,OAAgB,MAAM,0BAAgB;IAGtC,IAAI,SAAM;IAGV,cAAc,SAAM;IAGpB,kBAAkB,UAAS;IAE3B;;+EAE2E;IAE3E,YAAY,SAAK;IAGjB,eAAe,UAAS;IAGxB,yBAAyB,UAAS;IAElC;;;;iFAI6E;IAC7E,aAAa,GAAI,GAAG,KAAK,KAAG,IAAI,CAS9B;IAEO,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,aAAa,EAAE,UAAU,CAAC;KAC1B;CACD"}
|
|
@@ -22,6 +22,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
22
22
|
* zodat ze visueel gescheiden blijven. Op een gekleurde ondergrond kan de
|
|
23
23
|
* ringkleur meegegeven worden via `--context-parent-background-color`.
|
|
24
24
|
*
|
|
25
|
+
* Op smalle breedtes (een sm-container, ≤ 640px) met meerdere avatars komt
|
|
26
|
+
* de avatarrij boven de namen te staan, zodat de tekst de volle breedte
|
|
27
|
+
* houdt; met één avatar blijft de byline op één regel.
|
|
28
|
+
*
|
|
25
29
|
* Avatars worden geslot als `<img slot="avatars">`. Zet `alt=""` wanneer
|
|
26
30
|
* de namen al in de tekst staan (decoratief); geef anders een
|
|
27
31
|
* beschrijvende alt-tekst op.
|
|
@@ -45,6 +49,10 @@ let NLDDByline = class NLDDByline extends LitElement {
|
|
|
45
49
|
this.text = '';
|
|
46
50
|
this.supportingText = '';
|
|
47
51
|
this._hasSlottedAvatars = false;
|
|
52
|
+
/** Number of slotted avatars. Drives the responsive layout: with two or
|
|
53
|
+
* more avatars, a small-container byline stacks the avatars above the
|
|
54
|
+
* names (see the `data-multiple-avatars` hook in the template/styles). */
|
|
55
|
+
this._avatarCount = 0;
|
|
48
56
|
this._hasSlottedText = false;
|
|
49
57
|
this._hasSlottedSupportingText = false;
|
|
50
58
|
/** Tracks slot content so the text / supporting-text attribute fallbacks
|
|
@@ -54,13 +62,15 @@ let NLDDByline = class NLDDByline extends LitElement {
|
|
|
54
62
|
* also fires for the initial assignment, so the first render is covered. */
|
|
55
63
|
this._onSlotChange = (e) => {
|
|
56
64
|
const slot = e.target;
|
|
57
|
-
const
|
|
58
|
-
if (slot.name === 'avatars')
|
|
59
|
-
this.
|
|
65
|
+
const count = slot.assignedElements().length;
|
|
66
|
+
if (slot.name === 'avatars') {
|
|
67
|
+
this._avatarCount = count;
|
|
68
|
+
this._hasSlottedAvatars = count > 0;
|
|
69
|
+
}
|
|
60
70
|
else if (slot.name === 'text')
|
|
61
|
-
this._hasSlottedText =
|
|
71
|
+
this._hasSlottedText = count > 0;
|
|
62
72
|
else if (slot.name === 'supporting-text')
|
|
63
|
-
this._hasSlottedSupportingText =
|
|
73
|
+
this._hasSlottedSupportingText = count > 0;
|
|
64
74
|
};
|
|
65
75
|
}
|
|
66
76
|
render() {
|
|
@@ -77,6 +87,9 @@ __decorate([
|
|
|
77
87
|
__decorate([
|
|
78
88
|
state()
|
|
79
89
|
], NLDDByline.prototype, "_hasSlottedAvatars", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
state()
|
|
92
|
+
], NLDDByline.prototype, "_avatarCount", void 0);
|
|
80
93
|
__decorate([
|
|
81
94
|
state()
|
|
82
95
|
], NLDDByline.prototype, "_hasSlottedText", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byline.js","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"byline.js","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG/C,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAIN,SAAI,GAAG,EAAE,CAAC;QAGV,mBAAc,GAAG,EA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
1
|
-
{"version":3,"file":"byline.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"byline.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,yBAyGxB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
1
|
+
import { css, unsafeCSS } from 'lit';
|
|
2
|
+
import { breakpoints } from '../../../assets/styles/breakpoints.js';
|
|
2
3
|
import { slottedReset, inheritedTextReset } from '../../../assets/styles/slotted-reset.js';
|
|
4
|
+
const smMax = unsafeCSS(breakpoints.smMax);
|
|
3
5
|
export const bylineStyles = css `
|
|
4
6
|
|
|
5
7
|
|
|
@@ -7,7 +9,7 @@ export const bylineStyles = css `
|
|
|
7
9
|
|
|
8
10
|
:host {
|
|
9
11
|
--_gap: var(--primitives-space-8);
|
|
10
|
-
--_avatar-overlap: var(--primitives-space-8);
|
|
12
|
+
--_avatar-overlap-size: var(--primitives-space-8);
|
|
11
13
|
--_avatar-size: var(--primitives-space-40);
|
|
12
14
|
--_avatar-border-width: var(--primitives-border-width-regular);
|
|
13
15
|
--_avatar-border-color: var(--context-parent-background-color, var(--semantics-surfaces-base-background-color));
|
|
@@ -18,13 +20,28 @@ export const bylineStyles = css `
|
|
|
18
20
|
--_supporting-text-font: var(--primitives-font-body-sm-regular-tight);
|
|
19
21
|
|
|
20
22
|
${inheritedTextReset}
|
|
23
|
+
container-type: inline-size;
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([hidden]) {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
/* # Byline */
|
|
33
|
+
|
|
34
|
+
.byline {
|
|
21
35
|
display: flex;
|
|
22
36
|
align-items: center;
|
|
23
37
|
gap: var(--_gap);
|
|
24
38
|
}
|
|
25
39
|
|
|
26
|
-
|
|
27
|
-
|
|
40
|
+
.byline[data-multiple-avatars] {
|
|
41
|
+
@container (max-width: ${smMax}) {
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
align-items: flex-start;
|
|
44
|
+
}
|
|
28
45
|
}
|
|
29
46
|
|
|
30
47
|
|
|
@@ -32,7 +49,7 @@ export const bylineStyles = css `
|
|
|
32
49
|
|
|
33
50
|
.byline__avatars {
|
|
34
51
|
display: flex;
|
|
35
|
-
padding-inline-start: var(--_avatar-overlap);
|
|
52
|
+
padding-inline-start: var(--_avatar-overlap-size);
|
|
36
53
|
}
|
|
37
54
|
|
|
38
55
|
.byline__avatars[hidden] {
|
|
@@ -42,7 +59,7 @@ export const bylineStyles = css `
|
|
|
42
59
|
.byline__avatars ::slotted(img) {
|
|
43
60
|
${slottedReset}
|
|
44
61
|
display: block !important;
|
|
45
|
-
margin-inline-start: calc(-1 * var(--_avatar-overlap)) !important;
|
|
62
|
+
margin-inline-start: calc(-1 * var(--_avatar-overlap-size)) !important;
|
|
46
63
|
border-radius: var(--_avatar-corner-radius) !important;
|
|
47
64
|
box-shadow: 0 0 0 var(--_avatar-border-width) var(--_avatar-border-color) !important;
|
|
48
65
|
width: var(--_avatar-size) !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byline.styles.js","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"byline.styles.js","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE3F,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;IAiB3B,kBAAkB;;;;;;;;;;;;;;;;;;;2BAmBK,KAAK;;;;;;;;;;;;;;;;;;;IAmB5B,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byline.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"byline.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,wCAwBnD"}
|
|
@@ -3,20 +3,24 @@ export function bylineTemplate(component) {
|
|
|
3
3
|
const hasText = Boolean(component.text) || component._hasSlottedText;
|
|
4
4
|
const hasSupportingText = Boolean(component.supportingText) || component._hasSlottedSupportingText;
|
|
5
5
|
return html `
|
|
6
|
-
<div class="
|
|
7
|
-
?
|
|
6
|
+
<div class="byline"
|
|
7
|
+
?data-multiple-avatars=${component._avatarCount >= 2}
|
|
8
8
|
>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
?hidden=${!hasText}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
<div class="byline__avatars"
|
|
10
|
+
?hidden=${!component._hasSlottedAvatars}
|
|
11
|
+
>
|
|
12
|
+
<slot name="avatars" @slotchange=${component._onSlotChange}></slot>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="byline__text-area"
|
|
15
|
+
?hidden=${!hasText && !hasSupportingText}
|
|
16
|
+
>
|
|
17
|
+
<p class="byline__text"
|
|
18
|
+
?hidden=${!hasText}
|
|
19
|
+
><slot name="text" @slotchange=${component._onSlotChange}>${component.text}</slot></p>
|
|
20
|
+
<p class="byline__supporting-text"
|
|
21
|
+
?hidden=${!hasSupportingText}
|
|
22
|
+
><slot name="supporting-text" @slotchange=${component._onSlotChange}>${component.supportingText}</slot></p>
|
|
23
|
+
</div>
|
|
20
24
|
</div>
|
|
21
25
|
`;
|
|
22
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byline.template.js","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,MAAM,UAAU,cAAc,CAAC,SAAqB;IACnD,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,eAAe,CAAC;IACrE,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,SAAS,CAAC,yBAAyB,CAAC;IACnG,OAAO,IAAI,CAAA;;
|
|
1
|
+
{"version":3,"file":"byline.template.js","sourceRoot":"","sources":["../../../../src/components/content/byline/byline.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,MAAM,UAAU,cAAc,CAAC,SAAqB;IACnD,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,eAAe,CAAC;IACrE,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,SAAS,CAAC,yBAAyB,CAAC;IACnG,OAAO,IAAI,CAAA;;4BAEgB,SAAS,CAAC,YAAY,IAAI,CAAC;;;cAGzC,CAAC,SAAS,CAAC,kBAAkB;;uCAEJ,SAAS,CAAC,aAAa;;;cAGhD,CAAC,OAAO,IAAI,CAAC,iBAAiB;;;eAG7B,CAAC,OAAO;qCACc,SAAS,CAAC,aAAa,IAAI,SAAS,CAAC,IAAI;;eAE/D,CAAC,iBAAiB;gDACe,SAAS,CAAC,aAAa,IAAI,SAAS,CAAC,cAAc;;;EAGjG,CAAC;AACH,CAAC"}
|
|
@@ -20,14 +20,24 @@
|
|
|
20
20
|
* @attr {string} mac-keys - Optionele override voor macOS (incl. iPhone/iPad/iPod).
|
|
21
21
|
* @attr {string} windows-keys - Optionele override voor Windows.
|
|
22
22
|
* @attr {string} linux-keys - Optionele override voor Linux/ChromeOS.
|
|
23
|
-
* @attr {string} size - Grootte: 'sm' | 'md' (default: 'md')
|
|
23
|
+
* @attr {string} size - Grootte: 'sm' | 'md' | 'inherit' (default: 'md'). 'inherit' neemt de
|
|
24
|
+
* font-size over van de container; bij de box-variant schalen de keycaps dan mee in em.
|
|
25
|
+
* @attr {string} variant - 'box' (default) toont elke toets als keycap met vulling en
|
|
26
|
+
* highlight-rand; 'simple' toont de toetsen als platte tekst met scheidingstekens —
|
|
27
|
+
* lichter, voor inline gebruik zoals in een menu-item.
|
|
24
28
|
* @attr {boolean} always-visible - Toon ook op touch-only devices waar shortcuts niet aanroepbaar zijn.
|
|
29
|
+
* @attr {string} color - 'neutral' (default) gebruikt de eigen component-kleuren. 'inherit'
|
|
30
|
+
* laat de toetsen en scheidingstekens de omringende tekstkleur (currentColor) volgen, met
|
|
31
|
+
* een doorschijnende contrast-vulling en highlight-rand — handig op een gevulde vlakkleur
|
|
32
|
+
* of een gemarkeerde rij.
|
|
25
33
|
*
|
|
26
34
|
* @slot - Optionele custom <kbd>-elementen. Wordt genegeerd als keys is opgegeven.
|
|
27
35
|
*/
|
|
28
36
|
import { LitElement } from 'lit';
|
|
29
37
|
import { type OS } from '../../../utilities/os.js';
|
|
30
|
-
type Size = 'sm' | 'md';
|
|
38
|
+
type Size = 'sm' | 'md' | 'inherit';
|
|
39
|
+
type Color = 'neutral' | 'inherit';
|
|
40
|
+
type Variant = 'box' | 'simple';
|
|
31
41
|
export declare class NLDDKeyboardShortcut extends LitElement {
|
|
32
42
|
static styles: import("lit").CSSResult;
|
|
33
43
|
keys: string;
|
|
@@ -35,6 +45,19 @@ export declare class NLDDKeyboardShortcut extends LitElement {
|
|
|
35
45
|
windowsKeys: string;
|
|
36
46
|
linuxKeys: string;
|
|
37
47
|
size: Size;
|
|
48
|
+
/**
|
|
49
|
+
* 'box' (default) renders each key as a keycap with a fill and highlight
|
|
50
|
+
* border. 'simple' renders the keys as plain text with separators — lighter,
|
|
51
|
+
* for inline use such as inside a menu item.
|
|
52
|
+
*/
|
|
53
|
+
variant: Variant;
|
|
54
|
+
/**
|
|
55
|
+
* 'neutral' (default) uses the component's own palette. 'inherit' makes the
|
|
56
|
+
* keys and separators adopt the surrounding text color (currentColor), with a
|
|
57
|
+
* translucent contrast fill and highlight border — useful on filled panels or
|
|
58
|
+
* highlighted rows.
|
|
59
|
+
*/
|
|
60
|
+
color: Color;
|
|
38
61
|
alwaysVisible: boolean;
|
|
39
62
|
/**
|
|
40
63
|
* @internal — development only.
|
|
@@ -46,6 +69,8 @@ export declare class NLDDKeyboardShortcut extends LitElement {
|
|
|
46
69
|
* production markup — production should rely on real OS detection.
|
|
47
70
|
*/
|
|
48
71
|
debugOS: OS | '';
|
|
72
|
+
/** @internal Resolved OS — the debug override when set, else detection. */
|
|
73
|
+
get _resolvedOS(): OS;
|
|
49
74
|
get _resolvedKeys(): string;
|
|
50
75
|
get _parsedKeys(): string[];
|
|
51
76
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-shortcut.d.ts","sourceRoot":"","sources":["../../../../src/components/content/keyboard-shortcut/keyboard-shortcut.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"keyboard-shortcut.d.ts","sourceRoot":"","sources":["../../../../src/components/content/keyboard-shortcut/keyboard-shortcut.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAIjC,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE7D,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;AACpC,KAAK,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;AACnC,KAAK,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEhC,qBACa,oBAAqB,SAAQ,UAAU;IACnD,OAAgB,MAAM,0BAA0B;IAGhD,IAAI,SAAM;IAGV,OAAO,SAAM;IAGb,WAAW,SAAM;IAGjB,SAAS,SAAM;IAGf,IAAI,EAAE,IAAI,CAAQ;IAElB;;;;OAIG;IAEH,OAAO,EAAE,OAAO,CAAS;IAEzB;;;;;OAKG;IAEH,KAAK,EAAE,KAAK,CAAa;IAGzB,aAAa,UAAS;IAEtB;;;;;;;;OAQG;IAEH,OAAO,EAAE,EAAE,GAAG,EAAE,CAAM;IAEtB,2EAA2E;IAC3E,IAAI,WAAW,IAAI,EAAE,CAEpB;IAED,IAAI,aAAa,IAAI,MAAM,CAM1B;IAED,IAAI,WAAW,IAAI,MAAM,EAAE,CAU1B;IAEQ,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,wBAAwB,EAAE,oBAAoB,CAAC;KAC/C;CACD"}
|
|
@@ -20,8 +20,16 @@
|
|
|
20
20
|
* @attr {string} mac-keys - Optionele override voor macOS (incl. iPhone/iPad/iPod).
|
|
21
21
|
* @attr {string} windows-keys - Optionele override voor Windows.
|
|
22
22
|
* @attr {string} linux-keys - Optionele override voor Linux/ChromeOS.
|
|
23
|
-
* @attr {string} size - Grootte: 'sm' | 'md' (default: 'md')
|
|
23
|
+
* @attr {string} size - Grootte: 'sm' | 'md' | 'inherit' (default: 'md'). 'inherit' neemt de
|
|
24
|
+
* font-size over van de container; bij de box-variant schalen de keycaps dan mee in em.
|
|
25
|
+
* @attr {string} variant - 'box' (default) toont elke toets als keycap met vulling en
|
|
26
|
+
* highlight-rand; 'simple' toont de toetsen als platte tekst met scheidingstekens —
|
|
27
|
+
* lichter, voor inline gebruik zoals in een menu-item.
|
|
24
28
|
* @attr {boolean} always-visible - Toon ook op touch-only devices waar shortcuts niet aanroepbaar zijn.
|
|
29
|
+
* @attr {string} color - 'neutral' (default) gebruikt de eigen component-kleuren. 'inherit'
|
|
30
|
+
* laat de toetsen en scheidingstekens de omringende tekstkleur (currentColor) volgen, met
|
|
31
|
+
* een doorschijnende contrast-vulling en highlight-rand — handig op een gevulde vlakkleur
|
|
32
|
+
* of een gemarkeerde rij.
|
|
25
33
|
*
|
|
26
34
|
* @slot - Optionele custom <kbd>-elementen. Wordt genegeerd als keys is opgegeven.
|
|
27
35
|
*/
|
|
@@ -44,6 +52,19 @@ let NLDDKeyboardShortcut = class NLDDKeyboardShortcut extends LitElement {
|
|
|
44
52
|
this.windowsKeys = '';
|
|
45
53
|
this.linuxKeys = '';
|
|
46
54
|
this.size = 'md';
|
|
55
|
+
/**
|
|
56
|
+
* 'box' (default) renders each key as a keycap with a fill and highlight
|
|
57
|
+
* border. 'simple' renders the keys as plain text with separators — lighter,
|
|
58
|
+
* for inline use such as inside a menu item.
|
|
59
|
+
*/
|
|
60
|
+
this.variant = 'box';
|
|
61
|
+
/**
|
|
62
|
+
* 'neutral' (default) uses the component's own palette. 'inherit' makes the
|
|
63
|
+
* keys and separators adopt the surrounding text color (currentColor), with a
|
|
64
|
+
* translucent contrast fill and highlight border — useful on filled panels or
|
|
65
|
+
* highlighted rows.
|
|
66
|
+
*/
|
|
67
|
+
this.color = 'neutral';
|
|
47
68
|
this.alwaysVisible = false;
|
|
48
69
|
/**
|
|
49
70
|
* @internal — development only.
|
|
@@ -56,8 +77,12 @@ let NLDDKeyboardShortcut = class NLDDKeyboardShortcut extends LitElement {
|
|
|
56
77
|
*/
|
|
57
78
|
this.debugOS = '';
|
|
58
79
|
}
|
|
80
|
+
/** @internal Resolved OS — the debug override when set, else detection. */
|
|
81
|
+
get _resolvedOS() {
|
|
82
|
+
return this.debugOS || detectOS();
|
|
83
|
+
}
|
|
59
84
|
get _resolvedKeys() {
|
|
60
|
-
const os = this.
|
|
85
|
+
const os = this._resolvedOS;
|
|
61
86
|
if (os === 'mac' && this.macKeys)
|
|
62
87
|
return this.macKeys;
|
|
63
88
|
if (os === 'windows' && this.windowsKeys)
|
|
@@ -98,6 +123,12 @@ __decorate([
|
|
|
98
123
|
__decorate([
|
|
99
124
|
property({ type: String, reflect: true })
|
|
100
125
|
], NLDDKeyboardShortcut.prototype, "size", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
property({ type: String, reflect: true })
|
|
128
|
+
], NLDDKeyboardShortcut.prototype, "variant", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
property({ type: String, reflect: true })
|
|
131
|
+
], NLDDKeyboardShortcut.prototype, "color", void 0);
|
|
101
132
|
__decorate([
|
|
102
133
|
property({ type: Boolean, reflect: true, attribute: 'always-visible' })
|
|
103
134
|
], NLDDKeyboardShortcut.prototype, "alwaysVisible", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-shortcut.js","sourceRoot":"","sources":["../../../../src/components/content/keyboard-shortcut/keyboard-shortcut.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"keyboard-shortcut.js","sourceRoot":"","sources":["../../../../src/components/content/keyboard-shortcut/keyboard-shortcut.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,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DAC5B;AAhDV,oBAAoB;IADhC,aAAa,CAAC,wBAAwB,CAAC;GAC3B,oBAAoB,CA8EhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-shortcut.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/keyboard-shortcut/keyboard-shortcut.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"keyboard-shortcut.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/keyboard-shortcut/keyboard-shortcut.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,yBAkIlC,CAAC"}
|