ds-one 0.2.5-alpha.12 → 0.2.5-alpha.14
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/DS1/0-face/device.ts +8 -0
- package/DS1/1-root/one.css +41 -17
- package/DS1/2-core/ds-banner.ts +194 -1
- package/DS1/2-core/ds-button.ts +17 -3
- package/DS1/2-core/ds-text.ts +1 -1
- package/DS1/4-page/ds-container.ts +60 -0
- package/DS1/4-page/ds-grid.ts +43 -3
- package/DS1/4-page/ds-layout.ts +152 -142
- package/DS1/index.ts +1 -0
- package/README.md +2 -2
- package/dist/0-face/device.d.ts.map +1 -1
- package/dist/0-face/device.js +6 -0
- package/dist/2-core/ds-banner.d.ts +71 -0
- package/dist/2-core/ds-banner.d.ts.map +1 -1
- package/dist/2-core/ds-banner.js +171 -1
- package/dist/2-core/ds-button.d.ts.map +1 -1
- package/dist/2-core/ds-button.js +17 -3
- package/dist/2-core/ds-text.js +1 -1
- package/dist/4-page/ds-container.d.ts +17 -0
- package/dist/4-page/ds-container.d.ts.map +1 -0
- package/dist/4-page/ds-container.js +43 -0
- package/dist/4-page/ds-grid.d.ts +5 -0
- package/dist/4-page/ds-grid.d.ts.map +1 -1
- package/dist/4-page/ds-grid.js +38 -3
- package/dist/4-page/ds-layout.d.ts +2 -2
- package/dist/4-page/ds-layout.d.ts.map +1 -1
- package/dist/4-page/ds-layout.js +151 -141
- package/dist/ds-one.bundle.js +250 -147
- package/dist/ds-one.bundle.js.map +4 -4
- package/dist/ds-one.bundle.min.js +211 -154
- package/dist/ds-one.bundle.min.js.map +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/DS1/4-page/ds-layout.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ds-layout.ts
|
|
2
|
-
// Simple grid layout component with
|
|
2
|
+
// Simple grid layout component with view mode
|
|
3
3
|
|
|
4
4
|
import { LitElement, html, css } from "lit";
|
|
5
5
|
|
|
@@ -14,12 +14,12 @@ export class Layout extends LitElement {
|
|
|
14
14
|
static properties = {
|
|
15
15
|
mode: { type: String },
|
|
16
16
|
align: { type: String },
|
|
17
|
-
|
|
17
|
+
view: { type: Boolean },
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
mode: string = "portfolio";
|
|
21
21
|
align?: string;
|
|
22
|
-
|
|
22
|
+
view?: boolean;
|
|
23
23
|
|
|
24
24
|
static styles = css`
|
|
25
25
|
:host {
|
|
@@ -28,80 +28,106 @@ export class Layout extends LitElement {
|
|
|
28
28
|
width: 100%;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
slot {
|
|
32
|
+
display: contents;
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
:host([mode="portfolio"]) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
".
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
". nav ."
|
|
43
|
-
". . ."
|
|
44
|
-
". footer ."
|
|
45
|
-
". . .";
|
|
36
|
+
--portfolio-cols: 120px 480px 40px;
|
|
37
|
+
--portfolio-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
|
|
38
|
+
--portfolio-areas: "square . ." ". title ." ". header ." ". projects ."
|
|
39
|
+
". . ." ". bio ." ". . ." ". nav ." ". . ." ". footer ." ". . .";
|
|
40
|
+
--portfolio-overlay-cols: 120px 480px;
|
|
41
|
+
--portfolio-overlay-areas: "square ." ". title" ". header" ". projects"
|
|
42
|
+
". ." ". bio" ". ." ". nav" ". ." ". footer" ". .";
|
|
43
|
+
grid-template-columns: var(--portfolio-cols);
|
|
44
|
+
grid-template-rows: var(--portfolio-rows);
|
|
45
|
+
grid-template-areas: var(--portfolio-areas);
|
|
46
46
|
min-height: 600px;
|
|
47
47
|
background-color: rgba(165, 165, 165, 0.03);
|
|
48
48
|
max-width: 640px;
|
|
49
|
-
margin: 0
|
|
49
|
+
margin: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([mode="portfolio"]) .view-overlay {
|
|
53
|
+
grid-template-columns: var(--portfolio-overlay-cols);
|
|
54
|
+
grid-template-rows: var(--portfolio-rows);
|
|
55
|
+
grid-template-areas: var(--portfolio-overlay-areas);
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
:host([mode="company"]) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
". . ."
|
|
57
|
-
". header ."
|
|
58
|
-
". . ."
|
|
59
|
-
". content ."
|
|
60
|
-
". . ."
|
|
59
|
+
--company-cols: auto 400px auto;
|
|
60
|
+
--company-rows: 80px 20px 20px 120px 20px 120px;
|
|
61
|
+
--company-areas: ". . ." ". header ." ". . ." ". content ." ". . ."
|
|
61
62
|
". footer .";
|
|
63
|
+
grid-template-columns: var(--company-cols);
|
|
64
|
+
grid-template-rows: var(--company-rows);
|
|
65
|
+
grid-template-areas: var(--company-areas);
|
|
62
66
|
gap: 0;
|
|
63
67
|
max-width: 100%;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
:host([
|
|
70
|
+
:host([mode="company"]) .view-overlay {
|
|
71
|
+
grid-template-columns: var(--company-cols);
|
|
72
|
+
grid-template-rows: var(--company-rows);
|
|
73
|
+
grid-template-areas: var(--company-areas);
|
|
74
|
+
gap: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host([align="left"]),
|
|
78
|
+
:host([mode="portfolio"][align="left"]),
|
|
79
|
+
:host([mode="company"][align="left"]),
|
|
80
|
+
:host([mode="app"][align="left"]) {
|
|
67
81
|
margin: 0;
|
|
68
82
|
justify-self: start;
|
|
69
83
|
}
|
|
70
84
|
|
|
71
|
-
:host([align="center"])
|
|
85
|
+
:host([align="center"]),
|
|
86
|
+
:host([mode="portfolio"][align="center"]),
|
|
87
|
+
:host([mode="company"][align="center"]),
|
|
88
|
+
:host([mode="app"][align="center"]) {
|
|
72
89
|
margin: 0 auto;
|
|
73
90
|
justify-self: center;
|
|
74
91
|
}
|
|
75
92
|
|
|
76
|
-
:host([align="right"])
|
|
93
|
+
:host([align="right"]),
|
|
94
|
+
:host([mode="portfolio"][align="right"]),
|
|
95
|
+
:host([mode="company"][align="right"]),
|
|
96
|
+
:host([mode="app"][align="right"]) {
|
|
77
97
|
margin: 0 0 0 auto;
|
|
78
98
|
justify-self: end;
|
|
79
99
|
}
|
|
80
100
|
|
|
81
101
|
/* App mode - Base */
|
|
82
102
|
:host([mode="app"]) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
--app-cols: 100%;
|
|
104
|
+
--app-rows: calc(var(--unit) * var(--sf)) calc(var(--unit) * var(--sf))
|
|
105
|
+
calc(var(--unit) * var(--sf)) calc(var(--dozen) * var(--sf))
|
|
106
|
+
calc(var(--quad) * var(--sf)) calc(var(--unit) * var(--sf));
|
|
107
|
+
--app-areas: "banner" "." "header" "." "main" "." "footer";
|
|
108
|
+
--app-overlay-cols: 100%;
|
|
109
|
+
--app-overlay-rows: calc(var(--unit) * var(--sf))
|
|
110
|
+
calc(var(--unit) * var(--sf)) calc(var(--unit) * var(--sf))
|
|
111
|
+
calc(var(--unit) * var(--sf)) calc(var(--dozen) * var(--sf))
|
|
112
|
+
calc(var(--quad) * var(--sf)) calc(var(--unit) * var(--sf));
|
|
113
|
+
--app-overlay-areas: "banner" "." "header" "." "main" "." "footer";
|
|
114
|
+
grid-template-columns: var(--app-cols);
|
|
115
|
+
grid-template-rows: var(--app-rows);
|
|
116
|
+
grid-template-areas: var(--app-areas);
|
|
89
117
|
min-height: 100vh;
|
|
90
118
|
background-color: transparent;
|
|
91
|
-
width:
|
|
119
|
+
width: calc(240px * var(--sf, 1));
|
|
120
|
+
max-width: calc(240px * var(--sf, 1));
|
|
92
121
|
margin: 0 auto;
|
|
93
|
-
gap: 0;
|
|
94
122
|
}
|
|
95
123
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
calc(9.751px * var(--sf, 1));
|
|
101
|
-
gap: calc(28px * var(--sf, 1));
|
|
124
|
+
:host([mode="app"]) .view-overlay {
|
|
125
|
+
grid-template-columns: var(--app-overlay-cols);
|
|
126
|
+
grid-template-rows: var(--app-overlay-rows);
|
|
127
|
+
grid-template-areas: var(--app-overlay-areas);
|
|
102
128
|
}
|
|
103
129
|
|
|
104
|
-
.
|
|
130
|
+
.view-overlay {
|
|
105
131
|
position: absolute;
|
|
106
132
|
margin-left: -1px;
|
|
107
133
|
top: 0;
|
|
@@ -111,187 +137,171 @@ export class Layout extends LitElement {
|
|
|
111
137
|
pointer-events: none;
|
|
112
138
|
z-index: 1000;
|
|
113
139
|
display: grid;
|
|
114
|
-
font-size: 18px;
|
|
115
|
-
font-weight: bold;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
:host([mode="portfolio"]) .debug-overlay {
|
|
119
|
-
grid-template-columns: 120px 480px;
|
|
120
|
-
grid-template-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
|
|
121
|
-
grid-template-areas:
|
|
122
|
-
"square ."
|
|
123
|
-
". title"
|
|
124
|
-
". header"
|
|
125
|
-
". projects"
|
|
126
|
-
". ."
|
|
127
|
-
". bio"
|
|
128
|
-
". ."
|
|
129
|
-
". nav"
|
|
130
|
-
". ."
|
|
131
|
-
". footer"
|
|
132
|
-
". .";
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
:host([mode="company"]) .debug-overlay {
|
|
136
|
-
grid-template-columns: auto 400px auto;
|
|
137
|
-
grid-template-rows: 80px 20px 20px 120px 20px 120px;
|
|
138
|
-
grid-template-areas:
|
|
139
|
-
". . ."
|
|
140
|
-
". header ."
|
|
141
|
-
". . ."
|
|
142
|
-
". content ."
|
|
143
|
-
". . ."
|
|
144
|
-
". footer .";
|
|
145
|
-
gap: 0;
|
|
146
140
|
}
|
|
147
141
|
|
|
148
|
-
.
|
|
142
|
+
.view-area {
|
|
149
143
|
display: flex;
|
|
144
|
+
width: calc(240px * var(--sf, 1));
|
|
145
|
+
height: 100%;
|
|
150
146
|
align-items: center;
|
|
151
147
|
justify-content: center;
|
|
152
|
-
font-size: 10px;
|
|
153
|
-
font-weight: var(--type-weight-default);
|
|
154
148
|
font-family: var(--typeface-regular);
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
font-size: calc(var(--type-size-default) * var(--05));
|
|
150
|
+
color: color-mix(in srgb, var(--tuned-red) 25%, transparent);
|
|
151
|
+
background-color: color-mix(
|
|
152
|
+
in srgb,
|
|
153
|
+
var(--accent-color) 25%,
|
|
154
|
+
transparent
|
|
155
|
+
);
|
|
157
156
|
opacity: 1;
|
|
158
157
|
}
|
|
159
158
|
|
|
160
|
-
.
|
|
159
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(1) {
|
|
160
|
+
background-color: color-mix(in srgb, var(--tuned-red) 25%, transparent);
|
|
161
|
+
}
|
|
162
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(2) {
|
|
163
|
+
border-color: var(--sharp-blue);
|
|
164
|
+
}
|
|
165
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(3) {
|
|
166
|
+
border-color: var(--yellow);
|
|
167
|
+
}
|
|
168
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(4) {
|
|
169
|
+
border-color: var(--apple-green);
|
|
170
|
+
}
|
|
171
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(5) {
|
|
172
|
+
border-color: var(--pink);
|
|
173
|
+
}
|
|
174
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(6) {
|
|
175
|
+
border-color: var(--orange);
|
|
176
|
+
}
|
|
177
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(7) {
|
|
178
|
+
border-color: var(--zenith-blue);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:host([mode="company"]) .view-area:nth-of-type(1) {
|
|
182
|
+
border-color: var(--tuned-red);
|
|
183
|
+
}
|
|
184
|
+
:host([mode="company"]) .view-area:nth-of-type(2) {
|
|
185
|
+
border-color: var(--sharp-blue);
|
|
186
|
+
}
|
|
187
|
+
:host([mode="company"]) .view-area:nth-of-type(3) {
|
|
188
|
+
border-color: var(--yellow);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:host([mode="app"]) .view-area:nth-of-type(1) {
|
|
192
|
+
background-color: color-mix(in srgb, var(--tuned-red) 25%, transparent);
|
|
193
|
+
}
|
|
194
|
+
:host([mode="app"]) .view-area:nth-of-type(2) {
|
|
195
|
+
background-color: color-mix(in srgb, var(--sharp-blue) 25%, transparent);
|
|
196
|
+
}
|
|
197
|
+
:host([mode="app"]) .view-area:nth-of-type(3) {
|
|
198
|
+
background-color: color-mix(in srgb, var(--yellow) 25%, transparent);
|
|
199
|
+
}
|
|
200
|
+
:host([mode="app"]) .view-area:nth-of-type(4) {
|
|
201
|
+
background-color: color-mix(in srgb, var(--apple-green) 25%, transparent);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.view-square {
|
|
161
205
|
grid-area: square;
|
|
162
206
|
}
|
|
163
207
|
|
|
164
|
-
.
|
|
208
|
+
.view-title {
|
|
165
209
|
grid-area: title;
|
|
166
210
|
}
|
|
167
211
|
|
|
168
|
-
.
|
|
212
|
+
.view-header {
|
|
169
213
|
grid-area: header;
|
|
170
|
-
border-color: #0000ff;
|
|
171
214
|
}
|
|
172
215
|
|
|
173
|
-
.
|
|
216
|
+
.view-projects {
|
|
174
217
|
grid-area: projects;
|
|
175
|
-
border-color: #ffff00;
|
|
176
218
|
}
|
|
177
219
|
|
|
178
|
-
.
|
|
220
|
+
.view-bio {
|
|
179
221
|
grid-area: bio;
|
|
180
|
-
border-color: #ff00ff;
|
|
181
222
|
}
|
|
182
223
|
|
|
183
|
-
.
|
|
224
|
+
.view-nav {
|
|
184
225
|
grid-area: nav;
|
|
185
|
-
border-color: #00ffff;
|
|
186
226
|
}
|
|
187
227
|
|
|
188
|
-
.
|
|
228
|
+
.view-footer {
|
|
189
229
|
grid-area: footer;
|
|
190
|
-
border-color: rgb(24, 147, 73);
|
|
191
|
-
background-color: rgba(127, 123, 11, 0.1);
|
|
192
230
|
}
|
|
193
231
|
|
|
194
|
-
.
|
|
232
|
+
.view-content {
|
|
195
233
|
grid-area: content;
|
|
196
|
-
border-color: rgba(71, 231, 71, 0.63);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
:host([mode="app"]) .debug-overlay {
|
|
200
|
-
grid-template-columns: 1fr;
|
|
201
|
-
grid-template-rows:
|
|
202
|
-
calc(var(--1) * var(--sf))
|
|
203
|
-
calc(var(--2) * var(--sf))
|
|
204
|
-
calc(var(--4) * var(--sf))
|
|
205
|
-
calc(var(--1) * var(--sf));
|
|
206
|
-
grid-template-areas:
|
|
207
|
-
"banner"
|
|
208
|
-
"header"
|
|
209
|
-
"main"
|
|
210
|
-
"footer";
|
|
211
234
|
}
|
|
212
235
|
|
|
213
|
-
.
|
|
236
|
+
.view-banner {
|
|
214
237
|
grid-area: banner;
|
|
215
|
-
border-color: #daed09;
|
|
216
238
|
}
|
|
217
239
|
|
|
218
|
-
.
|
|
219
|
-
grid-area: header;
|
|
220
|
-
border-color: #0000ff;
|
|
221
|
-
background-color: rgba(127, 123, 11, 0.5);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.debug-main {
|
|
240
|
+
.view-main {
|
|
225
241
|
grid-area: main;
|
|
226
|
-
border-color: #0000ff;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.debug-footer-app {
|
|
230
|
-
grid-area: footer;
|
|
231
|
-
border-color: #ffa500;
|
|
232
242
|
}
|
|
233
243
|
`;
|
|
234
244
|
|
|
235
245
|
render() {
|
|
236
|
-
const
|
|
246
|
+
const isView = this.view || this.mode === "view";
|
|
237
247
|
const isPortfolio = this.mode === "portfolio";
|
|
238
248
|
const isCompany = this.mode === "company";
|
|
239
249
|
const isApp = this.mode === "app";
|
|
240
250
|
|
|
241
251
|
return html`
|
|
242
252
|
<slot></slot>
|
|
243
|
-
${
|
|
253
|
+
${isView
|
|
244
254
|
? html`
|
|
245
|
-
<div class="
|
|
255
|
+
<div class="view-overlay">
|
|
246
256
|
${isApp
|
|
247
257
|
? html`
|
|
248
|
-
<div class="
|
|
258
|
+
<div class="view-area view-banner">
|
|
249
259
|
<ds-text key="banner">banner</ds-text>
|
|
250
260
|
</div>
|
|
251
|
-
<div class="
|
|
261
|
+
<div class="view-area view-header">
|
|
252
262
|
<ds-text key="header">header</ds-text>
|
|
253
263
|
</div>
|
|
254
264
|
|
|
255
|
-
<div class="
|
|
265
|
+
<div class="view-area view-main">
|
|
256
266
|
<ds-text key="main">main</ds-text>
|
|
257
267
|
</div>
|
|
258
|
-
<div class="
|
|
268
|
+
<div class="view-area view-footer">
|
|
259
269
|
<ds-text key="footer">footer</ds-text>
|
|
260
270
|
</div>
|
|
261
271
|
`
|
|
262
272
|
: isCompany
|
|
263
273
|
? html`
|
|
264
|
-
<div class="
|
|
274
|
+
<div class="view-area view-header">
|
|
265
275
|
<ds-text key="header">header</ds-text>
|
|
266
276
|
</div>
|
|
267
|
-
<div class="
|
|
277
|
+
<div class="view-area view-content">
|
|
268
278
|
<ds-text key="content">content</ds-text>
|
|
269
279
|
</div>
|
|
270
|
-
<div class="
|
|
280
|
+
<div class="view-area view-footer">
|
|
271
281
|
<ds-text key="footer">footer</ds-text>
|
|
272
282
|
</div>
|
|
273
283
|
`
|
|
274
284
|
: isPortfolio
|
|
275
285
|
? html`
|
|
276
|
-
<div class="
|
|
286
|
+
<div class="view-area view-square">
|
|
277
287
|
<ds-text key="square">square</ds-text>
|
|
278
288
|
</div>
|
|
279
|
-
<div class="
|
|
289
|
+
<div class="view-area view-title">
|
|
280
290
|
<ds-text key="title">title</ds-text>
|
|
281
291
|
</div>
|
|
282
|
-
<div class="
|
|
292
|
+
<div class="view-area view-header">
|
|
283
293
|
<ds-text key="header">header</ds-text>
|
|
284
294
|
</div>
|
|
285
|
-
<div class="
|
|
295
|
+
<div class="view-area view-projects">
|
|
286
296
|
<ds-text key="projects">projects</ds-text>
|
|
287
297
|
</div>
|
|
288
|
-
<div class="
|
|
298
|
+
<div class="view-area view-bio">
|
|
289
299
|
<ds-text key="bio">bio</ds-text>
|
|
290
300
|
</div>
|
|
291
|
-
<div class="
|
|
301
|
+
<div class="view-area view-nav">
|
|
292
302
|
<ds-text key="nav">nav</ds-text>
|
|
293
303
|
</div>
|
|
294
|
-
<div class="
|
|
304
|
+
<div class="view-area view-footer">
|
|
295
305
|
<ds-text key="footer">footer</ds-text>
|
|
296
306
|
</div>
|
|
297
307
|
`
|
package/DS1/index.ts
CHANGED
|
@@ -48,5 +48,6 @@ export * from "./3-unit/ds-table";
|
|
|
48
48
|
// 4-page: Layout Components
|
|
49
49
|
// ============================================================================
|
|
50
50
|
|
|
51
|
+
export * from "./4-page/ds-container";
|
|
51
52
|
export * from "./4-page/ds-grid";
|
|
52
53
|
export * from "./4-page/ds-layout";
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# DS one (0.2.5-alpha.
|
|
1
|
+
# DS one (0.2.5-alpha.14)
|
|
2
2
|
|
|
3
3
|
A plug and play design system
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ yarn add ds-one@alpha
|
|
|
20
20
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
**Note**: Currently published as alpha version `0.2.5-alpha.
|
|
23
|
+
**Note**: Currently published as alpha version `0.2.5-alpha.14`
|
|
24
24
|
|
|
25
25
|
## Quick Start
|
|
26
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../DS1/0-face/device.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CA0B5C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,CA6B1C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,UAAU,
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../DS1/0-face/device.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CA0B5C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,CA6B1C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,UAAU,CA0DhD"}
|
package/dist/0-face/device.js
CHANGED
|
@@ -65,6 +65,9 @@ export function initDeviceDetection() {
|
|
|
65
65
|
document.documentElement.style.setProperty("--sf", scalingFactor.toFixed(3));
|
|
66
66
|
// Also set --sf for backwards compatibility
|
|
67
67
|
document.documentElement.style.setProperty("--sf", scalingFactor.toFixed(3));
|
|
68
|
+
// Add .mobile class to html element for CSS targeting
|
|
69
|
+
document.documentElement.classList.add("mobile");
|
|
70
|
+
document.documentElement.classList.remove("desktop");
|
|
68
71
|
console.log(`[DS one] Mobile device detected - ${deviceInfo.deviceType} (${deviceInfo.screenWidth}x${deviceInfo.screenHeight}), scaling factor: ${scalingFactor.toFixed(2)}`);
|
|
69
72
|
}
|
|
70
73
|
else {
|
|
@@ -73,6 +76,9 @@ export function initDeviceDetection() {
|
|
|
73
76
|
document.documentElement.style.setProperty("--sf", "1");
|
|
74
77
|
// Also set --sf for backwards compatibility
|
|
75
78
|
document.documentElement.style.setProperty("--sf", "1");
|
|
79
|
+
// Add .desktop class and remove .mobile class
|
|
80
|
+
document.documentElement.classList.add("desktop");
|
|
81
|
+
document.documentElement.classList.remove("mobile");
|
|
76
82
|
}
|
|
77
83
|
console.log(`[DS one] Desktop device detected (${deviceInfo.screenWidth}x${deviceInfo.screenHeight})`);
|
|
78
84
|
}
|
|
@@ -1 +1,72 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./ds-text.js";
|
|
3
|
+
import "./ds-button.js";
|
|
4
|
+
declare global {
|
|
5
|
+
interface CustomElementRegistry {
|
|
6
|
+
define(name: string, constructor: typeof LitElement): void;
|
|
7
|
+
}
|
|
8
|
+
var customElements: CustomElementRegistry;
|
|
9
|
+
}
|
|
10
|
+
export declare class Banner extends LitElement {
|
|
11
|
+
static properties: {
|
|
12
|
+
textKey: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
attribute: string;
|
|
15
|
+
};
|
|
16
|
+
actionKey: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
attribute: string;
|
|
19
|
+
};
|
|
20
|
+
href: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
};
|
|
23
|
+
mailto: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
};
|
|
26
|
+
subjectKey: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
attribute: string;
|
|
29
|
+
};
|
|
30
|
+
describeKey: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
attribute: string;
|
|
33
|
+
};
|
|
34
|
+
appVersionKey: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
attribute: string;
|
|
37
|
+
};
|
|
38
|
+
variant: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
};
|
|
41
|
+
version: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
};
|
|
44
|
+
_showVersion: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
state: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
textKey: string;
|
|
50
|
+
actionKey: string;
|
|
51
|
+
href: string;
|
|
52
|
+
mailto: string;
|
|
53
|
+
subjectKey: string;
|
|
54
|
+
describeKey: string;
|
|
55
|
+
appVersionKey: string;
|
|
56
|
+
variant: string;
|
|
57
|
+
version: string;
|
|
58
|
+
_showVersion: boolean;
|
|
59
|
+
private _boundUpdate;
|
|
60
|
+
connectedCallback(): void;
|
|
61
|
+
disconnectedCallback(): void;
|
|
62
|
+
static styles: import("lit").CSSResult;
|
|
63
|
+
private _toggleVersion;
|
|
64
|
+
private _getMailtoHref;
|
|
65
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
66
|
+
}
|
|
67
|
+
declare global {
|
|
68
|
+
interface HTMLElementTagNameMap {
|
|
69
|
+
"ds-banner": Banner;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
1
72
|
//# sourceMappingURL=ds-banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-banner.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-banner.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ds-banner.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-banner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,UAAU,GAAG,IAAI,CAAC;KAC5D;IACD,IAAI,cAAc,EAAE,qBAAqB,CAAC;CAC3C;AAED,qBAAa,MAAO,SAAQ,UAAU;IACpC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWf;IAEF,OAAO,EAAE,MAAM,CAAM;IACrB,SAAS,EAAE,MAAM,CAAM;IACvB,IAAI,EAAE,MAAM,CAAM;IAClB,MAAM,EAAE,MAAM,CAAM;IACpB,UAAU,EAAE,MAAM,CAAM;IACxB,WAAW,EAAE,MAAM,CAAM;IACzB,aAAa,EAAE,MAAM,CAAM;IAC3B,OAAO,EAAE,MAAM,CAAa;IAC5B,OAAO,EAAE,MAAM,CAAM;IACrB,YAAY,EAAE,OAAO,CAAS;IAE9B,OAAO,CAAC,YAAY,CAA8B;IAElD,iBAAiB;IAOjB,oBAAoB;IAMpB,MAAM,CAAC,MAAM,0BA2EX;IAEF,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;IA6BtB,MAAM;CAoBP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB;CACF"}
|