juxscript 1.1.143 → 1.1.144
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/lib/components/button.d.ts.map +1 -1
- package/lib/components/button.js +10 -5
- package/lib/components/button.ts +11 -7
- package/lib/components/heading.d.ts.map +1 -1
- package/lib/components/heading.js +14 -1
- package/lib/components/heading.ts +14 -1
- package/lib/components/paragraph.d.ts.map +1 -1
- package/lib/components/paragraph.js +0 -11
- package/lib/components/paragraph.ts +0 -13
- package/lib/styles/foundation.css +159 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAQxD,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAChG,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,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C,WAAW,CAAC;IACpD,OAAO,CAAC,cAAc,CAAkC;gBAE5C,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAmB/C,SAAS,CAAC,gBAAgB,IAAI,SAAS,MAAM,EAAE;IAI/C,SAAS,CAAC,iBAAiB,IAAI,SAAS,MAAM,EAAE;IAQhD;;;OAGG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAO1B;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIzB;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM5B,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIzB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI;IAI3C,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAK/B,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK5B,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI;IAO/C;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIzB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAgBzB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAQtC;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAW7B,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI;CA4DnE;AAED,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAElE"}
|
package/lib/components/button.js
CHANGED
|
@@ -120,15 +120,21 @@ export class Button extends BaseComponent {
|
|
|
120
120
|
}
|
|
121
121
|
render(targetId) {
|
|
122
122
|
const container = this._setupContainer(targetId);
|
|
123
|
-
const { content, icon, iconPosition, style, class: className } = this.state;
|
|
123
|
+
const { content, icon, iconPosition, variant, size, style, class: className } = this.state;
|
|
124
124
|
const button = document.createElement('button');
|
|
125
|
-
// ✅
|
|
125
|
+
// ✅ Base class + variant + size
|
|
126
126
|
button.className = 'jux-button';
|
|
127
|
+
if (variant && variant !== 'primary') {
|
|
128
|
+
button.className += ` jux-button-${variant}`;
|
|
129
|
+
}
|
|
130
|
+
if (size && size !== 'medium') {
|
|
131
|
+
button.className += ` jux-button-${size}`;
|
|
132
|
+
}
|
|
127
133
|
button.id = this._id;
|
|
128
|
-
// ✅ Add user classes
|
|
134
|
+
// ✅ Add user classes
|
|
129
135
|
if (className)
|
|
130
136
|
button.className += ` ${className}`;
|
|
131
|
-
// ✅ Apply style (
|
|
137
|
+
// ✅ Apply user style (no variant/size logic here)
|
|
132
138
|
if (style)
|
|
133
139
|
button.setAttribute('style', style);
|
|
134
140
|
if (icon && iconPosition === 'left') {
|
|
@@ -138,7 +144,6 @@ export class Button extends BaseComponent {
|
|
|
138
144
|
button.appendChild(iconEl);
|
|
139
145
|
}
|
|
140
146
|
const textEl = document.createElement('span');
|
|
141
|
-
// ✅ Priority: content (HTML) > label (text) > loading state
|
|
142
147
|
if (content) {
|
|
143
148
|
textEl.innerHTML = content;
|
|
144
149
|
}
|
package/lib/components/button.ts
CHANGED
|
@@ -173,18 +173,25 @@ export class Button extends BaseComponent<ButtonState> {
|
|
|
173
173
|
render(targetId?: string | HTMLElement | BaseComponent<any>): this {
|
|
174
174
|
const container = this._setupContainer(targetId);
|
|
175
175
|
|
|
176
|
-
const { content, icon, iconPosition, style, class: className } = this.state;
|
|
176
|
+
const { content, icon, iconPosition, variant, size, style, class: className } = this.state;
|
|
177
177
|
|
|
178
178
|
const button = document.createElement('button');
|
|
179
179
|
|
|
180
|
-
// ✅
|
|
180
|
+
// ✅ Base class + variant + size
|
|
181
181
|
button.className = 'jux-button';
|
|
182
|
+
if (variant && variant !== 'primary') {
|
|
183
|
+
button.className += ` jux-button-${variant}`;
|
|
184
|
+
}
|
|
185
|
+
if (size && size !== 'medium') {
|
|
186
|
+
button.className += ` jux-button-${size}`;
|
|
187
|
+
}
|
|
188
|
+
|
|
182
189
|
button.id = this._id;
|
|
183
190
|
|
|
184
|
-
// ✅ Add user classes
|
|
191
|
+
// ✅ Add user classes
|
|
185
192
|
if (className) button.className += ` ${className}`;
|
|
186
193
|
|
|
187
|
-
// ✅ Apply style (
|
|
194
|
+
// ✅ Apply user style (no variant/size logic here)
|
|
188
195
|
if (style) button.setAttribute('style', style);
|
|
189
196
|
|
|
190
197
|
if (icon && iconPosition === 'left') {
|
|
@@ -195,8 +202,6 @@ export class Button extends BaseComponent<ButtonState> {
|
|
|
195
202
|
}
|
|
196
203
|
|
|
197
204
|
const textEl = document.createElement('span');
|
|
198
|
-
|
|
199
|
-
// ✅ Priority: content (HTML) > label (text) > loading state
|
|
200
205
|
if (content) {
|
|
201
206
|
textEl.innerHTML = content;
|
|
202
207
|
} else if (this.state.label) {
|
|
@@ -205,7 +210,6 @@ export class Button extends BaseComponent<ButtonState> {
|
|
|
205
210
|
// Fallback to auto-generated label from ID
|
|
206
211
|
textEl.textContent = this.state.loading ? 'Loading...' : formatIdAsLabel(this._id);
|
|
207
212
|
}
|
|
208
|
-
|
|
209
213
|
button.appendChild(textEl);
|
|
210
214
|
|
|
211
215
|
if (icon && iconPosition === 'right') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["heading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAMxD,MAAM,WAAW,cAAc;IAC3B,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC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BAAgB,IAAI,SAAS,MAAM,EAAE;IAI/C,SAAS,CAAC,iBAAiB,IAAI,SAAS,MAAM,EAAE;IAIhD,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IA0BtC,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI;IAKzC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAS5B,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI;CA8BrE;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAEzE"}
|
|
@@ -18,7 +18,20 @@ export class Heading extends BaseComponent {
|
|
|
18
18
|
return CALLBACK_EVENTS;
|
|
19
19
|
}
|
|
20
20
|
update(prop, value) {
|
|
21
|
-
|
|
21
|
+
const el = document.getElementById(this._id);
|
|
22
|
+
if (!el)
|
|
23
|
+
return;
|
|
24
|
+
switch (prop) {
|
|
25
|
+
case 'content':
|
|
26
|
+
el.textContent = value;
|
|
27
|
+
break;
|
|
28
|
+
case 'level':
|
|
29
|
+
// Would need to recreate element - skip for now
|
|
30
|
+
break;
|
|
31
|
+
default:
|
|
32
|
+
super.update(prop, value);
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
22
35
|
}
|
|
23
36
|
/* ═════════════════════════════════════════════════════════════════
|
|
24
37
|
* FLUENT API
|
|
@@ -37,7 +37,20 @@ export class Heading extends BaseComponent<HeadingState> {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
update(prop: string, value: any): void {
|
|
40
|
-
|
|
40
|
+
const el = document.getElementById(this._id);
|
|
41
|
+
if (!el) return;
|
|
42
|
+
|
|
43
|
+
switch (prop) {
|
|
44
|
+
case 'content':
|
|
45
|
+
el.textContent = value;
|
|
46
|
+
break;
|
|
47
|
+
case 'level':
|
|
48
|
+
// Would need to recreate element - skip for now
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
super.update(prop, value);
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
41
54
|
}
|
|
42
55
|
|
|
43
56
|
/* ═════════════════════════════════════════════════════════════════
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["paragraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAMxD,MAAM,WAAW,gBAAgB;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,cAAc,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qBAAa,SAAU,SAAQ,aAAa,CAAC,cAAc,CAAC;gBAC5C,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQtD,SAAS,CAAC,gBAAgB,IAAI,SAAS,MAAM,EAAE;IAI/C,SAAS,CAAC,iBAAiB,IAAI,SAAS,MAAM,EAAE;IAIhD;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["paragraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAMxD,MAAM,WAAW,gBAAgB;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,cAAc,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qBAAa,SAAU,SAAQ,aAAa,CAAC,cAAc,CAAC;gBAC5C,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQtD,SAAS,CAAC,gBAAgB,IAAI,SAAS,MAAM,EAAE;IAI/C,SAAS,CAAC,iBAAiB,IAAI,SAAS,MAAM,EAAE;IAIhD;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAwBtC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK5B;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAQzB,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI;CAuCrE;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,SAAS,CAE/E"}
|
|
@@ -24,22 +24,11 @@ export class Paragraph extends BaseComponent {
|
|
|
24
24
|
const el = document.getElementById(this._id);
|
|
25
25
|
if (!el)
|
|
26
26
|
return;
|
|
27
|
-
// Handle paragraph-specific properties
|
|
28
27
|
switch (prop) {
|
|
29
28
|
case 'content':
|
|
30
29
|
el.textContent = value;
|
|
31
30
|
break;
|
|
32
|
-
case 'class':
|
|
33
|
-
// Preserve base jux-paragraph class, add custom classes
|
|
34
|
-
const baseClass = 'jux-paragraph';
|
|
35
|
-
const userClasses = value.split(' ').filter((c) => c);
|
|
36
|
-
el.className = [baseClass, ...userClasses].join(' ');
|
|
37
|
-
break;
|
|
38
|
-
case 'style':
|
|
39
|
-
el.setAttribute('style', value);
|
|
40
|
-
break;
|
|
41
31
|
default:
|
|
42
|
-
// Call parent for base properties (visible, disabled, loading, etc.)
|
|
43
32
|
super.update(prop, value);
|
|
44
33
|
break;
|
|
45
34
|
}
|
|
@@ -41,25 +41,12 @@ export class Paragraph extends BaseComponent<ParagraphState> {
|
|
|
41
41
|
const el = document.getElementById(this._id);
|
|
42
42
|
if (!el) return;
|
|
43
43
|
|
|
44
|
-
// Handle paragraph-specific properties
|
|
45
44
|
switch (prop) {
|
|
46
45
|
case 'content':
|
|
47
46
|
el.textContent = value;
|
|
48
47
|
break;
|
|
49
48
|
|
|
50
|
-
case 'class':
|
|
51
|
-
// Preserve base jux-paragraph class, add custom classes
|
|
52
|
-
const baseClass = 'jux-paragraph';
|
|
53
|
-
const userClasses = value.split(' ').filter((c: string) => c);
|
|
54
|
-
el.className = [baseClass, ...userClasses].join(' ');
|
|
55
|
-
break;
|
|
56
|
-
|
|
57
|
-
case 'style':
|
|
58
|
-
el.setAttribute('style', value);
|
|
59
|
-
break;
|
|
60
|
-
|
|
61
49
|
default:
|
|
62
|
-
// Call parent for base properties (visible, disabled, loading, etc.)
|
|
63
50
|
super.update(prop, value);
|
|
64
51
|
break;
|
|
65
52
|
}
|
|
@@ -363,4 +363,163 @@ html {
|
|
|
363
363
|
.jux-button:disabled {
|
|
364
364
|
opacity: var(--jux-burn-strong);
|
|
365
365
|
cursor: not-allowed;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* ══════════════════════════════════════════════════════════════════
|
|
369
|
+
BUTTON VARIANTS
|
|
370
|
+
══════════════════════════════════════════════════════════════════ */
|
|
371
|
+
|
|
372
|
+
.jux-button-primary {
|
|
373
|
+
/* Default - uses --jux-brand-bg from above */
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.jux-button-secondary {
|
|
377
|
+
background: var(--jux-brand-accent-bg);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.jux-button-secondary:hover:not(:disabled) {
|
|
381
|
+
background: var(--jux-brand-accent-color-hover);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.jux-button-secondary:active:not(:disabled) {
|
|
385
|
+
background: var(--jux-brand-accent-color-active);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.jux-button-danger {
|
|
389
|
+
background: var(--jux-danger-bg);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.jux-button-danger:hover:not(:disabled) {
|
|
393
|
+
background: color-mix(in srgb,
|
|
394
|
+
var(--jux-danger-from) calc(100% - var(--jux-burn-hover) * 100%),
|
|
395
|
+
var(--jux-danger-to) calc(var(--jux-burn-hover) * 100%)
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.jux-button-success {
|
|
400
|
+
background: var(--jux-success-bg);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.jux-button-success:hover:not(:disabled) {
|
|
404
|
+
background: color-mix(in srgb,
|
|
405
|
+
var(--jux-success-from) calc(100% - var(--jux-burn-hover) * 100%),
|
|
406
|
+
var(--jux-success-to) calc(var(--jux-burn-hover) * 100%)
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.jux-button-warning {
|
|
411
|
+
background: var(--jux-warning-bg);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.jux-button-warning:hover:not(:disabled) {
|
|
415
|
+
background: color-mix(in srgb,
|
|
416
|
+
var(--jux-warning-from) calc(100% - var(--jux-burn-hover) * 100%),
|
|
417
|
+
var(--jux-warning-to) calc(var(--jux-burn-hover) * 100%)
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.jux-button-info {
|
|
422
|
+
background: var(--jux-info-bg);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.jux-button-info:hover:not(:disabled) {
|
|
426
|
+
background: color-mix(in srgb,
|
|
427
|
+
var(--jux-info-from) calc(100% - var(--jux-burn-hover) * 100%),
|
|
428
|
+
var(--jux-info-to) calc(var(--jux-burn-hover) * 100%)
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.jux-button-ghost {
|
|
433
|
+
background: transparent;
|
|
434
|
+
color: var(--jux-brand-color);
|
|
435
|
+
border-color: var(--jux-brand-color);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.jux-button-ghost:hover:not(:disabled) {
|
|
439
|
+
background: color-mix(in srgb, var(--jux-brand-color) 10%, transparent 90%);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.jux-button-link {
|
|
443
|
+
background: transparent;
|
|
444
|
+
color: var(--jux-brand-color);
|
|
445
|
+
border: none;
|
|
446
|
+
text-decoration: underline;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.jux-button-link:hover:not(:disabled) {
|
|
450
|
+
background: transparent;
|
|
451
|
+
opacity: 0.8;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/* ══════════════════════════════════════════════════════════════════
|
|
455
|
+
BUTTON SIZES
|
|
456
|
+
══════════════════════════════════════════════════════════════════ */
|
|
457
|
+
|
|
458
|
+
.jux-button-small {
|
|
459
|
+
padding: calc(var(--jux-space-sm) * 0.75) calc(var(--jux-space-md) * 0.75);
|
|
460
|
+
font-size: calc(var(--jux-text-base) * var(--jux-size-sm));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.jux-button-medium {
|
|
464
|
+
/* Default size from .jux-button */
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.jux-button-large {
|
|
468
|
+
padding: calc(var(--jux-space-md) * 1.25) calc(var(--jux-space-lg) * 1.25);
|
|
469
|
+
font-size: calc(var(--jux-text-base) * var(--jux-size-lg));
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/* ══════════════════════════════════════════════════════════════════
|
|
473
|
+
HEADING STYLES
|
|
474
|
+
══════════════════════════════════════════════════════════════════ */
|
|
475
|
+
|
|
476
|
+
.jux-heading {
|
|
477
|
+
margin: 0;
|
|
478
|
+
font-family: var(--jux-font-family);
|
|
479
|
+
font-weight: var(--jux-weight-bold);
|
|
480
|
+
line-height: var(--jux-leading-tight);
|
|
481
|
+
color: var(--jux-text-color);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.jux-heading-1 {
|
|
485
|
+
font-size: var(--jux-text-4xl);
|
|
486
|
+
font-weight: var(--jux-weight-black);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.jux-heading-2 {
|
|
490
|
+
font-size: var(--jux-text-3xl);
|
|
491
|
+
font-weight: var(--jux-weight-bold);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.jux-heading-3 {
|
|
495
|
+
font-size: var(--jux-text-2xl);
|
|
496
|
+
font-weight: var(--jux-weight-bold);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.jux-heading-4 {
|
|
500
|
+
font-size: var(--jux-text-xl);
|
|
501
|
+
font-weight: var(--jux-weight-semibold);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.jux-heading-5 {
|
|
505
|
+
font-size: var(--jux-text-lg);
|
|
506
|
+
font-weight: var(--jux-weight-semibold);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.jux-heading-6 {
|
|
510
|
+
font-size: var(--jux-text-base);
|
|
511
|
+
font-weight: var(--jux-weight-semibold);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/* ══════════════════════════════════════════════════════════════════
|
|
515
|
+
PARAGRAPH STYLES
|
|
516
|
+
══════════════════════════════════════════════════════════════════ */
|
|
517
|
+
|
|
518
|
+
.jux-paragraph {
|
|
519
|
+
margin: 0;
|
|
520
|
+
font-family: var(--jux-font-family);
|
|
521
|
+
font-size: var(--jux-text-base);
|
|
522
|
+
font-weight: var(--jux-weight-normal);
|
|
523
|
+
line-height: var(--jux-leading-normal);
|
|
524
|
+
color: var(--jux-text-color);
|
|
366
525
|
}
|