ds-one 0.2.5-alpha.2 → 0.2.5-alpha.4
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 +10 -6
- package/DS1/0-face/i18n.ts +3 -1
- package/DS1/1-root/one.css +52 -67
- package/DS1/2-core/ds-banner.ts +3 -0
- package/DS1/2-core/ds-cycle.ts +14 -1
- package/DS1/2-core/ds-icon.ts +4 -4
- package/DS1/2-core/ds-text.ts +10 -4
- package/DS1/2-core/ds-tooltip.ts +3 -3
- package/DS1/3-unit/ds-list.ts +7 -0
- package/DS1/3-unit/{singlenav-v1.ts → ds-portfolio-singlenav.ts} +8 -8
- package/DS1/3-unit/ds-row.ts +4 -5
- package/DS1/4-page/ds-grid.ts +9 -59
- package/DS1/4-page/ds-layout.ts +122 -17
- package/README.md +3 -3
- package/dist/0-face/device.d.ts.map +1 -1
- package/dist/0-face/device.js +7 -3
- package/dist/0-face/i18n.d.ts.map +1 -1
- package/dist/0-face/i18n.js +1 -1
- package/dist/2-core/ds-banner.d.ts +1 -0
- package/dist/2-core/ds-banner.d.ts.map +1 -0
- package/dist/2-core/ds-banner.js +2 -0
- package/dist/2-core/ds-cycle.d.ts +1 -0
- package/dist/2-core/ds-cycle.d.ts.map +1 -1
- package/dist/2-core/ds-cycle.js +14 -1
- package/dist/2-core/ds-icon.js +4 -4
- package/dist/2-core/ds-text.d.ts.map +1 -1
- package/dist/2-core/ds-text.js +10 -4
- package/dist/2-core/ds-tooltip.js +3 -3
- package/dist/3-unit/ds-list.d.ts.map +1 -1
- package/dist/3-unit/ds-list.js +3 -0
- package/dist/3-unit/ds-portfolio-singlenav.js +3 -3
- package/dist/3-unit/ds-row.js +4 -4
- package/dist/4-page/ds-grid.d.ts +0 -7
- package/dist/4-page/ds-grid.d.ts.map +1 -1
- package/dist/4-page/ds-grid.js +9 -54
- package/dist/4-page/ds-layout.d.ts +1 -1
- package/dist/4-page/ds-layout.d.ts.map +1 -1
- package/dist/4-page/ds-layout.js +125 -16
- package/dist/ds-one.bundle.js +232 -147
- package/dist/ds-one.bundle.js.map +4 -4
- package/dist/ds-one.bundle.min.js +171 -63
- package/dist/ds-one.bundle.min.js.map +4 -4
- package/package.json +7 -6
- package/DS1/3-unit/doublenav-v1.ts +0 -105
- package/DS1/3-unit/ds-portfolio-doublenav.ts +0 -105
- package/DS1/3-unit/ds-portfolio-panel.ts +0 -25
- package/DS1/3-unit/list-v1.ts +0 -24
- package/DS1/3-unit/panel-v1.ts +0 -26
- package/DS1/3-unit/row-v1.ts +0 -52
- /package/DS1/x-icon/{row..svg → row.svg} +0 -0
package/DS1/4-page/ds-layout.ts
CHANGED
|
@@ -17,13 +17,18 @@ export class Layout extends LitElement {
|
|
|
17
17
|
debug: { type: Boolean },
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
mode
|
|
20
|
+
mode: string = "portfolio";
|
|
21
21
|
align?: string;
|
|
22
22
|
debug?: boolean;
|
|
23
23
|
|
|
24
24
|
static styles = css`
|
|
25
25
|
:host {
|
|
26
26
|
display: grid;
|
|
27
|
+
position: relative;
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([mode="portfolio"]) {
|
|
27
32
|
grid-template-columns: 120px 480px 40px;
|
|
28
33
|
grid-template-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
|
|
29
34
|
grid-template-areas:
|
|
@@ -40,8 +45,6 @@ export class Layout extends LitElement {
|
|
|
40
45
|
". . .";
|
|
41
46
|
min-height: 600px;
|
|
42
47
|
background-color: rgba(165, 165, 165, 0.03);
|
|
43
|
-
position: relative;
|
|
44
|
-
width: 100%;
|
|
45
48
|
max-width: 640px;
|
|
46
49
|
margin: 0 auto;
|
|
47
50
|
}
|
|
@@ -75,6 +78,29 @@ export class Layout extends LitElement {
|
|
|
75
78
|
justify-self: end;
|
|
76
79
|
}
|
|
77
80
|
|
|
81
|
+
/* App mode - Base */
|
|
82
|
+
:host([mode="app"]) {
|
|
83
|
+
grid-template-columns: 1fr;
|
|
84
|
+
grid-template-rows: calc(var(--1) * var(--sf)) 20px 1fr auto;
|
|
85
|
+
grid-template-areas:
|
|
86
|
+
"banner"
|
|
87
|
+
"main"
|
|
88
|
+
"footer";
|
|
89
|
+
min-height: 100vh;
|
|
90
|
+
background-color: transparent;
|
|
91
|
+
width: 100%;
|
|
92
|
+
margin: 0 auto;
|
|
93
|
+
gap: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* App mode - with scaling factor */
|
|
97
|
+
:host([mode="app"]) {
|
|
98
|
+
max-width: calc(400px * var(--sf, 1));
|
|
99
|
+
padding: calc(60px * var(--sf, 1)) calc(28px * var(--sf, 1))
|
|
100
|
+
calc(9.751px * var(--sf, 1));
|
|
101
|
+
gap: calc(28px * var(--sf, 1));
|
|
102
|
+
}
|
|
103
|
+
|
|
78
104
|
.debug-overlay {
|
|
79
105
|
position: absolute;
|
|
80
106
|
margin-left: -1px;
|
|
@@ -87,6 +113,9 @@ export class Layout extends LitElement {
|
|
|
87
113
|
display: grid;
|
|
88
114
|
font-size: 18px;
|
|
89
115
|
font-weight: bold;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:host([mode="portfolio"]) .debug-overlay {
|
|
90
119
|
grid-template-columns: 120px 480px;
|
|
91
120
|
grid-template-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
|
|
92
121
|
grid-template-areas:
|
|
@@ -158,39 +187,115 @@ export class Layout extends LitElement {
|
|
|
158
187
|
|
|
159
188
|
.debug-footer {
|
|
160
189
|
grid-area: footer;
|
|
161
|
-
border-color:
|
|
190
|
+
border-color: rgb(24, 147, 73);
|
|
191
|
+
background-color: rgba(127, 123, 11, 0.1);
|
|
162
192
|
}
|
|
163
193
|
|
|
164
194
|
.debug-content {
|
|
165
195
|
grid-area: content;
|
|
166
196
|
border-color: rgba(71, 231, 71, 0.63);
|
|
167
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
|
+
}
|
|
212
|
+
|
|
213
|
+
.debug-banner {
|
|
214
|
+
grid-area: banner;
|
|
215
|
+
border-color: #daed09;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.debug-header {
|
|
219
|
+
grid-area: header;
|
|
220
|
+
border-color: #0000ff;
|
|
221
|
+
background-color: rgba(127, 123, 11, 0.5);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.debug-main {
|
|
225
|
+
grid-area: main;
|
|
226
|
+
border-color: #0000ff;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.debug-footer-app {
|
|
230
|
+
grid-area: footer;
|
|
231
|
+
border-color: #ffa500;
|
|
232
|
+
}
|
|
168
233
|
`;
|
|
169
234
|
|
|
170
235
|
render() {
|
|
171
236
|
const isDebug = this.debug || this.mode === "debug";
|
|
237
|
+
const isPortfolio = this.mode === "portfolio";
|
|
172
238
|
const isCompany = this.mode === "company";
|
|
239
|
+
const isApp = this.mode === "app";
|
|
173
240
|
|
|
174
241
|
return html`
|
|
175
242
|
<slot></slot>
|
|
176
243
|
${isDebug
|
|
177
244
|
? html`
|
|
178
245
|
<div class="debug-overlay">
|
|
179
|
-
${
|
|
246
|
+
${isApp
|
|
180
247
|
? html`
|
|
181
|
-
<div class="debug-area debug-
|
|
182
|
-
|
|
183
|
-
|
|
248
|
+
<div class="debug-area debug-banner">
|
|
249
|
+
<ds-text key="banner">banner</ds-text>
|
|
250
|
+
</div>
|
|
251
|
+
<div class="debug-area debug-header">
|
|
252
|
+
<ds-text key="header">header</ds-text>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
<div class="debug-area debug-main">
|
|
256
|
+
<ds-text key="main">main</ds-text>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="debug-area debug-footer-app">
|
|
259
|
+
<ds-text key="footer">footer</ds-text>
|
|
260
|
+
</div>
|
|
184
261
|
`
|
|
185
|
-
:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
262
|
+
: isCompany
|
|
263
|
+
? html`
|
|
264
|
+
<div class="debug-area debug-header">
|
|
265
|
+
<ds-text key="header">header</ds-text>
|
|
266
|
+
</div>
|
|
267
|
+
<div class="debug-area debug-content">
|
|
268
|
+
<ds-text key="content">content</ds-text>
|
|
269
|
+
</div>
|
|
270
|
+
<div class="debug-area debug-footer">
|
|
271
|
+
<ds-text key="footer">footer</ds-text>
|
|
272
|
+
</div>
|
|
273
|
+
`
|
|
274
|
+
: isPortfolio
|
|
275
|
+
? html`
|
|
276
|
+
<div class="debug-area debug-square">
|
|
277
|
+
<ds-text key="square">square</ds-text>
|
|
278
|
+
</div>
|
|
279
|
+
<div class="debug-area debug-title">
|
|
280
|
+
<ds-text key="title">title</ds-text>
|
|
281
|
+
</div>
|
|
282
|
+
<div class="debug-area debug-header">
|
|
283
|
+
<ds-text key="header">header</ds-text>
|
|
284
|
+
</div>
|
|
285
|
+
<div class="debug-area debug-projects">
|
|
286
|
+
<ds-text key="projects">projects</ds-text>
|
|
287
|
+
</div>
|
|
288
|
+
<div class="debug-area debug-bio">
|
|
289
|
+
<ds-text key="bio">bio</ds-text>
|
|
290
|
+
</div>
|
|
291
|
+
<div class="debug-area debug-nav">
|
|
292
|
+
<ds-text key="nav">nav</ds-text>
|
|
293
|
+
</div>
|
|
294
|
+
<div class="debug-area debug-footer">
|
|
295
|
+
<ds-text key="footer">footer</ds-text>
|
|
296
|
+
</div>
|
|
297
|
+
`
|
|
298
|
+
: ""}
|
|
194
299
|
</div>
|
|
195
300
|
`
|
|
196
301
|
: ""}
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ npm install ds-one@alpha
|
|
|
26
26
|
yarn add ds-one@alpha
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
**Note**: Currently published as alpha version `0.2.
|
|
29
|
+
**Note**: Currently published as alpha version `0.2.5-alpha.3`. Use `@alpha` tag to install.
|
|
30
30
|
|
|
31
31
|
### Basic Usage (CDN)
|
|
32
32
|
|
|
@@ -86,7 +86,7 @@ Try DS one in your browser: **[dsone.dev](https://dsone.dev)** (documentation sl
|
|
|
86
86
|
- **[Internationalization](./docs/i18n.md)** - Language keys and Notion CMS setup
|
|
87
87
|
- **[Examples](./docs/examples.md)** - Usage examples and patterns
|
|
88
88
|
|
|
89
|
-
## Current Status: v0.2.
|
|
89
|
+
## Current Status: v0.2.5-alpha.3
|
|
90
90
|
|
|
91
91
|
**⚠️ Alpha Release**: This is an early alpha version. The API may change as we refine the components and architecture.
|
|
92
92
|
|
|
@@ -183,7 +183,7 @@ bun run build
|
|
|
183
183
|
|
|
184
184
|
```bash
|
|
185
185
|
# Create a new alpha release (recommended for now)
|
|
186
|
-
bun run release:pre:alpha # Bumps alpha version (e.g., 0.2.
|
|
186
|
+
bun run release:pre:alpha # Bumps alpha version (e.g., 0.2.5-alpha.3 → 0.2.5-alpha.3)
|
|
187
187
|
|
|
188
188
|
# Other release commands (for future use)
|
|
189
189
|
bun run release:patch # For patch releases
|
|
@@ -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,CAkDhD"}
|
package/dist/0-face/device.js
CHANGED
|
@@ -61,14 +61,18 @@ export function initDeviceDetection() {
|
|
|
61
61
|
const designWidth = 280;
|
|
62
62
|
const actualWidth = deviceInfo.screenWidth;
|
|
63
63
|
const scalingFactor = actualWidth / designWidth;
|
|
64
|
-
// Set CSS custom property for scaling
|
|
65
|
-
document.documentElement.style.setProperty("--
|
|
64
|
+
// Set CSS custom property for scaling on html element
|
|
65
|
+
document.documentElement.style.setProperty("--sf", scalingFactor.toFixed(3));
|
|
66
|
+
// Also set --sf for backwards compatibility
|
|
67
|
+
document.documentElement.style.setProperty("--sf", scalingFactor.toFixed(3));
|
|
66
68
|
console.log(`[DS one] Mobile device detected - ${deviceInfo.deviceType} (${deviceInfo.screenWidth}x${deviceInfo.screenHeight}), scaling factor: ${scalingFactor.toFixed(2)}`);
|
|
67
69
|
}
|
|
68
70
|
else {
|
|
69
71
|
// Desktop - no scaling
|
|
70
72
|
if (typeof document !== "undefined") {
|
|
71
|
-
document.documentElement.style.setProperty("--
|
|
73
|
+
document.documentElement.style.setProperty("--sf", "1");
|
|
74
|
+
// Also set --sf for backwards compatibility
|
|
75
|
+
document.documentElement.style.setProperty("--sf", "1");
|
|
72
76
|
}
|
|
73
77
|
console.log(`[DS one] Desktop device detected (${deviceInfo.screenWidth}x${deviceInfo.screenHeight})`);
|
|
74
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../DS1/0-face/i18n.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAGlC,KAAK,eAAe,GAAG;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAyDF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QACtD,wBAAwB,CAAC,EAAE,MAAM,CAAC;KACnC;CACF;AAkSD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,YAAY,EAClB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAChC,MAAM,CA6CR;AAwDD,wBAAgB,kBAAkB,IAAI,YAAY,CAwBjD;AAWD,eAAO,MAAM,eAAe;;gBAGL,YAAY;CAWlC,CAAC;AAyDF,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":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,CAON;AAGD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAgBxD"}
|
package/dist/0-face/i18n.js
CHANGED
|
@@ -426,7 +426,7 @@ export function translate(key) {
|
|
|
426
426
|
if (lang !== defaultLanguage && translationData?.[defaultLanguage]?.[key]) {
|
|
427
427
|
return translationData[defaultLanguage][key];
|
|
428
428
|
}
|
|
429
|
-
console.warn(`[
|
|
429
|
+
console.warn(`[DS one (Internationalization)] No translation found for key "${key}"`);
|
|
430
430
|
return key;
|
|
431
431
|
}
|
|
432
432
|
export function hasTranslation(key, language = currentLanguage.value) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=ds-banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-banner.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-banner.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-cycle.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-cycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAY5C,OAAO,aAAa,CAAC;AACrB,OAAO,WAAW,CAAC;AAqCnB,qBAAa,KAAM,SAAQ,UAAU;IAEnC,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;MAUpB;IAED,MAAM,CAAC,MAAM,0BAWX;IAIM,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAGxB,OAAO,CAAC,aAAa,CAOnB;;IAyBF,iBAAiB;IA6BX,gBAAgB;IAgFtB,sBAAsB;IAatB,wBAAwB,CAAC,IAAI,EA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5C,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAyBtC,iBAAiB,CAAC,KAAK,EAAE,MAAM;IAe/B,QAAQ,IAAI,MAAM;IAgElB,MAAM;YAmDQ,mBAAmB;IAwBjC,OAAO,CAAC,wBAAwB;IAYhC,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,wBAAwB;IAIhC,OAAO,CAAC,yBAAyB;CAGlC;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,KAAK,CAAC;KACnB;CACF"}
|
package/dist/2-core/ds-cycle.js
CHANGED
|
@@ -4,6 +4,7 @@ import { currentTheme, setTheme } from "../0-face/theme";
|
|
|
4
4
|
import { savePreferences } from "../0-face/preferences";
|
|
5
5
|
import "./ds-button";
|
|
6
6
|
import "./ds-icon";
|
|
7
|
+
import "./ds-text";
|
|
7
8
|
// Accent color utilities
|
|
8
9
|
const saveAccentColor = (color) => {
|
|
9
10
|
localStorage.setItem("accentColor", color);
|
|
@@ -495,7 +496,19 @@ export class Cycle extends LitElement {
|
|
|
495
496
|
return html `
|
|
496
497
|
<div class="cycle-container">
|
|
497
498
|
${this.type !== "icon-only"
|
|
498
|
-
? html
|
|
499
|
+
? html `${this.type === "language"
|
|
500
|
+
? html `<ds-text
|
|
501
|
+
key="language"
|
|
502
|
+
default-value="Language"
|
|
503
|
+
class="cycle-label"
|
|
504
|
+
></ds-text>`
|
|
505
|
+
: this.type === "theme"
|
|
506
|
+
? html `<ds-text
|
|
507
|
+
key="theme"
|
|
508
|
+
default-value="Theme"
|
|
509
|
+
class="cycle-label"
|
|
510
|
+
></ds-text>`
|
|
511
|
+
: html `<span class="cycle-label">${this.label}</span>`}`
|
|
499
512
|
: ""}
|
|
500
513
|
<div
|
|
501
514
|
style="display: flex; align-items: center; ${this.type === "icon-only"
|
package/dist/2-core/ds-icon.js
CHANGED
|
@@ -240,8 +240,8 @@ Icon.styles = css `
|
|
|
240
240
|
display: inline-flex;
|
|
241
241
|
justify-content: center;
|
|
242
242
|
align-items: center;
|
|
243
|
-
width: calc(16px * var(--
|
|
244
|
-
height: calc(16px * var(--
|
|
243
|
+
width: calc(16px * var(--sf));
|
|
244
|
+
height: calc(16px * var(--sf));
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
svg {
|
|
@@ -258,8 +258,8 @@ Icon.styles = css `
|
|
|
258
258
|
display: flex;
|
|
259
259
|
justify-content: center;
|
|
260
260
|
align-items: center;
|
|
261
|
-
width: calc(16px * var(--
|
|
262
|
-
height: calc(16px * var(--
|
|
261
|
+
width: calc(16px * var(--sf));
|
|
262
|
+
height: calc(16px * var(--sf));
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
/* Notes style color variable for future implementation */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-text.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;GAOG;AACH,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;;MAOpB;IAEO,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,aAAa,CAAqC;;IAkB1D,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ds-text.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;GAOG;AACH,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;;MAOpB;IAEO,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,aAAa,CAAqC;;IAkB1D,MAAM,CAAC,MAAM,0BAcX;IAEF,iBAAiB;IAoBjB,oBAAoB;IAYpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAQ/C,SAAS;IAgBT,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
|
package/dist/2-core/ds-text.js
CHANGED
|
@@ -74,10 +74,16 @@ export class Text extends LitElement {
|
|
|
74
74
|
Text.styles = css `
|
|
75
75
|
:host {
|
|
76
76
|
display: inline;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
font-family: var(--typeface);
|
|
78
|
+
font-size: calc(var(--type-size-default) * var(--scaling-factor));
|
|
79
|
+
font-weight: var(--type-weight-default);
|
|
80
|
+
line-height: calc(var(--type-lineheight-default) * var(--scaling-factor));
|
|
81
|
+
letter-spacing: calc(
|
|
82
|
+
var(--type-letterspacing-default) * var(--scaling-factor)
|
|
83
|
+
);
|
|
84
|
+
text-align: var(--text-align-default);
|
|
85
|
+
text-transform: var(--text-transform-default);
|
|
86
|
+
text-decoration: var(--text-decoration-default);
|
|
81
87
|
}
|
|
82
88
|
`;
|
|
83
89
|
customElements.define("ds-text", Text);
|
|
@@ -114,10 +114,10 @@ Tooltip.styles = css `
|
|
|
114
114
|
position: absolute;
|
|
115
115
|
left: 50%;
|
|
116
116
|
bottom: 100%;
|
|
117
|
-
transform: translate(-50%, calc(-2px * var(--
|
|
117
|
+
transform: translate(-50%, calc(-2px * var(--sf)));
|
|
118
118
|
z-index: 1000;
|
|
119
119
|
pointer-events: none;
|
|
120
|
-
height: calc(var(--08) * var(--
|
|
120
|
+
height: calc(var(--08) * var(--sf));
|
|
121
121
|
opacity: 0;
|
|
122
122
|
transition:
|
|
123
123
|
opacity 120ms ease,
|
|
@@ -126,7 +126,7 @@ Tooltip.styles = css `
|
|
|
126
126
|
color: light-dark(var(--white), var(--black));
|
|
127
127
|
border-radius: 0;
|
|
128
128
|
font-size: var(--type-size-default);
|
|
129
|
-
padding: 0px calc(1px * var(--
|
|
129
|
+
padding: 0px calc(1px * var(--sf));
|
|
130
130
|
font-family: var(
|
|
131
131
|
--typeface,
|
|
132
132
|
-apple-system,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-list.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ds-list.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-list.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,CAAC,MAAM,0BAOX;IAEF,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
|
package/dist/3-unit/ds-list.js
CHANGED
|
@@ -46,15 +46,15 @@ PortfolioSingleNav.styles = css `
|
|
|
46
46
|
:host {
|
|
47
47
|
display: flex;
|
|
48
48
|
justify-content: end;
|
|
49
|
-
gap: calc(5px * var(--
|
|
50
|
-
padding: calc(2px * var(--
|
|
49
|
+
gap: calc(5px * var(--sf));
|
|
50
|
+
padding: calc(2px * var(--sf));
|
|
51
51
|
align-items: center;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
a {
|
|
55
55
|
display: inline-flex;
|
|
56
56
|
align-items: center;
|
|
57
|
-
gap: calc(5px * var(--
|
|
57
|
+
gap: calc(5px * var(--sf));
|
|
58
58
|
text-decoration: none;
|
|
59
59
|
color: inherit;
|
|
60
60
|
}
|
package/dist/3-unit/ds-row.js
CHANGED
|
@@ -15,18 +15,18 @@ Row.styles = css `
|
|
|
15
15
|
:host {
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: end;
|
|
18
|
-
width: calc(240px * var(--
|
|
18
|
+
width: calc(240px * var(--sf));
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
:host([type="fill"]) {
|
|
22
22
|
justify-content: space-between;
|
|
23
|
-
height: calc(var(--1) * var(--
|
|
23
|
+
height: calc(var(--1) * var(--sf));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
:host([type="centered"]) {
|
|
27
27
|
justify-content: center;
|
|
28
|
-
height: calc(var(--1) * var(--
|
|
29
|
-
gap: calc(var(--025) * var(--
|
|
28
|
+
height: calc(var(--1) * var(--sf));
|
|
29
|
+
gap: calc(var(--025) * var(--sf));
|
|
30
30
|
}
|
|
31
31
|
`;
|
|
32
32
|
customElements.define("ds-row", Row);
|
package/dist/4-page/ds-grid.d.ts
CHANGED
|
@@ -10,16 +10,9 @@ export declare class Grid extends LitElement {
|
|
|
10
10
|
align: {
|
|
11
11
|
type: StringConstructor;
|
|
12
12
|
};
|
|
13
|
-
_isMobile: {
|
|
14
|
-
type: BooleanConstructor;
|
|
15
|
-
state: boolean;
|
|
16
|
-
};
|
|
17
13
|
};
|
|
18
14
|
align?: string;
|
|
19
|
-
_isMobile: boolean;
|
|
20
|
-
connectedCallback(): void;
|
|
21
15
|
static styles: import("lit").CSSResult;
|
|
22
|
-
updated(): void;
|
|
23
16
|
render(): import("lit-html").TemplateResult<1>;
|
|
24
17
|
}
|
|
25
18
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-grid.d.ts","sourceRoot":"","sources":["../../DS1/4-page/ds-grid.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"ds-grid.d.ts","sourceRoot":"","sources":["../../DS1/4-page/ds-grid.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,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,IAAK,SAAQ,UAAU;IAClC,MAAM,CAAC,UAAU;;;;MAEf;IAEF,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,MAAM,0BAsDX;IAEF,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
|
package/dist/4-page/ds-grid.js
CHANGED
|
@@ -1,53 +1,13 @@
|
|
|
1
1
|
// ds-grid.ts
|
|
2
2
|
// Simple grid layout component
|
|
3
3
|
import { LitElement, html, css } from "lit";
|
|
4
|
-
import { detectMobileDevice } from "../0-face/device";
|
|
5
4
|
export class Grid extends LitElement {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this._isMobile = false;
|
|
9
|
-
}
|
|
10
|
-
connectedCallback() {
|
|
11
|
-
super.connectedCallback();
|
|
12
|
-
this._isMobile = detectMobileDevice();
|
|
13
|
-
console.log(`[ds-grid] Mobile device: ${this._isMobile}`);
|
|
14
|
-
// Apply mobile class immediately
|
|
15
|
-
if (this._isMobile) {
|
|
16
|
-
this.classList.add("mobile");
|
|
17
|
-
console.log(`[ds-grid] Mobile class added`);
|
|
18
|
-
}
|
|
19
|
-
// Calculate mobile grid dimensions to fit screen
|
|
20
|
-
if (this._isMobile && typeof window !== "undefined") {
|
|
21
|
-
const screenWidth = window.innerWidth;
|
|
22
|
-
const columns = 14;
|
|
23
|
-
const gap = 0.5;
|
|
24
|
-
// Calculate column size accounting for gaps between columns
|
|
25
|
-
// Total width = (columns * columnSize) + ((columns - 1) * gap)
|
|
26
|
-
// Therefore: columnSize = (screenWidth - ((columns - 1) * gap)) / columns
|
|
27
|
-
const totalGapWidth = (columns - 1) * gap;
|
|
28
|
-
const columnSize = (screenWidth - totalGapWidth) / columns;
|
|
29
|
-
console.log(`[ds-grid] Mobile grid: ${columns} columns × ${columnSize.toFixed(2)}px + ${totalGapWidth}px gaps = ${screenWidth}px`);
|
|
30
|
-
// Set custom property for this grid instance
|
|
31
|
-
this.style.setProperty("--mobile-column-size", `${columnSize}px`);
|
|
32
|
-
this.style.setProperty("--mobile-gap", `${gap}px`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
updated() {
|
|
36
|
-
// Apply mobile class if detected as mobile device
|
|
37
|
-
if (this._isMobile) {
|
|
38
|
-
this.classList.add("mobile");
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
this.classList.remove("mobile");
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
5
|
render() {
|
|
45
6
|
return html ``;
|
|
46
7
|
}
|
|
47
8
|
}
|
|
48
9
|
Grid.properties = {
|
|
49
10
|
align: { type: String },
|
|
50
|
-
_isMobile: { type: Boolean, state: true },
|
|
51
11
|
};
|
|
52
12
|
Grid.styles = css `
|
|
53
13
|
:host {
|
|
@@ -55,17 +15,13 @@ Grid.styles = css `
|
|
|
55
15
|
margin-left: 0.5px !important;
|
|
56
16
|
display: grid;
|
|
57
17
|
width: 1440px;
|
|
58
|
-
height:
|
|
18
|
+
height: 360px;
|
|
59
19
|
grid-template-columns: repeat(auto-fill, 19px);
|
|
60
20
|
grid-template-rows: repeat(auto-fill, 19px);
|
|
61
21
|
gap: 1px;
|
|
62
|
-
row-rule: calc(1px * var(--
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
light-dark(rgb(147, 147, 147), rgb(147, 147, 147));
|
|
66
|
-
outline:
|
|
67
|
-
1px solid light-dark(rgb(147, 147, 147)),
|
|
68
|
-
rgb(147, 147, 147);
|
|
22
|
+
row-rule: calc(1px * var(--sf)) solid var(--grid-color);
|
|
23
|
+
column-rule: calc(1px * var(--sf)) solid var(--grid-color);
|
|
24
|
+
outline: 1px solid black;
|
|
69
25
|
position: fixed;
|
|
70
26
|
top: 0;
|
|
71
27
|
left: 50%;
|
|
@@ -76,21 +32,20 @@ Grid.styles = css `
|
|
|
76
32
|
|
|
77
33
|
/* DO NOT CHANGE THIS GRID CODE FOR MOBILE. ITS PERFECT FOR MOBILE. */
|
|
78
34
|
:host(.mobile) {
|
|
79
|
-
|
|
80
|
-
width: calc(100% - calc(1px * var(--scaling-factor)));
|
|
35
|
+
width: calc(100% - calc(1px * var(--sf)));
|
|
81
36
|
max-width: 100vw;
|
|
82
37
|
margin-left: 0 !important;
|
|
83
38
|
margin-top: 0 !important;
|
|
84
39
|
box-sizing: border-box;
|
|
85
40
|
position: fixed;
|
|
86
|
-
top: calc(0.5px * var(--
|
|
41
|
+
top: calc(0.5px * var(--sf));
|
|
87
42
|
left: 50%;
|
|
88
43
|
transform: translateX(-50%);
|
|
89
44
|
pointer-events: none;
|
|
90
45
|
z-index: 300;
|
|
91
|
-
gap: calc(1px * var(--
|
|
92
|
-
grid-template-columns: repeat(14, calc(19px * var(--
|
|
93
|
-
grid-template-rows: repeat(auto-fill, calc(19px * var(--
|
|
46
|
+
gap: calc(1px * var(--sf));
|
|
47
|
+
grid-template-columns: repeat(14, calc(19px * var(--sf)));
|
|
48
|
+
grid-template-rows: repeat(auto-fill, calc(19px * var(--sf)));
|
|
94
49
|
}
|
|
95
50
|
|
|
96
51
|
:host([align="left"]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-layout.d.ts","sourceRoot":"","sources":["../../DS1/4-page/ds-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,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;;;;;;;;;;MAIf;IAEF,IAAI,
|
|
1
|
+
{"version":3,"file":"ds-layout.d.ts","sourceRoot":"","sources":["../../DS1/4-page/ds-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,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;;;;;;;;;;MAIf;IAEF,IAAI,EAAE,MAAM,CAAe;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,MAAM,CAAC,MAAM,0BAiNX;IAEF,MAAM;CAqEP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB;CACF"}
|