@nldd/design-system 0.8.99 → 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 +161 -26
- 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 +9 -0
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +18 -1
- package/dist/components/actions/menu/menu.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/components.js +673 -190
- 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/{icon-button-CJIikwyu.js → icon-button-BtU8DX64.js} +2 -2
- 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/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/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/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 +4 -1
- 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 +11 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.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/tab-bar/tab-bar.d.ts +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +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 +6 -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/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 +783 -550
- package/dist/types/vue.d.ts +43 -23
- package/package.json +2 -2
package/custom-elements.json
CHANGED
|
@@ -659,7 +659,7 @@
|
|
|
659
659
|
"text": "boolean"
|
|
660
660
|
},
|
|
661
661
|
"default": "false",
|
|
662
|
-
"description": "Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width.",
|
|
662
|
+
"description": "Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width. Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.",
|
|
663
663
|
"fieldName": "loading"
|
|
664
664
|
},
|
|
665
665
|
{
|
|
@@ -678,7 +678,7 @@
|
|
|
678
678
|
},
|
|
679
679
|
"default": "false",
|
|
680
680
|
"fieldName": "disabled",
|
|
681
|
-
"description": "Disabled state"
|
|
681
|
+
"description": "Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why."
|
|
682
682
|
},
|
|
683
683
|
{
|
|
684
684
|
"name": "text",
|
|
@@ -1165,7 +1165,7 @@
|
|
|
1165
1165
|
"text": "boolean"
|
|
1166
1166
|
},
|
|
1167
1167
|
"default": "false",
|
|
1168
|
-
"description": "Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled).",
|
|
1168
|
+
"description": "Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.",
|
|
1169
1169
|
"fieldName": "loading"
|
|
1170
1170
|
},
|
|
1171
1171
|
{
|
|
@@ -1184,7 +1184,7 @@
|
|
|
1184
1184
|
},
|
|
1185
1185
|
"default": "false",
|
|
1186
1186
|
"fieldName": "disabled",
|
|
1187
|
-
"description": "Disabled state"
|
|
1187
|
+
"description": "Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why."
|
|
1188
1188
|
},
|
|
1189
1189
|
{
|
|
1190
1190
|
"name": "no-highlight-border",
|
|
@@ -2317,7 +2317,7 @@
|
|
|
2317
2317
|
},
|
|
2318
2318
|
"default": "false",
|
|
2319
2319
|
"fieldName": "disabled",
|
|
2320
|
-
"description": "Disabled state"
|
|
2320
|
+
"description": "Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why."
|
|
2321
2321
|
},
|
|
2322
2322
|
{
|
|
2323
2323
|
"name": "width",
|
|
@@ -5085,7 +5085,7 @@
|
|
|
5085
5085
|
"slots": [
|
|
5086
5086
|
{
|
|
5087
5087
|
"name": "",
|
|
5088
|
-
"description": "The text. Inline elements
|
|
5088
|
+
"description": "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."
|
|
5089
5089
|
}
|
|
5090
5090
|
]
|
|
5091
5091
|
}
|
|
@@ -5128,6 +5128,36 @@
|
|
|
5128
5128
|
"attribute": "size",
|
|
5129
5129
|
"reflects": true
|
|
5130
5130
|
},
|
|
5131
|
+
{
|
|
5132
|
+
"kind": "field",
|
|
5133
|
+
"name": "smCustomSize",
|
|
5134
|
+
"type": {
|
|
5135
|
+
"text": "string"
|
|
5136
|
+
},
|
|
5137
|
+
"default": "''",
|
|
5138
|
+
"attribute": "sm-custom-size",
|
|
5139
|
+
"reflects": true
|
|
5140
|
+
},
|
|
5141
|
+
{
|
|
5142
|
+
"kind": "field",
|
|
5143
|
+
"name": "mdCustomSize",
|
|
5144
|
+
"type": {
|
|
5145
|
+
"text": "string"
|
|
5146
|
+
},
|
|
5147
|
+
"default": "''",
|
|
5148
|
+
"attribute": "md-custom-size",
|
|
5149
|
+
"reflects": true
|
|
5150
|
+
},
|
|
5151
|
+
{
|
|
5152
|
+
"kind": "field",
|
|
5153
|
+
"name": "lgCustomSize",
|
|
5154
|
+
"type": {
|
|
5155
|
+
"text": "string"
|
|
5156
|
+
},
|
|
5157
|
+
"default": "''",
|
|
5158
|
+
"attribute": "lg-custom-size",
|
|
5159
|
+
"reflects": true
|
|
5160
|
+
},
|
|
5131
5161
|
{
|
|
5132
5162
|
"kind": "field",
|
|
5133
5163
|
"name": "color",
|
|
@@ -5189,6 +5219,33 @@
|
|
|
5189
5219
|
"fieldName": "size",
|
|
5190
5220
|
"description": "Visual size of the title: 1–6 (default: 3)"
|
|
5191
5221
|
},
|
|
5222
|
+
{
|
|
5223
|
+
"name": "sm-custom-size",
|
|
5224
|
+
"type": {
|
|
5225
|
+
"text": "string"
|
|
5226
|
+
},
|
|
5227
|
+
"default": "''",
|
|
5228
|
+
"fieldName": "smCustomSize",
|
|
5229
|
+
"description": "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`"
|
|
5230
|
+
},
|
|
5231
|
+
{
|
|
5232
|
+
"name": "md-custom-size",
|
|
5233
|
+
"type": {
|
|
5234
|
+
"text": "string"
|
|
5235
|
+
},
|
|
5236
|
+
"default": "''",
|
|
5237
|
+
"fieldName": "mdCustomSize",
|
|
5238
|
+
"description": "The same, at md"
|
|
5239
|
+
},
|
|
5240
|
+
{
|
|
5241
|
+
"name": "lg-custom-size",
|
|
5242
|
+
"type": {
|
|
5243
|
+
"text": "string"
|
|
5244
|
+
},
|
|
5245
|
+
"default": "''",
|
|
5246
|
+
"fieldName": "lgCustomSize",
|
|
5247
|
+
"description": "The same, at lg"
|
|
5248
|
+
},
|
|
5192
5249
|
{
|
|
5193
5250
|
"name": "color",
|
|
5194
5251
|
"type": {
|
|
@@ -5464,7 +5521,7 @@
|
|
|
5464
5521
|
},
|
|
5465
5522
|
"default": "false",
|
|
5466
5523
|
"fieldName": "disabled",
|
|
5467
|
-
"description": "Disabled state"
|
|
5524
|
+
"description": "Disabled state. Avoid it where you can; the design guidelines say why."
|
|
5468
5525
|
}
|
|
5469
5526
|
],
|
|
5470
5527
|
"superclass": {
|
|
@@ -10489,7 +10546,7 @@
|
|
|
10489
10546
|
"declarations": [
|
|
10490
10547
|
{
|
|
10491
10548
|
"kind": "class",
|
|
10492
|
-
"description": "A visual wrapper around a native `<select>` element. The consumer provides a native `<select>` as a slotted child — this way the browser retains full control over form submission, accessibility and keyboard navigation, including `<optgroup>`, `data-*` attributes and dynamic changes to options.",
|
|
10549
|
+
"description": "A visual wrapper around a native `<select>` element. The consumer provides a native `<select>` as a slotted child — this way the browser retains full control over form submission, accessibility and keyboard navigation, including `<optgroup>`, `data-*` attributes and dynamic changes to options. A dropdown hides its options, so it is the last resort for a choice from a fixed set. Show a handful of options with nldd-segmented-control, nldd-toggle-button-group or nldd-radio-button-group, and let the user type in nldd-combo-box when there are many, a list of countries included. The design guidelines explain the order.",
|
|
10493
10550
|
"name": "NLDDDropdown",
|
|
10494
10551
|
"members": [
|
|
10495
10552
|
{
|
|
@@ -23121,7 +23178,7 @@
|
|
|
23121
23178
|
"declarations": [
|
|
23122
23179
|
{
|
|
23123
23180
|
"kind": "class",
|
|
23124
|
-
"description": "A container for displaying collections of items. Supports grid, stack, lanes and horizontal scroll layouts. Use it for a set of equal blocks, usually `nldd-card`s, instead of a CSS grid of your own: the collection sets the columns from `item-width` and the available width, and the gap per breakpoint. In grid and stack modes, items are paginated via a load-more button. In horizontal scroll, the prev/next controls and the edge fade appear only when the items overflow the container. With `lazy-load`, the next items are automatically loaded when the load-more button comes into view.",
|
|
23181
|
+
"description": "A container for displaying collections of items. Supports grid, stack, lanes and horizontal scroll layouts. Use it for a set of equal blocks, usually `nldd-card`s, instead of a CSS grid of your own: the collection sets the columns from `item-min-width` and the available width, and the gap per breakpoint. In grid and stack modes, items are paginated via a load-more button. In horizontal scroll, the prev/next controls and the edge fade appear only when the items overflow the container. Use horizontal scroll for items that together serve one purpose, such as the events of one agenda; it is not a carousel for unrelated highlights, which the design guidelines advise against. With `lazy-load`, the next items are automatically loaded when the load-more button comes into view.",
|
|
23125
23182
|
"name": "NLDDCollection",
|
|
23126
23183
|
"members": [
|
|
23127
23184
|
{
|
|
@@ -23136,11 +23193,20 @@
|
|
|
23136
23193
|
},
|
|
23137
23194
|
{
|
|
23138
23195
|
"kind": "field",
|
|
23139
|
-
"name": "
|
|
23196
|
+
"name": "itemMinWidth",
|
|
23197
|
+
"type": {
|
|
23198
|
+
"text": "string | undefined"
|
|
23199
|
+
},
|
|
23200
|
+
"attribute": "item-min-width",
|
|
23201
|
+
"reflects": true
|
|
23202
|
+
},
|
|
23203
|
+
{
|
|
23204
|
+
"kind": "field",
|
|
23205
|
+
"name": "itemMaxWidth",
|
|
23140
23206
|
"type": {
|
|
23141
23207
|
"text": "string | undefined"
|
|
23142
23208
|
},
|
|
23143
|
-
"attribute": "item-width",
|
|
23209
|
+
"attribute": "item-max-width",
|
|
23144
23210
|
"reflects": true
|
|
23145
23211
|
},
|
|
23146
23212
|
{
|
|
@@ -23226,6 +23292,9 @@
|
|
|
23226
23292
|
}
|
|
23227
23293
|
],
|
|
23228
23294
|
"attributes": [
|
|
23295
|
+
{
|
|
23296
|
+
"name": "item-width"
|
|
23297
|
+
},
|
|
23229
23298
|
{
|
|
23230
23299
|
"name": "layout",
|
|
23231
23300
|
"type": {
|
|
@@ -23236,12 +23305,20 @@
|
|
|
23236
23305
|
"description": "Layout mode: 'grid' | 'stack' | 'lanes' | 'horizontal-scroll' (default: 'grid')"
|
|
23237
23306
|
},
|
|
23238
23307
|
{
|
|
23239
|
-
"name": "item-width",
|
|
23308
|
+
"name": "item-min-width",
|
|
23309
|
+
"type": {
|
|
23310
|
+
"text": "string | undefined"
|
|
23311
|
+
},
|
|
23312
|
+
"fieldName": "itemMinWidth",
|
|
23313
|
+
"description": "Smallest width an item takes (e.g. '280px', '20rem'). In grid and lanes the minimum column width: columns are at least this wide and grow to fill the row. In horizontal scroll the flex-basis: items never shrink below it, and grow up to `item-max-width` when they fit. No effect in stack. Never forces horizontal overflow, the value is clamped to the container width."
|
|
23314
|
+
},
|
|
23315
|
+
{
|
|
23316
|
+
"name": "item-max-width",
|
|
23240
23317
|
"type": {
|
|
23241
23318
|
"text": "string | undefined"
|
|
23242
23319
|
},
|
|
23243
|
-
"fieldName": "
|
|
23244
|
-
"description": "
|
|
23320
|
+
"fieldName": "itemMaxWidth",
|
|
23321
|
+
"description": "Largest width an item takes in horizontal scroll (e.g. '400px', '25rem'), so one or two items that fit do not stretch across the container. Defaults to 480px; `item-max-width=\"100%\"` lets items fill the container, as they did before the default. Never narrower than `item-min-width`, which wins when it is wider, and never wider than the container. No effect in grid, lanes and stack: a grid leaves empty columns rather than stretching an item, and its right edge stays aligned with the content around it."
|
|
23245
23322
|
},
|
|
23246
23323
|
{
|
|
23247
23324
|
"name": "gap",
|
|
@@ -23822,7 +23899,7 @@
|
|
|
23822
23899
|
},
|
|
23823
23900
|
"default": "''",
|
|
23824
23901
|
"fieldName": "width",
|
|
23825
|
-
"description": "'full' (default, fills the parent) | 'fit-content' | a CSS length (e.g. '480px'). A container narrower than its parent stays where its parent puts it; use the parent's horizontal-alignment to move it."
|
|
23902
|
+
"description": "'full' (default, fills the parent) | 'fit-content' | a CSS length (e.g. '480px'). A container narrower than its parent stays where its parent puts it; use the parent's horizontal-alignment to move it. A 'fit-content' container takes its width from its content, so it cannot measure itself: its breakpoint padding, gap and column count follow the container around it."
|
|
23826
23903
|
},
|
|
23827
23904
|
{
|
|
23828
23905
|
"name": "min-width",
|
|
@@ -24891,13 +24968,47 @@
|
|
|
24891
24968
|
}
|
|
24892
24969
|
]
|
|
24893
24970
|
},
|
|
24971
|
+
{
|
|
24972
|
+
"kind": "javascript-module",
|
|
24973
|
+
"path": "src/components/layout/page-sections/hero/hero-corner.ts",
|
|
24974
|
+
"declarations": [
|
|
24975
|
+
{
|
|
24976
|
+
"kind": "function",
|
|
24977
|
+
"name": "applyCorner",
|
|
24978
|
+
"return": {
|
|
24979
|
+
"type": {
|
|
24980
|
+
"text": "void"
|
|
24981
|
+
}
|
|
24982
|
+
},
|
|
24983
|
+
"parameters": [
|
|
24984
|
+
{
|
|
24985
|
+
"name": "host",
|
|
24986
|
+
"type": {
|
|
24987
|
+
"text": "CornerHost"
|
|
24988
|
+
}
|
|
24989
|
+
}
|
|
24990
|
+
],
|
|
24991
|
+
"description": "Works out which corners are rounded and writes them onto the host as\n`data-media-corner` and `data-main-corner`, which the corner stylesheet\nkeys off. Without `corner`, or where a corner does not fit the shape\nlanguage, both are removed and the hero is rectangular."
|
|
24992
|
+
}
|
|
24993
|
+
],
|
|
24994
|
+
"exports": [
|
|
24995
|
+
{
|
|
24996
|
+
"kind": "js",
|
|
24997
|
+
"name": "applyCorner",
|
|
24998
|
+
"declaration": {
|
|
24999
|
+
"name": "applyCorner",
|
|
25000
|
+
"module": "src/components/layout/page-sections/hero/hero-corner.ts"
|
|
25001
|
+
}
|
|
25002
|
+
}
|
|
25003
|
+
]
|
|
25004
|
+
},
|
|
24894
25005
|
{
|
|
24895
25006
|
"kind": "javascript-module",
|
|
24896
25007
|
"path": "src/components/layout/page-sections/hero/hero.ts",
|
|
24897
25008
|
"declarations": [
|
|
24898
25009
|
{
|
|
24899
25010
|
"kind": "class",
|
|
24900
|
-
"description": "The section that says what a page is for: it names the main goal of what you can find there, draws the eye and is the visual welcome. It has a media area and a text panel (the main) that can stand in eight positions.
|
|
25011
|
+
"description": "The section that says what a page is for: it names the main goal of what you can find there, draws the eye and is the visual welcome. It has a media area and a text panel (the main) that can stand in eight positions. The areas are rectangular; `corner` rounds one corner of each. Use it on pages where a visitor first has to know where they are, such as a home or a topic page; where the title already does that, a section with a title is enough. The image in a hero sets the mood and is never the main content, so the panel always stands on it. Over an image the panel keeps a section gap from its edges, so it reads as a panel on the image rather than a frame cut out of it; with `main-width=\"full\"` it is a strip across the whole image, the same gap from the sides. On mobile the image comes first and the panel below it, indented by the section gap and overlapping the image by 48px. For an image beside text without that relation, use a section with an image beside text instead. Without media the main fills the whole area; with `main-background=\"base\"` that area gets a border so it stays visible on the base surface. The hero is the head of a page and sits right under the top bar, so its top padding is half that of the other page sections: the full distance is meant to separate two sections, and under the top bar it reads as a gap. The bottom keeps the full distance to the section below. Set `padding-top` to place a hero elsewhere. By default the panel falls over the bottom of the image and runs on below it (`layout=\"overlap\"`), so the image keeps its height whatever the content. `layout=\"contained\"` keeps the panel on the image, for a short panel or one that stands at the top or along a side. The height of a hero comes from its image: `media-aspect-ratio`, or a fixed `media-height`. The `height` of the other page sections is not used here: as a minimum height for the whole hero it stretched the panel once that sat below the image. A hero given `height` says so in development. `main-background` gives the panel a surface color from the filled categories. Those carry a pure white or black content color along, so components with `color=\"inherit\"` (title, rich-text) are guaranteed to keep their contrast.",
|
|
24901
25012
|
"name": "NLDDHero",
|
|
24902
25013
|
"members": [
|
|
24903
25014
|
{
|
|
@@ -24911,6 +25022,17 @@
|
|
|
24911
25022
|
"attribute": "width",
|
|
24912
25023
|
"reflects": true
|
|
24913
25024
|
},
|
|
25025
|
+
{
|
|
25026
|
+
"kind": "field",
|
|
25027
|
+
"name": "corner",
|
|
25028
|
+
"type": {
|
|
25029
|
+
"text": "string | null"
|
|
25030
|
+
},
|
|
25031
|
+
"default": "null",
|
|
25032
|
+
"description": "Rounds one corner of the media area and one of the panel. An empty\nvalue lets the hero choose the media corner from `main-position`.",
|
|
25033
|
+
"attribute": "corner",
|
|
25034
|
+
"reflects": true
|
|
25035
|
+
},
|
|
24914
25036
|
{
|
|
24915
25037
|
"kind": "field",
|
|
24916
25038
|
"name": "layout",
|
|
@@ -25227,6 +25349,15 @@
|
|
|
25227
25349
|
"description": "Body max-width; 'full' removes the bound (section API)",
|
|
25228
25350
|
"fieldName": "width"
|
|
25229
25351
|
},
|
|
25352
|
+
{
|
|
25353
|
+
"name": "corner",
|
|
25354
|
+
"type": {
|
|
25355
|
+
"text": "string | null"
|
|
25356
|
+
},
|
|
25357
|
+
"default": "null",
|
|
25358
|
+
"description": "Rounds one corner of the media area, in the shape language of the Rijkshuisstijl: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right', or empty (or 'auto') to let the hero choose a corner the panel leaves free. Applies with `layout=\"contained\"` and the panel in a corner or along a side; with overlap or a centered panel the hero stays rectangular and says so in development. The panel stands against the edge of the image, so a `main-width` in percent (33.33%, 50%) is a share of the image, and gets a corner at half the radius, the one pointing into the image; a panel along a full side, a `main-width=\"full\"` strip and the panel on mobile stay square. On mobile a bottom corner moves to the top. The radius comes from the ribbon width: 1.5X on sm, 2X on md and lg. Says so in development when the chosen corner sits under the panel, or with `width=\"full\"`",
|
|
25359
|
+
"fieldName": "corner"
|
|
25360
|
+
},
|
|
25230
25361
|
{
|
|
25231
25362
|
"name": "layout",
|
|
25232
25363
|
"type": {
|
|
@@ -29901,7 +30032,7 @@
|
|
|
29901
30032
|
},
|
|
29902
30033
|
"default": "false",
|
|
29903
30034
|
"fieldName": "noLightDismiss",
|
|
29904
|
-
"description": "A click on the backdrop does not close the window. For windows where dismissing by accident costs work: a
|
|
30035
|
+
"description": "A click on the backdrop does not close the window. For windows where dismissing by accident costs work: a process of several steps, a form with filled-in fields. Escape and the dismiss button keep working."
|
|
29905
30036
|
},
|
|
29906
30037
|
{
|
|
29907
30038
|
"name": "open",
|
|
@@ -32869,7 +33000,11 @@
|
|
|
32869
33000
|
},
|
|
32870
33001
|
{
|
|
32871
33002
|
"name": "empty",
|
|
32872
|
-
"description": "Shown when
|
|
33003
|
+
"description": "Shown when the table has no body rows (the header is hidden too). Empty by default: what an empty table should say is the app's to write, so put an `nldd-inline-dialog` here."
|
|
33004
|
+
},
|
|
33005
|
+
{
|
|
33006
|
+
"name": "no-results",
|
|
33007
|
+
"description": "Shown when the table has body rows but every one of them is `[hidden]`, which is what consumer-driven filtering leaves behind. A different state from `empty` and a different sentence: say that nothing matches and how to get rows back. Falls back to `[slot=\"empty\"]` when not given."
|
|
32873
33008
|
}
|
|
32874
33009
|
]
|
|
32875
33010
|
},
|
|
@@ -33630,7 +33765,7 @@
|
|
|
33630
33765
|
},
|
|
33631
33766
|
"default": "false",
|
|
33632
33767
|
"fieldName": "disabled",
|
|
33633
|
-
"description": "Disabled state"
|
|
33768
|
+
"description": "Disabled state. Avoid it where you can; the design guidelines say why."
|
|
33634
33769
|
},
|
|
33635
33770
|
{
|
|
33636
33771
|
"name": "no-tab",
|
|
@@ -33964,7 +34099,7 @@
|
|
|
33964
34099
|
},
|
|
33965
34100
|
"default": "false",
|
|
33966
34101
|
"fieldName": "disabled",
|
|
33967
|
-
"description": "Turn interaction off"
|
|
34102
|
+
"description": "Turn interaction off. Avoid it where you can; the design guidelines say why."
|
|
33968
34103
|
},
|
|
33969
34104
|
{
|
|
33970
34105
|
"name": "accessible-label",
|
|
@@ -34274,7 +34409,7 @@
|
|
|
34274
34409
|
},
|
|
34275
34410
|
"default": "false",
|
|
34276
34411
|
"fieldName": "disabled",
|
|
34277
|
-
"description": "Disabled state"
|
|
34412
|
+
"description": "Disabled state. Avoid it where you can; the design guidelines say why."
|
|
34278
34413
|
},
|
|
34279
34414
|
{
|
|
34280
34415
|
"name": "centered",
|
|
@@ -34735,7 +34870,7 @@
|
|
|
34735
34870
|
"text": "boolean"
|
|
34736
34871
|
},
|
|
34737
34872
|
"default": "false",
|
|
34738
|
-
"description": "Disables the whole bar: dims it, blocks pointer interaction, and takes the tabs out of the tab order",
|
|
34873
|
+
"description": "Disables the whole bar: dims it, blocks pointer interaction, and takes the tabs out of the tab order. Avoid it where you can; the design guidelines say why.",
|
|
34739
34874
|
"fieldName": "disabled"
|
|
34740
34875
|
},
|
|
34741
34876
|
{
|
|
@@ -36372,7 +36507,7 @@
|
|
|
36372
36507
|
"declarations": [
|
|
36373
36508
|
{
|
|
36374
36509
|
"kind": "class",
|
|
36375
|
-
"description": "A modal window with overlay backdrop, based on the native <dialog> element. Internally renders an <nldd-inline-dialog> for the visual structure. Open and close it with `open`, bound to your state together with the close event: the dialog clears `open` itself when the user closes it. show() and hide() do the same for code without a binding. Keep the dialog in the DOM rather than mounting it when it opens, or the animations are skipped.",
|
|
36510
|
+
"description": "A modal window with overlay backdrop, based on the native <dialog> element. Internally renders an <nldd-inline-dialog> for the visual structure. Use it only when there is no way back, and give it a real choice: a dialog with one button offers nothing to decide, so tell the user with an nldd-notification or an inline message instead. In a destructive dialog the safe way out comes first, as the primary button. Work that needs the page as context, such as editing, belongs in an nldd-sheet. The design guidelines say why. A dialog that opens with one action says so in development. Open and close it with `open`, bound to your state together with the close event: the dialog clears `open` itself when the user closes it. show() and hide() do the same for code without a binding. Keep the dialog in the DOM rather than mounting it when it opens, or the animations are skipped.",
|
|
36376
36511
|
"name": "NLDDModalDialog",
|
|
36377
36512
|
"members": [
|
|
36378
36513
|
{
|
|
@@ -36471,7 +36606,7 @@
|
|
|
36471
36606
|
},
|
|
36472
36607
|
{
|
|
36473
36608
|
"name": "close",
|
|
36474
|
-
"description": "When the dialog is fully closed. Does not bubble: overlays nest, and a listener on one dialog asking about that dialog should not also hear the form it opened.
|
|
36609
|
+
"description": "When the dialog is fully closed. Does not bubble: overlays nest, and a listener on one dialog asking about that dialog should not also hear the form it opened."
|
|
36475
36610
|
}
|
|
36476
36611
|
],
|
|
36477
36612
|
"attributes": [
|
|
@@ -37852,7 +37987,7 @@
|
|
|
37852
37987
|
"text": "boolean"
|
|
37853
37988
|
},
|
|
37854
37989
|
"default": "false",
|
|
37855
|
-
"description": "For flows without a URL per step (a
|
|
37990
|
+
"description": "For flows without a URL per step (a process that runs inside one window). Ignored\nonce `href` is set: one step is one action, and a link outranks a button\n-- the same rule as nldd-card and nldd-avatar.",
|
|
37856
37991
|
"attribute": "button",
|
|
37857
37992
|
"reflects": true
|
|
37858
37993
|
},
|
|
@@ -37906,7 +38041,7 @@
|
|
|
37906
38041
|
"type": {
|
|
37907
38042
|
"text": "boolean"
|
|
37908
38043
|
},
|
|
37909
|
-
"description": "For flows without a URL per step (a
|
|
38044
|
+
"description": "For flows without a URL per step (a process that runs inside one window). Ignored\nonce `href` is set: one step is one action, and a link outranks a button\n-- the same rule as nldd-card and nldd-avatar.",
|
|
37910
38045
|
"name": "button",
|
|
37911
38046
|
"default": "false",
|
|
37912
38047
|
"fieldName": "button"
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* @attr {string} appearance - Visual style, color included: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-base' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted'. The inherit appearances derive their colors from currentColor, for buttons on colored surfaces; inherit-filled uses the surface color (--context-parent-background-color) as the label color, with a white/black contrast flip as a fallback.
|
|
6
6
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md'). 'lg' uses larger text and 24px start/end icons.
|
|
7
7
|
* @attr {string} horizontal-alignment - Horizontal alignment of the button content: 'left' | 'center' | 'right' (default: unset, centered). Most visible with width="full" or a fixed width.
|
|
8
|
-
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width.
|
|
8
|
+
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width. Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
|
|
9
9
|
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
10
|
-
* @attr {boolean} disabled - Disabled state
|
|
10
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
11
11
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
12
12
|
* @attr {string} popovertarget - ID of a popover element this button invokes; forwarded to the inner button. Use the popoverTargetElement property instead when the popover lives in another tree.
|
|
13
13
|
* @attr {boolean} expandable - Whether the button has a icon to indicate it opens a menu or popover
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* @attr {string} appearance - Visual style, color included: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-base' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted'. The inherit appearances derive their colors from currentColor, for buttons on colored surfaces; inherit-filled uses the surface color (--context-parent-background-color) as the label color, with a white/black contrast flip as a fallback.
|
|
6
6
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md'). 'lg' uses larger text and 24px start/end icons.
|
|
7
7
|
* @attr {string} horizontal-alignment - Horizontal alignment of the button content: 'left' | 'center' | 'right' (default: unset, centered). Most visible with width="full" or a fixed width.
|
|
8
|
-
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width.
|
|
8
|
+
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width. Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
|
|
9
9
|
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
10
|
-
* @attr {boolean} disabled - Disabled state
|
|
10
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
11
11
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
12
12
|
* @attr {string} popovertarget - ID of a popover element this button invokes; forwarded to the inner button. Use the popoverTargetElement property instead when the popover lives in another tree.
|
|
13
13
|
* @attr {boolean} expandable - Whether the button has a icon to indicate it opens a menu or popover
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
|
|
7
7
|
* @attr {boolean} hide-lg-text - In lg size, hides the text label and enlarges the icon by one step (28px)
|
|
8
8
|
* @attr {boolean} no-highlight-border - Removes the per-appearance highlight border (e.g. when a control group draws a single border instead).
|
|
9
|
-
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled).
|
|
9
|
+
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
|
|
10
10
|
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
11
|
-
* @attr {boolean} disabled - Disabled state
|
|
11
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
12
12
|
* @attr {boolean} no-tab - Takes the button out of the tab order (tabindex="-1"), for a control owned by a roving container (an nldd-token in nldd-token-field, a button in a row of an nldd-list) that manages focus itself. Still mouse- and script-focusable.
|
|
13
13
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
14
14
|
* @attr {boolean} expandable - Whether the button opens a menu or popover and shows chevron next to the icon
|
|
@@ -12,9 +12,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
|
|
13
13
|
* @attr {boolean} hide-lg-text - In lg size, hides the text label and enlarges the icon by one step (28px)
|
|
14
14
|
* @attr {boolean} no-highlight-border - Removes the per-appearance highlight border (e.g. when a control group draws a single border instead).
|
|
15
|
-
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled).
|
|
15
|
+
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
|
|
16
16
|
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
17
|
-
* @attr {boolean} disabled - Disabled state
|
|
17
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
18
18
|
* @attr {boolean} no-tab - Takes the button out of the tab order (tabindex="-1"), for a control owned by a roving container (an nldd-token in nldd-token-field, a button in a row of an nldd-list) that manages focus itself. Still mouse- and script-focusable.
|
|
19
19
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
20
20
|
* @attr {boolean} expandable - Whether the button opens a menu or popover and shows chevron next to the icon
|
|
@@ -178,6 +178,15 @@ export declare class NLDDMenu extends LitElement {
|
|
|
178
178
|
*/
|
|
179
179
|
anchorElement: Element | null;
|
|
180
180
|
placement: string;
|
|
181
|
+
/**
|
|
182
|
+
* @internal Distance in px between the anchor and the menu, along the placement
|
|
183
|
+
* side; negative pulls the menu in. Set by a component that hangs a menu
|
|
184
|
+
* off itself and draws its own edge inside its box, such as
|
|
185
|
+
* nldd-menu-bar-item, whose indicator stops short of the item. Not an
|
|
186
|
+
* attribute: the anchor knows that inset, the consumer does not. Set it on
|
|
187
|
+
* every open: the menu puts it back to 0 when it closes.
|
|
188
|
+
*/
|
|
189
|
+
anchorOffset: number;
|
|
181
190
|
/**
|
|
182
191
|
* Maximum number of visible items before the menu scrolls.
|
|
183
192
|
* Sets --_menu-max-items internally. Default: 0 (no limit).
|
|
@@ -1 +1 @@
|
|
|
1
|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NLDDMenu extends LitElement {
|
|
|
427
427
|
*/
|
|
428
428
|
this.anchorElement = null;
|
|
429
429
|
this.placement = 'bottom-start';
|
|
430
|
+
/**
|
|
431
|
+
* @internal Distance in px between the anchor and the menu, along the placement
|
|
432
|
+
* side; negative pulls the menu in. Set by a component that hangs a menu
|
|
433
|
+
* off itself and draws its own edge inside its box, such as
|
|
434
|
+
* nldd-menu-bar-item, whose indicator stops short of the item. Not an
|
|
435
|
+
* attribute: the anchor knows that inset, the consumer does not. Set it on
|
|
436
|
+
* every open: the menu puts it back to 0 when it closes.
|
|
437
|
+
*/
|
|
438
|
+
this.anchorOffset = 0;
|
|
430
439
|
/**
|
|
431
440
|
* Maximum number of visible items before the menu scrolls.
|
|
432
441
|
* Sets --_menu-max-items internally. Default: 0 (no limit).
|
|
@@ -1259,6 +1268,9 @@ export class NLDDMenu extends LitElement {
|
|
|
1259
1268
|
// already chosen a value, so screen readers announce the role.
|
|
1260
1269
|
this._syncAnchorPopupState(this._isOpen);
|
|
1261
1270
|
if (toggleEvent.newState !== 'open') {
|
|
1271
|
+
// The offset belongs to the anchor that opened the menu, which sets
|
|
1272
|
+
// it again on every open; another anchor starts from 0.
|
|
1273
|
+
this.anchorOffset = 0;
|
|
1262
1274
|
this._cleanupAutoUpdate?.();
|
|
1263
1275
|
this._cleanupAutoUpdate = null;
|
|
1264
1276
|
window.removeEventListener('resize', this._handleWindowResize);
|
|
@@ -1352,6 +1364,8 @@ export class NLDDMenu extends LitElement {
|
|
|
1352
1364
|
}
|
|
1353
1365
|
// — Lifecycle ——————————————————————————————————————————————————————————————
|
|
1354
1366
|
updated(changedProperties) {
|
|
1367
|
+
if (changedProperties.has('anchorOffset') && this._isOpen)
|
|
1368
|
+
void this.reposition();
|
|
1355
1369
|
if (changedProperties.has('width')) {
|
|
1356
1370
|
if (this.width) {
|
|
1357
1371
|
// An explicit width pins the menu to exactly that size — clamp the
|
|
@@ -2143,7 +2157,7 @@ export class NLDDMenu extends LitElement {
|
|
|
2143
2157
|
const { x, y } = await computePosition(anchorEl, this, {
|
|
2144
2158
|
placement: effectivePlacement,
|
|
2145
2159
|
middleware: [
|
|
2146
|
-
offset({ mainAxis:
|
|
2160
|
+
offset({ mainAxis: this.anchorOffset, alignmentAxis: -submenuPadding }),
|
|
2147
2161
|
...(drillIn ? [] : [flip({ padding: viewportMargin })]),
|
|
2148
2162
|
shift({ padding: viewportMargin }),
|
|
2149
2163
|
size({
|
|
@@ -2283,6 +2297,9 @@ __decorate([
|
|
|
2283
2297
|
__decorate([
|
|
2284
2298
|
property({ reflect: true, converter: reflectNonDefault('bottom-start') })
|
|
2285
2299
|
], NLDDMenu.prototype, "placement", void 0);
|
|
2300
|
+
__decorate([
|
|
2301
|
+
property({ attribute: false })
|
|
2302
|
+
], NLDDMenu.prototype, "anchorOffset", void 0);
|
|
2286
2303
|
__decorate([
|
|
2287
2304
|
property({ type: Number, attribute: 'max-items' })
|
|
2288
2305
|
], NLDDMenu.prototype, "maxItems", void 0);
|