@patimweb/crtstyleguide 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.js +83 -42
- package/package.json +1 -1
package/dist/lib/index.js
CHANGED
|
@@ -34,7 +34,7 @@ const Ae = (e) => new Pe(typeof e == "string" ? e : e + "", void 0, ke), Se = (e
|
|
|
34
34
|
for (const s of t.cssRules) a += s.cssText;
|
|
35
35
|
return Ae(a);
|
|
36
36
|
})(e) : e;
|
|
37
|
-
const { is: Ee, defineProperty:
|
|
37
|
+
const { is: Ee, defineProperty: Me, getOwnPropertyDescriptor: De, getOwnPropertyNames: Te, getOwnPropertySymbols: je, getPrototypeOf: Le } = Object, Vt = globalThis, ve = Vt.trustedTypes, Ie = ve ? ve.emptyScript : "", Be = Vt.reactiveElementPolyfillSupport, ft = (e, t) => e, jt = { toAttribute(e, t) {
|
|
38
38
|
switch (t) {
|
|
39
39
|
case Boolean:
|
|
40
40
|
e = e ? Ie : null;
|
|
@@ -74,11 +74,11 @@ let ut = class extends HTMLElement {
|
|
|
74
74
|
static createProperty(t, a = ge) {
|
|
75
75
|
if (a.state && (a.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((a = Object.create(a)).wrapped = !0), this.elementProperties.set(t, a), !a.noAccessor) {
|
|
76
76
|
const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, s, a);
|
|
77
|
-
r !== void 0 &&
|
|
77
|
+
r !== void 0 && Me(this.prototype, t, r);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
static getPropertyDescriptor(t, a, s) {
|
|
81
|
-
const { get: r, set: i } =
|
|
81
|
+
const { get: r, set: i } = De(this.prototype, t) ?? { get() {
|
|
82
82
|
return this[a];
|
|
83
83
|
}, set(o) {
|
|
84
84
|
this[a] = o;
|
|
@@ -317,8 +317,8 @@ class yt {
|
|
|
317
317
|
for (; (r = G.nextNode()) !== null && p.length < c; ) {
|
|
318
318
|
if (r.nodeType === 1) {
|
|
319
319
|
if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith($e)) {
|
|
320
|
-
const S = b[o++], U = r.getAttribute(u).split(R),
|
|
321
|
-
p.push({ type: 1, index: i, name:
|
|
320
|
+
const S = b[o++], U = r.getAttribute(u).split(R), Dt = /([.?@])?(.*)/.exec(S);
|
|
321
|
+
p.push({ type: 1, index: i, name: Dt[2], strings: U, ctor: Dt[1] === "." ? qe : Dt[1] === "?" ? We : Dt[1] === "@" ? Xe : Wt }), r.removeAttribute(u);
|
|
322
322
|
} else u.startsWith(R) && (p.push({ type: 6, index: i }), r.removeAttribute(u));
|
|
323
323
|
if (ze.test(r.tagName)) {
|
|
324
324
|
const u = r.textContent.split(R), S = u.length - 1;
|
|
@@ -2178,7 +2178,7 @@ var wr = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, it = (e, t
|
|
|
2178
2178
|
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
2179
2179
|
return s && r && wr(t, a, r), r;
|
|
2180
2180
|
};
|
|
2181
|
-
let
|
|
2181
|
+
let M = class extends h {
|
|
2182
2182
|
constructor() {
|
|
2183
2183
|
super(...arguments), this.value = "", this.placeholder = "Select...", this.label = "", this.disabled = !1, this.options = [], this._isOpen = !1, this._handleOutsideClick = (e) => {
|
|
2184
2184
|
this.contains(e.target) || (this._isOpen = !1);
|
|
@@ -2259,7 +2259,7 @@ let D = class extends h {
|
|
|
2259
2259
|
`;
|
|
2260
2260
|
}
|
|
2261
2261
|
};
|
|
2262
|
-
|
|
2262
|
+
M.styles = d`
|
|
2263
2263
|
:host {
|
|
2264
2264
|
display: inline-block;
|
|
2265
2265
|
font-family: var(--crt-font-family);
|
|
@@ -2418,25 +2418,25 @@ D.styles = d`
|
|
|
2418
2418
|
`;
|
|
2419
2419
|
it([
|
|
2420
2420
|
n({ type: String })
|
|
2421
|
-
],
|
|
2421
|
+
], M.prototype, "value", 2);
|
|
2422
2422
|
it([
|
|
2423
2423
|
n({ type: String })
|
|
2424
|
-
],
|
|
2424
|
+
], M.prototype, "placeholder", 2);
|
|
2425
2425
|
it([
|
|
2426
2426
|
n({ type: String })
|
|
2427
|
-
],
|
|
2427
|
+
], M.prototype, "label", 2);
|
|
2428
2428
|
it([
|
|
2429
2429
|
n({ type: Boolean })
|
|
2430
|
-
],
|
|
2430
|
+
], M.prototype, "disabled", 2);
|
|
2431
2431
|
it([
|
|
2432
2432
|
n({ type: Array })
|
|
2433
|
-
],
|
|
2433
|
+
], M.prototype, "options", 2);
|
|
2434
2434
|
it([
|
|
2435
2435
|
m()
|
|
2436
|
-
],
|
|
2437
|
-
|
|
2436
|
+
], M.prototype, "_isOpen", 2);
|
|
2437
|
+
M = it([
|
|
2438
2438
|
v("crt-select")
|
|
2439
|
-
],
|
|
2439
|
+
], M);
|
|
2440
2440
|
var $r = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, y = (e, t, a, s) => {
|
|
2441
2441
|
for (var r = s > 1 ? void 0 : s ? _r(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
2442
2442
|
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
@@ -3159,8 +3159,8 @@ oe([
|
|
|
3159
3159
|
kt = oe([
|
|
3160
3160
|
v("crt-breadcrumb")
|
|
3161
3161
|
], kt);
|
|
3162
|
-
var Er = Object.defineProperty,
|
|
3163
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
3162
|
+
var Er = Object.defineProperty, Mr = Object.getOwnPropertyDescriptor, At = (e, t, a, s) => {
|
|
3163
|
+
for (var r = s > 1 ? void 0 : s ? Mr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
3164
3164
|
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
3165
3165
|
return s && r && Er(t, a, r), r;
|
|
3166
3166
|
};
|
|
@@ -3293,10 +3293,10 @@ At([
|
|
|
3293
3293
|
et = At([
|
|
3294
3294
|
v("crt-pagination")
|
|
3295
3295
|
], et);
|
|
3296
|
-
var
|
|
3296
|
+
var Dr = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, L = (e, t, a, s) => {
|
|
3297
3297
|
for (var r = s > 1 ? void 0 : s ? Tr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
3298
3298
|
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
3299
|
-
return s && r &&
|
|
3299
|
+
return s && r && Dr(t, a, r), r;
|
|
3300
3300
|
};
|
|
3301
3301
|
let k = class extends h {
|
|
3302
3302
|
constructor() {
|
|
@@ -3517,7 +3517,7 @@ var jr = Object.defineProperty, Lr = Object.getOwnPropertyDescriptor, ot = (e, t
|
|
|
3517
3517
|
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
3518
3518
|
return s && r && jr(t, a, r), r;
|
|
3519
3519
|
};
|
|
3520
|
-
let
|
|
3520
|
+
let D = class extends h {
|
|
3521
3521
|
constructor() {
|
|
3522
3522
|
super(...arguments), this.checked = !1, this.disabled = !1, this.label = "", this.onLabel = "1", this.offLabel = "0", this.size = "medium";
|
|
3523
3523
|
}
|
|
@@ -3548,7 +3548,7 @@ let M = class extends h {
|
|
|
3548
3548
|
`;
|
|
3549
3549
|
}
|
|
3550
3550
|
};
|
|
3551
|
-
|
|
3551
|
+
D.styles = d`
|
|
3552
3552
|
:host {
|
|
3553
3553
|
display: inline-flex;
|
|
3554
3554
|
align-items: center;
|
|
@@ -3672,25 +3672,25 @@ M.styles = d`
|
|
|
3672
3672
|
`;
|
|
3673
3673
|
ot([
|
|
3674
3674
|
n({ type: Boolean, reflect: !0 })
|
|
3675
|
-
],
|
|
3675
|
+
], D.prototype, "checked", 2);
|
|
3676
3676
|
ot([
|
|
3677
3677
|
n({ type: Boolean, reflect: !0 })
|
|
3678
|
-
],
|
|
3678
|
+
], D.prototype, "disabled", 2);
|
|
3679
3679
|
ot([
|
|
3680
3680
|
n({ type: String })
|
|
3681
|
-
],
|
|
3681
|
+
], D.prototype, "label", 2);
|
|
3682
3682
|
ot([
|
|
3683
3683
|
n({ type: String })
|
|
3684
|
-
],
|
|
3684
|
+
], D.prototype, "onLabel", 2);
|
|
3685
3685
|
ot([
|
|
3686
3686
|
n({ type: String })
|
|
3687
|
-
],
|
|
3687
|
+
], D.prototype, "offLabel", 2);
|
|
3688
3688
|
ot([
|
|
3689
3689
|
n({ type: String, reflect: !0 })
|
|
3690
|
-
],
|
|
3691
|
-
|
|
3690
|
+
], D.prototype, "size", 2);
|
|
3691
|
+
D = ot([
|
|
3692
3692
|
v("crt-toggle")
|
|
3693
|
-
],
|
|
3693
|
+
], D);
|
|
3694
3694
|
var Ir = Object.defineProperty, Br = Object.getOwnPropertyDescriptor, I = (e, t, a, s) => {
|
|
3695
3695
|
for (var r = s > 1 ? void 0 : s ? Br(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
3696
3696
|
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
@@ -4712,7 +4712,17 @@ let Qt = class extends h {
|
|
|
4712
4712
|
}
|
|
4713
4713
|
};
|
|
4714
4714
|
Qt.styles = d`
|
|
4715
|
+
:host {
|
|
4716
|
+
/* Make the card element act like a normal block-level container
|
|
4717
|
+
so external width/height styles can be applied responsively. */
|
|
4718
|
+
display: block;
|
|
4719
|
+
width: 100%;
|
|
4720
|
+
box-sizing: border-box;
|
|
4721
|
+
}
|
|
4722
|
+
|
|
4715
4723
|
.card {
|
|
4724
|
+
width: 100%;
|
|
4725
|
+
box-sizing: border-box;
|
|
4716
4726
|
border: 3px double var(--crt-primary);
|
|
4717
4727
|
padding: var(--crt-spacing-lg);
|
|
4718
4728
|
background-color: var(--crt-bg-dark);
|
|
@@ -4958,6 +4968,9 @@ q.styles = d`
|
|
|
4958
4968
|
:host {
|
|
4959
4969
|
display: block;
|
|
4960
4970
|
margin-bottom: var(--crt-spacing-xl);
|
|
4971
|
+
width: 100%;
|
|
4972
|
+
max-width: none;
|
|
4973
|
+
box-sizing: border-box;
|
|
4961
4974
|
}
|
|
4962
4975
|
|
|
4963
4976
|
.example-header {
|
|
@@ -4985,6 +4998,8 @@ q.styles = d`
|
|
|
4985
4998
|
border: 2px solid var(--crt-primary);
|
|
4986
4999
|
background: var(--crt-bg-light);
|
|
4987
5000
|
box-shadow: var(--crt-glow-inset);
|
|
5001
|
+
width: 100%;
|
|
5002
|
+
box-sizing: border-box;
|
|
4988
5003
|
}
|
|
4989
5004
|
|
|
4990
5005
|
.tab-header {
|
|
@@ -5029,6 +5044,17 @@ q.styles = d`
|
|
|
5029
5044
|
flex-wrap: wrap;
|
|
5030
5045
|
gap: var(--crt-spacing-md);
|
|
5031
5046
|
align-items: center;
|
|
5047
|
+
width: 100%;
|
|
5048
|
+
box-sizing: border-box;
|
|
5049
|
+
}
|
|
5050
|
+
|
|
5051
|
+
/* Ensure embedded demo components stretch to the available width
|
|
5052
|
+
so examples don't get stuck at an intrinsic/narrow width. */
|
|
5053
|
+
.preview-pane > * {
|
|
5054
|
+
flex: 1 1 100%;
|
|
5055
|
+
min-width: 0; /* allow children to shrink below their content width */
|
|
5056
|
+
width: 100%;
|
|
5057
|
+
box-sizing: border-box;
|
|
5032
5058
|
}
|
|
5033
5059
|
|
|
5034
5060
|
.code-pane {
|
|
@@ -5912,6 +5938,8 @@ let Ot = class extends h {
|
|
|
5912
5938
|
Ot.styles = d`
|
|
5913
5939
|
:host {
|
|
5914
5940
|
display: block;
|
|
5941
|
+
width: 100%;
|
|
5942
|
+
box-sizing: border-box;
|
|
5915
5943
|
}
|
|
5916
5944
|
|
|
5917
5945
|
/* Table Styles */
|
|
@@ -5994,10 +6022,12 @@ Ot.styles = d`
|
|
|
5994
6022
|
}
|
|
5995
6023
|
|
|
5996
6024
|
td.track-title {
|
|
5997
|
-
|
|
6025
|
+
/* Allow titles to wrap on narrow screens to avoid forcing huge action column widths */
|
|
6026
|
+
white-space: normal;
|
|
5998
6027
|
overflow: hidden;
|
|
5999
6028
|
text-overflow: ellipsis;
|
|
6000
6029
|
min-width: 0;
|
|
6030
|
+
word-break: break-word;
|
|
6001
6031
|
}
|
|
6002
6032
|
|
|
6003
6033
|
td.track-artist {
|
|
@@ -6009,7 +6039,8 @@ Ot.styles = d`
|
|
|
6009
6039
|
}
|
|
6010
6040
|
|
|
6011
6041
|
.remove-btn {
|
|
6012
|
-
opacity
|
|
6042
|
+
/* Visible by default at low opacity so touch devices can see it */
|
|
6043
|
+
opacity: 0.65;
|
|
6013
6044
|
transition: var(--crt-transition);
|
|
6014
6045
|
}
|
|
6015
6046
|
|
|
@@ -6023,6 +6054,13 @@ Ot.styles = d`
|
|
|
6023
6054
|
text-align: center;
|
|
6024
6055
|
padding: var(--crt-spacing-xl);
|
|
6025
6056
|
transition: var(--crt-transition);
|
|
6057
|
+
/* Ensure the empty preview stretches to the container width */
|
|
6058
|
+
width: 100%;
|
|
6059
|
+
box-sizing: border-box;
|
|
6060
|
+
display: flex;
|
|
6061
|
+
flex-direction: column;
|
|
6062
|
+
align-items: center;
|
|
6063
|
+
justify-content: center;
|
|
6026
6064
|
}
|
|
6027
6065
|
|
|
6028
6066
|
.empty-state:hover {
|
|
@@ -6047,8 +6085,9 @@ Ot.styles = d`
|
|
|
6047
6085
|
|
|
6048
6086
|
/* Responsive: hide artist on narrow screens and allow horizontal scroll fallback */
|
|
6049
6087
|
@media (max-width: 520px) {
|
|
6050
|
-
|
|
6051
|
-
td.track-
|
|
6088
|
+
/* Keep artist visible on narrow screens but allow wrapping */
|
|
6089
|
+
td.track-artist { display: table-cell; max-width: 120px; white-space: normal; word-break: break-word; }
|
|
6090
|
+
td.track-title { max-width: 140px; min-width: 0; white-space: normal; }
|
|
6052
6091
|
.table-wrapper { overflow-x: auto; min-width: 0; }
|
|
6053
6092
|
}
|
|
6054
6093
|
|
|
@@ -6491,8 +6530,10 @@ let W = class extends h {
|
|
|
6491
6530
|
}
|
|
6492
6531
|
};
|
|
6493
6532
|
W.styles = d`
|
|
6494
|
-
:host { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace; }
|
|
6533
|
+
:host { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace; width: 100%; max-width: none; box-sizing: border-box; min-width: 0; }
|
|
6495
6534
|
.term {
|
|
6535
|
+
width: 100%;
|
|
6536
|
+
max-width: none;
|
|
6496
6537
|
background: #0b0f0b;
|
|
6497
6538
|
color: #8aff8a;
|
|
6498
6539
|
padding: 12px;
|
|
@@ -6546,7 +6587,7 @@ gt([
|
|
|
6546
6587
|
W = gt([
|
|
6547
6588
|
v("crt-terminal")
|
|
6548
6589
|
], W);
|
|
6549
|
-
var va = Object.defineProperty, ga = Object.getOwnPropertyDescriptor,
|
|
6590
|
+
var va = Object.defineProperty, ga = Object.getOwnPropertyDescriptor, Mt = (e, t, a, s) => {
|
|
6550
6591
|
for (var r = s > 1 ? void 0 : s ? ga(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
6551
6592
|
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
6552
6593
|
return s && r && va(t, a, r), r;
|
|
@@ -6712,19 +6753,19 @@ at.styles = d`
|
|
|
6712
6753
|
padding-top: var(--crt-spacing-md);
|
|
6713
6754
|
}
|
|
6714
6755
|
`;
|
|
6715
|
-
|
|
6756
|
+
Mt([
|
|
6716
6757
|
m()
|
|
6717
6758
|
], at.prototype, "tracks", 2);
|
|
6718
|
-
|
|
6759
|
+
Mt([
|
|
6719
6760
|
m()
|
|
6720
6761
|
], at.prototype, "currentIndex", 2);
|
|
6721
|
-
|
|
6762
|
+
Mt([
|
|
6722
6763
|
m()
|
|
6723
6764
|
], at.prototype, "showUploadModal", 2);
|
|
6724
|
-
|
|
6765
|
+
Mt([
|
|
6725
6766
|
ee("crt-file-upload")
|
|
6726
6767
|
], at.prototype, "fileUpload", 2);
|
|
6727
|
-
at =
|
|
6768
|
+
at = Mt([
|
|
6728
6769
|
v("crt-music-station")
|
|
6729
6770
|
], at);
|
|
6730
6771
|
export {
|
|
@@ -6754,7 +6795,7 @@ export {
|
|
|
6754
6795
|
w as Progress,
|
|
6755
6796
|
Y as Radio,
|
|
6756
6797
|
pt as RadioGroup,
|
|
6757
|
-
|
|
6798
|
+
M as Select,
|
|
6758
6799
|
V as Skeleton,
|
|
6759
6800
|
Ht as SkeletonCard,
|
|
6760
6801
|
Ft as SkeletonText,
|
|
@@ -6766,7 +6807,7 @@ export {
|
|
|
6766
6807
|
Ut as Text,
|
|
6767
6808
|
J as Textarea,
|
|
6768
6809
|
j as Toast,
|
|
6769
|
-
|
|
6810
|
+
D as Toggle,
|
|
6770
6811
|
tt as Tooltip,
|
|
6771
6812
|
rt as Visualizer
|
|
6772
6813
|
};
|