@nldd/design-system 0.8.67 → 0.8.69
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/dist/components/actions/button/button.d.ts +6 -0
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +12 -0
- package/dist/components/actions/button/button.js.map +1 -1
- package/dist/components/actions/button/button.styles.js +108 -108
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +9 -0
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +9 -0
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +15 -0
- package/dist/components/actions/icon-button/icon-button.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.js +54 -54
- package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +7 -1
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/menu/menu.d.ts +19 -0
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +53 -2
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.styles.js +50 -23
- package/dist/components/actions/menu/menu.styles.js.map +1 -1
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +58 -33
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +16 -18
- package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.js +28 -54
- package/dist/components/actions/split-button/split-button.js.map +1 -1
- package/dist/components/actions/split-button/split-button.template.js +1 -1
- package/dist/components/actions/split-button/split-button.template.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts +10 -0
- package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +41 -2
- 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 +16 -2
- package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
- package/dist/components/components.js +103 -102
- package/dist/components/content/avatar/avatar.d.ts +96 -0
- package/dist/components/content/avatar/avatar.d.ts.map +1 -0
- package/dist/components/content/avatar/avatar.js +210 -0
- package/dist/components/content/avatar/avatar.js.map +1 -0
- package/dist/components/content/avatar/avatar.styles.d.ts +2 -0
- package/dist/components/content/avatar/avatar.styles.d.ts.map +1 -0
- package/dist/components/content/avatar/avatar.styles.js +126 -0
- package/dist/components/content/avatar/avatar.styles.js.map +1 -0
- package/dist/components/content/avatar/avatar.template.d.ts +3 -0
- package/dist/components/content/avatar/avatar.template.d.ts.map +1 -0
- package/dist/components/content/avatar/avatar.template.js +36 -0
- package/dist/components/content/avatar/avatar.template.js.map +1 -0
- package/dist/components/content/byline/byline.d.ts +1 -0
- package/dist/components/content/byline/byline.d.ts.map +1 -1
- package/dist/components/content/byline/byline.js +1 -0
- package/dist/components/content/byline/byline.js.map +1 -1
- package/dist/components/content/byline/byline.styles.d.ts.map +1 -1
- package/dist/components/content/byline/byline.styles.js +15 -5
- package/dist/components/content/byline/byline.styles.js.map +1 -1
- package/dist/components/content/byline/byline.template.js +11 -11
- package/dist/components/content/byline/byline.template.js.map +1 -1
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +2 -0
- package/dist/components/content/icon/icon-aliases.js.map +1 -1
- package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
- package/dist/components/content/icon/icon-registry.js +1 -0
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/image/lqip-encoder-element.js +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +7 -0
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +10 -0
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/tag/tag.styles.js +23 -23
- package/dist/components/content/token/token.styles.js +1 -1
- package/dist/components/{index-CXT1jMFt.js → index-Bf4pa5Bp.js} +1 -1
- package/dist/components/{index-DWwviobk.js → index-BfOpap4b.js} +1 -1
- package/dist/components/{index-Bfw_pYWB.js → index-CXC-Objp.js} +1 -1
- package/dist/components/{index-CKnwqp_9.js → index-CfvgUB5p.js} +1 -1
- package/dist/components/{index-DO7aT0MT.js → index-DB-i084x.js} +1 -1
- package/dist/components/{index-Bqf6o41r.js → index-DZo3DrGQ.js} +1 -1
- package/dist/components/{index-DjsXjoZJ.js → index-VwuVCCal.js} +1474 -927
- 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.styles.js +6 -6
- package/dist/components/inputs/segmented-control/segmented-control.styles.js +6 -6
- package/dist/components/inputs/text-editor/text-editor.links.d.ts +8 -0
- package/dist/components/inputs/text-editor/text-editor.links.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.links.js +48 -7
- package/dist/components/inputs/text-editor/text-editor.links.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.js +11 -0
- package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.js +14 -3
- package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.js +6 -6
- package/dist/components/layout/page-footer/page-footer.d.ts +9 -1
- package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.js +23 -1
- package/dist/components/layout/page-footer/page-footer.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.styles.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.styles.js +9 -0
- package/dist/components/layout/page-footer/page-footer.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.js +19 -19
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +32 -2
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/sheet/sheet.d.ts +6 -0
- package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.js +13 -1
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/sheet/sheet.template.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.template.js +1 -0
- package/dist/components/layout/sheet/sheet.template.js.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js +2 -2
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.styles.js +6 -6
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js +11 -11
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js +11 -11
- package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +14 -7
- package/dist/components/lists-and-tables/list-item/list-item.styles.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 +2 -1
- package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +14 -14
- package/dist/components/navigation/pagination/pagination.styles.js +9 -9
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +6 -6
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts +14 -2
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +14 -2
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js +3 -2
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.js +23 -23
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts +3 -2
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +2 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.template.js +8 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.template.js.map +1 -1
- package/dist/css/rich-text.css +19 -0
- package/dist/css/settings.css +253 -246
- package/dist/utilities/popup-anchor-controller.d.ts +63 -0
- package/dist/utilities/popup-anchor-controller.d.ts.map +1 -0
- package/dist/utilities/popup-anchor-controller.js +63 -0
- package/dist/utilities/popup-anchor-controller.js.map +1 -0
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,8BAA8B,CAAC;AACtC,OAA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8D;IAE9D,eAAe,SAAM;IAErB;6EACyE;IAEzE,aAAa,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAa;IAE3D,4DAA4D;IAE5D,IAAI,EAAE,MAAM,GAAG,SAAS,CAAa;IAErC,+DAA+D;IAE/D,MAAM,EAAE,MAAM,GAAG,SAAS,CAAa;IAEvC;;;OAGG;IAEH,GAAG,EAAE,MAAM,GAAG,SAAS,CAAa;IAEpC,wDAAwD;IACxD,OAAO,KAAK,QAAQ,GAInB;IAED,OAAO,CAAC,WAAW,CAAS;IAE5B;;6BAEyB;IACzB,MAAM,wBAAmC;IAEhC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IA0B/D,2DAA2D;IAC3D,YAAY,IAAI,MAAM;IAMtB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IA6B3C;;;OAGG;IACM,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAM5C,iBAAiB,IAAI,IAAI;IAIhB,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,kBAAkB,EAAE,cAAc,CAAC;KACnC;CACD"}
|
|
@@ -39,6 +39,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
39
39
|
*
|
|
40
40
|
* @slot icon - Slot for a custom icon (e.g. custom SVG). Only used when icon attribute is not set;
|
|
41
41
|
* falls back to a placeholder icon when the slot is empty.
|
|
42
|
+
* @slot popup - A single `nldd-menu` or `nldd-popover` this button invokes. Slotting it auto-anchors
|
|
43
|
+
* the overlay to the button and toggles it on click (no id/anchor wiring). The overlay syncs
|
|
44
|
+
* `expanded` and `aria-haspopup` back onto the button. Add `expandable` for the disclosure chevron.
|
|
45
|
+
* Mirrors nldd-split-button; manual `popovertarget` wiring keeps working without a slotted overlay.
|
|
42
46
|
*
|
|
43
47
|
* @example
|
|
44
48
|
* ```html
|
|
@@ -54,6 +58,7 @@ import { iconButtonStyles } from './icon-button.styles.js';
|
|
|
54
58
|
import { template } from './icon-button.template.js';
|
|
55
59
|
import { withTranslations } from '../../../utilities/with-translations.js';
|
|
56
60
|
import { nlddIconButtonTranslations } from './icon-button.i18n.js';
|
|
61
|
+
import { PopupAnchorController } from '../../../utilities/popup-anchor-controller.js';
|
|
57
62
|
import './../../content/icon/icon.js';
|
|
58
63
|
import './../../status-and-feedback/activity-indicator/activity-indicator.js';
|
|
59
64
|
let NLDDIconButton = class NLDDIconButton extends withTranslations(LitElement, nlddIconButtonTranslations) {
|
|
@@ -126,6 +131,10 @@ let NLDDIconButton = class NLDDIconButton extends withTranslations(LitElement, n
|
|
|
126
131
|
*/
|
|
127
132
|
this.rel = undefined;
|
|
128
133
|
this._warnedA11y = false;
|
|
134
|
+
/** Shared wiring for an overlay slotted into `popup`: anchors it to this
|
|
135
|
+
* button and turns clicks into open/close. Not private: the template module
|
|
136
|
+
* binds its handlers. */
|
|
137
|
+
this._popup = new PopupAnchorController(this);
|
|
129
138
|
}
|
|
130
139
|
/** Whether an icon is present via attribute or slot. */
|
|
131
140
|
get _hasIcon() {
|
|
@@ -175,6 +184,12 @@ let NLDDIconButton = class NLDDIconButton extends withTranslations(LitElement, n
|
|
|
175
184
|
e.stopPropagation();
|
|
176
185
|
return;
|
|
177
186
|
}
|
|
187
|
+
// A slotted overlay makes this button its invoker: toggle it and stop —
|
|
188
|
+
// a popup button neither submits a form nor navigates.
|
|
189
|
+
if (this._popup.handleClick(e)) {
|
|
190
|
+
e.preventDefault();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
178
193
|
// A link icon-button has no form behaviour. Otherwise drive the
|
|
179
194
|
// associated form ourselves: the shadow <button type="submit"|"reset">
|
|
180
195
|
// can't reach the light-DOM form across the shadow boundary.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,8BAA8B,CAAC;AACtC,OAAO,sEAAsE,CAAC;AAoBvE,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,gBAAgB,CAAC,UAAU,EAAE,0BAA0B,CAAC;IAArF;;QAOE,eAAU,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAG5C,YAAO,GAAY,gBAAgB,CAAC;QAGpC,SAAI,GAAS,IAAI,CAAC;QAElB,iFAAiF;QAEjF,eAAU,GAAG,KAAK,CAAC;QAEnB;;;;;;;;WAQG;QAEH,YAAO,GAAG,KAAK,CAAC;QAGhB,aAAQ,GAAG,KAAK,CAAC;QAEjB,gHAAgH;QAEhH,sBAAiB,GAAG,KAAK,CAAC;QAG1B,SAAI,GAAe,QAAQ,CAAC;QAG5B,eAAU,GAAG,KAAK,CAAC;QAGnB,aAAQ,GAAG,KAAK,CAAC;QAEjB;;+DAEuD;QAEvD,UAAK,GAAG,KAAK,CAAC;QAUd,mEAAmE;QAEnE,UA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AK,EAAE,CAAC;2DAC4B;AAI3D;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;4CAC5D;AAKV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACjB;AAKV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;uDACrC;AAKrB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,iBAAiB,CAAkC,SAAS,CAAC,EAAE,CAAC;qDACxE;AAI3D;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACL;AAIrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CACY;AAOvC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACS;AA1HxB,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAyN1B"}
|
|
@@ -20,13 +20,13 @@ export const iconButtonStyles = css `
|
|
|
20
20
|
--_text-display: none;
|
|
21
21
|
--_text-font: var(--primitives-font-body-xxs-medium-flat);
|
|
22
22
|
--_background-color: var(--semantics-buttons-neutral-tinted-background-color);
|
|
23
|
-
--_primary-content-color: var(--semantics-buttons-neutral-tinted-
|
|
23
|
+
--_primary-content-color: var(--semantics-buttons-neutral-tinted-content-color);
|
|
24
24
|
--_highlight-border-color: var(--semantics-buttons-neutral-tinted-highlight-border-color);
|
|
25
25
|
--_is-hovered-background-color: var(--semantics-buttons-neutral-tinted-is-hovered-background-color);
|
|
26
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-tinted-is-hovered-
|
|
26
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-tinted-is-hovered-content-color);
|
|
27
27
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-hovered-highlight-border-color);
|
|
28
28
|
--_is-active-background-color: var(--semantics-buttons-neutral-tinted-is-active-background-color);
|
|
29
|
-
--_is-active-primary-content-color: var(--semantics-buttons-neutral-tinted-is-active-
|
|
29
|
+
--_is-active-primary-content-color: var(--semantics-buttons-neutral-tinted-is-active-content-color);
|
|
30
30
|
--_is-active-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-active-highlight-border-color);
|
|
31
31
|
|
|
32
32
|
${inheritedTextReset}
|
|
@@ -72,75 +72,75 @@ export const iconButtonStyles = css `
|
|
|
72
72
|
|
|
73
73
|
:host([variant="neutral-base"]) {
|
|
74
74
|
--_background-color: var(--semantics-buttons-neutral-base-background-color);
|
|
75
|
-
--_primary-content-color: var(--semantics-buttons-neutral-base-
|
|
75
|
+
--_primary-content-color: var(--semantics-buttons-neutral-base-content-color);
|
|
76
76
|
--_highlight-border-color: var(--semantics-buttons-neutral-base-highlight-border-color);
|
|
77
77
|
--_is-hovered-background-color: var(--semantics-buttons-neutral-base-is-hovered-background-color);
|
|
78
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-base-is-hovered-
|
|
78
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-base-is-hovered-content-color);
|
|
79
79
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-neutral-base-is-hovered-highlight-border-color);
|
|
80
80
|
--_is-active-background-color: var(--semantics-buttons-neutral-base-is-active-background-color);
|
|
81
|
-
--_is-active-primary-content-color: var(--semantics-buttons-neutral-base-is-active-
|
|
81
|
+
--_is-active-primary-content-color: var(--semantics-buttons-neutral-base-is-active-content-color);
|
|
82
82
|
--_is-active-highlight-border-color: var(--semantics-buttons-neutral-base-is-active-highlight-border-color);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
:host([variant="neutral-transparent"]) {
|
|
86
86
|
--_background-color: transparent;
|
|
87
|
-
--_primary-content-color: var(--semantics-buttons-neutral-transparent-
|
|
87
|
+
--_primary-content-color: var(--semantics-buttons-neutral-transparent-content-color);
|
|
88
88
|
--_highlight-border-color: transparent;
|
|
89
89
|
--_is-hovered-background-color: transparent;
|
|
90
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-transparent-is-hovered-
|
|
90
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-transparent-is-hovered-content-color);
|
|
91
91
|
--_is-hovered-highlight-border-color: transparent;
|
|
92
92
|
--_is-active-background-color: transparent;
|
|
93
|
-
--_is-active-primary-content-color: var(--semantics-buttons-neutral-transparent-is-active-
|
|
93
|
+
--_is-active-primary-content-color: var(--semantics-buttons-neutral-transparent-is-active-content-color);
|
|
94
94
|
--_is-active-highlight-border-color: transparent;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
:host([variant="accent-filled"]),
|
|
98
98
|
:host([variant="primary"]) {
|
|
99
99
|
--_background-color: var(--semantics-buttons-accent-filled-background-color);
|
|
100
|
-
--_primary-content-color: var(--semantics-buttons-accent-filled-
|
|
100
|
+
--_primary-content-color: var(--semantics-buttons-accent-filled-content-color);
|
|
101
101
|
--_highlight-border-color: var(--semantics-buttons-accent-filled-highlight-border-color);
|
|
102
102
|
--_is-hovered-background-color: var(--semantics-buttons-accent-filled-is-hovered-background-color);
|
|
103
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-accent-filled-is-hovered-
|
|
103
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-accent-filled-is-hovered-content-color);
|
|
104
104
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-accent-filled-is-hovered-highlight-border-color);
|
|
105
105
|
--_is-active-background-color: var(--semantics-buttons-accent-filled-is-active-background-color);
|
|
106
|
-
--_is-active-primary-content-color: var(--semantics-buttons-accent-filled-is-active-
|
|
106
|
+
--_is-active-primary-content-color: var(--semantics-buttons-accent-filled-is-active-content-color);
|
|
107
107
|
--_is-active-highlight-border-color: var(--semantics-buttons-accent-filled-is-active-highlight-border-color);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
:host([variant="accent-transparent"]) {
|
|
111
111
|
--_background-color: transparent;
|
|
112
|
-
--_primary-content-color: var(--semantics-buttons-accent-transparent-
|
|
112
|
+
--_primary-content-color: var(--semantics-buttons-accent-transparent-content-color);
|
|
113
113
|
--_highlight-border-color: transparent;
|
|
114
114
|
--_is-hovered-background-color: transparent;
|
|
115
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-accent-transparent-is-hovered-
|
|
115
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-accent-transparent-is-hovered-content-color);
|
|
116
116
|
--_is-hovered-highlight-border-color: transparent;
|
|
117
117
|
--_is-active-background-color: transparent;
|
|
118
|
-
--_is-active-primary-content-color: var(--semantics-buttons-accent-transparent-is-active-
|
|
118
|
+
--_is-active-primary-content-color: var(--semantics-buttons-accent-transparent-is-active-content-color);
|
|
119
119
|
--_is-active-highlight-border-color: transparent;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
:host([variant="critical-tinted"]),
|
|
123
123
|
:host([variant="destructive"]) {
|
|
124
124
|
--_background-color: var(--semantics-buttons-critical-tinted-background-color);
|
|
125
|
-
--_primary-content-color: var(--semantics-buttons-critical-tinted-
|
|
125
|
+
--_primary-content-color: var(--semantics-buttons-critical-tinted-content-color);
|
|
126
126
|
--_highlight-border-color: var(--semantics-buttons-critical-tinted-highlight-border-color);
|
|
127
127
|
--_is-hovered-background-color: var(--semantics-buttons-critical-tinted-is-hovered-background-color);
|
|
128
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-critical-tinted-is-hovered-
|
|
128
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-critical-tinted-is-hovered-content-color);
|
|
129
129
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-critical-tinted-is-hovered-highlight-border-color);
|
|
130
130
|
--_is-active-background-color: var(--semantics-buttons-critical-tinted-is-active-background-color);
|
|
131
|
-
--_is-active-primary-content-color: var(--semantics-buttons-critical-tinted-is-active-
|
|
131
|
+
--_is-active-primary-content-color: var(--semantics-buttons-critical-tinted-is-active-content-color);
|
|
132
132
|
--_is-active-highlight-border-color: var(--semantics-buttons-critical-tinted-is-active-highlight-border-color);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
:host([variant="critical-transparent"]) {
|
|
136
136
|
--_background-color: transparent;
|
|
137
|
-
--_primary-content-color: var(--semantics-buttons-critical-transparent-
|
|
137
|
+
--_primary-content-color: var(--semantics-buttons-critical-transparent-content-color);
|
|
138
138
|
--_highlight-border-color: transparent;
|
|
139
139
|
--_is-hovered-background-color: transparent;
|
|
140
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-critical-transparent-is-hovered-
|
|
140
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-critical-transparent-is-hovered-content-color);
|
|
141
141
|
--_is-hovered-highlight-border-color: transparent;
|
|
142
142
|
--_is-active-background-color: transparent;
|
|
143
|
-
--_is-active-primary-content-color: var(--semantics-buttons-critical-transparent-is-active-
|
|
143
|
+
--_is-active-primary-content-color: var(--semantics-buttons-critical-transparent-is-active-content-color);
|
|
144
144
|
--_is-active-highlight-border-color: transparent;
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -150,25 +150,25 @@ export const iconButtonStyles = css `
|
|
|
150
150
|
|
|
151
151
|
:host([variant="inherit-tinted"]) {
|
|
152
152
|
--_background-color: var(--semantics-buttons-inherit-tinted-background-color);
|
|
153
|
-
--_primary-content-color: var(--semantics-buttons-inherit-tinted-
|
|
153
|
+
--_primary-content-color: var(--semantics-buttons-inherit-tinted-content-color);
|
|
154
154
|
--_highlight-border-color: var(--semantics-buttons-inherit-tinted-highlight-border-color);
|
|
155
155
|
--_is-hovered-background-color: var(--semantics-buttons-inherit-tinted-is-hovered-background-color);
|
|
156
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-inherit-tinted-is-hovered-
|
|
156
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-inherit-tinted-is-hovered-content-color);
|
|
157
157
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-inherit-tinted-is-hovered-highlight-border-color);
|
|
158
158
|
--_is-active-background-color: var(--semantics-buttons-inherit-tinted-is-active-background-color);
|
|
159
|
-
--_is-active-primary-content-color: var(--semantics-buttons-inherit-tinted-is-active-
|
|
159
|
+
--_is-active-primary-content-color: var(--semantics-buttons-inherit-tinted-is-active-content-color);
|
|
160
160
|
--_is-active-highlight-border-color: var(--semantics-buttons-inherit-tinted-is-active-highlight-border-color);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
:host([variant="inherit-filled"]) {
|
|
164
164
|
--_background-color: var(--semantics-buttons-inherit-filled-background-color);
|
|
165
|
-
--_primary-content-color: var(--context-parent-background-color, var(--semantics-buttons-inherit-filled-
|
|
165
|
+
--_primary-content-color: var(--context-parent-background-color, var(--semantics-buttons-inherit-filled-content-color));
|
|
166
166
|
--_highlight-border-color: var(--semantics-buttons-inherit-filled-highlight-border-color);
|
|
167
167
|
--_is-hovered-background-color: var(--semantics-buttons-inherit-filled-is-hovered-background-color);
|
|
168
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-inherit-filled-is-hovered-
|
|
168
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-inherit-filled-is-hovered-content-color);
|
|
169
169
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-inherit-filled-is-hovered-highlight-border-color);
|
|
170
170
|
--_is-active-background-color: var(--semantics-buttons-inherit-filled-is-active-background-color);
|
|
171
|
-
--_is-active-primary-content-color: var(--semantics-buttons-inherit-filled-is-active-
|
|
171
|
+
--_is-active-primary-content-color: var(--semantics-buttons-inherit-filled-is-active-content-color);
|
|
172
172
|
--_is-active-highlight-border-color: var(--semantics-buttons-inherit-filled-is-active-highlight-border-color);
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -188,87 +188,87 @@ export const iconButtonStyles = css `
|
|
|
188
188
|
|
|
189
189
|
:host([expanded]) {
|
|
190
190
|
--_background-color: var(--semantics-buttons-neutral-tinted-is-expanded-background-color);
|
|
191
|
-
--_primary-content-color: var(--semantics-buttons-neutral-tinted-is-expanded-
|
|
191
|
+
--_primary-content-color: var(--semantics-buttons-neutral-tinted-is-expanded-content-color);
|
|
192
192
|
--_highlight-border-color: var(--semantics-buttons-neutral-tinted-is-expanded-highlight-border-color);
|
|
193
193
|
--_is-hovered-background-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-hovered-background-color);
|
|
194
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-hovered-
|
|
194
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-hovered-content-color);
|
|
195
195
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-hovered-highlight-border-color);
|
|
196
196
|
--_is-active-background-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-active-background-color);
|
|
197
|
-
--_is-active-primary-content-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-active-
|
|
197
|
+
--_is-active-primary-content-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-active-content-color);
|
|
198
198
|
--_is-active-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-active-highlight-border-color);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
:host([expanded][variant="neutral-base"]) {
|
|
202
202
|
--_background-color: var(--semantics-buttons-neutral-base-is-expanded-background-color);
|
|
203
|
-
--_primary-content-color: var(--semantics-buttons-neutral-base-is-expanded-
|
|
203
|
+
--_primary-content-color: var(--semantics-buttons-neutral-base-is-expanded-content-color);
|
|
204
204
|
--_highlight-border-color: var(--semantics-buttons-neutral-base-is-expanded-highlight-border-color);
|
|
205
205
|
--_is-hovered-background-color: var(--semantics-buttons-neutral-base-is-expanded-is-hovered-background-color);
|
|
206
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-base-is-expanded-is-hovered-
|
|
206
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-base-is-expanded-is-hovered-content-color);
|
|
207
207
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-neutral-base-is-expanded-is-hovered-highlight-border-color);
|
|
208
208
|
--_is-active-background-color: var(--semantics-buttons-neutral-base-is-expanded-is-active-background-color);
|
|
209
|
-
--_is-active-primary-content-color: var(--semantics-buttons-neutral-base-is-expanded-is-active-
|
|
209
|
+
--_is-active-primary-content-color: var(--semantics-buttons-neutral-base-is-expanded-is-active-content-color);
|
|
210
210
|
--_is-active-highlight-border-color: var(--semantics-buttons-neutral-base-is-expanded-is-active-highlight-border-color);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
:host([expanded][variant="neutral-transparent"]) {
|
|
214
214
|
--_background-color: transparent;
|
|
215
|
-
--_primary-content-color: var(--semantics-buttons-neutral-transparent-
|
|
215
|
+
--_primary-content-color: var(--semantics-buttons-neutral-transparent-content-color);
|
|
216
216
|
--_highlight-border-color: transparent;
|
|
217
217
|
--_is-hovered-background-color: transparent;
|
|
218
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-transparent-is-hovered-
|
|
218
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-neutral-transparent-is-hovered-content-color);
|
|
219
219
|
--_is-hovered-highlight-border-color: transparent;
|
|
220
220
|
--_is-active-background-color: transparent;
|
|
221
|
-
--_is-active-primary-content-color: var(--semantics-buttons-neutral-transparent-is-active-
|
|
221
|
+
--_is-active-primary-content-color: var(--semantics-buttons-neutral-transparent-is-active-content-color);
|
|
222
222
|
--_is-active-highlight-border-color: transparent;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
:host([expanded][variant="accent-filled"]),
|
|
226
226
|
:host([expanded][variant="primary"]) {
|
|
227
227
|
--_background-color: var(--semantics-buttons-accent-filled-is-expanded-background-color);
|
|
228
|
-
--_primary-content-color: var(--semantics-buttons-accent-filled-is-expanded-
|
|
228
|
+
--_primary-content-color: var(--semantics-buttons-accent-filled-is-expanded-content-color);
|
|
229
229
|
--_highlight-border-color: var(--semantics-buttons-accent-filled-is-expanded-highlight-border-color);
|
|
230
230
|
--_is-hovered-background-color: var(--semantics-buttons-accent-filled-is-expanded-is-hovered-background-color);
|
|
231
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-accent-filled-is-expanded-is-hovered-
|
|
231
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-accent-filled-is-expanded-is-hovered-content-color);
|
|
232
232
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-accent-filled-is-expanded-is-hovered-highlight-border-color);
|
|
233
233
|
--_is-active-background-color: var(--semantics-buttons-accent-filled-is-expanded-is-active-background-color);
|
|
234
|
-
--_is-active-primary-content-color: var(--semantics-buttons-accent-filled-is-expanded-is-active-
|
|
234
|
+
--_is-active-primary-content-color: var(--semantics-buttons-accent-filled-is-expanded-is-active-content-color);
|
|
235
235
|
--_is-active-highlight-border-color: var(--semantics-buttons-accent-filled-is-expanded-is-active-highlight-border-color);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
:host([expanded][variant="accent-transparent"]) {
|
|
239
239
|
--_background-color: transparent;
|
|
240
|
-
--_primary-content-color: var(--semantics-buttons-accent-transparent-
|
|
240
|
+
--_primary-content-color: var(--semantics-buttons-accent-transparent-content-color);
|
|
241
241
|
--_highlight-border-color: transparent;
|
|
242
242
|
--_is-hovered-background-color: transparent;
|
|
243
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-accent-transparent-is-hovered-
|
|
243
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-accent-transparent-is-hovered-content-color);
|
|
244
244
|
--_is-hovered-highlight-border-color: transparent;
|
|
245
245
|
--_is-active-background-color: transparent;
|
|
246
|
-
--_is-active-primary-content-color: var(--semantics-buttons-accent-transparent-is-active-
|
|
246
|
+
--_is-active-primary-content-color: var(--semantics-buttons-accent-transparent-is-active-content-color);
|
|
247
247
|
--_is-active-highlight-border-color: transparent;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
:host([expanded][variant="critical-tinted"]),
|
|
251
251
|
:host([expanded][variant="destructive"]) {
|
|
252
252
|
--_background-color: var(--semantics-buttons-critical-tinted-is-expanded-background-color);
|
|
253
|
-
--_primary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-
|
|
253
|
+
--_primary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-content-color);
|
|
254
254
|
--_highlight-border-color: var(--semantics-buttons-critical-tinted-is-expanded-highlight-border-color);
|
|
255
255
|
--_is-hovered-background-color: var(--semantics-buttons-critical-tinted-is-expanded-is-hovered-background-color);
|
|
256
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-is-hovered-
|
|
256
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-is-hovered-content-color);
|
|
257
257
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-critical-tinted-is-expanded-is-hovered-highlight-border-color);
|
|
258
258
|
--_is-active-background-color: var(--semantics-buttons-critical-tinted-is-expanded-is-active-background-color);
|
|
259
|
-
--_is-active-primary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-is-active-
|
|
259
|
+
--_is-active-primary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-is-active-content-color);
|
|
260
260
|
--_is-active-highlight-border-color: var(--semantics-buttons-critical-tinted-is-expanded-is-active-highlight-border-color);
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
:host([expanded][variant="critical-transparent"]) {
|
|
264
264
|
--_background-color: transparent;
|
|
265
|
-
--_primary-content-color: var(--semantics-buttons-critical-transparent-
|
|
265
|
+
--_primary-content-color: var(--semantics-buttons-critical-transparent-content-color);
|
|
266
266
|
--_highlight-border-color: transparent;
|
|
267
267
|
--_is-hovered-background-color: transparent;
|
|
268
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-critical-transparent-is-hovered-
|
|
268
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-critical-transparent-is-hovered-content-color);
|
|
269
269
|
--_is-hovered-highlight-border-color: transparent;
|
|
270
270
|
--_is-active-background-color: transparent;
|
|
271
|
-
--_is-active-primary-content-color: var(--semantics-buttons-critical-transparent-is-active-
|
|
271
|
+
--_is-active-primary-content-color: var(--semantics-buttons-critical-transparent-is-active-content-color);
|
|
272
272
|
--_is-active-highlight-border-color: transparent;
|
|
273
273
|
}
|
|
274
274
|
|
|
@@ -278,25 +278,25 @@ export const iconButtonStyles = css `
|
|
|
278
278
|
specificity and later source order. See nldd-button for the rationale. */
|
|
279
279
|
:host([expanded][variant="inherit-tinted"]) {
|
|
280
280
|
--_background-color: var(--semantics-buttons-inherit-tinted-is-expanded-background-color);
|
|
281
|
-
--_primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-
|
|
281
|
+
--_primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-content-color);
|
|
282
282
|
--_highlight-border-color: var(--semantics-buttons-inherit-tinted-is-expanded-highlight-border-color);
|
|
283
283
|
--_is-hovered-background-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-background-color);
|
|
284
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-
|
|
284
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-content-color);
|
|
285
285
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-highlight-border-color);
|
|
286
286
|
--_is-active-background-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-background-color);
|
|
287
|
-
--_is-active-primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-
|
|
287
|
+
--_is-active-primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-content-color);
|
|
288
288
|
--_is-active-highlight-border-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-highlight-border-color);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
:host([expanded][variant="inherit-filled"]) {
|
|
292
292
|
--_background-color: var(--semantics-buttons-inherit-filled-is-expanded-background-color);
|
|
293
|
-
--_primary-content-color: var(--context-parent-background-color, var(--semantics-buttons-inherit-filled-is-expanded-
|
|
293
|
+
--_primary-content-color: var(--context-parent-background-color, var(--semantics-buttons-inherit-filled-is-expanded-content-color));
|
|
294
294
|
--_highlight-border-color: var(--semantics-buttons-inherit-filled-is-expanded-highlight-border-color);
|
|
295
295
|
--_is-hovered-background-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-background-color);
|
|
296
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-
|
|
296
|
+
--_is-hovered-primary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-content-color);
|
|
297
297
|
--_is-hovered-highlight-border-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-highlight-border-color);
|
|
298
298
|
--_is-active-background-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-background-color);
|
|
299
|
-
--_is-active-primary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-
|
|
299
|
+
--_is-active-primary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-content-color);
|
|
300
300
|
--_is-active-highlight-border-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-highlight-border-color);
|
|
301
301
|
}
|
|
302
302
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,kCAAkC,CAAC;AAwB1C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"icon-button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,kCAAkC,CAAC;AAwB1C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,wCAiH5C"}
|
|
@@ -79,6 +79,7 @@ export function template() {
|
|
|
79
79
|
aria-expanded=${ariaExpanded}
|
|
80
80
|
aria-busy=${ariaBusy}
|
|
81
81
|
tabindex=${this.noTab ? '-1' : nothing}
|
|
82
|
+
@pointerdown=${this._popup.handlePointerdown}
|
|
82
83
|
@click=${this._handleClick}
|
|
83
84
|
>
|
|
84
85
|
${content}
|
|
@@ -103,6 +104,7 @@ export function template() {
|
|
|
103
104
|
popovertarget=${this.popovertarget || nothing}
|
|
104
105
|
.popoverTargetElement=${this.popoverTargetElement}
|
|
105
106
|
.popoverTargetAction=${this.popoverTargetAction}
|
|
107
|
+
@pointerdown=${this._popup.handlePointerdown}
|
|
106
108
|
@click=${this._handleClick}
|
|
107
109
|
>
|
|
108
110
|
${content}
|
|
@@ -119,6 +121,10 @@ export function template() {
|
|
|
119
121
|
</nldd-tooltip>
|
|
120
122
|
`
|
|
121
123
|
: renderButton();
|
|
122
|
-
|
|
124
|
+
// A single slotted nldd-menu / nldd-popover that this button invokes. Named
|
|
125
|
+
// slot so it never lands in the icon slot; it renders nothing in flow (a
|
|
126
|
+
// popover is display:none until shown in the top layer). See _handleClick.
|
|
127
|
+
const popupSlot = html `<slot name="popup" @slotchange=${this._popup.handleSlotChange}></slot>`;
|
|
128
|
+
return html `${control}${loadingIndicator}${popupSlot}`;
|
|
123
129
|
}
|
|
124
130
|
//# sourceMappingURL=icon-button.template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,kCAAkC,CAAC;AAE1C,SAAS,aAAa,CAAC,SAAyB;IAC/C,OAAO,IAAI,CAAA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AI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"icon-button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,kCAAkC,CAAC;AAE1C,SAAS,aAAa,CAAC,SAAyB;IAC/C,OAAO,IAAI,CAAA;;;MAGN,SAAS,CAAC,IAAI;QACf,CAAC,CAAC,IAAI,CAAA,mBAAmB,SAAS,CAAC,IAAI,eAAe;QACtD,CAAC,CAAC,IAAI,CAAA,iCAAiC,SAAS,CAAC,iBAAiB;;cAEzD;;KAET,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAA;;;;IAI5B,CAAC,CAAC,CAAC,OAAO;;IAEV,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;qCACY,SAAS,CAAC,IAAI;GAChD,CAAC,CAAC,CAAC,EAAE;EACN,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ;IACvB,6EAA6E;IAC7E,2EAA2E;IAC3E,6EAA6E;IAC7E,gEAAgE;IAChE,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ;QAC9D,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,8CAA8C,CAAC;QACzD,CAAC,CAAC,EAAE,CAAC;IACN,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAC1D,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC;IACnF,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAEpC,4EAA4E;IAC5E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Y,EAAE;;GAEjB;QACD,CAAC,CAAC,YAAY,EAAE,CAAC;IAElB,4EAA4E;IAC5E,yEAAyE;IACzE,2EAA2E;IAC3E,MAAM,SAAS,GAAG,IAAI,CAAA,kCAAkC,IAAI,CAAC,MAAM,CAAC,gBAAgB,UAAU,CAAC;IAE/F,OAAO,IAAI,CAAA,GAAG,OAAO,GAAG,gBAAgB,GAAG,SAAS,EAAE,CAAC;AACxD,CAAC"}
|
|
@@ -134,6 +134,13 @@ export declare class NLDDMenuItem extends LitElement {
|
|
|
134
134
|
* @attr {Function} filterFn - Custom filter function (query, item) => boolean.
|
|
135
135
|
*
|
|
136
136
|
* @slot - nldd-menu-item and nldd-menu-divider elements.
|
|
137
|
+
* @slot header - Free content shown above the items, outside `role="menu"` (so it may
|
|
138
|
+
* hold non-menuitem content such as an avatar + name, buttons or links —
|
|
139
|
+
* reached with Tab, skipped by arrow navigation). The region is unpadded;
|
|
140
|
+
* control spacing with your own content (e.g. an `nldd-container`). Root-only:
|
|
141
|
+
* never rendered in a submenu. Example: an account identity header (nldd-byline).
|
|
142
|
+
* @slot footer - Free content shown below the items, outside `role="menu"` (same rules as
|
|
143
|
+
* `header`; also unpadded and root-only). Example: a short note or a link.
|
|
137
144
|
* @slot empty - Shown when no items are visible. Defaults to `nldd-inline-dialog`
|
|
138
145
|
* driven by `empty-text` / `empty-supporting-text`. Slot content
|
|
139
146
|
* overrides the default dialog entirely.
|
|
@@ -183,6 +190,12 @@ export declare class NLDDMenu extends LitElement {
|
|
|
183
190
|
*/
|
|
184
191
|
filterFn: (query: string, item: NLDDMenuItem) => boolean;
|
|
185
192
|
private _isEmpty;
|
|
193
|
+
/** Whether the `header` / `footer` slots have meaningful content, driving
|
|
194
|
+
* whether their (root-only) region renders. Set from slotchange + an initial
|
|
195
|
+
* sync in firstUpdated, mirroring nldd-inline-dialog. Not `private`: the
|
|
196
|
+
* template (a separate module) reads them via `this`. */
|
|
197
|
+
_hasHeader: boolean;
|
|
198
|
+
_hasFooter: boolean;
|
|
186
199
|
/** Currently open child submenu (a direct descendant nldd-menu opened
|
|
187
200
|
* by one of this menu's items). null when no submenu is open. */
|
|
188
201
|
private _activeSubmenu;
|
|
@@ -532,6 +545,12 @@ export declare class NLDDMenu extends LitElement {
|
|
|
532
545
|
private _clearHighlight;
|
|
533
546
|
private _setHighlight;
|
|
534
547
|
private _updateEmptyState;
|
|
548
|
+
/** True when the named slot has non-whitespace content. assignedNodes (not
|
|
549
|
+
* assignedElements) so a bare text header counts; whitespace-only formatting
|
|
550
|
+
* nodes don't. */
|
|
551
|
+
private _slotHasContent;
|
|
552
|
+
_onHeaderSlotChange(): void;
|
|
553
|
+
_onFooterSlotChange(): void;
|
|
535
554
|
private _updateDividerVisibility;
|
|
536
555
|
/**
|
|
537
556
|
* Filter items based on a query string.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,qDAAqD,CAAC;AAC7D,OAAO,yDAAyD,CAAC;AACjE,OAAO,qDAAqD,CAAC;AAC7D,OAAO,4BAA4B,CAAC;AACpC,OAAO,sDAAsD,CAAC;AAC9D,OAAO,0DAA0D,CAAC;AAOlE,qBAAa,eAAgB,SAAQ,UAAU;IAC9C,OAAgB,MAAM,0BAAqB;IAElC,MAAM;CAGf;AASD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAC5C,OAAgB,MAAM,0BAAmB;IAGzC,IAAI,SAAM;IAOV,OAAO,CAAC,MAAM,CAAC,UAAU,CAAK;IAC9B,QAAQ,CAAC,QAAQ,SAAyD;IAEjE,MAAM;CAGf;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AClB,OAAO,CAAC,eAAe;IAQvB,mBAAmB,IAAI,IAAI;IAI3B,mBAAmB,IAAI,IAAI;IAI3B,OAAO,CAAC,wBAAwB;IA4DhC;;;;;;;;OAQG;IACI,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAclC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAQ9B;;OAEG;IACI,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI;IAwB5D;;;OAGG;IACI,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAiBtD,+DAA+D;IACxD,cAAc,IAAI,YAAY,GAAG,IAAI;IAI5C,iFAAiF;IAC1E,gBAAgB,IAAI,MAAM;IAIjC;sEACkE;IAClE,OAAO,CAAC,MAAM;IAKd,oEAAoE;IACvD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAmDxC,OAAO,CAAC,cAAc,CA0FpB;IAEF,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,eAAe,CAAuB;IAC9C;;;uBAGmB;IACnB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAO;IAElD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,gBAAgB;IAgCxB,OAAO,CAAC,mBAAmB,CAEzB;IAEF,OAAO,CAAC,aAAa,CA0DnB;IAEO,MAAM;CAGf;AAMD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;QACtB,gBAAgB,EAAE,YAAY,CAAC;QAC/B,mBAAmB,EAAE,eAAe,CAAC;QACrC,iBAAiB,EAAE,aAAa,CAAC;KACjC;CACD"}
|
|
@@ -345,6 +345,13 @@ const defaultFilterFn = (query, item) => {
|
|
|
345
345
|
* @attr {Function} filterFn - Custom filter function (query, item) => boolean.
|
|
346
346
|
*
|
|
347
347
|
* @slot - nldd-menu-item and nldd-menu-divider elements.
|
|
348
|
+
* @slot header - Free content shown above the items, outside `role="menu"` (so it may
|
|
349
|
+
* hold non-menuitem content such as an avatar + name, buttons or links —
|
|
350
|
+
* reached with Tab, skipped by arrow navigation). The region is unpadded;
|
|
351
|
+
* control spacing with your own content (e.g. an `nldd-container`). Root-only:
|
|
352
|
+
* never rendered in a submenu. Example: an account identity header (nldd-byline).
|
|
353
|
+
* @slot footer - Free content shown below the items, outside `role="menu"` (same rules as
|
|
354
|
+
* `header`; also unpadded and root-only). Example: a short note or a link.
|
|
348
355
|
* @slot empty - Shown when no items are visible. Defaults to `nldd-inline-dialog`
|
|
349
356
|
* driven by `empty-text` / `empty-supporting-text`. Slot content
|
|
350
357
|
* overrides the default dialog entirely.
|
|
@@ -395,6 +402,12 @@ export class NLDDMenu extends LitElement {
|
|
|
395
402
|
*/
|
|
396
403
|
this.filterFn = defaultFilterFn;
|
|
397
404
|
this._isEmpty = false;
|
|
405
|
+
/** Whether the `header` / `footer` slots have meaningful content, driving
|
|
406
|
+
* whether their (root-only) region renders. Set from slotchange + an initial
|
|
407
|
+
* sync in firstUpdated, mirroring nldd-inline-dialog. Not `private`: the
|
|
408
|
+
* template (a separate module) reads them via `this`. */
|
|
409
|
+
this._hasHeader = false;
|
|
410
|
+
this._hasFooter = false;
|
|
398
411
|
/** Currently open child submenu (a direct descendant nldd-menu opened
|
|
399
412
|
* by one of this menu's items). null when no submenu is open. */
|
|
400
413
|
this._activeSubmenu = null;
|
|
@@ -1666,6 +1679,11 @@ export class NLDDMenu extends LitElement {
|
|
|
1666
1679
|
}
|
|
1667
1680
|
firstUpdated() {
|
|
1668
1681
|
this._updateEmptyState();
|
|
1682
|
+
// Initial header/footer detection: slotchange fires for later changes, but
|
|
1683
|
+
// content assigned before this covers the first render (slot exists on the
|
|
1684
|
+
// root only).
|
|
1685
|
+
this._onHeaderSlotChange();
|
|
1686
|
+
this._onFooterSlotChange();
|
|
1669
1687
|
}
|
|
1670
1688
|
disconnectedCallback() {
|
|
1671
1689
|
super.disconnectedCallback();
|
|
@@ -1737,14 +1755,34 @@ export class NLDDMenu extends LitElement {
|
|
|
1737
1755
|
const shown = Array.from(this.querySelectorAll('nldd-menu-item:not([hidden])')).filter(item => item.closest('nldd-menu') === this);
|
|
1738
1756
|
this._isEmpty = shown.length === 0;
|
|
1739
1757
|
}
|
|
1758
|
+
/** True when the named slot has non-whitespace content. assignedNodes (not
|
|
1759
|
+
* assignedElements) so a bare text header counts; whitespace-only formatting
|
|
1760
|
+
* nodes don't. */
|
|
1761
|
+
_slotHasContent(name) {
|
|
1762
|
+
const slot = this.shadowRoot?.querySelector(`slot[name="${name}"]`);
|
|
1763
|
+
return (slot?.assignedNodes({ flatten: true }) ?? []).some(n => n.nodeType === Node.ELEMENT_NODE
|
|
1764
|
+
|| (n.nodeType === Node.TEXT_NODE && (n.textContent?.trim() ?? '') !== ''));
|
|
1765
|
+
}
|
|
1766
|
+
_onHeaderSlotChange() {
|
|
1767
|
+
this._hasHeader = this._slotHasContent('header');
|
|
1768
|
+
}
|
|
1769
|
+
_onFooterSlotChange() {
|
|
1770
|
+
this._hasFooter = this._slotHasContent('footer');
|
|
1771
|
+
}
|
|
1740
1772
|
_updateDividerVisibility() {
|
|
1741
|
-
|
|
1773
|
+
// Only the default-slot children form the item flow. Named-slot children
|
|
1774
|
+
// (header / footer / empty) sit in their own regions, so exclude them from
|
|
1775
|
+
// divider adjacency, or a header would count as the "first child" and swallow
|
|
1776
|
+
// a following divider.
|
|
1777
|
+
const children = Array.from(this.children).filter(el => !el.hasAttribute('slot'));
|
|
1742
1778
|
children.forEach(el => {
|
|
1743
1779
|
const tag = el.tagName.toLowerCase();
|
|
1744
1780
|
if (tag === 'nldd-menu-divider')
|
|
1745
1781
|
el.removeAttribute('hidden');
|
|
1746
|
-
if (tag === 'nldd-menu-group')
|
|
1782
|
+
if (tag === 'nldd-menu-group') {
|
|
1747
1783
|
el.removeAttribute('data-no-bottom-divider');
|
|
1784
|
+
el.removeAttribute('data-no-top-divider');
|
|
1785
|
+
}
|
|
1748
1786
|
});
|
|
1749
1787
|
const visible = children.filter(el => !el.hasAttribute('hidden'));
|
|
1750
1788
|
// Pass 1: hide redundant explicit dividers (first/last, adjacent to
|
|
@@ -1772,6 +1810,13 @@ export class NLDDMenu extends LitElement {
|
|
|
1772
1810
|
remaining.forEach((el, index) => {
|
|
1773
1811
|
if (el.tagName.toLowerCase() !== 'nldd-menu-group')
|
|
1774
1812
|
return;
|
|
1813
|
+
// Top divider: suppress when the group is the first item. CSS
|
|
1814
|
+
// :first-child can't do this once a `header` slot makes the header div
|
|
1815
|
+
// the first light-DOM child (the group is then no longer :first-child),
|
|
1816
|
+
// so drive it from the filtered item flow instead.
|
|
1817
|
+
if (index === 0) {
|
|
1818
|
+
el.setAttribute('data-no-top-divider', '');
|
|
1819
|
+
}
|
|
1775
1820
|
const nextTag = remaining[index + 1]?.tagName.toLowerCase();
|
|
1776
1821
|
const isLast = index === remaining.length - 1;
|
|
1777
1822
|
if (isLast || nextTag === 'nldd-menu-group') {
|
|
@@ -2040,6 +2085,12 @@ __decorate([
|
|
|
2040
2085
|
__decorate([
|
|
2041
2086
|
state()
|
|
2042
2087
|
], NLDDMenu.prototype, "_isEmpty", void 0);
|
|
2088
|
+
__decorate([
|
|
2089
|
+
state()
|
|
2090
|
+
], NLDDMenu.prototype, "_hasHeader", void 0);
|
|
2091
|
+
__decorate([
|
|
2092
|
+
state()
|
|
2093
|
+
], NLDDMenu.prototype, "_hasFooter", void 0);
|
|
2043
2094
|
__decorate([
|
|
2044
2095
|
state()
|
|
2045
2096
|
], NLDDMenu.prototype, "_parentItem", void 0);
|