ds-one 0.2.5-alpha.17 → 0.2.5-alpha.19
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 +130 -0
- package/DS1/0-face/scaling.ts +152 -0
- package/DS1/1-root/one.css +48 -18
- package/DS1/2-core/ds-banner.ts +3 -77
- package/DS1/2-core/ds-button.ts +3 -67
- package/DS1/2-core/ds-card.ts +137 -0
- package/DS1/2-core/ds-cycle.ts +3 -22
- package/DS1/2-core/ds-date.ts +3 -9
- package/DS1/2-core/ds-gap.ts +3 -75
- package/DS1/2-core/ds-icon.ts +3 -33
- package/DS1/2-core/ds-input.ts +306 -1
- package/DS1/2-core/ds-pagedots.ts +52 -0
- package/DS1/2-core/ds-text.ts +3 -29
- package/DS1/2-core/ds-tooltip.ts +3 -49
- package/DS1/2-core/styles/ds-banner.css +77 -0
- package/DS1/2-core/styles/ds-button.css +67 -0
- package/DS1/2-core/styles/ds-cycle.css +21 -0
- package/DS1/2-core/styles/ds-date.css +9 -0
- package/DS1/2-core/styles/ds-gap.css +93 -0
- package/DS1/2-core/styles/ds-icon.css +30 -0
- package/DS1/2-core/styles/ds-input.css +46 -0
- package/DS1/2-core/styles/ds-pagedots.css +27 -0
- package/DS1/2-core/styles/ds-text.css +29 -0
- package/DS1/2-core/styles/ds-tooltip.css +49 -0
- package/DS1/3-unit/ds-accordion.ts +3 -46
- package/DS1/3-unit/ds-form.ts +304 -0
- package/DS1/3-unit/ds-list.ts +5 -14
- package/DS1/3-unit/ds-row.ts +3 -19
- package/DS1/3-unit/ds-table.ts +3 -85
- package/DS1/3-unit/styles/ds-accordion.css +46 -0
- package/DS1/3-unit/styles/ds-list.css +9 -0
- package/DS1/3-unit/styles/ds-row.css +19 -0
- package/DS1/3-unit/styles/ds-table.css +80 -0
- package/DS1/4-page/ds-container.ts +3 -35
- package/DS1/4-page/ds-grid.ts +3 -56
- package/DS1/4-page/ds-layout.ts +528 -50
- package/DS1/4-page/styles/ds-container.css +35 -0
- package/DS1/4-page/styles/ds-grid.css +56 -0
- package/DS1/4-page/styles/ds-layout.css +251 -0
- package/DS1/index.ts +7 -2
- package/DS1/vite-env.d.ts +9 -0
- package/DS1/x-icon/2x.svg +4 -0
- package/DS1/x-icon/2xdots.svg +18 -0
- package/DS1/x-icon/2xgrid.svg +6 -0
- package/DS1/x-icon/2xlines.svg +6 -0
- package/DS1/x-icon/4x4.svg +18 -0
- package/DS1/x-icon/apple.svg +4 -0
- package/DS1/x-icon/avatar.svg +4 -0
- package/DS1/x-icon/big.svg +4 -0
- package/DS1/x-icon/blank.svg +3 -0
- package/DS1/x-icon/check.svg +3 -0
- package/DS1/x-icon/close.svg +3 -0
- package/DS1/x-icon/collapse.svg +3 -0
- package/DS1/x-icon/color.svg +4 -0
- package/DS1/x-icon/column.svg +5 -0
- package/DS1/x-icon/default.svg +3 -0
- package/DS1/x-icon/delete.svg +5 -0
- package/DS1/x-icon/dictate.svg +6 -0
- package/DS1/x-icon/do.svg +3 -0
- package/DS1/x-icon/down.svg +3 -0
- package/DS1/x-icon/duplicate.svg +4 -0
- package/DS1/x-icon/gallery.svg +5 -0
- package/DS1/x-icon/google.svg +6 -0
- package/DS1/x-icon/head.svg +5 -0
- package/DS1/x-icon/home.svg +3 -0
- package/DS1/x-icon/icon.svg +4 -0
- package/DS1/x-icon/in.svg +4 -0
- package/DS1/x-icon/lock.svg +5 -0
- package/DS1/x-icon/loop.svg +5 -0
- package/DS1/x-icon/mic.svg +5 -0
- package/DS1/x-icon/minimize.svg +3 -0
- package/DS1/x-icon/more.svg +5 -0
- package/DS1/x-icon/neutral.svg +6 -0
- package/DS1/x-icon/note.svg +6 -0
- package/DS1/x-icon/page.svg +4 -0
- package/DS1/x-icon/plus.svg +3 -0
- package/DS1/x-icon/rewind.svg +4 -0
- package/DS1/x-icon/row.svg +5 -0
- package/DS1/x-icon/sdown.svg +3 -0
- package/DS1/x-icon/search.svg +4 -0
- package/DS1/x-icon/see.svg +4 -0
- package/DS1/x-icon/ship.svg +5 -0
- package/DS1/x-icon/star.svg +3 -0
- package/DS1/x-icon/status.svg +4 -0
- package/DS1/x-icon/sup.svg +3 -0
- package/DS1/x-icon/title.svg +3 -0
- package/DS1/x-icon/undo.svg +3 -0
- package/DS1/x-icon/ungroup.svg +4 -0
- package/DS1/x-icon/unhead.svg +3 -0
- package/DS1/x-icon/unicon.svg +3 -0
- package/DS1/x-icon/unlock.svg +5 -0
- package/DS1/x-icon/unmic.svg +6 -0
- package/DS1/x-icon/unsee.svg +5 -0
- package/DS1/x-icon/unstar.svg +3 -0
- package/DS1/x-icon/untitle.svg +3 -0
- package/DS1/x-icon/up.svg +3 -0
- package/README.md +2 -2
- package/dist/0-face/device.d.ts +5 -0
- package/dist/0-face/device.d.ts.map +1 -1
- package/dist/0-face/device.js +105 -0
- package/dist/0-face/scaling.d.ts +48 -0
- package/dist/0-face/scaling.d.ts.map +1 -0
- package/dist/0-face/scaling.js +114 -0
- package/dist/2-core/ds-banner.d.ts.map +1 -1
- package/dist/2-core/ds-banner.js +3 -77
- package/dist/2-core/ds-button.d.ts.map +1 -1
- package/dist/2-core/ds-button.js +3 -67
- package/dist/2-core/ds-card.d.ts +39 -0
- package/dist/2-core/ds-card.d.ts.map +1 -0
- package/dist/2-core/ds-card.js +119 -0
- package/dist/2-core/ds-cycle.d.ts.map +1 -1
- package/dist/2-core/ds-cycle.js +3 -22
- package/dist/2-core/ds-date.d.ts.map +1 -1
- package/dist/2-core/ds-date.js +3 -9
- package/dist/2-core/ds-gap.d.ts.map +1 -1
- package/dist/2-core/ds-gap.js +3 -75
- package/dist/2-core/ds-icon.d.ts.map +1 -1
- package/dist/2-core/ds-icon.js +3 -33
- package/dist/2-core/ds-input.d.ts +127 -0
- package/dist/2-core/ds-input.d.ts.map +1 -1
- package/dist/2-core/ds-input.js +252 -1
- package/dist/2-core/ds-pagedots.d.ts +32 -0
- package/dist/2-core/ds-pagedots.d.ts.map +1 -0
- package/dist/2-core/ds-pagedots.js +36 -0
- package/dist/2-core/ds-text.d.ts.map +1 -1
- package/dist/2-core/ds-text.js +3 -29
- package/dist/2-core/ds-tooltip.d.ts.map +1 -1
- package/dist/2-core/ds-tooltip.js +3 -49
- package/dist/2-core/styles/ds-banner.css +77 -0
- package/dist/2-core/styles/ds-button.css +67 -0
- package/dist/2-core/styles/ds-cycle.css +21 -0
- package/dist/2-core/styles/ds-date.css +9 -0
- package/dist/2-core/styles/ds-gap.css +93 -0
- package/dist/2-core/styles/ds-icon.css +30 -0
- package/dist/2-core/styles/ds-input.css +46 -0
- package/dist/2-core/styles/ds-pagedots.css +26 -0
- package/dist/2-core/styles/ds-text.css +29 -0
- package/dist/2-core/styles/ds-tooltip.css +49 -0
- package/dist/3-unit/ds-accordion.d.ts.map +1 -1
- package/dist/3-unit/ds-accordion.js +3 -46
- package/dist/3-unit/ds-form.d.ts +70 -0
- package/dist/3-unit/ds-form.d.ts.map +1 -0
- package/dist/3-unit/ds-form.js +232 -0
- package/dist/3-unit/ds-list.d.ts.map +1 -1
- package/dist/3-unit/ds-list.js +5 -11
- package/dist/3-unit/ds-row.d.ts.map +1 -1
- package/dist/3-unit/ds-row.js +3 -19
- package/dist/3-unit/ds-table.d.ts.map +1 -1
- package/dist/3-unit/ds-table.js +3 -85
- package/dist/3-unit/styles/ds-accordion.css +46 -0
- package/dist/3-unit/styles/ds-list.css +9 -0
- package/dist/3-unit/styles/ds-row.css +19 -0
- package/dist/3-unit/styles/ds-table.css +80 -0
- package/dist/4-page/ds-container.d.ts.map +1 -1
- package/dist/4-page/ds-container.js +3 -35
- package/dist/4-page/ds-grid.d.ts.map +1 -1
- package/dist/4-page/ds-grid.js +3 -56
- 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 +528 -50
- package/dist/4-page/styles/ds-container.css +35 -0
- package/dist/4-page/styles/ds-grid.css +56 -0
- package/dist/4-page/styles/ds-layout.css +251 -0
- package/dist/ds-one.bundle.css +700 -0
- package/dist/ds-one.bundle.css.map +7 -0
- package/dist/ds-one.bundle.js +1370 -535
- package/dist/ds-one.bundle.js.map +4 -4
- package/dist/ds-one.bundle.min.css +2 -0
- package/dist/ds-one.bundle.min.css.map +7 -0
- package/dist/ds-one.bundle.min.js +783 -527
- package/dist/ds-one.bundle.min.js.map +4 -4
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/package.json +1 -1
- package/dist/3-unit/doublenav-v1.d.ts +0 -51
- package/dist/3-unit/doublenav-v1.d.ts.map +0 -1
- package/dist/3-unit/doublenav-v1.js +0 -88
- package/dist/3-unit/ds-portfolio-doublenav.d.ts +0 -51
- package/dist/3-unit/ds-portfolio-doublenav.d.ts.map +0 -1
- package/dist/3-unit/ds-portfolio-doublenav.js +0 -88
- package/dist/3-unit/ds-portfolio-panel.d.ts +0 -11
- package/dist/3-unit/ds-portfolio-panel.d.ts.map +0 -1
- package/dist/3-unit/ds-portfolio-panel.js +0 -16
- package/dist/3-unit/ds-portfolio-singlenav.d.ts +0 -32
- package/dist/3-unit/ds-portfolio-singlenav.d.ts.map +0 -1
- package/dist/3-unit/ds-portfolio-singlenav.js +0 -62
- package/dist/3-unit/list-v1.d.ts +0 -11
- package/dist/3-unit/list-v1.d.ts.map +0 -1
- package/dist/3-unit/list-v1.js +0 -15
- package/dist/3-unit/panel-v1.d.ts +0 -11
- package/dist/3-unit/panel-v1.d.ts.map +0 -1
- package/dist/3-unit/panel-v1.js +0 -16
- package/dist/3-unit/row-v1.d.ts +0 -25
- package/dist/3-unit/row-v1.d.ts.map +0 -1
- package/dist/3-unit/row-v1.js +0 -32
- package/dist/3-unit/singlenav-v1.d.ts +0 -32
- package/dist/3-unit/singlenav-v1.d.ts.map +0 -1
- package/dist/3-unit/singlenav-v1.js +0 -62
package/DS1/x-icon/plus.svg
CHANGED
package/DS1/x-icon/rewind.svg
CHANGED
package/DS1/x-icon/row.svg
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="0.5" y="0.5" width="11" height="3" stroke="currentColor" stroke-width="1" fill="none"/>
|
|
3
|
+
<rect x="0.5" y="4.5" width="11" height="3" stroke="currentColor" stroke-width="1" fill="none"/>
|
|
4
|
+
<rect x="0.5" y="8.5" width="11" height="3" stroke="currentColor" stroke-width="1" fill="none"/>
|
|
5
|
+
</svg>
|
package/DS1/x-icon/search.svg
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="5" cy="5" r="4" stroke="currentColor" stroke-width="1.2" fill="none"/>
|
|
3
|
+
<line x1="8" y1="8" x2="11" y2="11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
4
|
+
</svg>
|
package/DS1/x-icon/see.svg
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="14" height="10" viewBox="0 0 14 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M7 1C3.5 1 1 5 1 5C1 5 3.5 9 7 9C10.5 9 13 5 13 5C13 5 10.5 1 7 1Z" stroke="currentColor" stroke-width="1.2" fill="none"/>
|
|
3
|
+
<circle cx="7" cy="5" r="2" fill="currentColor"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M2 8L1 11H13L12 8" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
|
3
|
+
<path d="M3 8V4H6V1H8V4H11V8H3Z" fill="currentColor"/>
|
|
4
|
+
<rect x="5" y="5" width="4" height="2" fill="var(--surface-color, #fff)"/>
|
|
5
|
+
</svg>
|
package/DS1/x-icon/star.svg
CHANGED
package/DS1/x-icon/title.svg
CHANGED
package/DS1/x-icon/undo.svg
CHANGED
package/DS1/x-icon/ungroup.svg
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="0.5" y="0.5" width="5" height="5" stroke="currentColor" stroke-width="1" stroke-dasharray="2 1" fill="none"/>
|
|
3
|
+
<rect x="6.5" y="6.5" width="5" height="5" stroke="currentColor" stroke-width="1" stroke-dasharray="2 1" fill="none"/>
|
|
4
|
+
</svg>
|
package/DS1/x-icon/unhead.svg
CHANGED
package/DS1/x-icon/unicon.svg
CHANGED
package/DS1/x-icon/unlock.svg
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="10" height="12" viewBox="0 0 10 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="1" y="5" width="8" height="6" rx="1" stroke="currentColor" stroke-width="1.2" fill="none"/>
|
|
3
|
+
<path d="M3 5V3C3 1.89543 3.89543 1 5 1C6.10457 1 7 1.89543 7 3" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" fill="none"/>
|
|
4
|
+
<circle cx="5" cy="8" r="1" fill="currentColor"/>
|
|
5
|
+
</svg>
|
package/DS1/x-icon/unmic.svg
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="10" height="14" viewBox="0 0 10 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="2.5" y="1" width="5" height="7" rx="2.5" stroke="currentColor" stroke-width="1.2" fill="none"/>
|
|
3
|
+
<path d="M1 6C1 8.76142 2.79086 11 5 11C7.20914 11 9 8.76142 9 6" stroke="currentColor" stroke-width="1.2" fill="none"/>
|
|
4
|
+
<line x1="5" y1="11" x2="5" y2="13" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
5
|
+
<line x1="1" y1="1" x2="9" y2="13" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
6
|
+
</svg>
|
package/DS1/x-icon/unsee.svg
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M7 2C3.5 2 1 6 1 6C1 6 3.5 10 7 10C10.5 10 13 6 13 6C13 6 10.5 2 7 2Z" stroke="currentColor" stroke-width="1.2" fill="none"/>
|
|
3
|
+
<circle cx="7" cy="6" r="2" stroke="currentColor" stroke-width="1.2" fill="none"/>
|
|
4
|
+
<line x1="2" y1="1" x2="12" y2="11" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
package/DS1/x-icon/unstar.svg
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M6 1L7.5 4.5L11 5L8.5 7.5L9 11L6 9.5L3 11L3.5 7.5L1 5L4.5 4.5L6 1Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" stroke-dasharray="2 1" fill="none"/>
|
|
3
|
+
</svg>
|
package/DS1/x-icon/untitle.svg
CHANGED
package/DS1/x-icon/up.svg
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# DS one (0.2.5-alpha.
|
|
1
|
+
# DS one (0.2.5-alpha.19)
|
|
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.19`
|
|
24
24
|
|
|
25
25
|
## Quick Start
|
|
26
26
|
|
package/dist/0-face/device.d.ts
CHANGED
|
@@ -22,4 +22,9 @@ export declare function getDeviceInfo(): DeviceInfo;
|
|
|
22
22
|
* Initialize device detection and log to console
|
|
23
23
|
*/
|
|
24
24
|
export declare function initDeviceDetection(): DeviceInfo;
|
|
25
|
+
/**
|
|
26
|
+
* Disable double-tap to zoom in the browser (app-like behavior)
|
|
27
|
+
* Prevents all zoom gestures including double-tap and pinch-to-zoom
|
|
28
|
+
*/
|
|
29
|
+
export declare function applike(): void;
|
|
25
30
|
//# sourceMappingURL=device.d.ts.map
|
|
@@ -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,CA0DhD"}
|
|
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;AAwBD;;;GAGG;AACH,wBAAgB,OAAO,IAAI,IAAI,CA4H9B"}
|
package/dist/0-face/device.js
CHANGED
|
@@ -117,3 +117,108 @@ if (typeof window !== "undefined") {
|
|
|
117
117
|
}, 100);
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Disable double-tap to zoom in the browser (app-like behavior)
|
|
122
|
+
* Prevents all zoom gestures including double-tap and pinch-to-zoom
|
|
123
|
+
*/
|
|
124
|
+
export function applike() {
|
|
125
|
+
if (typeof document === "undefined" || typeof window === "undefined") {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
// Set viewport meta tag to prevent zoom - this is the most important step
|
|
129
|
+
let viewport = document.querySelector('meta[name="viewport"]');
|
|
130
|
+
if (!viewport) {
|
|
131
|
+
viewport = document.createElement("meta");
|
|
132
|
+
viewport.setAttribute("name", "viewport");
|
|
133
|
+
document.head.appendChild(viewport);
|
|
134
|
+
}
|
|
135
|
+
viewport.setAttribute("content", "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no");
|
|
136
|
+
// Apply touch-action: pan-x pan-y globally to prevent zoom but allow panning
|
|
137
|
+
const style = document.createElement("style");
|
|
138
|
+
style.id = "ds-one-applike-style";
|
|
139
|
+
style.textContent = `
|
|
140
|
+
* {
|
|
141
|
+
touch-action: pan-x pan-y !important;
|
|
142
|
+
-ms-touch-action: pan-x pan-y !important;
|
|
143
|
+
}
|
|
144
|
+
html, body {
|
|
145
|
+
touch-action: pan-x pan-y !important;
|
|
146
|
+
-ms-touch-action: pan-x pan-y !important;
|
|
147
|
+
}
|
|
148
|
+
`;
|
|
149
|
+
// Remove existing style if present
|
|
150
|
+
const existingStyle = document.getElementById("ds-one-applike-style");
|
|
151
|
+
if (existingStyle) {
|
|
152
|
+
existingStyle.remove();
|
|
153
|
+
}
|
|
154
|
+
document.head.appendChild(style);
|
|
155
|
+
// Track touch events to prevent double-tap zoom
|
|
156
|
+
let lastTouchEnd = 0;
|
|
157
|
+
let touchStartTime = 0;
|
|
158
|
+
const preventZoom = (event) => {
|
|
159
|
+
// Prevent pinch zoom (two fingers)
|
|
160
|
+
if (event instanceof TouchEvent) {
|
|
161
|
+
if (event.touches.length > 1) {
|
|
162
|
+
event.preventDefault();
|
|
163
|
+
event.stopPropagation();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const now = Date.now();
|
|
167
|
+
if (event.type === "touchstart") {
|
|
168
|
+
// If touchstart happens within 300ms of last touchend, it's likely a double-tap
|
|
169
|
+
if (now - lastTouchEnd < 300) {
|
|
170
|
+
event.preventDefault();
|
|
171
|
+
event.stopPropagation();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
touchStartTime = now;
|
|
175
|
+
}
|
|
176
|
+
else if (event.type === "touchend") {
|
|
177
|
+
const touchDuration = now - touchStartTime;
|
|
178
|
+
// If this is a quick tap (< 300ms) and happened soon after previous touchend, prevent it
|
|
179
|
+
if (touchDuration < 300 && now - lastTouchEnd < 300) {
|
|
180
|
+
event.preventDefault();
|
|
181
|
+
event.stopPropagation();
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
lastTouchEnd = now;
|
|
185
|
+
}
|
|
186
|
+
else if (event.type === "touchmove") {
|
|
187
|
+
// Prevent any touchmove that might trigger zoom
|
|
188
|
+
if (event.touches.length > 1) {
|
|
189
|
+
event.preventDefault();
|
|
190
|
+
event.stopPropagation();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// Prevent wheel zoom with ctrl/cmd key (common on trackpads)
|
|
196
|
+
if (event instanceof WheelEvent && (event.ctrlKey || event.metaKey)) {
|
|
197
|
+
event.preventDefault();
|
|
198
|
+
event.stopPropagation();
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
// Use capture phase to catch events earlier
|
|
203
|
+
const options = { passive: false, capture: true };
|
|
204
|
+
// Prevent all zoom gestures - use capture phase
|
|
205
|
+
document.addEventListener("touchstart", preventZoom, options);
|
|
206
|
+
document.addEventListener("touchmove", preventZoom, options);
|
|
207
|
+
document.addEventListener("touchend", preventZoom, options);
|
|
208
|
+
document.addEventListener("touchcancel", preventZoom, options);
|
|
209
|
+
// Prevent wheel zoom
|
|
210
|
+
document.addEventListener("wheel", preventZoom, options);
|
|
211
|
+
// Prevent gesture events (iOS Safari) - use capture phase
|
|
212
|
+
document.addEventListener("gesturestart", (e) => {
|
|
213
|
+
e.preventDefault();
|
|
214
|
+
e.stopPropagation();
|
|
215
|
+
}, options);
|
|
216
|
+
document.addEventListener("gesturechange", (e) => {
|
|
217
|
+
e.preventDefault();
|
|
218
|
+
e.stopPropagation();
|
|
219
|
+
}, options);
|
|
220
|
+
document.addEventListener("gestureend", (e) => {
|
|
221
|
+
e.preventDefault();
|
|
222
|
+
e.stopPropagation();
|
|
223
|
+
}, options);
|
|
224
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export type ScalingMode = "auto" | "fixed" | "fluid";
|
|
2
|
+
export interface ScalingConfig {
|
|
3
|
+
mode: ScalingMode;
|
|
4
|
+
baseWidth: number;
|
|
5
|
+
minScale: number;
|
|
6
|
+
maxScale: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const scalingFactor: import("@lit-labs/signals").Signal.State<number>;
|
|
9
|
+
export declare const scalingConfig: import("@lit-labs/signals").Signal.State<ScalingConfig>;
|
|
10
|
+
/**
|
|
11
|
+
* Calculate the scaling factor based on viewport width
|
|
12
|
+
* @param viewportWidth - Current viewport width in pixels
|
|
13
|
+
* @param config - Scaling configuration
|
|
14
|
+
* @returns The calculated scaling factor
|
|
15
|
+
*/
|
|
16
|
+
export declare function calculateScalingFactor(viewportWidth: number, config?: ScalingConfig): number;
|
|
17
|
+
/**
|
|
18
|
+
* Set the scaling configuration
|
|
19
|
+
* @param config - Partial scaling configuration to apply
|
|
20
|
+
*/
|
|
21
|
+
export declare function setScalingConfig(config: Partial<ScalingConfig>): void;
|
|
22
|
+
/**
|
|
23
|
+
* Update the scaling factor based on current viewport
|
|
24
|
+
*/
|
|
25
|
+
export declare function updateScalingFactor(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Get the current scaling factor
|
|
28
|
+
* @returns The current scaling factor
|
|
29
|
+
*/
|
|
30
|
+
export declare function getScalingFactor(): number;
|
|
31
|
+
/**
|
|
32
|
+
* Convert a design pixel value to scaled pixels
|
|
33
|
+
* @param designPx - The design pixel value (based on 280px width)
|
|
34
|
+
* @returns The scaled pixel value
|
|
35
|
+
*/
|
|
36
|
+
export declare function scale(designPx: number): number;
|
|
37
|
+
/**
|
|
38
|
+
* Convert a scaled pixel value back to design pixels
|
|
39
|
+
* @param scaledPx - The scaled pixel value
|
|
40
|
+
* @returns The design pixel value
|
|
41
|
+
*/
|
|
42
|
+
export declare function unscale(scaledPx: number): number;
|
|
43
|
+
/**
|
|
44
|
+
* Initialize scaling system
|
|
45
|
+
* This is typically called automatically when the module loads
|
|
46
|
+
*/
|
|
47
|
+
export declare function initScaling(): void;
|
|
48
|
+
//# sourceMappingURL=scaling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaling.d.ts","sourceRoot":"","sources":["../../DS1/0-face/scaling.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD,eAAO,MAAM,aAAa,kDAAoB,CAAC;AAG/C,eAAO,MAAM,aAAa,yDAAuC,CAAC;AAElE;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,MAAM,GAAE,aAAmC,GAC1C,MAAM,CAYR;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CASrE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAoB1C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAqBlC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// scaling.ts
|
|
2
|
+
// Responsive scaling utilities for the design system
|
|
3
|
+
import { signal } from "@lit-labs/signals";
|
|
4
|
+
const defaultConfig = {
|
|
5
|
+
mode: "auto",
|
|
6
|
+
baseWidth: 280,
|
|
7
|
+
minScale: 0.75,
|
|
8
|
+
maxScale: 2.0,
|
|
9
|
+
};
|
|
10
|
+
// Reactive scaling factor signal
|
|
11
|
+
export const scalingFactor = signal(1);
|
|
12
|
+
// Current scaling configuration
|
|
13
|
+
export const scalingConfig = signal(defaultConfig);
|
|
14
|
+
/**
|
|
15
|
+
* Calculate the scaling factor based on viewport width
|
|
16
|
+
* @param viewportWidth - Current viewport width in pixels
|
|
17
|
+
* @param config - Scaling configuration
|
|
18
|
+
* @returns The calculated scaling factor
|
|
19
|
+
*/
|
|
20
|
+
export function calculateScalingFactor(viewportWidth, config = scalingConfig.get()) {
|
|
21
|
+
if (config.mode === "fixed") {
|
|
22
|
+
return 1;
|
|
23
|
+
}
|
|
24
|
+
const rawScale = viewportWidth / config.baseWidth;
|
|
25
|
+
const clampedScale = Math.max(config.minScale, Math.min(config.maxScale, rawScale));
|
|
26
|
+
return Number(clampedScale.toFixed(3));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Set the scaling configuration
|
|
30
|
+
* @param config - Partial scaling configuration to apply
|
|
31
|
+
*/
|
|
32
|
+
export function setScalingConfig(config) {
|
|
33
|
+
const currentConfig = scalingConfig.get();
|
|
34
|
+
const newConfig = { ...currentConfig, ...config };
|
|
35
|
+
scalingConfig.set(newConfig);
|
|
36
|
+
// Recalculate scaling factor if in browser
|
|
37
|
+
if (typeof window !== "undefined") {
|
|
38
|
+
updateScalingFactor();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Update the scaling factor based on current viewport
|
|
43
|
+
*/
|
|
44
|
+
export function updateScalingFactor() {
|
|
45
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const viewportWidth = document.documentElement.clientWidth;
|
|
49
|
+
const config = scalingConfig.get();
|
|
50
|
+
const newFactor = calculateScalingFactor(viewportWidth, config);
|
|
51
|
+
scalingFactor.set(newFactor);
|
|
52
|
+
// Update CSS custom property
|
|
53
|
+
document.documentElement.style.setProperty("--sf", newFactor.toString());
|
|
54
|
+
// Dispatch event for components that need to react
|
|
55
|
+
window.dispatchEvent(new CustomEvent("scaling-changed", {
|
|
56
|
+
detail: { scalingFactor: newFactor, config },
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get the current scaling factor
|
|
61
|
+
* @returns The current scaling factor
|
|
62
|
+
*/
|
|
63
|
+
export function getScalingFactor() {
|
|
64
|
+
return scalingFactor.get();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Convert a design pixel value to scaled pixels
|
|
68
|
+
* @param designPx - The design pixel value (based on 280px width)
|
|
69
|
+
* @returns The scaled pixel value
|
|
70
|
+
*/
|
|
71
|
+
export function scale(designPx) {
|
|
72
|
+
return designPx * scalingFactor.get();
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Convert a scaled pixel value back to design pixels
|
|
76
|
+
* @param scaledPx - The scaled pixel value
|
|
77
|
+
* @returns The design pixel value
|
|
78
|
+
*/
|
|
79
|
+
export function unscale(scaledPx) {
|
|
80
|
+
const factor = scalingFactor.get();
|
|
81
|
+
return factor === 0 ? scaledPx : scaledPx / factor;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Initialize scaling system
|
|
85
|
+
* This is typically called automatically when the module loads
|
|
86
|
+
*/
|
|
87
|
+
export function initScaling() {
|
|
88
|
+
if (typeof window === "undefined") {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// Initial calculation
|
|
92
|
+
updateScalingFactor();
|
|
93
|
+
// Update on resize (debounced)
|
|
94
|
+
let resizeTimeout;
|
|
95
|
+
window.addEventListener("resize", () => {
|
|
96
|
+
clearTimeout(resizeTimeout);
|
|
97
|
+
resizeTimeout = setTimeout(() => {
|
|
98
|
+
updateScalingFactor();
|
|
99
|
+
}, 100);
|
|
100
|
+
});
|
|
101
|
+
// Update on orientation change
|
|
102
|
+
window.addEventListener("orientationchange", () => {
|
|
103
|
+
setTimeout(updateScalingFactor, 100);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// Auto-initialize when module loads in browser
|
|
107
|
+
if (typeof window !== "undefined") {
|
|
108
|
+
if (document.readyState === "loading") {
|
|
109
|
+
document.addEventListener("DOMContentLoaded", initScaling);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
initScaling();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-banner.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-banner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"ds-banner.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-banner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAElD,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AAGxB,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,0BAAqB;IAElC,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"}
|
package/dist/2-core/ds-banner.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// ds-banner.ts
|
|
2
2
|
// Fixed banner component for notifications/alerts
|
|
3
|
-
import { LitElement, html,
|
|
3
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
4
4
|
import { getText } from "../0-face/i18n.js";
|
|
5
5
|
import "./ds-text.js";
|
|
6
6
|
import "./ds-button.js";
|
|
7
|
+
import styles from "./styles/ds-banner.css?inline";
|
|
7
8
|
export class Banner extends LitElement {
|
|
8
9
|
constructor() {
|
|
9
10
|
super(...arguments);
|
|
@@ -93,80 +94,5 @@ Banner.properties = {
|
|
|
93
94
|
version: { type: String },
|
|
94
95
|
_showVersion: { type: Boolean, state: true },
|
|
95
96
|
};
|
|
96
|
-
Banner.styles =
|
|
97
|
-
:host {
|
|
98
|
-
display: flex;
|
|
99
|
-
position: absolute;
|
|
100
|
-
top: 0;
|
|
101
|
-
left: 0;
|
|
102
|
-
right: 0;
|
|
103
|
-
width: 100%;
|
|
104
|
-
height: calc(var(--unit) * var(--sf, 1));
|
|
105
|
-
align-items: center;
|
|
106
|
-
justify-content: space-between;
|
|
107
|
-
padding: 0 calc(var(--unit) * var(--sf, 1));
|
|
108
|
-
box-sizing: border-box;
|
|
109
|
-
z-index: 9999;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
:host([variant="warning"]) {
|
|
113
|
-
background-color: color-mix(in srgb, var(--yellow) 50%, transparent);
|
|
114
|
-
--banner-text-color: color-mix(in srgb, var(--black) 50%, transparent);
|
|
115
|
-
--banner-action-color: var(--slate);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
:host([variant="info"]) {
|
|
119
|
-
background-color: rgba(var(--sharp-blue-rgb, 0, 122, 255), 0.7);
|
|
120
|
-
--banner-text-color: var(--white, #fff);
|
|
121
|
-
--banner-action-color: var(--white, #fff);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
:host([variant="success"]) {
|
|
125
|
-
background-color: rgba(var(--apple-green-rgb, 52, 199, 89), 0.7);
|
|
126
|
-
--banner-text-color: var(--white, #fff);
|
|
127
|
-
--banner-action-color: var(--white, #fff);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
:host([variant="error"]) {
|
|
131
|
-
background-color: rgba(var(--tuned-red-rgb, 255, 59, 48), 0.7);
|
|
132
|
-
--banner-text-color: var(--white, #fff);
|
|
133
|
-
--banner-action-color: var(--slate, #1e1e1e);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.text-wrapper {
|
|
137
|
-
flex: 1;
|
|
138
|
-
cursor: pointer;
|
|
139
|
-
user-select: none;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.text-wrapper ds-text,
|
|
143
|
-
.text-wrapper .version {
|
|
144
|
-
color: var(--banner-text-color);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.action-wrapper {
|
|
148
|
-
font-size: calc(12px * var(--sf, 1));
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.action-wrapper a {
|
|
152
|
-
color: var(--banner-action-color);
|
|
153
|
-
text-decoration: none;
|
|
154
|
-
font-family: var(--typeface-regular);
|
|
155
|
-
font-size: calc(12px * var(--sf, 1));
|
|
156
|
-
cursor: pointer;
|
|
157
|
-
pointer-events: auto;
|
|
158
|
-
display: inline-block;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.action-wrapper a:hover {
|
|
162
|
-
opacity: 0.8;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.action-wrapper ds-text {
|
|
166
|
-
color: var(--banner-action-color);
|
|
167
|
-
font-family: var(--typeface-regular);
|
|
168
|
-
font-size: calc(12px * var(--sf, 1));
|
|
169
|
-
pointer-events: none;
|
|
170
|
-
}
|
|
171
|
-
`;
|
|
97
|
+
Banner.styles = unsafeCSS(styles);
|
|
172
98
|
customElements.define("ds-banner", Banner);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-button.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-button.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"ds-button.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-button.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAClD,OAAO,WAAW,CAAC;AAGnB,qBAAa,MAAO,SAAQ,UAAU;IACpC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgBf;IAGM,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,OAAO,CAAC;;IAiB1B,MAAM,CAAC,MAAM,0BAAqB;IAElC,iBAAiB;IAIjB,MAAM;IAsBN,OAAO,CAAC,YAAY;CAwBrB;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB;CACF"}
|
package/dist/2-core/ds-button.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// ds-button.ts
|
|
2
2
|
// Core button component
|
|
3
|
-
import { LitElement, html,
|
|
3
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
4
4
|
import "./ds-text";
|
|
5
|
+
import styles from "./styles/ds-button.css?inline";
|
|
5
6
|
export class Button extends LitElement {
|
|
6
7
|
constructor() {
|
|
7
8
|
super();
|
|
@@ -81,70 +82,5 @@ Button.properties = {
|
|
|
81
82
|
href: { type: String },
|
|
82
83
|
_loading: { type: Boolean, state: true },
|
|
83
84
|
};
|
|
84
|
-
Button.styles =
|
|
85
|
-
button {
|
|
86
|
-
max-height: calc(var(--08) * var(--sf));
|
|
87
|
-
display: inline-flex;
|
|
88
|
-
align-items: center;
|
|
89
|
-
justify-content: center;
|
|
90
|
-
border: none;
|
|
91
|
-
cursor: pointer;
|
|
92
|
-
padding: 0 calc(0.5px * var(--sf));
|
|
93
|
-
color: var(--button-text-color);
|
|
94
|
-
font-family: var(--typeface-regular);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
button.title {
|
|
98
|
-
background-color: var(--button-background-color-secondary);
|
|
99
|
-
color: var(--button-text-color);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
button.primary {
|
|
103
|
-
background-color: var(--accent-color);
|
|
104
|
-
color: var(--button-text-color);
|
|
105
|
-
text-decoration-line: none;
|
|
106
|
-
font-family: var(--typeface-regular);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
button.secondary {
|
|
110
|
-
background-color: var(--button-background-color-secondary);
|
|
111
|
-
color: var(--button-text-color);
|
|
112
|
-
font-family: var(--typeface-regular);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
button.text {
|
|
116
|
-
background-color: transparent;
|
|
117
|
-
color: var(--button-color, var(--button-text-color));
|
|
118
|
-
font-family: var(--typeface-regular);
|
|
119
|
-
padding: 0;
|
|
120
|
-
text-decoration: none;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
button.text:hover {
|
|
124
|
-
opacity: 0.8;
|
|
125
|
-
text-decoration: none;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
button[bold] {
|
|
129
|
-
font-weight: var(--type-weight-bold);
|
|
130
|
-
font-family: var(--typeface-medium);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
button[no-background] {
|
|
134
|
-
background-color: transparent;
|
|
135
|
-
max-height: var(--1);
|
|
136
|
-
padding: 0;
|
|
137
|
-
color: var(--button-color, var(--button-text-color-secondary));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
button[no-background][bold] {
|
|
141
|
-
font-weight: var(--type-weight-bold);
|
|
142
|
-
font-family: var(--typeface-medium);
|
|
143
|
-
color: var(--button-color, var(--button-text-color-secondary));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.loading {
|
|
147
|
-
opacity: 0.7;
|
|
148
|
-
}
|
|
149
|
-
`;
|
|
85
|
+
Button.styles = unsafeCSS(styles);
|
|
150
86
|
customElements.define("ds-button", Button);
|