@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
|
@@ -11,19 +11,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
11
11
|
* Supports grid, stack, lanes and horizontal scroll layouts.
|
|
12
12
|
*
|
|
13
13
|
* Use it for a set of equal blocks, usually `nldd-card`s, instead of a CSS
|
|
14
|
-
* grid of your own: the collection sets the columns from `item-width` and
|
|
15
|
-
* available width, and the gap per breakpoint.
|
|
14
|
+
* grid of your own: the collection sets the columns from `item-min-width` and
|
|
15
|
+
* the available width, and the gap per breakpoint.
|
|
16
16
|
*
|
|
17
17
|
* In grid and stack modes, items are paginated via a load-more button. In
|
|
18
18
|
* horizontal scroll, the prev/next controls and the edge fade appear only when
|
|
19
|
-
* the items overflow the container.
|
|
19
|
+
* the items overflow the container. Use horizontal scroll for items that
|
|
20
|
+
* together serve one purpose, such as the events of one agenda; it is not a
|
|
21
|
+
* carousel for unrelated highlights, which the design guidelines advise
|
|
22
|
+
* against.
|
|
20
23
|
* With `lazy-load`, the next items are automatically loaded when
|
|
21
24
|
* the load-more button comes into view.
|
|
22
25
|
*
|
|
23
26
|
* @element nldd-collection
|
|
24
27
|
*
|
|
25
28
|
* @attr {string} layout - Layout mode: 'grid' | 'stack' | 'lanes' | 'horizontal-scroll' (default: 'grid')
|
|
26
|
-
* @attr {string} item-width -
|
|
29
|
+
* @attr {string} item-min-width - 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.
|
|
30
|
+
* @attr {string} item-max-width - 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.
|
|
27
31
|
* @attr {string} gap - Gap between items, as a step of the spacing scale ('0', '2', '4', '6', '8', '10', '12', '16', '20', '24', '28', '32', '40', '44', '48', '56', '64', '80', '96'). Overrides the responsive default at every breakpoint; unset keeps the default.
|
|
28
32
|
* @attr {string} sm-gap - Gap at sm, overriding `gap` there
|
|
29
33
|
* @attr {string} md-gap - Gap at md, overriding `gap` there
|
|
@@ -33,6 +37,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
33
37
|
* @attr {boolean} show-load-more - Show load-more button in grid/stack (default: false)
|
|
34
38
|
* @attr {boolean} lazy-load - Automatically load more items when the button becomes visible
|
|
35
39
|
*
|
|
40
|
+
* @migration Items in horizontal scroll stop at 480px (or at `item-min-width` when that is wider) instead of filling the container.
|
|
41
|
+
* Set `item-max-width="100%"` where one or two items should still fill the row.
|
|
42
|
+
* @migration The `item-width` attribute has been renamed to `item-min-width`, because it was a minimum in every layout.
|
|
43
|
+
* Replace `item-width="320px"` with `item-min-width="320px"`.
|
|
36
44
|
* @migration The `load-more-label` attribute has been removed.
|
|
37
45
|
* Use `translations` property instead: `.translations=${{ 'components.collection.load-more-action': 'Show more' }}`
|
|
38
46
|
*
|
|
@@ -53,6 +61,7 @@ import '../../actions/icon-button/icon-button.js';
|
|
|
53
61
|
import '../../content/icon/icon.js';
|
|
54
62
|
import { spacingToValue } from '../../../utilities/spacing-scale.js';
|
|
55
63
|
import { translate } from '../../../utilities/translations.js';
|
|
64
|
+
let warnedAboutItemWidth = false;
|
|
56
65
|
let NLDDCollection = class NLDDCollection extends LitElement {
|
|
57
66
|
constructor() {
|
|
58
67
|
super(...arguments);
|
|
@@ -119,6 +128,20 @@ let NLDDCollection = class NLDDCollection extends LitElement {
|
|
|
119
128
|
super.connectedCallback();
|
|
120
129
|
this._visibleCount = this.maxItems;
|
|
121
130
|
}
|
|
131
|
+
// `item-width` was renamed to `item-min-width`. An unknown attribute does
|
|
132
|
+
// nothing, so without this a missed rename only shows as 280px items.
|
|
133
|
+
// Observed rather than read once, so a binding that sets it after the
|
|
134
|
+
// first render is caught too. Once per page: one search-and-replace.
|
|
135
|
+
static get observedAttributes() {
|
|
136
|
+
return [...super.observedAttributes, 'item-width'];
|
|
137
|
+
}
|
|
138
|
+
attributeChangedCallback(name, old, value) {
|
|
139
|
+
super.attributeChangedCallback(name, old, value);
|
|
140
|
+
if (import.meta.env?.DEV && name === 'item-width' && value !== null && !warnedAboutItemWidth) {
|
|
141
|
+
warnedAboutItemWidth = true;
|
|
142
|
+
console.warn(`<nldd-collection>: the item-width attribute is now item-min-width. Rename item-width="${value}" to item-min-width="${value}", here and on every other nldd-collection.`, this);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
122
145
|
disconnectedCallback() {
|
|
123
146
|
super.disconnectedCallback();
|
|
124
147
|
this._intersectionObserver?.disconnect();
|
|
@@ -128,12 +151,20 @@ let NLDDCollection = class NLDDCollection extends LitElement {
|
|
|
128
151
|
if (changedProperties.has('layout')) {
|
|
129
152
|
this._setupScrollListeners();
|
|
130
153
|
}
|
|
131
|
-
if (changedProperties.has('
|
|
132
|
-
if (this.
|
|
133
|
-
this.style.setProperty('--_collection-item-width', this.
|
|
154
|
+
if (changedProperties.has('itemMinWidth')) {
|
|
155
|
+
if (this.itemMinWidth) {
|
|
156
|
+
this.style.setProperty('--_collection-item-min-width', this.itemMinWidth);
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
this.style.removeProperty('--_collection-item-min-width');
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (changedProperties.has('itemMaxWidth')) {
|
|
163
|
+
if (this.itemMaxWidth) {
|
|
164
|
+
this.style.setProperty('--_collection-item-max-width', this.itemMaxWidth);
|
|
134
165
|
}
|
|
135
166
|
else {
|
|
136
|
-
this.style.removeProperty('--_collection-item-width');
|
|
167
|
+
this.style.removeProperty('--_collection-item-max-width');
|
|
137
168
|
}
|
|
138
169
|
}
|
|
139
170
|
// The three breakpoint vars are what the styles read, so a plain gap is
|
|
@@ -264,8 +295,11 @@ __decorate([
|
|
|
264
295
|
property({ reflect: true, converter: reflectNonDefault('grid') })
|
|
265
296
|
], NLDDCollection.prototype, "layout", void 0);
|
|
266
297
|
__decorate([
|
|
267
|
-
property({ type: String, reflect: true, attribute: 'item-width' })
|
|
268
|
-
], NLDDCollection.prototype, "
|
|
298
|
+
property({ type: String, reflect: true, attribute: 'item-min-width' })
|
|
299
|
+
], NLDDCollection.prototype, "itemMinWidth", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
property({ type: String, reflect: true, attribute: 'item-max-width' })
|
|
302
|
+
], NLDDCollection.prototype, "itemMaxWidth", void 0);
|
|
269
303
|
__decorate([
|
|
270
304
|
property({ type: String, reflect: true })
|
|
271
305
|
], NLDDCollection.prototype, "gap", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../../../src/components/layout/collection/collection.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../../../src/components/layout/collection/collection.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,gCAAgC,CAAC;AACxC,OAAO,wCAAwC,CAAC;AAChD,OAAO,0CAA0C,CAAC;AAClD,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAoB,MAAM,qCAAqC,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAI/D,IAAI,oBAAoB,GAAG,KAAK,CAAC;AAG1B,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAAvC;;QAIN,WAAM,GAAW,MAAM,CAAC;QAuBxB,aAAQ,GAAG,EAAE,CAAC;QAGd,iBAAY,GAAwC,EAAE,CAAC;QAGvD,iBAAY,GAAG,KAAK,CAAC;QAGrB,aAAQ,GAAG,KAAK,CAAC;QASjB,kBAAa,GAAG,CAAC,CAAC;QAGlB,gBAAW,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S,EAAE,WAAW,EAAE,CAAC;gDACrC;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAC4B;AAGvD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;oDACnD;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;gDAClD;AASjB;IADC,KAAK,EAAE;qDACU;AAGlB;IADC,KAAK,EAAE;mDACQ;AAGhB;IADC,KAAK,EAAE;gDACQ;AAGhB;IADC,KAAK,EAAE;8CACO;AAGf;IADC,KAAK,EAAE;qDACc;AAGtB;IADC,KAAK,EAAE;sDACe;AAQf;IADP,KAAK,CAAC,oBAAoB,CAAC;gDACG;AAuCvB;IADP,KAAK,CAAC,uBAAuB,CAAC;oDACW;AA3G9B,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAwS1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/collection/collection.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"collection.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/collection/collection.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB,yBAkL5B,CAAC"}
|
|
@@ -13,7 +13,8 @@ export const collectionStyles = css `
|
|
|
13
13
|
/* # Host */
|
|
14
14
|
|
|
15
15
|
:host {
|
|
16
|
-
--_collection-item-width: var(--primitives-area-280);
|
|
16
|
+
--_collection-item-min-width: var(--primitives-area-280);
|
|
17
|
+
--_collection-item-max-width: var(--primitives-area-480);
|
|
17
18
|
--_collection-focus-ring-z-index: 1;
|
|
18
19
|
|
|
19
20
|
/* Two sets, because a collection inside a layout-container follows that
|
|
@@ -56,10 +57,10 @@ export const collectionStyles = css `
|
|
|
56
57
|
|
|
57
58
|
:host([layout="grid"]) .collection__items,
|
|
58
59
|
:host(:not([layout])) .collection__items {
|
|
59
|
-
/* min(item-width, 100%) clamps the track min to the container width so
|
|
60
|
+
/* min(item-min-width, 100%) clamps the track min to the container width so
|
|
60
61
|
a single column never forces horizontal overflow on narrow screens. */
|
|
61
62
|
display: grid;
|
|
62
|
-
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-width), 100%), 1fr));
|
|
63
|
+
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-min-width), 100%), 1fr));
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
/* A grid item's automatic minimum is min-content, so one long unbreakable
|
|
@@ -85,7 +86,7 @@ export const collectionStyles = css `
|
|
|
85
86
|
load-more adds to it. */
|
|
86
87
|
:host([layout="lanes"]) .collection__items {
|
|
87
88
|
display: grid;
|
|
88
|
-
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-width), 100%), 1fr));
|
|
89
|
+
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-min-width), 100%), 1fr));
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
:host([layout="lanes"]) .collection__items ::slotted(*) {
|
|
@@ -130,10 +131,10 @@ export const collectionStyles = css `
|
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
:host([layout="horizontal-scroll"]) .collection__items ::slotted(*) {
|
|
133
|
-
max-width: 100
|
|
134
|
+
max-width: min(max(var(--_collection-item-min-width), var(--_collection-item-max-width)), 100%);
|
|
134
135
|
flex-grow: 1;
|
|
135
136
|
flex-shrink: 0;
|
|
136
|
-
flex-basis: var(--_collection-item-width);
|
|
137
|
+
flex-basis: var(--_collection-item-min-width);
|
|
137
138
|
scroll-snap-align: start;
|
|
138
139
|
}
|
|
139
140
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.styles.js","sourceRoot":"","sources":["../../../../src/components/layout/collection/collection.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,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,gBAAgB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"collection.styles.js","sourceRoot":"","sources":["../../../../src/components/layout/collection/collection.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,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,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;uBAqBZ,KAAK;uBACL,KAAK,qBAAqB,KAAK;uBAC/B,KAAK;;4CAEgB,KAAK;4CACL,KAAK,qBAAqB,KAAK;4CAC/B,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuJhD,CAAC"}
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
* @attr {number} sm-column-count - Column count when this container is sm-wide
|
|
66
66
|
* @attr {number} md-column-count - Column count when this container is md-wide
|
|
67
67
|
* @attr {number} lg-column-count - Column count when this container is lg-wide
|
|
68
|
-
* @attr {string} width - '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.
|
|
68
|
+
* @attr {string} width - '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.
|
|
69
69
|
* @attr {string} min-width - Minimum width as a CSS length (e.g. '280px')
|
|
70
70
|
* @attr {string} max-width - Maximum width as a CSS length (e.g. '480px')
|
|
71
71
|
* @attr {string} gap - Gap between children. One distance for all of them, so it fits children of one kind; for a stack of different kinds, space each seam with nldd-spacer instead.
|
|
@@ -71,7 +71,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
71
71
|
* @attr {number} sm-column-count - Column count when this container is sm-wide
|
|
72
72
|
* @attr {number} md-column-count - Column count when this container is md-wide
|
|
73
73
|
* @attr {number} lg-column-count - Column count when this container is lg-wide
|
|
74
|
-
* @attr {string} width - '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.
|
|
74
|
+
* @attr {string} width - '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.
|
|
75
75
|
* @attr {string} min-width - Minimum width as a CSS length (e.g. '280px')
|
|
76
76
|
* @attr {string} max-width - Maximum width as a CSS length (e.g. '480px')
|
|
77
77
|
* @attr {string} gap - Gap between children. One distance for all of them, so it fits children of one kind; for a stack of different kinds, space each seam with nldd-spacer instead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/container/container.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"container.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/container/container.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,yBAoS3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.styles.js","sourceRoot":"","sources":["../../../../src/components/layout/container/container.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,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,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA6CX,KAAK;uBACL,KAAK,qBAAqB,KAAK;uBAC/B,KAAK;;4CAEgB,KAAK;4CACL,KAAK,qBAAqB,KAAK;4CAC/B,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA8B1B,KAAK;;;;;;;uBAOL,KAAK,qBAAqB,KA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AAK;;;;0BAIL,KAAK,qBAAqB,KAAK;;;;0BAI/B,KAAK;;;CAG9B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HeroLayout, HeroMainPosition } from './hero.js';
|
|
2
|
+
export type HeroCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
3
|
+
/** What the corner logic reads off the hero. */
|
|
4
|
+
interface CornerHost extends HTMLElement {
|
|
5
|
+
corner: string | null;
|
|
6
|
+
layout: HeroLayout;
|
|
7
|
+
mainPosition: HeroMainPosition;
|
|
8
|
+
mainWidth: string;
|
|
9
|
+
width: string;
|
|
10
|
+
readonly _hasMedia: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Works out which corners are rounded and writes them onto the host as
|
|
14
|
+
* `data-media-corner` and `data-main-corner`, which the corner stylesheet
|
|
15
|
+
* keys off. Without `corner`, or where a corner does not fit the shape
|
|
16
|
+
* language, both are removed and the hero is rectangular.
|
|
17
|
+
*/
|
|
18
|
+
export declare function applyCorner(host: CornerHost): void;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=hero-corner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero-corner.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAMnF,gDAAgD;AAChD,UAAU,UAAW,SAAQ,WAAW;IACvC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC5B;AAgDD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAqDlD"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
const CORNERS = ['top-left', 'top-right', 'bottom-left', 'bottom-right'];
|
|
2
|
+
/* The media corner per panel position, curated from the Rijkshuisstijl
|
|
3
|
+
* examples rather than derived: always a corner the panel leaves free. */
|
|
4
|
+
const AUTO_MEDIA_CORNER = {
|
|
5
|
+
'bottom-left': 'top-right',
|
|
6
|
+
'bottom-right': 'bottom-left',
|
|
7
|
+
'top-left': 'top-right',
|
|
8
|
+
'top-right': 'top-left',
|
|
9
|
+
'left': 'top-right',
|
|
10
|
+
'right': 'top-left',
|
|
11
|
+
};
|
|
12
|
+
/* The panel's own corner: the one pointing diagonally into the media. A panel
|
|
13
|
+
* that spans a full side has none. */
|
|
14
|
+
const MAIN_CORNER = {
|
|
15
|
+
'bottom-left': 'top-right',
|
|
16
|
+
'bottom-right': 'top-left',
|
|
17
|
+
'top-left': 'bottom-right',
|
|
18
|
+
'top-right': 'bottom-left',
|
|
19
|
+
'left': null,
|
|
20
|
+
'right': null,
|
|
21
|
+
};
|
|
22
|
+
/** The media corners the panel stands on, where a rounded corner would vanish. */
|
|
23
|
+
function coveredCorners(host, position) {
|
|
24
|
+
if (position === 'left')
|
|
25
|
+
return ['top-left', 'bottom-left'];
|
|
26
|
+
if (position === 'right')
|
|
27
|
+
return ['top-right', 'bottom-right'];
|
|
28
|
+
if (host.mainWidth !== 'full')
|
|
29
|
+
return [position];
|
|
30
|
+
const vertical = position.startsWith('top') ? 'top' : 'bottom';
|
|
31
|
+
return [`${vertical}-left`, `${vertical}-right`];
|
|
32
|
+
}
|
|
33
|
+
const warned = new WeakMap();
|
|
34
|
+
function warnOnce(host, key, message) {
|
|
35
|
+
const keys = warned.get(host) ?? new Set();
|
|
36
|
+
if (keys.has(key))
|
|
37
|
+
return;
|
|
38
|
+
keys.add(key);
|
|
39
|
+
warned.set(host, keys);
|
|
40
|
+
console.warn(message, host);
|
|
41
|
+
}
|
|
42
|
+
function clear(host) {
|
|
43
|
+
host.removeAttribute('data-media-corner');
|
|
44
|
+
host.removeAttribute('data-main-corner');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Works out which corners are rounded and writes them onto the host as
|
|
48
|
+
* `data-media-corner` and `data-main-corner`, which the corner stylesheet
|
|
49
|
+
* keys off. Without `corner`, or where a corner does not fit the shape
|
|
50
|
+
* language, both are removed and the hero is rectangular.
|
|
51
|
+
*/
|
|
52
|
+
export function applyCorner(host) {
|
|
53
|
+
if (host.corner === null || host.corner === undefined) {
|
|
54
|
+
clear(host);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const center = host.mainPosition === 'top-center' || host.mainPosition === 'bottom-center';
|
|
58
|
+
// An unknown main-position is the default, as on the hero itself.
|
|
59
|
+
const position = Object.prototype.hasOwnProperty.call(MAIN_CORNER, host.mainPosition)
|
|
60
|
+
? host.mainPosition
|
|
61
|
+
: 'bottom-left';
|
|
62
|
+
// Without media the panel is the whole hero, so layout and position do not
|
|
63
|
+
// come into it.
|
|
64
|
+
if (host._hasMedia && (host.layout !== 'contained' || center)) {
|
|
65
|
+
clear(host);
|
|
66
|
+
if (import.meta.env?.DEV) {
|
|
67
|
+
const fixes = [
|
|
68
|
+
host.layout !== 'contained' ? 'set layout="contained"' : '',
|
|
69
|
+
center ? `put the panel in a corner or along a side instead of main-position="${host.mainPosition}"` : '',
|
|
70
|
+
].filter(Boolean);
|
|
71
|
+
warnOnce(host, `unsupported-${host.layout !== 'contained' ? 'layout' : ''}-${center ? 'center' : ''}`, `<nldd-hero>: corner only applies with layout="contained" and the panel in a corner or along a side, so this hero stays rectangular. To round it, ${fixes.join(' and ')}; or drop the corner.`);
|
|
72
|
+
}
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const value = host.corner.trim();
|
|
76
|
+
const chosen = CORNERS.includes(value) ? value : null;
|
|
77
|
+
const covered = host._hasMedia ? coveredCorners(host, position) : [];
|
|
78
|
+
let mediaCorner = chosen ?? AUTO_MEDIA_CORNER[position];
|
|
79
|
+
if (!chosen && covered.includes(mediaCorner)) {
|
|
80
|
+
// A full-width strip covers both corners on its edge: move to the
|
|
81
|
+
// other edge, on the same side.
|
|
82
|
+
const horizontal = mediaCorner.endsWith('left') ? 'left' : 'right';
|
|
83
|
+
mediaCorner = `${mediaCorner.startsWith('top') ? 'bottom' : 'top'}-${horizontal}`;
|
|
84
|
+
}
|
|
85
|
+
const mainCorner = host._hasMedia && host.mainWidth !== 'full' ? MAIN_CORNER[position] : null;
|
|
86
|
+
host.setAttribute('data-media-corner', mediaCorner);
|
|
87
|
+
if (mainCorner)
|
|
88
|
+
host.setAttribute('data-main-corner', mainCorner);
|
|
89
|
+
else
|
|
90
|
+
host.removeAttribute('data-main-corner');
|
|
91
|
+
if (!import.meta.env?.DEV)
|
|
92
|
+
return;
|
|
93
|
+
if (!chosen && value !== '' && value !== 'auto') {
|
|
94
|
+
warnOnce(host, `unknown-${value}`, `<nldd-hero>: corner="${value}" is not a corner, so the hero chooses one. Use "top-left", "top-right", "bottom-left" or "bottom-right", or leave the value empty.`);
|
|
95
|
+
}
|
|
96
|
+
if (chosen && covered.includes(chosen)) {
|
|
97
|
+
warnOnce(host, `covered-${chosen}`, `<nldd-hero>: corner="${chosen}" sits under the panel, so the rounded corner does not show. Choose a corner the panel leaves free, or leave the value empty to let the hero choose.`);
|
|
98
|
+
}
|
|
99
|
+
if (host.width === 'full') {
|
|
100
|
+
warnOnce(host, 'width-full', '<nldd-hero>: corner with width="full" runs the hero to the edge of the screen. A shape with a rounded corner always keeps a margin around it; leave width="full" off or drop the corner.');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=hero-corner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero-corner.js","sourceRoot":"","sources":["../../../../../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AS,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAE9F,IAAI,CAAC,YAAY,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;IACpD,IAAI,UAAU;QAAE,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;;QAC7D,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;IAE9C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG;QAAE,OAAO;IAClC,IAAI,CAAC,MAAM,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QACjD,QAAQ,CAAC,IAAI,EAAE,WAAW,KAAK,EAAE,EAAE,wBAAwB,KAAK,qIAAqI,CAAC,CAAC;IACxM,CAAC;IACD,IAAI,MAAM,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACxC,QAAQ,CAAC,IAAI,EAAE,WAAW,MAAM,EAAE,EAAE,wBAAwB,MAAM,sJAAsJ,CAAC,CAAC;IAC3N,CAAC;IACD,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;QAC3B,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,0LAA0L,CAAC,CAAC;IAC1N,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero-corner.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB,yBA4H5B,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { css, unsafeCSS } from 'lit';
|
|
2
|
+
import { breakpoints } from '../../../../assets/styles/breakpoints.js';
|
|
3
|
+
const smMax = unsafeCSS(breakpoints.smMax);
|
|
4
|
+
const mdMin = unsafeCSS(breakpoints.mdMin);
|
|
5
|
+
const mdMax = unsafeCSS(breakpoints.mdMax);
|
|
6
|
+
const lgMin = unsafeCSS(breakpoints.lgMin);
|
|
7
|
+
export const heroCornerStyles = css `
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/* # Corner */
|
|
11
|
+
|
|
12
|
+
:host([data-media-corner]) {
|
|
13
|
+
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-sm-width) * 1.5);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* On .hero, not :host: a var() resolves where it is declared, so on :host
|
|
17
|
+
this would halve the sm radius at every breakpoint. */
|
|
18
|
+
:host([data-media-corner]) .hero {
|
|
19
|
+
--_hero-main-corner-radius: calc(var(--_hero-corner-radius) / 2);
|
|
20
|
+
|
|
21
|
+
@container (min-width: ${mdMin}) and (max-width: ${mdMax}) {
|
|
22
|
+
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-md-width) * 2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@container (min-width: ${lgMin}) {
|
|
26
|
+
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-lg-width) * 2);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ## Contained */
|
|
31
|
+
|
|
32
|
+
:host([data-media-corner][data-has-media]) .hero {
|
|
33
|
+
@container (min-width: ${mdMin}) {
|
|
34
|
+
--_hero-main-inset: var(--primitives-space-0);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([data-has-media]:is([data-main-corner="top-left"], [data-main-corner="top-right"])) .hero__main {
|
|
39
|
+
@container (min-width: ${mdMin}) {
|
|
40
|
+
margin-top: var(--_hero-corner-radius);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([data-has-media]:is([data-main-corner="bottom-left"], [data-main-corner="bottom-right"])) .hero__main {
|
|
45
|
+
@container (min-width: ${mdMin}) {
|
|
46
|
+
margin-bottom: var(--_hero-corner-radius);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* ## Media */
|
|
51
|
+
|
|
52
|
+
:host([data-has-media][data-media-corner="top-left"]) .hero__media {
|
|
53
|
+
border-top-left-radius: var(--_hero-corner-radius);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([data-has-media][data-media-corner="top-right"]) .hero__media {
|
|
57
|
+
border-top-right-radius: var(--_hero-corner-radius);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([data-has-media][data-media-corner="bottom-left"]) .hero__media {
|
|
61
|
+
@container (min-width: ${mdMin}) {
|
|
62
|
+
border-bottom-left-radius: var(--_hero-corner-radius);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@container (max-width: ${smMax}) {
|
|
66
|
+
border-top-left-radius: var(--_hero-corner-radius);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([data-has-media][data-media-corner="bottom-right"]) .hero__media {
|
|
71
|
+
@container (min-width: ${mdMin}) {
|
|
72
|
+
border-bottom-right-radius: var(--_hero-corner-radius);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@container (max-width: ${smMax}) {
|
|
76
|
+
border-top-right-radius: var(--_hero-corner-radius);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* ## Main */
|
|
81
|
+
|
|
82
|
+
:host([data-main-corner="top-left"]) .hero__main {
|
|
83
|
+
@container (min-width: ${mdMin}) {
|
|
84
|
+
border-top-left-radius: var(--_hero-main-corner-radius);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host([data-main-corner="top-right"]) .hero__main {
|
|
89
|
+
@container (min-width: ${mdMin}) {
|
|
90
|
+
border-top-right-radius: var(--_hero-main-corner-radius);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([data-main-corner="bottom-left"]) .hero__main {
|
|
95
|
+
@container (min-width: ${mdMin}) {
|
|
96
|
+
border-bottom-left-radius: var(--_hero-main-corner-radius);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host([data-main-corner="bottom-right"]) .hero__main {
|
|
101
|
+
@container (min-width: ${mdMin}) {
|
|
102
|
+
border-bottom-right-radius: var(--_hero-main-corner-radius);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* ## Without media */
|
|
107
|
+
|
|
108
|
+
:host(:not([data-has-media])[data-media-corner="top-left"]) :is(.hero__body, .hero__main) {
|
|
109
|
+
border-top-left-radius: var(--_hero-corner-radius);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:host(:not([data-has-media])[data-media-corner="top-right"]) :is(.hero__body, .hero__main) {
|
|
113
|
+
border-top-right-radius: var(--_hero-corner-radius);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host(:not([data-has-media])[data-media-corner="bottom-left"]) :is(.hero__body, .hero__main) {
|
|
117
|
+
border-bottom-left-radius: var(--_hero-corner-radius);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host(:not([data-has-media])[data-media-corner="bottom-right"]) :is(.hero__body, .hero__main) {
|
|
121
|
+
border-bottom-right-radius: var(--_hero-corner-radius);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:host(:not([data-has-media]):is([data-media-corner="top-left"], [data-media-corner="bottom-left"])) .hero__main {
|
|
125
|
+
padding-left: calc(var(--_hero-main-padding) + var(--_hero-corner-radius) / 2);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:host(:not([data-has-media]):is([data-media-corner="top-right"], [data-media-corner="bottom-right"])) .hero__main {
|
|
129
|
+
padding-right: calc(var(--_hero-main-padding) + var(--_hero-corner-radius) / 2);
|
|
130
|
+
}
|
|
131
|
+
`;
|
|
132
|
+
//# sourceMappingURL=hero-corner.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero-corner.styles.js","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,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,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;2BAcR,KAAK,qBAAqB,KAAK;;;;2BAI/B,KAAK;;;;;;;;2BAQL,KAAK;;;;;;2BAML,KAAK;;;;;;2BAML,KAAK;;;;;;;;;;;;;;;;2BAgBL,KAAK;;;;2BAIL,KAAK;;;;;;2BAML,KAAK;;;;2BAIL,KAAK;;;;;;;;2BAQL,KAAK;;;;;;2BAML,KAAK;;;;;;2BAML,KAAK;;;;;;2BAML,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B/B,CAAC"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The section that says what a page is for: it names the main goal of what
|
|
5
5
|
* you can find there, draws the eye and is the visual welcome. It has a media
|
|
6
|
-
* area and a text panel (the main) that can stand in eight positions.
|
|
7
|
-
*
|
|
8
|
-
* they are, such as a home or a topic
|
|
9
|
-
* that, a section with a title is enough.
|
|
6
|
+
* area and a text panel (the main) that can stand in eight positions. The
|
|
7
|
+
* areas are rectangular; `corner` rounds one corner of each. Use it on pages
|
|
8
|
+
* where a visitor first has to know where they are, such as a home or a topic
|
|
9
|
+
* page; where the title already does that, a section with a title is enough.
|
|
10
10
|
*
|
|
11
11
|
* The image in a hero sets the mood and is never the main content, so the
|
|
12
12
|
* panel always stands on it. Over an image the panel keeps a section gap from
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
* @attr {string} width - Body max-width; 'full' removes the bound (section API)
|
|
46
46
|
* @attr {boolean} grow - Takes the height the page has left, so the footer sits at the bottom of a short page. Without it, nldd-page lets its last section grow.
|
|
47
47
|
* @attr {string} padding-block - Block padding override, also per edge and responsive (section API)
|
|
48
|
+
* @attr {string} corner - 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"`
|
|
48
49
|
* @attr {'contained'|'overlap'} layout - How the panel relates to the image (default: 'overlap'). 'contained' keeps it on the image, in any of the eight positions; 'overlap' lets it fall `overlap-size` over the bottom of the image and run on below as far as its content needs, so the image keeps its height whatever the content. In 'overlap' the image has a fixed height (320px on md, 400px on lg) unless `media-height` or `media-aspect-ratio` is set, and only the horizontal side of `main-position` counts. A panel shorter than `overlap-size` ends inside the image and says so in development
|
|
49
50
|
* @attr {string} main-background - Surface color of the panel: 'base' (the base surface)
|
|
50
51
|
* or a category color — 'accent' (default) or a Rijkshuisstijl color such as
|
|
@@ -91,9 +92,12 @@ declare const NLDDHero_base: typeof LitElement & (new (...args: any[]) => LitEle
|
|
|
91
92
|
_onSlotChange(e: Event): void;
|
|
92
93
|
});
|
|
93
94
|
export declare class NLDDHero extends NLDDHero_base {
|
|
94
|
-
static styles: import("lit").CSSResult;
|
|
95
|
+
static styles: import("lit").CSSResult[];
|
|
95
96
|
/** Width mode: 'full' (removes body max-width) or any CSS length. */
|
|
96
97
|
width: string;
|
|
98
|
+
/** Rounds one corner of the media area and one of the panel. An empty
|
|
99
|
+
* value lets the hero choose the media corner from `main-position`. */
|
|
100
|
+
corner: string | null;
|
|
97
101
|
layout: HeroLayout;
|
|
98
102
|
mainBackground: HeroMainBackground;
|
|
99
103
|
mainWidth: HeroMainWidth;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAStD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW,GAAG,aAAa,GAAG,eAAe,GAAG,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;AAC7I,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAajD,MAAM,MAAM,kBAAkB,GAC3B,MAAM,GAAG,QAAQ,GACjB,WAAW,GAAG,aAAa,GAAG,YAAY,GAAG,YAAY,GACzD,OAAO,GAAG,QAAQ,GAClB,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GACzC,YAAY,GAAG,MAAM,GACrB,aAAa,GAAG,OAAO,GACvB,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CAAC;;;;;;;;;;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