@nldd/design-system 0.8.98 → 0.8.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +320 -58
- package/dist/components/actions/button/button.d.ts +2 -2
- package/dist/components/actions/button/button.js +2 -2
- package/dist/components/actions/icon-button/icon-button.d.ts +2 -2
- package/dist/components/actions/icon-button/icon-button.js +2 -2
- package/dist/components/actions/menu/menu.d.ts +48 -5
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +138 -8
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.template.d.ts +4 -3
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +10 -5
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +1 -1
- package/dist/components/actions/split-button/split-button.js +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts +14 -3
- package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +45 -7
- package/dist/components/actions/toolbar/toolbar.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +15 -1
- package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
- package/dist/components/components.js +1495 -289
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.js +11 -7
- package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
- package/dist/components/content/text/text.d.ts +1 -1
- package/dist/components/content/text/text.js +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +55 -0
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/title/title.d.ts +16 -1
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +109 -0
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/title/title.styles.d.ts.map +1 -1
- package/dist/components/content/title/title.styles.js +39 -0
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/token/token.d.ts +1 -1
- package/dist/components/content/token/token.js +1 -1
- package/dist/components/content/visually-hidden/visually-hidden.d.ts +35 -0
- package/dist/components/content/visually-hidden/visually-hidden.d.ts.map +1 -0
- package/dist/components/content/visually-hidden/visually-hidden.js +45 -0
- package/dist/components/content/visually-hidden/visually-hidden.js.map +1 -0
- package/dist/components/content/visually-hidden/visually-hidden.styles.d.ts +2 -0
- package/dist/components/content/visually-hidden/visually-hidden.styles.d.ts.map +1 -0
- package/dist/components/content/visually-hidden/visually-hidden.styles.js +27 -0
- package/dist/components/content/visually-hidden/visually-hidden.styles.js.map +1 -0
- package/dist/components/content/visually-hidden/visually-hidden.template.d.ts +3 -0
- package/dist/components/content/visually-hidden/visually-hidden.template.d.ts.map +1 -0
- package/dist/components/content/visually-hidden/visually-hidden.template.js +7 -0
- package/dist/components/content/visually-hidden/visually-hidden.template.js.map +1 -0
- package/dist/components/{icon-button-CJIikwyu.js → icon-button-BtU8DX64.js} +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts +6 -0
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +6 -0
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/layout/card/card.d.ts +12 -1
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.js +29 -2
- package/dist/components/layout/card/card.js.map +1 -1
- package/dist/components/layout/card/card.styles.js +2 -2
- package/dist/components/layout/collection/collection.d.ts +16 -5
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +44 -10
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +7 -6
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +1 -1
- package/dist/components/layout/container/container.js +1 -1
- package/dist/components/layout/container/container.styles.d.ts.map +1 -1
- package/dist/components/layout/container/container.styles.js +4 -0
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts +20 -0
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.js +103 -0
- package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts +2 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js +132 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -0
- package/dist/components/layout/page-sections/hero/hero.d.ts +9 -5
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +15 -6
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/popover/popover.styles.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.styles.js +4 -0
- package/dist/components/layout/popover/popover.styles.js.map +1 -1
- package/dist/components/layout/window/window.d.ts +1 -1
- package/dist/components/layout/window/window.js +1 -1
- package/dist/components/lists-and-tables/table/table.d.ts +8 -5
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +19 -10
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.js +4 -0
- package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.template.js +5 -1
- package/dist/components/lists-and-tables/table/table.template.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +44 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js +132 -3
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +21 -2
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +1 -1
- package/dist/components/navigation/link/link.js +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +8 -2
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +20 -2
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js +8 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.d.ts +1 -1
- package/dist/components/navigation/pagination/pagination.js +1 -1
- package/dist/components/navigation/skip-link/skip-link.d.ts +12 -5
- package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.js +12 -5
- package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +71 -2
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.i18n.d.ts +5 -0
- package/dist/components/navigation/tab-bar/tab-bar.i18n.d.ts.map +1 -0
- package/dist/components/navigation/tab-bar/tab-bar.i18n.js +4 -0
- package/dist/components/navigation/tab-bar/tab-bar.i18n.js.map +1 -0
- package/dist/components/navigation/tab-bar/tab-bar.js +214 -23
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +68 -3
- package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.js +36 -5
- package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +7 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +16 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +13 -3
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +11 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +21 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts +62 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.js +86 -2
- package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notifications-area.d.ts +6 -0
- package/dist/components/status-and-feedback/notification/notifications-area.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notifications-area.js +16 -0
- package/dist/components/status-and-feedback/notification/notifications-area.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js +1 -1
- package/dist/css/rich-text.css +1 -1
- package/dist/css/variables.css +1 -0
- package/dist/nldd.min.js +1038 -637
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +1 -0
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +1 -0
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +1 -0
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/nl.generated.js +2 -0
- package/dist/translations/nl.generated.js.map +1 -1
- package/dist/translations/pap-AW.d.ts.map +1 -1
- package/dist/translations/pap-AW.js +1 -0
- package/dist/translations/pap-AW.js.map +1 -1
- package/dist/translations/pap-CW.d.ts.map +1 -1
- package/dist/translations/pap-CW.js +1 -0
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/vue.d.ts +66 -36
- package/package.json +6 -2
|
@@ -3,7 +3,7 @@ import { n as slottedReset, t as inheritedTextReset } from "./shadow-resets-CPa5
|
|
|
3
3
|
import { i as linkRel, n as setTranslations, r as translate, t as withTranslations } from "./with-translations-C8_0-9y8.js";
|
|
4
4
|
import { t as __decorate } from "./decorate-CO88j7Lc.js";
|
|
5
5
|
import { t as reflectNonDefault } from "./reflect-non-default-OLaK60rT.js";
|
|
6
|
-
import { i as PopupAnchorController, n as NLDDTooltip, r as NLDDActivityIndicator, t as NLDDIconButton } from "./icon-button-
|
|
6
|
+
import { i as PopupAnchorController, n as NLDDTooltip, r as NLDDActivityIndicator, t as NLDDIconButton } from "./icon-button-BtU8DX64.js";
|
|
7
7
|
import { t as NLDDIcon } from "./icon-D_ZGezHx.js";
|
|
8
8
|
import { n as isPointerMode, r as isTouchMode, t as isKeyboardMode } from "./input-modality-DhTeUxKi.js";
|
|
9
9
|
import { t as breakpoints } from "./breakpoints-CkxsiRgH.js";
|
|
@@ -645,7 +645,7 @@ function renderContent(component) {
|
|
|
645
645
|
` : nothing}
|
|
646
646
|
`;
|
|
647
647
|
}
|
|
648
|
-
function template$
|
|
648
|
+
function template$24(helpers) {
|
|
649
649
|
const content = renderContent(this);
|
|
650
650
|
const buttonClass = ["button", this.supportingText ? "has-supporting-text" : ""].filter(Boolean).join(" ");
|
|
651
651
|
const ariaExpanded = this.expandable || !!this.popupType ? String(this.expanded) : this.expanded ? "true" : nothing;
|
|
@@ -805,9 +805,9 @@ function DescribedBy(Base) {
|
|
|
805
805
|
* @attr {string} appearance - Visual style, color included: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-base' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted'. The inherit appearances derive their colors from currentColor, for buttons on colored surfaces; inherit-filled uses the surface color (--context-parent-background-color) as the label color, with a white/black contrast flip as a fallback.
|
|
806
806
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md'). 'lg' uses larger text and 24px start/end icons.
|
|
807
807
|
* @attr {string} horizontal-alignment - Horizontal alignment of the button content: 'left' | 'center' | 'right' (default: unset, centered). Most visible with width="full" or a fixed width.
|
|
808
|
-
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width.
|
|
808
|
+
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width. Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
|
|
809
809
|
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
810
|
-
* @attr {boolean} disabled - Disabled state
|
|
810
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
811
811
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
812
812
|
* @attr {string} popovertarget - ID of a popover element this button invokes; forwarded to the inner button. Use the popoverTargetElement property instead when the popover lives in another tree.
|
|
813
813
|
* @attr {boolean} expandable - Whether the button has a icon to indicate it opens a menu or popover
|
|
@@ -937,7 +937,7 @@ var _NLDDButton = class NLDDButton extends DescribedBy(withTranslations(LitEleme
|
|
|
937
937
|
return this.shadowRoot?.querySelector("button, a") ?? null;
|
|
938
938
|
}
|
|
939
939
|
render() {
|
|
940
|
-
return template$
|
|
940
|
+
return template$24.call(this, { handleClick: this._handleClick.bind(this) });
|
|
941
941
|
}
|
|
942
942
|
};
|
|
943
943
|
var NLDDButton = (_NLDDButton.styles = buttonStyles, _NLDDButton.formAssociated = true, _NLDDButton);
|
|
@@ -1170,7 +1170,7 @@ var splitButtonStyles = css`
|
|
|
1170
1170
|
`;
|
|
1171
1171
|
//#endregion
|
|
1172
1172
|
//#region src/components/actions/split-button/split-button.template.ts
|
|
1173
|
-
function template$
|
|
1173
|
+
function template$23() {
|
|
1174
1174
|
return html`
|
|
1175
1175
|
<div class="split-button">
|
|
1176
1176
|
<nldd-button
|
|
@@ -1640,7 +1640,8 @@ function sanitizeUrl(url) {
|
|
|
1640
1640
|
//#region src/components/actions/menu/menu.template.ts
|
|
1641
1641
|
var menuRoleMap = {
|
|
1642
1642
|
menu: "menu",
|
|
1643
|
-
listbox: "listbox"
|
|
1643
|
+
listbox: "listbox",
|
|
1644
|
+
navigation: "list"
|
|
1644
1645
|
};
|
|
1645
1646
|
var itemRoleMap = {
|
|
1646
1647
|
button: {
|
|
@@ -1740,7 +1741,7 @@ function menuTemplate(isEmpty, variant) {
|
|
|
1740
1741
|
function menuItemTemplate(variant = null) {
|
|
1741
1742
|
const hasCheckState = this.type !== "button" && variant === "menu";
|
|
1742
1743
|
const hasCheckColumn = hasCheckState || this.checkColumn && variant === "menu";
|
|
1743
|
-
const role = variant ? itemRoleMap[this.type][variant] : nothing;
|
|
1744
|
+
const role = variant && variant !== "navigation" ? itemRoleMap[this.type][variant] : nothing;
|
|
1744
1745
|
const hasSubmenu = this._hasSubmenu;
|
|
1745
1746
|
const safeHref = sanitizeUrl(this.href) ?? "";
|
|
1746
1747
|
const asLink = !!safeHref && this.type === "button" && !hasSubmenu && !this.disabled;
|
|
@@ -1825,7 +1826,7 @@ function menuItemTemplate(variant = null) {
|
|
|
1825
1826
|
?disabled=${this.disabled}
|
|
1826
1827
|
aria-checked=${hasCheckState ? String(this.selected) : nothing}
|
|
1827
1828
|
aria-selected=${variant === "listbox" ? String(this.selected) : nothing}
|
|
1828
|
-
aria-haspopup=${hasSubmenu ? "menu" : nothing}
|
|
1829
|
+
aria-haspopup=${hasSubmenu && variant !== "navigation" ? "menu" : nothing}
|
|
1829
1830
|
aria-expanded=${hasSubmenu ? String(this._submenuOpen) : nothing}
|
|
1830
1831
|
aria-controls=${hasSubmenu && this._submenuEl?.id ? this._submenuEl.id : nothing}
|
|
1831
1832
|
.popoverTargetElement=${this._submenuEl}
|
|
@@ -1845,9 +1846,9 @@ function menuItemTemplate(variant = null) {
|
|
|
1845
1846
|
<slot></slot>
|
|
1846
1847
|
`;
|
|
1847
1848
|
}
|
|
1848
|
-
function menuDividerTemplate() {
|
|
1849
|
+
function menuDividerTemplate(variant = null) {
|
|
1849
1850
|
return html`<div class="menu__divider"
|
|
1850
|
-
role
|
|
1851
|
+
role=${variant === "navigation" ? "none" : "separator"}
|
|
1851
1852
|
></div>`;
|
|
1852
1853
|
}
|
|
1853
1854
|
function menuGroupTemplate(component) {
|
|
@@ -1858,7 +1859,7 @@ function menuGroupTemplate(component) {
|
|
|
1858
1859
|
aria-hidden="true"
|
|
1859
1860
|
>${component.text}</div>
|
|
1860
1861
|
<div class="menu__group-items"
|
|
1861
|
-
role
|
|
1862
|
+
role=${component.menuVariant === "navigation" ? "list" : "group"}
|
|
1862
1863
|
aria-labelledby=${component._titleId}
|
|
1863
1864
|
>
|
|
1864
1865
|
<slot></slot>
|
|
@@ -1991,7 +1992,7 @@ var iconCellStyles = css`
|
|
|
1991
1992
|
`;
|
|
1992
1993
|
//#endregion
|
|
1993
1994
|
//#region src/components/lists-and-tables/cells/icon-cell/icon-cell.template.ts
|
|
1994
|
-
function template$
|
|
1995
|
+
function template$22() {
|
|
1995
1996
|
return html`
|
|
1996
1997
|
<span
|
|
1997
1998
|
part="icon"
|
|
@@ -2030,7 +2031,7 @@ var _NLDDIconCell = class NLDDIconCell extends VisibilityMixin(LitElement, "cell
|
|
|
2030
2031
|
this.icon = "";
|
|
2031
2032
|
}
|
|
2032
2033
|
render() {
|
|
2033
|
-
return template$
|
|
2034
|
+
return template$22.call(this);
|
|
2034
2035
|
}
|
|
2035
2036
|
};
|
|
2036
2037
|
var NLDDIconCell = (_NLDDIconCell.styles = iconCellStyles, _NLDDIconCell);
|
|
@@ -2375,7 +2376,7 @@ function renderQueryMark(text, query, mode = "predictive") {
|
|
|
2375
2376
|
}
|
|
2376
2377
|
//#endregion
|
|
2377
2378
|
//#region src/components/lists-and-tables/cells/text-cell/text-cell.template.ts
|
|
2378
|
-
function template$
|
|
2379
|
+
function template$21() {
|
|
2379
2380
|
return html`
|
|
2380
2381
|
<p
|
|
2381
2382
|
class="text-cell__overline"
|
|
@@ -2515,7 +2516,7 @@ var _NLDDTextCell = class NLDDTextCell extends VisibilityMixin(LitElement, "cell
|
|
|
2515
2516
|
else this.style.removeProperty("--_text-cell-min-height");
|
|
2516
2517
|
}
|
|
2517
2518
|
render() {
|
|
2518
|
-
return template$
|
|
2519
|
+
return template$21.call(this);
|
|
2519
2520
|
}
|
|
2520
2521
|
};
|
|
2521
2522
|
var NLDDTextCell = (_NLDDTextCell.styles = [textCellStyles], _NLDDTextCell);
|
|
@@ -2725,7 +2726,7 @@ var keyboardShortcutStyles = css`
|
|
|
2725
2726
|
`;
|
|
2726
2727
|
//#endregion
|
|
2727
2728
|
//#region src/components/content/keyboard-shortcut/keyboard-shortcut.template.ts
|
|
2728
|
-
function template$
|
|
2729
|
+
function template$20(component) {
|
|
2729
2730
|
const keys = component._parsedKeys;
|
|
2730
2731
|
if (keys.length === 0) return html`
|
|
2731
2732
|
<kbd class="keyboard-shortcut">
|
|
@@ -2838,7 +2839,7 @@ var _NLDDKeyboardShortcut = class NLDDKeyboardShortcut extends LitElement {
|
|
|
2838
2839
|
return spec.replace(/\+\+\+/g, `+${MARKER}+`).split("+").map((k) => k.trim().replace(new RegExp(MARKER, "g"), "+")).filter(Boolean);
|
|
2839
2840
|
}
|
|
2840
2841
|
render() {
|
|
2841
|
-
return template$
|
|
2842
|
+
return template$20(this);
|
|
2842
2843
|
}
|
|
2843
2844
|
};
|
|
2844
2845
|
var NLDDKeyboardShortcut = (_NLDDKeyboardShortcut.styles = keyboardShortcutStyles, _NLDDKeyboardShortcut);
|
|
@@ -3077,7 +3078,7 @@ function inlineDialogTemplate(component) {
|
|
|
3077
3078
|
}
|
|
3078
3079
|
//#endregion
|
|
3079
3080
|
//#region src/components/actions/button-group/button-group.styles.ts
|
|
3080
|
-
var smMax$
|
|
3081
|
+
var smMax$21 = unsafeCSS(breakpoints.smMax);
|
|
3081
3082
|
var buttonGroupStyles = css`
|
|
3082
3083
|
:host {
|
|
3083
3084
|
box-sizing: border-box;
|
|
@@ -3129,7 +3130,7 @@ var buttonGroupStyles = css`
|
|
|
3129
3130
|
OR absent, and a rule that named it would have needed a second selector
|
|
3130
3131
|
beside it everywhere. */
|
|
3131
3132
|
|
|
3132
|
-
@container (max-width: ${smMax$
|
|
3133
|
+
@container (max-width: ${smMax$21}) {
|
|
3133
3134
|
:host(:not([orientation="horizontal"], [orientation="vertical"])) .button-group {
|
|
3134
3135
|
flex-direction: column;
|
|
3135
3136
|
--context-button-width: 100%;
|
|
@@ -3190,7 +3191,7 @@ var buttonGroupStyles = css`
|
|
|
3190
3191
|
`;
|
|
3191
3192
|
//#endregion
|
|
3192
3193
|
//#region src/components/actions/button-group/button-group.template.ts
|
|
3193
|
-
function template$
|
|
3194
|
+
function template$19() {
|
|
3194
3195
|
return html`
|
|
3195
3196
|
<div class="button-group">
|
|
3196
3197
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
@@ -3283,7 +3284,7 @@ var _NLDDButtonGroup = class NLDDButtonGroup extends LitElement {
|
|
|
3283
3284
|
this._collapseVerdict = 0;
|
|
3284
3285
|
}
|
|
3285
3286
|
render() {
|
|
3286
|
-
return template$
|
|
3287
|
+
return template$19.call(this);
|
|
3287
3288
|
}
|
|
3288
3289
|
};
|
|
3289
3290
|
var NLDDButtonGroup = (_NLDDButtonGroup.styles = buttonGroupStyles, _NLDDButtonGroup);
|
|
@@ -3416,18 +3417,30 @@ var _NLDDMenuDivider;
|
|
|
3416
3417
|
var _NLDDMenuGroup;
|
|
3417
3418
|
var _NLDDMenuItem;
|
|
3418
3419
|
var _NLDDMenu;
|
|
3420
|
+
/** Makes `host` a list item while its menu is a navigation menu, and takes
|
|
3421
|
+
* that back when it is not. A `listitem` the consumer set by hand on an item
|
|
3422
|
+
* goes too when the variant changes back; nothing else uses that role here. */
|
|
3423
|
+
function syncListItemRole(host, variant) {
|
|
3424
|
+
if (variant === "navigation") host.setAttribute("role", "listitem");
|
|
3425
|
+
else if (host.getAttribute("role") === "listitem") host.removeAttribute("role");
|
|
3426
|
+
}
|
|
3419
3427
|
/**
|
|
3420
3428
|
* A horizontal rule between groups of items in an `nldd-menu`.
|
|
3421
3429
|
*
|
|
3422
3430
|
* @element nldd-menu-divider
|
|
3423
3431
|
*/
|
|
3424
3432
|
var NLDDMenuDivider = class extends LitElement {
|
|
3433
|
+
constructor(..._args) {
|
|
3434
|
+
super(..._args);
|
|
3435
|
+
this.menuVariant = null;
|
|
3436
|
+
}
|
|
3425
3437
|
render() {
|
|
3426
|
-
return menuDividerTemplate();
|
|
3438
|
+
return menuDividerTemplate(this.menuVariant);
|
|
3427
3439
|
}
|
|
3428
3440
|
};
|
|
3429
3441
|
_NLDDMenuDivider = NLDDMenuDivider;
|
|
3430
3442
|
_NLDDMenuDivider.styles = menuDividerStyles;
|
|
3443
|
+
__decorate([state()], NLDDMenuDivider.prototype, "menuVariant", void 0);
|
|
3431
3444
|
if (!customElements.get("nldd-menu-divider")) customElements.define("nldd-menu-divider", NLDDMenuDivider);
|
|
3432
3445
|
/**
|
|
3433
3446
|
* A labeled group of menu items inside an nldd-menu. Wraps its slotted
|
|
@@ -3452,10 +3465,14 @@ if (!customElements.get("nldd-menu-divider")) customElements.define("nldd-menu-d
|
|
|
3452
3465
|
* @slot - nldd-menu-item children (the items belonging to this group).
|
|
3453
3466
|
*/
|
|
3454
3467
|
var NLDDMenuGroup = class NLDDMenuGroup extends LitElement {
|
|
3455
|
-
constructor(...
|
|
3456
|
-
super(...
|
|
3468
|
+
constructor(..._args2) {
|
|
3469
|
+
super(..._args2);
|
|
3457
3470
|
this.text = "";
|
|
3458
3471
|
this._titleId = `nldd-menu-group-title-${NLDDMenuGroup._idCounter++}`;
|
|
3472
|
+
this.menuVariant = null;
|
|
3473
|
+
}
|
|
3474
|
+
updated(changed) {
|
|
3475
|
+
if (changed.has("menuVariant")) syncListItemRole(this, this.menuVariant);
|
|
3459
3476
|
}
|
|
3460
3477
|
render() {
|
|
3461
3478
|
return menuGroupTemplate(this);
|
|
@@ -3468,6 +3485,7 @@ __decorate([property({
|
|
|
3468
3485
|
reflect: true,
|
|
3469
3486
|
converter: reflectNonDefault("")
|
|
3470
3487
|
})], NLDDMenuGroup.prototype, "text", void 0);
|
|
3488
|
+
__decorate([state()], NLDDMenuGroup.prototype, "menuVariant", void 0);
|
|
3471
3489
|
if (!customElements.get("nldd-menu-group")) customElements.define("nldd-menu-group", NLDDMenuGroup);
|
|
3472
3490
|
/**
|
|
3473
3491
|
* A single item within an nldd-menu.
|
|
@@ -3492,8 +3510,8 @@ if (!customElements.get("nldd-menu-group")) customElements.define("nldd-menu-gro
|
|
|
3492
3510
|
* @fires select - Fired when the item is clicked and not disabled.
|
|
3493
3511
|
*/
|
|
3494
3512
|
var NLDDMenuItem = class NLDDMenuItem extends LitElement {
|
|
3495
|
-
constructor(...
|
|
3496
|
-
super(...
|
|
3513
|
+
constructor(..._args3) {
|
|
3514
|
+
super(..._args3);
|
|
3497
3515
|
this.destructive = false;
|
|
3498
3516
|
this.text = "";
|
|
3499
3517
|
this.details = "";
|
|
@@ -3548,6 +3566,7 @@ var NLDDMenuItem = class NLDDMenuItem extends LitElement {
|
|
|
3548
3566
|
this._cachedSubmenuEl = this.querySelector(":scope > nldd-menu");
|
|
3549
3567
|
}
|
|
3550
3568
|
updated(changedProperties) {
|
|
3569
|
+
if (changedProperties.has("menuVariant")) syncListItemRole(this, this.menuVariant);
|
|
3551
3570
|
if (changedProperties.has("type") && changedProperties.get("type") !== void 0 && this.menuVariant) this.closest("nldd-menu")?._claimItems();
|
|
3552
3571
|
}
|
|
3553
3572
|
firstUpdated() {
|
|
@@ -3685,6 +3704,7 @@ var defaultFilterFn = (query, item) => {
|
|
|
3685
3704
|
*
|
|
3686
3705
|
* @element nldd-menu
|
|
3687
3706
|
*
|
|
3707
|
+
* @attr {'menu'|'listbox'|'navigation'} variant - What the menu is (default 'menu'). `menu` is a menu of actions: `role="menu"` with menu items, for things you do. `listbox` is the popup of a combobox: `role="listbox"` with options, focus stays in the field. `navigation` is a submenu in a site navigation: a list of links (`role="list"`, each item a list item around a real link), because a screen reader treats a menu as an application and reads a list of links as what it is. Every item takes an `href`. Tab reaches each link, the arrow keys, Home and End move between them, Escape closes and returns focus to the trigger, and the menu closes when focus leaves it. The trigger says `aria-expanded` and promises no menu. Checkbox and radio items, shortcuts and `filter()` belong to actions and warn in development here. A submenu of a navigation menu is a navigation menu too. The variant sets `role="listitem"` on its items and groups, and takes it off again when it changes back, also where you had set that role yourself.
|
|
3688
3708
|
* @attr {string} width - Explicit width, pinned exactly. Without it the menu sizes to its content between a minimum and a viewport-aware maximum (min(100vw - inset, 640px)).
|
|
3689
3709
|
* @attr {string} anchor - ID of the anchor element. Positions the menu against it AND makes it a toggle: the menu listens on document click and opens/closes itself when the click lands on the anchor. Use this for a menu hung off a button. For a menu you open yourself (a type-ahead under a text field, say), set the `anchorElement` property instead — same positioning, no toggle.
|
|
3690
3710
|
* @attr {string} placement - Floating UI placement. Default: 'bottom-start'.
|
|
@@ -3700,13 +3720,14 @@ var defaultFilterFn = (query, item) => {
|
|
|
3700
3720
|
* @slot empty - Shown when no items are visible. Defaults to `nldd-inline-dialog` driven by `empty-text` / `empty-supporting-text`. Slot content overrides the default dialog entirely.
|
|
3701
3721
|
*/
|
|
3702
3722
|
var NLDDMenu = class NLDDMenu extends LitElement {
|
|
3703
|
-
constructor(...
|
|
3704
|
-
super(...
|
|
3723
|
+
constructor(..._args4) {
|
|
3724
|
+
super(..._args4);
|
|
3705
3725
|
this.variant = "menu";
|
|
3706
3726
|
this.width = "";
|
|
3707
3727
|
this.anchor = "";
|
|
3708
3728
|
this.anchorElement = null;
|
|
3709
3729
|
this.placement = "bottom-start";
|
|
3730
|
+
this.anchorOffset = 0;
|
|
3710
3731
|
this.maxItems = 0;
|
|
3711
3732
|
this.emptyText = "";
|
|
3712
3733
|
this.emptySupportingText = "";
|
|
@@ -3737,6 +3758,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
3737
3758
|
this._isOpen = reallyOpen;
|
|
3738
3759
|
this._syncAnchorPopupState(reallyOpen);
|
|
3739
3760
|
};
|
|
3761
|
+
this._seededPopupType = null;
|
|
3740
3762
|
this._handleDocumentClick = (event) => {
|
|
3741
3763
|
if (this.anchorElement) return;
|
|
3742
3764
|
const collapsedByGesture = this._collapsedByPointerGesture;
|
|
@@ -3972,6 +3994,13 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
3972
3994
|
this._teardownOutsideTap();
|
|
3973
3995
|
};
|
|
3974
3996
|
this._handleKeydown = (event) => {
|
|
3997
|
+
if (event.key === "Tab" && this.variant === "navigation") {
|
|
3998
|
+
this._tabbing = true;
|
|
3999
|
+
clearTimeout(this._tabbingTimer);
|
|
4000
|
+
this._tabbingTimer = setTimeout(() => {
|
|
4001
|
+
this._tabbing = false;
|
|
4002
|
+
});
|
|
4003
|
+
}
|
|
3975
4004
|
const items = this._getVisibleItems();
|
|
3976
4005
|
if (items.length === 0) return;
|
|
3977
4006
|
const focusedDescendant = this.querySelector("nldd-menu-item[data-focused]");
|
|
@@ -4025,22 +4054,39 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4025
4054
|
this.hidePopover();
|
|
4026
4055
|
(this._isSubmenu ? this._parentItem : this._getAnchorEl())?.focus();
|
|
4027
4056
|
break;
|
|
4028
|
-
default: if (event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) this._handleTypeahead(event, items, index);
|
|
4057
|
+
default: if (this.variant !== "navigation" && event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) this._handleTypeahead(event, items, index);
|
|
4029
4058
|
}
|
|
4030
4059
|
};
|
|
4060
|
+
this._handleFocusOut = (event) => {
|
|
4061
|
+
if (this.variant !== "navigation") return;
|
|
4062
|
+
if (!this.matches(":popover-open")) return;
|
|
4063
|
+
const next = event.relatedTarget;
|
|
4064
|
+
if (next ? this.contains(next) || this._isAnchor(next) : !this._tabbing) return;
|
|
4065
|
+
this.hidePopover();
|
|
4066
|
+
};
|
|
4067
|
+
this._tabbing = false;
|
|
4031
4068
|
this._typeaheadBuffer = "";
|
|
4032
4069
|
this._typeaheadTimer = null;
|
|
4033
4070
|
this._claimItems = () => {
|
|
4071
|
+
if (this.variant === "navigation") Array.from(this.querySelectorAll("nldd-menu")).forEach((menu) => {
|
|
4072
|
+
menu.variant = "navigation";
|
|
4073
|
+
});
|
|
4034
4074
|
const items = Array.from(this.querySelectorAll("nldd-menu-item"));
|
|
4035
4075
|
items.forEach((item) => {
|
|
4036
4076
|
item.menuVariant = this.variant;
|
|
4037
4077
|
});
|
|
4078
|
+
Array.from(this.querySelectorAll("nldd-menu-divider, nldd-menu-group")).forEach((part) => {
|
|
4079
|
+
part.menuVariant = this.variant;
|
|
4080
|
+
});
|
|
4081
|
+
this._warnOnActionsInNavigation(items);
|
|
4038
4082
|
const own = items.filter((item) => item.closest("nldd-menu") === this);
|
|
4039
4083
|
const checkColumn = this.variant === "menu" && own.some((item) => item.type !== "button");
|
|
4040
4084
|
own.forEach((item) => {
|
|
4041
4085
|
item.checkColumn = checkColumn;
|
|
4042
4086
|
});
|
|
4043
4087
|
};
|
|
4088
|
+
this._warnedActionsInNavigation = false;
|
|
4089
|
+
this._warnedFilterInNavigation = false;
|
|
4044
4090
|
this._handleBeforeToggle = (event) => {
|
|
4045
4091
|
if (event.newState === "open") this.removeAttribute("positioned");
|
|
4046
4092
|
};
|
|
@@ -4049,6 +4095,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4049
4095
|
this._isOpen = toggleEvent.newState === "open";
|
|
4050
4096
|
this._syncAnchorPopupState(this._isOpen);
|
|
4051
4097
|
if (toggleEvent.newState !== "open") {
|
|
4098
|
+
this.anchorOffset = 0;
|
|
4052
4099
|
this._cleanupAutoUpdate?.();
|
|
4053
4100
|
this._cleanupAutoUpdate = null;
|
|
4054
4101
|
window.removeEventListener("resize", this._handleWindowResize);
|
|
@@ -4127,6 +4174,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4127
4174
|
});
|
|
4128
4175
|
}
|
|
4129
4176
|
updated(changedProperties) {
|
|
4177
|
+
if (changedProperties.has("anchorOffset") && this._isOpen) this.reposition();
|
|
4130
4178
|
if (changedProperties.has("width")) {
|
|
4131
4179
|
if (this.width) {
|
|
4132
4180
|
this.style.setProperty("--_menu-width", this.width);
|
|
@@ -4142,7 +4190,10 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4142
4190
|
if (this.maxItems > 0) this.style.setProperty("--_menu-max-items", String(this.maxItems));
|
|
4143
4191
|
else this.style.removeProperty("--_menu-max-items");
|
|
4144
4192
|
}
|
|
4145
|
-
if (changedProperties.has("variant"))
|
|
4193
|
+
if (changedProperties.has("variant")) {
|
|
4194
|
+
this._claimItems();
|
|
4195
|
+
if (changedProperties.get("variant") !== void 0) this._syncAnchorPopupState(this._isOpen);
|
|
4196
|
+
}
|
|
4146
4197
|
if (changedProperties.has("anchor") || changedProperties.has("anchorElement")) {
|
|
4147
4198
|
this._previousAnchorForResync?.removeEventListener("pointerdown", this._resyncAnchorFromPopoverState, true);
|
|
4148
4199
|
const anchor = this._getAnchorEl();
|
|
@@ -4175,7 +4226,11 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4175
4226
|
const anchor = this._getAnchorEl();
|
|
4176
4227
|
if (!anchor) return;
|
|
4177
4228
|
if ("expanded" in anchor) anchor.expanded = isOpen;
|
|
4178
|
-
if ("popupType" in anchor && !anchor.popupType
|
|
4229
|
+
if ("popupType" in anchor && (!anchor.popupType || anchor.popupType === this._seededPopupType)) {
|
|
4230
|
+
const wanted = this.variant === "navigation" ? "" : this.variant === "listbox" ? "listbox" : "menu";
|
|
4231
|
+
anchor.popupType = wanted;
|
|
4232
|
+
this._seededPopupType = wanted || null;
|
|
4233
|
+
}
|
|
4179
4234
|
if ("popoverTargetAction" in anchor) anchor.popoverTargetAction = isOpen ? "hide" : "show";
|
|
4180
4235
|
}
|
|
4181
4236
|
/**
|
|
@@ -4491,6 +4546,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4491
4546
|
this.addEventListener("beforetoggle", this._handleBeforeToggle);
|
|
4492
4547
|
this.addEventListener("toggle", this._handleToggle);
|
|
4493
4548
|
this.addEventListener("keydown", this._handleKeydown);
|
|
4549
|
+
this.addEventListener("focusout", this._handleFocusOut);
|
|
4494
4550
|
this.addEventListener("mouseenter", this._handleMenuItemMouseenter, true);
|
|
4495
4551
|
this.addEventListener("mouseleave", this._handleMouseleave);
|
|
4496
4552
|
this.addEventListener("menu-item-focused", this._handleMenuItemFocused);
|
|
@@ -4518,6 +4574,9 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4518
4574
|
this._previousAnchorForResync?.removeEventListener("pointerdown", this._resyncAnchorFromPopoverState, true);
|
|
4519
4575
|
this._previousAnchorForResync = null;
|
|
4520
4576
|
this.removeEventListener("keydown", this._handleKeydown);
|
|
4577
|
+
this.removeEventListener("focusout", this._handleFocusOut);
|
|
4578
|
+
clearTimeout(this._tabbingTimer);
|
|
4579
|
+
this._tabbing = false;
|
|
4521
4580
|
this.removeEventListener("mouseenter", this._handleMenuItemMouseenter, true);
|
|
4522
4581
|
this.removeEventListener("mouseleave", this._handleMouseleave);
|
|
4523
4582
|
this.removeEventListener("menu-item-focused", this._handleMenuItemFocused);
|
|
@@ -4691,7 +4750,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4691
4750
|
placement: effectivePlacement,
|
|
4692
4751
|
middleware: [
|
|
4693
4752
|
offset({
|
|
4694
|
-
mainAxis:
|
|
4753
|
+
mainAxis: this.anchorOffset,
|
|
4695
4754
|
alignmentAxis: -submenuPadding
|
|
4696
4755
|
}),
|
|
4697
4756
|
...drillIn ? [] : [flip({ padding: viewportMargin })],
|
|
@@ -4710,6 +4769,17 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4710
4769
|
});
|
|
4711
4770
|
}
|
|
4712
4771
|
/**
|
|
4772
|
+
* Whether focus went to the control that opens this menu. Closing here
|
|
4773
|
+
* would hand the click that follows a closed menu, and it would open it
|
|
4774
|
+
* again; the toggle on the anchor does the closing. The node arrives
|
|
4775
|
+
* retargeted, so an anchor inside a shadow root shows up as its host.
|
|
4776
|
+
*/
|
|
4777
|
+
_isAnchor(node) {
|
|
4778
|
+
const anchor = this._getAnchorEl();
|
|
4779
|
+
if (!anchor) return false;
|
|
4780
|
+
return node === anchor || anchor.contains(node) || anchor.getRootNode().host === node;
|
|
4781
|
+
}
|
|
4782
|
+
/**
|
|
4713
4783
|
* ARIA APG typeahead: characters typed within 500ms accumulate into a
|
|
4714
4784
|
* buffer; the menu jumps to the first item whose text starts with the
|
|
4715
4785
|
* buffer (case-insensitive).
|
|
@@ -4738,6 +4808,8 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4738
4808
|
}
|
|
4739
4809
|
}
|
|
4740
4810
|
}
|
|
4811
|
+
/** Checkable items and shortcuts belong to actions, not to a list of links. */
|
|
4812
|
+
_warnOnActionsInNavigation(items) {}
|
|
4741
4813
|
render() {
|
|
4742
4814
|
return menuTemplate.call(this, this._isEmpty, this.variant);
|
|
4743
4815
|
}
|
|
@@ -4767,6 +4839,7 @@ __decorate([property({
|
|
|
4767
4839
|
reflect: true,
|
|
4768
4840
|
converter: reflectNonDefault("bottom-start")
|
|
4769
4841
|
})], NLDDMenu.prototype, "placement", void 0);
|
|
4842
|
+
__decorate([property({ attribute: false })], NLDDMenu.prototype, "anchorOffset", void 0);
|
|
4770
4843
|
__decorate([property({
|
|
4771
4844
|
type: Number,
|
|
4772
4845
|
attribute: "max-items"
|
|
@@ -4821,7 +4894,7 @@ if (!customElements.get("nldd-menu")) customElements.define("nldd-menu", NLDDMen
|
|
|
4821
4894
|
* @element nldd-split-button
|
|
4822
4895
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
|
|
4823
4896
|
* @attr {string} appearance - Visual style (default: 'neutral-tinted'; 'inherit-tinted' and 'inherit-filled' for a colored surface)
|
|
4824
|
-
* @attr {boolean} disabled - Disabled state
|
|
4897
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
4825
4898
|
* @attr {string} width - Width mode: 'full' (stretches to container) or any CSS length; the main action button fills the available space
|
|
4826
4899
|
* @attr {string} text - Button text for the primary action
|
|
4827
4900
|
* @attr {string} icon - Icon name shown before the text on the primary action button
|
|
@@ -4894,7 +4967,7 @@ var _NLDDSplitButton = class NLDDSplitButton extends LitElement {
|
|
|
4894
4967
|
}
|
|
4895
4968
|
}
|
|
4896
4969
|
render() {
|
|
4897
|
-
return template$
|
|
4970
|
+
return template$23.call(this);
|
|
4898
4971
|
}
|
|
4899
4972
|
};
|
|
4900
4973
|
var NLDDSplitButton = (_NLDDSplitButton.styles = splitButtonStyles, _NLDDSplitButton);
|
|
@@ -5054,7 +5127,7 @@ var buttonBarStyles = css`
|
|
|
5054
5127
|
`;
|
|
5055
5128
|
//#endregion
|
|
5056
5129
|
//#region src/components/actions/button-bar/button-bar.template.ts
|
|
5057
|
-
function template$
|
|
5130
|
+
function template$18() {
|
|
5058
5131
|
return html`
|
|
5059
5132
|
<div class="button-bar"
|
|
5060
5133
|
part="bar"
|
|
@@ -5195,7 +5268,7 @@ var NLDDButtonBar = (_NLDDButtonBar = class NLDDButtonBar extends LitElement {
|
|
|
5195
5268
|
}
|
|
5196
5269
|
_warnToggleButton() {}
|
|
5197
5270
|
render() {
|
|
5198
|
-
return template$
|
|
5271
|
+
return template$18.call(this);
|
|
5199
5272
|
}
|
|
5200
5273
|
}, _NLDDButtonBar.styles = buttonBarStyles, _NLDDButtonBar);
|
|
5201
5274
|
__decorate([property({
|
|
@@ -5361,6 +5434,8 @@ var toolbarItemStyles = css`
|
|
|
5361
5434
|
--_toolbar-item-max-width: none;
|
|
5362
5435
|
--_toolbar-item-min-width: 0px;
|
|
5363
5436
|
--_toolbar-item-width: auto;
|
|
5437
|
+
--_toolbar-item-preferred-width: auto;
|
|
5438
|
+
--_toolbar-item-shrunk-min-width: 0px;
|
|
5364
5439
|
--_toolbar-item-label-margin-top: var(--primitives-space-4);
|
|
5365
5440
|
|
|
5366
5441
|
display: inline-flex;
|
|
@@ -5384,6 +5459,17 @@ var toolbarItemStyles = css`
|
|
|
5384
5459
|
flex-basis: 0;
|
|
5385
5460
|
}
|
|
5386
5461
|
|
|
5462
|
+
:host([shrinkable]) {
|
|
5463
|
+
flex-basis: var(--_toolbar-item-preferred-width);
|
|
5464
|
+
}
|
|
5465
|
+
|
|
5466
|
+
:host([shrunk]) {
|
|
5467
|
+
min-width: var(--_toolbar-item-shrunk-min-width);
|
|
5468
|
+
max-width: var(--_toolbar-item-preferred-width);
|
|
5469
|
+
flex-grow: 1;
|
|
5470
|
+
flex-shrink: 1;
|
|
5471
|
+
}
|
|
5472
|
+
|
|
5387
5473
|
:host([hidden]) {
|
|
5388
5474
|
display: none;
|
|
5389
5475
|
}
|
|
@@ -5399,7 +5485,8 @@ var toolbarItemStyles = css`
|
|
|
5399
5485
|
}
|
|
5400
5486
|
|
|
5401
5487
|
:host([fluid]) .toolbar__item-content ::slotted(*),
|
|
5402
|
-
:host([solo-fluid]) .toolbar__item-content ::slotted(*)
|
|
5488
|
+
:host([solo-fluid]) .toolbar__item-content ::slotted(*),
|
|
5489
|
+
:host([shrinkable]) .toolbar__item-content ::slotted(*) {
|
|
5403
5490
|
width: 100%;
|
|
5404
5491
|
}
|
|
5405
5492
|
|
|
@@ -5615,7 +5702,7 @@ function toolbarTitleTemplate(component) {
|
|
|
5615
5702
|
<slot name="action"></slot>
|
|
5616
5703
|
`;
|
|
5617
5704
|
}
|
|
5618
|
-
function template$
|
|
5705
|
+
function template$17(component, hasCenterChildren, leftSpacerZero, rightSpacerZero, isSoloFluidItem, hasOverflow, menuOpen, label, centerOnly, t) {
|
|
5619
5706
|
return html`
|
|
5620
5707
|
<div class="toolbar"
|
|
5621
5708
|
role="toolbar"
|
|
@@ -5667,7 +5754,10 @@ var nlddToolbarTranslations = {
|
|
|
5667
5754
|
* menu for what does not fit. The toolbar measures itself: as the row runs out
|
|
5668
5755
|
* of room, items move into that menu, the lowest `priority` first, and items
|
|
5669
5756
|
* that share a priority move together. So the order in the HTML says where an
|
|
5670
|
-
* item sits, and `priority` says how long it stays.
|
|
5757
|
+
* item sits, and `priority` says how long it stays. An item holding a control
|
|
5758
|
+
* with its own overflow, such as nldd-tab-bar, first narrows down when its turn
|
|
5759
|
+
* comes, so that control moves what does not fit into its own menu, and only
|
|
5760
|
+
* then goes into the toolbar's menu.
|
|
5671
5761
|
*
|
|
5672
5762
|
* Every item carries its own alternative for the menu, an nldd-menu-item in its
|
|
5673
5763
|
* `overflow` slot. Without one the action is simply gone once the item
|
|
@@ -5678,7 +5768,7 @@ var nlddToolbarTranslations = {
|
|
|
5678
5768
|
* @element nldd-toolbar
|
|
5679
5769
|
* @attr {string} size - Toolbar size, propagated to all child controls: 'sm' | 'md' | 'lg' (default: 'md'). At 'lg' the overflow button (and lg-capable children like nldd-icon-button) stack their label below the icon.
|
|
5680
5770
|
* @attr {boolean} show-item-labels - When true, shows a text label below each toolbar item and the overflow button
|
|
5681
|
-
* @attr {string} label - Accessible
|
|
5771
|
+
* @attr {string} accessible-label - Accessible name of the toolbar. Only needed when multiple toolbars appear on the same page.
|
|
5682
5772
|
* @attr {object} translations - Override translation keys (e.g. the overflow button label); unset keys fall back to Dutch.
|
|
5683
5773
|
*
|
|
5684
5774
|
* @slot start - nldd-toolbar-item and nldd-toolbar-title elements placed at the start
|
|
@@ -5699,6 +5789,8 @@ var nlddToolbarTranslations = {
|
|
|
5699
5789
|
* @attr {boolean} fluid - Set by nldd-toolbar, not a consumer attribute: marks an item that grows or shrinks to fill space. Toggled synchronously during measurement, so it can appear or disappear between layout frames — do not style against it. It is not reflected as a JS property — read it with hasAttribute('fluid').
|
|
5700
5790
|
* @attr {boolean} solo-fluid - Set by nldd-toolbar, not a consumer attribute: the sole fluid item, allowed to shrink below its content. Same synchronous-toggle and property-read caveats as fluid.
|
|
5701
5791
|
* @attr {boolean} hidden - Set by nldd-toolbar, not a consumer attribute, when the item moves into the overflow menu. Same synchronous-toggle caveat.
|
|
5792
|
+
* @attr {boolean} shrinkable - Set by nldd-toolbar, not a consumer attribute: the item holds a control that overflows by itself (nldd-tab-bar), so it gets the width that control wants with everything shown. Same synchronous-toggle caveat.
|
|
5793
|
+
* @attr {boolean} shrunk - Set by nldd-toolbar, not a consumer attribute: a shrinkable item narrowed down to what its control needs at least, before it would move into the overflow menu. Same synchronous-toggle caveat.
|
|
5702
5794
|
*
|
|
5703
5795
|
* @slot - The control shown in the toolbar (e.g. nldd-icon-button)
|
|
5704
5796
|
* @slot overflow - Required: nldd-menu-item / nldd-menu-divider / nldd-menu-group children, shown in the overflow menu when this item overflows. Without them the action is gone on a narrow toolbar, and the item warns in development.
|
|
@@ -5854,7 +5946,7 @@ var NLDDToolbar = (_NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
5854
5946
|
super(..._args3);
|
|
5855
5947
|
this.size = "md";
|
|
5856
5948
|
this.showItemLabels = false;
|
|
5857
|
-
this.
|
|
5949
|
+
this.accessibleLabel = "";
|
|
5858
5950
|
this.translations = {};
|
|
5859
5951
|
this._menuOpen = false;
|
|
5860
5952
|
this._startChildren = [];
|
|
@@ -6158,6 +6250,7 @@ var NLDDToolbar = (_NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
6158
6250
|
itemChildren.forEach((child) => {
|
|
6159
6251
|
const host = child.element;
|
|
6160
6252
|
host.hidden = false;
|
|
6253
|
+
this._syncShrinkable(host);
|
|
6161
6254
|
if (host.hasAttribute("solo-fluid")) {
|
|
6162
6255
|
host.removeAttribute("solo-fluid");
|
|
6163
6256
|
host.toggleAttribute("fluid", child.isFluid);
|
|
@@ -6195,9 +6288,17 @@ var NLDDToolbar = (_NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
6195
6288
|
return !host.hidden && !host.hasAttribute("fluid") && !host.hasAttribute("solo-fluid") && !groupIds.has(c.id);
|
|
6196
6289
|
}).length === 0) break;
|
|
6197
6290
|
}
|
|
6291
|
+
const shrinkable = group.map((c) => c.element).filter((host) => host.hasAttribute("shrinkable"));
|
|
6292
|
+
if (shrinkable.length > 0) {
|
|
6293
|
+
shrinkable.forEach((host) => host.toggleAttribute("shrunk", true));
|
|
6294
|
+
itemsEl.offsetWidth;
|
|
6295
|
+
if (!isOverflowing()) break;
|
|
6296
|
+
}
|
|
6198
6297
|
for (const child of group) {
|
|
6199
6298
|
newOverflowIds.add(child.id);
|
|
6200
|
-
child.element
|
|
6299
|
+
const host = child.element;
|
|
6300
|
+
host.hidden = true;
|
|
6301
|
+
host.removeAttribute("shrunk");
|
|
6201
6302
|
}
|
|
6202
6303
|
itemsEl.offsetWidth;
|
|
6203
6304
|
}
|
|
@@ -6208,6 +6309,24 @@ var NLDDToolbar = (_NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
6208
6309
|
this._updateAreaVars();
|
|
6209
6310
|
}
|
|
6210
6311
|
/**
|
|
6312
|
+
* Gives an item whose control overflows by itself (nldd-tab-bar) the width
|
|
6313
|
+
* that control wants with everything shown, and remembers how narrow it can
|
|
6314
|
+
* get. Read on every measurement, because the control's content can change.
|
|
6315
|
+
*/
|
|
6316
|
+
_syncShrinkable(host) {
|
|
6317
|
+
host.removeAttribute("shrunk");
|
|
6318
|
+
const control = Array.from(host.children).find((el) => el.getAttribute("slot") !== "overflow");
|
|
6319
|
+
const widths = typeof control?._toolbarWidths === "function" ? control._toolbarWidths() : null;
|
|
6320
|
+
host.toggleAttribute("shrinkable", Boolean(widths));
|
|
6321
|
+
if (widths) {
|
|
6322
|
+
host.style.setProperty("--_toolbar-item-preferred-width", `${widths.preferred}px`);
|
|
6323
|
+
host.style.setProperty("--_toolbar-item-shrunk-min-width", `${widths.minimum}px`);
|
|
6324
|
+
} else {
|
|
6325
|
+
host.style.removeProperty("--_toolbar-item-preferred-width");
|
|
6326
|
+
host.style.removeProperty("--_toolbar-item-shrunk-min-width");
|
|
6327
|
+
}
|
|
6328
|
+
}
|
|
6329
|
+
/**
|
|
6211
6330
|
* Promotes a lone remaining fluid item — or a lone title when no items are
|
|
6212
6331
|
* visible — to the solo-fluid state so it grows to fill the row. In
|
|
6213
6332
|
* center-only mode the center-fill wrapper already grows the items, so item
|
|
@@ -6360,7 +6479,7 @@ var NLDDToolbar = (_NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
6360
6479
|
render() {
|
|
6361
6480
|
const visibleNonDivider = this._allHostChildren().filter((c) => !this._overflowIds.has(c.id));
|
|
6362
6481
|
const isSoloFluid = this._soloFluid || visibleNonDivider.length === 1 && (visibleNonDivider[0].type === "title" || visibleNonDivider[0].type === "item" && visibleNonDivider[0].isFluid);
|
|
6363
|
-
return template$
|
|
6482
|
+
return template$17(this, this._centerChildren.length > 0, this._leftSpacerZero, this._rightSpacerZero, isSoloFluid, this._pinnedOverflowItems.length > 0 || this._overflowIds.size > 0, this._menuOpen, this.accessibleLabel, this._centerOnly, (key) => this._t(key));
|
|
6364
6483
|
}
|
|
6365
6484
|
}, _NLDDToolbar.styles = toolbarStyles, _NLDDToolbar);
|
|
6366
6485
|
__decorate([property({
|
|
@@ -6373,9 +6492,10 @@ __decorate([property({
|
|
|
6373
6492
|
attribute: "show-item-labels"
|
|
6374
6493
|
})], NLDDToolbar.prototype, "showItemLabels", void 0);
|
|
6375
6494
|
__decorate([property({
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6495
|
+
reflect: true,
|
|
6496
|
+
attribute: "accessible-label",
|
|
6497
|
+
converter: reflectNonDefault("")
|
|
6498
|
+
})], NLDDToolbar.prototype, "accessibleLabel", void 0);
|
|
6379
6499
|
__decorate([property({ type: Object })], NLDDToolbar.prototype, "translations", void 0);
|
|
6380
6500
|
__decorate([state()], NLDDToolbar.prototype, "_menuOpen", void 0);
|
|
6381
6501
|
__decorate([state()], NLDDToolbar.prototype, "_startChildren", void 0);
|
|
@@ -6873,7 +6993,7 @@ __decorate([state()], NLDDAvatar.prototype, "_imageFailed", void 0);
|
|
|
6873
6993
|
NLDDAvatar = __decorate([customElement("nldd-avatar")], NLDDAvatar);
|
|
6874
6994
|
//#endregion
|
|
6875
6995
|
//#region src/components/content/blockquote/blockquote.styles.ts
|
|
6876
|
-
var smMax$
|
|
6996
|
+
var smMax$20 = unsafeCSS(breakpoints.smMax);
|
|
6877
6997
|
var blockquoteStyles = css`
|
|
6878
6998
|
:host {
|
|
6879
6999
|
box-sizing: border-box;
|
|
@@ -6887,13 +7007,13 @@ var blockquoteStyles = css`
|
|
|
6887
7007
|
--_blockquote-quote-font: var(--semantics-blockquotes-md-quote-font);
|
|
6888
7008
|
--_blockquote-attribution-font: var(--semantics-blockquotes-md-attribution-font);
|
|
6889
7009
|
|
|
6890
|
-
@media (max-width: ${smMax$
|
|
7010
|
+
@media (max-width: ${smMax$20}) {
|
|
6891
7011
|
--_blockquote-spacing: var(--semantics-blockquotes-sm-spacing);
|
|
6892
7012
|
--_blockquote-quote-font: var(--semantics-blockquotes-sm-quote-font);
|
|
6893
7013
|
--_blockquote-attribution-font: var(--semantics-blockquotes-sm-attribution-font);
|
|
6894
7014
|
}
|
|
6895
7015
|
|
|
6896
|
-
@container layout-container (max-width: ${smMax$
|
|
7016
|
+
@container layout-container (max-width: ${smMax$20}) {
|
|
6897
7017
|
--_blockquote-spacing: var(--semantics-blockquotes-sm-spacing);
|
|
6898
7018
|
--_blockquote-quote-font: var(--semantics-blockquotes-sm-quote-font);
|
|
6899
7019
|
--_blockquote-attribution-font: var(--semantics-blockquotes-sm-attribution-font);
|
|
@@ -6962,7 +7082,7 @@ var blockquoteStyles = css`
|
|
|
6962
7082
|
`;
|
|
6963
7083
|
//#endregion
|
|
6964
7084
|
//#region src/components/content/blockquote/blockquote.template.ts
|
|
6965
|
-
function template$
|
|
7085
|
+
function template$16(component) {
|
|
6966
7086
|
return html`
|
|
6967
7087
|
<blockquote class="blockquote"
|
|
6968
7088
|
cite=${component.cite || nothing}
|
|
@@ -7007,7 +7127,7 @@ var _NLDDBlockquote = class NLDDBlockquote extends LitElement {
|
|
|
7007
7127
|
};
|
|
7008
7128
|
}
|
|
7009
7129
|
render() {
|
|
7010
|
-
return template$
|
|
7130
|
+
return template$16(this);
|
|
7011
7131
|
}
|
|
7012
7132
|
};
|
|
7013
7133
|
var NLDDBlockquote = (_NLDDBlockquote.styles = blockquoteStyles, _NLDDBlockquote);
|
|
@@ -7192,8 +7312,8 @@ function avatarGroupTemplate(component) {
|
|
|
7192
7312
|
}
|
|
7193
7313
|
//#endregion
|
|
7194
7314
|
//#region src/components/layout/popover/popover.styles.ts
|
|
7195
|
-
var smMax$
|
|
7196
|
-
var mdMin$
|
|
7315
|
+
var smMax$19 = unsafeCSS(breakpoints.smMax);
|
|
7316
|
+
var mdMin$22 = unsafeCSS(breakpoints.mdMin);
|
|
7197
7317
|
var popoverStyles = css`
|
|
7198
7318
|
:host {
|
|
7199
7319
|
box-sizing: border-box;
|
|
@@ -7214,8 +7334,12 @@ var popoverStyles = css`
|
|
|
7214
7334
|
overflow: auto;
|
|
7215
7335
|
padding: 0;
|
|
7216
7336
|
isolation: isolate;
|
|
7337
|
+
/* Selectable again under a trigger that switches selection off for itself
|
|
7338
|
+
and everything in it, as nldd-button and nldd-menu-bar-item do. */
|
|
7339
|
+
-webkit-user-select: text;
|
|
7340
|
+
user-select: text;
|
|
7217
7341
|
|
|
7218
|
-
@media (max-width: ${smMax$
|
|
7342
|
+
@media (max-width: ${smMax$19}) {
|
|
7219
7343
|
position: fixed;
|
|
7220
7344
|
inset: auto 0 0 0;
|
|
7221
7345
|
border-radius: var(--semantics-overlays-corner-radius) var(--semantics-overlays-corner-radius) 0 0;
|
|
@@ -7229,7 +7353,7 @@ var popoverStyles = css`
|
|
|
7229
7353
|
overlay var(--semantics-sheets-bottom-animation-duration) allow-discrete;
|
|
7230
7354
|
}
|
|
7231
7355
|
|
|
7232
|
-
@media (min-width: ${mdMin$
|
|
7356
|
+
@media (min-width: ${mdMin$22}) {
|
|
7233
7357
|
position: absolute;
|
|
7234
7358
|
inset: unset;
|
|
7235
7359
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
@@ -7252,7 +7376,7 @@ var popoverStyles = css`
|
|
|
7252
7376
|
keeps it laid out so its size can be measured. The sm bottom-sheet is CSS-animated
|
|
7253
7377
|
and positioned, so it is excluded. The positioned attribute is set once
|
|
7254
7378
|
reposition() finishes and cleared on every re-open. */
|
|
7255
|
-
@media (min-width: ${mdMin$
|
|
7379
|
+
@media (min-width: ${mdMin$22}) {
|
|
7256
7380
|
:host(:popover-open:not([positioned])) {
|
|
7257
7381
|
visibility: hidden;
|
|
7258
7382
|
}
|
|
@@ -7265,7 +7389,7 @@ var popoverStyles = css`
|
|
|
7265
7389
|
}
|
|
7266
7390
|
|
|
7267
7391
|
:host(:popover-open) {
|
|
7268
|
-
@media (max-width: ${smMax$
|
|
7392
|
+
@media (max-width: ${smMax$19}) {
|
|
7269
7393
|
transform: translateY(0);
|
|
7270
7394
|
|
|
7271
7395
|
@starting-style {
|
|
@@ -7275,13 +7399,13 @@ var popoverStyles = css`
|
|
|
7275
7399
|
}
|
|
7276
7400
|
|
|
7277
7401
|
:host::backdrop {
|
|
7278
|
-
@media (max-width: ${smMax$
|
|
7402
|
+
@media (max-width: ${smMax$19}) {
|
|
7279
7403
|
background-color: var(--semantics-overlays-backdrop-color);
|
|
7280
7404
|
}
|
|
7281
7405
|
}
|
|
7282
7406
|
|
|
7283
7407
|
:host([sm-full-height]) {
|
|
7284
|
-
@media (max-width: ${smMax$
|
|
7408
|
+
@media (max-width: ${smMax$19}) {
|
|
7285
7409
|
height: calc(100dvh - var(--semantics-sheets-bottom-top-inset));
|
|
7286
7410
|
}
|
|
7287
7411
|
}
|
|
@@ -7765,10 +7889,10 @@ __decorate([property({
|
|
|
7765
7889
|
NLDDPopover = _NLDDPopover = __decorate([customElement("nldd-popover")], NLDDPopover);
|
|
7766
7890
|
//#endregion
|
|
7767
7891
|
//#region src/components/layout/container/container.styles.ts
|
|
7768
|
-
var smMax$
|
|
7769
|
-
var mdMin$
|
|
7770
|
-
var mdMax$
|
|
7771
|
-
var lgMin$
|
|
7892
|
+
var smMax$18 = unsafeCSS(breakpoints.smMax);
|
|
7893
|
+
var mdMin$21 = unsafeCSS(breakpoints.mdMin);
|
|
7894
|
+
var mdMax$14 = unsafeCSS(breakpoints.mdMax);
|
|
7895
|
+
var lgMin$15 = unsafeCSS(breakpoints.lgMin);
|
|
7772
7896
|
var containerStyles = css`
|
|
7773
7897
|
:host {
|
|
7774
7898
|
box-sizing: border-box;
|
|
@@ -7814,13 +7938,13 @@ var containerStyles = css`
|
|
|
7814
7938
|
container and anywhere else the viewport. Multicol reads the gap in three
|
|
7815
7939
|
rules, so the value is swapped here rather than declared in each. The
|
|
7816
7940
|
bare --_container-gap is what stands when neither set matches. */
|
|
7817
|
-
@media (max-width: ${smMax$
|
|
7818
|
-
@media (min-width: ${mdMin$
|
|
7819
|
-
@media (min-width: ${lgMin$
|
|
7941
|
+
@media (max-width: ${smMax$18}) { --_container-gap: var(--_container-sm-gap); }
|
|
7942
|
+
@media (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) { --_container-gap: var(--_container-md-gap); }
|
|
7943
|
+
@media (min-width: ${lgMin$15}) { --_container-gap: var(--_container-lg-gap); }
|
|
7820
7944
|
|
|
7821
|
-
@container layout-container (max-width: ${smMax$
|
|
7822
|
-
@container layout-container (min-width: ${mdMin$
|
|
7823
|
-
@container layout-container (min-width: ${lgMin$
|
|
7945
|
+
@container layout-container (max-width: ${smMax$18}) { --_container-gap: var(--_container-sm-gap); }
|
|
7946
|
+
@container layout-container (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) { --_container-gap: var(--_container-md-gap); }
|
|
7947
|
+
@container layout-container (min-width: ${lgMin$15}) { --_container-gap: var(--_container-lg-gap); }
|
|
7824
7948
|
|
|
7825
7949
|
display: block;
|
|
7826
7950
|
width: var(--_container-width);
|
|
@@ -7850,42 +7974,42 @@ var containerStyles = css`
|
|
|
7850
7974
|
padding-bottom: var(--_container-padding-bottom);
|
|
7851
7975
|
padding-left: var(--_container-padding-left);
|
|
7852
7976
|
|
|
7853
|
-
@media (max-width: ${smMax$
|
|
7977
|
+
@media (max-width: ${smMax$18}) {
|
|
7854
7978
|
padding-top: var(--_container-sm-padding-top);
|
|
7855
7979
|
padding-right: var(--_container-sm-padding-right);
|
|
7856
7980
|
padding-bottom: var(--_container-sm-padding-bottom);
|
|
7857
7981
|
padding-left: var(--_container-sm-padding-left);
|
|
7858
7982
|
}
|
|
7859
7983
|
|
|
7860
|
-
@media (min-width: ${mdMin$
|
|
7984
|
+
@media (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) {
|
|
7861
7985
|
padding-top: var(--_container-md-padding-top);
|
|
7862
7986
|
padding-right: var(--_container-md-padding-right);
|
|
7863
7987
|
padding-bottom: var(--_container-md-padding-bottom);
|
|
7864
7988
|
padding-left: var(--_container-md-padding-left);
|
|
7865
7989
|
}
|
|
7866
7990
|
|
|
7867
|
-
@media (min-width: ${lgMin$
|
|
7991
|
+
@media (min-width: ${lgMin$15}) {
|
|
7868
7992
|
padding-top: var(--_container-lg-padding-top);
|
|
7869
7993
|
padding-right: var(--_container-lg-padding-right);
|
|
7870
7994
|
padding-bottom: var(--_container-lg-padding-bottom);
|
|
7871
7995
|
padding-left: var(--_container-lg-padding-left);
|
|
7872
7996
|
}
|
|
7873
7997
|
|
|
7874
|
-
@container layout-container (max-width: ${smMax$
|
|
7998
|
+
@container layout-container (max-width: ${smMax$18}) {
|
|
7875
7999
|
padding-top: var(--_container-sm-padding-top);
|
|
7876
8000
|
padding-right: var(--_container-sm-padding-right);
|
|
7877
8001
|
padding-bottom: var(--_container-sm-padding-bottom);
|
|
7878
8002
|
padding-left: var(--_container-sm-padding-left);
|
|
7879
8003
|
}
|
|
7880
8004
|
|
|
7881
|
-
@container layout-container (min-width: ${mdMin$
|
|
8005
|
+
@container layout-container (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) {
|
|
7882
8006
|
padding-top: var(--_container-md-padding-top);
|
|
7883
8007
|
padding-right: var(--_container-md-padding-right);
|
|
7884
8008
|
padding-bottom: var(--_container-md-padding-bottom);
|
|
7885
8009
|
padding-left: var(--_container-md-padding-left);
|
|
7886
8010
|
}
|
|
7887
8011
|
|
|
7888
|
-
@container layout-container (min-width: ${lgMin$
|
|
8012
|
+
@container layout-container (min-width: ${lgMin$15}) {
|
|
7889
8013
|
padding-top: var(--_container-lg-padding-top);
|
|
7890
8014
|
padding-right: var(--_container-lg-padding-right);
|
|
7891
8015
|
padding-bottom: var(--_container-lg-padding-bottom);
|
|
@@ -7893,6 +8017,10 @@ var containerStyles = css`
|
|
|
7893
8017
|
}
|
|
7894
8018
|
}
|
|
7895
8019
|
|
|
8020
|
+
:host([width="fit-content"]) .container {
|
|
8021
|
+
container-type: normal;
|
|
8022
|
+
}
|
|
8023
|
+
|
|
7896
8024
|
|
|
7897
8025
|
/* # Inner — actual layout */
|
|
7898
8026
|
|
|
@@ -7991,7 +8119,7 @@ var containerStyles = css`
|
|
|
7991
8119
|
|
|
7992
8120
|
/* # Column count — sm scope (queries :host own width) */
|
|
7993
8121
|
|
|
7994
|
-
@container (max-width: ${smMax$
|
|
8122
|
+
@container (max-width: ${smMax$18}) {
|
|
7995
8123
|
:host([sm-column-count="1"]) .container__inner { --_container-column-count: 1; }
|
|
7996
8124
|
:host([sm-column-count="2"]) .container__inner { --_container-column-count: 2; }
|
|
7997
8125
|
:host([sm-column-count="3"]) .container__inner { --_container-column-count: 3; }
|
|
@@ -8006,7 +8134,7 @@ var containerStyles = css`
|
|
|
8006
8134
|
|
|
8007
8135
|
/* # Column count — md scope */
|
|
8008
8136
|
|
|
8009
|
-
@container (min-width: ${mdMin$
|
|
8137
|
+
@container (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) {
|
|
8010
8138
|
:host([md-column-count="1"]) .container__inner { --_container-column-count: 1; }
|
|
8011
8139
|
:host([md-column-count="2"]) .container__inner { --_container-column-count: 2; }
|
|
8012
8140
|
:host([md-column-count="3"]) .container__inner { --_container-column-count: 3; }
|
|
@@ -8021,7 +8149,7 @@ var containerStyles = css`
|
|
|
8021
8149
|
|
|
8022
8150
|
/* # Column count — lg scope */
|
|
8023
8151
|
|
|
8024
|
-
@container (min-width: ${lgMin$
|
|
8152
|
+
@container (min-width: ${lgMin$15}) {
|
|
8025
8153
|
:host([lg-column-count="1"]) .container__inner { --_container-column-count: 1; }
|
|
8026
8154
|
:host([lg-column-count="2"]) .container__inner { --_container-column-count: 2; }
|
|
8027
8155
|
:host([lg-column-count="3"]) .container__inner { --_container-column-count: 3; }
|
|
@@ -8046,15 +8174,15 @@ var containerStyles = css`
|
|
|
8046
8174
|
order: var(--_container-slot-order, 0);
|
|
8047
8175
|
}
|
|
8048
8176
|
|
|
8049
|
-
@container (max-width: ${smMax$
|
|
8177
|
+
@container (max-width: ${smMax$18}) {
|
|
8050
8178
|
::slotted(*) { order: var(--_container-slot-sm-order, var(--_container-slot-order, 0)); }
|
|
8051
8179
|
}
|
|
8052
8180
|
|
|
8053
|
-
@container (min-width: ${mdMin$
|
|
8181
|
+
@container (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) {
|
|
8054
8182
|
::slotted(*) { order: var(--_container-slot-md-order, var(--_container-slot-order, 0)); }
|
|
8055
8183
|
}
|
|
8056
8184
|
|
|
8057
|
-
@container (min-width: ${lgMin$
|
|
8185
|
+
@container (min-width: ${lgMin$15}) {
|
|
8058
8186
|
::slotted(*) { order: var(--_container-slot-lg-order, var(--_container-slot-order, 0)); }
|
|
8059
8187
|
}
|
|
8060
8188
|
`;
|
|
@@ -8189,7 +8317,7 @@ function spacingToValue(value, element, attribute) {
|
|
|
8189
8317
|
* @attr {number} sm-column-count - Column count when this container is sm-wide
|
|
8190
8318
|
* @attr {number} md-column-count - Column count when this container is md-wide
|
|
8191
8319
|
* @attr {number} lg-column-count - Column count when this container is lg-wide
|
|
8192
|
-
* @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.
|
|
8320
|
+
* @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.
|
|
8193
8321
|
* @attr {string} min-width - Minimum width as a CSS length (e.g. '280px')
|
|
8194
8322
|
* @attr {string} max-width - Maximum width as a CSS length (e.g. '480px')
|
|
8195
8323
|
* @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.
|
|
@@ -8925,7 +9053,7 @@ var listStyles = css`
|
|
|
8925
9053
|
`;
|
|
8926
9054
|
//#endregion
|
|
8927
9055
|
//#region src/components/lists-and-tables/list/list.template.ts
|
|
8928
|
-
var template$
|
|
9056
|
+
var template$15 = ({ itemsLabel, hasToolbar, type, isEmpty, hasItems, hasEmptyState, hasNoResultsState, listbox }) => {
|
|
8929
9057
|
const isNavigation = type === "navigation";
|
|
8930
9058
|
const isListbox = type === "listbox";
|
|
8931
9059
|
const skipItemsLabel = isNavigation || isListbox;
|
|
@@ -9860,7 +9988,7 @@ var NLDDList = (_NLDDList2 = class NLDDList extends LitElement {
|
|
|
9860
9988
|
}));
|
|
9861
9989
|
}
|
|
9862
9990
|
render() {
|
|
9863
|
-
return template$
|
|
9991
|
+
return template$15({
|
|
9864
9992
|
itemsLabel: this.accessibleLabel || this._t("components.list.items-accessible-label"),
|
|
9865
9993
|
hasToolbar: this._hasToolbar,
|
|
9866
9994
|
type: this.type,
|
|
@@ -10336,7 +10464,7 @@ var listItemStyles = css`
|
|
|
10336
10464
|
//#region src/components/lists-and-tables/list-item/list-item.template.ts
|
|
10337
10465
|
var content = html`<slot></slot>`;
|
|
10338
10466
|
var divider = html`<div class="list-item__divider"></div>`;
|
|
10339
|
-
var template$
|
|
10467
|
+
var template$14 = (button, href, target, rel, opensInNewTabLabel, actionTabindex, isHighlighted = false, checkbox = false, radio = false, checked = false, expanded, showChildren = false, hasCheckedSegment = false, disabled = false, childrenRole = "group", childrenOpen = expanded === true) => {
|
|
10340
10468
|
const ariaExpanded = expanded === void 0 ? nothing : String(expanded);
|
|
10341
10469
|
const children = showChildren ? html`<div class="list-item__children"
|
|
10342
10470
|
role=${childrenRole}
|
|
@@ -11075,7 +11203,7 @@ var NLDDListItem = (_NLDDListItem2 = class NLDDListItem extends withTranslations
|
|
|
11075
11203
|
render() {
|
|
11076
11204
|
const opensInNewTabLabel = this.href && this.target === "_blank" ? this._t("components.list-item.opens-in-new-tab-label") : void 0;
|
|
11077
11205
|
const actionTabindex = this._isListboxOption ? "-1" : this._arrowNavigation ? this._rovingActive ? "0" : "-1" : void 0;
|
|
11078
|
-
return template$
|
|
11206
|
+
return template$14(this.button, this.href, this.target, this.rel, opensInNewTabLabel, actionTabindex, this._highlighted, this.checkbox, this.radio, this.checked, this._resolvedExpanded, this._showChildren, this._hasCheckedSegment, this.disabled, this._parentType === "navigation" ? "list" : "group", this._childrenOpen);
|
|
11079
11207
|
}
|
|
11080
11208
|
}, _NLDDListItem = _NLDDListItem2, _NLDDListItem2.styles = [listItemStyles], _NLDDListItem2.SIZED_CELLS = "nldd-text-cell, nldd-drag-handle-cell", _NLDDListItem2);
|
|
11081
11209
|
__decorate([property({
|
|
@@ -11234,7 +11362,7 @@ var cellStyles = css`
|
|
|
11234
11362
|
`;
|
|
11235
11363
|
//#endregion
|
|
11236
11364
|
//#region src/components/lists-and-tables/cells/cell/cell.template.ts
|
|
11237
|
-
var template$
|
|
11365
|
+
var template$13 = () => html`<slot></slot>`;
|
|
11238
11366
|
//#endregion
|
|
11239
11367
|
//#region src/components/lists-and-tables/cells/cell/cell.ts
|
|
11240
11368
|
/**
|
|
@@ -11285,7 +11413,7 @@ var _NLDDCell = class NLDDCell extends VisibilityMixin(LitElement, "cells-contai
|
|
|
11285
11413
|
else this.style.removeProperty("--_cell-min-height");
|
|
11286
11414
|
}
|
|
11287
11415
|
render() {
|
|
11288
|
-
return template$
|
|
11416
|
+
return template$13();
|
|
11289
11417
|
}
|
|
11290
11418
|
};
|
|
11291
11419
|
var NLDDCell = (_NLDDCell.styles = [cellStyles], _NLDDCell);
|
|
@@ -11440,7 +11568,7 @@ __decorate([state()], NLDDAvatarGroup.prototype, "_total", void 0);
|
|
|
11440
11568
|
NLDDAvatarGroup = __decorate([customElement("nldd-avatar-group")], NLDDAvatarGroup);
|
|
11441
11569
|
//#endregion
|
|
11442
11570
|
//#region src/components/content/identity/identity.styles.ts
|
|
11443
|
-
var smMax$
|
|
11571
|
+
var smMax$17 = unsafeCSS(breakpoints.smMax);
|
|
11444
11572
|
var identityStyles = css`
|
|
11445
11573
|
:host {
|
|
11446
11574
|
box-sizing: border-box;
|
|
@@ -11478,7 +11606,7 @@ var identityStyles = css`
|
|
|
11478
11606
|
}
|
|
11479
11607
|
|
|
11480
11608
|
.identity[data-multiple-avatars] {
|
|
11481
|
-
@container (max-width: ${smMax$
|
|
11609
|
+
@container (max-width: ${smMax$17}) {
|
|
11482
11610
|
flex-direction: column;
|
|
11483
11611
|
align-items: flex-start;
|
|
11484
11612
|
}
|
|
@@ -12036,20 +12164,25 @@ var codeViewerStyles = css`
|
|
|
12036
12164
|
box-shadow: var(--_code-viewer-border-shadow);
|
|
12037
12165
|
background-color: var(--_code-viewer-background-color);
|
|
12038
12166
|
min-width: 0;
|
|
12167
|
+
overflow: hidden;
|
|
12039
12168
|
flex-grow: 1;
|
|
12040
12169
|
flex-shrink: 1;
|
|
12041
12170
|
flex-basis: auto;
|
|
12042
|
-
padding: var(--_code-viewer-block-padding) var(--_code-viewer-inline-padding);
|
|
12043
12171
|
color: var(--_code-viewer-content-color);
|
|
12044
12172
|
font: var(--_code-viewer-font);
|
|
12045
12173
|
}
|
|
12046
12174
|
|
|
12047
|
-
/*
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12175
|
+
/* The scroller spans the whole box, so the padding sits on the content
|
|
12176
|
+
inside it. Three classes deep to beat CodeMirror's own theme. */
|
|
12177
|
+
.code-viewer .cm-scroller .cm-content {
|
|
12178
|
+
padding: var(--_code-viewer-block-padding) var(--_code-viewer-inline-padding);
|
|
12179
|
+
}
|
|
12180
|
+
|
|
12051
12181
|
:host(:not([no-copy]):not([copy-unavailable])) .code-viewer {
|
|
12052
12182
|
min-height: var(--_code-viewer-actions-area-size);
|
|
12183
|
+
}
|
|
12184
|
+
|
|
12185
|
+
:host(:not([no-copy]):not([copy-unavailable])) .code-viewer .cm-scroller .cm-content {
|
|
12053
12186
|
padding-right: var(--_code-viewer-actions-area-size);
|
|
12054
12187
|
}
|
|
12055
12188
|
|
|
@@ -12057,8 +12190,7 @@ var codeViewerStyles = css`
|
|
|
12057
12190
|
--_code-viewer-actions-area-padding: 0;
|
|
12058
12191
|
}
|
|
12059
12192
|
|
|
12060
|
-
:host([appearance="simple"]:not([no-copy]):not([copy-unavailable])) .code-viewer {
|
|
12061
|
-
min-height: var(--_code-viewer-actions-area-size);
|
|
12193
|
+
:host([appearance="simple"]:not([no-copy]):not([copy-unavailable])) .code-viewer .cm-scroller .cm-content {
|
|
12062
12194
|
padding-right: 0;
|
|
12063
12195
|
}
|
|
12064
12196
|
|
|
@@ -13695,7 +13827,7 @@ var tagStyles = css`
|
|
|
13695
13827
|
`;
|
|
13696
13828
|
//#endregion
|
|
13697
13829
|
//#region src/components/content/tag/tag.template.ts
|
|
13698
|
-
function template$
|
|
13830
|
+
function template$12(component) {
|
|
13699
13831
|
const variant = component._effectiveVariant;
|
|
13700
13832
|
const showIcon = variant === "icon" || variant === "icon-and-text" && component._hasIcon;
|
|
13701
13833
|
const showText = (variant === "text" || variant === "icon-and-text") && component._hasText;
|
|
@@ -13792,7 +13924,7 @@ var _NLDDTag = class NLDDTag extends LitElement {
|
|
|
13792
13924
|
}
|
|
13793
13925
|
updated() {}
|
|
13794
13926
|
render() {
|
|
13795
|
-
return template$
|
|
13927
|
+
return template$12(this);
|
|
13796
13928
|
}
|
|
13797
13929
|
};
|
|
13798
13930
|
var NLDDTag = (_NLDDTag.styles = tagStyles, _NLDDTag);
|
|
@@ -13834,6 +13966,19 @@ var textStyles = css`
|
|
|
13834
13966
|
--_text-max-width: var(--semantics-text-max-width);
|
|
13835
13967
|
--_text-color: var(--context-content-color, var(--semantics-content-color));
|
|
13836
13968
|
--_text-align: left;
|
|
13969
|
+
--_text-link-color: var(--semantics-links-color);
|
|
13970
|
+
--_text-link-is-hovered-color: var(--semantics-links-is-hovered-color);
|
|
13971
|
+
--_text-link-is-active-color: var(--semantics-links-is-active-color);
|
|
13972
|
+
--_text-link-underline-offset: var(--primitives-space-2);
|
|
13973
|
+
--_text-code-padding: var(--primitives-space-4);
|
|
13974
|
+
--_text-code-corner-radius: var(--semantics-controls-xs-corner-radius);
|
|
13975
|
+
--_text-code-background-color: var(--semantics-surfaces-tinted-background-color);
|
|
13976
|
+
--_text-code-font-family: var(--primitives-font-family-monospace);
|
|
13977
|
+
--_text-code-font-size: var(--semantics-code-inline-font-size);
|
|
13978
|
+
--_text-mark-padding: var(--primitives-space-1) var(--primitives-space-2);
|
|
13979
|
+
--_text-mark-corner-radius: var(--semantics-controls-xs-corner-radius);
|
|
13980
|
+
--_text-mark-background-color: var(--semantics-content-mark-background-color);
|
|
13981
|
+
--_text-mark-color: var(--semantics-content-mark-color);
|
|
13837
13982
|
|
|
13838
13983
|
display: block;
|
|
13839
13984
|
max-width: var(--_text-max-width);
|
|
@@ -13887,6 +14032,48 @@ var textStyles = css`
|
|
|
13887
14032
|
}
|
|
13888
14033
|
|
|
13889
14034
|
|
|
14035
|
+
/* # Inline elements */
|
|
14036
|
+
|
|
14037
|
+
::slotted(em),
|
|
14038
|
+
::slotted(i) {
|
|
14039
|
+
color: inherit;
|
|
14040
|
+
font-style: italic;
|
|
14041
|
+
}
|
|
14042
|
+
|
|
14043
|
+
::slotted(a) {
|
|
14044
|
+
color: var(--_text-link-color);
|
|
14045
|
+
text-decoration: underline;
|
|
14046
|
+
text-underline-offset: var(--_text-link-underline-offset);
|
|
14047
|
+
}
|
|
14048
|
+
|
|
14049
|
+
::slotted(a:hover) {
|
|
14050
|
+
color: var(--_text-link-is-hovered-color);
|
|
14051
|
+
}
|
|
14052
|
+
|
|
14053
|
+
::slotted(a:active) {
|
|
14054
|
+
color: var(--_text-link-is-active-color);
|
|
14055
|
+
}
|
|
14056
|
+
|
|
14057
|
+
:host([color="inherit"]) ::slotted(a) {
|
|
14058
|
+
color: currentColor;
|
|
14059
|
+
}
|
|
14060
|
+
|
|
14061
|
+
::slotted(code) {
|
|
14062
|
+
border-radius: var(--_text-code-corner-radius);
|
|
14063
|
+
background-color: var(--_text-code-background-color);
|
|
14064
|
+
padding: var(--_text-code-padding);
|
|
14065
|
+
font-family: var(--_text-code-font-family);
|
|
14066
|
+
font-size: var(--_text-code-font-size);
|
|
14067
|
+
}
|
|
14068
|
+
|
|
14069
|
+
::slotted(mark) {
|
|
14070
|
+
border-radius: var(--_text-mark-corner-radius);
|
|
14071
|
+
background-color: var(--_text-mark-background-color);
|
|
14072
|
+
padding: var(--_text-mark-padding);
|
|
14073
|
+
color: var(--_text-mark-color);
|
|
14074
|
+
}
|
|
14075
|
+
|
|
14076
|
+
|
|
13890
14077
|
/* # Line height */
|
|
13891
14078
|
|
|
13892
14079
|
:host([line-height="flat"]) {
|
|
@@ -13941,7 +14128,7 @@ var textStyles = css`
|
|
|
13941
14128
|
`;
|
|
13942
14129
|
//#endregion
|
|
13943
14130
|
//#region src/components/content/text/text.template.ts
|
|
13944
|
-
function template$
|
|
14131
|
+
function template$11() {
|
|
13945
14132
|
return html`
|
|
13946
14133
|
<slot></slot>
|
|
13947
14134
|
`;
|
|
@@ -13980,7 +14167,7 @@ function template$10() {
|
|
|
13980
14167
|
* @attr {string} color - Text color: 'content' (the default) | 'secondary' | 'accent' | 'success' | 'warning' | 'critical' | 'inherit'. 'content' and 'secondary' follow the surrounding content channel; 'inherit' takes the color it inherits, for text on a painted surface.
|
|
13981
14168
|
* @attr {string} horizontal-alignment - Alignment of the text within the block: 'left' | 'center' | 'right' (default: 'left'). Aligns the words; `horizontal-alignment` on nldd-container moves the box.
|
|
13982
14169
|
*
|
|
13983
|
-
* @slot - The text. Inline elements
|
|
14170
|
+
* @slot - The text. Inline elements look as they do in nldd-rich-text: `<strong>` and `<b>` take the bold weight from the scale, `<em>` and `<i>` are italic, `<a>` is an underlined link, `<code>` sits on a tinted surface in the monospace font, and `<mark>` is highlighted. This holds for elements directly in the text; one inside another (a link inside `<strong>`) keeps only the outer one's styling. Components such as `nldd-tag` are left alone.
|
|
13984
14171
|
*/
|
|
13985
14172
|
var _NLDDText = class NLDDText extends LitElement {
|
|
13986
14173
|
constructor(..._args) {
|
|
@@ -13992,7 +14179,7 @@ var _NLDDText = class NLDDText extends LitElement {
|
|
|
13992
14179
|
this.horizontalAlignment = "left";
|
|
13993
14180
|
}
|
|
13994
14181
|
render() {
|
|
13995
|
-
return template$
|
|
14182
|
+
return template$11();
|
|
13996
14183
|
}
|
|
13997
14184
|
};
|
|
13998
14185
|
var NLDDText = (_NLDDText.styles = textStyles, _NLDDText);
|
|
@@ -14021,10 +14208,10 @@ __decorate([property({
|
|
|
14021
14208
|
NLDDText = __decorate([customElement("nldd-text")], NLDDText);
|
|
14022
14209
|
//#endregion
|
|
14023
14210
|
//#region src/components/content/title/title.styles.ts
|
|
14024
|
-
var smMax$
|
|
14025
|
-
var mdMin$
|
|
14026
|
-
var mdMax$
|
|
14027
|
-
var lgMin$
|
|
14211
|
+
var smMax$16 = unsafeCSS(breakpoints.smMax);
|
|
14212
|
+
var mdMin$20 = unsafeCSS(breakpoints.mdMin);
|
|
14213
|
+
var mdMax$13 = unsafeCSS(breakpoints.mdMax);
|
|
14214
|
+
var lgMin$14 = unsafeCSS(breakpoints.lgMin);
|
|
14028
14215
|
var titleStyles = css`
|
|
14029
14216
|
:host {
|
|
14030
14217
|
box-sizing: border-box;
|
|
@@ -14034,27 +14221,34 @@ var titleStyles = css`
|
|
|
14034
14221
|
/* # Host */
|
|
14035
14222
|
|
|
14036
14223
|
:host {
|
|
14037
|
-
|
|
14224
|
+
--_title-sm-custom-size: initial;
|
|
14225
|
+
--_title-md-custom-size: initial;
|
|
14226
|
+
--_title-lg-custom-size: initial;
|
|
14227
|
+
--_title-sm-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-sm-custom-size), var(--primitives-font-size-700)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
|
|
14228
|
+
--_title-md-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-md-custom-size), var(--primitives-font-size-800)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
|
|
14229
|
+
--_title-lg-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-lg-custom-size), var(--primitives-font-size-1000)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
|
|
14230
|
+
|
|
14231
|
+
@media (max-width: ${smMax$16}) {
|
|
14038
14232
|
--_title-font: var(--primitives-font-display-3-sm);
|
|
14039
14233
|
}
|
|
14040
14234
|
|
|
14041
|
-
@media (min-width: ${mdMin$
|
|
14235
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14042
14236
|
--_title-font: var(--primitives-font-display-3-md);
|
|
14043
14237
|
}
|
|
14044
14238
|
|
|
14045
|
-
@media (min-width: ${lgMin$
|
|
14239
|
+
@media (min-width: ${lgMin$14}) {
|
|
14046
14240
|
--_title-font: var(--primitives-font-display-3-lg);
|
|
14047
14241
|
}
|
|
14048
14242
|
|
|
14049
|
-
@container layout-container (max-width: ${smMax$
|
|
14243
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14050
14244
|
--_title-font: var(--primitives-font-display-3-sm);
|
|
14051
14245
|
}
|
|
14052
14246
|
|
|
14053
|
-
@container layout-container (min-width: ${mdMin$
|
|
14247
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14054
14248
|
--_title-font: var(--primitives-font-display-3-md);
|
|
14055
14249
|
}
|
|
14056
14250
|
|
|
14057
|
-
@container layout-container (min-width: ${lgMin$
|
|
14251
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14058
14252
|
--_title-font: var(--primitives-font-display-3-lg);
|
|
14059
14253
|
}
|
|
14060
14254
|
|
|
@@ -14063,135 +14257,167 @@ var titleStyles = css`
|
|
|
14063
14257
|
}
|
|
14064
14258
|
|
|
14065
14259
|
:host([size="1"]) {
|
|
14066
|
-
@media (max-width: ${smMax$
|
|
14260
|
+
@media (max-width: ${smMax$16}) {
|
|
14067
14261
|
--_title-font: var(--primitives-font-display-1-sm);
|
|
14068
14262
|
}
|
|
14069
14263
|
|
|
14070
|
-
@media (min-width: ${mdMin$
|
|
14264
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14071
14265
|
--_title-font: var(--primitives-font-display-1-md);
|
|
14072
14266
|
}
|
|
14073
14267
|
|
|
14074
|
-
@media (min-width: ${lgMin$
|
|
14268
|
+
@media (min-width: ${lgMin$14}) {
|
|
14075
14269
|
--_title-font: var(--primitives-font-display-1-lg);
|
|
14076
14270
|
}
|
|
14077
14271
|
|
|
14078
|
-
@container layout-container (max-width: ${smMax$
|
|
14272
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14079
14273
|
--_title-font: var(--primitives-font-display-1-sm);
|
|
14080
14274
|
}
|
|
14081
14275
|
|
|
14082
|
-
@container layout-container (min-width: ${mdMin$
|
|
14276
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14083
14277
|
--_title-font: var(--primitives-font-display-1-md);
|
|
14084
14278
|
}
|
|
14085
14279
|
|
|
14086
|
-
@container layout-container (min-width: ${lgMin$
|
|
14280
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14087
14281
|
--_title-font: var(--primitives-font-display-1-lg);
|
|
14088
14282
|
}
|
|
14089
14283
|
}
|
|
14090
14284
|
|
|
14091
14285
|
:host([size="2"]) {
|
|
14092
|
-
@media (max-width: ${smMax$
|
|
14286
|
+
@media (max-width: ${smMax$16}) {
|
|
14093
14287
|
--_title-font: var(--primitives-font-display-2-sm);
|
|
14094
14288
|
}
|
|
14095
14289
|
|
|
14096
|
-
@media (min-width: ${mdMin$
|
|
14290
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14097
14291
|
--_title-font: var(--primitives-font-display-2-md);
|
|
14098
14292
|
}
|
|
14099
14293
|
|
|
14100
|
-
@media (min-width: ${lgMin$
|
|
14294
|
+
@media (min-width: ${lgMin$14}) {
|
|
14101
14295
|
--_title-font: var(--primitives-font-display-2-lg);
|
|
14102
14296
|
}
|
|
14103
14297
|
|
|
14104
|
-
@container layout-container (max-width: ${smMax$
|
|
14298
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14105
14299
|
--_title-font: var(--primitives-font-display-2-sm);
|
|
14106
14300
|
}
|
|
14107
14301
|
|
|
14108
|
-
@container layout-container (min-width: ${mdMin$
|
|
14302
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14109
14303
|
--_title-font: var(--primitives-font-display-2-md);
|
|
14110
14304
|
}
|
|
14111
14305
|
|
|
14112
|
-
@container layout-container (min-width: ${lgMin$
|
|
14306
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14113
14307
|
--_title-font: var(--primitives-font-display-2-lg);
|
|
14114
14308
|
}
|
|
14115
14309
|
}
|
|
14116
14310
|
|
|
14117
14311
|
:host([size="4"]) {
|
|
14118
|
-
@media (max-width: ${smMax$
|
|
14312
|
+
@media (max-width: ${smMax$16}) {
|
|
14119
14313
|
--_title-font: var(--primitives-font-display-4-sm);
|
|
14120
14314
|
}
|
|
14121
14315
|
|
|
14122
|
-
@media (min-width: ${mdMin$
|
|
14316
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14123
14317
|
--_title-font: var(--primitives-font-display-4-md);
|
|
14124
14318
|
}
|
|
14125
14319
|
|
|
14126
|
-
@media (min-width: ${lgMin$
|
|
14320
|
+
@media (min-width: ${lgMin$14}) {
|
|
14127
14321
|
--_title-font: var(--primitives-font-display-4-lg);
|
|
14128
14322
|
}
|
|
14129
14323
|
|
|
14130
|
-
@container layout-container (max-width: ${smMax$
|
|
14324
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14131
14325
|
--_title-font: var(--primitives-font-display-4-sm);
|
|
14132
14326
|
}
|
|
14133
14327
|
|
|
14134
|
-
@container layout-container (min-width: ${mdMin$
|
|
14328
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14135
14329
|
--_title-font: var(--primitives-font-display-4-md);
|
|
14136
14330
|
}
|
|
14137
14331
|
|
|
14138
|
-
@container layout-container (min-width: ${lgMin$
|
|
14332
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14139
14333
|
--_title-font: var(--primitives-font-display-4-lg);
|
|
14140
14334
|
}
|
|
14141
14335
|
}
|
|
14142
14336
|
|
|
14143
14337
|
:host([size="5"]) {
|
|
14144
|
-
@media (max-width: ${smMax$
|
|
14338
|
+
@media (max-width: ${smMax$16}) {
|
|
14145
14339
|
--_title-font: var(--primitives-font-display-5-sm);
|
|
14146
14340
|
}
|
|
14147
14341
|
|
|
14148
|
-
@media (min-width: ${mdMin$
|
|
14342
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14149
14343
|
--_title-font: var(--primitives-font-display-5-md);
|
|
14150
14344
|
}
|
|
14151
14345
|
|
|
14152
|
-
@media (min-width: ${lgMin$
|
|
14346
|
+
@media (min-width: ${lgMin$14}) {
|
|
14153
14347
|
--_title-font: var(--primitives-font-display-5-lg);
|
|
14154
14348
|
}
|
|
14155
14349
|
|
|
14156
|
-
@container layout-container (max-width: ${smMax$
|
|
14350
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14157
14351
|
--_title-font: var(--primitives-font-display-5-sm);
|
|
14158
14352
|
}
|
|
14159
14353
|
|
|
14160
|
-
@container layout-container (min-width: ${mdMin$
|
|
14354
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14161
14355
|
--_title-font: var(--primitives-font-display-5-md);
|
|
14162
14356
|
}
|
|
14163
14357
|
|
|
14164
|
-
@container layout-container (min-width: ${lgMin$
|
|
14358
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14165
14359
|
--_title-font: var(--primitives-font-display-5-lg);
|
|
14166
14360
|
}
|
|
14167
14361
|
}
|
|
14168
14362
|
|
|
14169
14363
|
:host([size="6"]) {
|
|
14170
|
-
@media (max-width: ${smMax$
|
|
14364
|
+
@media (max-width: ${smMax$16}) {
|
|
14171
14365
|
--_title-font: var(--primitives-font-display-6-sm);
|
|
14172
14366
|
}
|
|
14173
14367
|
|
|
14174
|
-
@media (min-width: ${mdMin$
|
|
14368
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14175
14369
|
--_title-font: var(--primitives-font-display-6-md);
|
|
14176
14370
|
}
|
|
14177
14371
|
|
|
14178
|
-
@media (min-width: ${lgMin$
|
|
14372
|
+
@media (min-width: ${lgMin$14}) {
|
|
14179
14373
|
--_title-font: var(--primitives-font-display-6-lg);
|
|
14180
14374
|
}
|
|
14181
14375
|
|
|
14182
|
-
@container layout-container (max-width: ${smMax$
|
|
14376
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14183
14377
|
--_title-font: var(--primitives-font-display-6-sm);
|
|
14184
14378
|
}
|
|
14185
14379
|
|
|
14186
|
-
@container layout-container (min-width: ${mdMin$
|
|
14380
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14187
14381
|
--_title-font: var(--primitives-font-display-6-md);
|
|
14188
14382
|
}
|
|
14189
14383
|
|
|
14190
|
-
@container layout-container (min-width: ${lgMin$
|
|
14384
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14191
14385
|
--_title-font: var(--primitives-font-display-6-lg);
|
|
14192
14386
|
}
|
|
14193
14387
|
}
|
|
14194
14388
|
|
|
14389
|
+
/* ## Custom size */
|
|
14390
|
+
|
|
14391
|
+
:host([data-sm-custom-size]) {
|
|
14392
|
+
@media (max-width: ${smMax$16}) {
|
|
14393
|
+
--_title-font: var(--_title-sm-custom-font);
|
|
14394
|
+
}
|
|
14395
|
+
|
|
14396
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14397
|
+
--_title-font: var(--_title-sm-custom-font);
|
|
14398
|
+
}
|
|
14399
|
+
}
|
|
14400
|
+
|
|
14401
|
+
:host([data-md-custom-size]) {
|
|
14402
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14403
|
+
--_title-font: var(--_title-md-custom-font);
|
|
14404
|
+
}
|
|
14405
|
+
|
|
14406
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14407
|
+
--_title-font: var(--_title-md-custom-font);
|
|
14408
|
+
}
|
|
14409
|
+
}
|
|
14410
|
+
|
|
14411
|
+
:host([data-lg-custom-size]) {
|
|
14412
|
+
@media (min-width: ${lgMin$14}) {
|
|
14413
|
+
--_title-font: var(--_title-lg-custom-font);
|
|
14414
|
+
}
|
|
14415
|
+
|
|
14416
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14417
|
+
--_title-font: var(--_title-lg-custom-font);
|
|
14418
|
+
}
|
|
14419
|
+
}
|
|
14420
|
+
|
|
14195
14421
|
:host([hidden]) {
|
|
14196
14422
|
display: none;
|
|
14197
14423
|
}
|
|
@@ -14365,6 +14591,9 @@ function titleTemplate(component) {
|
|
|
14365
14591
|
* @element nldd-title
|
|
14366
14592
|
*
|
|
14367
14593
|
* @attr {number} size - Visual size of the title: 1–6 (default: 3)
|
|
14594
|
+
* @attr {string} sm-custom-size - A size of your own at sm, any CSS length (e.g. '56px', '3.5rem', 'clamp(3rem, 8vw, 7rem)'), for a statement larger than size 1. A var() works when the variable holds a length; one that is not defined leaves the title without its size, the floor included. For headings use `size`; if a design does not fit the scale, raise it as an issue. Set per breakpoint on purpose: a breakpoint without one keeps the size from `size`, so a title made large for a wide screen never breaks a narrow one. Never smaller than size 1 at the same breakpoint: a smaller value shows as size 1, and a fixed length that is smaller says so in development (a relative value, such as vw, em or a percentage, is not checked there; the floor still holds). Takes the weight, typeface and line height of size 1. An invalid value falls back to `size`
|
|
14595
|
+
* @attr {string} md-custom-size - The same, at md
|
|
14596
|
+
* @attr {string} lg-custom-size - The same, at lg
|
|
14368
14597
|
* @attr {string} color - 'content' (the default) takes the system's own content
|
|
14369
14598
|
* colors. 'inherit' lets the title follow the text color of the surface
|
|
14370
14599
|
* instead (for colored areas such as the filled categories); overline and
|
|
@@ -14379,10 +14608,49 @@ function titleTemplate(component) {
|
|
|
14379
14608
|
* @slot supporting-text - Supporting text that is more than text. Takes the place of the supporting-text attribute.
|
|
14380
14609
|
* @slot end - Whatever belongs at the end of the title line: a button, a menu, a status badge, a version. Named for the position, not for a kind of content, because anything can sit there.
|
|
14381
14610
|
*/
|
|
14382
|
-
var _NLDDTitle
|
|
14611
|
+
var _NLDDTitle;
|
|
14612
|
+
var BREAKPOINTS = [
|
|
14613
|
+
"sm",
|
|
14614
|
+
"md",
|
|
14615
|
+
"lg"
|
|
14616
|
+
];
|
|
14617
|
+
/** The font size of size 1 per breakpoint: the floor of a custom size. */
|
|
14618
|
+
var SIZE_1_FONT_SIZE = {
|
|
14619
|
+
sm: "var(--primitives-font-size-700)",
|
|
14620
|
+
md: "var(--primitives-font-size-800)",
|
|
14621
|
+
lg: "var(--primitives-font-size-1000)"
|
|
14622
|
+
};
|
|
14623
|
+
/** Font-size values that are not a length: the CSS-wide keywords and the
|
|
14624
|
+
* absolute and relative size keywords. */
|
|
14625
|
+
var NOT_A_LENGTH = /* @__PURE__ */ new Set([
|
|
14626
|
+
"inherit",
|
|
14627
|
+
"initial",
|
|
14628
|
+
"unset",
|
|
14629
|
+
"revert",
|
|
14630
|
+
"revert-layer",
|
|
14631
|
+
"xx-small",
|
|
14632
|
+
"x-small",
|
|
14633
|
+
"small",
|
|
14634
|
+
"medium",
|
|
14635
|
+
"large",
|
|
14636
|
+
"x-large",
|
|
14637
|
+
"xx-large",
|
|
14638
|
+
"xxx-large",
|
|
14639
|
+
"larger",
|
|
14640
|
+
"smaller",
|
|
14641
|
+
"math"
|
|
14642
|
+
]);
|
|
14643
|
+
/** A length font-size takes. A keyword cannot go inside the max() that keeps the floor, so it would void the whole font. */
|
|
14644
|
+
function isFontSize(value) {
|
|
14645
|
+
return !NOT_A_LENGTH.has(value.toLowerCase()) && CSS.supports("font-size", value);
|
|
14646
|
+
}
|
|
14647
|
+
var NLDDTitle = (_NLDDTitle = class NLDDTitle extends LitElement {
|
|
14383
14648
|
constructor(..._args) {
|
|
14384
14649
|
super(..._args);
|
|
14385
14650
|
this.size = 3;
|
|
14651
|
+
this.smCustomSize = "";
|
|
14652
|
+
this.mdCustomSize = "";
|
|
14653
|
+
this.lgCustomSize = "";
|
|
14386
14654
|
this.color = "content";
|
|
14387
14655
|
this.text = "";
|
|
14388
14656
|
this.supportingText = "";
|
|
@@ -14398,17 +14666,81 @@ var _NLDDTitle = class NLDDTitle extends LitElement {
|
|
|
14398
14666
|
else if (slot.name === "supporting-text") this._hasSupportingTextSlotted = hasContent;
|
|
14399
14667
|
else this._hasDefaultSlotted = hasContent;
|
|
14400
14668
|
};
|
|
14669
|
+
this._customSizes = {};
|
|
14670
|
+
this._warned = /* @__PURE__ */ new Set();
|
|
14401
14671
|
}
|
|
14402
14672
|
firstUpdated() {}
|
|
14673
|
+
willUpdate(changed) {
|
|
14674
|
+
super.willUpdate(changed);
|
|
14675
|
+
if (!changed.has("smCustomSize") && !changed.has("mdCustomSize") && !changed.has("lgCustomSize")) return;
|
|
14676
|
+
if (typeof CSS === "undefined") return;
|
|
14677
|
+
const own = {
|
|
14678
|
+
sm: this.smCustomSize,
|
|
14679
|
+
md: this.mdCustomSize,
|
|
14680
|
+
lg: this.lgCustomSize
|
|
14681
|
+
};
|
|
14682
|
+
this._customSizes = {};
|
|
14683
|
+
for (const breakpoint of BREAKPOINTS) {
|
|
14684
|
+
const value = (own[breakpoint] || "").trim();
|
|
14685
|
+
const valid = value !== "" && isFontSize(value);
|
|
14686
|
+
if (valid) {
|
|
14687
|
+
this._customSizes[breakpoint] = value;
|
|
14688
|
+
this.style.setProperty(`--_title-${breakpoint}-custom-size`, value);
|
|
14689
|
+
} else this.style.removeProperty(`--_title-${breakpoint}-custom-size`);
|
|
14690
|
+
this.toggleAttribute(`data-${breakpoint}-custom-size`, valid);
|
|
14691
|
+
}
|
|
14692
|
+
}
|
|
14693
|
+
updated(changed) {
|
|
14694
|
+
super.updated(changed);
|
|
14695
|
+
}
|
|
14696
|
+
_warnOnce(key, message) {
|
|
14697
|
+
if (this._warned.has(key)) return;
|
|
14698
|
+
this._warned.add(key);
|
|
14699
|
+
console.warn(message, this);
|
|
14700
|
+
}
|
|
14701
|
+
/** DEV-only: says so when a custom size is smaller than size 1, which then shows instead. */
|
|
14702
|
+
_checkFloor(sizes) {
|
|
14703
|
+
if (!this.shadowRoot || Object.keys(sizes).length === 0) return;
|
|
14704
|
+
const probe = document.createElement("span");
|
|
14705
|
+
probe.style.position = "absolute";
|
|
14706
|
+
probe.style.visibility = "hidden";
|
|
14707
|
+
this.shadowRoot.append(probe);
|
|
14708
|
+
const px = (value) => {
|
|
14709
|
+
probe.style.fontSize = value;
|
|
14710
|
+
return parseFloat(getComputedStyle(probe).fontSize);
|
|
14711
|
+
};
|
|
14712
|
+
try {
|
|
14713
|
+
for (const [breakpoint, value] of Object.entries(sizes)) {
|
|
14714
|
+
if (/%|\d(?:v[whib]|vmin|vmax|cq[whib]|cqmin|cqmax|em|ex|ch|cap|ic|lh)\b/.test(value)) continue;
|
|
14715
|
+
if (px(value) < px(SIZE_1_FONT_SIZE[breakpoint]) - .5) this._warnOnce(`floor-${breakpoint}-${value}`, `<nldd-title>: custom size "${value}" is smaller than size 1 at ${breakpoint} and shows as size 1. Use size for headings up to size 1.`);
|
|
14716
|
+
}
|
|
14717
|
+
} finally {
|
|
14718
|
+
probe.remove();
|
|
14719
|
+
}
|
|
14720
|
+
}
|
|
14403
14721
|
render() {
|
|
14404
14722
|
return titleTemplate(this);
|
|
14405
14723
|
}
|
|
14406
|
-
};
|
|
14407
|
-
var NLDDTitle = (_NLDDTitle.styles = titleStyles, _NLDDTitle);
|
|
14724
|
+
}, _NLDDTitle.styles = titleStyles, _NLDDTitle);
|
|
14408
14725
|
__decorate([property({
|
|
14409
14726
|
type: Number,
|
|
14410
14727
|
reflect: true
|
|
14411
14728
|
})], NLDDTitle.prototype, "size", void 0);
|
|
14729
|
+
__decorate([property({
|
|
14730
|
+
reflect: true,
|
|
14731
|
+
attribute: "sm-custom-size",
|
|
14732
|
+
converter: reflectNonDefault("")
|
|
14733
|
+
})], NLDDTitle.prototype, "smCustomSize", void 0);
|
|
14734
|
+
__decorate([property({
|
|
14735
|
+
reflect: true,
|
|
14736
|
+
attribute: "md-custom-size",
|
|
14737
|
+
converter: reflectNonDefault("")
|
|
14738
|
+
})], NLDDTitle.prototype, "mdCustomSize", void 0);
|
|
14739
|
+
__decorate([property({
|
|
14740
|
+
reflect: true,
|
|
14741
|
+
attribute: "lg-custom-size",
|
|
14742
|
+
converter: reflectNonDefault("")
|
|
14743
|
+
})], NLDDTitle.prototype, "lgCustomSize", void 0);
|
|
14412
14744
|
__decorate([property({
|
|
14413
14745
|
reflect: true,
|
|
14414
14746
|
converter: reflectNonDefault("content")
|
|
@@ -14630,7 +14962,7 @@ var nlddTokenTranslations = {
|
|
|
14630
14962
|
* @attr {object} translations - Override translation keys; unset keys fall back to Dutch
|
|
14631
14963
|
* @attr {boolean} roving - Inside a roving-focus container (e.g. nldd-token-field): the host is the single tab stop, so the trailing control is not separately tabbable.
|
|
14632
14964
|
* @attr {boolean} expanded - Reflects whether the token's menu is open (control="menu"); managed by the token.
|
|
14633
|
-
* @attr {boolean} disabled - Disabled state
|
|
14965
|
+
* @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
|
|
14634
14966
|
*
|
|
14635
14967
|
* @slot - Token text
|
|
14636
14968
|
* @slot menu - An nldd-menu that the token opens from its menu button (control="menu").
|
|
@@ -14783,6 +15115,73 @@ __decorate([state()], NLDDToken.prototype, "_slotText", void 0);
|
|
|
14783
15115
|
__decorate([query(".token__menu-action nldd-icon-button")], NLDDToken.prototype, "_menuButton", void 0);
|
|
14784
15116
|
NLDDToken = __decorate([customElement("nldd-token")], NLDDToken);
|
|
14785
15117
|
//#endregion
|
|
15118
|
+
//#region src/components/content/visually-hidden/visually-hidden.styles.ts
|
|
15119
|
+
var visuallyHiddenStyles = css`
|
|
15120
|
+
:host {
|
|
15121
|
+
box-sizing: border-box;
|
|
15122
|
+
}
|
|
15123
|
+
|
|
15124
|
+
|
|
15125
|
+
/* # Host */
|
|
15126
|
+
|
|
15127
|
+
:host {
|
|
15128
|
+
display: block;
|
|
15129
|
+
position: absolute;
|
|
15130
|
+
/* !important: a reset on * would beat it on the host. The 1px offset keeps
|
|
15131
|
+
the box from adding a pixel to the scroll area of a container. */
|
|
15132
|
+
margin: -1px !important;
|
|
15133
|
+
width: 1px;
|
|
15134
|
+
height: 1px;
|
|
15135
|
+
overflow: hidden;
|
|
15136
|
+
white-space: nowrap;
|
|
15137
|
+
clip-path: inset(50%);
|
|
15138
|
+
}
|
|
15139
|
+
|
|
15140
|
+
:host([hidden]) {
|
|
15141
|
+
display: none;
|
|
15142
|
+
}
|
|
15143
|
+
`;
|
|
15144
|
+
//#endregion
|
|
15145
|
+
//#region src/components/content/visually-hidden/visually-hidden.template.ts
|
|
15146
|
+
function template$10() {
|
|
15147
|
+
return html`
|
|
15148
|
+
<slot></slot>
|
|
15149
|
+
`;
|
|
15150
|
+
}
|
|
15151
|
+
//#endregion
|
|
15152
|
+
//#region src/components/content/visually-hidden/visually-hidden.ts
|
|
15153
|
+
/**
|
|
15154
|
+
* Nederlandse Digitale Dienst Visually Hidden Component (Lit + TypeScript)
|
|
15155
|
+
*
|
|
15156
|
+
* Text a screen reader reads and the screen does not show. It stays in the
|
|
15157
|
+
* accessibility tree and in the reading order, and takes no room on the page.
|
|
15158
|
+
*
|
|
15159
|
+
* For a name that is visually redundant: the header of a column of checkboxes,
|
|
15160
|
+
* where the checkboxes say enough to anyone who can see them, or the "(opent in
|
|
15161
|
+
* een nieuw venster)" after a link whose icon already says it.
|
|
15162
|
+
*
|
|
15163
|
+
* Not for repairing structure that is missing. Hidden text that describes how
|
|
15164
|
+
* something is laid out ("subpagina van Aanvragen") stands in for semantics the
|
|
15165
|
+
* markup should carry, and only a screen reader gets the stand-in. Not for a
|
|
15166
|
+
* status either: a status that matters to a screen reader matters to anyone,
|
|
15167
|
+
* so show it, as text with `role="status"` or as an `nldd-notification`. And
|
|
15168
|
+
* not for the name of a component that takes `accessible-label`: give it that.
|
|
15169
|
+
*
|
|
15170
|
+
* Nothing in it should take focus. A control inside would be reached with Tab
|
|
15171
|
+
* and be nowhere on the screen.
|
|
15172
|
+
*
|
|
15173
|
+
* @element nldd-visually-hidden
|
|
15174
|
+
*
|
|
15175
|
+
* @slot - The text, read by a screen reader and not shown.
|
|
15176
|
+
*/
|
|
15177
|
+
var _NLDDVisuallyHidden = class NLDDVisuallyHidden extends LitElement {
|
|
15178
|
+
render() {
|
|
15179
|
+
return template$10();
|
|
15180
|
+
}
|
|
15181
|
+
};
|
|
15182
|
+
var NLDDVisuallyHidden = (_NLDDVisuallyHidden.styles = visuallyHiddenStyles, _NLDDVisuallyHidden);
|
|
15183
|
+
NLDDVisuallyHidden = __decorate([customElement("nldd-visually-hidden")], NLDDVisuallyHidden);
|
|
15184
|
+
//#endregion
|
|
14786
15185
|
//#region src/components/forms/form/form.ts
|
|
14787
15186
|
/**
|
|
14788
15187
|
* Nederlandse Digitale Dienst Form Component
|
|
@@ -15022,7 +15421,7 @@ var NLDDForm = class extends HTMLElement {
|
|
|
15022
15421
|
if (!customElements.get("nldd-form")) customElements.define("nldd-form", NLDDForm);
|
|
15023
15422
|
//#endregion
|
|
15024
15423
|
//#region src/components/forms/form-actions/form-actions.styles.ts
|
|
15025
|
-
var mdMin$
|
|
15424
|
+
var mdMin$19 = unsafeCSS(breakpoints.mdMin);
|
|
15026
15425
|
var formActionsStyles = css`
|
|
15027
15426
|
:host {
|
|
15028
15427
|
box-sizing: border-box;
|
|
@@ -15053,7 +15452,7 @@ var formActionsStyles = css`
|
|
|
15053
15452
|
:host([label-alignment="right"]) .form-actions,
|
|
15054
15453
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-actions,
|
|
15055
15454
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-actions {
|
|
15056
|
-
@container (min-width: ${mdMin$
|
|
15455
|
+
@container (min-width: ${mdMin$19}) {
|
|
15057
15456
|
flex-direction: row;
|
|
15058
15457
|
gap: var(--semantics-forms-columns-gap);
|
|
15059
15458
|
align-items: start;
|
|
@@ -15064,7 +15463,7 @@ var formActionsStyles = css`
|
|
|
15064
15463
|
:host([label-alignment="right"]) .form-actions::before,
|
|
15065
15464
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-actions::before,
|
|
15066
15465
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-actions::before {
|
|
15067
|
-
@container (min-width: ${mdMin$
|
|
15466
|
+
@container (min-width: ${mdMin$19}) {
|
|
15068
15467
|
content: '';
|
|
15069
15468
|
width: var(--semantics-forms-label-column-width);
|
|
15070
15469
|
flex-grow: 0;
|
|
@@ -15175,7 +15574,7 @@ function setOwnedAttribute(el, name, value, applied) {
|
|
|
15175
15574
|
}
|
|
15176
15575
|
//#endregion
|
|
15177
15576
|
//#region src/components/forms/form-field/form-field.styles.ts
|
|
15178
|
-
var mdMin$
|
|
15577
|
+
var mdMin$18 = unsafeCSS(breakpoints.mdMin);
|
|
15179
15578
|
var formFieldStyles = css`
|
|
15180
15579
|
:host {
|
|
15181
15580
|
box-sizing: border-box;
|
|
@@ -15212,7 +15611,7 @@ var formFieldStyles = css`
|
|
|
15212
15611
|
:host([label-alignment="right"]) .form-field,
|
|
15213
15612
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field,
|
|
15214
15613
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field {
|
|
15215
|
-
@container (min-width: ${mdMin$
|
|
15614
|
+
@container (min-width: ${mdMin$18}) {
|
|
15216
15615
|
flex-direction: row;
|
|
15217
15616
|
gap: var(--semantics-forms-columns-gap);
|
|
15218
15617
|
align-items: start;
|
|
@@ -15236,7 +15635,7 @@ var formFieldStyles = css`
|
|
|
15236
15635
|
:host([label-alignment="right"]) .form-field__header,
|
|
15237
15636
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field__header,
|
|
15238
15637
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field__header {
|
|
15239
|
-
@container (min-width: ${mdMin$
|
|
15638
|
+
@container (min-width: ${mdMin$18}) {
|
|
15240
15639
|
z-index: auto;
|
|
15241
15640
|
width: var(--semantics-forms-label-column-width);
|
|
15242
15641
|
min-height: var(--semantics-controls-md-min-size);
|
|
@@ -15248,7 +15647,7 @@ var formFieldStyles = css`
|
|
|
15248
15647
|
|
|
15249
15648
|
:host([label-alignment="right"]) .form-field__header,
|
|
15250
15649
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field__header {
|
|
15251
|
-
@container (min-width: ${mdMin$
|
|
15650
|
+
@container (min-width: ${mdMin$18}) {
|
|
15252
15651
|
align-items: end;
|
|
15253
15652
|
text-align: right;
|
|
15254
15653
|
}
|
|
@@ -15256,7 +15655,7 @@ var formFieldStyles = css`
|
|
|
15256
15655
|
|
|
15257
15656
|
:host([label-alignment="left"]) .form-field__header,
|
|
15258
15657
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field__header {
|
|
15259
|
-
@container (min-width: ${mdMin$
|
|
15658
|
+
@container (min-width: ${mdMin$18}) {
|
|
15260
15659
|
align-items: start;
|
|
15261
15660
|
text-align: left;
|
|
15262
15661
|
}
|
|
@@ -15270,7 +15669,7 @@ var formFieldStyles = css`
|
|
|
15270
15669
|
:host([label-alignment="right"]) .form-field__header.is-empty,
|
|
15271
15670
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field__header.is-empty,
|
|
15272
15671
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field__header.is-empty {
|
|
15273
|
-
@container (min-width: ${mdMin$
|
|
15672
|
+
@container (min-width: ${mdMin$18}) {
|
|
15274
15673
|
display: flex;
|
|
15275
15674
|
}
|
|
15276
15675
|
}
|
|
@@ -15291,7 +15690,7 @@ var formFieldStyles = css`
|
|
|
15291
15690
|
:host([label-alignment="right"]) .form-field__label,
|
|
15292
15691
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field__label,
|
|
15293
15692
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field__label {
|
|
15294
|
-
@container (min-width: ${mdMin$
|
|
15693
|
+
@container (min-width: ${mdMin$18}) {
|
|
15295
15694
|
display: flex;
|
|
15296
15695
|
flex-direction: column;
|
|
15297
15696
|
gap: var(--primitives-space-0);
|
|
@@ -15300,14 +15699,14 @@ var formFieldStyles = css`
|
|
|
15300
15699
|
|
|
15301
15700
|
:host([label-alignment="right"]) .form-field__label,
|
|
15302
15701
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field__label {
|
|
15303
|
-
@container (min-width: ${mdMin$
|
|
15702
|
+
@container (min-width: ${mdMin$18}) {
|
|
15304
15703
|
align-items: end;
|
|
15305
15704
|
}
|
|
15306
15705
|
}
|
|
15307
15706
|
|
|
15308
15707
|
:host([label-alignment="left"]) .form-field__label,
|
|
15309
15708
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field__label {
|
|
15310
|
-
@container (min-width: ${mdMin$
|
|
15709
|
+
@container (min-width: ${mdMin$18}) {
|
|
15311
15710
|
align-items: start;
|
|
15312
15711
|
}
|
|
15313
15712
|
}
|
|
@@ -19977,7 +20376,7 @@ function resolveDateBound(raw, today = /* @__PURE__ */ new Date()) {
|
|
|
19977
20376
|
}
|
|
19978
20377
|
//#endregion
|
|
19979
20378
|
//#region src/components/inputs/date-field/date-field.styles.ts
|
|
19980
|
-
var mdMin$
|
|
20379
|
+
var mdMin$17 = unsafeCSS(breakpoints.mdMin);
|
|
19981
20380
|
var dateFieldStyles = css`
|
|
19982
20381
|
:host {
|
|
19983
20382
|
box-sizing: border-box;
|
|
@@ -20225,7 +20624,7 @@ var dateFieldStyles = css`
|
|
|
20225
20624
|
|
|
20226
20625
|
/* The sheet's title bar only makes sense on a small screen, where the popover
|
|
20227
20626
|
becomes a bottom sheet. It shows by default and is hidden from md up. */
|
|
20228
|
-
@media (min-width: ${mdMin$
|
|
20627
|
+
@media (min-width: ${mdMin$17}) {
|
|
20229
20628
|
.date-field__picker-button nldd-top-title-bar {
|
|
20230
20629
|
display: none;
|
|
20231
20630
|
}
|
|
@@ -22838,6 +23237,12 @@ function dropdownTemplate(component) {
|
|
|
22838
23237
|
* and keyboard navigation, including `<optgroup>`, `data-*` attributes and
|
|
22839
23238
|
* dynamic changes to options.
|
|
22840
23239
|
*
|
|
23240
|
+
* A dropdown hides its options, so it is the last resort for a choice from a
|
|
23241
|
+
* fixed set. Show a handful of options with nldd-segmented-control,
|
|
23242
|
+
* nldd-toggle-button-group or nldd-radio-button-group, and let the user type
|
|
23243
|
+
* in nldd-combo-box when there are many, a list of countries included. The
|
|
23244
|
+
* design guidelines explain the order.
|
|
23245
|
+
*
|
|
22841
23246
|
* @element nldd-dropdown
|
|
22842
23247
|
* @attr {string} size - Size: 'xs' | 'sm' | 'md' (default: 'md')
|
|
22843
23248
|
* @attr {boolean} valid - Marks the field as valid
|
|
@@ -34643,7 +35048,7 @@ __decorate([property({
|
|
|
34643
35048
|
NLDDTextField = __decorate([customElement("nldd-text-field")], NLDDTextField);
|
|
34644
35049
|
//#endregion
|
|
34645
35050
|
//#region src/components/inputs/time-field/time-field.styles.ts
|
|
34646
|
-
var mdMin$
|
|
35051
|
+
var mdMin$16 = unsafeCSS(breakpoints.mdMin);
|
|
34647
35052
|
var timeFieldStyles = css`
|
|
34648
35053
|
:host {
|
|
34649
35054
|
box-sizing: border-box;
|
|
@@ -34837,7 +35242,7 @@ var timeFieldStyles = css`
|
|
|
34837
35242
|
}
|
|
34838
35243
|
|
|
34839
35244
|
|
|
34840
|
-
@media (min-width: ${mdMin$
|
|
35245
|
+
@media (min-width: ${mdMin$16}) {
|
|
34841
35246
|
.time-field__picker-button nldd-top-title-bar {
|
|
34842
35247
|
display: none;
|
|
34843
35248
|
}
|
|
@@ -34845,10 +35250,10 @@ var timeFieldStyles = css`
|
|
|
34845
35250
|
`;
|
|
34846
35251
|
//#endregion
|
|
34847
35252
|
//#region src/components/layout/spacer/spacer.styles.ts
|
|
34848
|
-
var smMax$
|
|
34849
|
-
var mdMin$
|
|
34850
|
-
var mdMax$
|
|
34851
|
-
var lgMin$
|
|
35253
|
+
var smMax$15 = unsafeCSS(breakpoints.smMax);
|
|
35254
|
+
var mdMin$15 = unsafeCSS(breakpoints.mdMin);
|
|
35255
|
+
var mdMax$12 = unsafeCSS(breakpoints.mdMax);
|
|
35256
|
+
var lgMin$13 = unsafeCSS(breakpoints.lgMin);
|
|
34852
35257
|
var spacerStyles = css`
|
|
34853
35258
|
:host {
|
|
34854
35259
|
box-sizing: border-box;
|
|
@@ -34934,7 +35339,7 @@ var spacerStyles = css`
|
|
|
34934
35339
|
|
|
34935
35340
|
/* ## sm: max-width 640px */
|
|
34936
35341
|
|
|
34937
|
-
@media (max-width: ${smMax$
|
|
35342
|
+
@media (max-width: ${smMax$15}) {
|
|
34938
35343
|
:host([sm-size="2"]) { --_spacer-size: var(--primitives-space-2); }
|
|
34939
35344
|
:host([sm-size="4"]) { --_spacer-size: var(--primitives-space-4); }
|
|
34940
35345
|
:host([sm-size="6"]) { --_spacer-size: var(--primitives-space-6); }
|
|
@@ -34975,7 +35380,7 @@ var spacerStyles = css`
|
|
|
34975
35380
|
|
|
34976
35381
|
/* ## md: 641px–1007px */
|
|
34977
35382
|
|
|
34978
|
-
@media (min-width: ${mdMin$
|
|
35383
|
+
@media (min-width: ${mdMin$15}) and (max-width: ${mdMax$12}) {
|
|
34979
35384
|
:host([md-size="2"]) { --_spacer-size: var(--primitives-space-2); }
|
|
34980
35385
|
:host([md-size="4"]) { --_spacer-size: var(--primitives-space-4); }
|
|
34981
35386
|
:host([md-size="6"]) { --_spacer-size: var(--primitives-space-6); }
|
|
@@ -35016,7 +35421,7 @@ var spacerStyles = css`
|
|
|
35016
35421
|
|
|
35017
35422
|
/* ## lg: min-width 1008px */
|
|
35018
35423
|
|
|
35019
|
-
@media (min-width: ${lgMin$
|
|
35424
|
+
@media (min-width: ${lgMin$13}) {
|
|
35020
35425
|
:host([lg-size="2"]) { --_spacer-size: var(--primitives-space-2); }
|
|
35021
35426
|
:host([lg-size="4"]) { --_spacer-size: var(--primitives-space-4); }
|
|
35022
35427
|
:host([lg-size="6"]) { --_spacer-size: var(--primitives-space-6); }
|
|
@@ -39102,10 +39507,10 @@ __decorate([state()], NLDDBarSplitView.prototype, "_currentBreakpoint", void 0);
|
|
|
39102
39507
|
NLDDBarSplitView = __decorate([customElement("nldd-bar-split-view")], NLDDBarSplitView);
|
|
39103
39508
|
//#endregion
|
|
39104
39509
|
//#region src/components/layout/split-views/navigation-split-view/navigation-split-view.styles.ts
|
|
39105
|
-
var smMax$
|
|
39106
|
-
var mdMin$
|
|
39107
|
-
var mdMax$
|
|
39108
|
-
var lgMin$
|
|
39510
|
+
var smMax$14 = unsafeCSS(breakpoints.smMax);
|
|
39511
|
+
var mdMin$14 = unsafeCSS(breakpoints.mdMin);
|
|
39512
|
+
var mdMax$11 = unsafeCSS(breakpoints.mdMax);
|
|
39513
|
+
var lgMin$12 = unsafeCSS(breakpoints.lgMin);
|
|
39109
39514
|
var navigationSplitViewStyles = css`
|
|
39110
39515
|
:host {
|
|
39111
39516
|
box-sizing: border-box;
|
|
@@ -39287,7 +39692,7 @@ var navigationSplitViewStyles = css`
|
|
|
39287
39692
|
padding: 0;
|
|
39288
39693
|
flex-direction: column;
|
|
39289
39694
|
|
|
39290
|
-
@media (max-width: ${smMax$
|
|
39695
|
+
@media (max-width: ${smMax$14}) {
|
|
39291
39696
|
inset: auto 0 0 0;
|
|
39292
39697
|
border-radius: var(--semantics-overlays-corner-radius) var(--semantics-overlays-corner-radius) 0 0;
|
|
39293
39698
|
width: 100%;
|
|
@@ -39296,14 +39701,14 @@ var navigationSplitViewStyles = css`
|
|
|
39296
39701
|
max-height: calc(100dvh - var(--semantics-sheets-bottom-top-inset));
|
|
39297
39702
|
}
|
|
39298
39703
|
|
|
39299
|
-
@media (min-width: ${mdMin$
|
|
39704
|
+
@media (min-width: ${mdMin$14}) and (max-width: ${mdMax$11}) {
|
|
39300
39705
|
inset: var(--semantics-overlays-inset) var(--semantics-overlays-inset) var(--semantics-overlays-inset) auto;
|
|
39301
39706
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
39302
39707
|
width: var(--semantics-sheets-side-md-width);
|
|
39303
39708
|
height: calc(100dvh - var(--semantics-overlays-inset) * 2);
|
|
39304
39709
|
}
|
|
39305
39710
|
|
|
39306
|
-
@media (min-width: ${lgMin$
|
|
39711
|
+
@media (min-width: ${lgMin$12}) {
|
|
39307
39712
|
inset: var(--semantics-overlays-inset) var(--semantics-overlays-inset) var(--semantics-overlays-inset) auto;
|
|
39308
39713
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
39309
39714
|
width: var(--semantics-sheets-side-lg-width);
|
|
@@ -39325,21 +39730,21 @@ var navigationSplitViewStyles = css`
|
|
|
39325
39730
|
}
|
|
39326
39731
|
|
|
39327
39732
|
&[open] {
|
|
39328
|
-
@media (max-width: ${smMax$
|
|
39733
|
+
@media (max-width: ${smMax$14}) {
|
|
39329
39734
|
animation: navigation-split-view-slide-in-bottom var(--semantics-sheets-bottom-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39330
39735
|
}
|
|
39331
39736
|
|
|
39332
|
-
@media (min-width: ${mdMin$
|
|
39737
|
+
@media (min-width: ${mdMin$14}) {
|
|
39333
39738
|
animation: navigation-split-view-inspector-slide-in var(--semantics-sheets-side-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39334
39739
|
}
|
|
39335
39740
|
}
|
|
39336
39741
|
|
|
39337
39742
|
&.is-closing {
|
|
39338
|
-
@media (max-width: ${smMax$
|
|
39743
|
+
@media (max-width: ${smMax$14}) {
|
|
39339
39744
|
animation: navigation-split-view-slide-out-bottom var(--semantics-sheets-bottom-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39340
39745
|
}
|
|
39341
39746
|
|
|
39342
|
-
@media (min-width: ${mdMin$
|
|
39747
|
+
@media (min-width: ${mdMin$14}) {
|
|
39343
39748
|
animation: navigation-split-view-inspector-slide-out var(--semantics-sheets-side-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39344
39749
|
}
|
|
39345
39750
|
}
|
|
@@ -39365,7 +39770,7 @@ var navigationSplitViewStyles = css`
|
|
|
39365
39770
|
padding: 0;
|
|
39366
39771
|
flex-direction: column;
|
|
39367
39772
|
|
|
39368
|
-
@media (max-width: ${smMax$
|
|
39773
|
+
@media (max-width: ${smMax$14}) {
|
|
39369
39774
|
inset: auto 0 0 0;
|
|
39370
39775
|
border-radius: var(--semantics-overlays-corner-radius) var(--semantics-overlays-corner-radius) 0 0;
|
|
39371
39776
|
width: 100%;
|
|
@@ -39374,14 +39779,14 @@ var navigationSplitViewStyles = css`
|
|
|
39374
39779
|
max-height: calc(100dvh - var(--semantics-sheets-bottom-top-inset));
|
|
39375
39780
|
}
|
|
39376
39781
|
|
|
39377
|
-
@media (min-width: ${mdMin$
|
|
39782
|
+
@media (min-width: ${mdMin$14}) and (max-width: ${mdMax$11}) {
|
|
39378
39783
|
inset: var(--semantics-overlays-inset) auto var(--semantics-overlays-inset) var(--semantics-overlays-inset);
|
|
39379
39784
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
39380
39785
|
width: var(--semantics-sheets-side-md-width);
|
|
39381
39786
|
height: calc(100dvh - var(--semantics-overlays-inset) * 2);
|
|
39382
39787
|
}
|
|
39383
39788
|
|
|
39384
|
-
@media (min-width: ${lgMin$
|
|
39789
|
+
@media (min-width: ${lgMin$12}) {
|
|
39385
39790
|
inset: var(--semantics-overlays-inset) auto var(--semantics-overlays-inset) var(--semantics-overlays-inset);
|
|
39386
39791
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
39387
39792
|
width: var(--semantics-sheets-side-lg-width);
|
|
@@ -39403,21 +39808,21 @@ var navigationSplitViewStyles = css`
|
|
|
39403
39808
|
}
|
|
39404
39809
|
|
|
39405
39810
|
&[open] {
|
|
39406
|
-
@media (max-width: ${smMax$
|
|
39811
|
+
@media (max-width: ${smMax$14}) {
|
|
39407
39812
|
animation: navigation-split-view-slide-in-bottom var(--semantics-sheets-bottom-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39408
39813
|
}
|
|
39409
39814
|
|
|
39410
|
-
@media (min-width: ${mdMin$
|
|
39815
|
+
@media (min-width: ${mdMin$14}) {
|
|
39411
39816
|
animation: navigation-split-view-primary-sidebar-slide-in var(--semantics-sheets-side-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39412
39817
|
}
|
|
39413
39818
|
}
|
|
39414
39819
|
|
|
39415
39820
|
&.is-closing {
|
|
39416
|
-
@media (max-width: ${smMax$
|
|
39821
|
+
@media (max-width: ${smMax$14}) {
|
|
39417
39822
|
animation: navigation-split-view-slide-out-bottom var(--semantics-sheets-bottom-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39418
39823
|
}
|
|
39419
39824
|
|
|
39420
|
-
@media (min-width: ${mdMin$
|
|
39825
|
+
@media (min-width: ${mdMin$14}) {
|
|
39421
39826
|
animation: navigation-split-view-primary-sidebar-slide-out var(--semantics-sheets-side-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39422
39827
|
}
|
|
39423
39828
|
}
|
|
@@ -39457,7 +39862,7 @@ var navigationSplitViewStyles = css`
|
|
|
39457
39862
|
definite height and the zero basis never surfaces, which is why this only
|
|
39458
39863
|
shows below 641px. The dialog's max-height still caps a long sheet;
|
|
39459
39864
|
flex-shrink then hands the overflow to the pane's own scroll container. */
|
|
39460
|
-
@media (max-width: ${smMax$
|
|
39865
|
+
@media (max-width: ${smMax$14}) {
|
|
39461
39866
|
.navigation-split-view__primary-sidebar-sheet-body slot::slotted(*),
|
|
39462
39867
|
.navigation-split-view__inspector-sheet-body slot::slotted(*) {
|
|
39463
39868
|
flex-basis: auto;
|
|
@@ -40310,7 +40715,7 @@ __decorate([state()], NLDDStackedSplitView.prototype, "_visiblePanes", void 0);
|
|
|
40310
40715
|
NLDDStackedSplitView = __decorate([customElement("nldd-stacked-split-view")], NLDDStackedSplitView);
|
|
40311
40716
|
//#endregion
|
|
40312
40717
|
//#region src/components/layout/split-views/split-view-pane/split-view-pane.styles.ts
|
|
40313
|
-
var mdMin$
|
|
40718
|
+
var mdMin$13 = unsafeCSS(breakpoints.mdMin);
|
|
40314
40719
|
var splitViewPaneStyles = css`
|
|
40315
40720
|
:host {
|
|
40316
40721
|
box-sizing: border-box;
|
|
@@ -40326,7 +40731,7 @@ var splitViewPaneStyles = css`
|
|
|
40326
40731
|
width: 100%;
|
|
40327
40732
|
height: 100%;
|
|
40328
40733
|
|
|
40329
|
-
@media (min-width: ${mdMin$
|
|
40734
|
+
@media (min-width: ${mdMin$13}) {
|
|
40330
40735
|
background-color: var(--_split-view-pane-background-color);
|
|
40331
40736
|
}
|
|
40332
40737
|
}
|
|
@@ -41285,10 +41690,10 @@ function PageSectionMixin(Base) {
|
|
|
41285
41690
|
}
|
|
41286
41691
|
//#endregion
|
|
41287
41692
|
//#region src/components/layout/page-sections/simple-section/simple-section.styles.ts
|
|
41288
|
-
var smMax$
|
|
41289
|
-
var mdMin$
|
|
41290
|
-
var mdMax$
|
|
41291
|
-
var lgMin$
|
|
41693
|
+
var smMax$13 = unsafeCSS(breakpoints.smMax);
|
|
41694
|
+
var mdMin$12 = unsafeCSS(breakpoints.mdMin);
|
|
41695
|
+
var mdMax$10 = unsafeCSS(breakpoints.mdMax);
|
|
41696
|
+
var lgMin$11 = unsafeCSS(breakpoints.lgMin);
|
|
41292
41697
|
var simpleSectionStyles = css`
|
|
41293
41698
|
:host {
|
|
41294
41699
|
box-sizing: border-box;
|
|
@@ -41362,19 +41767,19 @@ var simpleSectionStyles = css`
|
|
|
41362
41767
|
align-items: center;
|
|
41363
41768
|
|
|
41364
41769
|
|
|
41365
|
-
@container (max-width: ${smMax$
|
|
41770
|
+
@container (max-width: ${smMax$13}) {
|
|
41366
41771
|
padding-inline: var(--semantics-page-sections-sm-margin-inline);
|
|
41367
41772
|
padding-top: var(--_simple-section-sm-padding-top, var(--_simple-section-padding-top, var(--semantics-page-sections-sm-margin-block)));
|
|
41368
41773
|
padding-bottom: var(--_simple-section-sm-padding-bottom, var(--_simple-section-padding-bottom, var(--semantics-page-sections-sm-margin-block)));
|
|
41369
41774
|
}
|
|
41370
41775
|
|
|
41371
|
-
@container (min-width: ${mdMin$
|
|
41776
|
+
@container (min-width: ${mdMin$12}) and (max-width: ${mdMax$10}) {
|
|
41372
41777
|
padding-inline: var(--semantics-page-sections-md-margin-inline);
|
|
41373
41778
|
padding-top: var(--_simple-section-md-padding-top, var(--_simple-section-padding-top, var(--semantics-page-sections-md-margin-block)));
|
|
41374
41779
|
padding-bottom: var(--_simple-section-md-padding-bottom, var(--_simple-section-padding-bottom, var(--semantics-page-sections-md-margin-block)));
|
|
41375
41780
|
}
|
|
41376
41781
|
|
|
41377
|
-
@container (min-width: ${lgMin$
|
|
41782
|
+
@container (min-width: ${lgMin$11}) {
|
|
41378
41783
|
padding-inline: var(--semantics-page-sections-lg-margin-inline);
|
|
41379
41784
|
padding-top: var(--_simple-section-lg-padding-top, var(--_simple-section-padding-top, var(--semantics-page-sections-lg-margin-block)));
|
|
41380
41785
|
padding-bottom: var(--_simple-section-lg-padding-bottom, var(--_simple-section-padding-bottom, var(--semantics-page-sections-lg-margin-block)));
|
|
@@ -41391,15 +41796,15 @@ var simpleSectionStyles = css`
|
|
|
41391
41796
|
flex-direction: column;
|
|
41392
41797
|
flex-grow: 1;
|
|
41393
41798
|
|
|
41394
|
-
@container (max-width: ${smMax$
|
|
41799
|
+
@container (max-width: ${smMax$13}) {
|
|
41395
41800
|
gap: var(--semantics-page-sections-sm-gap);
|
|
41396
41801
|
}
|
|
41397
41802
|
|
|
41398
|
-
@container (min-width: ${mdMin$
|
|
41803
|
+
@container (min-width: ${mdMin$12}) and (max-width: ${mdMax$10}) {
|
|
41399
41804
|
gap: var(--semantics-page-sections-md-gap);
|
|
41400
41805
|
}
|
|
41401
41806
|
|
|
41402
|
-
@container (min-width: ${lgMin$
|
|
41807
|
+
@container (min-width: ${lgMin$11}) {
|
|
41403
41808
|
gap: var(--semantics-page-sections-lg-gap);
|
|
41404
41809
|
}
|
|
41405
41810
|
}
|
|
@@ -41519,10 +41924,10 @@ __decorate([property({
|
|
|
41519
41924
|
NLDDSimpleSection = __decorate([customElement("nldd-simple-section")], NLDDSimpleSection);
|
|
41520
41925
|
//#endregion
|
|
41521
41926
|
//#region src/components/layout/page-sections/hero/hero.styles.ts
|
|
41522
|
-
var smMax$
|
|
41523
|
-
var mdMin$
|
|
41524
|
-
var mdMax$
|
|
41525
|
-
var lgMin$
|
|
41927
|
+
var smMax$12 = unsafeCSS(breakpoints.smMax);
|
|
41928
|
+
var mdMin$11 = unsafeCSS(breakpoints.mdMin);
|
|
41929
|
+
var mdMax$9 = unsafeCSS(breakpoints.mdMax);
|
|
41930
|
+
var lgMin$10 = unsafeCSS(breakpoints.lgMin);
|
|
41526
41931
|
var heroStyles = css`
|
|
41527
41932
|
:host {
|
|
41528
41933
|
box-sizing: border-box;
|
|
@@ -41690,13 +42095,13 @@ var heroStyles = css`
|
|
|
41690
42095
|
inside :host would match an ancestor container, while these must query
|
|
41691
42096
|
the host's own inline size. */
|
|
41692
42097
|
|
|
41693
|
-
@container (max-width: ${smMax$
|
|
42098
|
+
@container (max-width: ${smMax$12}) {
|
|
41694
42099
|
padding-inline: var(--semantics-page-sections-sm-margin-inline);
|
|
41695
42100
|
padding-top: var(--_hero-sm-padding-top, var(--_hero-padding-top, calc(var(--semantics-page-sections-sm-margin-block) / 2)));
|
|
41696
42101
|
padding-bottom: var(--_hero-sm-padding-bottom, var(--_hero-padding-bottom, var(--semantics-page-sections-sm-margin-block)));
|
|
41697
42102
|
}
|
|
41698
42103
|
|
|
41699
|
-
@container (min-width: ${mdMin$
|
|
42104
|
+
@container (min-width: ${mdMin$11}) and (max-width: ${mdMax$9}) {
|
|
41700
42105
|
--_hero-main-padding: var(--primitives-space-24);
|
|
41701
42106
|
--_hero-main-inset: var(--semantics-page-sections-md-gap);
|
|
41702
42107
|
--_hero-default-overlap-size: var(--primitives-area-160);
|
|
@@ -41706,7 +42111,7 @@ var heroStyles = css`
|
|
|
41706
42111
|
padding-bottom: var(--_hero-md-padding-bottom, var(--_hero-padding-bottom, var(--semantics-page-sections-md-margin-block)));
|
|
41707
42112
|
}
|
|
41708
42113
|
|
|
41709
|
-
@container (min-width: ${lgMin$
|
|
42114
|
+
@container (min-width: ${lgMin$10}) {
|
|
41710
42115
|
--_hero-main-padding: var(--primitives-space-32);
|
|
41711
42116
|
--_hero-main-inset: var(--semantics-page-sections-lg-gap);
|
|
41712
42117
|
--_hero-default-overlap-size: var(--primitives-area-160);
|
|
@@ -41751,7 +42156,7 @@ var heroStyles = css`
|
|
|
41751
42156
|
rather than rigidly tied to the width. align-self: start stops the
|
|
41752
42157
|
stretch fit from cancelling the ratio. */
|
|
41753
42158
|
:host([data-has-media]) .hero__body::before {
|
|
41754
|
-
@container (min-width: ${mdMin$
|
|
42159
|
+
@container (min-width: ${mdMin$11}) {
|
|
41755
42160
|
content: '';
|
|
41756
42161
|
height: var(--_hero-media-height);
|
|
41757
42162
|
aspect-ratio: var(--_hero-media-aspect-ratio);
|
|
@@ -41839,7 +42244,7 @@ var heroStyles = css`
|
|
|
41839
42244
|
}
|
|
41840
42245
|
|
|
41841
42246
|
:host([data-has-media][data-main-width-length]) .hero__main {
|
|
41842
|
-
@container (min-width: ${mdMin$
|
|
42247
|
+
@container (min-width: ${mdMin$11}) {
|
|
41843
42248
|
width: var(--_hero-main-width);
|
|
41844
42249
|
min-width: 0;
|
|
41845
42250
|
max-width: calc(100% - 2 * var(--_hero-main-inset));
|
|
@@ -41893,7 +42298,7 @@ var heroStyles = css`
|
|
|
41893
42298
|
/* # Overlap (md+) — the media keeps a fixed height; the panel sits in the
|
|
41894
42299
|
row below it, pulled up over it by the overlap size. */
|
|
41895
42300
|
|
|
41896
|
-
@container (min-width: ${mdMin$
|
|
42301
|
+
@container (min-width: ${mdMin$11}) {
|
|
41897
42302
|
:host([data-has-media]:not([layout="contained"])) .hero__body::before {
|
|
41898
42303
|
content: none;
|
|
41899
42304
|
}
|
|
@@ -41923,7 +42328,7 @@ var heroStyles = css`
|
|
|
41923
42328
|
/* # Mobile — the media on top, the panel below it, indented and overlapping
|
|
41924
42329
|
it a little. */
|
|
41925
42330
|
|
|
41926
|
-
@container (max-width: ${smMax$
|
|
42331
|
+
@container (max-width: ${smMax$12}) {
|
|
41927
42332
|
.hero__body {
|
|
41928
42333
|
display: flex;
|
|
41929
42334
|
flex-direction: column;
|
|
@@ -41981,16 +42386,213 @@ function heroTemplate(component) {
|
|
|
41981
42386
|
`;
|
|
41982
42387
|
}
|
|
41983
42388
|
//#endregion
|
|
42389
|
+
//#region src/components/layout/page-sections/hero/hero-corner.styles.ts
|
|
42390
|
+
var smMax$11 = unsafeCSS(breakpoints.smMax);
|
|
42391
|
+
var mdMin$10 = unsafeCSS(breakpoints.mdMin);
|
|
42392
|
+
var mdMax$8 = unsafeCSS(breakpoints.mdMax);
|
|
42393
|
+
var lgMin$9 = unsafeCSS(breakpoints.lgMin);
|
|
42394
|
+
var heroCornerStyles = css`
|
|
42395
|
+
|
|
42396
|
+
|
|
42397
|
+
/* # Corner */
|
|
42398
|
+
|
|
42399
|
+
:host([data-media-corner]) {
|
|
42400
|
+
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-sm-width) * 1.5);
|
|
42401
|
+
}
|
|
42402
|
+
|
|
42403
|
+
/* On .hero, not :host: a var() resolves where it is declared, so on :host
|
|
42404
|
+
this would halve the sm radius at every breakpoint. */
|
|
42405
|
+
:host([data-media-corner]) .hero {
|
|
42406
|
+
--_hero-main-corner-radius: calc(var(--_hero-corner-radius) / 2);
|
|
42407
|
+
|
|
42408
|
+
@container (min-width: ${mdMin$10}) and (max-width: ${mdMax$8}) {
|
|
42409
|
+
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-md-width) * 2);
|
|
42410
|
+
}
|
|
42411
|
+
|
|
42412
|
+
@container (min-width: ${lgMin$9}) {
|
|
42413
|
+
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-lg-width) * 2);
|
|
42414
|
+
}
|
|
42415
|
+
}
|
|
42416
|
+
|
|
42417
|
+
/* ## Contained */
|
|
42418
|
+
|
|
42419
|
+
:host([data-media-corner][data-has-media]) .hero {
|
|
42420
|
+
@container (min-width: ${mdMin$10}) {
|
|
42421
|
+
--_hero-main-inset: var(--primitives-space-0);
|
|
42422
|
+
}
|
|
42423
|
+
}
|
|
42424
|
+
|
|
42425
|
+
:host([data-has-media]:is([data-main-corner="top-left"], [data-main-corner="top-right"])) .hero__main {
|
|
42426
|
+
@container (min-width: ${mdMin$10}) {
|
|
42427
|
+
margin-top: var(--_hero-corner-radius);
|
|
42428
|
+
}
|
|
42429
|
+
}
|
|
42430
|
+
|
|
42431
|
+
:host([data-has-media]:is([data-main-corner="bottom-left"], [data-main-corner="bottom-right"])) .hero__main {
|
|
42432
|
+
@container (min-width: ${mdMin$10}) {
|
|
42433
|
+
margin-bottom: var(--_hero-corner-radius);
|
|
42434
|
+
}
|
|
42435
|
+
}
|
|
42436
|
+
|
|
42437
|
+
/* ## Media */
|
|
42438
|
+
|
|
42439
|
+
:host([data-has-media][data-media-corner="top-left"]) .hero__media {
|
|
42440
|
+
border-top-left-radius: var(--_hero-corner-radius);
|
|
42441
|
+
}
|
|
42442
|
+
|
|
42443
|
+
:host([data-has-media][data-media-corner="top-right"]) .hero__media {
|
|
42444
|
+
border-top-right-radius: var(--_hero-corner-radius);
|
|
42445
|
+
}
|
|
42446
|
+
|
|
42447
|
+
:host([data-has-media][data-media-corner="bottom-left"]) .hero__media {
|
|
42448
|
+
@container (min-width: ${mdMin$10}) {
|
|
42449
|
+
border-bottom-left-radius: var(--_hero-corner-radius);
|
|
42450
|
+
}
|
|
42451
|
+
|
|
42452
|
+
@container (max-width: ${smMax$11}) {
|
|
42453
|
+
border-top-left-radius: var(--_hero-corner-radius);
|
|
42454
|
+
}
|
|
42455
|
+
}
|
|
42456
|
+
|
|
42457
|
+
:host([data-has-media][data-media-corner="bottom-right"]) .hero__media {
|
|
42458
|
+
@container (min-width: ${mdMin$10}) {
|
|
42459
|
+
border-bottom-right-radius: var(--_hero-corner-radius);
|
|
42460
|
+
}
|
|
42461
|
+
|
|
42462
|
+
@container (max-width: ${smMax$11}) {
|
|
42463
|
+
border-top-right-radius: var(--_hero-corner-radius);
|
|
42464
|
+
}
|
|
42465
|
+
}
|
|
42466
|
+
|
|
42467
|
+
/* ## Main */
|
|
42468
|
+
|
|
42469
|
+
:host([data-main-corner="top-left"]) .hero__main {
|
|
42470
|
+
@container (min-width: ${mdMin$10}) {
|
|
42471
|
+
border-top-left-radius: var(--_hero-main-corner-radius);
|
|
42472
|
+
}
|
|
42473
|
+
}
|
|
42474
|
+
|
|
42475
|
+
:host([data-main-corner="top-right"]) .hero__main {
|
|
42476
|
+
@container (min-width: ${mdMin$10}) {
|
|
42477
|
+
border-top-right-radius: var(--_hero-main-corner-radius);
|
|
42478
|
+
}
|
|
42479
|
+
}
|
|
42480
|
+
|
|
42481
|
+
:host([data-main-corner="bottom-left"]) .hero__main {
|
|
42482
|
+
@container (min-width: ${mdMin$10}) {
|
|
42483
|
+
border-bottom-left-radius: var(--_hero-main-corner-radius);
|
|
42484
|
+
}
|
|
42485
|
+
}
|
|
42486
|
+
|
|
42487
|
+
:host([data-main-corner="bottom-right"]) .hero__main {
|
|
42488
|
+
@container (min-width: ${mdMin$10}) {
|
|
42489
|
+
border-bottom-right-radius: var(--_hero-main-corner-radius);
|
|
42490
|
+
}
|
|
42491
|
+
}
|
|
42492
|
+
|
|
42493
|
+
/* ## Without media */
|
|
42494
|
+
|
|
42495
|
+
:host(:not([data-has-media])[data-media-corner="top-left"]) :is(.hero__body, .hero__main) {
|
|
42496
|
+
border-top-left-radius: var(--_hero-corner-radius);
|
|
42497
|
+
}
|
|
42498
|
+
|
|
42499
|
+
:host(:not([data-has-media])[data-media-corner="top-right"]) :is(.hero__body, .hero__main) {
|
|
42500
|
+
border-top-right-radius: var(--_hero-corner-radius);
|
|
42501
|
+
}
|
|
42502
|
+
|
|
42503
|
+
:host(:not([data-has-media])[data-media-corner="bottom-left"]) :is(.hero__body, .hero__main) {
|
|
42504
|
+
border-bottom-left-radius: var(--_hero-corner-radius);
|
|
42505
|
+
}
|
|
42506
|
+
|
|
42507
|
+
:host(:not([data-has-media])[data-media-corner="bottom-right"]) :is(.hero__body, .hero__main) {
|
|
42508
|
+
border-bottom-right-radius: var(--_hero-corner-radius);
|
|
42509
|
+
}
|
|
42510
|
+
|
|
42511
|
+
:host(:not([data-has-media]):is([data-media-corner="top-left"], [data-media-corner="bottom-left"])) .hero__main {
|
|
42512
|
+
padding-left: calc(var(--_hero-main-padding) + var(--_hero-corner-radius) / 2);
|
|
42513
|
+
}
|
|
42514
|
+
|
|
42515
|
+
:host(:not([data-has-media]):is([data-media-corner="top-right"], [data-media-corner="bottom-right"])) .hero__main {
|
|
42516
|
+
padding-right: calc(var(--_hero-main-padding) + var(--_hero-corner-radius) / 2);
|
|
42517
|
+
}
|
|
42518
|
+
`;
|
|
42519
|
+
//#endregion
|
|
42520
|
+
//#region src/components/layout/page-sections/hero/hero-corner.ts
|
|
42521
|
+
var CORNERS = [
|
|
42522
|
+
"top-left",
|
|
42523
|
+
"top-right",
|
|
42524
|
+
"bottom-left",
|
|
42525
|
+
"bottom-right"
|
|
42526
|
+
];
|
|
42527
|
+
var AUTO_MEDIA_CORNER = {
|
|
42528
|
+
"bottom-left": "top-right",
|
|
42529
|
+
"bottom-right": "bottom-left",
|
|
42530
|
+
"top-left": "top-right",
|
|
42531
|
+
"top-right": "top-left",
|
|
42532
|
+
"left": "top-right",
|
|
42533
|
+
"right": "top-left"
|
|
42534
|
+
};
|
|
42535
|
+
var MAIN_CORNER = {
|
|
42536
|
+
"bottom-left": "top-right",
|
|
42537
|
+
"bottom-right": "top-left",
|
|
42538
|
+
"top-left": "bottom-right",
|
|
42539
|
+
"top-right": "bottom-left",
|
|
42540
|
+
"left": null,
|
|
42541
|
+
"right": null
|
|
42542
|
+
};
|
|
42543
|
+
/** The media corners the panel stands on, where a rounded corner would vanish. */
|
|
42544
|
+
function coveredCorners(host, position) {
|
|
42545
|
+
if (position === "left") return ["top-left", "bottom-left"];
|
|
42546
|
+
if (position === "right") return ["top-right", "bottom-right"];
|
|
42547
|
+
if (host.mainWidth !== "full") return [position];
|
|
42548
|
+
const vertical = position.startsWith("top") ? "top" : "bottom";
|
|
42549
|
+
return [`${vertical}-left`, `${vertical}-right`];
|
|
42550
|
+
}
|
|
42551
|
+
function clear(host) {
|
|
42552
|
+
host.removeAttribute("data-media-corner");
|
|
42553
|
+
host.removeAttribute("data-main-corner");
|
|
42554
|
+
}
|
|
42555
|
+
/**
|
|
42556
|
+
* Works out which corners are rounded and writes them onto the host as
|
|
42557
|
+
* `data-media-corner` and `data-main-corner`, which the corner stylesheet
|
|
42558
|
+
* keys off. Without `corner`, or where a corner does not fit the shape
|
|
42559
|
+
* language, both are removed and the hero is rectangular.
|
|
42560
|
+
*/
|
|
42561
|
+
function applyCorner(host) {
|
|
42562
|
+
if (host.corner === null || host.corner === void 0) {
|
|
42563
|
+
clear(host);
|
|
42564
|
+
return;
|
|
42565
|
+
}
|
|
42566
|
+
const center = host.mainPosition === "top-center" || host.mainPosition === "bottom-center";
|
|
42567
|
+
const position = Object.prototype.hasOwnProperty.call(MAIN_CORNER, host.mainPosition) ? host.mainPosition : "bottom-left";
|
|
42568
|
+
if (host._hasMedia && (host.layout !== "contained" || center)) {
|
|
42569
|
+
clear(host);
|
|
42570
|
+
return;
|
|
42571
|
+
}
|
|
42572
|
+
const value = host.corner.trim();
|
|
42573
|
+
const chosen = CORNERS.includes(value) ? value : null;
|
|
42574
|
+
const covered = host._hasMedia ? coveredCorners(host, position) : [];
|
|
42575
|
+
let mediaCorner = chosen ?? AUTO_MEDIA_CORNER[position];
|
|
42576
|
+
if (!chosen && covered.includes(mediaCorner)) {
|
|
42577
|
+
const horizontal = mediaCorner.endsWith("left") ? "left" : "right";
|
|
42578
|
+
mediaCorner = `${mediaCorner.startsWith("top") ? "bottom" : "top"}-${horizontal}`;
|
|
42579
|
+
}
|
|
42580
|
+
const mainCorner = host._hasMedia && host.mainWidth !== "full" ? MAIN_CORNER[position] : null;
|
|
42581
|
+
host.setAttribute("data-media-corner", mediaCorner);
|
|
42582
|
+
if (mainCorner) host.setAttribute("data-main-corner", mainCorner);
|
|
42583
|
+
else host.removeAttribute("data-main-corner");
|
|
42584
|
+
}
|
|
42585
|
+
//#endregion
|
|
41984
42586
|
//#region src/components/layout/page-sections/hero/hero.ts
|
|
41985
42587
|
/**
|
|
41986
42588
|
* Nederlandse Digitale Dienst Hero Component (Lit + TypeScript)
|
|
41987
42589
|
*
|
|
41988
42590
|
* The section that says what a page is for: it names the main goal of what
|
|
41989
42591
|
* you can find there, draws the eye and is the visual welcome. It has a media
|
|
41990
|
-
* area and a text panel (the main) that can stand in eight positions.
|
|
41991
|
-
*
|
|
41992
|
-
* they are, such as a home or a topic
|
|
41993
|
-
* that, a section with a title is enough.
|
|
42592
|
+
* area and a text panel (the main) that can stand in eight positions. The
|
|
42593
|
+
* areas are rectangular; `corner` rounds one corner of each. Use it on pages
|
|
42594
|
+
* where a visitor first has to know where they are, such as a home or a topic
|
|
42595
|
+
* page; where the title already does that, a section with a title is enough.
|
|
41994
42596
|
*
|
|
41995
42597
|
* The image in a hero sets the mood and is never the main content, so the
|
|
41996
42598
|
* panel always stands on it. Over an image the panel keeps a section gap from
|
|
@@ -42029,6 +42631,7 @@ function heroTemplate(component) {
|
|
|
42029
42631
|
* @attr {string} width - Body max-width; 'full' removes the bound (section API)
|
|
42030
42632
|
* @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.
|
|
42031
42633
|
* @attr {string} padding-block - Block padding override, also per edge and responsive (section API)
|
|
42634
|
+
* @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"`
|
|
42032
42635
|
* @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
|
|
42033
42636
|
* @attr {string} main-background - Surface color of the panel: 'base' (the base surface)
|
|
42034
42637
|
* or a category color — 'accent' (default) or a Rijkshuisstijl color such as
|
|
@@ -42072,6 +42675,7 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42072
42675
|
constructor(..._args) {
|
|
42073
42676
|
super(..._args);
|
|
42074
42677
|
this.width = "";
|
|
42678
|
+
this.corner = null;
|
|
42075
42679
|
this.layout = "overlap";
|
|
42076
42680
|
this.mainBackground = "accent";
|
|
42077
42681
|
this.mainWidth = "auto";
|
|
@@ -42095,6 +42699,7 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42095
42699
|
willUpdate(changed) {
|
|
42096
42700
|
super.willUpdate(changed);
|
|
42097
42701
|
this.toggleAttribute("data-has-media", this._hasMedia);
|
|
42702
|
+
applyCorner(this);
|
|
42098
42703
|
}
|
|
42099
42704
|
connectedCallback() {
|
|
42100
42705
|
super.connectedCallback();
|
|
@@ -42173,11 +42778,15 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42173
42778
|
render() {
|
|
42174
42779
|
return heroTemplate(this);
|
|
42175
42780
|
}
|
|
42176
|
-
}, _NLDDHero.styles = heroStyles, _NLDDHero);
|
|
42781
|
+
}, _NLDDHero.styles = [heroStyles, heroCornerStyles], _NLDDHero);
|
|
42177
42782
|
__decorate([property({
|
|
42178
42783
|
reflect: true,
|
|
42179
42784
|
converter: reflectNonDefault("")
|
|
42180
42785
|
})], NLDDHero.prototype, "width", void 0);
|
|
42786
|
+
__decorate([property({
|
|
42787
|
+
type: String,
|
|
42788
|
+
reflect: true
|
|
42789
|
+
})], NLDDHero.prototype, "corner", void 0);
|
|
42181
42790
|
__decorate([property({
|
|
42182
42791
|
reflect: true,
|
|
42183
42792
|
converter: reflectNonDefault("overlap")
|
|
@@ -44325,7 +44934,7 @@ var cardStyles = css`
|
|
|
44325
44934
|
}
|
|
44326
44935
|
}
|
|
44327
44936
|
|
|
44328
|
-
|
|
44937
|
+
:host([data-action-pressed]) .card {
|
|
44329
44938
|
--_card-border-color: var(--_card-is-active-border-color);
|
|
44330
44939
|
background-color: var(--_card-is-active-background-color);
|
|
44331
44940
|
}
|
|
@@ -44386,7 +44995,7 @@ var cardStyles = css`
|
|
|
44386
44995
|
pointer-events: none;
|
|
44387
44996
|
}
|
|
44388
44997
|
|
|
44389
|
-
:host(
|
|
44998
|
+
:host([data-action-focused]) .card__focus-ring {
|
|
44390
44999
|
display: block;
|
|
44391
45000
|
}
|
|
44392
45001
|
|
|
@@ -44481,7 +45090,8 @@ var nlddCardTranslations = { "components.card.opens-in-new-tab-label": "Opent in
|
|
|
44481
45090
|
* above it with `position: relative; z-index: 1` to stay clickable.
|
|
44482
45091
|
* A card that is a link or button steps its surface and border one shade up
|
|
44483
45092
|
* on hover and one more while pressed, as a neutral-base button does; content
|
|
44484
|
-
* lifted above the overlay does not set it off.
|
|
45093
|
+
* lifted above the overlay does not set it off. On a touch screen there is no
|
|
45094
|
+
* hover, and a touch that turns into a scroll lets go of the pressed shade.
|
|
44485
45095
|
*
|
|
44486
45096
|
* @element nldd-card
|
|
44487
45097
|
*
|
|
@@ -44514,6 +45124,18 @@ var _NLDDCard = class NLDDCard extends withTranslations(LitElement, nlddCardTran
|
|
|
44514
45124
|
this._onFocusOut = () => {
|
|
44515
45125
|
this._actionFocused = false;
|
|
44516
45126
|
};
|
|
45127
|
+
this._onPointerDown = (e) => {
|
|
45128
|
+
if (e.button > 0) return;
|
|
45129
|
+
if (!e.composedPath()[0]?.matches?.(".card__action")) return;
|
|
45130
|
+
this.toggleAttribute("data-action-pressed", true);
|
|
45131
|
+
window.addEventListener("pointerup", this._clearPressed);
|
|
45132
|
+
window.addEventListener("pointercancel", this._clearPressed);
|
|
45133
|
+
};
|
|
45134
|
+
this._clearPressed = () => {
|
|
45135
|
+
window.removeEventListener("pointerup", this._clearPressed);
|
|
45136
|
+
window.removeEventListener("pointercancel", this._clearPressed);
|
|
45137
|
+
this.removeAttribute("data-action-pressed");
|
|
45138
|
+
};
|
|
44517
45139
|
this._onSlotChange = (e) => {
|
|
44518
45140
|
const slot = e.target;
|
|
44519
45141
|
const wrapper = slot.parentElement;
|
|
@@ -44524,15 +45146,18 @@ var _NLDDCard = class NLDDCard extends withTranslations(LitElement, nlddCardTran
|
|
|
44524
45146
|
super.connectedCallback();
|
|
44525
45147
|
this.addEventListener("focusin", this._onFocusIn);
|
|
44526
45148
|
this.addEventListener("focusout", this._onFocusOut);
|
|
45149
|
+
this.addEventListener("pointerdown", this._onPointerDown);
|
|
44527
45150
|
this.style.containerType = "inline-size";
|
|
44528
45151
|
this.style.containerName = "layout-container";
|
|
44529
45152
|
}
|
|
44530
45153
|
updated() {
|
|
44531
|
-
this.
|
|
45154
|
+
this.toggleAttribute("data-action-focused", this._actionFocused);
|
|
44532
45155
|
}
|
|
44533
45156
|
disconnectedCallback() {
|
|
44534
45157
|
this.removeEventListener("focusin", this._onFocusIn);
|
|
44535
45158
|
this.removeEventListener("focusout", this._onFocusOut);
|
|
45159
|
+
this.removeEventListener("pointerdown", this._onPointerDown);
|
|
45160
|
+
this._clearPressed();
|
|
44536
45161
|
super.disconnectedCallback();
|
|
44537
45162
|
}
|
|
44538
45163
|
render() {
|
|
@@ -44575,7 +45200,8 @@ var collectionStyles = css`
|
|
|
44575
45200
|
/* # Host */
|
|
44576
45201
|
|
|
44577
45202
|
:host {
|
|
44578
|
-
--_collection-item-width: var(--primitives-area-280);
|
|
45203
|
+
--_collection-item-min-width: var(--primitives-area-280);
|
|
45204
|
+
--_collection-item-max-width: var(--primitives-area-480);
|
|
44579
45205
|
--_collection-focus-ring-z-index: 1;
|
|
44580
45206
|
|
|
44581
45207
|
/* Two sets, because a collection inside a layout-container follows that
|
|
@@ -44618,10 +45244,10 @@ var collectionStyles = css`
|
|
|
44618
45244
|
|
|
44619
45245
|
:host([layout="grid"]) .collection__items,
|
|
44620
45246
|
:host(:not([layout])) .collection__items {
|
|
44621
|
-
/* min(item-width, 100%) clamps the track min to the container width so
|
|
45247
|
+
/* min(item-min-width, 100%) clamps the track min to the container width so
|
|
44622
45248
|
a single column never forces horizontal overflow on narrow screens. */
|
|
44623
45249
|
display: grid;
|
|
44624
|
-
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-width), 100%), 1fr));
|
|
45250
|
+
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-min-width), 100%), 1fr));
|
|
44625
45251
|
}
|
|
44626
45252
|
|
|
44627
45253
|
/* A grid item's automatic minimum is min-content, so one long unbreakable
|
|
@@ -44647,7 +45273,7 @@ var collectionStyles = css`
|
|
|
44647
45273
|
load-more adds to it. */
|
|
44648
45274
|
:host([layout="lanes"]) .collection__items {
|
|
44649
45275
|
display: grid;
|
|
44650
|
-
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-width), 100%), 1fr));
|
|
45276
|
+
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-min-width), 100%), 1fr));
|
|
44651
45277
|
}
|
|
44652
45278
|
|
|
44653
45279
|
:host([layout="lanes"]) .collection__items ::slotted(*) {
|
|
@@ -44692,10 +45318,10 @@ var collectionStyles = css`
|
|
|
44692
45318
|
}
|
|
44693
45319
|
|
|
44694
45320
|
:host([layout="horizontal-scroll"]) .collection__items ::slotted(*) {
|
|
44695
|
-
max-width: 100
|
|
45321
|
+
max-width: min(max(var(--_collection-item-min-width), var(--_collection-item-max-width)), 100%);
|
|
44696
45322
|
flex-grow: 1;
|
|
44697
45323
|
flex-shrink: 0;
|
|
44698
|
-
flex-basis: var(--_collection-item-width);
|
|
45324
|
+
flex-basis: var(--_collection-item-min-width);
|
|
44699
45325
|
scroll-snap-align: start;
|
|
44700
45326
|
}
|
|
44701
45327
|
|
|
@@ -44816,19 +45442,23 @@ var nlddCollectionTranslations = {
|
|
|
44816
45442
|
* Supports grid, stack, lanes and horizontal scroll layouts.
|
|
44817
45443
|
*
|
|
44818
45444
|
* Use it for a set of equal blocks, usually `nldd-card`s, instead of a CSS
|
|
44819
|
-
* grid of your own: the collection sets the columns from `item-width` and
|
|
44820
|
-
* available width, and the gap per breakpoint.
|
|
45445
|
+
* grid of your own: the collection sets the columns from `item-min-width` and
|
|
45446
|
+
* the available width, and the gap per breakpoint.
|
|
44821
45447
|
*
|
|
44822
45448
|
* In grid and stack modes, items are paginated via a load-more button. In
|
|
44823
45449
|
* horizontal scroll, the prev/next controls and the edge fade appear only when
|
|
44824
|
-
* the items overflow the container.
|
|
45450
|
+
* the items overflow the container. Use horizontal scroll for items that
|
|
45451
|
+
* together serve one purpose, such as the events of one agenda; it is not a
|
|
45452
|
+
* carousel for unrelated highlights, which the design guidelines advise
|
|
45453
|
+
* against.
|
|
44825
45454
|
* With `lazy-load`, the next items are automatically loaded when
|
|
44826
45455
|
* the load-more button comes into view.
|
|
44827
45456
|
*
|
|
44828
45457
|
* @element nldd-collection
|
|
44829
45458
|
*
|
|
44830
45459
|
* @attr {string} layout - Layout mode: 'grid' | 'stack' | 'lanes' | 'horizontal-scroll' (default: 'grid')
|
|
44831
|
-
* @attr {string} item-width -
|
|
45460
|
+
* @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.
|
|
45461
|
+
* @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.
|
|
44832
45462
|
* @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.
|
|
44833
45463
|
* @attr {string} sm-gap - Gap at sm, overriding `gap` there
|
|
44834
45464
|
* @attr {string} md-gap - Gap at md, overriding `gap` there
|
|
@@ -44838,6 +45468,10 @@ var nlddCollectionTranslations = {
|
|
|
44838
45468
|
* @attr {boolean} show-load-more - Show load-more button in grid/stack (default: false)
|
|
44839
45469
|
* @attr {boolean} lazy-load - Automatically load more items when the button becomes visible
|
|
44840
45470
|
*
|
|
45471
|
+
* @migration Items in horizontal scroll stop at 480px (or at `item-min-width` when that is wider) instead of filling the container.
|
|
45472
|
+
* Set `item-max-width="100%"` where one or two items should still fill the row.
|
|
45473
|
+
* @migration The `item-width` attribute has been renamed to `item-min-width`, because it was a minimum in every layout.
|
|
45474
|
+
* Replace `item-width="320px"` with `item-min-width="320px"`.
|
|
44841
45475
|
* @migration The `load-more-label` attribute has been removed.
|
|
44842
45476
|
* Use `translations` property instead: `.translations=${{ 'components.collection.load-more-action': 'Show more' }}`
|
|
44843
45477
|
*
|
|
@@ -44897,6 +45531,12 @@ var _NLDDCollection = class NLDDCollection extends LitElement {
|
|
|
44897
45531
|
super.connectedCallback();
|
|
44898
45532
|
this._visibleCount = this.maxItems;
|
|
44899
45533
|
}
|
|
45534
|
+
static get observedAttributes() {
|
|
45535
|
+
return [...super.observedAttributes, "item-width"];
|
|
45536
|
+
}
|
|
45537
|
+
attributeChangedCallback(name, old, value) {
|
|
45538
|
+
super.attributeChangedCallback(name, old, value);
|
|
45539
|
+
}
|
|
44900
45540
|
disconnectedCallback() {
|
|
44901
45541
|
super.disconnectedCallback();
|
|
44902
45542
|
this._intersectionObserver?.disconnect();
|
|
@@ -44904,9 +45544,13 @@ var _NLDDCollection = class NLDDCollection extends LitElement {
|
|
|
44904
45544
|
}
|
|
44905
45545
|
updated(changedProperties) {
|
|
44906
45546
|
if (changedProperties.has("layout")) this._setupScrollListeners();
|
|
44907
|
-
if (changedProperties.has("
|
|
44908
|
-
if (this.
|
|
44909
|
-
else this.style.removeProperty("--_collection-item-width");
|
|
45547
|
+
if (changedProperties.has("itemMinWidth")) {
|
|
45548
|
+
if (this.itemMinWidth) this.style.setProperty("--_collection-item-min-width", this.itemMinWidth);
|
|
45549
|
+
else this.style.removeProperty("--_collection-item-min-width");
|
|
45550
|
+
}
|
|
45551
|
+
if (changedProperties.has("itemMaxWidth")) {
|
|
45552
|
+
if (this.itemMaxWidth) this.style.setProperty("--_collection-item-max-width", this.itemMaxWidth);
|
|
45553
|
+
else this.style.removeProperty("--_collection-item-max-width");
|
|
44910
45554
|
}
|
|
44911
45555
|
if (changedProperties.has("gap") || changedProperties.has("smGap") || changedProperties.has("mdGap") || changedProperties.has("lgGap")) {
|
|
44912
45556
|
const plain = spacingToValue(this.gap, "nldd-collection", "gap");
|
|
@@ -45001,8 +45645,13 @@ __decorate([property({
|
|
|
45001
45645
|
__decorate([property({
|
|
45002
45646
|
type: String,
|
|
45003
45647
|
reflect: true,
|
|
45004
|
-
attribute: "item-width"
|
|
45005
|
-
})], NLDDCollection.prototype, "
|
|
45648
|
+
attribute: "item-min-width"
|
|
45649
|
+
})], NLDDCollection.prototype, "itemMinWidth", void 0);
|
|
45650
|
+
__decorate([property({
|
|
45651
|
+
type: String,
|
|
45652
|
+
reflect: true,
|
|
45653
|
+
attribute: "item-max-width"
|
|
45654
|
+
})], NLDDCollection.prototype, "itemMaxWidth", void 0);
|
|
45006
45655
|
__decorate([property({
|
|
45007
45656
|
type: String,
|
|
45008
45657
|
reflect: true
|
|
@@ -45233,7 +45882,7 @@ var nlddWindowTranslations = { "components.window.accessible-label": "Venster" }
|
|
|
45233
45882
|
* @attr {boolean} centered - Centers both axes on the viewport. Overridable per axis: `centered top="0"` is horizontally centered, top aligned. Mirrors CSS `place-items: center` with `align-items`/`justify-items` overrides.
|
|
45234
45883
|
* @attr {string} accessible-label - Accessible name (aria-label). Unset, the window takes the text of the nldd-top-title-bar inside it, and without one the i18n default ('Venster'). Each window needs a unique, descriptive name, from either.
|
|
45235
45884
|
* @attr {object} translations - Override translation keys; unset keys fall back to the Dutch default.
|
|
45236
|
-
* @attr {boolean} no-light-dismiss - A click on the backdrop does not close the window. For windows where dismissing by accident costs work: a
|
|
45885
|
+
* @attr {boolean} no-light-dismiss - A click on the backdrop does not close the window. For windows where dismissing by accident costs work: a process of several steps, a form with filled-in fields. Escape and the dismiss button keep working.
|
|
45237
45886
|
* @attr {boolean} open - Whether the window is open. Set it to open or close the window, as an alternative to show() and hide(). The window clears it itself when it closes another way (Escape, the backdrop, the close button of its title bar), so bind it together with the close event.
|
|
45238
45887
|
*
|
|
45239
45888
|
* @slot - Complete window content (e.g. nldd-page)
|
|
@@ -46344,6 +46993,10 @@ var tableStyles = css`
|
|
|
46344
46993
|
padding: var(--primitives-space-16);
|
|
46345
46994
|
}
|
|
46346
46995
|
|
|
46996
|
+
.table__empty-cell slot[hidden] {
|
|
46997
|
+
display: none;
|
|
46998
|
+
}
|
|
46999
|
+
|
|
46347
47000
|
/* Empty state: collapse the column tracks to a single box-wide column so the
|
|
46348
47001
|
message spans the surface instead of the (wider) data columns — otherwise
|
|
46349
47002
|
the empty box scrolls horizontally. */
|
|
@@ -46426,6 +47079,9 @@ function tableTemplate() {
|
|
|
46426
47079
|
role="cell"
|
|
46427
47080
|
>
|
|
46428
47081
|
<slot name="empty"></slot>
|
|
47082
|
+
<slot name="no-results"
|
|
47083
|
+
hidden
|
|
47084
|
+
></slot>
|
|
46429
47085
|
</div>
|
|
46430
47086
|
</div>
|
|
46431
47087
|
`;
|
|
@@ -46481,7 +47137,8 @@ var nlddTableTranslations = { "components.table.accessible-label": "Tabel" };
|
|
|
46481
47137
|
*
|
|
46482
47138
|
* @slot header - One `<nldd-table-row slot="header">` carrying the column headers
|
|
46483
47139
|
* @slot - The body rows (`<nldd-table-row>`)
|
|
46484
|
-
* @slot empty - Shown when
|
|
47140
|
+
* @slot empty - Shown when the table has no body rows (the header is hidden too). Empty by default: what an empty table should say is the app's to write, so put an `nldd-inline-dialog` here.
|
|
47141
|
+
* @slot no-results - Shown when the table has body rows but every one of them is `[hidden]`, which is what consumer-driven filtering leaves behind. A different state from `empty` and a different sentence: say that nothing matches and how to get rows back. Falls back to `[slot="empty"]` when not given.
|
|
46485
47142
|
*
|
|
46486
47143
|
* @element nldd-table-row
|
|
46487
47144
|
*
|
|
@@ -46548,19 +47205,25 @@ var NLDDTable = (_NLDDTable = class NLDDTable extends LitElement {
|
|
|
46548
47205
|
});
|
|
46549
47206
|
this._updateEmpty();
|
|
46550
47207
|
}
|
|
46551
|
-
/** Show the empty-state
|
|
46552
|
-
* excluded)
|
|
46553
|
-
*
|
|
46554
|
-
*
|
|
47208
|
+
/** Show the empty-state row when there are no visible body rows (header
|
|
47209
|
+
* excluded), with the no-results slot when there are rows that are all
|
|
47210
|
+
* hidden and the empty slot otherwise. Toggled imperatively (like the
|
|
47211
|
+
* tabindex affordance) so it doesn't schedule a reactive re-render out of
|
|
47212
|
+
* firstUpdated. The `is-empty` host class drives hiding the header (CSS)
|
|
47213
|
+
* so only the message shows. */
|
|
46555
47214
|
_updateEmpty() {
|
|
46556
47215
|
const empty = this.shadowRoot?.querySelector(".table__empty");
|
|
46557
47216
|
if (!empty) return;
|
|
46558
47217
|
const rows = ((this.shadowRoot?.querySelector("slot:not([name])"))?.assignedElements() ?? []).filter((el) => el.localName === "nldd-table-row");
|
|
46559
47218
|
const isEmpty = rows.length === 0 || rows.every((row) => row.hasAttribute("hidden"));
|
|
47219
|
+
const hasEmpty = !!this.querySelector(":scope > [slot=\"empty\"]");
|
|
47220
|
+
const noResults = isEmpty && rows.length > 0 && !!this.querySelector(":scope > [slot=\"no-results\"]");
|
|
46560
47221
|
empty.toggleAttribute("hidden", !isEmpty);
|
|
47222
|
+
this.shadowRoot?.querySelector("slot[name=\"empty\"]")?.toggleAttribute("hidden", noResults);
|
|
47223
|
+
this.shadowRoot?.querySelector("slot[name=\"no-results\"]")?.toggleAttribute("hidden", !noResults);
|
|
46561
47224
|
this.classList.toggle("is-empty", isEmpty);
|
|
46562
|
-
this.classList.toggle("is-blank", isEmpty && !
|
|
46563
|
-
this._warnSilentEmpty(isEmpty);
|
|
47225
|
+
this.classList.toggle("is-blank", isEmpty && !noResults && !hasEmpty);
|
|
47226
|
+
this._warnSilentEmpty(isEmpty, hasEmpty, rows.length > 0);
|
|
46564
47227
|
}
|
|
46565
47228
|
/**
|
|
46566
47229
|
* A table with no rows and nothing to say about that.
|
|
@@ -46571,7 +47234,7 @@ var NLDDTable = (_NLDDTable = class NLDDTable extends LitElement {
|
|
|
46571
47234
|
* tree either, so the table asks the person building it rather than
|
|
46572
47235
|
* answering for them.
|
|
46573
47236
|
*/
|
|
46574
|
-
_warnSilentEmpty(isEmpty) {}
|
|
47237
|
+
_warnSilentEmpty(isEmpty, hasEmpty, hasRows) {}
|
|
46575
47238
|
/** The track list for the current width: a breakpoint override when set,
|
|
46576
47239
|
* otherwise the base `columns`. */
|
|
46577
47240
|
_activeColumns() {
|
|
@@ -48352,7 +49015,8 @@ function template$4(component) {
|
|
|
48352
49015
|
const ariaLabel = component.accessibleLabel || (showsIconOnly ? component.text : nothing);
|
|
48353
49016
|
const tooltipText = showsIconOnly ? component.accessibleLabel || component.text : "";
|
|
48354
49017
|
const ariaCurrent = component.current ? component.currentType : nothing;
|
|
48355
|
-
const
|
|
49018
|
+
const opensNavigation = component.querySelector(":scope > nldd-menu")?.getAttribute("variant") === "navigation";
|
|
49019
|
+
const ariaHaspopup = component.expandable ? opensNavigation ? nothing : "menu" : component.haspopup || nothing;
|
|
48356
49020
|
const ariaExpanded = component.expandable || component.haspopup ? String(component.expanded) : nothing;
|
|
48357
49021
|
const icon = html`
|
|
48358
49022
|
<span class="menu-bar-item__icon" ?hidden=${!component.icon && !component._hasSlottedIcon}>
|
|
@@ -48427,11 +49091,11 @@ function template$4(component) {
|
|
|
48427
49091
|
* @attr {string} current-type - aria-current value when current is true ('page', 'step', 'location', 'true'). Default: 'page'
|
|
48428
49092
|
* @attr {string} href - Optional link URL. Without href it renders as a button.
|
|
48429
49093
|
* @attr {string} icon - Optional icon name (nldd-icon)
|
|
48430
|
-
* @attr {boolean} expandable - Show the disclosure icon and open the slotted `<nldd-menu>` on click
|
|
49094
|
+
* @attr {boolean} expandable - Show the disclosure icon and open the slotted `<nldd-menu>` on click. The control then says `aria-haspopup="menu"`, except for a menu with `variant="navigation"`: that is a list of links, so the control only says `aria-expanded`.
|
|
48431
49095
|
* @attr {boolean} icon-only - Hide the text visually (always). The text then shows as a tooltip on hover and focus.
|
|
48432
49096
|
* @attr {'icon'|'text'} content-priority - Decides what stays visible in compact mode: 'icon' hides the text, 'text' hides the icon. A bar is compact on a narrow screen and also at 200% zoom on a desktop, so with 'icon' the text is gone there too and shows as a tooltip instead.
|
|
48433
49097
|
* @attr {boolean} compact - Activates content-priority behavior (set by the parent nldd-menu-bar)
|
|
48434
|
-
* @attr {boolean} disabled - Turn interaction off
|
|
49098
|
+
* @attr {boolean} disabled - Turn interaction off. Avoid it where you can; the design guidelines say why.
|
|
48435
49099
|
* @attr {string} accessible-label - Override aria-label
|
|
48436
49100
|
* @attr {string} haspopup - aria-haspopup value (e.g. "menu", "dialog")
|
|
48437
49101
|
* @attr {boolean} open - Whether the linked popover or menu is open
|
|
@@ -48467,6 +49131,7 @@ var _NLDDMenuBarItem = class NLDDMenuBarItem extends LitElement {
|
|
|
48467
49131
|
this._menuOpen = false;
|
|
48468
49132
|
this._pointerdownWhileMenuOpen = false;
|
|
48469
49133
|
this._menuToggleHandler = null;
|
|
49134
|
+
this._menuVariantObserver = null;
|
|
48470
49135
|
this._hasSlottedIcon = false;
|
|
48471
49136
|
this._onIconSlotChange = (e) => {
|
|
48472
49137
|
this._hasSlottedIcon = e.target.assignedElements().length > 0;
|
|
@@ -48532,13 +49197,29 @@ var _NLDDMenuBarItem = class NLDDMenuBarItem extends LitElement {
|
|
|
48532
49197
|
this.expanded = isOpen;
|
|
48533
49198
|
};
|
|
48534
49199
|
menu.addEventListener("toggle", this._menuToggleHandler);
|
|
49200
|
+
this._menuVariantObserver = new MutationObserver(() => this.requestUpdate());
|
|
49201
|
+
this._menuVariantObserver.observe(menu, {
|
|
49202
|
+
attributes: true,
|
|
49203
|
+
attributeFilter: ["variant"]
|
|
49204
|
+
});
|
|
49205
|
+
this.requestUpdate();
|
|
48535
49206
|
}
|
|
48536
49207
|
_unwireMenu() {
|
|
48537
49208
|
if (this._menu && this._menuToggleHandler) this._menu.removeEventListener("toggle", this._menuToggleHandler);
|
|
49209
|
+
this._menuVariantObserver?.disconnect();
|
|
49210
|
+
this._menuVariantObserver = null;
|
|
48538
49211
|
this._menu = null;
|
|
48539
49212
|
this._menuToggleHandler = null;
|
|
48540
49213
|
this._menuOpen = false;
|
|
48541
49214
|
}
|
|
49215
|
+
/** How far the indicator stops short of the item's top and bottom, so the
|
|
49216
|
+
* menu can open against the indicator instead of against the item. */
|
|
49217
|
+
_indicatorInset() {
|
|
49218
|
+
const item = this.shadowRoot?.querySelector(".menu-bar-item");
|
|
49219
|
+
if (!item) return 0;
|
|
49220
|
+
const inset = parseFloat(getComputedStyle(item, "::before").top);
|
|
49221
|
+
return Number.isNaN(inset) ? 0 : inset;
|
|
49222
|
+
}
|
|
48542
49223
|
_toggleMenu() {
|
|
48543
49224
|
if (this._pointerdownWhileMenuOpen) {
|
|
48544
49225
|
this._pointerdownWhileMenuOpen = false;
|
|
@@ -48546,6 +49227,7 @@ var _NLDDMenuBarItem = class NLDDMenuBarItem extends LitElement {
|
|
|
48546
49227
|
}
|
|
48547
49228
|
if (!this._menu) return;
|
|
48548
49229
|
this._menu.anchorElement = this;
|
|
49230
|
+
this._menu.anchorOffset = -this._indicatorInset();
|
|
48549
49231
|
if (this._menuOpen) this._menu.hidePopover();
|
|
48550
49232
|
else this._menu.showPopover();
|
|
48551
49233
|
}
|
|
@@ -49083,7 +49765,7 @@ var nlddLinkTranslations = { "components.link.opens-in-new-tab-label": "Opent in
|
|
|
49083
49765
|
* @attr {string} start-icon - Icon before the text
|
|
49084
49766
|
* @attr {string} end-icon - Icon after the text
|
|
49085
49767
|
* @attr {string} accessible-label - Accessible label for screen readers
|
|
49086
|
-
* @attr {boolean} disabled - Disabled state
|
|
49768
|
+
* @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
|
|
49087
49769
|
* @attr {boolean} no-tab - Takes the control out of the tab order (tabindex="-1"), for a control owned by a roving container (a row of an nldd-list, where the arrow keys move between rows) that manages focus itself. Still mouse- and script-focusable.
|
|
49088
49770
|
* @attr {object} translations - Override translation keys (e.g. the "Opent in nieuw tabblad" announcement); unset keys fall back to Dutch.
|
|
49089
49771
|
*
|
|
@@ -49264,11 +49946,18 @@ var nlddSkipLinkTranslations = { "components.skip-link.action": "Sla over" };
|
|
|
49264
49946
|
* Nederlandse Digitale Dienst Skip Link Component (Lit + TypeScript)
|
|
49265
49947
|
*
|
|
49266
49948
|
* Accessibility pattern that lets keyboard users skip past content. Wraps
|
|
49267
|
-
* content in a default slot.
|
|
49268
|
-
*
|
|
49269
|
-
*
|
|
49270
|
-
*
|
|
49271
|
-
*
|
|
49949
|
+
* content in a default slot.
|
|
49950
|
+
*
|
|
49951
|
+
* Not only for the header of a page. Any block with many stops that someone
|
|
49952
|
+
* on a keyboard often wants to get past can have one: a set of filters, a long
|
|
49953
|
+
* toolbar, a table of contents. Keep it to blocks like that; a skip link before
|
|
49954
|
+
* every section is one more stop on the way, not one less.
|
|
49955
|
+
*
|
|
49956
|
+
* Without href it moves focus to the first rendered element after the skip
|
|
49957
|
+
* link, so the next Tab lands on the first link or button in it. An element
|
|
49958
|
+
* that is not rendered, such as a `<noscript>`, a `<script>` or anything
|
|
49959
|
+
* hidden, is passed over. Make sure a rendered element follows the component,
|
|
49960
|
+
* otherwise the skip link has no effect.
|
|
49272
49961
|
*
|
|
49273
49962
|
* With an `href` that points at an id on the same page, the link scrolls to
|
|
49274
49963
|
* that element and moves focus to it too. The target needs no `tabindex` of
|
|
@@ -49411,6 +50100,9 @@ var topNavigationBarStyles = css`
|
|
|
49411
50100
|
--_top-navigation-bar-logo-background-color: var(--semantics-brand-ribbon-color);
|
|
49412
50101
|
--_top-navigation-bar-wordmark-content-color: light-dark(var(--primitives-color-reference-lintblauw), var(--primitives-color-neutral-1000));
|
|
49413
50102
|
--_top-navigation-bar-wordmark-max-width: 280px;
|
|
50103
|
+
--_top-navigation-bar-wordmark-title-font: var(--primitives-font-body-sm-semi-bold-flat);
|
|
50104
|
+
--_top-navigation-bar-wordmark-subtitle-font: var(--primitives-font-body-xs-regular-flat);
|
|
50105
|
+
--_top-navigation-bar-wordmark-supporting-text-font: var(--primitives-font-body-xxs-regular-flat);
|
|
49414
50106
|
--_top-navigation-bar-max-width: var(--semantics-page-sections-body-max-width);
|
|
49415
50107
|
--_top-navigation-bar-title-sm-font: var(--primitives-font-display-6-sm);
|
|
49416
50108
|
--_top-navigation-bar-title-md-font: var(--primitives-font-display-5-sm);
|
|
@@ -49540,7 +50232,14 @@ var topNavigationBarStyles = css`
|
|
|
49540
50232
|
}
|
|
49541
50233
|
}
|
|
49542
50234
|
|
|
50235
|
+
.top-navigation-bar__logo > span {
|
|
50236
|
+
display: block;
|
|
50237
|
+
width: 100%;
|
|
50238
|
+
height: 100%;
|
|
50239
|
+
}
|
|
50240
|
+
|
|
49543
50241
|
.top-navigation-bar__logo svg {
|
|
50242
|
+
display: block;
|
|
49544
50243
|
width: 100%;
|
|
49545
50244
|
height: 100%;
|
|
49546
50245
|
}
|
|
@@ -49661,19 +50360,19 @@ var topNavigationBarStyles = css`
|
|
|
49661
50360
|
|
|
49662
50361
|
.top-navigation-bar__wordmark-title {
|
|
49663
50362
|
margin: 0;
|
|
49664
|
-
font: var(--
|
|
50363
|
+
font: var(--_top-navigation-bar-wordmark-title-font);
|
|
49665
50364
|
text-wrap: balance;
|
|
49666
50365
|
}
|
|
49667
50366
|
|
|
49668
50367
|
.top-navigation-bar__wordmark-subtitle {
|
|
49669
50368
|
margin: 0;
|
|
49670
|
-
font: var(--
|
|
50369
|
+
font: var(--_top-navigation-bar-wordmark-subtitle-font);
|
|
49671
50370
|
text-wrap: balance;
|
|
49672
50371
|
}
|
|
49673
50372
|
|
|
49674
50373
|
.top-navigation-bar__wordmark-supporting-text {
|
|
49675
50374
|
margin: 0;
|
|
49676
|
-
font: var(--
|
|
50375
|
+
font: var(--_top-navigation-bar-wordmark-supporting-text-font);
|
|
49677
50376
|
text-wrap: balance;
|
|
49678
50377
|
}
|
|
49679
50378
|
|
|
@@ -49996,6 +50695,13 @@ var nlddTopNavigationBarTranslations = {
|
|
|
49996
50695
|
* the global navigation and the utility navigation. On narrow widths the global
|
|
49997
50696
|
* navigation moves into a menu sheet behind the menu button.
|
|
49998
50697
|
*
|
|
50698
|
+
* The top bar of a website, and of nothing else: put it in the `header` slot
|
|
50699
|
+
* of an `nldd-page`. Do not combine it with a split view. A split view is the
|
|
50700
|
+
* layout of an application, whose panes carry a bar of their own, usually an
|
|
50701
|
+
* `nldd-toolbar`, and a site header above it gives a second layer of
|
|
50702
|
+
* navigation and a second thing that scrolls. Does a page need a sidebar under
|
|
50703
|
+
* this bar, use an `nldd-sidebar-section` inside that `nldd-page`.
|
|
50704
|
+
*
|
|
49999
50705
|
* @element nldd-top-navigation-bar
|
|
50000
50706
|
*
|
|
50001
50707
|
* @attr {boolean} no-logo - Hides the whole logo bar, wordmark included.
|
|
@@ -50279,6 +50985,8 @@ var _NLDDTopNavigationBar = class NLDDTopNavigationBar extends withTranslations(
|
|
|
50279
50985
|
page.appendChild(titleBar);
|
|
50280
50986
|
const section = document.createElement("nldd-simple-section");
|
|
50281
50987
|
this._globalMenuSheetList = document.createElement("nldd-list");
|
|
50988
|
+
this._globalMenuSheetList.setAttribute("type", "navigation");
|
|
50989
|
+
this._globalMenuSheetList.setAttribute("aria-label", this._getSlottedMenuBar(this._globalSlot)?.getAttribute("accessible-label") || this._t("components.top-navigation-bar.global-menu-bar-label"));
|
|
50282
50990
|
this._globalMenuSheetList.setAttribute("appearance", "simple");
|
|
50283
50991
|
this._globalMenuSheetList.setAttribute("dividers", "never");
|
|
50284
50992
|
section.appendChild(this._globalMenuSheetList);
|
|
@@ -50305,6 +51013,7 @@ var _NLDDTopNavigationBar = class NLDDTopNavigationBar extends withTranslations(
|
|
|
50305
51013
|
text: item.text,
|
|
50306
51014
|
href: sanitizeUrl(item.href) ?? "",
|
|
50307
51015
|
selected: item.current,
|
|
51016
|
+
currentType: item.currentType,
|
|
50308
51017
|
submenu: item.querySelector(":scope > nldd-menu"),
|
|
50309
51018
|
activate: () => item.click()
|
|
50310
51019
|
}));
|
|
@@ -50363,6 +51072,7 @@ var _NLDDTopNavigationBar = class NLDDTopNavigationBar extends withTranslations(
|
|
|
50363
51072
|
});
|
|
50364
51073
|
}
|
|
50365
51074
|
if (entry.selected) listItem.setAttribute("selected", "");
|
|
51075
|
+
if (entry.currentType) listItem.setAttribute("current-type", entry.currentType);
|
|
50366
51076
|
if (focusOpenerText !== void 0 && entry.text === focusOpenerText) openerItem = listItem;
|
|
50367
51077
|
list.appendChild(listItem);
|
|
50368
51078
|
}
|
|
@@ -50487,19 +51197,83 @@ var tabBarStyles = css`
|
|
|
50487
51197
|
justify-content: center;
|
|
50488
51198
|
}
|
|
50489
51199
|
|
|
50490
|
-
.tab-
|
|
50491
|
-
display:
|
|
51200
|
+
.tab-bar__box {
|
|
51201
|
+
display: flex;
|
|
50492
51202
|
position: relative;
|
|
50493
51203
|
border-radius: var(--_tab-bar-corner-radius);
|
|
50494
51204
|
background-color: var(--semantics-buttons-neutral-tinted-background-color);
|
|
50495
51205
|
min-width: 0;
|
|
51206
|
+
align-items: center;
|
|
51207
|
+
gap: var(--_tab-bar-gap);
|
|
51208
|
+
}
|
|
51209
|
+
|
|
51210
|
+
.tab-bar__items {
|
|
51211
|
+
display: grid;
|
|
51212
|
+
min-width: 0;
|
|
50496
51213
|
grid-auto-flow: column;
|
|
50497
51214
|
grid-auto-columns: auto;
|
|
50498
51215
|
align-items: center;
|
|
50499
51216
|
gap: var(--_tab-bar-gap);
|
|
50500
51217
|
}
|
|
50501
51218
|
|
|
50502
|
-
.tab-
|
|
51219
|
+
.tab-bar__overflow-button {
|
|
51220
|
+
flex-shrink: 0;
|
|
51221
|
+
}
|
|
51222
|
+
|
|
51223
|
+
.tab-bar__overflow-button[hidden] {
|
|
51224
|
+
display: none;
|
|
51225
|
+
}
|
|
51226
|
+
|
|
51227
|
+
::slotted(nldd-tab-bar-item[data-overflow]) {
|
|
51228
|
+
display: none;
|
|
51229
|
+
}
|
|
51230
|
+
|
|
51231
|
+
:host([data-overflowing]) {
|
|
51232
|
+
display: block;
|
|
51233
|
+
width: 100%;
|
|
51234
|
+
}
|
|
51235
|
+
|
|
51236
|
+
:host([data-overflowing]) .tab-bar__box {
|
|
51237
|
+
flex-grow: 1;
|
|
51238
|
+
}
|
|
51239
|
+
|
|
51240
|
+
:host([data-overflowing]) .tab-bar__items {
|
|
51241
|
+
display: flex;
|
|
51242
|
+
flex-grow: 1;
|
|
51243
|
+
}
|
|
51244
|
+
|
|
51245
|
+
:host([data-overflowing]) ::slotted(nldd-tab-bar-item) {
|
|
51246
|
+
min-width: 0;
|
|
51247
|
+
flex-grow: var(--_tab-bar-item-natural-width);
|
|
51248
|
+
flex-shrink: 1;
|
|
51249
|
+
flex-basis: calc(var(--_tab-bar-item-natural-width) * 1px);
|
|
51250
|
+
}
|
|
51251
|
+
|
|
51252
|
+
/* Measuring: the bar at the full width it may take, every tab at the width
|
|
51253
|
+
its content wants, the overflow button present. Never painted. */
|
|
51254
|
+
:host([data-measuring]) {
|
|
51255
|
+
display: block;
|
|
51256
|
+
width: 100%;
|
|
51257
|
+
}
|
|
51258
|
+
|
|
51259
|
+
:host([hidden]) {
|
|
51260
|
+
display: none;
|
|
51261
|
+
}
|
|
51262
|
+
|
|
51263
|
+
:host([data-measuring]) .tab-bar__items {
|
|
51264
|
+
display: grid;
|
|
51265
|
+
grid-auto-columns: max-content;
|
|
51266
|
+
}
|
|
51267
|
+
|
|
51268
|
+
:host([data-measuring]) ::slotted(nldd-tab-bar-item[data-overflow]) {
|
|
51269
|
+
display: inline-block;
|
|
51270
|
+
}
|
|
51271
|
+
|
|
51272
|
+
:host([data-measuring]) .tab-bar__overflow-button[hidden] {
|
|
51273
|
+
display: block;
|
|
51274
|
+
}
|
|
51275
|
+
|
|
51276
|
+
.tab-bar__box::after {
|
|
50503
51277
|
content: '';
|
|
50504
51278
|
position: absolute;
|
|
50505
51279
|
inset: 0;
|
|
@@ -50536,6 +51310,7 @@ var tabBarItemStyles = css`
|
|
|
50536
51310
|
--_tab-bar-item-icon-size: var(--semantics-buttons-md-icon-size);
|
|
50537
51311
|
--_tab-bar-item-highlight-border-color: transparent;
|
|
50538
51312
|
--_tab-bar-item-content-z-index: 1;
|
|
51313
|
+
--_tab-bar-item-natural-width: 0;
|
|
50539
51314
|
|
|
50540
51315
|
${inheritedTextReset}
|
|
50541
51316
|
display: inline-block;
|
|
@@ -50718,11 +51493,40 @@ function tabBarTemplate(component) {
|
|
|
50718
51493
|
const label = component.accessibleLabel || "Tabs";
|
|
50719
51494
|
const isNavigation = component.navigation;
|
|
50720
51495
|
const itemsContainer = html`
|
|
50721
|
-
<div class="tab-
|
|
50722
|
-
|
|
50723
|
-
|
|
50724
|
-
|
|
50725
|
-
|
|
51496
|
+
<div class="tab-bar__box">
|
|
51497
|
+
<div class="tab-bar__items"
|
|
51498
|
+
role=${isNavigation ? nothing : "tablist"}
|
|
51499
|
+
aria-label=${isNavigation ? nothing : label}
|
|
51500
|
+
>
|
|
51501
|
+
<slot @slotchange=${component._onSlotChange}></slot>
|
|
51502
|
+
</div>
|
|
51503
|
+
<div class="tab-bar__overflow-button"
|
|
51504
|
+
?hidden=${component._overflowItems.length === 0}
|
|
51505
|
+
>
|
|
51506
|
+
<nldd-icon-button
|
|
51507
|
+
appearance="neutral-tinted"
|
|
51508
|
+
no-highlight-border
|
|
51509
|
+
icon="ellipsis"
|
|
51510
|
+
text=${component._t("components.tab-bar.overflow-action")}
|
|
51511
|
+
size=${component.size}
|
|
51512
|
+
?hide-lg-text=${component.variant !== "icon-and-text"}
|
|
51513
|
+
?disabled=${component.disabled}
|
|
51514
|
+
>
|
|
51515
|
+
<nldd-menu
|
|
51516
|
+
slot="popup"
|
|
51517
|
+
placement="bottom-end"
|
|
51518
|
+
>
|
|
51519
|
+
${component._overflowItems.map((item) => html`
|
|
51520
|
+
<nldd-menu-item
|
|
51521
|
+
text=${item.text}
|
|
51522
|
+
icon=${item.icon || nothing}
|
|
51523
|
+
href=${sanitizeUrl(item.href) || nothing}
|
|
51524
|
+
@select=${(event) => component._selectFromOverflow(event, item)}
|
|
51525
|
+
></nldd-menu-item>
|
|
51526
|
+
`)}
|
|
51527
|
+
</nldd-menu>
|
|
51528
|
+
</nldd-icon-button>
|
|
51529
|
+
</div>
|
|
50726
51530
|
</div>
|
|
50727
51531
|
`;
|
|
50728
51532
|
if (isNavigation) return html`
|
|
@@ -50785,6 +51589,9 @@ function tabBarItemTemplate(component) {
|
|
|
50785
51589
|
return result;
|
|
50786
51590
|
}
|
|
50787
51591
|
//#endregion
|
|
51592
|
+
//#region src/components/navigation/tab-bar/tab-bar.i18n.ts
|
|
51593
|
+
var nlddTabBarTranslations = { "components.tab-bar.overflow-action": "Meer tabs" };
|
|
51594
|
+
//#endregion
|
|
50788
51595
|
//#region src/components/navigation/tab-bar/tab-bar.ts
|
|
50789
51596
|
/**
|
|
50790
51597
|
* Nederlandse Digitale Dienst Tab Bar Component (Lit + TypeScript)
|
|
@@ -50792,13 +51599,27 @@ function tabBarItemTemplate(component) {
|
|
|
50792
51599
|
* A horizontal navigation bar with mutually exclusive tabs.
|
|
50793
51600
|
* Exports both NLDDTabBar and NLDDTabBarItem.
|
|
50794
51601
|
*
|
|
51602
|
+
* When the tabs do not fit, the ones that do not fit go behind a "Meer tabs"
|
|
51603
|
+
* button at the end, in a menu. The current tab always stays in the bar: if it
|
|
51604
|
+
* would fall in the part that does not fit, another tab goes to the menu in its
|
|
51605
|
+
* place. While tabs are in the menu, the bar fills its container and the tabs in
|
|
51606
|
+
* it share the width in proportion to their own. Choosing a tab in the bar
|
|
51607
|
+
* changes nothing about what is shown; choosing one from the menu swaps it with
|
|
51608
|
+
* the last tab in the bar, so the bar does not jump. `centered` has no effect
|
|
51609
|
+
* then. In an nldd-toolbar the other items go to the toolbar's menu first, by
|
|
51610
|
+
* their priority; when it is the bar's turn, it narrows down to the current tab
|
|
51611
|
+
* beside its button, and only then moves into the toolbar's menu as a whole.
|
|
51612
|
+
* Tabs are hidden, never moved, so a framework that renders them finds
|
|
51613
|
+
* them where it put them. Only a tab that does not fit on its own is cut off.
|
|
51614
|
+
*
|
|
50795
51615
|
* @element nldd-tab-bar
|
|
50796
51616
|
* @attr {string} variant - Visual mode: 'icon-and-text' | 'text' | 'icon'. When unset, the variant is inferred from each item's content. Drives the layout at every size.
|
|
50797
51617
|
* @attr {string} size - Size: 'md' | 'lg' (default: 'md'). 'lg' enlarges the touch target; the per-variant layout is preserved (icon-and-text stacks the icon over the text, text renders large text, icon renders a larger icon-only control).
|
|
50798
51618
|
* @attr {boolean} navigation - Renders a nav landmark instead of tablist; use for href-based items that navigate between routes
|
|
50799
|
-
* @attr {boolean} disabled - Disables the whole bar: dims it, blocks pointer interaction, and takes the tabs out of the tab order
|
|
51619
|
+
* @attr {boolean} disabled - Disables the whole bar: dims it, blocks pointer interaction, and takes the tabs out of the tab order. Avoid it where you can; the design guidelines say why.
|
|
50800
51620
|
* @attr {boolean} centered - Centers the tabs in the container (host fills the row, tabs group in the middle)
|
|
50801
51621
|
* @attr {string} accessible-label - Accessible name for the navigation region; defaults to 'Tabs'
|
|
51622
|
+
* @attr {object} translations - Override translation keys (e.g. the overflow button label); unset keys fall back to Dutch.
|
|
50802
51623
|
*
|
|
50803
51624
|
* @slot - nldd-tab-bar-item elements
|
|
50804
51625
|
*
|
|
@@ -50897,7 +51718,7 @@ __decorate([state()], NLDDTabBarItem.prototype, "_navigation", void 0);
|
|
|
50897
51718
|
__decorate([state()], NLDDTabBarItem.prototype, "_isFallbackFocusable", void 0);
|
|
50898
51719
|
__decorate([state()], NLDDTabBarItem.prototype, "_groupDisabled", void 0);
|
|
50899
51720
|
NLDDTabBarItem = __decorate([customElement("nldd-tab-bar-item")], NLDDTabBarItem);
|
|
50900
|
-
var NLDDTabBar = (_NLDDTabBar = class NLDDTabBar extends LitElement {
|
|
51721
|
+
var NLDDTabBar = (_NLDDTabBar = class NLDDTabBar extends withTranslations(LitElement, nlddTabBarTranslations) {
|
|
50901
51722
|
constructor(..._args2) {
|
|
50902
51723
|
super(..._args2);
|
|
50903
51724
|
this.centered = false;
|
|
@@ -50907,21 +51728,31 @@ var NLDDTabBar = (_NLDDTabBar = class NLDDTabBar extends LitElement {
|
|
|
50907
51728
|
this.disabled = false;
|
|
50908
51729
|
this.accessibleLabel = "";
|
|
50909
51730
|
this._hasCustomLabel = false;
|
|
51731
|
+
this._overflowItems = [];
|
|
51732
|
+
this._resizeObserver = null;
|
|
51733
|
+
this._itemObserver = null;
|
|
51734
|
+
this._overflowFrame = null;
|
|
51735
|
+
this._onlyCurrentChanged = true;
|
|
51736
|
+
this._scheduleOverflow = (full = true) => {
|
|
51737
|
+
if (full) this._onlyCurrentChanged = false;
|
|
51738
|
+
if (this._overflowFrame) return;
|
|
51739
|
+
this._overflowFrame = requestAnimationFrame(() => {
|
|
51740
|
+
this._overflowFrame = null;
|
|
51741
|
+
const swapOnly = this._onlyCurrentChanged;
|
|
51742
|
+
this._onlyCurrentChanged = true;
|
|
51743
|
+
this._updateOverflow(swapOnly);
|
|
51744
|
+
});
|
|
51745
|
+
};
|
|
51746
|
+
this._onItemsMutated = (records) => {
|
|
51747
|
+
this._scheduleOverflow(records.some((record) => record.attributeName !== "current"));
|
|
51748
|
+
};
|
|
50910
51749
|
this._handleItemSelect = (event) => {
|
|
50911
51750
|
event.stopPropagation();
|
|
50912
|
-
|
|
50913
|
-
if (!this.navigation) this._getItems().forEach((item) => {
|
|
50914
|
-
item.current = item === event.detail.item;
|
|
50915
|
-
});
|
|
50916
|
-
this.dispatchEvent(new CustomEvent("tabchange", {
|
|
50917
|
-
bubbles: true,
|
|
50918
|
-
composed: true,
|
|
50919
|
-
detail: event.detail
|
|
50920
|
-
}));
|
|
51751
|
+
this._activate(event.detail.item);
|
|
50921
51752
|
};
|
|
50922
51753
|
this._handleKeyDown = (event) => {
|
|
50923
51754
|
if (this.disabled) return;
|
|
50924
|
-
const items = this._getItems();
|
|
51755
|
+
const items = this._getItems().filter((item) => !item.hasAttribute("data-overflow"));
|
|
50925
51756
|
if (items.length === 0) return;
|
|
50926
51757
|
const currentIndex = items.findIndex((item) => item === event.target || item.contains(event.target));
|
|
50927
51758
|
let newIndex = -1;
|
|
@@ -50963,18 +51794,162 @@ var NLDDTabBar = (_NLDDTabBar = class NLDDTabBar extends LitElement {
|
|
|
50963
51794
|
super.connectedCallback();
|
|
50964
51795
|
this.addEventListener("select", this._handleItemSelect);
|
|
50965
51796
|
this.addEventListener("keydown", this._handleKeyDown);
|
|
51797
|
+
this._resizeObserver = new ResizeObserver(() => this._scheduleOverflow());
|
|
51798
|
+
this._resizeObserver.observe(this);
|
|
51799
|
+
if (this.parentElement) this._resizeObserver.observe(this.parentElement);
|
|
51800
|
+
this._itemObserver = new MutationObserver(this._onItemsMutated);
|
|
51801
|
+
this._itemObserver.observe(this, {
|
|
51802
|
+
subtree: true,
|
|
51803
|
+
attributes: true,
|
|
51804
|
+
attributeFilter: [
|
|
51805
|
+
"text",
|
|
51806
|
+
"icon",
|
|
51807
|
+
"current",
|
|
51808
|
+
"variant",
|
|
51809
|
+
"size"
|
|
51810
|
+
]
|
|
51811
|
+
});
|
|
51812
|
+
document.fonts?.ready.then(() => this._scheduleOverflow());
|
|
50966
51813
|
}
|
|
50967
51814
|
disconnectedCallback() {
|
|
50968
51815
|
super.disconnectedCallback();
|
|
50969
51816
|
this.removeEventListener("select", this._handleItemSelect);
|
|
50970
51817
|
this.removeEventListener("keydown", this._handleKeyDown);
|
|
51818
|
+
this._resizeObserver?.disconnect();
|
|
51819
|
+
this._resizeObserver = null;
|
|
51820
|
+
this._itemObserver?.disconnect();
|
|
51821
|
+
this._itemObserver = null;
|
|
51822
|
+
if (this._overflowFrame) cancelAnimationFrame(this._overflowFrame);
|
|
51823
|
+
this._overflowFrame = null;
|
|
51824
|
+
}
|
|
51825
|
+
/** Widths as the content wants them, and the room there is for them. */
|
|
51826
|
+
_measure() {
|
|
51827
|
+
const items = this._getItems();
|
|
51828
|
+
const row = this.shadowRoot?.querySelector(".tab-bar");
|
|
51829
|
+
const list = this.shadowRoot?.querySelector(".tab-bar__items");
|
|
51830
|
+
const button = this.shadowRoot?.querySelector(".tab-bar__overflow-button");
|
|
51831
|
+
if (!row || !list || !button || items.length === 0) return null;
|
|
51832
|
+
this.toggleAttribute("data-measuring", true);
|
|
51833
|
+
const available = row.clientWidth;
|
|
51834
|
+
const widths = items.map((item) => item.getBoundingClientRect().width);
|
|
51835
|
+
const gap = parseFloat(getComputedStyle(list).columnGap) || 0;
|
|
51836
|
+
const buttonWidth = button.getBoundingClientRect().width;
|
|
51837
|
+
this.removeAttribute("data-measuring");
|
|
51838
|
+
return {
|
|
51839
|
+
items,
|
|
51840
|
+
available,
|
|
51841
|
+
widths,
|
|
51842
|
+
gap,
|
|
51843
|
+
budget: available - buttonWidth - gap
|
|
51844
|
+
};
|
|
51845
|
+
}
|
|
51846
|
+
/**
|
|
51847
|
+
* @internal Read by nldd-toolbar, which gives an item holding this bar the
|
|
51848
|
+
* room to show every tab, and lets it narrow down to the current tab beside
|
|
51849
|
+
* the overflow button before the whole bar goes into the toolbar's menu.
|
|
51850
|
+
*/
|
|
51851
|
+
_toolbarWidths() {
|
|
51852
|
+
const measured = this._measure();
|
|
51853
|
+
if (!measured) return null;
|
|
51854
|
+
const { items, available, widths, gap, budget } = measured;
|
|
51855
|
+
const preferred = widths.reduce((sum, w) => sum + w, 0) + gap * (items.length - 1);
|
|
51856
|
+
if (items.length < 2) return {
|
|
51857
|
+
preferred,
|
|
51858
|
+
minimum: preferred
|
|
51859
|
+
};
|
|
51860
|
+
const current = Math.max(items.findIndex((item) => item.current), 0);
|
|
51861
|
+
const buttonWidth = available - budget - gap;
|
|
51862
|
+
return {
|
|
51863
|
+
preferred,
|
|
51864
|
+
minimum: Math.min(preferred, widths[current] + gap + buttonWidth)
|
|
51865
|
+
};
|
|
51866
|
+
}
|
|
51867
|
+
/**
|
|
51868
|
+
* Decides which tabs stay in the bar and which go to the menu.
|
|
51869
|
+
*
|
|
51870
|
+
* Measured with the bar at the full width of its container and every tab at
|
|
51871
|
+
* the width its content wants, all before the next paint.
|
|
51872
|
+
*
|
|
51873
|
+
* The set only changes when it has to. A different current tab that is
|
|
51874
|
+
* already in the bar changes nothing; one picked from the menu swaps places
|
|
51875
|
+
* with the last tab in the bar, so a single slot changes. Only a change in
|
|
51876
|
+
* the room or the content chooses the whole set again: the current tab
|
|
51877
|
+
* first, then the others in order, for as long as they fit next to the
|
|
51878
|
+
* overflow button. Tabs stay where they are in the DOM and are only hidden.
|
|
51879
|
+
*/
|
|
51880
|
+
_updateOverflow(swapOnly = false) {
|
|
51881
|
+
const measured = this._measure();
|
|
51882
|
+
if (!measured) {
|
|
51883
|
+
this._applyOverflow(this._getItems(), /* @__PURE__ */ new Set(), []);
|
|
51884
|
+
return;
|
|
51885
|
+
}
|
|
51886
|
+
const { items, available, widths, gap, budget } = measured;
|
|
51887
|
+
const width = (shown) => [...shown].reduce((sum, i) => sum + widths[i], 0) + gap * Math.max(shown.size - 1, 0);
|
|
51888
|
+
if (widths.reduce((sum, w) => sum + w, 0) + gap * (items.length - 1) <= available) {
|
|
51889
|
+
this._applyOverflow(items, /* @__PURE__ */ new Set(), widths);
|
|
51890
|
+
return;
|
|
51891
|
+
}
|
|
51892
|
+
const current = items.findIndex((item) => item.current);
|
|
51893
|
+
const previous = new Set(items.map((item, i) => item.hasAttribute("data-overflow") ? -1 : i).filter((i) => i >= 0));
|
|
51894
|
+
let shown;
|
|
51895
|
+
if (swapOnly && this._overflowItems.length > 0 && previous.size > 0) {
|
|
51896
|
+
shown = new Set(previous);
|
|
51897
|
+
if (current >= 0 && !shown.has(current)) {
|
|
51898
|
+
const last = [...shown].filter((i) => i !== current).pop();
|
|
51899
|
+
if (last !== void 0) shown.delete(last);
|
|
51900
|
+
shown.add(current);
|
|
51901
|
+
}
|
|
51902
|
+
while (shown.size > 1 && width(shown) > budget) {
|
|
51903
|
+
const last = [...shown].sort((x, y) => x - y).filter((i) => i !== current).pop();
|
|
51904
|
+
if (last === void 0) break;
|
|
51905
|
+
shown.delete(last);
|
|
51906
|
+
}
|
|
51907
|
+
} else {
|
|
51908
|
+
shown = /* @__PURE__ */ new Set();
|
|
51909
|
+
if (current >= 0) shown.add(current);
|
|
51910
|
+
for (let i = 0; i < items.length; i++) {
|
|
51911
|
+
if (i === current) continue;
|
|
51912
|
+
const next = new Set(shown).add(i);
|
|
51913
|
+
if (width(next) > budget) break;
|
|
51914
|
+
shown = next;
|
|
51915
|
+
}
|
|
51916
|
+
if (shown.size === 0) shown.add(0);
|
|
51917
|
+
}
|
|
51918
|
+
this._applyOverflow(items, new Set(items.map((_, i) => i).filter((i) => !shown.has(i))), widths);
|
|
51919
|
+
}
|
|
51920
|
+
/**
|
|
51921
|
+
* Hides the tabs that go to the menu. With an overflow the bar fills its
|
|
51922
|
+
* container and the tabs left in it share the room in proportion to the
|
|
51923
|
+
* width they want, so the bar's edge and the overflow button stay put.
|
|
51924
|
+
*/
|
|
51925
|
+
_applyOverflow(items, overflowed, widths) {
|
|
51926
|
+
const overflowing = overflowed.size > 0;
|
|
51927
|
+
this.toggleAttribute("data-overflowing", overflowing);
|
|
51928
|
+
items.forEach((item, i) => {
|
|
51929
|
+
item.toggleAttribute("data-overflow", overflowed.has(i));
|
|
51930
|
+
if (overflowing && widths[i]) item.style.setProperty("--_tab-bar-item-natural-width", String(widths[i]));
|
|
51931
|
+
else item.style.removeProperty("--_tab-bar-item-natural-width");
|
|
51932
|
+
});
|
|
51933
|
+
const next = items.filter((_, i) => overflowed.has(i));
|
|
51934
|
+
if (next.length !== this._overflowItems.length || next.some((item, i) => item !== this._overflowItems[i])) {
|
|
51935
|
+
this._overflowItems = next;
|
|
51936
|
+
this._syncItems();
|
|
51937
|
+
}
|
|
51938
|
+
}
|
|
51939
|
+
/** @internal A tab picked from the overflow menu. */
|
|
51940
|
+
_selectFromOverflow(event, item) {
|
|
51941
|
+
event.stopPropagation();
|
|
51942
|
+
this._activate(item);
|
|
50971
51943
|
}
|
|
50972
51944
|
firstUpdated() {
|
|
50973
51945
|
this._hasCustomLabel = Boolean(this.accessibleLabel);
|
|
50974
51946
|
this._syncItems();
|
|
50975
51947
|
}
|
|
50976
51948
|
updated(changedProperties) {
|
|
50977
|
-
if (changedProperties.has("variant") || changedProperties.has("size") || changedProperties.has("navigation") || changedProperties.has("disabled"))
|
|
51949
|
+
if (changedProperties.has("variant") || changedProperties.has("size") || changedProperties.has("navigation") || changedProperties.has("disabled")) {
|
|
51950
|
+
this._syncItems();
|
|
51951
|
+
this._scheduleOverflow();
|
|
51952
|
+
}
|
|
50978
51953
|
}
|
|
50979
51954
|
_getItems() {
|
|
50980
51955
|
const slot = this.shadowRoot?.querySelector("slot");
|
|
@@ -50990,13 +51965,26 @@ var NLDDTabBar = (_NLDDTabBar = class NLDDTabBar extends LitElement {
|
|
|
50990
51965
|
item._groupDisabled = this.disabled;
|
|
50991
51966
|
});
|
|
50992
51967
|
const hasCurrent = items.some((item) => item.current);
|
|
50993
|
-
const firstItem = items
|
|
51968
|
+
const firstItem = items.find((item) => !item.hasAttribute("data-overflow")) ?? null;
|
|
50994
51969
|
items.forEach((item) => {
|
|
50995
51970
|
item._isFallbackFocusable = !hasCurrent && item === firstItem;
|
|
50996
51971
|
});
|
|
50997
51972
|
}
|
|
50998
51973
|
_onSlotChange() {
|
|
50999
51974
|
this._syncItems();
|
|
51975
|
+
this._scheduleOverflow();
|
|
51976
|
+
}
|
|
51977
|
+
/** Makes a tab current (unless the bar navigates) and fires `tabchange`. */
|
|
51978
|
+
_activate(item) {
|
|
51979
|
+
if (this.disabled) return;
|
|
51980
|
+
if (!this.navigation) this._getItems().forEach((other) => {
|
|
51981
|
+
other.current = other === item;
|
|
51982
|
+
});
|
|
51983
|
+
this.dispatchEvent(new CustomEvent("tabchange", {
|
|
51984
|
+
bubbles: true,
|
|
51985
|
+
composed: true,
|
|
51986
|
+
detail: { item }
|
|
51987
|
+
}));
|
|
51000
51988
|
}
|
|
51001
51989
|
render() {
|
|
51002
51990
|
return tabBarTemplate(this);
|
|
@@ -51026,6 +52014,7 @@ __decorate([property({
|
|
|
51026
52014
|
type: String,
|
|
51027
52015
|
attribute: "accessible-label"
|
|
51028
52016
|
})], NLDDTabBar.prototype, "accessibleLabel", void 0);
|
|
52017
|
+
__decorate([state()], NLDDTabBar.prototype, "_overflowItems", void 0);
|
|
51029
52018
|
NLDDTabBar = __decorate([customElement("nldd-tab-bar")], NLDDTabBar);
|
|
51030
52019
|
//#endregion
|
|
51031
52020
|
//#region src/components/navigation/document-tab-bar/document-tab-bar.styles.ts
|
|
@@ -51046,6 +52035,9 @@ var documentTabBarStyles = css`
|
|
|
51046
52035
|
--_document-tab-bar-drag-clone-z-index: 100;
|
|
51047
52036
|
--_document-tab-bar-short-text-threshold: 200px;
|
|
51048
52037
|
--_document-tab-bar-item-min-width: 100px;
|
|
52038
|
+
--_document-tab-bar-held-item-width: auto;
|
|
52039
|
+
--_document-tab-bar-release-duration: var(--primitives-transition-duration-medium);
|
|
52040
|
+
--_document-tab-bar-release-easing: var(--primitives-transition-easing-default);
|
|
51049
52041
|
--_document-tab-bar-overflow-button-reserve: 52px; /* Used for overflowButtonReserve. Overflow button width + spacing */
|
|
51050
52042
|
--_document-tab-bar-dismiss-button-is-hovered-background-color: light-dark(var(--primitives-color-neutral-150), var(--primitives-color-neutral-250));
|
|
51051
52043
|
--_document-tab-bar-dismiss-button-is-active-background-color: light-dark(var(--primitives-color-neutral-200), var(--primitives-color-neutral-300));
|
|
@@ -51095,6 +52087,22 @@ var documentTabBarStyles = css`
|
|
|
51095
52087
|
flex-basis: 0;
|
|
51096
52088
|
}
|
|
51097
52089
|
|
|
52090
|
+
:host([data-holding-widths]) ::slotted(nldd-document-tab-bar-item) {
|
|
52091
|
+
flex-grow: 0;
|
|
52092
|
+
flex-shrink: 0;
|
|
52093
|
+
flex-basis: var(--_document-tab-bar-held-item-width);
|
|
52094
|
+
}
|
|
52095
|
+
|
|
52096
|
+
:host([data-releasing-widths]) ::slotted(nldd-document-tab-bar-item) {
|
|
52097
|
+
transition: flex-basis var(--_document-tab-bar-release-duration) var(--_document-tab-bar-release-easing);
|
|
52098
|
+
}
|
|
52099
|
+
|
|
52100
|
+
@media (prefers-reduced-motion: reduce) {
|
|
52101
|
+
:host([data-releasing-widths]) ::slotted(nldd-document-tab-bar-item) {
|
|
52102
|
+
transition: none;
|
|
52103
|
+
}
|
|
52104
|
+
}
|
|
52105
|
+
|
|
51098
52106
|
::slotted(nldd-document-tab-bar-item[hidden]) {
|
|
51099
52107
|
display: none;
|
|
51100
52108
|
}
|
|
@@ -51103,12 +52111,12 @@ var documentTabBarStyles = css`
|
|
|
51103
52111
|
flex-grow: 0;
|
|
51104
52112
|
}
|
|
51105
52113
|
|
|
51106
|
-
.document-tab-bar__overflow {
|
|
52114
|
+
.document-tab-bar__overflow-button {
|
|
51107
52115
|
flex-grow: 0;
|
|
51108
52116
|
flex-shrink: 0;
|
|
51109
52117
|
}
|
|
51110
52118
|
|
|
51111
|
-
.document-tab-bar__overflow.is-hidden {
|
|
52119
|
+
.document-tab-bar__overflow-button.is-hidden {
|
|
51112
52120
|
display: none;
|
|
51113
52121
|
}
|
|
51114
52122
|
|
|
@@ -51495,7 +52503,7 @@ function documentTabBarTemplate(component) {
|
|
|
51495
52503
|
<slot @slotchange=${component._onSlotChange}></slot>
|
|
51496
52504
|
</div>
|
|
51497
52505
|
<div class=${classMap({
|
|
51498
|
-
"document-tab-bar__overflow": true,
|
|
52506
|
+
"document-tab-bar__overflow-button": true,
|
|
51499
52507
|
"is-hidden": !hasOverflow
|
|
51500
52508
|
})}>
|
|
51501
52509
|
<nldd-icon-button
|
|
@@ -51614,13 +52622,27 @@ var nlddDocumentTabBarTranslations = {
|
|
|
51614
52622
|
* Use `translations` property instead: `.translations=${{ 'components.document-tab-bar.overflow-action': 'Tabs' }}`
|
|
51615
52623
|
* @attr {boolean} navigation - Renders a nav landmark instead of tablist; use when items have hrefs
|
|
51616
52624
|
*
|
|
52625
|
+
* The tabs can always be put in another order: drag one, or move the focused
|
|
52626
|
+
* tab with Shift+Arrow left or right. The bar moves the element itself and
|
|
52627
|
+
* fires `nldd-reorder` with where it came from and where it went.
|
|
52628
|
+
*
|
|
52629
|
+
* Closing a tab with the pointer leaves the other tabs at the width they had,
|
|
52630
|
+
* so the close button of the next one slides in under the pointer and a row
|
|
52631
|
+
* of tabs closes with one click after another. A tab that comes back out of
|
|
52632
|
+
* the overflow takes the same width, and when the overflow button goes away
|
|
52633
|
+
* it leaves room at the end. Once the pointer leaves the bar the tabs grow
|
|
52634
|
+
* into the space again, at once for anyone who asks for reduced motion.
|
|
52635
|
+
* Closing the last tab of the row, with none left in the overflow, lets them
|
|
52636
|
+
* grow into the space at once, since no next close button needs to stay in
|
|
52637
|
+
* place. Closing from the keyboard spreads them at once, without the motion.
|
|
52638
|
+
*
|
|
51617
52639
|
* @slot - nldd-document-tab-bar-item elements
|
|
51618
52640
|
* @slot end - Action buttons (e.g. new tab)
|
|
51619
52641
|
*
|
|
51620
52642
|
* @fires tabchange - Fired when a tab is selected; detail: { item }
|
|
51621
52643
|
* @fires tabdismiss - Fired when a tab is dismissed; detail: { item, nextItem }
|
|
51622
52644
|
* @fires tabempty - Fired when the last tab is dismissed
|
|
51623
|
-
* @fires nldd-reorder - Fired when
|
|
52645
|
+
* @fires nldd-reorder - Fired when a tab is moved, by dragging or with Shift+Arrow; detail: { fromIndex, toIndex }
|
|
51624
52646
|
*
|
|
51625
52647
|
* ---
|
|
51626
52648
|
*
|
|
@@ -51734,6 +52756,10 @@ var NLDDDocumentTabBar = (_NLDDDocumentTabBar2 = class NLDDDocumentTabBar extend
|
|
|
51734
52756
|
this._menu = null;
|
|
51735
52757
|
this._resizeObserver = null;
|
|
51736
52758
|
this._hasCustomLabel = false;
|
|
52759
|
+
this._holding = false;
|
|
52760
|
+
this._releaseOnRemoval = null;
|
|
52761
|
+
this._rowWidth = 0;
|
|
52762
|
+
this._itemsAtHold = /* @__PURE__ */ new Set();
|
|
51737
52763
|
this._draggingEl = null;
|
|
51738
52764
|
this._placeholder = null;
|
|
51739
52765
|
this._currentDropIndex = -1;
|
|
@@ -51849,6 +52875,12 @@ var NLDDDocumentTabBar = (_NLDDDocumentTabBar2 = class NLDDDocumentTabBar extend
|
|
|
51849
52875
|
dismissedItem.selected = false;
|
|
51850
52876
|
}
|
|
51851
52877
|
const isLastItem = items.length === 1;
|
|
52878
|
+
const visible = items.filter((item) => !item.hidden);
|
|
52879
|
+
const closesTheRow = visible[visible.length - 1] === dismissedItem && visible.length === items.length;
|
|
52880
|
+
if (!isLastItem && isPointerMode()) {
|
|
52881
|
+
this._holdWidths(items.filter((item) => item !== dismissedItem));
|
|
52882
|
+
if (closesTheRow) this._releaseOnRemoval = dismissedItem;
|
|
52883
|
+
}
|
|
51852
52884
|
this.dispatchEvent(new CustomEvent("tabdismiss", {
|
|
51853
52885
|
bubbles: true,
|
|
51854
52886
|
composed: true,
|
|
@@ -51857,12 +52889,43 @@ var NLDDDocumentTabBar = (_NLDDDocumentTabBar2 = class NLDDDocumentTabBar extend
|
|
|
51857
52889
|
nextItem
|
|
51858
52890
|
}
|
|
51859
52891
|
}));
|
|
52892
|
+
if (this._releaseOnRemoval && !this._getItems().includes(this._releaseOnRemoval)) {
|
|
52893
|
+
this._releaseOnRemoval = null;
|
|
52894
|
+
this._releaseWidths();
|
|
52895
|
+
}
|
|
51860
52896
|
if (isLastItem) this.dispatchEvent(new CustomEvent("tabempty", {
|
|
51861
52897
|
bubbles: true,
|
|
51862
52898
|
composed: true
|
|
51863
52899
|
}));
|
|
51864
52900
|
this._syncFallbackFocusable();
|
|
51865
52901
|
};
|
|
52902
|
+
this._releaseWidths = () => {
|
|
52903
|
+
this.removeEventListener("pointerleave", this._releaseWidths);
|
|
52904
|
+
this._holding = false;
|
|
52905
|
+
this._itemsAtHold.clear();
|
|
52906
|
+
this._releaseOnRemoval = null;
|
|
52907
|
+
clearTimeout(this._releasingTimer);
|
|
52908
|
+
const from = this.style.getPropertyValue("--_document-tab-bar-held-item-width");
|
|
52909
|
+
const finish = () => {
|
|
52910
|
+
this.removeAttribute("data-holding-widths");
|
|
52911
|
+
this.removeAttribute("data-releasing-widths");
|
|
52912
|
+
this.style.removeProperty("--_document-tab-bar-held-item-width");
|
|
52913
|
+
this._calculateOverflow();
|
|
52914
|
+
};
|
|
52915
|
+
const row = this.shadowRoot?.querySelector(".document-tab-bar__items");
|
|
52916
|
+
const count = this._getVisibleItems().length;
|
|
52917
|
+
const gap = row ? parseFloat(getComputedStyle(row).columnGap) || 0 : 0;
|
|
52918
|
+
const to = row && count ? (row.clientWidth - gap * (count - 1)) / count : 0;
|
|
52919
|
+
const duration = parseFloat(getComputedStyle(this).getPropertyValue("--_document-tab-bar-release-duration")) || 0;
|
|
52920
|
+
const reduced = matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
52921
|
+
if (!from || !to || !duration || reduced) {
|
|
52922
|
+
finish();
|
|
52923
|
+
return;
|
|
52924
|
+
}
|
|
52925
|
+
this.toggleAttribute("data-releasing-widths", true);
|
|
52926
|
+
this.style.setProperty("--_document-tab-bar-held-item-width", `${to}px`);
|
|
52927
|
+
this._releasingTimer = setTimeout(finish, duration + 50);
|
|
52928
|
+
};
|
|
51866
52929
|
this._handleKeyDown = (event) => {
|
|
51867
52930
|
const path = event.composedPath();
|
|
51868
52931
|
const item = path.find((el) => el instanceof Element && el.tagName.toLowerCase() === "nldd-document-tab-bar-item");
|
|
@@ -51947,6 +53010,14 @@ var NLDDDocumentTabBar = (_NLDDDocumentTabBar2 = class NLDDDocumentTabBar extend
|
|
|
51947
53010
|
this.removeEventListener("dismiss", this._handleItemDismiss);
|
|
51948
53011
|
this.removeEventListener("keydown", this._handleKeyDown);
|
|
51949
53012
|
this.removeEventListener("pointerdown", this._onPointerDown);
|
|
53013
|
+
this.removeEventListener("pointerleave", this._releaseWidths);
|
|
53014
|
+
this._itemsAtHold.clear();
|
|
53015
|
+
this._releaseOnRemoval = null;
|
|
53016
|
+
clearTimeout(this._releasingTimer);
|
|
53017
|
+
this.removeAttribute("data-holding-widths");
|
|
53018
|
+
this.removeAttribute("data-releasing-widths");
|
|
53019
|
+
this.style.removeProperty("--_document-tab-bar-held-item-width");
|
|
53020
|
+
this._holding = false;
|
|
51950
53021
|
this._menu?.remove();
|
|
51951
53022
|
this._menu = null;
|
|
51952
53023
|
this._resizeObserver?.disconnect();
|
|
@@ -51958,7 +53029,13 @@ var NLDDDocumentTabBar = (_NLDDDocumentTabBar2 = class NLDDDocumentTabBar extend
|
|
|
51958
53029
|
if (!this._hasCustomLabel) {}
|
|
51959
53030
|
const container = this.shadowRoot?.querySelector(".document-tab-bar__items");
|
|
51960
53031
|
if (container) {
|
|
51961
|
-
this.
|
|
53032
|
+
this._rowWidth = this.clientWidth;
|
|
53033
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
53034
|
+
const width = this.clientWidth;
|
|
53035
|
+
if (this._holding && width !== this._rowWidth) this._releaseWidths();
|
|
53036
|
+
this._rowWidth = width;
|
|
53037
|
+
this._calculateOverflow();
|
|
53038
|
+
});
|
|
51962
53039
|
this._resizeObserver.observe(container);
|
|
51963
53040
|
}
|
|
51964
53041
|
this._syncMenuAnchor();
|
|
@@ -52005,6 +53082,11 @@ var NLDDDocumentTabBar = (_NLDDDocumentTabBar2 = class NLDDDocumentTabBar extend
|
|
|
52005
53082
|
wrapper.hidden = slot.assignedElements().length === 0;
|
|
52006
53083
|
}
|
|
52007
53084
|
_onSlotChange() {
|
|
53085
|
+
if (this._releaseOnRemoval && !this._getItems().includes(this._releaseOnRemoval)) {
|
|
53086
|
+
this._releaseOnRemoval = null;
|
|
53087
|
+
this._releaseWidths();
|
|
53088
|
+
}
|
|
53089
|
+
if (this._holding && this._getItems().some((item) => !this._itemsAtHold.has(item))) this._releaseWidths();
|
|
52008
53090
|
this._calculateOverflow();
|
|
52009
53091
|
this._propagateDismissLabel();
|
|
52010
53092
|
this._syncFallbackFocusable();
|
|
@@ -52226,7 +53308,7 @@ var NLDDDocumentTabBar = (_NLDDDocumentTabBar2 = class NLDDDocumentTabBar extend
|
|
|
52226
53308
|
}
|
|
52227
53309
|
_syncMenuAnchor() {
|
|
52228
53310
|
if (!this._menu) return;
|
|
52229
|
-
const button = this.shadowRoot?.querySelector(".document-tab-bar__overflow nldd-icon-button");
|
|
53311
|
+
const button = this.shadowRoot?.querySelector(".document-tab-bar__overflow-button nldd-icon-button");
|
|
52230
53312
|
if (button) {
|
|
52231
53313
|
this._menu.anchorElement = button;
|
|
52232
53314
|
if ("popoverTargetElement" in button) button.popoverTargetElement = this._menu;
|
|
@@ -52236,6 +53318,24 @@ var NLDDDocumentTabBar = (_NLDDDocumentTabBar2 = class NLDDDocumentTabBar extend
|
|
|
52236
53318
|
_closeMenu() {
|
|
52237
53319
|
this._menu?.hidePopover();
|
|
52238
53320
|
}
|
|
53321
|
+
/**
|
|
53322
|
+
* Pins the tabs at the width they have now, so removing one moves the rest
|
|
53323
|
+
* along instead of growing them. One width for the whole bar and not one
|
|
53324
|
+
* per tab: a tab that comes back out of the overflow takes it too, and the
|
|
53325
|
+
* overflow button that disappears leaves room at the end instead of
|
|
53326
|
+
* spreading the tabs. Measured before the consumer removes the closed tab,
|
|
53327
|
+
* which it does in its `tabdismiss` handler.
|
|
53328
|
+
*/
|
|
53329
|
+
_holdWidths(items) {
|
|
53330
|
+
if (this._holding) return;
|
|
53331
|
+
const sample = items.find((item) => !item.hidden);
|
|
53332
|
+
if (!sample) return;
|
|
53333
|
+
this.style.setProperty("--_document-tab-bar-held-item-width", `${sample.getBoundingClientRect().width}px`);
|
|
53334
|
+
this.toggleAttribute("data-holding-widths", true);
|
|
53335
|
+
this._holding = true;
|
|
53336
|
+
this._itemsAtHold = new Set(this._getItems());
|
|
53337
|
+
this.addEventListener("pointerleave", this._releaseWidths);
|
|
53338
|
+
}
|
|
52239
53339
|
render() {
|
|
52240
53340
|
return documentTabBarTemplate(this);
|
|
52241
53341
|
}
|
|
@@ -52670,7 +53770,7 @@ var nlddPaginationTranslations = {
|
|
|
52670
53770
|
* @element nldd-pagination
|
|
52671
53771
|
* @attr {number} current - Currently active page (1-based)
|
|
52672
53772
|
* @attr {number} total - Total number of pages (recommended max: 200 for compact select performance)
|
|
52673
|
-
* @attr {boolean} disabled - Disabled state
|
|
53773
|
+
* @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
|
|
52674
53774
|
* @attr {boolean} centered - Centers the pagination in the container (host fills row, items grouped in the middle)
|
|
52675
53775
|
* @attr {string} href-pattern - URL pattern with a {page} placeholder, renders links instead of buttons
|
|
52676
53776
|
* @attr {object} translations - Translations; unspecified keys fall back to Dutch
|
|
@@ -52935,6 +54035,13 @@ function modalDialogTemplate(component) {
|
|
|
52935
54035
|
* A modal window with overlay backdrop, based on the native <dialog> element.
|
|
52936
54036
|
* Internally renders an <nldd-inline-dialog> for the visual structure.
|
|
52937
54037
|
*
|
|
54038
|
+
* Use it only when there is no way back, and give it a real choice: a dialog
|
|
54039
|
+
* with one button offers nothing to decide, so tell the user with an
|
|
54040
|
+
* nldd-notification or an inline message instead. In a destructive dialog the
|
|
54041
|
+
* safe way out comes first, as the primary button. Work that needs the page
|
|
54042
|
+
* as context, such as editing, belongs in an nldd-sheet. The design guidelines
|
|
54043
|
+
* say why. A dialog that opens with one action says so in development.
|
|
54044
|
+
*
|
|
52938
54045
|
* Open and close it with `open`, bound to your state together with the close
|
|
52939
54046
|
* event: the dialog clears `open` itself when the user closes it. show() and
|
|
52940
54047
|
* hide() do the same for code without a binding. Keep the dialog in the DOM
|
|
@@ -52955,7 +54062,7 @@ function modalDialogTemplate(component) {
|
|
|
52955
54062
|
* @slot notifications - Where the notifications area lands while this overlay is open, so a notification is not left inert behind it. Filled by the package; leave it alone.
|
|
52956
54063
|
*
|
|
52957
54064
|
* @fires open - When the dialog is opened
|
|
52958
|
-
* @fires close - When the dialog is fully closed. Does not bubble: overlays nest, and a listener on one dialog asking about that dialog should not also hear the form it opened.
|
|
54065
|
+
* @fires close - When the dialog is fully closed. Does not bubble: overlays nest, and a listener on one dialog asking about that dialog should not also hear the form it opened.
|
|
52959
54066
|
*
|
|
52960
54067
|
* @method show() - Opens the modal dialog
|
|
52961
54068
|
* @method hide() - Closes the modal dialog with a closing animation
|
|
@@ -52977,6 +54084,7 @@ var NLDDModalDialog = (_NLDDModalDialog = class NLDDModalDialog extends LitEleme
|
|
|
52977
54084
|
this.open = false;
|
|
52978
54085
|
this._closing = false;
|
|
52979
54086
|
this._cancelPendingOpen = null;
|
|
54087
|
+
this._warnedSingleAction = false;
|
|
52980
54088
|
this._closeFallback = 0;
|
|
52981
54089
|
this._pointerDownOnBackdrop = false;
|
|
52982
54090
|
this._handleDialogPointerDown = (e) => {
|
|
@@ -53020,6 +54128,13 @@ var NLDDModalDialog = (_NLDDModalDialog = class NLDDModalDialog extends LitEleme
|
|
|
53020
54128
|
composed: true
|
|
53021
54129
|
}));
|
|
53022
54130
|
}
|
|
54131
|
+
/** DEV-only: warns once when the dialog opens with a single action. */
|
|
54132
|
+
_checkActions() {
|
|
54133
|
+
if (this._warnedSingleAction) return;
|
|
54134
|
+
if ([...this.children].filter((child) => child.getAttribute("slot") === "actions").length !== 1) return;
|
|
54135
|
+
this._warnedSingleAction = true;
|
|
54136
|
+
console.warn("<nldd-modal-dialog>: The dialog has one action, so there is nothing to choose. Tell the user with an nldd-notification or an inline message instead, or give the dialog a real choice.", this);
|
|
54137
|
+
}
|
|
53023
54138
|
_manageFocus() {
|
|
53024
54139
|
if (focusAutofocusTarget(this)) return;
|
|
53025
54140
|
const dialog = this._dialog;
|
|
@@ -53936,6 +55051,21 @@ function joinArea(notification, label) {
|
|
|
53936
55051
|
area.prepend(notification);
|
|
53937
55052
|
syncStack(area);
|
|
53938
55053
|
}
|
|
55054
|
+
/**
|
|
55055
|
+
* Puts a notification that is already in the deck back in front, as if it had
|
|
55056
|
+
* just arrived. For one that was updated: the change is what just happened, and
|
|
55057
|
+
* behind a newer notification nobody would see it.
|
|
55058
|
+
*/
|
|
55059
|
+
function bringToFront(notification) {
|
|
55060
|
+
const area = document.getElementById(AREA_ID);
|
|
55061
|
+
if (!area || notification.parentElement !== area) return;
|
|
55062
|
+
if (notifications(area)[0] !== notification) {
|
|
55063
|
+
notification._setMoving?.(true);
|
|
55064
|
+
area.prepend(notification);
|
|
55065
|
+
notification._setMoving?.(false);
|
|
55066
|
+
}
|
|
55067
|
+
syncStack(area);
|
|
55068
|
+
}
|
|
53939
55069
|
function leaveArea(notification) {
|
|
53940
55070
|
const area = document.getElementById(AREA_ID);
|
|
53941
55071
|
if (!area) return;
|
|
@@ -54106,6 +55236,21 @@ var nlddNotificationTranslations = {
|
|
|
54106
55236
|
* role="status". Focus never moves on its own. Escape dismisses the
|
|
54107
55237
|
* notification that focus is in.
|
|
54108
55238
|
*
|
|
55239
|
+
* ## From code
|
|
55240
|
+
* `NLDDNotification.show({ text, supportingText, variant, icon, duration,
|
|
55241
|
+
* actions })` raises a notification without an element to manage: it creates
|
|
55242
|
+
* one, shows it, and removes it once it is dismissed. An action is `{ text,
|
|
55243
|
+
* onClick }`, at most 2, and a click on one also takes the notification away.
|
|
55244
|
+
* It returns a handle with `dismiss()` and `update(options)`. An update changes
|
|
55245
|
+
* the message, puts the notification in front and starts its clock over, so a
|
|
55246
|
+
* status that changes often is one notification that keeps up instead of a new
|
|
55247
|
+
* one sliding in each time; one that has already left arrives again.
|
|
55248
|
+
*
|
|
55249
|
+
* Use `show()` from a framework. Because a notification places itself, an
|
|
55250
|
+
* element that a framework rendered is no longer where that framework left it:
|
|
55251
|
+
* a keyed list (`v-for` with a `:key`) then fails on its next render, and a
|
|
55252
|
+
* removed row leaves its notification on screen.
|
|
55253
|
+
*
|
|
54109
55254
|
* @element nldd-notification
|
|
54110
55255
|
*
|
|
54111
55256
|
* @attr {'neutral'|'accent'|'success'|'warning'|'critical'} variant - What kind of message this is; sets the icon color and the ARIA role (default: 'neutral')
|
|
@@ -54117,7 +55262,9 @@ var nlddNotificationTranslations = {
|
|
|
54117
55262
|
*
|
|
54118
55263
|
* @slot actions - At most 2 nldd-button elements, under the text. More than 2 is refused with a DEV warning: a message that needs three choices is a dialog.
|
|
54119
55264
|
*
|
|
54120
|
-
* @fires dismiss - Fired when the notification is dismissed, by the button, by Escape, or by its own clock. The consumer removes it.
|
|
55265
|
+
* @fires dismiss - Fired when the notification is dismissed, by the button, by Escape, or by its own clock. The consumer removes it, unless it was raised with `show()`, which removes it itself.
|
|
55266
|
+
*
|
|
55267
|
+
* @method NLDDNotification.show(options) - Static. Raises a notification from code and returns a handle with `dismiss()` and `update(options)`. See "From code" above.
|
|
54121
55268
|
*/
|
|
54122
55269
|
var _NLDDNotification;
|
|
54123
55270
|
var DEFAULT_ICONS = {
|
|
@@ -54196,6 +55343,65 @@ var NLDDNotification = (_NLDDNotification = class NLDDNotification extends withT
|
|
|
54196
55343
|
get _leavesOnItsOwn() {
|
|
54197
55344
|
return this.variant !== "critical" && this.duration > 0;
|
|
54198
55345
|
}
|
|
55346
|
+
/**
|
|
55347
|
+
* Raises a notification from code, and takes it away again when it is
|
|
55348
|
+
* dismissed.
|
|
55349
|
+
*
|
|
55350
|
+
* The way to raise one from a framework. A notification places itself, so
|
|
55351
|
+
* an element a framework rendered is no longer where that framework left
|
|
55352
|
+
* it, and the next render of that list fails. Here nothing owns the
|
|
55353
|
+
* element but the notification itself.
|
|
55354
|
+
*/
|
|
55355
|
+
static show(options) {
|
|
55356
|
+
const element = document.createElement("nldd-notification");
|
|
55357
|
+
const dismiss = () => element.remove();
|
|
55358
|
+
element._apply(options, dismiss);
|
|
55359
|
+
element.addEventListener("dismiss", dismiss);
|
|
55360
|
+
document.body.append(element);
|
|
55361
|
+
return {
|
|
55362
|
+
element,
|
|
55363
|
+
dismiss,
|
|
55364
|
+
update: (next) => {
|
|
55365
|
+
element._apply(next, dismiss);
|
|
55366
|
+
if (!element.isConnected) {
|
|
55367
|
+
document.body.append(element);
|
|
55368
|
+
return;
|
|
55369
|
+
}
|
|
55370
|
+
element._restart();
|
|
55371
|
+
bringToFront(element);
|
|
55372
|
+
}
|
|
55373
|
+
};
|
|
55374
|
+
}
|
|
55375
|
+
/** Writes the given options onto the element. Actions replace the ones
|
|
55376
|
+
* that were there; a field that is left out stays as it was. */
|
|
55377
|
+
_apply(options, dismiss) {
|
|
55378
|
+
if (options.text !== void 0) this.text = options.text;
|
|
55379
|
+
if (options.supportingText !== void 0) this.supportingText = options.supportingText;
|
|
55380
|
+
if (options.variant !== void 0) this.variant = options.variant;
|
|
55381
|
+
if (options.icon !== void 0) this.icon = options.icon;
|
|
55382
|
+
if (options.duration !== void 0) this.duration = options.duration;
|
|
55383
|
+
if (options.actions === void 0) return;
|
|
55384
|
+
this.querySelectorAll(":scope > [slot=\"actions\"]").forEach((button) => button.remove());
|
|
55385
|
+
for (const action of options.actions) {
|
|
55386
|
+
const button = document.createElement("nldd-button");
|
|
55387
|
+
button.slot = "actions";
|
|
55388
|
+
button.setAttribute("size", "sm");
|
|
55389
|
+
button.setAttribute("text", action.text);
|
|
55390
|
+
button.addEventListener("click", () => {
|
|
55391
|
+
action.onClick?.();
|
|
55392
|
+
dismiss();
|
|
55393
|
+
});
|
|
55394
|
+
this.append(button);
|
|
55395
|
+
}
|
|
55396
|
+
}
|
|
55397
|
+
/** Starts the clock over with the full duration, for a notification whose
|
|
55398
|
+
* message just changed. */
|
|
55399
|
+
_restart() {
|
|
55400
|
+
if (this._timer !== null) window.clearTimeout(this._timer);
|
|
55401
|
+
this._timer = null;
|
|
55402
|
+
this._remainingDuration = this.duration;
|
|
55403
|
+
this._resumeTimer();
|
|
55404
|
+
}
|
|
54199
55405
|
connectedCallback() {
|
|
54200
55406
|
super.connectedCallback();
|
|
54201
55407
|
this.setAttribute("role", this.variant === "critical" ? "alert" : "status");
|
|
@@ -58141,4 +59347,4 @@ __decorate([property({
|
|
|
58141
59347
|
})], NLDDJustInTimeEducation.prototype, "noArrow", void 0);
|
|
58142
59348
|
NLDDJustInTimeEducation = _NLDDJustInTimeEducation = __decorate([customElement("nldd-just-in-time-education")], NLDDJustInTimeEducation);
|
|
58143
59349
|
//#endregion
|
|
58144
|
-
export { NLDDActivityIndicator, NLDDAvatar, NLDDAvatarGroup, NLDDBadge, NLDDBanner, NLDDBarSplitView, NLDDBlockquote, NLDDBox, NLDDBreadcrumbs, NLDDBreadcrumbsItem, NLDDButton, NLDDButtonBar, NLDDButtonGroup, NLDDCard, NLDDCell, NLDDCheckbox, NLDDCheckboxField, NLDDCodeEditor, NLDDCodeViewer, NLDDCollection, NLDDComboBox, NLDDContainer, NLDDDateField, NLDDDatePicker, NLDDDescriptionCell, NLDDDivider, NLDDDocumentTabBar, NLDDDragHandleCell, NLDDDropdown, NLDDFileField, NLDDForm, NLDDFormActions, NLDDFormField, NLDDFormSection, NLDDFullBleedSection, NLDDHero, NLDDIcon, NLDDIconButton, NLDDIconCell, NLDDIdentity, NLDDImage, NLDDInlineDialog, NLDDJustInTimeEducation, NLDDKeyboardShortcut, NLDDLink, NLDDList, NLDDListItem, NLDDListItemSegment, NLDDMenu, NLDDMenuBar, NLDDMenuBarItem, NLDDModalDialog, NLDDMultiLineTextField, NLDDNavigationSplitView, NLDDNotification, NLDDNumberField, NLDDOneHalfOneHalfSection, NLDDOneThirdTwoThirdsSection, NLDDPage, NLDDPageFooter, NLDDPageFooterLegalBar, NLDDPageFooterLegalBarItem, NLDDPagination, NLDDPasswordField, NLDDPopover, NLDDProgressBar, NLDDProgressBarSegmentIndicator, NLDDProgressCircle, NLDDProgressCircleSegmentIndicator, NLDDRadioButton, NLDDRadioButtonField, NLDDRadioButtonGroup, NLDDRichText, NLDDSearchField, NLDDSegmentedControl, NLDDSheet, NLDDShell, NLDDSideBySideSplitView, NLDDSidebarSection, NLDDSimpleSection, NLDDSkipLink, NLDDSpacer, NLDDSpacerCell, NLDDSplitButton, NLDDSplitViewDivider, NLDDSplitViewPane, NLDDStackedSplitView, NLDDStatusBar, NLDDStepBar, NLDDStepBarItem, NLDDStepCell, NLDDStepper, NLDDSwitch, NLDDSwitchField, NLDDTabBar, NLDDTable, NLDDTableRow, NLDDTag, NLDDText, NLDDTextCell, NLDDTextEditor, NLDDTextField, NLDDTimeField, NLDDTimePicker, NLDDTitle, NLDDTitleCell, NLDDToggleButton, NLDDToggleButtonGroup, NLDDToken, NLDDTokenField, NLDDToolbar, NLDDTooltip, NLDDTopNavigationBar, NLDDTopTitleBar, NLDDTwoThirdsOneThirdSection, NLDDValidationList, NLDDWindow, setTranslations };
|
|
59350
|
+
export { NLDDActivityIndicator, NLDDAvatar, NLDDAvatarGroup, NLDDBadge, NLDDBanner, NLDDBarSplitView, NLDDBlockquote, NLDDBox, NLDDBreadcrumbs, NLDDBreadcrumbsItem, NLDDButton, NLDDButtonBar, NLDDButtonGroup, NLDDCard, NLDDCell, NLDDCheckbox, NLDDCheckboxField, NLDDCodeEditor, NLDDCodeViewer, NLDDCollection, NLDDComboBox, NLDDContainer, NLDDDateField, NLDDDatePicker, NLDDDescriptionCell, NLDDDivider, NLDDDocumentTabBar, NLDDDragHandleCell, NLDDDropdown, NLDDFileField, NLDDForm, NLDDFormActions, NLDDFormField, NLDDFormSection, NLDDFullBleedSection, NLDDHero, NLDDIcon, NLDDIconButton, NLDDIconCell, NLDDIdentity, NLDDImage, NLDDInlineDialog, NLDDJustInTimeEducation, NLDDKeyboardShortcut, NLDDLink, NLDDList, NLDDListItem, NLDDListItemSegment, NLDDMenu, NLDDMenuBar, NLDDMenuBarItem, NLDDModalDialog, NLDDMultiLineTextField, NLDDNavigationSplitView, NLDDNotification, NLDDNumberField, NLDDOneHalfOneHalfSection, NLDDOneThirdTwoThirdsSection, NLDDPage, NLDDPageFooter, NLDDPageFooterLegalBar, NLDDPageFooterLegalBarItem, NLDDPagination, NLDDPasswordField, NLDDPopover, NLDDProgressBar, NLDDProgressBarSegmentIndicator, NLDDProgressCircle, NLDDProgressCircleSegmentIndicator, NLDDRadioButton, NLDDRadioButtonField, NLDDRadioButtonGroup, NLDDRichText, NLDDSearchField, NLDDSegmentedControl, NLDDSheet, NLDDShell, NLDDSideBySideSplitView, NLDDSidebarSection, NLDDSimpleSection, NLDDSkipLink, NLDDSpacer, NLDDSpacerCell, NLDDSplitButton, NLDDSplitViewDivider, NLDDSplitViewPane, NLDDStackedSplitView, NLDDStatusBar, NLDDStepBar, NLDDStepBarItem, NLDDStepCell, NLDDStepper, NLDDSwitch, NLDDSwitchField, NLDDTabBar, NLDDTable, NLDDTableRow, NLDDTag, NLDDText, NLDDTextCell, NLDDTextEditor, NLDDTextField, NLDDTimeField, NLDDTimePicker, NLDDTitle, NLDDTitleCell, NLDDToggleButton, NLDDToggleButtonGroup, NLDDToken, NLDDTokenField, NLDDToolbar, NLDDTooltip, NLDDTopNavigationBar, NLDDTopTitleBar, NLDDTwoThirdsOneThirdSection, NLDDValidationList, NLDDVisuallyHidden, NLDDWindow, setTranslations };
|