@nldd/design-system 0.8.98 → 0.8.100
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/custom-elements.json +320 -58
- package/dist/components/actions/button/button.d.ts +2 -2
- package/dist/components/actions/button/button.js +2 -2
- package/dist/components/actions/icon-button/icon-button.d.ts +2 -2
- package/dist/components/actions/icon-button/icon-button.js +2 -2
- package/dist/components/actions/menu/menu.d.ts +48 -5
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +138 -8
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.template.d.ts +4 -3
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +10 -5
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +1 -1
- package/dist/components/actions/split-button/split-button.js +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts +14 -3
- package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +45 -7
- package/dist/components/actions/toolbar/toolbar.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +15 -1
- package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
- package/dist/components/components.js +1495 -289
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.js +11 -7
- package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
- package/dist/components/content/text/text.d.ts +1 -1
- package/dist/components/content/text/text.js +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +55 -0
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/title/title.d.ts +16 -1
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +109 -0
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/title/title.styles.d.ts.map +1 -1
- package/dist/components/content/title/title.styles.js +39 -0
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/token/token.d.ts +1 -1
- package/dist/components/content/token/token.js +1 -1
- package/dist/components/content/visually-hidden/visually-hidden.d.ts +35 -0
- package/dist/components/content/visually-hidden/visually-hidden.d.ts.map +1 -0
- package/dist/components/content/visually-hidden/visually-hidden.js +45 -0
- package/dist/components/content/visually-hidden/visually-hidden.js.map +1 -0
- package/dist/components/content/visually-hidden/visually-hidden.styles.d.ts +2 -0
- package/dist/components/content/visually-hidden/visually-hidden.styles.d.ts.map +1 -0
- package/dist/components/content/visually-hidden/visually-hidden.styles.js +27 -0
- package/dist/components/content/visually-hidden/visually-hidden.styles.js.map +1 -0
- package/dist/components/content/visually-hidden/visually-hidden.template.d.ts +3 -0
- package/dist/components/content/visually-hidden/visually-hidden.template.d.ts.map +1 -0
- package/dist/components/content/visually-hidden/visually-hidden.template.js +7 -0
- package/dist/components/content/visually-hidden/visually-hidden.template.js.map +1 -0
- package/dist/components/{icon-button-CJIikwyu.js → icon-button-BtU8DX64.js} +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts +6 -0
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +6 -0
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/layout/card/card.d.ts +12 -1
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.js +29 -2
- package/dist/components/layout/card/card.js.map +1 -1
- package/dist/components/layout/card/card.styles.js +2 -2
- package/dist/components/layout/collection/collection.d.ts +16 -5
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +44 -10
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +7 -6
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +1 -1
- package/dist/components/layout/container/container.js +1 -1
- package/dist/components/layout/container/container.styles.d.ts.map +1 -1
- package/dist/components/layout/container/container.styles.js +4 -0
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts +20 -0
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.js +103 -0
- package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts +2 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js +132 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -0
- package/dist/components/layout/page-sections/hero/hero.d.ts +9 -5
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +15 -6
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/popover/popover.styles.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.styles.js +4 -0
- package/dist/components/layout/popover/popover.styles.js.map +1 -1
- package/dist/components/layout/window/window.d.ts +1 -1
- package/dist/components/layout/window/window.js +1 -1
- package/dist/components/lists-and-tables/table/table.d.ts +8 -5
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +19 -10
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.js +4 -0
- package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.template.js +5 -1
- package/dist/components/lists-and-tables/table/table.template.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +44 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js +132 -3
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +21 -2
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +1 -1
- package/dist/components/navigation/link/link.js +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +8 -2
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +20 -2
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js +8 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.d.ts +1 -1
- package/dist/components/navigation/pagination/pagination.js +1 -1
- package/dist/components/navigation/skip-link/skip-link.d.ts +12 -5
- package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.js +12 -5
- package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +71 -2
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.i18n.d.ts +5 -0
- package/dist/components/navigation/tab-bar/tab-bar.i18n.d.ts.map +1 -0
- package/dist/components/navigation/tab-bar/tab-bar.i18n.js +4 -0
- package/dist/components/navigation/tab-bar/tab-bar.i18n.js.map +1 -0
- package/dist/components/navigation/tab-bar/tab-bar.js +214 -23
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +68 -3
- package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.js +36 -5
- package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +7 -0
- 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 +16 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +13 -3
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +11 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +21 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts +62 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.js +86 -2
- package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notifications-area.d.ts +6 -0
- package/dist/components/status-and-feedback/notification/notifications-area.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notifications-area.js +16 -0
- package/dist/components/status-and-feedback/notification/notifications-area.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js +1 -1
- package/dist/css/rich-text.css +1 -1
- package/dist/css/variables.css +1 -0
- package/dist/nldd.min.js +1038 -637
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +1 -0
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +1 -0
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +1 -0
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/nl.generated.js +2 -0
- package/dist/translations/nl.generated.js.map +1 -1
- package/dist/translations/pap-AW.d.ts.map +1 -1
- package/dist/translations/pap-AW.js +1 -0
- package/dist/translations/pap-AW.js.map +1 -1
- package/dist/translations/pap-CW.d.ts.map +1 -1
- package/dist/translations/pap-CW.js +1 -0
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/vue.d.ts +66 -36
- package/package.json +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-viewer.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/code-viewer/code-viewer.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"code-viewer.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/code-viewer/code-viewer.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBAgK5B,CAAC"}
|
|
@@ -67,20 +67,25 @@ export const codeViewerStyles = css `
|
|
|
67
67
|
box-shadow: var(--_code-viewer-border-shadow);
|
|
68
68
|
background-color: var(--_code-viewer-background-color);
|
|
69
69
|
min-width: 0;
|
|
70
|
+
overflow: hidden;
|
|
70
71
|
flex-grow: 1;
|
|
71
72
|
flex-shrink: 1;
|
|
72
73
|
flex-basis: auto;
|
|
73
|
-
padding: var(--_code-viewer-block-padding) var(--_code-viewer-inline-padding);
|
|
74
74
|
color: var(--_code-viewer-content-color);
|
|
75
75
|
font: var(--_code-viewer-font);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
/*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
/* The scroller spans the whole box, so the padding sits on the content
|
|
79
|
+
inside it. Three classes deep to beat CodeMirror's own theme. */
|
|
80
|
+
.code-viewer .cm-scroller .cm-content {
|
|
81
|
+
padding: var(--_code-viewer-block-padding) var(--_code-viewer-inline-padding);
|
|
82
|
+
}
|
|
83
|
+
|
|
82
84
|
:host(:not([no-copy]):not([copy-unavailable])) .code-viewer {
|
|
83
85
|
min-height: var(--_code-viewer-actions-area-size);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host(:not([no-copy]):not([copy-unavailable])) .code-viewer .cm-scroller .cm-content {
|
|
84
89
|
padding-right: var(--_code-viewer-actions-area-size);
|
|
85
90
|
}
|
|
86
91
|
|
|
@@ -88,8 +93,7 @@ export const codeViewerStyles = css `
|
|
|
88
93
|
--_code-viewer-actions-area-padding: 0;
|
|
89
94
|
}
|
|
90
95
|
|
|
91
|
-
:host([appearance="simple"]:not([no-copy]):not([copy-unavailable])) .code-viewer {
|
|
92
|
-
min-height: var(--_code-viewer-actions-area-size);
|
|
96
|
+
:host([appearance="simple"]:not([no-copy]):not([copy-unavailable])) .code-viewer .cm-scroller .cm-content {
|
|
93
97
|
padding-right: 0;
|
|
94
98
|
}
|
|
95
99
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-viewer.styles.js","sourceRoot":"","sources":["../../../../src/components/content/code-viewer/code-viewer.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;IAuB/B,kBAAkB
|
|
1
|
+
{"version":3,"file":"code-viewer.styles.js","sourceRoot":"","sources":["../../../../src/components/content/code-viewer/code-viewer.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;IAuB/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIrB,CAAC"}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* @attr {string} color - Text color: 'content' (the default) | 'secondary' | 'accent' | 'success' | 'warning' | 'critical' | 'inherit'. 'content' and 'secondary' follow the surrounding content channel; 'inherit' takes the color it inherits, for text on a painted surface.
|
|
31
31
|
* @attr {string} horizontal-alignment - Alignment of the text within the block: 'left' | 'center' | 'right' (default: 'left'). Aligns the words; `horizontal-alignment` on nldd-container moves the box.
|
|
32
32
|
*
|
|
33
|
-
* @slot - The text. Inline elements
|
|
33
|
+
* @slot - The text. Inline elements look as they do in nldd-rich-text: `<strong>` and `<b>` take the bold weight from the scale, `<em>` and `<i>` are italic, `<a>` is an underlined link, `<code>` sits on a tinted surface in the monospace font, and `<mark>` is highlighted. This holds for elements directly in the text; one inside another (a link inside `<strong>`) keeps only the outer one's styling. Components such as `nldd-tag` are left alone.
|
|
34
34
|
*/
|
|
35
35
|
import { LitElement } from 'lit';
|
|
36
36
|
type Size = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* @attr {string} color - Text color: 'content' (the default) | 'secondary' | 'accent' | 'success' | 'warning' | 'critical' | 'inherit'. 'content' and 'secondary' follow the surrounding content channel; 'inherit' takes the color it inherits, for text on a painted surface.
|
|
31
31
|
* @attr {string} horizontal-alignment - Alignment of the text within the block: 'left' | 'center' | 'right' (default: 'left'). Aligns the words; `horizontal-alignment` on nldd-container moves the box.
|
|
32
32
|
*
|
|
33
|
-
* @slot - The text. Inline elements
|
|
33
|
+
* @slot - The text. Inline elements look as they do in nldd-rich-text: `<strong>` and `<b>` take the bold weight from the scale, `<em>` and `<i>` are italic, `<a>` is an underlined link, `<code>` sits on a tinted surface in the monospace font, and `<mark>` is highlighted. This holds for elements directly in the text; one inside another (a link inside `<strong>`) keeps only the outer one's styling. Components such as `nldd-tag` are left alone.
|
|
34
34
|
*/
|
|
35
35
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
36
36
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"text.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yBA2KtB,CAAC"}
|
|
@@ -11,6 +11,19 @@ export const textStyles = css `
|
|
|
11
11
|
--_text-max-width: var(--semantics-text-max-width);
|
|
12
12
|
--_text-color: var(--context-content-color, var(--semantics-content-color));
|
|
13
13
|
--_text-align: left;
|
|
14
|
+
--_text-link-color: var(--semantics-links-color);
|
|
15
|
+
--_text-link-is-hovered-color: var(--semantics-links-is-hovered-color);
|
|
16
|
+
--_text-link-is-active-color: var(--semantics-links-is-active-color);
|
|
17
|
+
--_text-link-underline-offset: var(--primitives-space-2);
|
|
18
|
+
--_text-code-padding: var(--primitives-space-4);
|
|
19
|
+
--_text-code-corner-radius: var(--semantics-controls-xs-corner-radius);
|
|
20
|
+
--_text-code-background-color: var(--semantics-surfaces-tinted-background-color);
|
|
21
|
+
--_text-code-font-family: var(--primitives-font-family-monospace);
|
|
22
|
+
--_text-code-font-size: var(--semantics-code-inline-font-size);
|
|
23
|
+
--_text-mark-padding: var(--primitives-space-1) var(--primitives-space-2);
|
|
24
|
+
--_text-mark-corner-radius: var(--semantics-controls-xs-corner-radius);
|
|
25
|
+
--_text-mark-background-color: var(--semantics-content-mark-background-color);
|
|
26
|
+
--_text-mark-color: var(--semantics-content-mark-color);
|
|
14
27
|
|
|
15
28
|
display: block;
|
|
16
29
|
max-width: var(--_text-max-width);
|
|
@@ -64,6 +77,48 @@ export const textStyles = css `
|
|
|
64
77
|
}
|
|
65
78
|
|
|
66
79
|
|
|
80
|
+
/* # Inline elements */
|
|
81
|
+
|
|
82
|
+
::slotted(em),
|
|
83
|
+
::slotted(i) {
|
|
84
|
+
color: inherit;
|
|
85
|
+
font-style: italic;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
::slotted(a) {
|
|
89
|
+
color: var(--_text-link-color);
|
|
90
|
+
text-decoration: underline;
|
|
91
|
+
text-underline-offset: var(--_text-link-underline-offset);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
::slotted(a:hover) {
|
|
95
|
+
color: var(--_text-link-is-hovered-color);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
::slotted(a:active) {
|
|
99
|
+
color: var(--_text-link-is-active-color);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:host([color="inherit"]) ::slotted(a) {
|
|
103
|
+
color: currentColor;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
::slotted(code) {
|
|
107
|
+
border-radius: var(--_text-code-corner-radius);
|
|
108
|
+
background-color: var(--_text-code-background-color);
|
|
109
|
+
padding: var(--_text-code-padding);
|
|
110
|
+
font-family: var(--_text-code-font-family);
|
|
111
|
+
font-size: var(--_text-code-font-size);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
::slotted(mark) {
|
|
115
|
+
border-radius: var(--_text-mark-corner-radius);
|
|
116
|
+
background-color: var(--_text-mark-background-color);
|
|
117
|
+
padding: var(--_text-mark-padding);
|
|
118
|
+
color: var(--_text-mark-color);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
67
122
|
/* # Line height */
|
|
68
123
|
|
|
69
124
|
:host([line-height="flat"]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2K5B,CAAC"}
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
* @element nldd-title
|
|
14
14
|
*
|
|
15
15
|
* @attr {number} size - Visual size of the title: 1–6 (default: 3)
|
|
16
|
+
* @attr {string} sm-custom-size - A size of your own at sm, any CSS length (e.g. '56px', '3.5rem', 'clamp(3rem, 8vw, 7rem)'), for a statement larger than size 1. A var() works when the variable holds a length; one that is not defined leaves the title without its size, the floor included. For headings use `size`; if a design does not fit the scale, raise it as an issue. Set per breakpoint on purpose: a breakpoint without one keeps the size from `size`, so a title made large for a wide screen never breaks a narrow one. Never smaller than size 1 at the same breakpoint: a smaller value shows as size 1, and a fixed length that is smaller says so in development (a relative value, such as vw, em or a percentage, is not checked there; the floor still holds). Takes the weight, typeface and line height of size 1. An invalid value falls back to `size`
|
|
17
|
+
* @attr {string} md-custom-size - The same, at md
|
|
18
|
+
* @attr {string} lg-custom-size - The same, at lg
|
|
16
19
|
* @attr {string} color - 'content' (the default) takes the system's own content
|
|
17
20
|
* colors. 'inherit' lets the title follow the text color of the surface
|
|
18
21
|
* instead (for colored areas such as the filled categories); overline and
|
|
@@ -27,13 +30,16 @@
|
|
|
27
30
|
* @slot supporting-text - Supporting text that is more than text. Takes the place of the supporting-text attribute.
|
|
28
31
|
* @slot end - Whatever belongs at the end of the title line: a button, a menu, a status badge, a version. Named for the position, not for a kind of content, because anything can sit there.
|
|
29
32
|
*/
|
|
30
|
-
import { LitElement } from 'lit';
|
|
33
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
31
34
|
type Size = 1 | 2 | 3 | 4 | 5 | 6;
|
|
32
35
|
type TitleColor = 'content' | 'inherit';
|
|
33
36
|
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
34
37
|
export declare class NLDDTitle extends LitElement {
|
|
35
38
|
static styles: import("lit").CSSResult;
|
|
36
39
|
size: Size;
|
|
40
|
+
smCustomSize: string;
|
|
41
|
+
mdCustomSize: string;
|
|
42
|
+
lgCustomSize: string;
|
|
37
43
|
color: TitleColor;
|
|
38
44
|
text: string;
|
|
39
45
|
supportingText: string;
|
|
@@ -48,6 +54,15 @@ export declare class NLDDTitle extends LitElement {
|
|
|
48
54
|
/** @internal */
|
|
49
55
|
_onSlotChange: (e: Event) => void;
|
|
50
56
|
firstUpdated(): void;
|
|
57
|
+
/** The valid custom size per breakpoint, worked out before the first paint. */
|
|
58
|
+
private _customSizes;
|
|
59
|
+
willUpdate(changed: PropertyValues): void;
|
|
60
|
+
updated(changed: PropertyValues): void;
|
|
61
|
+
/** DEV-only: warnings already given, so each says it once per title. */
|
|
62
|
+
private _warned;
|
|
63
|
+
private _warnOnce;
|
|
64
|
+
/** DEV-only: says so when a custom size is smaller than size 1, which then shows instead. */
|
|
65
|
+
private _checkFloor;
|
|
51
66
|
render(): import("lit-html").TemplateResult;
|
|
52
67
|
}
|
|
53
68
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAMtD,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAClC,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AACxC,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AA6B1C,qBACa,SAAU,SAAQ,UAAU;IACxC,OAAgB,MAAM,0BAAe;IAGrC,IAAI,EAAE,IAAI,CAAK;IAGf,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,KAAK,EAAE,UAAU,CAAa;IAG9B,IAAI,SAAM;IAGV,cAAc,SAAM;IAGpB,QAAQ,SAAM;IAGd,YAAY,EAAE,YAAY,GAAG,IAAI,CAAQ;IAEzC,gBAAgB;IACP,mBAAmB,UAAS;IACrC,gBAAgB;IACP,kBAAkB,UAAS;IACpC,gBAAgB;IACP,yBAAyB,UAAS;IAE3C,gBAAgB;IAChB,aAAa,GAAI,GAAG,KAAK,KAAG,IAAI,CAS9B;IAEO,YAAY,IAAI,IAAI;IAS7B,+EAA+E;IAC/E,OAAO,CAAC,YAAY,CAA2C;IAEtD,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IA+BzC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAQ/C,wEAAwE;IACxE,OAAO,CAAC,OAAO,CAAqB;IAEpC,OAAO,CAAC,SAAS;IAMjB,6FAA6F;IAC7F,OAAO,CAAC,WAAW;IAyBV,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,YAAY,EAAE,SAAS,CAAC;KACxB;CACD"}
|
|
@@ -19,6 +19,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
19
19
|
* @element nldd-title
|
|
20
20
|
*
|
|
21
21
|
* @attr {number} size - Visual size of the title: 1–6 (default: 3)
|
|
22
|
+
* @attr {string} sm-custom-size - A size of your own at sm, any CSS length (e.g. '56px', '3.5rem', 'clamp(3rem, 8vw, 7rem)'), for a statement larger than size 1. A var() works when the variable holds a length; one that is not defined leaves the title without its size, the floor included. For headings use `size`; if a design does not fit the scale, raise it as an issue. Set per breakpoint on purpose: a breakpoint without one keeps the size from `size`, so a title made large for a wide screen never breaks a narrow one. Never smaller than size 1 at the same breakpoint: a smaller value shows as size 1, and a fixed length that is smaller says so in development (a relative value, such as vw, em or a percentage, is not checked there; the floor still holds). Takes the weight, typeface and line height of size 1. An invalid value falls back to `size`
|
|
23
|
+
* @attr {string} md-custom-size - The same, at md
|
|
24
|
+
* @attr {string} lg-custom-size - The same, at lg
|
|
22
25
|
* @attr {string} color - 'content' (the default) takes the system's own content
|
|
23
26
|
* colors. 'inherit' lets the title follow the text color of the surface
|
|
24
27
|
* instead (for colored areas such as the filled categories); overline and
|
|
@@ -40,10 +43,31 @@ import { titleStyles } from './title.styles.js';
|
|
|
40
43
|
import { titleTemplate } from './title.template.js';
|
|
41
44
|
/** One warning per page: a missed rename is one search-and-replace, not one per title. */
|
|
42
45
|
let warnedAboutSubtitle = false;
|
|
46
|
+
const BREAKPOINTS = ['sm', 'md', 'lg'];
|
|
47
|
+
/** The font size of size 1 per breakpoint: the floor of a custom size. */
|
|
48
|
+
const SIZE_1_FONT_SIZE = {
|
|
49
|
+
sm: 'var(--primitives-font-size-700)',
|
|
50
|
+
md: 'var(--primitives-font-size-800)',
|
|
51
|
+
lg: 'var(--primitives-font-size-1000)',
|
|
52
|
+
};
|
|
53
|
+
/** Font-size values that are not a length: the CSS-wide keywords and the
|
|
54
|
+
* absolute and relative size keywords. */
|
|
55
|
+
const NOT_A_LENGTH = new Set([
|
|
56
|
+
'inherit', 'initial', 'unset', 'revert', 'revert-layer',
|
|
57
|
+
'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large',
|
|
58
|
+
'larger', 'smaller', 'math',
|
|
59
|
+
]);
|
|
60
|
+
/** A length font-size takes. A keyword cannot go inside the max() that keeps the floor, so it would void the whole font. */
|
|
61
|
+
function isFontSize(value) {
|
|
62
|
+
return !NOT_A_LENGTH.has(value.toLowerCase()) && CSS.supports('font-size', value);
|
|
63
|
+
}
|
|
43
64
|
let NLDDTitle = class NLDDTitle extends LitElement {
|
|
44
65
|
constructor() {
|
|
45
66
|
super(...arguments);
|
|
46
67
|
this.size = 3;
|
|
68
|
+
this.smCustomSize = '';
|
|
69
|
+
this.mdCustomSize = '';
|
|
70
|
+
this.lgCustomSize = '';
|
|
47
71
|
this.color = 'content';
|
|
48
72
|
this.text = '';
|
|
49
73
|
this.supportingText = '';
|
|
@@ -68,6 +92,10 @@ let NLDDTitle = class NLDDTitle extends LitElement {
|
|
|
68
92
|
else
|
|
69
93
|
this._hasDefaultSlotted = hasContent;
|
|
70
94
|
};
|
|
95
|
+
/** The valid custom size per breakpoint, worked out before the first paint. */
|
|
96
|
+
this._customSizes = {};
|
|
97
|
+
/** DEV-only: warnings already given, so each says it once per title. */
|
|
98
|
+
this._warned = new Set();
|
|
71
99
|
}
|
|
72
100
|
firstUpdated() {
|
|
73
101
|
// The subtitle slot was renamed to supporting-text. Content in a slot that
|
|
@@ -77,6 +105,78 @@ let NLDDTitle = class NLDDTitle extends LitElement {
|
|
|
77
105
|
console.warn('NLDDTitle: the subtitle slot is now supporting-text. Rename slot="subtitle" to slot="supporting-text", or use the supporting-text attribute, here and on every other nldd-title.');
|
|
78
106
|
}
|
|
79
107
|
}
|
|
108
|
+
willUpdate(changed) {
|
|
109
|
+
super.willUpdate(changed);
|
|
110
|
+
if (!changed.has('smCustomSize') &&
|
|
111
|
+
!changed.has('mdCustomSize') &&
|
|
112
|
+
!changed.has('lgCustomSize'))
|
|
113
|
+
return;
|
|
114
|
+
// Nothing to measure or write when rendered without a DOM, as on a server.
|
|
115
|
+
if (typeof CSS === 'undefined')
|
|
116
|
+
return;
|
|
117
|
+
// Written here rather than in updated(), so the first paint already has
|
|
118
|
+
// the custom size. A breakpoint left without a valid value keeps the
|
|
119
|
+
// size from the scale.
|
|
120
|
+
const own = { sm: this.smCustomSize, md: this.mdCustomSize, lg: this.lgCustomSize };
|
|
121
|
+
this._customSizes = {};
|
|
122
|
+
for (const breakpoint of BREAKPOINTS) {
|
|
123
|
+
const value = (own[breakpoint] || '').trim();
|
|
124
|
+
const valid = value !== '' && isFontSize(value);
|
|
125
|
+
if (valid) {
|
|
126
|
+
this._customSizes[breakpoint] = value;
|
|
127
|
+
this.style.setProperty(`--_title-${breakpoint}-custom-size`, value);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
this.style.removeProperty(`--_title-${breakpoint}-custom-size`);
|
|
131
|
+
}
|
|
132
|
+
this.toggleAttribute(`data-${breakpoint}-custom-size`, valid);
|
|
133
|
+
if (import.meta.env?.DEV && value !== '' && !valid) {
|
|
134
|
+
this._warnOnce(`invalid-${breakpoint}-${value}`, `<nldd-title>: ${breakpoint}-custom-size="${value}" is not a size the title can use, so it keeps its size from the scale at ${breakpoint}. Use a length such as "96px" or "6rem", not a keyword.`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
updated(changed) {
|
|
139
|
+
super.updated(changed);
|
|
140
|
+
if (!import.meta.env?.DEV)
|
|
141
|
+
return;
|
|
142
|
+
if (changed.has('smCustomSize') || changed.has('mdCustomSize') || changed.has('lgCustomSize')) {
|
|
143
|
+
this._checkFloor(this._customSizes);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
_warnOnce(key, message) {
|
|
147
|
+
if (this._warned.has(key))
|
|
148
|
+
return;
|
|
149
|
+
this._warned.add(key);
|
|
150
|
+
console.warn(message, this);
|
|
151
|
+
}
|
|
152
|
+
/** DEV-only: says so when a custom size is smaller than size 1, which then shows instead. */
|
|
153
|
+
_checkFloor(sizes) {
|
|
154
|
+
if (!this.shadowRoot || Object.keys(sizes).length === 0)
|
|
155
|
+
return;
|
|
156
|
+
const probe = document.createElement('span');
|
|
157
|
+
probe.style.position = 'absolute';
|
|
158
|
+
probe.style.visibility = 'hidden';
|
|
159
|
+
this.shadowRoot.append(probe);
|
|
160
|
+
const px = (value) => {
|
|
161
|
+
probe.style.fontSize = value;
|
|
162
|
+
return parseFloat(getComputedStyle(probe).fontSize);
|
|
163
|
+
};
|
|
164
|
+
try {
|
|
165
|
+
for (const [breakpoint, value] of Object.entries(sizes)) {
|
|
166
|
+
// A value relative to the viewport, a container or the surrounding
|
|
167
|
+
// text resolves to something else elsewhere, so it is left to the
|
|
168
|
+
// CSS floor rather than measured here.
|
|
169
|
+
if (/%|\d(?:v[whib]|vmin|vmax|cq[whib]|cqmin|cqmax|em|ex|ch|cap|ic|lh)\b/.test(value))
|
|
170
|
+
continue;
|
|
171
|
+
if (px(value) < px(SIZE_1_FONT_SIZE[breakpoint]) - 0.5) {
|
|
172
|
+
this._warnOnce(`floor-${breakpoint}-${value}`, `<nldd-title>: custom size "${value}" is smaller than size 1 at ${breakpoint} and shows as size 1. Use size for headings up to size 1.`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
finally {
|
|
177
|
+
probe.remove();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
80
180
|
render() {
|
|
81
181
|
return titleTemplate(this);
|
|
82
182
|
}
|
|
@@ -85,6 +185,15 @@ NLDDTitle.styles = titleStyles;
|
|
|
85
185
|
__decorate([
|
|
86
186
|
property({ type: Number, reflect: true })
|
|
87
187
|
], NLDDTitle.prototype, "size", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
property({ reflect: true, attribute: 'sm-custom-size', converter: reflectNonDefault('') })
|
|
190
|
+
], NLDDTitle.prototype, "smCustomSize", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
property({ reflect: true, attribute: 'md-custom-size', converter: reflectNonDefault('') })
|
|
193
|
+
], NLDDTitle.prototype, "mdCustomSize", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
property({ reflect: true, attribute: 'lg-custom-size', converter: reflectNonDefault('') })
|
|
196
|
+
], NLDDTitle.prototype, "lgCustomSize", void 0);
|
|
88
197
|
__decorate([
|
|
89
198
|
property({ reflect: true, converter: reflectNonDefault('content') })
|
|
90
199
|
], NLDDTitle.prototype, "color", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.js","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"title.js","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA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a,SAAS,CAAC,EAAE,CAAC;wCACnD;AAG9B;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;uCAC5D;AAGV;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;iDAChF;AAGpB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;2CACxD;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;+CAC7B;AAGhC;IAAR,KAAK,EAAE;sDAA6B;AAE5B;IAAR,KAAK,EAAE;qDAA4B;AAE3B;IAAR,KAAK,EAAE;4DAAmC;AAnC/B,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA0IrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.styles.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"title.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.styles.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,yBAmUvB,CAAC"}
|
|
@@ -14,6 +14,13 @@ export const titleStyles = css `
|
|
|
14
14
|
/* # Host */
|
|
15
15
|
|
|
16
16
|
:host {
|
|
17
|
+
--_title-sm-custom-size: initial;
|
|
18
|
+
--_title-md-custom-size: initial;
|
|
19
|
+
--_title-lg-custom-size: initial;
|
|
20
|
+
--_title-sm-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-sm-custom-size), var(--primitives-font-size-700)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
|
|
21
|
+
--_title-md-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-md-custom-size), var(--primitives-font-size-800)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
|
|
22
|
+
--_title-lg-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-lg-custom-size), var(--primitives-font-size-1000)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
|
|
23
|
+
|
|
17
24
|
@media (max-width: ${smMax}) {
|
|
18
25
|
--_title-font: var(--primitives-font-display-3-sm);
|
|
19
26
|
}
|
|
@@ -172,6 +179,38 @@ export const titleStyles = css `
|
|
|
172
179
|
}
|
|
173
180
|
}
|
|
174
181
|
|
|
182
|
+
/* ## Custom size */
|
|
183
|
+
|
|
184
|
+
:host([data-sm-custom-size]) {
|
|
185
|
+
@media (max-width: ${smMax}) {
|
|
186
|
+
--_title-font: var(--_title-sm-custom-font);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@container layout-container (max-width: ${smMax}) {
|
|
190
|
+
--_title-font: var(--_title-sm-custom-font);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:host([data-md-custom-size]) {
|
|
195
|
+
@media (min-width: ${mdMin}) and (max-width: ${mdMax}) {
|
|
196
|
+
--_title-font: var(--_title-md-custom-font);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@container layout-container (min-width: ${mdMin}) and (max-width: ${mdMax}) {
|
|
200
|
+
--_title-font: var(--_title-md-custom-font);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:host([data-lg-custom-size]) {
|
|
205
|
+
@media (min-width: ${lgMin}) {
|
|
206
|
+
--_title-font: var(--_title-lg-custom-font);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@container layout-container (min-width: ${lgMin}) {
|
|
210
|
+
--_title-font: var(--_title-lg-custom-font);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
175
214
|
:host([hidden]) {
|
|
176
215
|
display: none;
|
|
177
216
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.styles.js","sourceRoot":"","sources":["../../../../src/components/content/title/title.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;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"title.styles.js","sourceRoot":"","sources":["../../../../src/components/content/title/title.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;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA;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CAAC"}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* @attr {object} translations - Override translation keys; unset keys fall back to Dutch
|
|
18
18
|
* @attr {boolean} roving - Inside a roving-focus container (e.g. nldd-token-field): the host is the single tab stop, so the trailing control is not separately tabbable.
|
|
19
19
|
* @attr {boolean} expanded - Reflects whether the token's menu is open (control="menu"); managed by the token.
|
|
20
|
-
* @attr {boolean} disabled - Disabled state
|
|
20
|
+
* @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
|
|
21
21
|
*
|
|
22
22
|
* @slot - Token text
|
|
23
23
|
* @slot menu - An nldd-menu that the token opens from its menu button (control="menu").
|
|
@@ -23,7 +23,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
23
23
|
* @attr {object} translations - Override translation keys; unset keys fall back to Dutch
|
|
24
24
|
* @attr {boolean} roving - Inside a roving-focus container (e.g. nldd-token-field): the host is the single tab stop, so the trailing control is not separately tabbable.
|
|
25
25
|
* @attr {boolean} expanded - Reflects whether the token's menu is open (control="menu"); managed by the token.
|
|
26
|
-
* @attr {boolean} disabled - Disabled state
|
|
26
|
+
* @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
|
|
27
27
|
*
|
|
28
28
|
* @slot - Token text
|
|
29
29
|
* @slot menu - An nldd-menu that the token opens from its menu button (control="menu").
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nederlandse Digitale Dienst Visually Hidden Component (Lit + TypeScript)
|
|
3
|
+
*
|
|
4
|
+
* Text a screen reader reads and the screen does not show. It stays in the
|
|
5
|
+
* accessibility tree and in the reading order, and takes no room on the page.
|
|
6
|
+
*
|
|
7
|
+
* For a name that is visually redundant: the header of a column of checkboxes,
|
|
8
|
+
* where the checkboxes say enough to anyone who can see them, or the "(opent in
|
|
9
|
+
* een nieuw venster)" after a link whose icon already says it.
|
|
10
|
+
*
|
|
11
|
+
* Not for repairing structure that is missing. Hidden text that describes how
|
|
12
|
+
* something is laid out ("subpagina van Aanvragen") stands in for semantics the
|
|
13
|
+
* markup should carry, and only a screen reader gets the stand-in. Not for a
|
|
14
|
+
* status either: a status that matters to a screen reader matters to anyone,
|
|
15
|
+
* so show it, as text with `role="status"` or as an `nldd-notification`. And
|
|
16
|
+
* not for the name of a component that takes `accessible-label`: give it that.
|
|
17
|
+
*
|
|
18
|
+
* Nothing in it should take focus. A control inside would be reached with Tab
|
|
19
|
+
* and be nowhere on the screen.
|
|
20
|
+
*
|
|
21
|
+
* @element nldd-visually-hidden
|
|
22
|
+
*
|
|
23
|
+
* @slot - The text, read by a screen reader and not shown.
|
|
24
|
+
*/
|
|
25
|
+
import { LitElement } from 'lit';
|
|
26
|
+
export declare class NLDDVisuallyHidden extends LitElement {
|
|
27
|
+
static styles: import("lit").CSSResult;
|
|
28
|
+
render(): import("lit-html").TemplateResult;
|
|
29
|
+
}
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
'nldd-visually-hidden': NLDDVisuallyHidden;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=visually-hidden.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visually-hidden.d.ts","sourceRoot":"","sources":["../../../../src/components/content/visually-hidden/visually-hidden.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,qBACa,kBAAmB,SAAQ,UAAU;IACjD,OAAgB,MAAM,0BAAwB;IAErC,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,sBAAsB,EAAE,kBAAkB,CAAC;KAC3C;CACD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nederlandse Digitale Dienst Visually Hidden Component (Lit + TypeScript)
|
|
3
|
+
*
|
|
4
|
+
* Text a screen reader reads and the screen does not show. It stays in the
|
|
5
|
+
* accessibility tree and in the reading order, and takes no room on the page.
|
|
6
|
+
*
|
|
7
|
+
* For a name that is visually redundant: the header of a column of checkboxes,
|
|
8
|
+
* where the checkboxes say enough to anyone who can see them, or the "(opent in
|
|
9
|
+
* een nieuw venster)" after a link whose icon already says it.
|
|
10
|
+
*
|
|
11
|
+
* Not for repairing structure that is missing. Hidden text that describes how
|
|
12
|
+
* something is laid out ("subpagina van Aanvragen") stands in for semantics the
|
|
13
|
+
* markup should carry, and only a screen reader gets the stand-in. Not for a
|
|
14
|
+
* status either: a status that matters to a screen reader matters to anyone,
|
|
15
|
+
* so show it, as text with `role="status"` or as an `nldd-notification`. And
|
|
16
|
+
* not for the name of a component that takes `accessible-label`: give it that.
|
|
17
|
+
*
|
|
18
|
+
* Nothing in it should take focus. A control inside would be reached with Tab
|
|
19
|
+
* and be nowhere on the screen.
|
|
20
|
+
*
|
|
21
|
+
* @element nldd-visually-hidden
|
|
22
|
+
*
|
|
23
|
+
* @slot - The text, read by a screen reader and not shown.
|
|
24
|
+
*/
|
|
25
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
26
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
27
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
28
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
29
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30
|
+
};
|
|
31
|
+
import { LitElement } from 'lit';
|
|
32
|
+
import { customElement } from 'lit/decorators.js';
|
|
33
|
+
import { visuallyHiddenStyles } from './visually-hidden.styles.js';
|
|
34
|
+
import { template } from './visually-hidden.template.js';
|
|
35
|
+
let NLDDVisuallyHidden = class NLDDVisuallyHidden extends LitElement {
|
|
36
|
+
render() {
|
|
37
|
+
return template();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
NLDDVisuallyHidden.styles = visuallyHiddenStyles;
|
|
41
|
+
NLDDVisuallyHidden = __decorate([
|
|
42
|
+
customElement('nldd-visually-hidden')
|
|
43
|
+
], NLDDVisuallyHidden);
|
|
44
|
+
export { NLDDVisuallyHidden };
|
|
45
|
+
//# sourceMappingURL=visually-hidden.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visually-hidden.js","sourceRoot":"","sources":["../../../../src/components/content/visually-hidden/visually-hidden.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAGlD,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IAGxC,MAAM;QACd,OAAO,QAAQ,EAAE,CAAC;IACnB,CAAC;;AAJe,yBAAM,GAAG,oBAAoB,AAAvB,CAAwB;AADlC,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CAM9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visually-hidden.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/visually-hidden/visually-hidden.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,yBAwBhC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const visuallyHiddenStyles = css `
|
|
3
|
+
:host {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/* # Host */
|
|
9
|
+
|
|
10
|
+
:host {
|
|
11
|
+
display: block;
|
|
12
|
+
position: absolute;
|
|
13
|
+
/* !important: a reset on * would beat it on the host. The 1px offset keeps
|
|
14
|
+
the box from adding a pixel to the scroll area of a container. */
|
|
15
|
+
margin: -1px !important;
|
|
16
|
+
width: 1px;
|
|
17
|
+
height: 1px;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
clip-path: inset(50%);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host([hidden]) {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
//# sourceMappingURL=visually-hidden.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visually-hidden.styles.js","sourceRoot":"","sources":["../../../../src/components/content/visually-hidden/visually-hidden.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;CAwBtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visually-hidden.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/visually-hidden/visually-hidden.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAE3C,wBAAgB,QAAQ,IAAI,cAAc,CAIzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visually-hidden.template.js","sourceRoot":"","sources":["../../../../src/components/content/visually-hidden/visually-hidden.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAE3C,MAAM,UAAU,QAAQ;IACvB,OAAO,IAAI,CAAA;;EAEV,CAAC;AACH,CAAC"}
|