@nldd/design-system 0.16.2 → 0.17.1
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/README.md +2 -1
- package/custom-elements.json +1376 -415
- package/dist/components/components.js +1438 -356
- package/dist/components/content/blockquote/blockquote.d.ts +11 -1
- package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.js +39 -0
- package/dist/components/content/blockquote/blockquote.js.map +1 -1
- package/dist/components/content/blockquote/blockquote.styles.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.styles.js +42 -1
- package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.js +7 -0
- package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
- package/dist/components/content/icon/icon-registry.js +393 -393
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/icon/icon.template.js +1 -1
- package/dist/components/content/text/text.d.ts +21 -3
- package/dist/components/content/text/text.d.ts.map +1 -1
- package/dist/components/content/text/text.js +41 -1
- package/dist/components/content/text/text.js.map +1 -1
- package/dist/components/content/text/text.styles.d.ts +2 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +88 -2
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/title/title.d.ts +1 -3
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +5 -79
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/{decorate-CtaxGuuh.js → decorate-D2HtKmpx.js} +1 -1
- package/dist/components/{defer-focus-CC5RVvh6.js → defer-focus-JRj1EYUV.js} +2 -2
- package/dist/components/{dev-checks-a7fZ6hgC.js → dev-checks-BPjCXw_r.js} +109 -12
- package/dist/components/icon-DU_IMj2t.js +968 -0
- package/dist/components/{icon-button-DJPpMxWn.js → icon-button-BgeikVnm.js} +3 -3
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts +172 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts.map +1 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.js +447 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.js.map +1 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.d.ts +2 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.d.ts.map +1 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js +188 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js.map +1 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.template.d.ts +4 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.template.d.ts.map +1 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js +64 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js.map +1 -0
- package/dist/components/inputs/search-field/search-field.d.ts +4 -2
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +5 -4
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.template.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.template.js +4 -3
- package/dist/components/inputs/search-field/search-field.template.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.d.ts +14 -0
- package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.js +51 -1
- package/dist/components/inputs/text-field/text-field.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.js +21 -1
- package/dist/components/inputs/text-field/text-field.styles.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.template.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.template.js +5 -0
- package/dist/components/inputs/text-field/text-field.template.js.map +1 -1
- package/dist/components/{just-in-time-education.i18n-S05IOgqk.js → just-in-time-education.i18n-eCghRteQ.js} +10 -10
- package/dist/components/layout/{task-board/task-board-column.d.ts → column-board/column-board-column.d.ts} +5 -5
- package/dist/components/layout/column-board/column-board-column.d.ts.map +1 -0
- package/dist/components/layout/{task-board/task-board-column.js → column-board/column-board-column.js} +34 -34
- package/dist/components/layout/column-board/column-board-column.js.map +1 -0
- package/dist/components/layout/column-board/column-board-column.template.d.ts +3 -0
- package/dist/components/layout/column-board/column-board-column.template.d.ts.map +1 -0
- package/dist/components/layout/{task-board/task-board-column.template.js → column-board/column-board-column.template.js} +10 -10
- package/dist/components/layout/column-board/column-board-column.template.js.map +1 -0
- package/dist/components/layout/{task-board/task-board.d.ts → column-board/column-board.d.ts} +21 -21
- package/dist/components/layout/column-board/column-board.d.ts.map +1 -0
- package/dist/components/layout/column-board/column-board.i18n.d.ts +11 -0
- package/dist/components/layout/column-board/column-board.i18n.d.ts.map +1 -0
- package/dist/components/layout/column-board/column-board.i18n.js +10 -0
- package/dist/components/layout/column-board/column-board.i18n.js.map +1 -0
- package/dist/components/layout/{task-board/task-board.js → column-board/column-board.js} +43 -43
- package/dist/components/layout/column-board/column-board.js.map +1 -0
- package/dist/components/layout/column-board/column-board.styles.d.ts +3 -0
- package/dist/components/layout/column-board/column-board.styles.d.ts.map +1 -0
- package/dist/components/layout/column-board/column-board.styles.js +260 -0
- package/dist/components/layout/column-board/column-board.styles.js.map +1 -0
- package/dist/components/layout/column-board/column-board.template.d.ts +3 -0
- package/dist/components/layout/column-board/column-board.template.d.ts.map +1 -0
- package/dist/components/layout/{task-board/task-board.template.js → column-board/column-board.template.js} +5 -5
- package/dist/components/layout/column-board/column-board.template.js.map +1 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +5 -2
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +15 -3
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +5 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/{nl.generated-CUo20aPV.js → nl.generated-B0pvf8VH.js} +2 -2
- package/dist/components/status-and-feedback/status-bar/status-bar.d.ts +12 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.js +32 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.styles.js +59 -0
- package/dist/components/status-and-feedback/status-bar/status-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.template.js +4 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.template.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +15 -8
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js +30 -12
- package/dist/components/status-and-feedback/step-bar/step-bar.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.d.ts +7 -2
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js +31 -19
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js.map +1 -1
- package/dist/components/{visibility-mixin-CwMutpAK.js → visibility-mixin-Dti3xE8R.js} +1 -1
- package/dist/nldd.min.js +2256 -1815
- package/dist/translations/en-US.js +7 -7
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.js +7 -7
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +7 -7
- package/dist/translations/nl.generated.js +2 -2
- package/dist/translations/nl.generated.js.map +1 -1
- package/dist/translations/pap-AW.js +7 -7
- package/dist/translations/pap-AW.js.map +1 -1
- package/dist/translations/pap-CW.js +7 -7
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/vue.d.ts +129 -50
- package/dist/utilities/custom-font-size.d.ts +19 -0
- package/dist/utilities/custom-font-size.d.ts.map +1 -0
- package/dist/utilities/custom-font-size.js +90 -0
- package/dist/utilities/custom-font-size.js.map +1 -0
- package/dist/utilities/dev-checks.d.ts +7 -0
- package/dist/utilities/dev-checks.d.ts.map +1 -1
- package/dist/utilities/dev-checks.js +23 -0
- package/dist/utilities/dev-checks.js.map +1 -1
- package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
- package/dist/utilities/dev-rules.generated.js +94 -14
- package/dist/utilities/dev-rules.generated.js.map +1 -1
- package/dist/utilities/file-drag-and-drop.js +1 -1
- package/dist/utilities/file-drag-and-drop.js.map +1 -1
- package/dist/utilities/status-bar-change.d.ts +7 -0
- package/dist/utilities/status-bar-change.d.ts.map +1 -0
- package/dist/utilities/status-bar-change.js +7 -0
- package/dist/utilities/status-bar-change.js.map +1 -0
- package/lint/data.generated.json +1 -1
- package/package.json +9 -5
- package/dist/components/icon-Bkdlj87q.js +0 -968
- package/dist/components/layout/task-board/task-board-column.d.ts.map +0 -1
- package/dist/components/layout/task-board/task-board-column.js.map +0 -1
- package/dist/components/layout/task-board/task-board-column.template.d.ts +0 -3
- package/dist/components/layout/task-board/task-board-column.template.d.ts.map +0 -1
- package/dist/components/layout/task-board/task-board-column.template.js.map +0 -1
- package/dist/components/layout/task-board/task-board.d.ts.map +0 -1
- package/dist/components/layout/task-board/task-board.i18n.d.ts +0 -11
- package/dist/components/layout/task-board/task-board.i18n.d.ts.map +0 -1
- package/dist/components/layout/task-board/task-board.i18n.js +0 -10
- package/dist/components/layout/task-board/task-board.i18n.js.map +0 -1
- package/dist/components/layout/task-board/task-board.js.map +0 -1
- package/dist/components/layout/task-board/task-board.styles.d.ts +0 -3
- package/dist/components/layout/task-board/task-board.styles.d.ts.map +0 -1
- package/dist/components/layout/task-board/task-board.styles.js +0 -260
- package/dist/components/layout/task-board/task-board.styles.js.map +0 -1
- package/dist/components/layout/task-board/task-board.template.d.ts +0 -3
- package/dist/components/layout/task-board/task-board.template.d.ts.map +0 -1
- package/dist/components/layout/task-board/task-board.template.js.map +0 -1
|
@@ -31,7 +31,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
31
31
|
* nldd-top-title-bar, across the whole app, also when a split view shows
|
|
32
32
|
* several panes. It reports the state of the service, not of one page, so it
|
|
33
33
|
* never sits inside the content or below a top bar. Below a top bar it says so
|
|
34
|
-
* in development.
|
|
34
|
+
* in development. At the top of the page, in Safari, its color carries on above
|
|
35
|
+
* the page when the page is pulled down, and the ribbon of an
|
|
36
|
+
* nldd-top-navigation-bar below it then starts under the bar, as it does at
|
|
37
|
+
* rest.
|
|
35
38
|
*
|
|
36
39
|
* ## ARIA
|
|
37
40
|
* role and aria-live are set automatically from the variant:
|
|
@@ -59,6 +62,7 @@ import { statusBarStyles } from './status-bar.styles.js';
|
|
|
59
62
|
import { statusBarTemplate } from './status-bar.template.js';
|
|
60
63
|
import '../../content/icon/icon.js';
|
|
61
64
|
import { setState } from '../../../utilities/element-state.js';
|
|
65
|
+
import { STATUS_BAR_CHANGE } from '../../../utilities/status-bar-change.js';
|
|
62
66
|
let NLDDStatusBar = class NLDDStatusBar extends LitElement {
|
|
63
67
|
constructor() {
|
|
64
68
|
super(...arguments);
|
|
@@ -70,6 +74,16 @@ let NLDDStatusBar = class NLDDStatusBar extends LitElement {
|
|
|
70
74
|
/** Link rel attribute. Only used when href is set. */
|
|
71
75
|
this.rel = '';
|
|
72
76
|
this.button = false;
|
|
77
|
+
/**
|
|
78
|
+
* Whether the bar touches the top of the page, the only place where its
|
|
79
|
+
* color carries on above it. Only read while the page is at the top.
|
|
80
|
+
*/
|
|
81
|
+
this._syncAtTop = () => {
|
|
82
|
+
if (window.scrollY > 0)
|
|
83
|
+
return;
|
|
84
|
+
const { top, height } = this.getBoundingClientRect();
|
|
85
|
+
this.toggleAttribute('data-at-top', height > 0 && Math.abs(top) < 1);
|
|
86
|
+
};
|
|
73
87
|
}
|
|
74
88
|
connectedCallback() {
|
|
75
89
|
super.connectedCallback();
|
|
@@ -81,9 +95,26 @@ let NLDDStatusBar = class NLDDStatusBar extends LitElement {
|
|
|
81
95
|
// the live-region role is present from the start; updated() keeps it in sync
|
|
82
96
|
// on later variant changes.
|
|
83
97
|
this._applyAriaForVariant(this.variant);
|
|
98
|
+
// Moved in the DOM or kept by a framework: connects again without a first update.
|
|
99
|
+
window.addEventListener('resize', this._syncAtTop, { passive: true });
|
|
100
|
+
if (this.hasUpdated) {
|
|
101
|
+
this._syncAtTop();
|
|
102
|
+
this._announce();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
disconnectedCallback() {
|
|
106
|
+
super.disconnectedCallback();
|
|
107
|
+
window.removeEventListener('resize', this._syncAtTop);
|
|
108
|
+
this._announce();
|
|
84
109
|
}
|
|
85
110
|
firstUpdated() {
|
|
86
111
|
this._checkPlacement();
|
|
112
|
+
this._syncAtTop();
|
|
113
|
+
this._announce();
|
|
114
|
+
}
|
|
115
|
+
/** Tells a top navigation bar that a status bar came or went, so it measures where its ribbon starts again. */
|
|
116
|
+
_announce() {
|
|
117
|
+
window.dispatchEvent(new Event(STATUS_BAR_CHANGE));
|
|
87
118
|
}
|
|
88
119
|
/** Whether a top bar comes before the status bar. Top bars in an overlay are left out, since a sheet or dialog has its own. */
|
|
89
120
|
_checkPlacement() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-bar.js","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/status-bar/status-bar.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"status-bar.js","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/status-bar/status-bar.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAKrE,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QAIN,YAAO,GAAqB,SAAS,CAAC;QAGtC,SAAI,GAAG,EAAE,CAAC;QAGV,SAAI,GAAG,EAAE,CAAC;QAEV,+DAA+D;QAE/D,WAAM,GAAG,EAAE,CAAC;QAEZ,sDAAsD;QAEtD,QAAG,GAAG,EAAE,CAAC;QAGT,WAAM,GAAG,KAAK,CAAC;QAgCf;;;WAGG;QACK,eAAU,GAAG,GAAS,EAAE;YAC/B,IAAI,MAAM,CAAC,OAAO,GAAG,CAAC;gBAAE,OAAO;YAC/B,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACrD,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACtE,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,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;2CAC5D;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACjB;AAIV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACf;AAIZ;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAClB;AAGT;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAC5B;AArBH,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAyGzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-bar.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/status-bar/status-bar.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"status-bar.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/status-bar/status-bar.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,yBAwM3B,CAAC"}
|
|
@@ -134,6 +134,65 @@ export const statusBarStyles = css `
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
|
|
137
|
+
/* # Above the page */
|
|
138
|
+
|
|
139
|
+
.status-bar__above-page {
|
|
140
|
+
display: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* WebKit only, as the ribbon of nldd-top-navigation-bar: Chrome paints
|
|
144
|
+
nothing above the page. */
|
|
145
|
+
@supports (animation-timeline: scroll()) and (font: -apple-system-body) {
|
|
146
|
+
:host {
|
|
147
|
+
position: relative;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* The fixed ::after only sees the document scroll, and nldd-page can be
|
|
151
|
+
the scroller. This one sees that and goes visibility: hidden on scroll. */
|
|
152
|
+
:host([data-at-top]) .status-bar__above-page {
|
|
153
|
+
display: block;
|
|
154
|
+
position: absolute;
|
|
155
|
+
inset: 0;
|
|
156
|
+
pointer-events: none;
|
|
157
|
+
animation: status-bar-above-page linear both;
|
|
158
|
+
animation-timeline: scroll(nearest);
|
|
159
|
+
animation-range: 0 1px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* No z-index: Safari does not paint it above the page with one. */
|
|
163
|
+
.status-bar__above-page::before {
|
|
164
|
+
content: '';
|
|
165
|
+
position: absolute;
|
|
166
|
+
bottom: 100%;
|
|
167
|
+
left: 0;
|
|
168
|
+
width: 100%;
|
|
169
|
+
height: 100lvh;
|
|
170
|
+
background-color: var(--_status-bar-background-color);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Safari only paints above the page while something fixed touches the top edge. */
|
|
174
|
+
.status-bar__above-page::after {
|
|
175
|
+
content: '';
|
|
176
|
+
position: fixed;
|
|
177
|
+
top: 0;
|
|
178
|
+
left: 0;
|
|
179
|
+
z-index: -1;
|
|
180
|
+
width: 100%;
|
|
181
|
+
height: var(--_status-bar-height);
|
|
182
|
+
background-color: var(--_status-bar-background-color);
|
|
183
|
+
animation: status-bar-above-page linear both;
|
|
184
|
+
animation-timeline: scroll(root);
|
|
185
|
+
animation-range: 0 1px;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@keyframes status-bar-above-page {
|
|
190
|
+
to {
|
|
191
|
+
visibility: hidden;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
|
|
137
196
|
/* # Action icon */
|
|
138
197
|
|
|
139
198
|
.status-bar__action-icon {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-bar.styles.js","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/status-bar/status-bar.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;IAoB9B,kBAAkB
|
|
1
|
+
{"version":3,"file":"status-bar.styles.js","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/status-bar/status-bar.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;IAoB9B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoLrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-bar.template.d.ts","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/status-bar/status-bar.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"status-bar.template.d.ts","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/status-bar/status-bar.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,aAAa,wCAgCzD"}
|
|
@@ -2,6 +2,7 @@ import { html, nothing } from 'lit';
|
|
|
2
2
|
import { linkRel } from '../../../utilities/link-rel.js';
|
|
3
3
|
export function statusBarTemplate(component) {
|
|
4
4
|
const interactive = Boolean(component.href || component.button);
|
|
5
|
+
const abovePage = html `<span class="status-bar__above-page" aria-hidden="true"></span>`;
|
|
5
6
|
const content = html `
|
|
6
7
|
<span class="status-bar__text">${component.text}</span>
|
|
7
8
|
${interactive ? html `
|
|
@@ -14,6 +15,7 @@ export function statusBarTemplate(component) {
|
|
|
14
15
|
`;
|
|
15
16
|
if (component.href) {
|
|
16
17
|
return html `
|
|
18
|
+
${abovePage}
|
|
17
19
|
<a class="status-bar"
|
|
18
20
|
href=${component.href}
|
|
19
21
|
target=${component.target || nothing}
|
|
@@ -23,11 +25,12 @@ export function statusBarTemplate(component) {
|
|
|
23
25
|
}
|
|
24
26
|
if (component.button) {
|
|
25
27
|
return html `
|
|
28
|
+
${abovePage}
|
|
26
29
|
<button class="status-bar"
|
|
27
30
|
type="button"
|
|
28
31
|
>${content}</button>
|
|
29
32
|
`;
|
|
30
33
|
}
|
|
31
|
-
return html
|
|
34
|
+
return html `${abovePage}<div class="status-bar">${content}</div>`;
|
|
32
35
|
}
|
|
33
36
|
//# sourceMappingURL=status-bar.template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-bar.template.js","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/status-bar/status-bar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,MAAM,UAAU,iBAAiB,CAAC,SAAwB;IACzD,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;IAChE,MAAM,OAAO,GAAG,IAAI,CAAA;mCACc,SAAS,CAAC,IAAI;IAC7C,WAAW,CAAC,CAAC,CAAC,IAAI,CAAA;;;;;;GAMnB,CAAC,CAAC,CAAC,OAAO;EACX,CAAC;IACF,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;QACpB,OAAO,IAAI,CAAA;;
|
|
1
|
+
{"version":3,"file":"status-bar.template.js","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/status-bar/status-bar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,MAAM,UAAU,iBAAiB,CAAC,SAAwB;IACzD,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;IAChE,MAAM,SAAS,GAAG,IAAI,CAAA,iEAAiE,CAAC;IACxF,MAAM,OAAO,GAAG,IAAI,CAAA;mCACc,SAAS,CAAC,IAAI;IAC7C,WAAW,CAAC,CAAC,CAAC,IAAI,CAAA;;;;;;GAMnB,CAAC,CAAC,CAAC,OAAO;EACX,CAAC;IACF,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;QACpB,OAAO,IAAI,CAAA;KACR,SAAS;;WAEH,SAAS,CAAC,IAAI;aACZ,SAAS,CAAC,MAAM,IAAI,OAAO;UAC9B,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,OAAO;MACvD,OAAO;GACV,CAAC;IACH,CAAC;IACD,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;QACtB,OAAO,IAAI,CAAA;KACR,SAAS;;;MAGR,OAAO;GACV,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA,GAAG,SAAS,2BAA2B,OAAO,QAAQ,CAAC;AACnE,CAAC"}
|
|
@@ -15,13 +15,17 @@
|
|
|
15
15
|
* values as `nldd-step-cell`, so a flow reads in one vocabulary
|
|
16
16
|
* whether it runs across or down.
|
|
17
17
|
*
|
|
18
|
-
* Horizontal only
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* Horizontal only, for 3 to 5 steps and 7 at most: each step needs room for
|
|
19
|
+
* its label, and with more of them you count instead of seeing at a glance
|
|
20
|
+
* how far you are. For more steps, or steps under each other, build an
|
|
21
|
+
* `nldd-list` with an `nldd-step-cell` and an `nldd-title-cell` per row:
|
|
22
|
+
* vertical steps usually carry more than a title, and a list row already does
|
|
23
|
+
* that.
|
|
21
24
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
+
* When the bar is no wider than the sm breakpoint, or than 120px per step,
|
|
26
|
+
* whichever is wider (a container query, so measured on the component itself
|
|
27
|
+
* rather than on the viewport), it folds into one line of text plus a
|
|
28
|
+
* segmented bar. A label that is too long for its step breaks at a syllable. The full list of steps stays in the DOM, only visually hidden,
|
|
25
29
|
* so assistive software hears no less than a wide screen shows. A step that
|
|
26
30
|
* is a link or a button is out of the tab order then: Tab would land on
|
|
27
31
|
* something you cannot see (WCAG 2.4.7).
|
|
@@ -118,10 +122,13 @@ export declare class NLDDStepBar extends NLDDStepBar_base {
|
|
|
118
122
|
/** `status` lives on the children, so a change there has to reach this
|
|
119
123
|
* element: the derived statuses and the compact view follow it. */
|
|
120
124
|
private _observer;
|
|
121
|
-
/** Whether the compact view shows: the same width the container
|
|
122
|
-
* the styles
|
|
125
|
+
/** Whether the compact view shows: the same width the container queries in
|
|
126
|
+
* the styles compare. */
|
|
123
127
|
private _compact;
|
|
128
|
+
private _width;
|
|
124
129
|
private _resizeObserver;
|
|
130
|
+
/** The step count the styles have a threshold for: none up to 5, where the sm breakpoint is wider than the row needs, and 12 from 12 on. */
|
|
131
|
+
private get _thresholdCount();
|
|
125
132
|
connectedCallback(): void;
|
|
126
133
|
disconnectedCallback(): void;
|
|
127
134
|
_onSlotChange: (e: Event) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-bar.d.ts","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/step-bar/step-bar.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"step-bar.d.ts","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/step-bar/step-bar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EQ,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IAMrC,aAAa,GAAI,GAAG,KAAK,KAAG,IAAI,CAI9B;IAEF;;2BAEuB;IACd,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAYlD;4EACwE;IACxE,OAAO,CAAC,UAAU;IAWT,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,eAAe,EAAE,WAAW,CAAC;QAC7B,oBAAoB,EAAE,eAAe,CAAC;KACtC;CACD"}
|
|
@@ -21,13 +21,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
21
21
|
* values as `nldd-step-cell`, so a flow reads in one vocabulary
|
|
22
22
|
* whether it runs across or down.
|
|
23
23
|
*
|
|
24
|
-
* Horizontal only
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* Horizontal only, for 3 to 5 steps and 7 at most: each step needs room for
|
|
25
|
+
* its label, and with more of them you count instead of seeing at a glance
|
|
26
|
+
* how far you are. For more steps, or steps under each other, build an
|
|
27
|
+
* `nldd-list` with an `nldd-step-cell` and an `nldd-title-cell` per row:
|
|
28
|
+
* vertical steps usually carry more than a title, and a list row already does
|
|
29
|
+
* that.
|
|
27
30
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
+
* When the bar is no wider than the sm breakpoint, or than 120px per step,
|
|
32
|
+
* whichever is wider (a container query, so measured on the component itself
|
|
33
|
+
* rather than on the viewport), it folds into one line of text plus a
|
|
34
|
+
* segmented bar. A label that is too long for its step breaks at a syllable. The full list of steps stays in the DOM, only visually hidden,
|
|
31
35
|
* so assistive software hears no less than a wide screen shows. A step that
|
|
32
36
|
* is a link or a button is out of the tab order then: Tab would land on
|
|
33
37
|
* something you cannot see (WCAG 2.4.7).
|
|
@@ -59,9 +63,9 @@ import { customElement } from '../../../utilities/custom-element.js';
|
|
|
59
63
|
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
60
64
|
import { withTranslations } from '../../../utilities/with-translations.js';
|
|
61
65
|
import { nlddStepBarTranslations } from './step-bar.i18n.js';
|
|
62
|
-
import { stepBarStyles, stepBarItemStyles } from './step-bar.styles.js';
|
|
66
|
+
import { stepBarStyles, stepBarItemStyles, COMPACT_COUNTS, STEP_MIN_WIDTH_REM } from './step-bar.styles.js';
|
|
63
67
|
import { stepBarTemplate, stepBarItemTemplate } from './step-bar.template.js';
|
|
64
|
-
import { breakpointPx } from '../../../assets/styles/breakpoints.js';
|
|
68
|
+
import { breakpointPx, rootFontSize } from '../../../assets/styles/breakpoints.js';
|
|
65
69
|
import '../../content/icon/icon.js';
|
|
66
70
|
// # nldd-step-bar-item
|
|
67
71
|
/**
|
|
@@ -171,11 +175,12 @@ let NLDDStepBar = class NLDDStepBar extends withTranslations(LitElement, nlddSte
|
|
|
171
175
|
/** `status` lives on the children, so a change there has to reach this
|
|
172
176
|
* element: the derived statuses and the compact view follow it. */
|
|
173
177
|
this._observer = new MutationObserver(() => this.requestUpdate());
|
|
174
|
-
/** Whether the compact view shows: the same width the container
|
|
175
|
-
* the styles
|
|
178
|
+
/** Whether the compact view shows: the same width the container queries in
|
|
179
|
+
* the styles compare. */
|
|
176
180
|
this._compact = false;
|
|
181
|
+
this._width = 0;
|
|
177
182
|
this._resizeObserver = new ResizeObserver(([entry]) => {
|
|
178
|
-
this.
|
|
183
|
+
this._width = entry.contentRect.width;
|
|
179
184
|
});
|
|
180
185
|
this._onSlotChange = (e) => {
|
|
181
186
|
const slot = e.target;
|
|
@@ -195,6 +200,12 @@ let NLDDStepBar = class NLDDStepBar extends withTranslations(LitElement, nlddSte
|
|
|
195
200
|
return this._items.find(item => item.resolvedStatus === 'current')
|
|
196
201
|
?? this._items[this.resolvedCurrent - 1];
|
|
197
202
|
}
|
|
203
|
+
/** The step count the styles have a threshold for: none up to 5, where the sm breakpoint is wider than the row needs, and 12 from 12 on. */
|
|
204
|
+
get _thresholdCount() {
|
|
205
|
+
if (this.total < COMPACT_COUNTS[0])
|
|
206
|
+
return null;
|
|
207
|
+
return Math.min(this.total, COMPACT_COUNTS[COMPACT_COUNTS.length - 1]);
|
|
208
|
+
}
|
|
198
209
|
connectedCallback() {
|
|
199
210
|
super.connectedCallback();
|
|
200
211
|
this._observer.observe(this, { subtree: true, attributes: true, attributeFilter: ['status'] });
|
|
@@ -212,6 +223,13 @@ let NLDDStepBar = class NLDDStepBar extends withTranslations(LitElement, nlddSte
|
|
|
212
223
|
// withTranslations merges a consumer's `translations` override in its own
|
|
213
224
|
// willUpdate; without this call the override is silently ignored.
|
|
214
225
|
super.willUpdate(changed);
|
|
226
|
+
const count = this._thresholdCount;
|
|
227
|
+
if (count === null)
|
|
228
|
+
this.removeAttribute('data-steps');
|
|
229
|
+
else
|
|
230
|
+
this.setAttribute('data-steps', String(count));
|
|
231
|
+
const threshold = Math.max(breakpointPx('smMax'), (count ?? 0) * STEP_MIN_WIDTH_REM * rootFontSize());
|
|
232
|
+
this._compact = this._width > 0 && this._width <= threshold;
|
|
215
233
|
this._syncItems();
|
|
216
234
|
}
|
|
217
235
|
/** Push position, derived status and status text down to the children. Push
|
|
@@ -239,7 +257,7 @@ __decorate([
|
|
|
239
257
|
], NLDDStepBar.prototype, "_items", void 0);
|
|
240
258
|
__decorate([
|
|
241
259
|
state()
|
|
242
|
-
], NLDDStepBar.prototype, "
|
|
260
|
+
], NLDDStepBar.prototype, "_width", void 0);
|
|
243
261
|
NLDDStepBar = __decorate([
|
|
244
262
|
customElement('nldd-step-bar')
|
|
245
263
|
], NLDDStepBar);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-bar.js","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/step-bar/step-bar.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"step-bar.js","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/step-bar/step-bar.ts"],"names":[],"mappings":";;;;;;AAAA;;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AE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;oDACrC;AAKrB;IADC,KAAK,EAAE;2CACuB;AA0BvB;IADP,KAAK,EAAE;2CACW;AAtCP,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAmGvB"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { type CSSResult } from 'lit';
|
|
2
|
+
/** The least room a step gets in the row; with less, the bar goes compact. 120px at a 16px root. */
|
|
3
|
+
export declare const STEP_MIN_WIDTH_REM = 7.5;
|
|
4
|
+
/** Step counts whose row needs more than the sm breakpoint. From 12 on the bar keeps the threshold of 12. */
|
|
5
|
+
export declare const COMPACT_COUNTS: number[];
|
|
6
|
+
export declare const stepBarStyles: CSSResult;
|
|
7
|
+
export declare const stepBarItemStyles: CSSResult;
|
|
3
8
|
//# sourceMappingURL=step-bar.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-bar.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/step-bar/step-bar.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"step-bar.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/step-bar/step-bar.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAMrD,oGAAoG;AACpG,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,6GAA6G;AAC7G,eAAO,MAAM,cAAc,UAA2B,CAAC;AAuBvD,eAAO,MAAM,aAAa,WA8FzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,WA4L7B,CAAC"}
|
|
@@ -2,6 +2,30 @@ import { css, unsafeCSS } from 'lit';
|
|
|
2
2
|
import { queryBreakpoints } from '../../../assets/styles/breakpoints.js';
|
|
3
3
|
import { inheritedTextReset } from '../../../assets/styles/shadow-resets.js';
|
|
4
4
|
const smMax = unsafeCSS(queryBreakpoints.smMax);
|
|
5
|
+
/** The least room a step gets in the row; with less, the bar goes compact. 120px at a 16px root. */
|
|
6
|
+
export const STEP_MIN_WIDTH_REM = 7.5;
|
|
7
|
+
/** Step counts whose row needs more than the sm breakpoint. From 12 on the bar keeps the threshold of 12. */
|
|
8
|
+
export const COMPACT_COUNTS = [6, 7, 8, 9, 10, 11, 12];
|
|
9
|
+
const compactBelow = (host, width) => css `
|
|
10
|
+
${unsafeCSS(host)} .step-bar__items {
|
|
11
|
+
/* Stays in the DOM for assistive tech. Standard visually-hidden recipe. */
|
|
12
|
+
@container (max-width: ${width}) {
|
|
13
|
+
position: absolute;
|
|
14
|
+
width: 1px;
|
|
15
|
+
height: 1px;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
clip-path: inset(50%);
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
${unsafeCSS(host)} .step-bar__compact-text,
|
|
23
|
+
${unsafeCSS(host)} .step-bar__compact-bar {
|
|
24
|
+
@container (max-width: ${width}) {
|
|
25
|
+
display: flex;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
5
29
|
export const stepBarStyles = css `
|
|
6
30
|
:host {
|
|
7
31
|
box-sizing: border-box;
|
|
@@ -52,17 +76,6 @@ export const stepBarStyles = css `
|
|
|
52
76
|
.step-bar__items {
|
|
53
77
|
display: flex;
|
|
54
78
|
align-items: start;
|
|
55
|
-
|
|
56
|
-
/* Stays in the DOM for assistive tech when the compact view takes over.
|
|
57
|
-
Standard visually-hidden recipe. */
|
|
58
|
-
@container (max-width: ${smMax}) {
|
|
59
|
-
position: absolute;
|
|
60
|
-
width: 1px;
|
|
61
|
-
height: 1px;
|
|
62
|
-
overflow: hidden;
|
|
63
|
-
clip-path: inset(50%);
|
|
64
|
-
white-space: nowrap;
|
|
65
|
-
}
|
|
66
79
|
}
|
|
67
80
|
|
|
68
81
|
.step-bar__compact-text {
|
|
@@ -73,10 +86,6 @@ export const stepBarStyles = css `
|
|
|
73
86
|
align-items: baseline;
|
|
74
87
|
color: var(--_step-bar-compact-text-color);
|
|
75
88
|
font: var(--primitives-font-body-md-regular-flat);
|
|
76
|
-
|
|
77
|
-
@container (max-width: ${smMax}) {
|
|
78
|
-
display: flex;
|
|
79
|
-
}
|
|
80
89
|
}
|
|
81
90
|
|
|
82
91
|
.step-bar__compact-title {
|
|
@@ -93,10 +102,6 @@ export const stepBarStyles = css `
|
|
|
93
102
|
display: none;
|
|
94
103
|
margin-top: var(--_step-bar-compact-bar-gap);
|
|
95
104
|
gap: var(--_step-bar-compact-bar-segment-gap);
|
|
96
|
-
|
|
97
|
-
@container (max-width: ${smMax}) {
|
|
98
|
-
display: flex;
|
|
99
|
-
}
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
.step-bar__compact-bar-segment {
|
|
@@ -109,6 +114,12 @@ export const stepBarStyles = css `
|
|
|
109
114
|
.step-bar__compact-bar-segment[data-filled] {
|
|
110
115
|
background-color: var(--_step-bar-progress-color);
|
|
111
116
|
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
/* ## Compact */
|
|
120
|
+
|
|
121
|
+
${compactBelow(':host', smMax)}
|
|
122
|
+
${unsafeCSS(COMPACT_COUNTS.map((count) => compactBelow(`:host([data-steps="${count}"])`, unsafeCSS(`${count * STEP_MIN_WIDTH_REM}rem`)).cssText).join('\n'))}
|
|
112
123
|
`;
|
|
113
124
|
export const stepBarItemStyles = css `
|
|
114
125
|
:host {
|
|
@@ -216,6 +227,7 @@ export const stepBarItemStyles = css `
|
|
|
216
227
|
color: var(--_step-bar-title-color);
|
|
217
228
|
font: var(--primitives-font-body-sm-regular-flat);
|
|
218
229
|
overflow-wrap: anywhere;
|
|
230
|
+
hyphens: auto;
|
|
219
231
|
text-wrap: balance;
|
|
220
232
|
}
|
|
221
233
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-bar.styles.js","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/step-bar/step-bar.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"step-bar.styles.js","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/step-bar/step-bar.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAkB,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,KAAK,GAAG,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAEhD,oGAAoG;AACpG,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,6GAA6G;AAC7G,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAEvD,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,KAAgB,EAAE,EAAE,CAAC,GAAG,CAAA;GACzD,SAAS,CAAC,IAAI,CAAC;;2BAES,KAAK;;;;;;;;;;GAU7B,SAAS,CAAC,IAAI,CAAC;GACf,SAAS,CAAC,IAAI,CAAC;2BACS,KAAK;;;;CAI/B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqC5B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDnB,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC;GAC5B,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,sBAAsB,KAAK,KAAK,EAAE,SAAS,CAAC,GAAG,KAAK,GAAG,kBAAkB,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CAC5J,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;IAMhC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsLrB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __decorate } from "./decorate-
|
|
1
|
+
import { t as __decorate } from "./decorate-D2HtKmpx.js";
|
|
2
2
|
import { n as queryBreakpoints } from "./breakpoints-Bti55RWY.js";
|
|
3
3
|
import { css, unsafeCSS } from "lit";
|
|
4
4
|
import { property } from "lit/decorators.js";
|