@nldd/design-system 0.8.37 → 0.8.39
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.styles.d.ts.map +1 -1
- package/dist/components/actions/button/button.styles.js +1 -0
- package/dist/components/actions/button/button.styles.js.map +1 -1
- package/dist/components/components.js +1213 -856
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +28 -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 +40 -30
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/title/title.styles.d.ts.map +1 -1
- package/dist/components/content/title/title.styles.js +4 -0
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.d.ts +15 -5
- package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.js +87 -19
- package/dist/components/content/tooltip/tooltip.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +14 -20
- package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.template.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.template.js +2 -2
- package/dist/components/content/tooltip/tooltip.template.js.map +1 -1
- package/dist/components/forms/form/form.d.ts +19 -24
- package/dist/components/forms/form/form.d.ts.map +1 -1
- package/dist/components/forms/form/form.js +20 -40
- package/dist/components/forms/form/form.js.map +1 -1
- package/dist/components/forms/form-actions/form-actions.d.ts +18 -7
- package/dist/components/forms/form-actions/form-actions.d.ts.map +1 -1
- package/dist/components/forms/form-actions/form-actions.js +18 -7
- package/dist/components/forms/form-actions/form-actions.js.map +1 -1
- package/dist/components/forms/form-actions/form-actions.styles.d.ts.map +1 -1
- package/dist/components/forms/form-actions/form-actions.styles.js +6 -2
- package/dist/components/forms/form-actions/form-actions.styles.js.map +1 -1
- package/dist/components/forms/form-field/form-field.d.ts +15 -3
- package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.js +15 -3
- package/dist/components/forms/form-field/form-field.js.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.js +22 -8
- package/dist/components/forms/form-field/form-field.styles.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.js +3 -1
- package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
- package/dist/components/layout/app-view/app-view.d.ts +10 -1
- package/dist/components/layout/app-view/app-view.d.ts.map +1 -1
- package/dist/components/layout/app-view/app-view.js +52 -0
- package/dist/components/layout/app-view/app-view.js.map +1 -1
- package/dist/components/layout/card/card.d.ts +1 -0
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.js +14 -0
- package/dist/components/layout/card/card.js.map +1 -1
- package/dist/components/layout/card/card.styles.d.ts.map +1 -1
- package/dist/components/layout/card/card.styles.js +0 -2
- package/dist/components/layout/card/card.styles.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +4 -0
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +39 -0
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.d.ts.map +1 -1
- package/dist/components/layout/page/page.styles.js +10 -8
- package/dist/components/layout/page/page.styles.js.map +1 -1
- package/dist/components/layout/page/page.template.d.ts.map +1 -1
- package/dist/components/layout/page/page.template.js +12 -10
- package/dist/components/layout/page/page.template.js.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +3 -2
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +8 -3
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +28 -15
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +4 -0
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +11 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +42 -13
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +4 -0
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +11 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +42 -13
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +3 -2
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.js +8 -3
- package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +34 -15
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +4 -0
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +11 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +42 -14
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
- package/dist/components/layout/popover/popover.d.ts +42 -3
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +154 -6
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/popover/popover.styles.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.styles.js +41 -29
- package/dist/components/layout/popover/popover.styles.js.map +1 -1
- package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.js +2 -0
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +8 -15
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +11 -75
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js +3 -51
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.template.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.template.js +7 -10
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.template.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +80 -67
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +0 -2
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts +1 -0
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +5 -0
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +0 -2
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js.map +1 -1
- package/dist/components/layout/window/window.d.ts +6 -0
- package/dist/components/layout/window/window.d.ts.map +1 -1
- package/dist/components/layout/window/window.js +29 -5
- package/dist/components/layout/window/window.js.map +1 -1
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js +4 -0
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js +1 -0
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.d.ts +1 -0
- package/dist/components/lists-and-menus/menu/menu.d.ts.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.js +10 -1
- package/dist/components/lists-and-menus/menu/menu.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +10 -0
- 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 +29 -0
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +16 -16
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +1 -0
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.js +16 -0
- package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +4 -0
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js.map +1 -1
- package/dist/css/form.css +10 -28
- package/dist/css/rich-text.css +66 -18
- package/dist/css/settings.css +1 -1
- package/package.json +1 -1
|
@@ -5,13 +5,22 @@
|
|
|
5
5
|
* Gebruikt `display: contents` zodat het de layout van het child niet beïnvloedt.
|
|
6
6
|
*
|
|
7
7
|
* @element nldd-tooltip
|
|
8
|
-
* @attr {string}
|
|
9
|
-
* @attr {string}
|
|
8
|
+
* @attr {string} text - Tooltip tekst
|
|
9
|
+
* @attr {string} placement - Positie: 'top' | 'bottom' | 'left' | 'right' (standaard: 'bottom'; op touch devices automatisch 'top')
|
|
10
|
+
* @attr {boolean} disabled - Wanneer true wordt de tooltip nooit getoond.
|
|
11
|
+
* Hover/focus events op de trigger worden
|
|
12
|
+
* genegeerd; een al zichtbare tooltip wordt
|
|
13
|
+
* direct verborgen. Voor consumers die het
|
|
14
|
+
* tooltip-gedrag conditioneel willen schakelen
|
|
15
|
+
* (bv. alleen tonen wanneer tekst getrunceerd is).
|
|
10
16
|
*
|
|
11
17
|
* @slot - Het element waarop de tooltip wordt getoond
|
|
12
18
|
*
|
|
13
|
-
* @note
|
|
14
|
-
*
|
|
19
|
+
* @note Rendert via de native Popover API (`popover="manual"`) in de top
|
|
20
|
+
* layer. Daardoor escape de tooltip alle ancestor stacking contexts en
|
|
21
|
+
* `overflow: hidden` clipping — geen z-index gevechten meer met overlay-
|
|
22
|
+
* containers, panes of transform-containers. Positionering blijft via
|
|
23
|
+
* Floating UI met `strategy: 'fixed'`.
|
|
15
24
|
*
|
|
16
25
|
* @note aria-describedby werkt alleen wanneer het trigger element in de light DOM staat.
|
|
17
26
|
* Bij web components als trigger (met eigen shadow DOM) is de koppeling een bekende
|
|
@@ -37,23 +46,29 @@ import { tooltipTemplate } from './tooltip.template.js';
|
|
|
37
46
|
import { isTouchMode } from '../../../utilities/input-modality.js';
|
|
38
47
|
let tooltipCounter = 0;
|
|
39
48
|
const coarsePointerQuery = matchMedia('(pointer: coarse)');
|
|
49
|
+
// Defaults mirror the values in tooltip.styles.ts. Used as fallback when the
|
|
50
|
+
// CSS variable is unset or non-numeric — most often in SSR / early-load
|
|
51
|
+
// environments where styles haven't reached the element yet. Without the
|
|
52
|
+
// fallback, parseInt('') returns NaN and setTimeout silently coerces it to
|
|
53
|
+
// 0ms, so the tooltip would show instantly. Keep these in sync with CSS.
|
|
54
|
+
const DEFAULT_SHOW_DELAY_MS = 700;
|
|
55
|
+
const DEFAULT_HIDE_DELAY_MS = 50;
|
|
40
56
|
let NLDDTooltip = class NLDDTooltip extends LitElement {
|
|
41
57
|
constructor() {
|
|
42
58
|
super(...arguments);
|
|
43
59
|
this.text = '';
|
|
44
60
|
this.placement = 'bottom';
|
|
61
|
+
this.disabled = false;
|
|
45
62
|
this._visible = false;
|
|
46
|
-
this._focusVisible = false;
|
|
47
63
|
this._tooltipId = `nldd-tooltip-${++tooltipCounter}`;
|
|
48
64
|
this._hideTimeout = null;
|
|
65
|
+
this._showTimeout = null;
|
|
49
66
|
this._descriptionEl = null;
|
|
50
67
|
this._currentTrigger = null;
|
|
51
68
|
this._boundSlotChange = () => this._syncAriaDescribedBy();
|
|
52
69
|
this._handleKeyDown = (e) => {
|
|
53
|
-
if (e.key === 'Escape' && this._visible)
|
|
70
|
+
if (e.key === 'Escape' && this._visible)
|
|
54
71
|
this._visible = false;
|
|
55
|
-
this._focusVisible = false;
|
|
56
|
-
}
|
|
57
72
|
};
|
|
58
73
|
}
|
|
59
74
|
get _effectivePlacement() {
|
|
@@ -71,12 +86,32 @@ let NLDDTooltip = class NLDDTooltip extends LitElement {
|
|
|
71
86
|
this.shadowRoot?.querySelector('slot')?.addEventListener('slotchange', this._boundSlotChange);
|
|
72
87
|
}
|
|
73
88
|
updated(changed) {
|
|
74
|
-
if (changed.has('_visible')
|
|
75
|
-
this.
|
|
89
|
+
if (changed.has('_visible')) {
|
|
90
|
+
const tooltip = this._getTooltipElement();
|
|
91
|
+
if (tooltip) {
|
|
92
|
+
if (this._visible) {
|
|
93
|
+
if (!tooltip.matches(':popover-open'))
|
|
94
|
+
tooltip.showPopover();
|
|
95
|
+
this._updatePosition();
|
|
96
|
+
}
|
|
97
|
+
else if (tooltip.matches(':popover-open')) {
|
|
98
|
+
tooltip.hidePopover();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
76
101
|
}
|
|
77
|
-
if (changed.has('text')) {
|
|
102
|
+
if (changed.has('text') || changed.has('disabled')) {
|
|
78
103
|
this._syncAriaDescribedBy();
|
|
79
104
|
}
|
|
105
|
+
if (changed.has('disabled') && this.disabled) {
|
|
106
|
+
// Cancel any pending show — without this the timer fires after
|
|
107
|
+
// disabled is set and re-opens the tooltip.
|
|
108
|
+
if (this._showTimeout) {
|
|
109
|
+
clearTimeout(this._showTimeout);
|
|
110
|
+
this._showTimeout = null;
|
|
111
|
+
}
|
|
112
|
+
if (this._visible)
|
|
113
|
+
this._visible = false;
|
|
114
|
+
}
|
|
80
115
|
}
|
|
81
116
|
_syncAriaDescribedBy() {
|
|
82
117
|
const trigger = this._getTriggerElement();
|
|
@@ -92,7 +127,12 @@ let NLDDTooltip = class NLDDTooltip extends LitElement {
|
|
|
92
127
|
if (trigger.getRootNode() !== document) {
|
|
93
128
|
return;
|
|
94
129
|
}
|
|
95
|
-
|
|
130
|
+
// Suppress the description when disabled — same intent as hiding the
|
|
131
|
+
// visual popover. Without this, screen readers would still announce
|
|
132
|
+
// the redundant tooltip text (the primary use-case for `disabled` is
|
|
133
|
+
// `?disabled=${!isShort}` in document-tab-bar, where the full label is
|
|
134
|
+
// already visible inline).
|
|
135
|
+
if (this.text && !this.disabled) {
|
|
96
136
|
if (!this._descriptionEl) {
|
|
97
137
|
this._descriptionEl = document.createElement('span');
|
|
98
138
|
this._descriptionEl.id = this._tooltipId;
|
|
@@ -124,6 +164,8 @@ let NLDDTooltip = class NLDDTooltip extends LitElement {
|
|
|
124
164
|
return this.shadowRoot?.querySelector('.tooltip') ?? null;
|
|
125
165
|
}
|
|
126
166
|
_handleTriggerEnter() {
|
|
167
|
+
if (this.disabled)
|
|
168
|
+
return;
|
|
127
169
|
if (!this.text)
|
|
128
170
|
return;
|
|
129
171
|
if (coarsePointerQuery.matches)
|
|
@@ -132,10 +174,22 @@ let NLDDTooltip = class NLDDTooltip extends LitElement {
|
|
|
132
174
|
clearTimeout(this._hideTimeout);
|
|
133
175
|
this._hideTimeout = null;
|
|
134
176
|
}
|
|
135
|
-
|
|
136
|
-
|
|
177
|
+
// Pointer-hover show delay: schedule via JS now that the visibility
|
|
178
|
+
// transition is binary (popover open/closed) and the CSS no longer
|
|
179
|
+
// holds the delay. Read the same `--_show-delay` token so the value
|
|
180
|
+
// stays consumer-tunable from CSS.
|
|
181
|
+
if (this._showTimeout)
|
|
182
|
+
clearTimeout(this._showTimeout);
|
|
183
|
+
const parsedShow = parseInt(getComputedStyle(this).getPropertyValue('--_show-delay'), 10);
|
|
184
|
+
const showDelay = Number.isFinite(parsedShow) ? parsedShow : DEFAULT_SHOW_DELAY_MS;
|
|
185
|
+
this._showTimeout = setTimeout(() => {
|
|
186
|
+
this._showTimeout = null;
|
|
187
|
+
this._visible = true;
|
|
188
|
+
}, showDelay);
|
|
137
189
|
}
|
|
138
190
|
_handleFocusIn() {
|
|
191
|
+
if (this.disabled)
|
|
192
|
+
return;
|
|
139
193
|
if (!this.text)
|
|
140
194
|
return;
|
|
141
195
|
// Touch taps can focus elements with explicit `tabindex` (e.g. tab-bar's
|
|
@@ -147,14 +201,24 @@ let NLDDTooltip = class NLDDTooltip extends LitElement {
|
|
|
147
201
|
clearTimeout(this._hideTimeout);
|
|
148
202
|
this._hideTimeout = null;
|
|
149
203
|
}
|
|
150
|
-
|
|
204
|
+
// Focus-triggered show: no delay (keyboard intent is explicit).
|
|
205
|
+
if (this._showTimeout) {
|
|
206
|
+
clearTimeout(this._showTimeout);
|
|
207
|
+
this._showTimeout = null;
|
|
208
|
+
}
|
|
151
209
|
this._visible = true;
|
|
152
210
|
}
|
|
153
211
|
_handleTriggerLeave() {
|
|
212
|
+
// Cancel a scheduled show — leaving before delay elapsed means no show.
|
|
213
|
+
if (this._showTimeout) {
|
|
214
|
+
clearTimeout(this._showTimeout);
|
|
215
|
+
this._showTimeout = null;
|
|
216
|
+
}
|
|
154
217
|
if (this._hideTimeout) {
|
|
155
218
|
clearTimeout(this._hideTimeout);
|
|
156
219
|
}
|
|
157
|
-
const
|
|
220
|
+
const parsedHide = parseInt(getComputedStyle(this).getPropertyValue('--_hide-delay'), 10);
|
|
221
|
+
const hideDelay = Number.isFinite(parsedHide) ? parsedHide : DEFAULT_HIDE_DELAY_MS;
|
|
158
222
|
this._hideTimeout = setTimeout(() => {
|
|
159
223
|
this._visible = false;
|
|
160
224
|
this._hideTimeout = null;
|
|
@@ -204,6 +268,10 @@ let NLDDTooltip = class NLDDTooltip extends LitElement {
|
|
|
204
268
|
clearTimeout(this._hideTimeout);
|
|
205
269
|
this._hideTimeout = null;
|
|
206
270
|
}
|
|
271
|
+
if (this._showTimeout) {
|
|
272
|
+
clearTimeout(this._showTimeout);
|
|
273
|
+
this._showTimeout = null;
|
|
274
|
+
}
|
|
207
275
|
// Clean up aria-describedby on trigger and remove description span from body
|
|
208
276
|
this._currentTrigger?.removeAttribute('aria-describedby');
|
|
209
277
|
this._currentTrigger = null;
|
|
@@ -222,11 +290,11 @@ __decorate([
|
|
|
222
290
|
property({ type: String, reflect: true })
|
|
223
291
|
], NLDDTooltip.prototype, "placement", void 0);
|
|
224
292
|
__decorate([
|
|
225
|
-
|
|
226
|
-
], NLDDTooltip.prototype, "
|
|
293
|
+
property({ type: Boolean, reflect: true })
|
|
294
|
+
], NLDDTooltip.prototype, "disabled", void 0);
|
|
227
295
|
__decorate([
|
|
228
296
|
state()
|
|
229
|
-
], NLDDTooltip.prototype, "
|
|
297
|
+
], NLDDTooltip.prototype, "_visible", void 0);
|
|
230
298
|
NLDDTooltip = __decorate([
|
|
231
299
|
customElement('nldd-tooltip')
|
|
232
300
|
], NLDDTooltip);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACp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AAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;QAC1D,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,CAAC;IAEQ,MAAM;QACd,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;;AAnPe,kBAAM,GAAG,aAAa,AAAhB,CAAiB;AAGvC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAChC;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CACV;AAGhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAC1B;AAOjB;IADC,KAAK,EAAE;6CACS;AAjBL,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAqPvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"tooltip.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,yBAmFzB,CAAC"}
|
|
@@ -25,35 +25,29 @@ export const tooltipStyles = css `
|
|
|
25
25
|
|
|
26
26
|
.tooltip {
|
|
27
27
|
position: fixed;
|
|
28
|
-
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
border: none;
|
|
31
|
+
background: none;
|
|
29
32
|
opacity: 0;
|
|
30
|
-
pointer-events: none;
|
|
31
|
-
visibility: hidden;
|
|
32
33
|
transition:
|
|
33
34
|
opacity var(--_hide-duration) ease,
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
display var(--_hide-duration) allow-discrete,
|
|
36
|
+
overlay var(--_hide-duration) allow-discrete;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
.tooltip
|
|
39
|
+
.tooltip:popover-open {
|
|
39
40
|
opacity: 1;
|
|
40
|
-
visibility: visible;
|
|
41
|
-
pointer-events: auto;
|
|
42
41
|
transition:
|
|
43
|
-
opacity var(--_show-duration) ease
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
opacity var(--_show-duration) ease,
|
|
43
|
+
display var(--_show-duration) allow-discrete,
|
|
44
|
+
overlay var(--_show-duration) allow-discrete;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
pointer-events: auto;
|
|
53
|
-
transition:
|
|
54
|
-
opacity var(--_show-duration) ease,
|
|
55
|
-
visibility 0ms linear,
|
|
56
|
-
pointer-events 0ms linear;
|
|
47
|
+
@starting-style {
|
|
48
|
+
.tooltip:popover-open {
|
|
49
|
+
opacity: 0;
|
|
50
|
+
}
|
|
57
51
|
}
|
|
58
52
|
|
|
59
53
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.styles.js","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"tooltip.styles.js","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmF/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tooltip.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,eAAe,CAAC,SAAS,EAAE,WAAW,GAAG,cAAc,CAiBtE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
3
2
|
export function tooltipTemplate(component) {
|
|
4
3
|
return html `
|
|
5
4
|
<slot
|
|
@@ -8,7 +7,8 @@ export function tooltipTemplate(component) {
|
|
|
8
7
|
@focusin=${component._handleFocusIn}
|
|
9
8
|
@focusout=${component._handleFocusOut}
|
|
10
9
|
></slot>
|
|
11
|
-
<div class
|
|
10
|
+
<div class="tooltip"
|
|
11
|
+
popover="manual"
|
|
12
12
|
aria-hidden="true"
|
|
13
13
|
@mouseenter=${component._handleTooltipEnter}
|
|
14
14
|
@mouseleave=${component._handleTooltipLeave}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.template.js","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tooltip.template.js","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAI3B,MAAM,UAAU,eAAe,CAAC,SAAsB;IACrD,OAAO,IAAI,CAAA;;iBAEK,SAAS,CAAC,mBAAmB;iBAC7B,SAAS,CAAC,mBAAmB;cAChC,SAAS,CAAC,cAAc;eACvB,SAAS,CAAC,eAAe;;;;;iBAKvB,SAAS,CAAC,mBAAmB;iBAC7B,SAAS,CAAC,mBAAmB;;gCAEd,SAAS,CAAC,IAAI;;EAE5C,CAAC;AACH,CAAC"}
|
|
@@ -53,8 +53,11 @@
|
|
|
53
53
|
* @attr {string} autocomplete - 'on' | 'off' (form-level autofill toggle)
|
|
54
54
|
* @attr {string} label-alignment - Default `label-alignment` voor descendant
|
|
55
55
|
* nldd-form-field en nldd-form-actions
|
|
56
|
-
* ('top' | 'right' | 'left').
|
|
57
|
-
*
|
|
56
|
+
* ('top' | 'right' | 'left'). Wordt naar
|
|
57
|
+
* descendants gepropageerd als
|
|
58
|
+
* `form-label-alignment`. Een eigen
|
|
59
|
+
* `label-alignment` op de descendant
|
|
60
|
+
* heeft voorrang via CSS-cascade.
|
|
58
61
|
*
|
|
59
62
|
* @prop {HTMLFormElement | null} form - The inner <form> element (read-only).
|
|
60
63
|
* Use voor `form.checkValidity()`,
|
|
@@ -100,30 +103,22 @@ export declare class NLDDForm extends HTMLElement {
|
|
|
100
103
|
attributeChangedCallback(name: string, _oldVal: string | null, newVal: string | null): void;
|
|
101
104
|
/**
|
|
102
105
|
* Push `label-alignment` to descendant nldd-form-field and nldd-form-actions
|
|
103
|
-
* elements
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
106
|
+
* elements as a separate `form-label-alignment` attribute, defaulting to
|
|
107
|
+
* `'top'` when the form itself has no `label-alignment`. Descendant CSS
|
|
108
|
+
* uses `[label-alignment="X"]` first and falls back to
|
|
109
|
+
* `[form-label-alignment="X"]` when no own value is set, so a consumer's
|
|
110
|
+
* explicit `label-alignment` always wins automatically — without us having
|
|
111
|
+
* to track which elements we previously inherited to.
|
|
107
112
|
*
|
|
108
|
-
*
|
|
113
|
+
* Always-setting (rather than only when the form has its own value) lets
|
|
114
|
+
* downstream selectors assume the attribute is present on every descendant
|
|
115
|
+
* inside an `nldd-form`, which keeps form.css's adjacent-sibling tight-gap
|
|
116
|
+
* rule simple.
|
|
109
117
|
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* In praktijk werkt 't omdat:
|
|
116
|
-
* 1. Bij parsed HTML fires de form's connectedCallback VOORDAT children
|
|
117
|
-
* upgraden — propagation set 'right' op het attribuut, child upgrade
|
|
118
|
-
* leest dat als initial value (geen reflect-default-conflict).
|
|
119
|
-
* 2. Bij dynamic appendChild fires de MutationObserver na DOM-mutation
|
|
120
|
-
* maar microtask-volgorde laat de propagation z'n attribuut zetten
|
|
121
|
-
* voordat Lit's reflection 't kan overschrijven (Lit reflect = ook
|
|
122
|
-
* microtask, maar de MO callback runt eerder in deze flow).
|
|
123
|
-
*
|
|
124
|
-
* Regression test: form.test.ts "propageert ook naar later toegevoegde
|
|
125
|
-
* form-actions children" verifieert deze flow. Verander deze guard
|
|
126
|
-
* niet zonder die test te draaien.
|
|
118
|
+
* The two-attribute split also avoids the historical Lit reflect-default
|
|
119
|
+
* vs MutationObserver timing race: we never touch `label-alignment` on
|
|
120
|
+
* the descendant, so a freshly upgraded Lit element reflecting its default
|
|
121
|
+
* doesn't conflict with the form's intent.
|
|
127
122
|
*/
|
|
128
123
|
private _propagateLabelAlignment;
|
|
129
124
|
private _mirrorAttributes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form/form.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form/form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AAcH,qBAAa,QAAS,SAAQ,WAAW;IACxC,MAAM,KAAK,kBAAkB,aAE5B;IAED,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,SAAS,CAAiC;IAClD,wEAAwE;IACxE,OAAO,CAAC,iBAAiB,CAAS;IAElC,iBAAiB,IAAI,IAAI;IAoEzB,oBAAoB,IAAI,IAAI;IAK5B,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAU3F;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,wBAAwB;IAKhC,OAAO,CAAC,iBAAiB;IAQzB,uEAAuE;IACvE,IAAI,IAAI,IAAI,eAAe,GAAG,IAAI,CAEjC;CACD;AAMD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;CACD"}
|
|
@@ -53,8 +53,11 @@
|
|
|
53
53
|
* @attr {string} autocomplete - 'on' | 'off' (form-level autofill toggle)
|
|
54
54
|
* @attr {string} label-alignment - Default `label-alignment` voor descendant
|
|
55
55
|
* nldd-form-field en nldd-form-actions
|
|
56
|
-
* ('top' | 'right' | 'left').
|
|
57
|
-
*
|
|
56
|
+
* ('top' | 'right' | 'left'). Wordt naar
|
|
57
|
+
* descendants gepropageerd als
|
|
58
|
+
* `form-label-alignment`. Een eigen
|
|
59
|
+
* `label-alignment` op de descendant
|
|
60
|
+
* heeft voorrang via CSS-cascade.
|
|
58
61
|
*
|
|
59
62
|
* @prop {HTMLFormElement | null} form - The inner <form> element (read-only).
|
|
60
63
|
* Use voor `form.checkValidity()`,
|
|
@@ -99,7 +102,6 @@ const FORWARDED_ATTRIBUTES = [
|
|
|
99
102
|
'autocomplete',
|
|
100
103
|
];
|
|
101
104
|
const DESCENDANT_SELECTOR = 'nldd-form-field, nldd-form-actions';
|
|
102
|
-
const INHERITED_MARKER = 'formAlignmentInherited';
|
|
103
105
|
export class NLDDForm extends HTMLElement {
|
|
104
106
|
constructor() {
|
|
105
107
|
super(...arguments);
|
|
@@ -197,48 +199,26 @@ export class NLDDForm extends HTMLElement {
|
|
|
197
199
|
}
|
|
198
200
|
/**
|
|
199
201
|
* Push `label-alignment` to descendant nldd-form-field and nldd-form-actions
|
|
200
|
-
* elements
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
202
|
+
* elements as a separate `form-label-alignment` attribute, defaulting to
|
|
203
|
+
* `'top'` when the form itself has no `label-alignment`. Descendant CSS
|
|
204
|
+
* uses `[label-alignment="X"]` first and falls back to
|
|
205
|
+
* `[form-label-alignment="X"]` when no own value is set, so a consumer's
|
|
206
|
+
* explicit `label-alignment` always wins automatically — without us having
|
|
207
|
+
* to track which elements we previously inherited to.
|
|
204
208
|
*
|
|
205
|
-
*
|
|
209
|
+
* Always-setting (rather than only when the form has its own value) lets
|
|
210
|
+
* downstream selectors assume the attribute is present on every descendant
|
|
211
|
+
* inside an `nldd-form`, which keeps form.css's adjacent-sibling tight-gap
|
|
212
|
+
* rule simple.
|
|
206
213
|
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* In praktijk werkt 't omdat:
|
|
213
|
-
* 1. Bij parsed HTML fires de form's connectedCallback VOORDAT children
|
|
214
|
-
* upgraden — propagation set 'right' op het attribuut, child upgrade
|
|
215
|
-
* leest dat als initial value (geen reflect-default-conflict).
|
|
216
|
-
* 2. Bij dynamic appendChild fires de MutationObserver na DOM-mutation
|
|
217
|
-
* maar microtask-volgorde laat de propagation z'n attribuut zetten
|
|
218
|
-
* voordat Lit's reflection 't kan overschrijven (Lit reflect = ook
|
|
219
|
-
* microtask, maar de MO callback runt eerder in deze flow).
|
|
220
|
-
*
|
|
221
|
-
* Regression test: form.test.ts "propageert ook naar later toegevoegde
|
|
222
|
-
* form-actions children" verifieert deze flow. Verander deze guard
|
|
223
|
-
* niet zonder die test te draaien.
|
|
214
|
+
* The two-attribute split also avoids the historical Lit reflect-default
|
|
215
|
+
* vs MutationObserver timing race: we never touch `label-alignment` on
|
|
216
|
+
* the descendant, so a freshly upgraded Lit element reflecting its default
|
|
217
|
+
* doesn't conflict with the form's intent.
|
|
224
218
|
*/
|
|
225
219
|
_propagateLabelAlignment(value) {
|
|
226
220
|
const fields = this.querySelectorAll(DESCENDANT_SELECTOR);
|
|
227
|
-
fields.forEach(f =>
|
|
228
|
-
const isInherited = f.dataset[INHERITED_MARKER] === 'true';
|
|
229
|
-
const hasOwn = f.hasAttribute('label-alignment');
|
|
230
|
-
// Skip elements that have an explicit own attribute we didn't set
|
|
231
|
-
if (hasOwn && !isInherited)
|
|
232
|
-
return;
|
|
233
|
-
if (value) {
|
|
234
|
-
f.setAttribute('label-alignment', value);
|
|
235
|
-
f.dataset[INHERITED_MARKER] = 'true';
|
|
236
|
-
}
|
|
237
|
-
else if (isInherited) {
|
|
238
|
-
f.removeAttribute('label-alignment');
|
|
239
|
-
delete f.dataset[INHERITED_MARKER];
|
|
240
|
-
}
|
|
241
|
-
});
|
|
221
|
+
fields.forEach(f => f.setAttribute('form-label-alignment', value ?? 'top'));
|
|
242
222
|
}
|
|
243
223
|
_mirrorAttributes() {
|
|
244
224
|
if (!this._form)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/forms/form/form.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/forms/form/form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AAEH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EAAE,CAAC;IACtC,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
* zou staan.
|
|
10
10
|
*
|
|
11
11
|
* Erft `label-alignment` automatisch over van een wrappende `<nldd-form>`:
|
|
12
|
-
* de form
|
|
13
|
-
* `nldd-form-actions` (en `nldd-form-field`) via een
|
|
14
|
-
*
|
|
15
|
-
* form-
|
|
12
|
+
* de form propageert z'n eigen `label-alignment` als `form-label-alignment`
|
|
13
|
+
* naar descendant `nldd-form-actions` (en `nldd-form-field`) via een
|
|
14
|
+
* MutationObserver. Een expliciete eigen `label-alignment` op de form-actions
|
|
15
|
+
* wint via CSS-cascade — de form-code raakt het `label-alignment` attribuut
|
|
16
|
+
* van de descendant nooit aan.
|
|
16
17
|
*
|
|
17
18
|
* <nldd-form label-alignment="right">
|
|
18
19
|
* <nldd-form-field>...</nldd-form-field>
|
|
@@ -25,8 +26,12 @@
|
|
|
25
26
|
*
|
|
26
27
|
* @element nldd-form-actions
|
|
27
28
|
*
|
|
28
|
-
* @attr {string} label-alignment
|
|
29
|
-
*
|
|
29
|
+
* @attr {string} label-alignment - 'top' (default) | 'right' | 'left'.
|
|
30
|
+
* Een eigen waarde wint altijd over de
|
|
31
|
+
* inherited form-label-alignment.
|
|
32
|
+
* @attr {string} form-label-alignment - Door wrappende nldd-form gezet als
|
|
33
|
+
* fallback. Niet zelf zetten in
|
|
34
|
+
* consumer-code.
|
|
30
35
|
*
|
|
31
36
|
* @slot - Actie-elementen (button, button-group, etc.)
|
|
32
37
|
*/
|
|
@@ -34,7 +39,13 @@ import { LitElement } from 'lit';
|
|
|
34
39
|
export type LabelAlignment = 'top' | 'left' | 'right';
|
|
35
40
|
export declare class NLDDFormActions extends LitElement {
|
|
36
41
|
static styles: import("lit").CSSResult;
|
|
37
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Default is `undefined` (and not `'top'`) so Lit doesn't reflect the
|
|
44
|
+
* default value to the attribute on first update. Zie `nldd-form-field`
|
|
45
|
+
* voor uitleg — dezelfde reden: form-label-alignment fallback CSS
|
|
46
|
+
* werkt op `:not([label-alignment])`.
|
|
47
|
+
*/
|
|
48
|
+
labelAlignment: LabelAlignment | undefined;
|
|
38
49
|
render(): import("lit-html").TemplateResult;
|
|
39
50
|
}
|
|
40
51
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-actions.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"form-actions.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtD,qBACa,eAAgB,SAAQ,UAAU;IAC9C,OAAgB,MAAM,0BAAqB;IAE3C;;;;;OAKG;IAEH,cAAc,EAAE,cAAc,GAAG,SAAS,CAAa;IAE9C,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
* zou staan.
|
|
10
10
|
*
|
|
11
11
|
* Erft `label-alignment` automatisch over van een wrappende `<nldd-form>`:
|
|
12
|
-
* de form
|
|
13
|
-
* `nldd-form-actions` (en `nldd-form-field`) via een
|
|
14
|
-
*
|
|
15
|
-
* form-
|
|
12
|
+
* de form propageert z'n eigen `label-alignment` als `form-label-alignment`
|
|
13
|
+
* naar descendant `nldd-form-actions` (en `nldd-form-field`) via een
|
|
14
|
+
* MutationObserver. Een expliciete eigen `label-alignment` op de form-actions
|
|
15
|
+
* wint via CSS-cascade — de form-code raakt het `label-alignment` attribuut
|
|
16
|
+
* van de descendant nooit aan.
|
|
16
17
|
*
|
|
17
18
|
* <nldd-form label-alignment="right">
|
|
18
19
|
* <nldd-form-field>...</nldd-form-field>
|
|
@@ -25,8 +26,12 @@
|
|
|
25
26
|
*
|
|
26
27
|
* @element nldd-form-actions
|
|
27
28
|
*
|
|
28
|
-
* @attr {string} label-alignment
|
|
29
|
-
*
|
|
29
|
+
* @attr {string} label-alignment - 'top' (default) | 'right' | 'left'.
|
|
30
|
+
* Een eigen waarde wint altijd over de
|
|
31
|
+
* inherited form-label-alignment.
|
|
32
|
+
* @attr {string} form-label-alignment - Door wrappende nldd-form gezet als
|
|
33
|
+
* fallback. Niet zelf zetten in
|
|
34
|
+
* consumer-code.
|
|
30
35
|
*
|
|
31
36
|
* @slot - Actie-elementen (button, button-group, etc.)
|
|
32
37
|
*/
|
|
@@ -43,7 +48,13 @@ import { formActionsTemplate } from './form-actions.template.js';
|
|
|
43
48
|
let NLDDFormActions = class NLDDFormActions extends LitElement {
|
|
44
49
|
constructor() {
|
|
45
50
|
super(...arguments);
|
|
46
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Default is `undefined` (and not `'top'`) so Lit doesn't reflect the
|
|
53
|
+
* default value to the attribute on first update. Zie `nldd-form-field`
|
|
54
|
+
* voor uitleg — dezelfde reden: form-label-alignment fallback CSS
|
|
55
|
+
* werkt op `:not([label-alignment])`.
|
|
56
|
+
*/
|
|
57
|
+
this.labelAlignment = undefined;
|
|
47
58
|
}
|
|
48
59
|
render() {
|
|
49
60
|
return formActionsTemplate();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-actions.js","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"form-actions.js","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAK1D,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAGN;;;;;WAKG;QAEH,mBAAc,GAA+B,SAAS,CAAC;IAKxD,CAAC;IAHS,MAAM;QACd,OAAO,mBAAmB,EAAE,CAAC;IAC9B,CAAC;;AAbe,sBAAM,GAAG,iBAAiB,AAApB,CAAqB;AAS3C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;uDACjB;AAV3C,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAe3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-actions.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"form-actions.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,yBAyD7B,CAAC"}
|