@ds-gn/ui 0.6.1 → 0.7.0
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 +24 -6
- package/custom-elements.json +138 -28
- package/dist/components/Container/src/Container.d.ts +10 -5
- package/dist/components/Container/src/Container.js +85 -67
- package/dist/components/Container/src/Container.props.d.ts +19 -1
- package/dist/components/Container/src/Container.props.js +9 -4
- package/dist/components/Container/src/Container.styles.d.ts +9 -2
- package/dist/components/FeatureTabs/src/FeatureTabs.d.ts +5 -0
- package/dist/components/FeatureTabs/src/FeatureTabs.js +12 -4
- package/dist/components/Footer/src/Footer.d.ts +5 -9
- package/dist/components/Footer/src/Footer.js +10 -12
- package/dist/components/Hero/src/Hero.d.ts +5 -0
- package/dist/components/Hero/src/Hero.js +31 -5
- package/dist/components/Hero/src/Hero.styles.d.ts +1 -0
- package/dist/components/Nav/src/Nav.js +2 -9
- package/dist/styles/hero-fallback.css +503 -0
- package/dist/styles/layout-fallback.css +168 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -11,9 +11,9 @@ System.
|
|
|
11
11
|
|
|
12
12
|
**Public Beta** ·
|
|
13
13
|
[Website](https://ds-gn.com/?utm_source=npm&utm_medium=readme&utm_campaign=ui&utm_content=website_link)
|
|
14
|
-
· [Documentation](https://
|
|
15
|
-
[Component reference](https://
|
|
16
|
-
[Changelog](https://
|
|
14
|
+
· [Documentation](https://ds-gn.com/docs/) ·
|
|
15
|
+
[Component reference](https://ds-gn.com/docs/components/button/) ·
|
|
16
|
+
[Changelog](https://ds-gn.com/docs/changelog/ui/) ·
|
|
17
17
|
[Public repository](https://github.com/LightLeapLabs/design-system)
|
|
18
18
|
|
|
19
19
|
npm's Repository link points to our private build repository, which is required
|
|
@@ -95,8 +95,8 @@ Custom events are exposed as `on<EventName>` props named after their underlying
|
|
|
95
95
|
| `@ds-gn/ui/logo/full.svg` | Full DS/GN logo for light backgrounds |
|
|
96
96
|
| `@ds-gn/ui/logo/light.svg` | Full DS/GN logo for light backgrounds |
|
|
97
97
|
| `@ds-gn/ui/logo/dark.svg` | Full DS/GN logo for dark backgrounds |
|
|
98
|
-
| `@ds-gn/ui/
|
|
99
|
-
| `@ds-gn/ui/
|
|
98
|
+
| `@ds-gn/ui/layout.css` | Optional pre-upgrade styles for page layout |
|
|
99
|
+
| `@ds-gn/ui/hero/fallback.css` | Optional pre-upgrade styles for Hero |
|
|
100
100
|
| `@ds-gn/ui/playground-manifest` | Machine-readable component playground metadata |
|
|
101
101
|
|
|
102
102
|
The string helpers inherit `currentColor` for theme-aware lettering and keep the slash orange. Use `getLogoHtml({ size: 24 })` to render the full artwork at a given height with its accessible name.
|
|
@@ -107,13 +107,31 @@ The string helpers inherit `currentColor` for theme-aware lettering and keep the
|
|
|
107
107
|
Start on Node): importing `@ds-gn/ui/react` during server rendering is
|
|
108
108
|
safe. The server emits an inert `<dsgn-*>` tag that upgrades on the client.
|
|
109
109
|
Declarative Shadow DOM is not emitted, so a brief unstyled frame is possible
|
|
110
|
-
before upgrade
|
|
110
|
+
before upgrade; the pre-upgrade stylesheets below cover the layout
|
|
111
|
+
components. Reactive properties are applied client-side; pass `id`,
|
|
111
112
|
`class`, and similar values as normal attributes.
|
|
112
113
|
- **Cloudflare workerd** (including TanStack Start on Workers): full SSR is not
|
|
113
114
|
currently supported because the custom element cannot be evaluated in the
|
|
114
115
|
worker runtime. Load the wrapper client-only, such as behind a `ClientOnly`
|
|
115
116
|
boundary with a lazy import.
|
|
116
117
|
|
|
118
|
+
### Before components register
|
|
119
|
+
|
|
120
|
+
When your HTML is rendered before the component scripts run (server rendering
|
|
121
|
+
or static pages), import the optional pre-upgrade stylesheets in your page CSS:
|
|
122
|
+
|
|
123
|
+
```css
|
|
124
|
+
@import '@ds-gn/ui/layout.css';
|
|
125
|
+
@import '@ds-gn/ui/hero/fallback.css'; /* only if you use dsgn-hero */
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
They apply only until each element registers. `layout.css` holds Container,
|
|
129
|
+
Nav, FeatureTabs and Footer to their final gutters and section spacing,
|
|
130
|
+
reserves the nav bar's height, and keeps the nav's links and dropdowns hidden
|
|
131
|
+
until it lays them out. `hero/fallback.css` does the same for every Hero
|
|
132
|
+
layout. Without them, content can shift or flash as unstyled text while the
|
|
133
|
+
scripts load.
|
|
134
|
+
|
|
117
135
|
<details>
|
|
118
136
|
<summary><strong>Public Beta components and compatibility policy</strong></summary>
|
|
119
137
|
|
package/custom-elements.json
CHANGED
|
@@ -1183,20 +1183,41 @@
|
|
|
1183
1183
|
"kind": "field",
|
|
1184
1184
|
"name": "paddingX",
|
|
1185
1185
|
"type": {
|
|
1186
|
-
"text": "ContainerPaddingType"
|
|
1186
|
+
"text": "ContainerPaddingType | undefined"
|
|
1187
1187
|
},
|
|
1188
|
-
"description": "
|
|
1188
|
+
"description": "Gutter (padding-inline) step. Unset follows the inherited `--dsgn-gutter`.",
|
|
1189
1189
|
"attribute": "padding-x",
|
|
1190
1190
|
"reflects": true
|
|
1191
1191
|
},
|
|
1192
1192
|
{
|
|
1193
1193
|
"kind": "field",
|
|
1194
|
-
"name": "
|
|
1194
|
+
"name": "section",
|
|
1195
1195
|
"type": {
|
|
1196
|
-
"text": "
|
|
1196
|
+
"text": "boolean"
|
|
1197
1197
|
},
|
|
1198
|
-
"
|
|
1199
|
-
"
|
|
1198
|
+
"default": "false",
|
|
1199
|
+
"description": "Marks the container as a page section: unset vertical sides follow the\ninherited `--dsgn-section-space` instead of having no padding.",
|
|
1200
|
+
"attribute": "section",
|
|
1201
|
+
"reflects": true
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"kind": "field",
|
|
1205
|
+
"name": "paddingTop",
|
|
1206
|
+
"type": {
|
|
1207
|
+
"text": "SectionSpaceType | undefined"
|
|
1208
|
+
},
|
|
1209
|
+
"description": "Space above the content.",
|
|
1210
|
+
"attribute": "padding-top",
|
|
1211
|
+
"reflects": true
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"kind": "field",
|
|
1215
|
+
"name": "paddingBottom",
|
|
1216
|
+
"type": {
|
|
1217
|
+
"text": "SectionSpaceType | undefined"
|
|
1218
|
+
},
|
|
1219
|
+
"description": "Space below the content.",
|
|
1220
|
+
"attribute": "padding-bottom",
|
|
1200
1221
|
"reflects": true
|
|
1201
1222
|
}
|
|
1202
1223
|
],
|
|
@@ -1219,17 +1240,34 @@
|
|
|
1219
1240
|
"name": "padding-x",
|
|
1220
1241
|
"fieldName": "paddingX",
|
|
1221
1242
|
"type": {
|
|
1222
|
-
"text": "ContainerPaddingType"
|
|
1243
|
+
"text": "ContainerPaddingType | undefined"
|
|
1223
1244
|
},
|
|
1224
|
-
"description": "
|
|
1245
|
+
"description": "Gutter (padding-inline) step. Unset follows the inherited `--dsgn-gutter`."
|
|
1225
1246
|
},
|
|
1226
1247
|
{
|
|
1227
|
-
"name": "
|
|
1228
|
-
"fieldName": "
|
|
1248
|
+
"name": "section",
|
|
1249
|
+
"fieldName": "section",
|
|
1229
1250
|
"type": {
|
|
1230
|
-
"text": "
|
|
1251
|
+
"text": "boolean"
|
|
1231
1252
|
},
|
|
1232
|
-
"
|
|
1253
|
+
"default": "false",
|
|
1254
|
+
"description": "Marks the container as a page section: unset vertical sides follow the\ninherited `--dsgn-section-space` instead of having no padding."
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"name": "padding-top",
|
|
1258
|
+
"fieldName": "paddingTop",
|
|
1259
|
+
"type": {
|
|
1260
|
+
"text": "SectionSpaceType | undefined"
|
|
1261
|
+
},
|
|
1262
|
+
"description": "Space above the content."
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
"name": "padding-bottom",
|
|
1266
|
+
"fieldName": "paddingBottom",
|
|
1267
|
+
"type": {
|
|
1268
|
+
"text": "SectionSpaceType | undefined"
|
|
1269
|
+
},
|
|
1270
|
+
"description": "Space below the content."
|
|
1233
1271
|
}
|
|
1234
1272
|
]
|
|
1235
1273
|
}
|
|
@@ -1432,6 +1470,26 @@
|
|
|
1432
1470
|
}
|
|
1433
1471
|
],
|
|
1434
1472
|
"members": [
|
|
1473
|
+
{
|
|
1474
|
+
"kind": "field",
|
|
1475
|
+
"name": "paddingTop",
|
|
1476
|
+
"type": {
|
|
1477
|
+
"text": "SectionSpaceType | undefined"
|
|
1478
|
+
},
|
|
1479
|
+
"description": "Space above the section. Unset follows the inherited section space.",
|
|
1480
|
+
"attribute": "padding-top",
|
|
1481
|
+
"reflects": true
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"kind": "field",
|
|
1485
|
+
"name": "paddingBottom",
|
|
1486
|
+
"type": {
|
|
1487
|
+
"text": "SectionSpaceType | undefined"
|
|
1488
|
+
},
|
|
1489
|
+
"description": "Space below the section. Unset follows the inherited section space.",
|
|
1490
|
+
"attribute": "padding-bottom",
|
|
1491
|
+
"reflects": true
|
|
1492
|
+
},
|
|
1435
1493
|
{
|
|
1436
1494
|
"kind": "field",
|
|
1437
1495
|
"name": "_inView",
|
|
@@ -1699,6 +1757,22 @@
|
|
|
1699
1757
|
"tagName": "dsgn-feature-tabs",
|
|
1700
1758
|
"customElement": true,
|
|
1701
1759
|
"attributes": [
|
|
1760
|
+
{
|
|
1761
|
+
"name": "padding-top",
|
|
1762
|
+
"fieldName": "paddingTop",
|
|
1763
|
+
"type": {
|
|
1764
|
+
"text": "SectionSpaceType | undefined"
|
|
1765
|
+
},
|
|
1766
|
+
"description": "Space above the section. Unset follows the inherited section space."
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
"name": "padding-bottom",
|
|
1770
|
+
"fieldName": "paddingBottom",
|
|
1771
|
+
"type": {
|
|
1772
|
+
"text": "SectionSpaceType | undefined"
|
|
1773
|
+
},
|
|
1774
|
+
"description": "Space below the section. Unset follows the inherited section space."
|
|
1775
|
+
},
|
|
1702
1776
|
{
|
|
1703
1777
|
"name": "surface",
|
|
1704
1778
|
"fieldName": "surface",
|
|
@@ -1843,22 +1917,22 @@
|
|
|
1843
1917
|
},
|
|
1844
1918
|
{
|
|
1845
1919
|
"kind": "field",
|
|
1846
|
-
"name": "
|
|
1920
|
+
"name": "paddingTop",
|
|
1847
1921
|
"type": {
|
|
1848
|
-
"text": "
|
|
1922
|
+
"text": "SectionSpaceType | undefined"
|
|
1849
1923
|
},
|
|
1850
|
-
"description": "
|
|
1851
|
-
"attribute": "padding-
|
|
1924
|
+
"description": "Space above the section. Unset follows the inherited section space.",
|
|
1925
|
+
"attribute": "padding-top",
|
|
1852
1926
|
"reflects": true
|
|
1853
1927
|
},
|
|
1854
1928
|
{
|
|
1855
1929
|
"kind": "field",
|
|
1856
|
-
"name": "
|
|
1930
|
+
"name": "paddingBottom",
|
|
1857
1931
|
"type": {
|
|
1858
|
-
"text": "
|
|
1932
|
+
"text": "SectionSpaceType | undefined"
|
|
1859
1933
|
},
|
|
1860
|
-
"description": "
|
|
1861
|
-
"attribute": "padding-
|
|
1934
|
+
"description": "Space below the section. Unset follows the inherited section space.",
|
|
1935
|
+
"attribute": "padding-bottom",
|
|
1862
1936
|
"reflects": true
|
|
1863
1937
|
}
|
|
1864
1938
|
],
|
|
@@ -1886,20 +1960,20 @@
|
|
|
1886
1960
|
"description": "Container max-width size"
|
|
1887
1961
|
},
|
|
1888
1962
|
{
|
|
1889
|
-
"name": "padding-
|
|
1890
|
-
"fieldName": "
|
|
1963
|
+
"name": "padding-top",
|
|
1964
|
+
"fieldName": "paddingTop",
|
|
1891
1965
|
"type": {
|
|
1892
|
-
"text": "
|
|
1966
|
+
"text": "SectionSpaceType | undefined"
|
|
1893
1967
|
},
|
|
1894
|
-
"description": "
|
|
1968
|
+
"description": "Space above the section. Unset follows the inherited section space."
|
|
1895
1969
|
},
|
|
1896
1970
|
{
|
|
1897
|
-
"name": "padding-
|
|
1898
|
-
"fieldName": "
|
|
1971
|
+
"name": "padding-bottom",
|
|
1972
|
+
"fieldName": "paddingBottom",
|
|
1899
1973
|
"type": {
|
|
1900
|
-
"text": "
|
|
1974
|
+
"text": "SectionSpaceType | undefined"
|
|
1901
1975
|
},
|
|
1902
|
-
"description": "
|
|
1976
|
+
"description": "Space below the section. Unset follows the inherited section space."
|
|
1903
1977
|
}
|
|
1904
1978
|
]
|
|
1905
1979
|
}
|
|
@@ -2527,6 +2601,26 @@
|
|
|
2527
2601
|
"description": "Horizontal alignment of content, form, and features in the centered layout.\nHas no effect on asset-right / asset-left / asset-background layouts.",
|
|
2528
2602
|
"attribute": "content-align",
|
|
2529
2603
|
"reflects": true
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
"kind": "field",
|
|
2607
|
+
"name": "paddingTop",
|
|
2608
|
+
"type": {
|
|
2609
|
+
"text": "SectionSpaceType | undefined"
|
|
2610
|
+
},
|
|
2611
|
+
"description": "Space above the section. Unset follows the inherited section space.",
|
|
2612
|
+
"attribute": "padding-top",
|
|
2613
|
+
"reflects": true
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
"kind": "field",
|
|
2617
|
+
"name": "paddingBottom",
|
|
2618
|
+
"type": {
|
|
2619
|
+
"text": "SectionSpaceType | undefined"
|
|
2620
|
+
},
|
|
2621
|
+
"description": "Space below the section. Unset follows the inherited section space.",
|
|
2622
|
+
"attribute": "padding-bottom",
|
|
2623
|
+
"reflects": true
|
|
2530
2624
|
}
|
|
2531
2625
|
],
|
|
2532
2626
|
"superclass": {
|
|
@@ -2567,6 +2661,22 @@
|
|
|
2567
2661
|
"text": "HeroContentAlignType"
|
|
2568
2662
|
},
|
|
2569
2663
|
"description": "Horizontal alignment of content, form, and features in the centered layout.\nHas no effect on asset-right / asset-left / asset-background layouts."
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
"name": "padding-top",
|
|
2667
|
+
"fieldName": "paddingTop",
|
|
2668
|
+
"type": {
|
|
2669
|
+
"text": "SectionSpaceType | undefined"
|
|
2670
|
+
},
|
|
2671
|
+
"description": "Space above the section. Unset follows the inherited section space."
|
|
2672
|
+
},
|
|
2673
|
+
{
|
|
2674
|
+
"name": "padding-bottom",
|
|
2675
|
+
"fieldName": "paddingBottom",
|
|
2676
|
+
"type": {
|
|
2677
|
+
"text": "SectionSpaceType | undefined"
|
|
2678
|
+
},
|
|
2679
|
+
"description": "Space below the section. Unset follows the inherited section space."
|
|
2570
2680
|
}
|
|
2571
2681
|
]
|
|
2572
2682
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../../types/global.d.ts';
|
|
2
2
|
import { type CSSResultGroup } from 'lit';
|
|
3
3
|
import { Base } from '../../../common/Base/Base.js';
|
|
4
|
-
import { type ContainerPaddingType, type ContainerSizeType } from './Container.props.js';
|
|
4
|
+
import { type ContainerPaddingType, type ContainerSizeType, type SectionSpaceType } from './Container.props.js';
|
|
5
5
|
/** @slot - Constrained page content. */
|
|
6
6
|
export declare class Container extends Base {
|
|
7
7
|
static styles: CSSResultGroup;
|
|
@@ -10,13 +10,18 @@ export declare class Container extends Base {
|
|
|
10
10
|
*/
|
|
11
11
|
size: ContainerSizeType;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Gutter (padding-inline) step. Unset follows the inherited `--dsgn-gutter`.
|
|
14
14
|
*/
|
|
15
|
-
paddingX
|
|
15
|
+
paddingX?: ContainerPaddingType;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Marks the container as a page section: unset vertical sides follow the
|
|
18
|
+
* inherited `--dsgn-section-space` instead of having no padding.
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
|
+
section: boolean;
|
|
21
|
+
/** Space above the content. */
|
|
22
|
+
paddingTop?: SectionSpaceType;
|
|
23
|
+
/** Space below the content. */
|
|
24
|
+
paddingBottom?: SectionSpaceType;
|
|
20
25
|
render(): import("lit").TemplateResult<1>;
|
|
21
26
|
}
|
|
22
27
|
declare global {
|
|
@@ -103,6 +103,14 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
103
103
|
--breakpoint-lg: 64rem;
|
|
104
104
|
--breakpoint-xl: 80rem;
|
|
105
105
|
--breakpoint-2xl: 96rem;
|
|
106
|
+
--spacing-gutter-lg: var(--dsgn-src-spacing-gutter-lg, clamp(1.5rem, 0.333rem + 4.167vw, 3rem));
|
|
107
|
+
--spacing-gutter-md: var(--dsgn-src-spacing-gutter-md, clamp(1rem, 0.25rem + 3vw, 2rem));
|
|
108
|
+
--spacing-gutter-sm: var(--dsgn-src-spacing-gutter-sm, clamp(0.5rem, 0.125rem + 1.5vw, 1rem));
|
|
109
|
+
--spacing-gutter-xl: var(--dsgn-src-spacing-gutter-xl, clamp(2rem, 6.25vw, 4rem));
|
|
110
|
+
--spacing-section-lg: var(--dsgn-src-spacing-section-lg, 3rem);
|
|
111
|
+
--spacing-section-md: var(--dsgn-src-spacing-section-md, 2rem);
|
|
112
|
+
--spacing-section-sm: var(--dsgn-src-spacing-section-sm, 1rem);
|
|
113
|
+
--spacing-section-xl: var(--dsgn-src-spacing-section-xl, 4rem);
|
|
106
114
|
}
|
|
107
115
|
}
|
|
108
116
|
@layer utilities {
|
|
@@ -151,69 +159,59 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
151
159
|
.max-w-screen-xl {
|
|
152
160
|
max-width: var(--breakpoint-xl);
|
|
153
161
|
}
|
|
154
|
-
.px-
|
|
155
|
-
padding-inline: calc(var(--spacing) *
|
|
162
|
+
.px-0 {
|
|
163
|
+
padding-inline: calc(var(--spacing) * 0);
|
|
156
164
|
}
|
|
157
|
-
.px-
|
|
158
|
-
padding-inline:
|
|
165
|
+
.px-\\[var\\(--dsgn-gutter\\,var\\(--spacing-gutter-md\\)\\)\\] {
|
|
166
|
+
padding-inline: var(--dsgn-gutter,var(--spacing-gutter-md));
|
|
159
167
|
}
|
|
160
|
-
.px-
|
|
161
|
-
padding-inline:
|
|
168
|
+
.px-gutter-lg {
|
|
169
|
+
padding-inline: var(--spacing-gutter-lg);
|
|
162
170
|
}
|
|
163
|
-
.px-
|
|
164
|
-
padding-inline:
|
|
171
|
+
.px-gutter-md {
|
|
172
|
+
padding-inline: var(--spacing-gutter-md);
|
|
165
173
|
}
|
|
166
|
-
.
|
|
167
|
-
padding-
|
|
174
|
+
.px-gutter-sm {
|
|
175
|
+
padding-inline: var(--spacing-gutter-sm);
|
|
168
176
|
}
|
|
169
|
-
.
|
|
170
|
-
padding-
|
|
177
|
+
.px-gutter-xl {
|
|
178
|
+
padding-inline: var(--spacing-gutter-xl);
|
|
171
179
|
}
|
|
172
|
-
.
|
|
173
|
-
padding-
|
|
180
|
+
.pt-0 {
|
|
181
|
+
padding-top: calc(var(--spacing) * 0);
|
|
174
182
|
}
|
|
175
|
-
.
|
|
176
|
-
padding-
|
|
183
|
+
.pt-\\[var\\(--dsgn-section-space\\,var\\(--spacing-section-md\\)\\)\\] {
|
|
184
|
+
padding-top: var(--dsgn-section-space,var(--spacing-section-md));
|
|
177
185
|
}
|
|
178
|
-
.
|
|
179
|
-
|
|
180
|
-
padding-inline: calc(var(--spacing) * 3);
|
|
181
|
-
}
|
|
186
|
+
.pt-section-lg {
|
|
187
|
+
padding-top: var(--spacing-section-lg);
|
|
182
188
|
}
|
|
183
|
-
.
|
|
184
|
-
|
|
185
|
-
padding-inline: calc(var(--spacing) * 6);
|
|
186
|
-
}
|
|
189
|
+
.pt-section-md {
|
|
190
|
+
padding-top: var(--spacing-section-md);
|
|
187
191
|
}
|
|
188
|
-
.sm
|
|
189
|
-
|
|
190
|
-
padding-inline: calc(var(--spacing) * 8);
|
|
191
|
-
}
|
|
192
|
+
.pt-section-sm {
|
|
193
|
+
padding-top: var(--spacing-section-sm);
|
|
192
194
|
}
|
|
193
|
-
.
|
|
194
|
-
|
|
195
|
-
padding-inline: calc(var(--spacing) * 10);
|
|
196
|
-
}
|
|
195
|
+
.pt-section-xl {
|
|
196
|
+
padding-top: var(--spacing-section-xl);
|
|
197
197
|
}
|
|
198
|
-
.
|
|
199
|
-
|
|
200
|
-
padding-inline: calc(var(--spacing) * 4);
|
|
201
|
-
}
|
|
198
|
+
.pb-0 {
|
|
199
|
+
padding-bottom: calc(var(--spacing) * 0);
|
|
202
200
|
}
|
|
203
|
-
.
|
|
204
|
-
|
|
205
|
-
padding-inline: calc(var(--spacing) * 8);
|
|
206
|
-
}
|
|
201
|
+
.pb-\\[var\\(--dsgn-section-space\\,var\\(--spacing-section-md\\)\\)\\] {
|
|
202
|
+
padding-bottom: var(--dsgn-section-space,var(--spacing-section-md));
|
|
207
203
|
}
|
|
208
|
-
.lg
|
|
209
|
-
|
|
210
|
-
padding-inline: calc(var(--spacing) * 12);
|
|
211
|
-
}
|
|
204
|
+
.pb-section-lg {
|
|
205
|
+
padding-bottom: var(--spacing-section-lg);
|
|
212
206
|
}
|
|
213
|
-
.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
207
|
+
.pb-section-md {
|
|
208
|
+
padding-bottom: var(--spacing-section-md);
|
|
209
|
+
}
|
|
210
|
+
.pb-section-sm {
|
|
211
|
+
padding-bottom: var(--spacing-section-sm);
|
|
212
|
+
}
|
|
213
|
+
.pb-section-xl {
|
|
214
|
+
padding-bottom: var(--spacing-section-xl);
|
|
217
215
|
}
|
|
218
216
|
}
|
|
219
217
|
@property --dsgn-border-sweep-angle {
|
|
@@ -271,8 +269,11 @@ var containerPaddingValues = {
|
|
|
271
269
|
LG: "lg",
|
|
272
270
|
XL: "xl"
|
|
273
271
|
};
|
|
274
|
-
var
|
|
275
|
-
var
|
|
272
|
+
var optional = (values) => [...values, undefined, null];
|
|
273
|
+
var containerPaddingXProps = enumCreator(optional(Object.values(containerPaddingValues)), "padding-x", String, { reflect: true, attribute: "padding-x" });
|
|
274
|
+
var sectionSpaceValues = containerPaddingValues;
|
|
275
|
+
var paddingTopProps = enumCreator(optional(Object.values(sectionSpaceValues)), "padding-top", String, { reflect: true, attribute: "padding-top" });
|
|
276
|
+
var paddingBottomProps = enumCreator(optional(Object.values(sectionSpaceValues)), "padding-bottom", String, { reflect: true, attribute: "padding-bottom" });
|
|
276
277
|
|
|
277
278
|
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
278
279
|
function r(e) {
|
|
@@ -306,34 +307,45 @@ var sizeClasses = {
|
|
|
306
307
|
"2xl": ["max-w-screen-2xl"],
|
|
307
308
|
full: ["max-w-full"]
|
|
308
309
|
};
|
|
310
|
+
var inheritedGutter = "px-[var(--dsgn-gutter,var(--spacing-gutter-md))]";
|
|
309
311
|
var paddingXClasses = {
|
|
310
|
-
none:
|
|
311
|
-
sm:
|
|
312
|
-
md:
|
|
313
|
-
lg:
|
|
314
|
-
xl:
|
|
312
|
+
none: "px-0",
|
|
313
|
+
sm: "px-gutter-sm",
|
|
314
|
+
md: "px-gutter-md",
|
|
315
|
+
lg: "px-gutter-lg",
|
|
316
|
+
xl: "px-gutter-xl"
|
|
317
|
+
};
|
|
318
|
+
var inheritedTop = "pt-[var(--dsgn-section-space,var(--spacing-section-md))]";
|
|
319
|
+
var inheritedBottom = "pb-[var(--dsgn-section-space,var(--spacing-section-md))]";
|
|
320
|
+
var paddingTopClasses = {
|
|
321
|
+
none: "pt-0",
|
|
322
|
+
sm: "pt-section-sm",
|
|
323
|
+
md: "pt-section-md",
|
|
324
|
+
lg: "pt-section-lg",
|
|
325
|
+
xl: "pt-section-xl"
|
|
315
326
|
};
|
|
316
|
-
var
|
|
317
|
-
none:
|
|
318
|
-
sm:
|
|
319
|
-
md:
|
|
320
|
-
lg:
|
|
321
|
-
xl:
|
|
327
|
+
var paddingBottomClasses = {
|
|
328
|
+
none: "pb-0",
|
|
329
|
+
sm: "pb-section-sm",
|
|
330
|
+
md: "pb-section-md",
|
|
331
|
+
lg: "pb-section-lg",
|
|
332
|
+
xl: "pb-section-xl"
|
|
322
333
|
};
|
|
323
|
-
var
|
|
334
|
+
var paddingXClassNames = (padding) => padding ? paddingXClasses[padding] : inheritedGutter;
|
|
335
|
+
var sectionSpaceClassNames = (section, top, bottom) => clsx_default(top ? paddingTopClasses[top] : section && inheritedTop, bottom ? paddingBottomClasses[bottom] : section && inheritedBottom);
|
|
336
|
+
var classNames = (size, paddingX, section, paddingTop, paddingBottom) => clsx_default(baseClasses, sizeClasses[size], paddingXClassNames(paddingX), sectionSpaceClassNames(section, paddingTop, paddingBottom));
|
|
324
337
|
|
|
325
338
|
// components/Container/src/Container.ts
|
|
326
339
|
class Container extends Base {
|
|
327
340
|
constructor() {
|
|
328
341
|
super(...arguments);
|
|
329
342
|
this.size = containerSizeValues.LG;
|
|
330
|
-
this.
|
|
331
|
-
this.paddingY = containerPaddingValues.NONE;
|
|
343
|
+
this.section = false;
|
|
332
344
|
}
|
|
333
345
|
static styles = [Base.styles, Container_default];
|
|
334
346
|
render() {
|
|
335
347
|
return html2`<div
|
|
336
|
-
class="${classNames(this.size, this.paddingX, this.
|
|
348
|
+
class="${classNames(this.size, this.paddingX ?? undefined, this.section, this.paddingTop ?? undefined, this.paddingBottom ?? undefined)}"
|
|
337
349
|
>
|
|
338
350
|
<slot></slot>
|
|
339
351
|
</div>`;
|
|
@@ -346,8 +358,14 @@ __legacyDecorateClassTS([
|
|
|
346
358
|
property({ ...containerPaddingXProps })
|
|
347
359
|
], Container.prototype, "paddingX", undefined);
|
|
348
360
|
__legacyDecorateClassTS([
|
|
349
|
-
property({
|
|
350
|
-
], Container.prototype, "
|
|
361
|
+
property({ type: Boolean, reflect: true })
|
|
362
|
+
], Container.prototype, "section", undefined);
|
|
363
|
+
__legacyDecorateClassTS([
|
|
364
|
+
property({ ...paddingTopProps })
|
|
365
|
+
], Container.prototype, "paddingTop", undefined);
|
|
366
|
+
__legacyDecorateClassTS([
|
|
367
|
+
property({ ...paddingBottomProps })
|
|
368
|
+
], Container.prototype, "paddingBottom", undefined);
|
|
351
369
|
defineElement("dsgn-container", Container);
|
|
352
370
|
export {
|
|
353
371
|
Container
|
|
@@ -16,5 +16,23 @@ export declare const containerPaddingValues: {
|
|
|
16
16
|
readonly XL: "xl";
|
|
17
17
|
};
|
|
18
18
|
export type ContainerPaddingType = (typeof containerPaddingValues)[keyof typeof containerPaddingValues];
|
|
19
|
+
/**
|
|
20
|
+
* Gutter step override. Leave unset to follow the inherited `--dsgn-gutter`,
|
|
21
|
+
* which pages and brands set once for every component.
|
|
22
|
+
*/
|
|
19
23
|
export declare const containerPaddingXProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
20
|
-
|
|
24
|
+
/** Steps for the space above and below a page section. */
|
|
25
|
+
export declare const sectionSpaceValues: {
|
|
26
|
+
readonly NONE: "none";
|
|
27
|
+
readonly SM: "sm";
|
|
28
|
+
readonly MD: "md";
|
|
29
|
+
readonly LG: "lg";
|
|
30
|
+
readonly XL: "xl";
|
|
31
|
+
};
|
|
32
|
+
export type SectionSpaceType = ContainerPaddingType;
|
|
33
|
+
/**
|
|
34
|
+
* Section spacing override for one side. Leave unset to follow the inherited
|
|
35
|
+
* `--dsgn-section-space`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const paddingTopProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
38
|
+
export declare const paddingBottomProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
@@ -38,12 +38,17 @@ var containerPaddingValues = {
|
|
|
38
38
|
LG: "lg",
|
|
39
39
|
XL: "xl"
|
|
40
40
|
};
|
|
41
|
-
var
|
|
42
|
-
var
|
|
41
|
+
var optional = (values) => [...values, undefined, null];
|
|
42
|
+
var containerPaddingXProps = enumCreator(optional(Object.values(containerPaddingValues)), "padding-x", String, { reflect: true, attribute: "padding-x" });
|
|
43
|
+
var sectionSpaceValues = containerPaddingValues;
|
|
44
|
+
var paddingTopProps = enumCreator(optional(Object.values(sectionSpaceValues)), "padding-top", String, { reflect: true, attribute: "padding-top" });
|
|
45
|
+
var paddingBottomProps = enumCreator(optional(Object.values(sectionSpaceValues)), "padding-bottom", String, { reflect: true, attribute: "padding-bottom" });
|
|
43
46
|
export {
|
|
44
47
|
containerPaddingValues,
|
|
45
48
|
containerPaddingXProps,
|
|
46
|
-
containerPaddingYProps,
|
|
47
49
|
containerSizeProps,
|
|
48
|
-
containerSizeValues
|
|
50
|
+
containerSizeValues,
|
|
51
|
+
paddingBottomProps,
|
|
52
|
+
paddingTopProps,
|
|
53
|
+
sectionSpaceValues
|
|
49
54
|
};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import type { ContainerPaddingType, ContainerSizeType } from './Container.props.js';
|
|
2
|
-
|
|
1
|
+
import type { ContainerPaddingType, ContainerSizeType, SectionSpaceType } from './Container.props.js';
|
|
2
|
+
/** Shared by the component and its pre-upgrade stylesheet. */
|
|
3
|
+
export declare const paddingXClassNames: (padding?: ContainerPaddingType) => string;
|
|
4
|
+
/**
|
|
5
|
+
* Vertical padding. A section follows the inherited section space on any side
|
|
6
|
+
* left unset; a plain container has none there.
|
|
7
|
+
*/
|
|
8
|
+
export declare const sectionSpaceClassNames: (section: boolean, top?: SectionSpaceType, bottom?: SectionSpaceType) => string;
|
|
9
|
+
export declare const classNames: (size: ContainerSizeType, paddingX: ContainerPaddingType | undefined, section: boolean, paddingTop?: SectionSpaceType, paddingBottom?: SectionSpaceType) => string;
|
|
@@ -8,10 +8,15 @@ import '../../Icon/src/Icon.js';
|
|
|
8
8
|
import { Base } from '../../../common/Base/Base.js';
|
|
9
9
|
import { type SurfaceType } from '../../../common/props/surface/surface.props.js';
|
|
10
10
|
import { type CSSResultGroup } from 'lit';
|
|
11
|
+
import { type SectionSpaceType } from '../../Container/src/Container.props.js';
|
|
11
12
|
import { type FeatureTabData } from './FeatureTabs.props.js';
|
|
12
13
|
/** @slot header - Optional content above the tab interface. */
|
|
13
14
|
export declare class FeatureTabs extends Base {
|
|
14
15
|
static styles: CSSResultGroup;
|
|
16
|
+
/** Space above the section. Unset follows the inherited section space. */
|
|
17
|
+
paddingTop?: SectionSpaceType;
|
|
18
|
+
/** Space below the section. Unset follows the inherited section space. */
|
|
19
|
+
paddingBottom?: SectionSpaceType;
|
|
15
20
|
private _inView;
|
|
16
21
|
private _rotate;
|
|
17
22
|
surface: SurfaceType;
|