@nldd/design-system 0.8.46 → 0.8.47
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/components.js +83 -78
- package/dist/components/content/{code/code.d.ts → code-viewer/code-viewer.d.ts} +12 -11
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -0
- package/dist/components/content/{code/code.js → code-viewer/code-viewer.js} +32 -25
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -0
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts +2 -0
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -0
- package/dist/components/content/code-viewer/code-viewer.styles.js +89 -0
- package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -0
- package/dist/components/content/code-viewer/code-viewer.template.d.ts +4 -0
- package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -0
- package/dist/components/content/{code/code.template.js → code-viewer/code-viewer.template.js} +3 -3
- package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -0
- package/dist/components/{index-BvNDgQGM.js → index-CuzqC3j7.js} +2985 -1818
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/app-view/app-view.d.ts +2 -2
- package/dist/components/layout/app-view/app-view.d.ts.map +1 -1
- package/dist/components/layout/app-view/app-view.js +2 -2
- package/dist/components/layout/app-view/app-view.js.map +1 -1
- package/dist/components/layout/collection/collection.d.ts +2 -0
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +8 -0
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +4 -0
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/collection/collection.template.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.template.js +5 -2
- package/dist/components/layout/collection/collection.template.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +62 -8
- package/dist/components/layout/container/container.d.ts.map +1 -1
- package/dist/components/layout/container/container.js +113 -11
- package/dist/components/layout/container/container.js.map +1 -1
- package/dist/components/layout/container/container.styles.d.ts.map +1 -1
- package/dist/components/layout/container/container.styles.js +261 -15
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/layout/container/container.template.d.ts.map +1 -1
- package/dist/components/layout/container/container.template.js +5 -1
- package/dist/components/layout/container/container.template.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +2 -2
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +1 -1
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.js +1 -1
- package/dist/components/layout/page-footer/page-footer.d.ts +84 -0
- package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -0
- package/dist/components/layout/page-footer/page-footer.i18n.d.ts +5 -0
- package/dist/components/layout/page-footer/page-footer.i18n.d.ts.map +1 -0
- package/dist/components/layout/page-footer/page-footer.i18n.js +4 -0
- package/dist/components/layout/page-footer/page-footer.i18n.js.map +1 -0
- package/dist/components/layout/page-footer/page-footer.js +217 -0
- package/dist/components/layout/page-footer/page-footer.js.map +1 -0
- package/dist/components/layout/page-footer/page-footer.styles.d.ts +4 -0
- package/dist/components/layout/page-footer/page-footer.styles.d.ts.map +1 -0
- package/dist/components/layout/page-footer/page-footer.styles.js +207 -0
- package/dist/components/layout/page-footer/page-footer.styles.js.map +1 -0
- package/dist/components/layout/page-footer/page-footer.template.d.ts +6 -0
- package/dist/components/layout/page-footer/page-footer.template.d.ts.map +1 -0
- package/dist/components/layout/page-footer/page-footer.template.js +73 -0
- package/dist/components/layout/page-footer/page-footer.template.js.map +1 -0
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +26 -1
- 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 +10 -1
- 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 +23 -35
- 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 +26 -1
- 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 +10 -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 +26 -53
- 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 +26 -1
- 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 +10 -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 +33 -51
- 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/page-section-controls.d.ts +226 -0
- package/dist/components/layout/page-sections/page-section-controls.d.ts.map +1 -0
- package/dist/components/layout/page-sections/page-section-controls.js +104 -0
- package/dist/components/layout/page-sections/page-section-controls.js.map +1 -0
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +26 -1
- 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 +10 -1
- 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 +24 -38
- 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 +26 -1
- 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 +10 -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 +33 -51
- 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/split-views/bar-split-view/bar-split-view.d.ts +2 -2
- 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 +1 -1
- 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.js +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts +2 -2
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts +2 -2
- 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 +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts +2 -2
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +1 -1
- package/dist/components/layout/window/window.d.ts +5 -0
- package/dist/components/layout/window/window.d.ts.map +1 -1
- package/dist/components/layout/window/window.js +28 -13
- package/dist/components/layout/window/window.js.map +1 -1
- package/dist/components/layout/window/window.styles.d.ts.map +1 -1
- package/dist/components/layout/window/window.styles.js +1 -7
- package/dist/components/layout/window/window.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.d.ts +6 -5
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.js +16 -111
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.js.map +1 -1
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.styles.d.ts +2 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.styles.d.ts.map +1 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.styles.js +94 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.styles.js.map +1 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.template.d.ts +4 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.template.d.ts.map +1 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.template.js +20 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.template.js.map +1 -0
- package/dist/components/lists-and-menus/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/list-item/list-item.styles.js +9 -13
- package/dist/components/lists-and-menus/list-item/list-item.styles.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts +80 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.i18n.d.ts +6 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.i18n.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.i18n.js +5 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.i18n.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js +192 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.d.ts +3 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.js +124 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.d.ts +6 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js +57 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js.map +1 -0
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +3 -4
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +14 -17
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +47 -46
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js +2 -2
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.js +6 -0
- package/dist/components/navigation/pagination/pagination.styles.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +15 -0
- package/dist/components/navigation/tab-bar/tab-bar.styles.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 +28 -26
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.js +1 -1
- package/dist/components/prism-gherkin-CMPYyXOQ.js +82 -0
- package/dist/components/prism-python-DUL3Gysb.js +99 -0
- package/dist/components/prism-rust-BGBMvZa7.js +157 -0
- package/dist/components/prism-sql-BGqCBMyJ.js +33 -0
- package/dist/components/prism-toml-Ubdq-a5x.js +45 -0
- package/dist/components/{prism-typescript-BX4tFNFm.js → prism-typescript-QDrnGhET.js} +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts +3 -0
- 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 +5 -0
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.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 +20 -4
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.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 +16 -14
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.template.js.map +1 -1
- package/dist/css/form.css +4 -5
- package/dist/css/rich-text.css +27 -115
- package/dist/css/settings.css +45 -32
- package/dist/utilities/page-section-mixin.d.ts +53 -0
- package/dist/utilities/page-section-mixin.d.ts.map +1 -0
- package/dist/utilities/page-section-mixin.js +239 -0
- package/dist/utilities/page-section-mixin.js.map +1 -0
- package/package.json +12 -4
- package/dist/components/content/code/code.d.ts.map +0 -1
- package/dist/components/content/code/code.js.map +0 -1
- package/dist/components/content/code/code.styles.d.ts +0 -2
- package/dist/components/content/code/code.styles.d.ts.map +0 -1
- package/dist/components/content/code/code.styles.js +0 -89
- package/dist/components/content/code/code.styles.js.map +0 -1
- package/dist/components/content/code/code.template.d.ts +0 -4
- package/dist/components/content/code/code.template.d.ts.map +0 -1
- package/dist/components/content/code/code.template.js.map +0 -1
package/dist/css/rich-text.css
CHANGED
|
@@ -11,6 +11,7 @@ nldd-rich-text {
|
|
|
11
11
|
calc(100% - var(--components-rich-text-main-max-width))
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
+
container-type: inline-size;
|
|
14
15
|
display: grid;
|
|
15
16
|
grid-template-columns:
|
|
16
17
|
[full-start] 0
|
|
@@ -82,27 +83,15 @@ nldd-rich-text :is(h1, h2, h3, h4, h5, h6) {
|
|
|
82
83
|
/* # Heading 1 */
|
|
83
84
|
|
|
84
85
|
nldd-rich-text h1 {
|
|
85
|
-
@
|
|
86
|
+
@container (max-width: 640px) {
|
|
86
87
|
font: var(--primitives-font-display-1-sm);
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
@
|
|
90
|
+
@container (min-width: 641px) and (max-width: 1007px) {
|
|
90
91
|
font: var(--primitives-font-display-1-md);
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
@
|
|
94
|
-
font: var(--primitives-font-display-1-lg);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
@container layout-container (max-width: 640px) {
|
|
98
|
-
font: var(--primitives-font-display-1-sm);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@container layout-container (min-width: 641px) and (max-width: 1007px) {
|
|
102
|
-
font: var(--primitives-font-display-1-md);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@container layout-container (min-width: 1008px) {
|
|
94
|
+
@container (min-width: 1008px) {
|
|
106
95
|
font: var(--primitives-font-display-1-lg);
|
|
107
96
|
}
|
|
108
97
|
}
|
|
@@ -111,27 +100,15 @@ nldd-rich-text h1 {
|
|
|
111
100
|
/* # Heading 2 */
|
|
112
101
|
|
|
113
102
|
nldd-rich-text h2 {
|
|
114
|
-
@
|
|
103
|
+
@container (max-width: 640px) {
|
|
115
104
|
font: var(--primitives-font-display-2-sm);
|
|
116
105
|
}
|
|
117
106
|
|
|
118
|
-
@
|
|
107
|
+
@container (min-width: 641px) and (max-width: 1007px) {
|
|
119
108
|
font: var(--primitives-font-display-2-md);
|
|
120
109
|
}
|
|
121
110
|
|
|
122
|
-
@
|
|
123
|
-
font: var(--primitives-font-display-2-lg);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
@container layout-container (max-width: 640px) {
|
|
127
|
-
font: var(--primitives-font-display-2-sm);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
@container layout-container (min-width: 641px) and (max-width: 1007px) {
|
|
131
|
-
font: var(--primitives-font-display-2-md);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@container layout-container (min-width: 1008px) {
|
|
111
|
+
@container (min-width: 1008px) {
|
|
135
112
|
font: var(--primitives-font-display-2-lg);
|
|
136
113
|
}
|
|
137
114
|
}
|
|
@@ -140,27 +117,15 @@ nldd-rich-text h2 {
|
|
|
140
117
|
/* # Heading 3 */
|
|
141
118
|
|
|
142
119
|
nldd-rich-text h3 {
|
|
143
|
-
@
|
|
144
|
-
font: var(--primitives-font-display-3-sm);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@media (min-width: 641px) and (max-width: 1007px) {
|
|
148
|
-
font: var(--primitives-font-display-3-md);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
@media (min-width: 1008px) {
|
|
152
|
-
font: var(--primitives-font-display-3-lg);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@container layout-container (max-width: 640px) {
|
|
120
|
+
@container (max-width: 640px) {
|
|
156
121
|
font: var(--primitives-font-display-3-sm);
|
|
157
122
|
}
|
|
158
123
|
|
|
159
|
-
@container
|
|
124
|
+
@container (min-width: 641px) and (max-width: 1007px) {
|
|
160
125
|
font: var(--primitives-font-display-3-md);
|
|
161
126
|
}
|
|
162
127
|
|
|
163
|
-
@container
|
|
128
|
+
@container (min-width: 1008px) {
|
|
164
129
|
font: var(--primitives-font-display-3-lg);
|
|
165
130
|
}
|
|
166
131
|
}
|
|
@@ -169,27 +134,15 @@ nldd-rich-text h3 {
|
|
|
169
134
|
/* # Heading 4 */
|
|
170
135
|
|
|
171
136
|
nldd-rich-text h4 {
|
|
172
|
-
@
|
|
137
|
+
@container (max-width: 640px) {
|
|
173
138
|
font: var(--primitives-font-display-4-sm);
|
|
174
139
|
}
|
|
175
140
|
|
|
176
|
-
@
|
|
141
|
+
@container (min-width: 641px) and (max-width: 1007px) {
|
|
177
142
|
font: var(--primitives-font-display-4-md);
|
|
178
143
|
}
|
|
179
144
|
|
|
180
|
-
@
|
|
181
|
-
font: var(--primitives-font-display-4-lg);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
@container layout-container (max-width: 640px) {
|
|
185
|
-
font: var(--primitives-font-display-4-sm);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
@container layout-container (min-width: 641px) and (max-width: 1007px) {
|
|
189
|
-
font: var(--primitives-font-display-4-md);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
@container layout-container (min-width: 1008px) {
|
|
145
|
+
@container (min-width: 1008px) {
|
|
193
146
|
font: var(--primitives-font-display-4-lg);
|
|
194
147
|
}
|
|
195
148
|
}
|
|
@@ -198,27 +151,15 @@ nldd-rich-text h4 {
|
|
|
198
151
|
/* # Heading 5 */
|
|
199
152
|
|
|
200
153
|
nldd-rich-text h5 {
|
|
201
|
-
@
|
|
154
|
+
@container (max-width: 640px) {
|
|
202
155
|
font: var(--primitives-font-display-5-sm);
|
|
203
156
|
}
|
|
204
157
|
|
|
205
|
-
@
|
|
158
|
+
@container (min-width: 641px) and (max-width: 1007px) {
|
|
206
159
|
font: var(--primitives-font-display-5-md);
|
|
207
160
|
}
|
|
208
161
|
|
|
209
|
-
@
|
|
210
|
-
font: var(--primitives-font-display-5-lg);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
@container layout-container (max-width: 640px) {
|
|
214
|
-
font: var(--primitives-font-display-5-sm);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
@container layout-container (min-width: 641px) and (max-width: 1007px) {
|
|
218
|
-
font: var(--primitives-font-display-5-md);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
@container layout-container (min-width: 1008px) {
|
|
162
|
+
@container (min-width: 1008px) {
|
|
222
163
|
font: var(--primitives-font-display-5-lg);
|
|
223
164
|
}
|
|
224
165
|
}
|
|
@@ -227,27 +168,15 @@ nldd-rich-text h5 {
|
|
|
227
168
|
/* # Heading 6 */
|
|
228
169
|
|
|
229
170
|
nldd-rich-text h6 {
|
|
230
|
-
@
|
|
171
|
+
@container (max-width: 640px) {
|
|
231
172
|
font: var(--primitives-font-display-6-sm);
|
|
232
173
|
}
|
|
233
174
|
|
|
234
|
-
@
|
|
175
|
+
@container (min-width: 641px) and (max-width: 1007px) {
|
|
235
176
|
font: var(--primitives-font-display-6-md);
|
|
236
177
|
}
|
|
237
178
|
|
|
238
|
-
@
|
|
239
|
-
font: var(--primitives-font-display-6-lg);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
@container layout-container (max-width: 640px) {
|
|
243
|
-
font: var(--primitives-font-display-6-sm);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
@container layout-container (min-width: 641px) and (max-width: 1007px) {
|
|
247
|
-
font: var(--primitives-font-display-6-md);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
@container layout-container (min-width: 1008px) {
|
|
179
|
+
@container (min-width: 1008px) {
|
|
251
180
|
font: var(--primitives-font-display-6-lg);
|
|
252
181
|
}
|
|
253
182
|
}
|
|
@@ -290,6 +219,10 @@ nldd-rich-text li {
|
|
|
290
219
|
padding: 0;
|
|
291
220
|
}
|
|
292
221
|
|
|
222
|
+
nldd-rich-text li > * + * {
|
|
223
|
+
margin-top: var(--_spacing);
|
|
224
|
+
}
|
|
225
|
+
|
|
293
226
|
|
|
294
227
|
/* # Link */
|
|
295
228
|
|
|
@@ -390,18 +323,7 @@ nldd-rich-text blockquote {
|
|
|
390
323
|
border-top-left-radius: var(--semantics-blockquotes-corner-radius);
|
|
391
324
|
font: var(--semantics-blockquotes-md-quote-font);
|
|
392
325
|
|
|
393
|
-
@
|
|
394
|
-
gap: calc(var(--semantics-blockquotes-sm-spacing) / 2);
|
|
395
|
-
margin-block: max(
|
|
396
|
-
0px,
|
|
397
|
-
calc(var(--semantics-blockquotes-sm-spacing) - var(--_spacing))
|
|
398
|
-
);
|
|
399
|
-
padding-block-start: var(--semantics-blockquotes-sm-spacing);
|
|
400
|
-
padding-inline: var(--semantics-blockquotes-sm-spacing);
|
|
401
|
-
font: var(--semantics-blockquotes-sm-quote-font);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
@container layout-container (max-width: 640px) {
|
|
326
|
+
@container (max-width: 640px) {
|
|
405
327
|
gap: calc(var(--semantics-blockquotes-sm-spacing) / 2);
|
|
406
328
|
margin-block: max(
|
|
407
329
|
0px,
|
|
@@ -477,13 +399,7 @@ nldd-rich-text table {
|
|
|
477
399
|
-webkit-overflow-scrolling: touch;
|
|
478
400
|
scrollbar-width: thin;
|
|
479
401
|
|
|
480
|
-
@
|
|
481
|
-
display: table;
|
|
482
|
-
overflow-x: unset;
|
|
483
|
-
scrollbar-width: unset;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
@container layout-container (min-width: 641px) {
|
|
402
|
+
@container (min-width: 641px) {
|
|
487
403
|
display: table;
|
|
488
404
|
overflow-x: unset;
|
|
489
405
|
scrollbar-width: unset;
|
|
@@ -504,16 +420,12 @@ nldd-rich-text th {
|
|
|
504
420
|
/* # Table Data Cell */
|
|
505
421
|
|
|
506
422
|
nldd-rich-text td {
|
|
507
|
-
min-width: var(--primitives-area-
|
|
423
|
+
min-width: var(--primitives-area-160);
|
|
508
424
|
padding: var(--primitives-space-6);
|
|
509
425
|
border-bottom: var(--semantics-dividers-thickness) solid var(--semantics-dividers-color);
|
|
510
426
|
font: var(--primitives-font-body-md-regular-snug);
|
|
511
427
|
|
|
512
|
-
@
|
|
513
|
-
min-width: unset;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
@container layout-container (min-width: 641px) {
|
|
428
|
+
@container (min-width: 641px) {
|
|
517
429
|
min-width: unset;
|
|
518
430
|
}
|
|
519
431
|
}
|
package/dist/css/settings.css
CHANGED
|
@@ -780,6 +780,8 @@
|
|
|
780
780
|
--semantics-content-critical-color: light-dark(var(--primitives-color-critical-550), var(--primitives-color-critical-650));
|
|
781
781
|
--semantics-content-warning-color: light-dark(var(--primitives-color-warning-550), var(--primitives-color-warning-650));
|
|
782
782
|
--semantics-content-success-color: light-dark(var(--primitives-color-success-550), var(--primitives-color-success-650));
|
|
783
|
+
--semantics-content-mark-background-color: light-dark(var(--primitives-color-mark-100), var(--primitives-color-mark-200));
|
|
784
|
+
--semantics-content-mark-color: light-dark(var(--primitives-color-mark-900), var(--primitives-color-mark-800));
|
|
783
785
|
|
|
784
786
|
/* ## Links */
|
|
785
787
|
|
|
@@ -978,12 +980,12 @@
|
|
|
978
980
|
--semantics-page-sections-sm-margin-inline: var(--primitives-space-16);
|
|
979
981
|
--semantics-page-sections-sm-margin-block: var(--primitives-space-16);
|
|
980
982
|
--semantics-page-sections-sm-gap: var(--primitives-space-16);
|
|
981
|
-
--semantics-page-sections-md-margin-inline: var(--primitives-space-
|
|
982
|
-
--semantics-page-sections-md-margin-block: var(--primitives-space-
|
|
983
|
+
--semantics-page-sections-md-margin-inline: var(--primitives-space-40);
|
|
984
|
+
--semantics-page-sections-md-margin-block: var(--primitives-space-32);
|
|
983
985
|
--semantics-page-sections-md-gap: var(--primitives-space-24);
|
|
984
|
-
--semantics-page-sections-lg-margin-inline: var(--primitives-space-
|
|
985
|
-
--semantics-page-sections-lg-margin-block: var(--primitives-space-
|
|
986
|
-
--semantics-page-sections-lg-gap: var(--primitives-space-
|
|
986
|
+
--semantics-page-sections-lg-margin-inline: var(--primitives-space-56);
|
|
987
|
+
--semantics-page-sections-lg-margin-block: var(--primitives-space-48);
|
|
988
|
+
--semantics-page-sections-lg-gap: var(--primitives-space-32);
|
|
987
989
|
|
|
988
990
|
/* ## Overlays */
|
|
989
991
|
|
|
@@ -1039,7 +1041,7 @@
|
|
|
1039
1041
|
|
|
1040
1042
|
/* ## Card */
|
|
1041
1043
|
|
|
1042
|
-
--components-card-background-color: var(--
|
|
1044
|
+
--components-card-background-color: light-dark(var(--primitives-color-neutral-0), var(--primitives-color-neutral-75));
|
|
1043
1045
|
--components-card-corner-radius: var(--primitives-corner-radius-none);
|
|
1044
1046
|
--components-card-box-shadow: var(--primitives-box-shadows-level-2);
|
|
1045
1047
|
|
|
@@ -1123,32 +1125,32 @@
|
|
|
1123
1125
|
Solarized-inspired, mapped to descriptive DS palettes. Consumers
|
|
1124
1126
|
can override per-instance on `nldd-code` to swap the theme. */
|
|
1125
1127
|
|
|
1126
|
-
--components-code-token-comment-color: var(--semantics-content-secondary-color);
|
|
1127
|
-
--components-code-token-punctuation-color: var(--semantics-content-color);
|
|
1128
|
-
--components-code-token-keyword-color: var(--primitives-color-donkergeel-650);
|
|
1129
|
-
--components-code-token-string-color: var(--primitives-color-groen-650);
|
|
1130
|
-
--components-code-token-number-color: var(--primitives-color-oranje-650);
|
|
1131
|
-
--components-code-token-boolean-color: var(--primitives-color-oranje-650);
|
|
1132
|
-
--components-code-token-null-color: var(--primitives-color-oranje-650);
|
|
1133
|
-
--components-code-token-function-color: var(--primitives-color-lintblauw-650);
|
|
1134
|
-
--components-code-token-class-color: var(--primitives-color-donkergeel-650);
|
|
1135
|
-
--components-code-token-builtin-color: var(--primitives-color-donkergeel-650);
|
|
1136
|
-
--components-code-token-tag-color: var(--primitives-color-groen-650);
|
|
1137
|
-
--components-code-token-attr-name-color: var(--primitives-color-lintblauw-650);
|
|
1138
|
-
--components-code-token-attr-value-color: var(--primitives-color-mintgroen-650);
|
|
1139
|
-
--components-code-token-property-color: var(--primitives-color-lintblauw-650);
|
|
1140
|
-
--components-code-token-selector-color: var(--primitives-color-donkergeel-650);
|
|
1141
|
-
--components-code-token-atrule-color: var(--primitives-color-groen-650);
|
|
1142
|
-
--components-code-token-regex-color: var(--primitives-color-rood-650);
|
|
1143
|
-
--components-code-token-url-color: var(--primitives-color-mintgroen-650);
|
|
1144
|
-
--components-code-token-operator-color: var(--primitives-color-groen-650);
|
|
1145
|
-
--components-code-token-constant-color: var(--primitives-color-oranje-650);
|
|
1146
|
-
--components-code-token-deleted-color: var(--primitives-color-rood-650);
|
|
1147
|
-
--components-code-token-inserted-color: var(--primitives-color-groen-650);
|
|
1148
|
-
--components-code-token-important-color: var(--primitives-color-rood-650);
|
|
1149
|
-
--components-code-token-symbol-color: var(--primitives-color-violet-650);
|
|
1150
|
-
--components-code-token-entity-color: var(--primitives-color-paars-650);
|
|
1151
|
-
--components-code-token-variable-color: var(--primitives-color-lintblauw-650);
|
|
1128
|
+
--components-code-viewer-token-comment-color: var(--semantics-content-secondary-color);
|
|
1129
|
+
--components-code-viewer-token-punctuation-color: var(--semantics-content-color);
|
|
1130
|
+
--components-code-viewer-token-keyword-color: var(--primitives-color-donkergeel-650);
|
|
1131
|
+
--components-code-viewer-token-string-color: var(--primitives-color-groen-650);
|
|
1132
|
+
--components-code-viewer-token-number-color: var(--primitives-color-oranje-650);
|
|
1133
|
+
--components-code-viewer-token-boolean-color: var(--primitives-color-oranje-650);
|
|
1134
|
+
--components-code-viewer-token-null-color: var(--primitives-color-oranje-650);
|
|
1135
|
+
--components-code-viewer-token-function-color: var(--primitives-color-lintblauw-650);
|
|
1136
|
+
--components-code-viewer-token-class-color: var(--primitives-color-donkergeel-650);
|
|
1137
|
+
--components-code-viewer-token-builtin-color: var(--primitives-color-donkergeel-650);
|
|
1138
|
+
--components-code-viewer-token-tag-color: var(--primitives-color-groen-650);
|
|
1139
|
+
--components-code-viewer-token-attr-name-color: var(--primitives-color-lintblauw-650);
|
|
1140
|
+
--components-code-viewer-token-attr-value-color: var(--primitives-color-mintgroen-650);
|
|
1141
|
+
--components-code-viewer-token-property-color: var(--primitives-color-lintblauw-650);
|
|
1142
|
+
--components-code-viewer-token-selector-color: var(--primitives-color-donkergeel-650);
|
|
1143
|
+
--components-code-viewer-token-atrule-color: var(--primitives-color-groen-650);
|
|
1144
|
+
--components-code-viewer-token-regex-color: var(--primitives-color-rood-650);
|
|
1145
|
+
--components-code-viewer-token-url-color: var(--primitives-color-mintgroen-650);
|
|
1146
|
+
--components-code-viewer-token-operator-color: var(--primitives-color-groen-650);
|
|
1147
|
+
--components-code-viewer-token-constant-color: var(--primitives-color-oranje-650);
|
|
1148
|
+
--components-code-viewer-token-deleted-color: var(--primitives-color-rood-650);
|
|
1149
|
+
--components-code-viewer-token-inserted-color: var(--primitives-color-groen-650);
|
|
1150
|
+
--components-code-viewer-token-important-color: var(--primitives-color-rood-650);
|
|
1151
|
+
--components-code-viewer-token-symbol-color: var(--primitives-color-violet-650);
|
|
1152
|
+
--components-code-viewer-token-entity-color: var(--primitives-color-paars-650);
|
|
1153
|
+
--components-code-viewer-token-variable-color: var(--primitives-color-lintblauw-650);
|
|
1152
1154
|
|
|
1153
1155
|
/* ## List */
|
|
1154
1156
|
|
|
@@ -1187,6 +1189,12 @@
|
|
|
1187
1189
|
--components-menu-bar-item-is-current-indicator-background-color: var(--semantics-controls-is-highlighted-indicator-color);
|
|
1188
1190
|
--components-menu-bar-item-is-current-indicator-height: var(--primitives-space-4);
|
|
1189
1191
|
|
|
1192
|
+
/* ## Page footer */
|
|
1193
|
+
|
|
1194
|
+
--components-page-footer-background-color: light-dark(var(--primitives-color-neutral-75), var(--primitives-color-neutral-50));
|
|
1195
|
+
--components-page-footer-divider-color: light-dark(var(--primitives-color-neutral-200), var(--primitives-color-neutral-150));
|
|
1196
|
+
--components-page-footer-legal-bar-item-color: var(--semantics-content-secondary-color);
|
|
1197
|
+
|
|
1190
1198
|
/* ## Popover */
|
|
1191
1199
|
|
|
1192
1200
|
--components-popover-default-width: var(--primitives-area-320);
|
|
@@ -1289,6 +1297,11 @@
|
|
|
1289
1297
|
--components-tag-mintgroen-background-color: light-dark(var(--primitives-color-mintgroen-75), var(--primitives-color-mintgroen-150));
|
|
1290
1298
|
--components-tag-mintgroen-content-color: var(--primitives-color-mintgroen-750);
|
|
1291
1299
|
|
|
1300
|
+
/* ## Timeline track cell */
|
|
1301
|
+
|
|
1302
|
+
--components-timeline-track-cell-color: light-dark(var(--primitives-color-accent-750), var(--primitives-color-accent-650));
|
|
1303
|
+
--components-timeline-track-cell-future-background-color: var(--semantics-surfaces-background-color);
|
|
1304
|
+
|
|
1292
1305
|
/* ## Title */
|
|
1293
1306
|
|
|
1294
1307
|
--components-title-sm-overline-font: var(--primitives-font-body-sm-regular-tight);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
type Constructor<T = LitElement> = new (...args: any[]) => T;
|
|
3
|
+
export type PageSectionBackground = 'inherit' | 'base' | 'tinted';
|
|
4
|
+
export type PageSectionScheme = 'inherit' | 'light' | 'dark' | 'inverted';
|
|
5
|
+
export type PageSectionPadding = '0' | '2' | '4' | '6' | '8' | '10' | '12' | '16' | '20' | '24' | '28' | '32' | '40' | '44' | '48' | '56' | '64' | '80' | '96';
|
|
6
|
+
/**
|
|
7
|
+
* Shared surface controls for the page-section components. Adds three
|
|
8
|
+
* orthogonal capabilities, all written as inline host styles / custom
|
|
9
|
+
* properties (no per-component CSS needed for background or scheme — both
|
|
10
|
+
* `color-scheme` and custom properties inherit through the shadow boundary
|
|
11
|
+
* into the section's block element and slotted content):
|
|
12
|
+
*
|
|
13
|
+
* - **background**: `inherit` (the default — transparent, shows the ancestor's
|
|
14
|
+
* surface) | `base` (the base surface colour) | `tinted`. Setting
|
|
15
|
+
* `base`/`tinted` also cascades `--context-parent-background-color` so
|
|
16
|
+
* descendants (cards, nested sections) read the same surface.
|
|
17
|
+
* - **scheme**: `inherit` (default) | `light` | `dark` | `inverted`.
|
|
18
|
+
* `inverted` resolves to the opposite of the surrounding page scheme and
|
|
19
|
+
* re-resolves when `:root[data-scheme]` flips (via onColorSchemeChange).
|
|
20
|
+
* - **block padding**: `padding-block` (both edges) with `padding-top`
|
|
21
|
+
* / `padding-bottom` per-edge overrides, each with responsive `sm-` /
|
|
22
|
+
* `md-` / `lg-` variants (12 attrs total). Token scale `0`–`96`; `0` strips
|
|
23
|
+
* the padding. Per breakpoint the section CSS resolves: scope override →
|
|
24
|
+
* base override → responsive default. The inline (gutter) padding stays
|
|
25
|
+
* design-controlled.
|
|
26
|
+
* - **height**: any CSS length (e.g. '400px', '100dvh') applied as the host's
|
|
27
|
+
* min-height (so the section is at least that tall) — mirroring how `width`
|
|
28
|
+
* maps to the body max-width.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* class NLDDSimpleSection extends PageSectionMixin(LitElement) { … }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function PageSectionMixin<TBase extends Constructor<LitElement>>(Base: TBase): TBase & Constructor<LitElement & {
|
|
36
|
+
background: PageSectionBackground;
|
|
37
|
+
scheme: PageSectionScheme;
|
|
38
|
+
paddingBlock?: PageSectionPadding;
|
|
39
|
+
paddingTop?: PageSectionPadding;
|
|
40
|
+
paddingBottom?: PageSectionPadding;
|
|
41
|
+
smPaddingBlock?: PageSectionPadding;
|
|
42
|
+
smPaddingTop?: PageSectionPadding;
|
|
43
|
+
smPaddingBottom?: PageSectionPadding;
|
|
44
|
+
mdPaddingBlock?: PageSectionPadding;
|
|
45
|
+
mdPaddingTop?: PageSectionPadding;
|
|
46
|
+
mdPaddingBottom?: PageSectionPadding;
|
|
47
|
+
lgPaddingBlock?: PageSectionPadding;
|
|
48
|
+
lgPaddingTop?: PageSectionPadding;
|
|
49
|
+
lgPaddingBottom?: PageSectionPadding;
|
|
50
|
+
height?: string;
|
|
51
|
+
}>;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=page-section-mixin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-section-mixin.d.ts","sourceRoot":"","sources":["../../src/utilities/page-section-mixin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AAItD,KAAK,WAAW,CAAC,CAAC,GAAG,UAAU,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAE7D,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAClE,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAC3B,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAC9D,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAyBhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,SAAS,WAAW,CAAC,UAAU,CAAC,EACrE,IAAI,EAAE,KAAK,GAkK0B,KAAK,GACzC,WAAW,CACV,UAAU,GAAG;IACZ,UAAU,EAAE,qBAAqB,CAAC;IAClC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,eAAe,CAAC,EAAE,kBAAkB,CAAC;IACrC,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,eAAe,CAAC,EAAE,kBAAkB,CAAC;IACrC,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,eAAe,CAAC,EAAE,kBAAkB,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CACD,CACF"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { property } from 'lit/decorators.js';
|
|
8
|
+
import { onColorSchemeChange } from './color-scheme-repaint.js';
|
|
9
|
+
const BACKGROUND_TOKEN = {
|
|
10
|
+
base: 'var(--semantics-surfaces-background-color)',
|
|
11
|
+
tinted: 'var(--semantics-surfaces-tinted-background-color)',
|
|
12
|
+
};
|
|
13
|
+
function paddingToValue(size) {
|
|
14
|
+
if (size === undefined || size === '')
|
|
15
|
+
return null;
|
|
16
|
+
if (size === '0')
|
|
17
|
+
return '0';
|
|
18
|
+
return `var(--primitives-space-${size})`;
|
|
19
|
+
}
|
|
20
|
+
// Block-padding override scopes: base ('') + the sm/md/lg breakpoints. Each
|
|
21
|
+
// scope reads its own props and writes `--_{scope-}padding-top/bottom`, which
|
|
22
|
+
// the section CSS resolves per breakpoint (scope override → base override →
|
|
23
|
+
// responsive default). The CSS var prefix is `${scope}-` (empty for base).
|
|
24
|
+
const PADDING_SCOPES = ['', 'sm', 'md', 'lg'];
|
|
25
|
+
const PADDING_KEYS = [
|
|
26
|
+
'paddingBlock', 'paddingTop', 'paddingBottom',
|
|
27
|
+
'smPaddingBlock', 'smPaddingTop', 'smPaddingBottom',
|
|
28
|
+
'mdPaddingBlock', 'mdPaddingTop', 'mdPaddingBottom',
|
|
29
|
+
'lgPaddingBlock', 'lgPaddingTop', 'lgPaddingBottom',
|
|
30
|
+
];
|
|
31
|
+
/**
|
|
32
|
+
* Shared surface controls for the page-section components. Adds three
|
|
33
|
+
* orthogonal capabilities, all written as inline host styles / custom
|
|
34
|
+
* properties (no per-component CSS needed for background or scheme — both
|
|
35
|
+
* `color-scheme` and custom properties inherit through the shadow boundary
|
|
36
|
+
* into the section's block element and slotted content):
|
|
37
|
+
*
|
|
38
|
+
* - **background**: `inherit` (the default — transparent, shows the ancestor's
|
|
39
|
+
* surface) | `base` (the base surface colour) | `tinted`. Setting
|
|
40
|
+
* `base`/`tinted` also cascades `--context-parent-background-color` so
|
|
41
|
+
* descendants (cards, nested sections) read the same surface.
|
|
42
|
+
* - **scheme**: `inherit` (default) | `light` | `dark` | `inverted`.
|
|
43
|
+
* `inverted` resolves to the opposite of the surrounding page scheme and
|
|
44
|
+
* re-resolves when `:root[data-scheme]` flips (via onColorSchemeChange).
|
|
45
|
+
* - **block padding**: `padding-block` (both edges) with `padding-top`
|
|
46
|
+
* / `padding-bottom` per-edge overrides, each with responsive `sm-` /
|
|
47
|
+
* `md-` / `lg-` variants (12 attrs total). Token scale `0`–`96`; `0` strips
|
|
48
|
+
* the padding. Per breakpoint the section CSS resolves: scope override →
|
|
49
|
+
* base override → responsive default. The inline (gutter) padding stays
|
|
50
|
+
* design-controlled.
|
|
51
|
+
* - **height**: any CSS length (e.g. '400px', '100dvh') applied as the host's
|
|
52
|
+
* min-height (so the section is at least that tall) — mirroring how `width`
|
|
53
|
+
* maps to the body max-width.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* class NLDDSimpleSection extends PageSectionMixin(LitElement) { … }
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export function PageSectionMixin(Base) {
|
|
61
|
+
class WithPageSection extends Base {
|
|
62
|
+
constructor() {
|
|
63
|
+
super(...arguments);
|
|
64
|
+
this.background = 'inherit';
|
|
65
|
+
this.scheme = 'inherit';
|
|
66
|
+
}
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
super.connectedCallback();
|
|
69
|
+
// Re-resolve `inverted` whenever the page color-scheme flips.
|
|
70
|
+
this._unsubScheme = onColorSchemeChange(() => {
|
|
71
|
+
if (this.scheme === 'inverted')
|
|
72
|
+
this._applyScheme();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
disconnectedCallback() {
|
|
76
|
+
super.disconnectedCallback();
|
|
77
|
+
this._unsubScheme?.();
|
|
78
|
+
this._unsubScheme = undefined;
|
|
79
|
+
}
|
|
80
|
+
updated(changed) {
|
|
81
|
+
super.updated(changed);
|
|
82
|
+
if (changed.has('background'))
|
|
83
|
+
this._applyBackground();
|
|
84
|
+
if (changed.has('scheme'))
|
|
85
|
+
this._applyScheme();
|
|
86
|
+
if (PADDING_KEYS.some((k) => changed.has(k)))
|
|
87
|
+
this._applyPadding();
|
|
88
|
+
if (changed.has('height'))
|
|
89
|
+
this._applyHeight();
|
|
90
|
+
}
|
|
91
|
+
_applyBackground() {
|
|
92
|
+
if (this.background === 'base' || this.background === 'tinted') {
|
|
93
|
+
const token = BACKGROUND_TOKEN[this.background];
|
|
94
|
+
this.style.backgroundColor = token;
|
|
95
|
+
// Cascade so descendants (cards, nested sections) match.
|
|
96
|
+
this.style.setProperty('--context-parent-background-color', token);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.style.backgroundColor = '';
|
|
100
|
+
this.style.removeProperty('--context-parent-background-color');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
_applyScheme() {
|
|
104
|
+
if (this.scheme === 'light' || this.scheme === 'dark') {
|
|
105
|
+
this.style.colorScheme = this.scheme;
|
|
106
|
+
}
|
|
107
|
+
else if (this.scheme === 'inverted') {
|
|
108
|
+
this.style.colorScheme = this._resolveActiveScheme() === 'dark' ? 'light' : 'dark';
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
this.style.removeProperty('color-scheme');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Best-effort detection of the *actively rendered* scheme around the
|
|
116
|
+
* section, used to invert it.
|
|
117
|
+
*
|
|
118
|
+
* `getComputedStyle(parent).colorScheme` returns the *declared* value
|
|
119
|
+
* (`'light dark'` for "supports both"; `'normal'` for the initial
|
|
120
|
+
* value) — not the one the browser actually paints with. For
|
|
121
|
+
* `'inverted'` we want the painted scheme, so:
|
|
122
|
+
* 1. Prefer the app's explicit override on `:root[data-scheme]`
|
|
123
|
+
* (the project's site-wide light/dark toggle).
|
|
124
|
+
* 2. Walk up to find an ancestor that pins a single scheme.
|
|
125
|
+
* 3. Otherwise fall back to `prefers-color-scheme` — that's what
|
|
126
|
+
* `'light dark'` resolves to in practice.
|
|
127
|
+
*
|
|
128
|
+
* Perf: the per-call cost is `getComputedStyle()` for each ancestor
|
|
129
|
+
* up to one that pins a scheme. This only runs when the project
|
|
130
|
+
* does NOT set `:root[data-scheme]` (apps with a global theme
|
|
131
|
+
* toggle, like regelrecht, hit the fast path and never enter the
|
|
132
|
+
* walk). When the fallback is needed the walk is bounded by the
|
|
133
|
+
* DOM depth and only fires on `scheme` prop change or a
|
|
134
|
+
* color-scheme repaint event — not on every render.
|
|
135
|
+
*
|
|
136
|
+
* Cross-shadow caveat: `parentElement` doesn't traverse shadow
|
|
137
|
+
* boundaries, so a `color-scheme` declared on an outer custom
|
|
138
|
+
* element's host won't be picked up by the walk; we then fall
|
|
139
|
+
* through to `prefers-color-scheme`. For reliable `'inverted'`
|
|
140
|
+
* behaviour inside nested shadow trees, set `data-scheme` on
|
|
141
|
+
* `:root` so the fast path resolves the painted scheme directly.
|
|
142
|
+
*/
|
|
143
|
+
_resolveActiveScheme() {
|
|
144
|
+
const root = document.documentElement.getAttribute('data-scheme');
|
|
145
|
+
if (root === 'light' || root === 'dark')
|
|
146
|
+
return root;
|
|
147
|
+
let el = this.parentElement;
|
|
148
|
+
while (el) {
|
|
149
|
+
const declared = getComputedStyle(el).colorScheme;
|
|
150
|
+
const hasLight = declared.includes('light');
|
|
151
|
+
const hasDark = declared.includes('dark');
|
|
152
|
+
if (hasDark && !hasLight)
|
|
153
|
+
return 'dark';
|
|
154
|
+
if (hasLight && !hasDark)
|
|
155
|
+
return 'light';
|
|
156
|
+
el = el.parentElement;
|
|
157
|
+
}
|
|
158
|
+
return window.matchMedia?.('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
159
|
+
}
|
|
160
|
+
_applyPadding() {
|
|
161
|
+
const self = this;
|
|
162
|
+
for (const scope of PADDING_SCOPES) {
|
|
163
|
+
// Property names: base = paddingBlock(…); scoped = smPaddingBlock(…).
|
|
164
|
+
const prop = (suffix) => scope ? `${scope}Padding${suffix}` : `padding${suffix}`;
|
|
165
|
+
const block = self[prop('Block')];
|
|
166
|
+
const top = self[prop('Top')];
|
|
167
|
+
const bottom = self[prop('Bottom')];
|
|
168
|
+
const prefix = scope ? `${scope}-` : '';
|
|
169
|
+
this._setVar(`--_${prefix}padding-top`, paddingToValue(top ?? block));
|
|
170
|
+
this._setVar(`--_${prefix}padding-bottom`, paddingToValue(bottom ?? block));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
_applyHeight() {
|
|
174
|
+
// Like `width` (which sets the body max-width), the `height` keyword
|
|
175
|
+
// maps to a constraint — here the host's min-height.
|
|
176
|
+
const v = this.height;
|
|
177
|
+
if (v && typeof CSS !== 'undefined' && CSS.supports('min-height', v)) {
|
|
178
|
+
this.style.minHeight = v;
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this.style.removeProperty('min-height');
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
_setVar(name, value) {
|
|
185
|
+
if (value === null)
|
|
186
|
+
this.style.removeProperty(name);
|
|
187
|
+
else
|
|
188
|
+
this.style.setProperty(name, value);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
__decorate([
|
|
192
|
+
property({ type: String, reflect: true })
|
|
193
|
+
], WithPageSection.prototype, "background", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
property({ type: String, reflect: true })
|
|
196
|
+
], WithPageSection.prototype, "scheme", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
property({ type: String, reflect: true, attribute: 'padding-block' })
|
|
199
|
+
], WithPageSection.prototype, "paddingBlock", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
property({ type: String, reflect: true, attribute: 'padding-top' })
|
|
202
|
+
], WithPageSection.prototype, "paddingTop", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
property({ type: String, reflect: true, attribute: 'padding-bottom' })
|
|
205
|
+
], WithPageSection.prototype, "paddingBottom", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
property({ type: String, reflect: true, attribute: 'sm-padding-block' })
|
|
208
|
+
], WithPageSection.prototype, "smPaddingBlock", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
property({ type: String, reflect: true, attribute: 'sm-padding-top' })
|
|
211
|
+
], WithPageSection.prototype, "smPaddingTop", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
property({ type: String, reflect: true, attribute: 'sm-padding-bottom' })
|
|
214
|
+
], WithPageSection.prototype, "smPaddingBottom", void 0);
|
|
215
|
+
__decorate([
|
|
216
|
+
property({ type: String, reflect: true, attribute: 'md-padding-block' })
|
|
217
|
+
], WithPageSection.prototype, "mdPaddingBlock", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
property({ type: String, reflect: true, attribute: 'md-padding-top' })
|
|
220
|
+
], WithPageSection.prototype, "mdPaddingTop", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
property({ type: String, reflect: true, attribute: 'md-padding-bottom' })
|
|
223
|
+
], WithPageSection.prototype, "mdPaddingBottom", void 0);
|
|
224
|
+
__decorate([
|
|
225
|
+
property({ type: String, reflect: true, attribute: 'lg-padding-block' })
|
|
226
|
+
], WithPageSection.prototype, "lgPaddingBlock", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
property({ type: String, reflect: true, attribute: 'lg-padding-top' })
|
|
229
|
+
], WithPageSection.prototype, "lgPaddingTop", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
property({ type: String, reflect: true, attribute: 'lg-padding-bottom' })
|
|
232
|
+
], WithPageSection.prototype, "lgPaddingBottom", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
property({ type: String, reflect: true })
|
|
235
|
+
], WithPageSection.prototype, "height", void 0);
|
|
236
|
+
return WithPageSection;
|
|
237
|
+
}
|
|
238
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
239
|
+
//# sourceMappingURL=page-section-mixin.js.map
|