@nldd/design-system 0.8.99 → 0.9.0
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 +484 -40
- package/dist/components/actions/button/button.d.ts +7 -5
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.i18n.d.ts +3 -1
- package/dist/components/actions/button/button.i18n.d.ts.map +1 -1
- package/dist/components/actions/button/button.i18n.js +3 -1
- package/dist/components/actions/button/button.i18n.js.map +1 -1
- package/dist/components/actions/button/button.js +3 -3
- package/dist/components/actions/button/button.styles.js +2 -2
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +9 -10
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +7 -5
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.i18n.d.ts +3 -1
- package/dist/components/actions/icon-button/icon-button.i18n.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.i18n.js +3 -1
- package/dist/components/actions/icon-button/icon-button.i18n.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +3 -3
- package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +7 -7
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- 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/actions/toolbar/toolbar.d.ts +1 -1
- package/dist/components/actions/toolbar/toolbar.i18n.d.ts +3 -1
- package/dist/components/actions/toolbar/toolbar.i18n.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.i18n.js +3 -1
- package/dist/components/actions/toolbar/toolbar.i18n.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +1 -1
- package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.template.js +4 -2
- package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
- package/dist/components/components.js +1014 -296
- package/dist/components/content/avatar/avatar.d.ts +5 -3
- package/dist/components/content/avatar/avatar.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.i18n.d.ts +3 -1
- package/dist/components/content/avatar/avatar.i18n.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.i18n.js +3 -1
- package/dist/components/content/avatar/avatar.i18n.js.map +1 -1
- package/dist/components/content/avatar/avatar.js +1 -1
- package/dist/components/content/avatar/avatar.template.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.template.js +6 -6
- package/dist/components/content/avatar/avatar.template.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/{icon-button-CJIikwyu.js → icon-button-BVhiOwX9.js} +12 -7
- 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 +6 -4
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.i18n.d.ts +3 -1
- package/dist/components/layout/card/card.i18n.d.ts.map +1 -1
- package/dist/components/layout/card/card.i18n.js +3 -1
- package/dist/components/layout/card/card.i18n.js.map +1 -1
- package/dist/components/layout/card/card.js +2 -2
- package/dist/components/layout/card/card.template.d.ts.map +1 -1
- package/dist/components/layout/card/card.template.js +6 -6
- package/dist/components/layout/card/card.template.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 +29 -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 +131 -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 +139 -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 +13 -5
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +42 -6
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +16 -0
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +61 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.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/cells/step-cell/step-cell.d.ts +5 -0
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js +25 -0
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js +28 -7
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.js +8 -4
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts +5 -2
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +9 -4
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +12 -5
- package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts +3 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.js +3 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +15 -7
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js +9 -2
- package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +11 -2
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts +7 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js +6 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +7 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +12 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js +6 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +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 +7 -5
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.i18n.d.ts +3 -1
- package/dist/components/navigation/link/link.i18n.d.ts.map +1 -1
- package/dist/components/navigation/link/link.i18n.js +3 -1
- package/dist/components/navigation/link/link.i18n.js.map +1 -1
- package/dist/components/navigation/link/link.js +3 -3
- package/dist/components/navigation/link/link.styles.js +2 -2
- package/dist/components/navigation/link/link.template.d.ts.map +1 -1
- package/dist/components/navigation/link/link.template.js +7 -8
- package/dist/components/navigation/link/link.template.js.map +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/skip-link/skip-link.d.ts +1 -14
- package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.js +7 -55
- package/dist/components/navigation/skip-link/skip-link.js.map +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/components/{with-translations-C8_0-9y8.js → with-translations-C6QfP6_S.js} +24 -1
- package/dist/css/rich-text.css +1 -1
- package/dist/css/variables.css +1 -0
- package/dist/nldd.min.js +962 -683
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +24 -7
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +24 -7
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +24 -7
- 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 +24 -7
- 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 +24 -7
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/vue.d.ts +71 -38
- package/dist/utilities/focus-target.d.ts +23 -0
- package/dist/utilities/focus-target.d.ts.map +1 -0
- package/dist/utilities/focus-target.js +70 -0
- package/dist/utilities/focus-target.js.map +1 -0
- package/dist/utilities/link-hint.d.ts +18 -0
- package/dist/utilities/link-hint.d.ts.map +1 -0
- package/dist/utilities/link-hint.js +29 -0
- package/dist/utilities/link-hint.js.map +1 -0
- package/package.json +3 -2
|
@@ -13,6 +13,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
13
13
|
* and keyboard navigation, including `<optgroup>`, `data-*` attributes and
|
|
14
14
|
* dynamic changes to options.
|
|
15
15
|
*
|
|
16
|
+
* A dropdown hides its options, so it is the last resort for a choice from a
|
|
17
|
+
* fixed set. Show a handful of options with nldd-segmented-control,
|
|
18
|
+
* nldd-toggle-button-group or nldd-radio-button-group, and let the user type
|
|
19
|
+
* in nldd-combo-box when there are many, a list of countries included. The
|
|
20
|
+
* design guidelines explain the order.
|
|
21
|
+
*
|
|
16
22
|
* @element nldd-dropdown
|
|
17
23
|
* @attr {string} size - Size: 'xs' | 'sm' | 'md' (default: 'md')
|
|
18
24
|
* @attr {boolean} valid - Marks the field as valid
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../../src/components/inputs/dropdown/dropdown.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../../src/components/inputs/dropdown/dropdown.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAKhE,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW,CAAC,UAAU,CAAC;IAAlD;;QAQN,SAAI,GAAiB,IAAI,CAAC;QAG1B,UAAK,GAAG,KAAK,CAAC;QAGd,YAAO,GAAG,KAAK,CAAC;QAGhB,aAAQ,GAAG,KAAK,CAAC;QAGjB,aAAQ,GAAG,KAAK,CAAC;QAEjB,oGAAoG;QAEpG,UAAK,GAAG,EAAE,CAAC;QAEX;;;;WAIG;QAEH,oBAA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;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAEQ,MAAM;QACd,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;;AAxNe,mBAAM,GAAG,cAAc,AAAjB,CAAkB;AAExC;oEACoE;AAC7D,wBAAW,GAAG,IAAI,AAAP,CAAQ;AAG1B;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAe,IAAI,CAAC,EAAE,CAAC;0CACpD;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAC7B;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAC3B;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAC1B;AAIjB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC;2CACnD;AAQX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;qDACrC;AAMrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAC1B;AAtCL,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CA0NxB"}
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
*
|
|
20
20
|
* @attr {'base'|'tinted'} background - Surface color of the card: `base` (default) on a plain page background, `tinted` when the card should stand out against a base surface
|
|
21
21
|
* @attr {string} accessible-label - Accessible name of the card; with `href`/`button` it names the link or button, otherwise the card region
|
|
22
|
-
* @attr {object} translations - Override translation keys (e.g. the "
|
|
22
|
+
* @attr {object} translations - Override translation keys (e.g. the "opent in nieuw tabblad" announcement)
|
|
23
23
|
* @attr {string} href - Makes the whole card a link to this URL (empty = no link)
|
|
24
|
-
* @attr {string} target - Link target for href (e.g. '_blank'); adjusts rel automatically and adds an "
|
|
24
|
+
* @attr {string} target - Link target for href (e.g. '_blank'); adjusts rel automatically and adds an "opent in nieuw tabblad" announcement for '_blank'. An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
|
|
25
25
|
* @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
26
26
|
* @attr {boolean} button - Makes the whole card a button; ignored when `href` is set
|
|
27
27
|
*
|
|
@@ -33,9 +33,11 @@ import { LitElement } from 'lit';
|
|
|
33
33
|
export type CardBackground = 'base' | 'tinted';
|
|
34
34
|
declare const NLDDCard_base: (abstract new (...args: any[]) => LitElement & {
|
|
35
35
|
translations: Partial<{
|
|
36
|
-
'components.card.
|
|
36
|
+
'components.card.link-hint-new-tab-lowercase-label': string;
|
|
37
|
+
'components.card.link-hint-external-lowercase-label': string;
|
|
38
|
+
'components.card.link-hint-external-new-tab-lowercase-label': string;
|
|
37
39
|
}>;
|
|
38
|
-
_t(key: "components.card.
|
|
40
|
+
_t(key: "components.card.link-hint-new-tab-lowercase-label" | "components.card.link-hint-external-lowercase-label" | "components.card.link-hint-external-new-tab-lowercase-label", vars?: Record<string, string | number>): string;
|
|
39
41
|
}) & typeof LitElement;
|
|
40
42
|
export declare class NLDDCard extends NLDDCard_base {
|
|
41
43
|
static styles: import("lit").CSSResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAQjC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAQjC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,CAAC;;;;;;;;;AAE/C,qBACa,QAAS,SAAQ,aAAkD;IAC/E,OAAgB,MAAM,0BAAc;IAGpC,UAAU,EAAE,cAAc,CAAU;IAGpC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC;;yCAEqC;IAErC,IAAI,SAAM;IAGV,MAAM,SAAM;IAGZ,GAAG,SAAM;IAET;;;uDAGmD;IAEnD,MAAM,UAAS;IAEf,OAAO,CAAC,YAAY,CAAS;IAE7B;;;8DAG0D;IAE1D,OAAO,CAAC,cAAc,CAAS;IAE/B,OAAO,CAAC,UAAU,CAKhB;IAEF,OAAO,CAAC,WAAW,CAEjB;IAEF;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc,CAOpB;IAEF,OAAO,CAAC,aAAa,CAInB;IAEO,iBAAiB;IAkBjB,OAAO,IAAI,IAAI;IAgBxB,aAAa,GAAI,GAAG,KAAK,KAAG,IAAI,CAI9B;IAEO,oBAAoB;IAQpB,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;CACD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const nlddCardTranslations: {
|
|
2
|
-
'components.card.
|
|
2
|
+
'components.card.link-hint-new-tab-lowercase-label': string;
|
|
3
|
+
'components.card.link-hint-external-lowercase-label': string;
|
|
4
|
+
'components.card.link-hint-external-new-tab-lowercase-label': string;
|
|
3
5
|
};
|
|
4
6
|
export type NLDDCardTranslations = typeof nlddCardTranslations;
|
|
5
7
|
//# sourceMappingURL=card.i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"card.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;CAIhC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export const nlddCardTranslations = {
|
|
2
|
-
'components.card.
|
|
2
|
+
'components.card.link-hint-new-tab-lowercase-label': 'opent in nieuw tabblad',
|
|
3
|
+
'components.card.link-hint-external-lowercase-label': 'andere website',
|
|
4
|
+
'components.card.link-hint-external-new-tab-lowercase-label': 'andere website, opent in nieuw tabblad',
|
|
3
5
|
};
|
|
4
6
|
//# sourceMappingURL=card.i18n.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.i18n.js","sourceRoot":"","sources":["../../../../src/components/layout/card/card.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,
|
|
1
|
+
{"version":3,"file":"card.i18n.js","sourceRoot":"","sources":["../../../../src/components/layout/card/card.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,mDAAmD,EAAE,wBAAwB;IAC7E,oDAAoD,EAAE,gBAAgB;IACtE,4DAA4D,EAAE,wCAAwC;CACtG,CAAC"}
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
*
|
|
20
20
|
* @attr {'base'|'tinted'} background - Surface color of the card: `base` (default) on a plain page background, `tinted` when the card should stand out against a base surface
|
|
21
21
|
* @attr {string} accessible-label - Accessible name of the card; with `href`/`button` it names the link or button, otherwise the card region
|
|
22
|
-
* @attr {object} translations - Override translation keys (e.g. the "
|
|
22
|
+
* @attr {object} translations - Override translation keys (e.g. the "opent in nieuw tabblad" announcement)
|
|
23
23
|
* @attr {string} href - Makes the whole card a link to this URL (empty = no link)
|
|
24
|
-
* @attr {string} target - Link target for href (e.g. '_blank'); adjusts rel automatically and adds an "
|
|
24
|
+
* @attr {string} target - Link target for href (e.g. '_blank'); adjusts rel automatically and adds an "opent in nieuw tabblad" announcement for '_blank'. An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
|
|
25
25
|
* @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
26
26
|
* @attr {boolean} button - Makes the whole card a button; ignored when `href` is set
|
|
27
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.template.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"card.template.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAI1C,wBAAgB,YAAY,CAAC,SAAS,EAAE,QAAQ,GAAG,cAAc,CAiDhE"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { html, nothing } from 'lit';
|
|
2
2
|
import { linkRel } from '../../../utilities/link-rel.js';
|
|
3
|
+
import { linkHintKey } from '../../../utilities/link-hint.js';
|
|
3
4
|
export function cardTemplate(component) {
|
|
4
|
-
// A
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
: '';
|
|
5
|
+
// A link to another website or a new tab says so (WCAG 2.1 SC 3.2.2).
|
|
6
|
+
const hintKey = linkHintKey(component.href, component.target);
|
|
7
|
+
const linkHint = hintKey ? component._t(`components.card.${hintKey}`) : '';
|
|
8
8
|
// The overlay control has no text, so its name comes from aria-label, with
|
|
9
|
-
// the
|
|
9
|
+
// the link hint appended. accessible-label names the link or button when
|
|
10
10
|
// the card is interactive, the article otherwise — so the card carries
|
|
11
11
|
// exactly one name.
|
|
12
|
-
const linkLabel = [component.accessibleLabel,
|
|
12
|
+
const linkLabel = [component.accessibleLabel, linkHint].filter(Boolean).join(', ') || nothing;
|
|
13
13
|
const isInteractive = Boolean(component.href) || component.button;
|
|
14
14
|
return html `
|
|
15
15
|
<article class="card"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.template.js","sourceRoot":"","sources":["../../../../src/components/layout/card/card.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"card.template.js","sourceRoot":"","sources":["../../../../src/components/layout/card/card.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,MAAM,UAAU,YAAY,CAAC,SAAmB;IAC/C,sEAAsE;IACtE,MAAM,OAAO,GAAG,WAAW,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,mBAAmB,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3E,2EAA2E;IAC3E,yEAAyE;IACzE,uEAAuE;IACvE,oBAAoB;IACpB,MAAM,SAAS,GAAG,CAAC,SAAS,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC;IAC9F,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC;IAClE,OAAO,IAAI,CAAA;;gBAEI,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,IAAI,OAAO,CAAC;;KAE3E,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;;YAEd,SAAS,CAAC,IAAI;cACZ,SAAS,CAAC,MAAM,IAAI,OAAO;WAC9B,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,OAAO;kBAC5C,SAAS;;IAEvB,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;;;kBAGZ,SAAS;;IAEvB,CAAC,CAAC,CAAC,OAAO;;;;;;mBAMK,SAAS,CAAC,aAAa;;;;;;;;;;;mBAWvB,SAAS,CAAC,aAAa;;;;;EAKxC,CAAC;AACH,CAAC"}
|
|
@@ -5,19 +5,23 @@
|
|
|
5
5
|
* Supports grid, stack, lanes and horizontal scroll layouts.
|
|
6
6
|
*
|
|
7
7
|
* Use it for a set of equal blocks, usually `nldd-card`s, instead of a CSS
|
|
8
|
-
* grid of your own: the collection sets the columns from `item-width` and
|
|
9
|
-
* available width, and the gap per breakpoint.
|
|
8
|
+
* grid of your own: the collection sets the columns from `item-min-width` and
|
|
9
|
+
* the available width, and the gap per breakpoint.
|
|
10
10
|
*
|
|
11
11
|
* In grid and stack modes, items are paginated via a load-more button. In
|
|
12
12
|
* horizontal scroll, the prev/next controls and the edge fade appear only when
|
|
13
|
-
* the items overflow the container.
|
|
13
|
+
* the items overflow the container. Use horizontal scroll for items that
|
|
14
|
+
* together serve one purpose, such as the events of one agenda; it is not a
|
|
15
|
+
* carousel for unrelated highlights, which the design guidelines advise
|
|
16
|
+
* against.
|
|
14
17
|
* With `lazy-load`, the next items are automatically loaded when
|
|
15
18
|
* the load-more button comes into view.
|
|
16
19
|
*
|
|
17
20
|
* @element nldd-collection
|
|
18
21
|
*
|
|
19
22
|
* @attr {string} layout - Layout mode: 'grid' | 'stack' | 'lanes' | 'horizontal-scroll' (default: 'grid')
|
|
20
|
-
* @attr {string} item-width -
|
|
23
|
+
* @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.
|
|
24
|
+
* @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.
|
|
21
25
|
* @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.
|
|
22
26
|
* @attr {string} sm-gap - Gap at sm, overriding `gap` there
|
|
23
27
|
* @attr {string} md-gap - Gap at md, overriding `gap` there
|
|
@@ -27,6 +31,10 @@
|
|
|
27
31
|
* @attr {boolean} show-load-more - Show load-more button in grid/stack (default: false)
|
|
28
32
|
* @attr {boolean} lazy-load - Automatically load more items when the button becomes visible
|
|
29
33
|
*
|
|
34
|
+
* @migration Items in horizontal scroll stop at 480px (or at `item-min-width` when that is wider) instead of filling the container.
|
|
35
|
+
* Set `item-max-width="100%"` where one or two items should still fill the row.
|
|
36
|
+
* @migration The `item-width` attribute has been renamed to `item-min-width`, because it was a minimum in every layout.
|
|
37
|
+
* Replace `item-width="320px"` with `item-min-width="320px"`.
|
|
30
38
|
* @migration The `load-more-label` attribute has been removed.
|
|
31
39
|
* Use `translations` property instead: `.translations=${{ 'components.collection.load-more-action': 'Show more' }}`
|
|
32
40
|
*
|
|
@@ -46,7 +54,8 @@ type Layout = 'grid' | 'stack' | 'lanes' | 'horizontal-scroll';
|
|
|
46
54
|
export declare class NLDDCollection extends LitElement {
|
|
47
55
|
static styles: import("lit").CSSResult;
|
|
48
56
|
layout: Layout;
|
|
49
|
-
|
|
57
|
+
itemMinWidth: string | undefined;
|
|
58
|
+
itemMaxWidth: string | undefined;
|
|
50
59
|
/** A step of the spacing scale, overriding the responsive default at every
|
|
51
60
|
* breakpoint. Unset keeps the default. */
|
|
52
61
|
gap: SpacingSize | undefined;
|
|
@@ -73,6 +82,8 @@ export declare class NLDDCollection extends LitElement {
|
|
|
73
82
|
private _resizeObserver;
|
|
74
83
|
private _scrollListenerAttached;
|
|
75
84
|
connectedCallback(): void;
|
|
85
|
+
static get observedAttributes(): string[];
|
|
86
|
+
attributeChangedCallback(name: string, old: string | null, value: string | null): void;
|
|
76
87
|
disconnectedCallback(): void;
|
|
77
88
|
updated(changedProperties: Map<string, unknown>): void;
|
|
78
89
|
private _setupScrollListeners;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/collection/collection.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/collection/collection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,E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pD,OAAO,CAAC,uBAAuB,CAAS;IAE/B,iBAAiB,IAAI,IAAI;IASlC,WAAoB,kBAAkB,IAAI,MAAM,EAAE,CAEjD;IAEQ,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQtF,oBAAoB,IAAI,IAAI;IAM5B,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IA4D/D,OAAO,CAAC,qBAAqB;IAgB7B,OAAO,CAAC,wBAAwB;IAYhC,aAAa,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAe7B,OAAO,CAAC,gBAAgB;IAQxB,SAAS,IAAI,IAAI;IAMjB,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAOD,SAAS,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI;IA2BzB,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,iBAAiB,EAAE,cAAc,CAAC;KAClC;CACD"}
|
|
@@ -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,GAAG,CAAC,CAAC;QAGhB,aAAQ,GAAG,IAAI,CAAC;QAGhB,WAAM,GAAG,KAAK,CAAC;QAGf,kBAAa,GAAG,KAAK,CAAC;QAGtB,mBAAc,GAAG,KAAK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,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,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+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,KAAK;;;;;;;uBAO/B,KAAK;;;;;;;4CAOgB,KAAK;;;;;;;4CAOL,KAAK,qBAAqB,KAAK;;;;;;;4CAO/B,KAAK
|
|
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,KAAK;;;;;;;uBAO/B,KAAK;;;;;;;4CAOgB,KAAK;;;;;;;4CAOL,KAAK,qBAAqB,KAAK;;;;;;;4CAO/B,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA8GvB,KAAK;;;;;;;;;;;;;;;0BAeL,KAAK,qBAAqB,KAAK;;;;;;;;;;;;;;;0BAe/B,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;0BAyBL,KAAK;;;;0BAIL,KAAK,qBAAqB,KAAK;;;;0BAI/B,KAAK;;;CAG9B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
/**
|
|
20
|
+
* Caps the radius at a third of the shortest side of the area it rounds, so a
|
|
21
|
+
* low hero (a single title without media, a small `media-height`) keeps a
|
|
22
|
+
* corner rather than turning into a drop. Fed by a ResizeObserver on the media
|
|
23
|
+
* and the panel; the panel's own limit only counts without media, where it is
|
|
24
|
+
* the whole hero. An area that is not shown measures zero and keeps its limit.
|
|
25
|
+
*/
|
|
26
|
+
export declare function limitCorner(host: HTMLElement, entries: readonly ResizeObserverEntry[]): void;
|
|
27
|
+
export declare function clearCornerLimits(host: HTMLElement): void;
|
|
28
|
+
export {};
|
|
29
|
+
//# 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;AAsDD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAqDlD;AAID;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,mBAAmB,EAAE,GAAG,IAAI,CAS5F;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAEzD"}
|