@latty-ds/web 0.7.0 → 0.8.0
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/custom-elements.json +272 -41
- package/dist/components/accordion/index.js +4 -4
- package/dist/components/alert/index.js +39 -5
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/badge/index.js +6 -2
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/button.d.ts +7 -2
- package/dist/components/button/button.types.d.ts +3 -2
- package/dist/components/button/index.js +83 -4
- package/dist/components/calendar/index.js +3 -3
- package/dist/components/checkbox/index.js +2 -1
- package/dist/components/chip/index.js +6 -2
- package/dist/components/color-input/index.js +6 -3
- package/dist/components/combobox/index.js +4 -4
- package/dist/components/date-input/index.js +6 -6
- package/dist/components/datepicker/index.js +3 -3
- package/dist/components/dialog/index.js +40 -6
- package/dist/components/divider/index.js +1 -1
- package/dist/components/dropdown/index.js +5 -5
- package/dist/components/icon-button/icon-button.d.ts +4 -0
- package/dist/components/icon-button/index.js +35 -1
- package/dist/components/image/image.d.ts +32 -1
- package/dist/components/image/image.types.d.ts +7 -0
- package/dist/components/image/index.js +41 -2
- package/dist/components/list/index.js +86 -7
- package/dist/components/list/list-item.d.ts +35 -0
- package/dist/components/nav/index.js +19 -5
- package/dist/components/nav/nav-item.d.ts +7 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/radio/index.js +2 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/select/index.js +6 -6
- package/dist/components/shared/aria-forwarding.d.ts +43 -0
- package/dist/components/sidepanel/index.js +36 -2
- package/dist/components/slider/index.js +2 -2
- package/dist/components/snackbar/index.js +4 -4
- package/dist/components/surface/index.js +3 -3
- package/dist/components/switch/index.js +2 -1
- package/dist/components/tab/index.js +1 -1
- package/dist/components/tab-group/index.js +2 -2
- package/dist/components/table/index.js +3 -3
- package/dist/components/text/index.js +1 -1
- package/dist/components/textfield/index.js +7 -3
- package/dist/components/tooltip/index.js +1 -1
- package/dist/index.cjs +294 -67
- package/dist/index.js +336 -106
- package/dist/manifest.json +45 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -40,7 +40,7 @@ import { css } from "lit";
|
|
|
40
40
|
var accordionStyles = css`
|
|
41
41
|
:host {
|
|
42
42
|
display: block;
|
|
43
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
43
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
44
44
|
width: 100%;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -125,7 +125,7 @@ var accordionStyles = css`
|
|
|
125
125
|
/* Variant: default */
|
|
126
126
|
:host([appearance='default']) details {
|
|
127
127
|
background: var(--lt-bg-subtle);
|
|
128
|
-
border: 1px solid var(--lt-border-default);
|
|
128
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
:host([appearance='default']) details:hover {
|
|
@@ -145,7 +145,7 @@ var accordionStyles = css`
|
|
|
145
145
|
/* Variant: outlined */
|
|
146
146
|
:host([appearance='outlined']) details {
|
|
147
147
|
background: transparent;
|
|
148
|
-
border: 1px solid var(--lt-border-default);
|
|
148
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
:host([appearance='outlined']) details:hover {
|
|
@@ -196,7 +196,7 @@ var textStyles = css2`
|
|
|
196
196
|
[part='base'] {
|
|
197
197
|
margin: 0;
|
|
198
198
|
color: inherit;
|
|
199
|
-
font-family: var(--lt-typography-
|
|
199
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
/* ── Display ─────────────────────────────────────────────────────────── */
|
|
@@ -472,7 +472,7 @@ import { css as css3 } from "lit";
|
|
|
472
472
|
var buttonStyles = css3`
|
|
473
473
|
:host {
|
|
474
474
|
display: inline-block;
|
|
475
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
475
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
476
476
|
|
|
477
477
|
/* Internal state props — set per variant/appearance below */
|
|
478
478
|
--_color: var(--lt-text-on-primary);
|
|
@@ -495,7 +495,7 @@ var buttonStyles = css3`
|
|
|
495
495
|
align-items: center;
|
|
496
496
|
background: var(--lt-button-bg, var(--_bg));
|
|
497
497
|
border-radius: var(--lt-border-radius);
|
|
498
|
-
border: 1px solid var(--lt-button-border-color, var(--_border-color));
|
|
498
|
+
border: var(--lt-border-width, 1px) solid var(--lt-button-border-color, var(--_border-color));
|
|
499
499
|
box-sizing: border-box;
|
|
500
500
|
color: var(--lt-button-color, var(--_color));
|
|
501
501
|
cursor: pointer;
|
|
@@ -505,7 +505,7 @@ var buttonStyles = css3`
|
|
|
505
505
|
gap: var(--lt-spacing-2);
|
|
506
506
|
justify-content: center;
|
|
507
507
|
line-height: 1;
|
|
508
|
-
min-width: 88px;
|
|
508
|
+
min-width: var(--lt-button-min-width, 88px);
|
|
509
509
|
user-select: none;
|
|
510
510
|
transition:
|
|
511
511
|
background-color 120ms ease,
|
|
@@ -657,7 +657,52 @@ var buttonStyles = css3`
|
|
|
657
657
|
--_active-bg: var(--lt-bg-info-subtle);
|
|
658
658
|
}
|
|
659
659
|
|
|
660
|
-
|
|
660
|
+
/* ghost appearance — transparent background, no border, low-emphasis text button */
|
|
661
|
+
:host([appearance='ghost'][variant='primary']) {
|
|
662
|
+
--_bg: transparent;
|
|
663
|
+
--_color: var(--lt-text-primary);
|
|
664
|
+
--_hover-bg: var(--lt-bg-primary-subtle);
|
|
665
|
+
--_active-bg: var(--lt-bg-primary-subtle);
|
|
666
|
+
}
|
|
667
|
+
:host([appearance='ghost'][variant='secondary']) {
|
|
668
|
+
--_bg: transparent;
|
|
669
|
+
--_color: var(--lt-text-secondary);
|
|
670
|
+
--_hover-bg: var(--lt-bg-secondary-subtle);
|
|
671
|
+
--_active-bg: var(--lt-bg-secondary-subtle);
|
|
672
|
+
}
|
|
673
|
+
:host([appearance='ghost'][variant='neutral']) {
|
|
674
|
+
--_bg: transparent;
|
|
675
|
+
--_color: var(--lt-text-neutral);
|
|
676
|
+
--_hover-bg: var(--lt-bg-subtle);
|
|
677
|
+
--_active-bg: var(--lt-bg-surface);
|
|
678
|
+
}
|
|
679
|
+
:host([appearance='ghost'][variant='success']) {
|
|
680
|
+
--_bg: transparent;
|
|
681
|
+
--_color: var(--lt-text-success);
|
|
682
|
+
--_hover-bg: var(--lt-bg-success-subtle);
|
|
683
|
+
--_active-bg: var(--lt-bg-success-subtle);
|
|
684
|
+
}
|
|
685
|
+
:host([appearance='ghost'][variant='warning']) {
|
|
686
|
+
--_bg: transparent;
|
|
687
|
+
--_color: var(--lt-text-warning);
|
|
688
|
+
--_hover-bg: var(--lt-bg-warning-subtle);
|
|
689
|
+
--_active-bg: var(--lt-bg-warning-subtle);
|
|
690
|
+
}
|
|
691
|
+
:host([appearance='ghost'][variant='error']) {
|
|
692
|
+
--_bg: transparent;
|
|
693
|
+
--_color: var(--lt-text-error);
|
|
694
|
+
--_hover-bg: var(--lt-bg-error-subtle);
|
|
695
|
+
--_active-bg: var(--lt-bg-error-subtle);
|
|
696
|
+
}
|
|
697
|
+
:host([appearance='ghost'][variant='info']) {
|
|
698
|
+
--_bg: transparent;
|
|
699
|
+
--_color: var(--lt-text-info);
|
|
700
|
+
--_hover-bg: var(--lt-bg-info-subtle);
|
|
701
|
+
--_active-bg: var(--lt-bg-info-subtle);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
:host([appearance='outlined']) [part='base']:active:not([disabled]):not([aria-disabled='true']),
|
|
705
|
+
:host([appearance='ghost']) [part='base']:active:not([disabled]):not([aria-disabled='true']) {
|
|
661
706
|
opacity: 0.8;
|
|
662
707
|
}
|
|
663
708
|
|
|
@@ -691,6 +736,39 @@ var buttonStyles = css3`
|
|
|
691
736
|
}
|
|
692
737
|
`;
|
|
693
738
|
|
|
739
|
+
// src/components/shared/aria-forwarding.ts
|
|
740
|
+
var FORWARDED_ARIA_ATTRIBUTES = [
|
|
741
|
+
"aria-pressed",
|
|
742
|
+
"aria-expanded",
|
|
743
|
+
"aria-haspopup",
|
|
744
|
+
"aria-controls",
|
|
745
|
+
"aria-current"
|
|
746
|
+
];
|
|
747
|
+
var AriaForwardingController = class {
|
|
748
|
+
constructor(host, getTarget) {
|
|
749
|
+
this._host = host;
|
|
750
|
+
this._getTarget = getTarget;
|
|
751
|
+
this._observer = new MutationObserver(() => this._host.requestUpdate());
|
|
752
|
+
host.addController(this);
|
|
753
|
+
}
|
|
754
|
+
hostConnected() {
|
|
755
|
+
this._observer.observe(this._host, { attributes: true, attributeFilter: [...FORWARDED_ARIA_ATTRIBUTES] });
|
|
756
|
+
this._host.requestUpdate();
|
|
757
|
+
}
|
|
758
|
+
hostDisconnected() {
|
|
759
|
+
this._observer.disconnect();
|
|
760
|
+
}
|
|
761
|
+
hostUpdated() {
|
|
762
|
+
const target = this._getTarget();
|
|
763
|
+
if (!target) return;
|
|
764
|
+
for (const attr of FORWARDED_ARIA_ATTRIBUTES) {
|
|
765
|
+
const value = this._host.getAttribute(attr);
|
|
766
|
+
if (value === null) target.removeAttribute(attr);
|
|
767
|
+
else if (target.getAttribute(attr) !== value) target.setAttribute(attr, value);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
|
|
694
772
|
// src/components/spinner/spinner.ts
|
|
695
773
|
import { html as html3 } from "lit";
|
|
696
774
|
import { customElement as customElement3, property as property4 } from "lit/decorators.js";
|
|
@@ -790,6 +868,7 @@ import "@latty-ds/icons";
|
|
|
790
868
|
var Button = class extends ThemeableElement {
|
|
791
869
|
constructor() {
|
|
792
870
|
super();
|
|
871
|
+
this._ariaForwarding = new AriaForwardingController(this, () => this.shadowRoot?.querySelector('[part="base"]'));
|
|
793
872
|
this.variant = "primary";
|
|
794
873
|
this.appearance = "filled";
|
|
795
874
|
this.size = "md";
|
|
@@ -901,7 +980,7 @@ import { css as css5 } from "lit";
|
|
|
901
980
|
var chipStyles = css5`
|
|
902
981
|
:host {
|
|
903
982
|
display: inline-flex;
|
|
904
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
983
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
905
984
|
vertical-align: middle;
|
|
906
985
|
}
|
|
907
986
|
|
|
@@ -909,7 +988,11 @@ var chipStyles = css5`
|
|
|
909
988
|
align-items: center;
|
|
910
989
|
background: var(--lt-chip-bg);
|
|
911
990
|
border-radius: 999px;
|
|
912
|
-
|
|
991
|
+
/* Chips are small pills (as short as 20px tall at size="sm") — a "thick"
|
|
992
|
+
(4px) themed border eats too much of that height and reads as
|
|
993
|
+
compressed/squished, so cap what the chip actually renders at "medium"
|
|
994
|
+
(2px) regardless of the theme's configured border width. */
|
|
995
|
+
border: min(var(--lt-border-width, 1px), 2px) solid var(--lt-chip-border-color, transparent);
|
|
913
996
|
color: var(--lt-chip-color);
|
|
914
997
|
box-sizing: border-box;
|
|
915
998
|
display: inline-flex;
|
|
@@ -1156,7 +1239,7 @@ import { css as css6 } from "lit";
|
|
|
1156
1239
|
var checkboxStyles = css6`
|
|
1157
1240
|
:host {
|
|
1158
1241
|
display: inline-block;
|
|
1159
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
1242
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
1160
1243
|
}
|
|
1161
1244
|
|
|
1162
1245
|
.checkbox-wrapper {
|
|
@@ -1356,6 +1439,7 @@ var Checkbox = class extends ThemeableElement {
|
|
|
1356
1439
|
* @private
|
|
1357
1440
|
*/
|
|
1358
1441
|
handleChange(e) {
|
|
1442
|
+
e.stopPropagation();
|
|
1359
1443
|
const target = e.target;
|
|
1360
1444
|
this.checked = target.checked;
|
|
1361
1445
|
this.indeterminate = false;
|
|
@@ -1451,7 +1535,7 @@ import { customElement as customElement9, property as property10, query as query
|
|
|
1451
1535
|
import { css as css7 } from "lit";
|
|
1452
1536
|
var dialogStyles = css7`
|
|
1453
1537
|
:host {
|
|
1454
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
1538
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
1455
1539
|
}
|
|
1456
1540
|
|
|
1457
1541
|
/* Backdrop */
|
|
@@ -1610,7 +1694,7 @@ var iconButtonStyles = css9`
|
|
|
1610
1694
|
align-items: center;
|
|
1611
1695
|
background: var(--lt-icon-button-bg, var(--_bg));
|
|
1612
1696
|
border-radius: var(--lt-border-radius);
|
|
1613
|
-
border: 1px solid var(--lt-icon-button-border-color, var(--_border-color));
|
|
1697
|
+
border: var(--lt-border-width, 1px) solid var(--lt-icon-button-border-color, var(--_border-color));
|
|
1614
1698
|
box-sizing: border-box;
|
|
1615
1699
|
color: var(--lt-icon-button-color, var(--_color));
|
|
1616
1700
|
cursor: pointer;
|
|
@@ -1821,6 +1905,7 @@ import "@latty-ds/icons";
|
|
|
1821
1905
|
var IconButton = class extends ThemeableElement {
|
|
1822
1906
|
constructor() {
|
|
1823
1907
|
super(...arguments);
|
|
1908
|
+
this._ariaForwarding = new AriaForwardingController(this, () => this.shadowRoot?.querySelector('[part="base"]'));
|
|
1824
1909
|
this.icon = "";
|
|
1825
1910
|
this.label = "";
|
|
1826
1911
|
this.variant = "neutral";
|
|
@@ -1903,7 +1988,7 @@ import { css as css10 } from "lit";
|
|
|
1903
1988
|
var surfaceStyles = css10`
|
|
1904
1989
|
:host {
|
|
1905
1990
|
display: block;
|
|
1906
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
1991
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
1907
1992
|
}
|
|
1908
1993
|
|
|
1909
1994
|
.surface {
|
|
@@ -1942,7 +2027,7 @@ var surfaceStyles = css10`
|
|
|
1942
2027
|
|
|
1943
2028
|
:host([appearance='outlined']) .surface {
|
|
1944
2029
|
background: var(--lt-surface-bg, transparent);
|
|
1945
|
-
border: 1px solid var(--lt-border-default);
|
|
2030
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
1946
2031
|
}
|
|
1947
2032
|
|
|
1948
2033
|
:host([appearance='outlined']:hover) .surface {
|
|
@@ -1959,7 +2044,7 @@ var Surface = class extends ThemeableElement {
|
|
|
1959
2044
|
this.background = "";
|
|
1960
2045
|
}
|
|
1961
2046
|
render() {
|
|
1962
|
-
const style = this.background ? { "--
|
|
2047
|
+
const style = this.background ? { "--lt-surface-bg": resolveColorValue(this.background) } : {};
|
|
1963
2048
|
return html8`
|
|
1964
2049
|
<div class="surface" part="surface" style=${styleMap2(style)}>
|
|
1965
2050
|
<slot></slot>
|
|
@@ -2154,7 +2239,7 @@ import { css as css11 } from "lit";
|
|
|
2154
2239
|
var listStyles = css11`
|
|
2155
2240
|
:host {
|
|
2156
2241
|
display: block;
|
|
2157
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
2242
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
2158
2243
|
--list-marker-color: var(--lt-color-neutral-500);
|
|
2159
2244
|
}
|
|
2160
2245
|
|
|
@@ -2264,6 +2349,7 @@ var listStyles = css11`
|
|
|
2264
2349
|
// src/components/list/list-item.ts
|
|
2265
2350
|
import { html as html10, nothing as nothing3 } from "lit";
|
|
2266
2351
|
import { customElement as customElement10, property as property11 } from "lit/decorators.js";
|
|
2352
|
+
import { ifDefined as ifDefined3 } from "lit/directives/if-defined.js";
|
|
2267
2353
|
|
|
2268
2354
|
// src/components/list/list-item.styles.ts
|
|
2269
2355
|
import { css as css12 } from "lit";
|
|
@@ -2293,6 +2379,47 @@ var listItemStyles = css12`
|
|
|
2293
2379
|
color: var(--lt-color-neutral-500);
|
|
2294
2380
|
font-size: inherit;
|
|
2295
2381
|
}
|
|
2382
|
+
|
|
2383
|
+
/* interactive rows — native button/anchor reset + states */
|
|
2384
|
+
a.inner,
|
|
2385
|
+
button.inner {
|
|
2386
|
+
background: transparent;
|
|
2387
|
+
border: none;
|
|
2388
|
+
border-radius: var(--lt-border-radius);
|
|
2389
|
+
box-sizing: border-box;
|
|
2390
|
+
color: inherit;
|
|
2391
|
+
cursor: pointer;
|
|
2392
|
+
font: inherit;
|
|
2393
|
+
margin: 0;
|
|
2394
|
+
padding: var(--lt-spacing-2);
|
|
2395
|
+
text-align: start;
|
|
2396
|
+
text-decoration: none;
|
|
2397
|
+
transition: background-color 120ms ease;
|
|
2398
|
+
width: 100%;
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
a.inner:hover:not([aria-disabled='true']),
|
|
2402
|
+
button.inner:hover:not([disabled]) {
|
|
2403
|
+
background: var(--lt-list-item-hover-bg, var(--lt-bg-subtle));
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2406
|
+
a.inner:active:not([aria-disabled='true']),
|
|
2407
|
+
button.inner:active:not([disabled]) {
|
|
2408
|
+
background: var(--lt-list-item-active-bg, var(--lt-bg-surface));
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
a.inner:focus-visible,
|
|
2412
|
+
button.inner:focus-visible {
|
|
2413
|
+
outline: 3px solid var(--lt-border-focus);
|
|
2414
|
+
outline-offset: -3px;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
button.inner[disabled],
|
|
2418
|
+
a.inner[aria-disabled='true'] {
|
|
2419
|
+
cursor: not-allowed;
|
|
2420
|
+
opacity: 0.6;
|
|
2421
|
+
pointer-events: none;
|
|
2422
|
+
}
|
|
2296
2423
|
`;
|
|
2297
2424
|
|
|
2298
2425
|
// src/components/list/list-item.ts
|
|
@@ -2302,19 +2429,41 @@ var ListItem = class extends ThemeableElement {
|
|
|
2302
2429
|
super(...arguments);
|
|
2303
2430
|
this.iconStart = "";
|
|
2304
2431
|
this.iconEnd = "";
|
|
2432
|
+
this.clickable = false;
|
|
2433
|
+
this.href = "";
|
|
2434
|
+
this.target = "";
|
|
2435
|
+
this.rel = "";
|
|
2436
|
+
this.disabled = false;
|
|
2305
2437
|
}
|
|
2306
2438
|
connectedCallback() {
|
|
2307
2439
|
super.connectedCallback();
|
|
2308
2440
|
if (!this.hasAttribute("role")) this.setAttribute("role", "listitem");
|
|
2309
2441
|
}
|
|
2310
2442
|
render() {
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
${this.iconEnd ? html10`<lt-icon class="icon-end" name=${this.iconEnd}></lt-icon>` : nothing3}
|
|
2316
|
-
</div>
|
|
2443
|
+
const inner = html10`
|
|
2444
|
+
${this.iconStart ? html10`<lt-icon class="icon-start" name=${this.iconStart}></lt-icon>` : nothing3}
|
|
2445
|
+
<span class="content"><slot></slot></span>
|
|
2446
|
+
${this.iconEnd ? html10`<lt-icon class="icon-end" name=${this.iconEnd}></lt-icon>` : nothing3}
|
|
2317
2447
|
`;
|
|
2448
|
+
if (this.href) {
|
|
2449
|
+
const rel = this.rel || (this.target === "_blank" ? "noopener noreferrer" : void 0);
|
|
2450
|
+
return html10`
|
|
2451
|
+
<a
|
|
2452
|
+
class="inner"
|
|
2453
|
+
part="base"
|
|
2454
|
+
href=${this.href}
|
|
2455
|
+
target=${ifDefined3(this.target || void 0)}
|
|
2456
|
+
rel=${ifDefined3(rel)}
|
|
2457
|
+
aria-disabled=${this.disabled ? "true" : nothing3}
|
|
2458
|
+
tabindex=${this.disabled ? "-1" : nothing3}
|
|
2459
|
+
>${inner}</a
|
|
2460
|
+
>
|
|
2461
|
+
`;
|
|
2462
|
+
}
|
|
2463
|
+
if (this.clickable) {
|
|
2464
|
+
return html10`<button class="inner" part="base" type="button" ?disabled=${this.disabled}>${inner}</button>`;
|
|
2465
|
+
}
|
|
2466
|
+
return html10`<div class="inner" part="base">${inner}</div>`;
|
|
2318
2467
|
}
|
|
2319
2468
|
};
|
|
2320
2469
|
ListItem.styles = listItemStyles;
|
|
@@ -2324,6 +2473,21 @@ __decorateClass([
|
|
|
2324
2473
|
__decorateClass([
|
|
2325
2474
|
property11({ attribute: "icon-end" })
|
|
2326
2475
|
], ListItem.prototype, "iconEnd", 2);
|
|
2476
|
+
__decorateClass([
|
|
2477
|
+
property11({ type: Boolean, reflect: true })
|
|
2478
|
+
], ListItem.prototype, "clickable", 2);
|
|
2479
|
+
__decorateClass([
|
|
2480
|
+
property11()
|
|
2481
|
+
], ListItem.prototype, "href", 2);
|
|
2482
|
+
__decorateClass([
|
|
2483
|
+
property11()
|
|
2484
|
+
], ListItem.prototype, "target", 2);
|
|
2485
|
+
__decorateClass([
|
|
2486
|
+
property11()
|
|
2487
|
+
], ListItem.prototype, "rel", 2);
|
|
2488
|
+
__decorateClass([
|
|
2489
|
+
property11({ type: Boolean, reflect: true })
|
|
2490
|
+
], ListItem.prototype, "disabled", 2);
|
|
2327
2491
|
ListItem = __decorateClass([
|
|
2328
2492
|
customElement10("lt-list-item")
|
|
2329
2493
|
], ListItem);
|
|
@@ -2377,7 +2541,7 @@ import { css as css13 } from "lit";
|
|
|
2377
2541
|
var radioStyles = css13`
|
|
2378
2542
|
:host {
|
|
2379
2543
|
display: inline-block;
|
|
2380
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
2544
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
2381
2545
|
}
|
|
2382
2546
|
|
|
2383
2547
|
.radio-wrapper {
|
|
@@ -2581,6 +2745,7 @@ var Radio = class extends ThemeableElement {
|
|
|
2581
2745
|
* @private
|
|
2582
2746
|
*/
|
|
2583
2747
|
handleChange(e) {
|
|
2748
|
+
e.stopPropagation();
|
|
2584
2749
|
const target = e.target;
|
|
2585
2750
|
this.checked = target.checked;
|
|
2586
2751
|
this.dispatchEvent(
|
|
@@ -2654,7 +2819,7 @@ import { css as css14 } from "lit";
|
|
|
2654
2819
|
var radioGroupStyles = css14`
|
|
2655
2820
|
:host {
|
|
2656
2821
|
display: block;
|
|
2657
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
2822
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
2658
2823
|
}
|
|
2659
2824
|
|
|
2660
2825
|
.radio-group {
|
|
@@ -3011,7 +3176,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
3011
3176
|
}
|
|
3012
3177
|
return coords;
|
|
3013
3178
|
}
|
|
3014
|
-
async function detectOverflow(
|
|
3179
|
+
async function detectOverflow(state9, options) {
|
|
3015
3180
|
var _await$platform$isEle;
|
|
3016
3181
|
if (options === void 0) {
|
|
3017
3182
|
options = {};
|
|
@@ -3023,14 +3188,14 @@ async function detectOverflow(state8, options) {
|
|
|
3023
3188
|
rects,
|
|
3024
3189
|
elements,
|
|
3025
3190
|
strategy
|
|
3026
|
-
} =
|
|
3191
|
+
} = state9;
|
|
3027
3192
|
const {
|
|
3028
3193
|
boundary = "clippingAncestors",
|
|
3029
3194
|
rootBoundary = "viewport",
|
|
3030
3195
|
elementContext = "floating",
|
|
3031
3196
|
altBoundary = false,
|
|
3032
3197
|
padding = 0
|
|
3033
|
-
} = evaluate(options,
|
|
3198
|
+
} = evaluate(options, state9);
|
|
3034
3199
|
const paddingObject = getPaddingObject(padding);
|
|
3035
3200
|
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
3036
3201
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
@@ -3162,7 +3327,7 @@ var flip = function(options) {
|
|
|
3162
3327
|
return {
|
|
3163
3328
|
name: "flip",
|
|
3164
3329
|
options,
|
|
3165
|
-
async fn(
|
|
3330
|
+
async fn(state9) {
|
|
3166
3331
|
var _middlewareData$arrow, _middlewareData$flip;
|
|
3167
3332
|
const {
|
|
3168
3333
|
placement,
|
|
@@ -3171,7 +3336,7 @@ var flip = function(options) {
|
|
|
3171
3336
|
initialPlacement,
|
|
3172
3337
|
platform: platform2,
|
|
3173
3338
|
elements
|
|
3174
|
-
} =
|
|
3339
|
+
} = state9;
|
|
3175
3340
|
const {
|
|
3176
3341
|
mainAxis: checkMainAxis = true,
|
|
3177
3342
|
crossAxis: checkCrossAxis = true,
|
|
@@ -3180,7 +3345,7 @@ var flip = function(options) {
|
|
|
3180
3345
|
fallbackAxisSideDirection = "none",
|
|
3181
3346
|
flipAlignment = true,
|
|
3182
3347
|
...detectOverflowOptions
|
|
3183
|
-
} = evaluate(options,
|
|
3348
|
+
} = evaluate(options, state9);
|
|
3184
3349
|
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
3185
3350
|
return {};
|
|
3186
3351
|
}
|
|
@@ -3194,7 +3359,7 @@ var flip = function(options) {
|
|
|
3194
3359
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
3195
3360
|
}
|
|
3196
3361
|
const placements2 = [initialPlacement, ...fallbackPlacements];
|
|
3197
|
-
const overflow = await platform2.detectOverflow(
|
|
3362
|
+
const overflow = await platform2.detectOverflow(state9, detectOverflowOptions);
|
|
3198
3363
|
const overflows = [];
|
|
3199
3364
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
3200
3365
|
if (checkMainAxis) {
|
|
@@ -3265,19 +3430,19 @@ var flip = function(options) {
|
|
|
3265
3430
|
};
|
|
3266
3431
|
};
|
|
3267
3432
|
var originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
3268
|
-
async function convertValueToCoords(
|
|
3433
|
+
async function convertValueToCoords(state9, options) {
|
|
3269
3434
|
const {
|
|
3270
3435
|
placement,
|
|
3271
3436
|
platform: platform2,
|
|
3272
3437
|
elements
|
|
3273
|
-
} =
|
|
3438
|
+
} = state9;
|
|
3274
3439
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
3275
3440
|
const side = getSide(placement);
|
|
3276
3441
|
const alignment = getAlignment(placement);
|
|
3277
3442
|
const isVertical = getSideAxis(placement) === "y";
|
|
3278
3443
|
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
3279
3444
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
3280
|
-
const rawValue = evaluate(options,
|
|
3445
|
+
const rawValue = evaluate(options, state9);
|
|
3281
3446
|
let {
|
|
3282
3447
|
mainAxis,
|
|
3283
3448
|
crossAxis,
|
|
@@ -3309,15 +3474,15 @@ var offset = function(options) {
|
|
|
3309
3474
|
return {
|
|
3310
3475
|
name: "offset",
|
|
3311
3476
|
options,
|
|
3312
|
-
async fn(
|
|
3477
|
+
async fn(state9) {
|
|
3313
3478
|
var _middlewareData$offse, _middlewareData$arrow;
|
|
3314
3479
|
const {
|
|
3315
3480
|
x,
|
|
3316
3481
|
y,
|
|
3317
3482
|
placement,
|
|
3318
3483
|
middlewareData
|
|
3319
|
-
} =
|
|
3320
|
-
const diffCoords = await convertValueToCoords(
|
|
3484
|
+
} = state9;
|
|
3485
|
+
const diffCoords = await convertValueToCoords(state9, options);
|
|
3321
3486
|
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
3322
3487
|
return {};
|
|
3323
3488
|
}
|
|
@@ -3339,13 +3504,13 @@ var shift = function(options) {
|
|
|
3339
3504
|
return {
|
|
3340
3505
|
name: "shift",
|
|
3341
3506
|
options,
|
|
3342
|
-
async fn(
|
|
3507
|
+
async fn(state9) {
|
|
3343
3508
|
const {
|
|
3344
3509
|
x,
|
|
3345
3510
|
y,
|
|
3346
3511
|
placement,
|
|
3347
3512
|
platform: platform2
|
|
3348
|
-
} =
|
|
3513
|
+
} = state9;
|
|
3349
3514
|
const {
|
|
3350
3515
|
mainAxis: checkMainAxis = true,
|
|
3351
3516
|
crossAxis: checkCrossAxis = false,
|
|
@@ -3362,12 +3527,12 @@ var shift = function(options) {
|
|
|
3362
3527
|
}
|
|
3363
3528
|
},
|
|
3364
3529
|
...detectOverflowOptions
|
|
3365
|
-
} = evaluate(options,
|
|
3530
|
+
} = evaluate(options, state9);
|
|
3366
3531
|
const coords = {
|
|
3367
3532
|
x,
|
|
3368
3533
|
y
|
|
3369
3534
|
};
|
|
3370
|
-
const overflow = await platform2.detectOverflow(
|
|
3535
|
+
const overflow = await platform2.detectOverflow(state9, detectOverflowOptions);
|
|
3371
3536
|
const crossAxis = getSideAxis(getSide(placement));
|
|
3372
3537
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
3373
3538
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -3387,7 +3552,7 @@ var shift = function(options) {
|
|
|
3387
3552
|
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
3388
3553
|
}
|
|
3389
3554
|
const limitedCoords = limiter.fn({
|
|
3390
|
-
...
|
|
3555
|
+
...state9,
|
|
3391
3556
|
[mainAxis]: mainAxisCoord,
|
|
3392
3557
|
[crossAxis]: crossAxisCoord
|
|
3393
3558
|
});
|
|
@@ -4219,7 +4384,7 @@ var selectStyles = [
|
|
|
4219
4384
|
css16`
|
|
4220
4385
|
:host {
|
|
4221
4386
|
display: inline-block;
|
|
4222
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
4387
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
4223
4388
|
position: relative;
|
|
4224
4389
|
width: 100%;
|
|
4225
4390
|
}
|
|
@@ -4248,7 +4413,7 @@ var selectStyles = [
|
|
|
4248
4413
|
align-items: center;
|
|
4249
4414
|
background: var(--lt-bg-subtle);
|
|
4250
4415
|
border-radius: var(--lt-border-radius);
|
|
4251
|
-
border: 1px solid var(--lt-border-default);
|
|
4416
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
4252
4417
|
box-sizing: border-box;
|
|
4253
4418
|
cursor: pointer;
|
|
4254
4419
|
display: flex;
|
|
@@ -4656,7 +4821,7 @@ import { css as css17 } from "lit";
|
|
|
4656
4821
|
var switchStyles = css17`
|
|
4657
4822
|
:host {
|
|
4658
4823
|
display: inline-block;
|
|
4659
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
4824
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
4660
4825
|
}
|
|
4661
4826
|
|
|
4662
4827
|
.switch-wrapper {
|
|
@@ -4857,6 +5022,7 @@ var Switch = class extends ThemeableElement {
|
|
|
4857
5022
|
return this._internals.reportValidity();
|
|
4858
5023
|
}
|
|
4859
5024
|
handleChange(e) {
|
|
5025
|
+
e.stopPropagation();
|
|
4860
5026
|
const target = e.target;
|
|
4861
5027
|
this.checked = target.checked;
|
|
4862
5028
|
this.dispatchEvent(
|
|
@@ -4932,7 +5098,7 @@ import { css as css18 } from "lit";
|
|
|
4932
5098
|
var tabStyles = css18`
|
|
4933
5099
|
:host {
|
|
4934
5100
|
display: inline-block;
|
|
4935
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
5101
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
4936
5102
|
}
|
|
4937
5103
|
|
|
4938
5104
|
.tab {
|
|
@@ -5146,7 +5312,7 @@ import { css as css20 } from "lit";
|
|
|
5146
5312
|
var tabGroupStyles = css20`
|
|
5147
5313
|
:host {
|
|
5148
5314
|
display: block;
|
|
5149
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
5315
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
5150
5316
|
}
|
|
5151
5317
|
|
|
5152
5318
|
.tab-group {
|
|
@@ -5339,7 +5505,7 @@ import { css as css21 } from "lit";
|
|
|
5339
5505
|
var tableStyles = css21`
|
|
5340
5506
|
:host {
|
|
5341
5507
|
display: block;
|
|
5342
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
5508
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
5343
5509
|
overflow: hidden;
|
|
5344
5510
|
width: 100%;
|
|
5345
5511
|
}
|
|
@@ -5500,7 +5666,7 @@ var tableStyles = css21`
|
|
|
5500
5666
|
|
|
5501
5667
|
/* Border styling */
|
|
5502
5668
|
:host([bordered]) table {
|
|
5503
|
-
border: 1px solid var(--lt-border-default);
|
|
5669
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
5504
5670
|
}
|
|
5505
5671
|
|
|
5506
5672
|
:host([bordered]) th,
|
|
@@ -5556,7 +5722,7 @@ var tableStyles = css21`
|
|
|
5556
5722
|
:host([responsive-mode='stack']) tr {
|
|
5557
5723
|
background: var(--lt-bg-subtle);
|
|
5558
5724
|
border-radius: var(--lt-border-radius);
|
|
5559
|
-
border: 1px solid var(--lt-border-default);
|
|
5725
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
5560
5726
|
margin-bottom: var(--lt-spacing-3);
|
|
5561
5727
|
padding: var(--lt-spacing-4);
|
|
5562
5728
|
}
|
|
@@ -5874,7 +6040,7 @@ Table = __decorateClass([
|
|
|
5874
6040
|
|
|
5875
6041
|
// src/components/textfield/textfield.ts
|
|
5876
6042
|
import { html as html20 } from "lit";
|
|
5877
|
-
import { ifDefined as
|
|
6043
|
+
import { ifDefined as ifDefined4 } from "lit/directives/if-defined.js";
|
|
5878
6044
|
import { customElement as customElement20, property as property21, state as state3 } from "lit/decorators.js";
|
|
5879
6045
|
|
|
5880
6046
|
// src/components/textfield/textfield.styles.ts
|
|
@@ -5882,7 +6048,7 @@ import { css as css22 } from "lit";
|
|
|
5882
6048
|
var textfieldStyles = css22`
|
|
5883
6049
|
:host {
|
|
5884
6050
|
display: inline-block;
|
|
5885
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
6051
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
5886
6052
|
width: 100%;
|
|
5887
6053
|
}
|
|
5888
6054
|
|
|
@@ -5952,7 +6118,7 @@ var textfieldStyles = css22`
|
|
|
5952
6118
|
textarea {
|
|
5953
6119
|
background: var(--lt-bg-subtle);
|
|
5954
6120
|
border-radius: var(--lt-border-radius);
|
|
5955
|
-
border: 1px solid var(--lt-border-default);
|
|
6121
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
5956
6122
|
box-sizing: border-box;
|
|
5957
6123
|
color: var(--lt-text-default);
|
|
5958
6124
|
font-family: inherit;
|
|
@@ -6184,6 +6350,7 @@ var Textfield = class extends ThemeableElement {
|
|
|
6184
6350
|
return true;
|
|
6185
6351
|
}
|
|
6186
6352
|
handleInput(e) {
|
|
6353
|
+
e.stopPropagation();
|
|
6187
6354
|
const input = e.target;
|
|
6188
6355
|
this.value = input.value;
|
|
6189
6356
|
if (this._touched) this._autoError = !this._validate();
|
|
@@ -6203,6 +6370,7 @@ var Textfield = class extends ThemeableElement {
|
|
|
6203
6370
|
* @private
|
|
6204
6371
|
*/
|
|
6205
6372
|
handleChange(e) {
|
|
6373
|
+
e.stopPropagation();
|
|
6206
6374
|
const input = e.target;
|
|
6207
6375
|
this.value = input.value;
|
|
6208
6376
|
this.dispatchEvent(
|
|
@@ -6289,10 +6457,11 @@ var Textfield = class extends ThemeableElement {
|
|
|
6289
6457
|
${isMultiline ? html20`
|
|
6290
6458
|
<textarea
|
|
6291
6459
|
.value=${this.value}
|
|
6460
|
+
name=${ifDefined4(this.name || void 0)}
|
|
6292
6461
|
placeholder=${this.placeholder}
|
|
6293
6462
|
rows=${this.rows}
|
|
6294
|
-
minlength=${
|
|
6295
|
-
maxlength=${
|
|
6463
|
+
minlength=${ifDefined4(this.min !== null ? this.min : void 0)}
|
|
6464
|
+
maxlength=${ifDefined4(this.max !== null ? this.max : void 0)}
|
|
6296
6465
|
?disabled=${this.disabled}
|
|
6297
6466
|
?required=${this.required}
|
|
6298
6467
|
?readonly=${this.readonly}
|
|
@@ -6308,11 +6477,12 @@ var Textfield = class extends ThemeableElement {
|
|
|
6308
6477
|
<input
|
|
6309
6478
|
type=${actualInputType}
|
|
6310
6479
|
.value=${this.value}
|
|
6480
|
+
name=${ifDefined4(this.name || void 0)}
|
|
6311
6481
|
placeholder=${this.placeholder}
|
|
6312
|
-
min=${
|
|
6313
|
-
max=${
|
|
6314
|
-
minlength=${
|
|
6315
|
-
maxlength=${
|
|
6482
|
+
min=${ifDefined4(isNumber && this.min !== null ? this.min : void 0)}
|
|
6483
|
+
max=${ifDefined4(isNumber && this.max !== null ? this.max : void 0)}
|
|
6484
|
+
minlength=${ifDefined4(!isNumber && this.min !== null ? this.min : void 0)}
|
|
6485
|
+
maxlength=${ifDefined4(!isNumber && this.max !== null ? this.max : void 0)}
|
|
6316
6486
|
?disabled=${this.disabled}
|
|
6317
6487
|
?required=${this.required}
|
|
6318
6488
|
?readonly=${this.readonly}
|
|
@@ -6432,7 +6602,7 @@ var avatarStyles = css23`
|
|
|
6432
6602
|
}
|
|
6433
6603
|
|
|
6434
6604
|
.initials {
|
|
6435
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
6605
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
6436
6606
|
font-weight: 600;
|
|
6437
6607
|
letter-spacing: 0.02em;
|
|
6438
6608
|
line-height: 1;
|
|
@@ -6595,7 +6765,7 @@ import { css as css24 } from "lit";
|
|
|
6595
6765
|
var badgeStyles = css24`
|
|
6596
6766
|
:host {
|
|
6597
6767
|
display: inline-flex;
|
|
6598
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
6768
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
6599
6769
|
vertical-align: middle;
|
|
6600
6770
|
}
|
|
6601
6771
|
|
|
@@ -6603,7 +6773,11 @@ var badgeStyles = css24`
|
|
|
6603
6773
|
align-items: center;
|
|
6604
6774
|
background: var(--lt-badge-bg);
|
|
6605
6775
|
border-radius: 999px;
|
|
6606
|
-
|
|
6776
|
+
/* Badges are even smaller than chips (as short as 18px at size="sm") — a
|
|
6777
|
+
"thick" (4px) themed border reads as compressed, so cap what the badge
|
|
6778
|
+
actually renders at "medium" (2px) regardless of the theme's configured
|
|
6779
|
+
border width. */
|
|
6780
|
+
border: min(var(--lt-border-width, 1px), 2px) solid var(--lt-badge-border-color, transparent);
|
|
6607
6781
|
color: var(--lt-badge-color);
|
|
6608
6782
|
box-sizing: border-box;
|
|
6609
6783
|
display: inline-flex;
|
|
@@ -7029,7 +7203,7 @@ var snackbarStyles = css26`
|
|
|
7029
7203
|
align-items: center;
|
|
7030
7204
|
color: var(--lt-text-inverse);
|
|
7031
7205
|
display: flex;
|
|
7032
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
7206
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
7033
7207
|
font-size: 0.875rem;
|
|
7034
7208
|
gap: var(--lt-spacing-2);
|
|
7035
7209
|
line-height: 1.4;
|
|
@@ -7228,7 +7402,7 @@ import { css as css27 } from "lit";
|
|
|
7228
7402
|
var alertStyles = css27`
|
|
7229
7403
|
:host {
|
|
7230
7404
|
display: block;
|
|
7231
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
7405
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
7232
7406
|
opacity: 1;
|
|
7233
7407
|
transform: translateY(0);
|
|
7234
7408
|
transition:
|
|
@@ -7298,14 +7472,14 @@ var alertStyles = css27`
|
|
|
7298
7472
|
:host([appearance='filled']) .inner,
|
|
7299
7473
|
:host(:not([appearance])) .inner {
|
|
7300
7474
|
background: var(--_bg-subtle);
|
|
7301
|
-
border: 1px solid var(--_border);
|
|
7475
|
+
border: var(--lt-border-width, 1px) solid var(--_border);
|
|
7302
7476
|
color: var(--_color);
|
|
7303
7477
|
}
|
|
7304
7478
|
|
|
7305
7479
|
/* outlined — white bg + colored border */
|
|
7306
7480
|
:host([appearance='outlined']) .inner {
|
|
7307
7481
|
background: var(--lt-bg-default);
|
|
7308
|
-
border: 1px solid var(--_border);
|
|
7482
|
+
border: var(--lt-border-width, 1px) solid var(--_border);
|
|
7309
7483
|
color: var(--_color);
|
|
7310
7484
|
}
|
|
7311
7485
|
|
|
@@ -7451,7 +7625,7 @@ import { css as css28 } from "lit";
|
|
|
7451
7625
|
var sliderStyles = css28`
|
|
7452
7626
|
:host {
|
|
7453
7627
|
display: block;
|
|
7454
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
7628
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
7455
7629
|
width: 100%;
|
|
7456
7630
|
}
|
|
7457
7631
|
|
|
@@ -7722,7 +7896,7 @@ var dropdownStyles = [
|
|
|
7722
7896
|
css29`
|
|
7723
7897
|
:host {
|
|
7724
7898
|
display: inline-block;
|
|
7725
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
7899
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
7726
7900
|
}
|
|
7727
7901
|
|
|
7728
7902
|
.trigger-wrap {
|
|
@@ -7760,7 +7934,7 @@ var dropdownItemStyles = css30`
|
|
|
7760
7934
|
color: var(--lt-text-default);
|
|
7761
7935
|
cursor: pointer;
|
|
7762
7936
|
display: flex;
|
|
7763
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
7937
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
7764
7938
|
font-size: 0.875rem;
|
|
7765
7939
|
gap: var(--lt-spacing-2);
|
|
7766
7940
|
padding: var(--lt-spacing-2) var(--lt-spacing-4);
|
|
@@ -8165,7 +8339,7 @@ var navItemStyles = css32`
|
|
|
8165
8339
|
min-width: 160px;
|
|
8166
8340
|
background: var(--lt-bg-default);
|
|
8167
8341
|
color: var(--lt-color-neutral-700);
|
|
8168
|
-
border: 1px solid var(--lt-color-neutral-200);
|
|
8342
|
+
border: var(--lt-border-width, 1px) solid var(--lt-color-neutral-200);
|
|
8169
8343
|
border-radius: 8px;
|
|
8170
8344
|
box-shadow:
|
|
8171
8345
|
0 4px 6px -1px rgb(0 0 0 / 0.08),
|
|
@@ -8232,13 +8406,15 @@ var NavItem = class extends ThemeableElement {
|
|
|
8232
8406
|
}
|
|
8233
8407
|
_handleTriggerClick(e) {
|
|
8234
8408
|
if (this.disabled) return;
|
|
8235
|
-
this.dispatchEvent(
|
|
8409
|
+
const proceed = this.dispatchEvent(
|
|
8236
8410
|
new CustomEvent("nav-item-click", {
|
|
8237
8411
|
detail: { href: this.href, label: this.label },
|
|
8238
8412
|
bubbles: true,
|
|
8239
|
-
composed: true
|
|
8413
|
+
composed: true,
|
|
8414
|
+
cancelable: true
|
|
8240
8415
|
})
|
|
8241
8416
|
);
|
|
8417
|
+
if (!proceed) e.preventDefault();
|
|
8242
8418
|
if (this._hasChildren) {
|
|
8243
8419
|
e.preventDefault();
|
|
8244
8420
|
this.open = !this.open;
|
|
@@ -8258,10 +8434,22 @@ var NavItem = class extends ThemeableElement {
|
|
|
8258
8434
|
<span class="label">${this.label}</span>
|
|
8259
8435
|
${showChevron ? html30`<lt-icon class="chevron" name="caret-down" size="sm"></lt-icon>` : nothing6}
|
|
8260
8436
|
`;
|
|
8437
|
+
const ariaCurrent = this.active ? "page" : nothing6;
|
|
8261
8438
|
if (this.href && !this._hasChildren) {
|
|
8262
|
-
return html30`<a
|
|
8263
|
-
|
|
8264
|
-
|
|
8439
|
+
return html30`<a
|
|
8440
|
+
class="item-trigger"
|
|
8441
|
+
href=${this.href}
|
|
8442
|
+
aria-current=${ariaCurrent}
|
|
8443
|
+
@click=${this._handleTriggerClick}
|
|
8444
|
+
>${inner}</a
|
|
8445
|
+
>`;
|
|
8446
|
+
}
|
|
8447
|
+
return html30`<button
|
|
8448
|
+
class="item-trigger"
|
|
8449
|
+
aria-current=${ariaCurrent}
|
|
8450
|
+
@click=${this._handleTriggerClick}
|
|
8451
|
+
?disabled=${this.disabled}
|
|
8452
|
+
>
|
|
8265
8453
|
${inner}
|
|
8266
8454
|
</button>`;
|
|
8267
8455
|
}
|
|
@@ -8442,7 +8630,7 @@ var breadcrumbItemStyles = css34`
|
|
|
8442
8630
|
:host {
|
|
8443
8631
|
align-items: center;
|
|
8444
8632
|
display: inline-flex;
|
|
8445
|
-
font-family: var(--lt-typography-
|
|
8633
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
8446
8634
|
font-size: 0.875rem;
|
|
8447
8635
|
}
|
|
8448
8636
|
|
|
@@ -8602,7 +8790,7 @@ var dividerStyles = css35`
|
|
|
8602
8790
|
|
|
8603
8791
|
[part='label'] {
|
|
8604
8792
|
color: var(--lt-text-subtle);
|
|
8605
|
-
font-family: var(--lt-typography-
|
|
8793
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
8606
8794
|
font-size: 0.75rem;
|
|
8607
8795
|
font-weight: 600;
|
|
8608
8796
|
padding-inline: var(--lt-spacing-3);
|
|
@@ -9120,7 +9308,8 @@ SidePanel = __decorateClass([
|
|
|
9120
9308
|
|
|
9121
9309
|
// src/components/image/image.ts
|
|
9122
9310
|
import { html as html38 } from "lit";
|
|
9123
|
-
import { customElement as customElement38, property as property39 } from "lit/decorators.js";
|
|
9311
|
+
import { customElement as customElement38, property as property39, state as state5 } from "lit/decorators.js";
|
|
9312
|
+
import { ifDefined as ifDefined5 } from "lit/directives/if-defined.js";
|
|
9124
9313
|
|
|
9125
9314
|
// src/components/image/image.styles.ts
|
|
9126
9315
|
import { css as css39 } from "lit";
|
|
@@ -9157,15 +9346,47 @@ var Image = class extends ThemeableElement {
|
|
|
9157
9346
|
this.alt = "";
|
|
9158
9347
|
this.rounded = null;
|
|
9159
9348
|
this.responsive = false;
|
|
9349
|
+
this.loading = "";
|
|
9350
|
+
this._errored = false;
|
|
9160
9351
|
}
|
|
9161
9352
|
get _borderRadius() {
|
|
9162
9353
|
if (this.rounded === null) return void 0;
|
|
9163
9354
|
return this.rounded || "var(--lt-border-radius)";
|
|
9164
9355
|
}
|
|
9356
|
+
willUpdate(changed) {
|
|
9357
|
+
if (changed.has("src")) this._errored = false;
|
|
9358
|
+
}
|
|
9359
|
+
_dispatch(name) {
|
|
9360
|
+
this.dispatchEvent(
|
|
9361
|
+
new CustomEvent(name, {
|
|
9362
|
+
detail: { src: this.src },
|
|
9363
|
+
bubbles: true,
|
|
9364
|
+
composed: true
|
|
9365
|
+
})
|
|
9366
|
+
);
|
|
9367
|
+
}
|
|
9368
|
+
_handleLoad() {
|
|
9369
|
+
this._dispatch("lt-load");
|
|
9370
|
+
}
|
|
9371
|
+
_handleError() {
|
|
9372
|
+
this._errored = true;
|
|
9373
|
+
this._dispatch("lt-error");
|
|
9374
|
+
}
|
|
9165
9375
|
render() {
|
|
9376
|
+
if (this._errored) {
|
|
9377
|
+
return html38`<slot name="fallback"></slot>`;
|
|
9378
|
+
}
|
|
9166
9379
|
const radius = this._borderRadius;
|
|
9167
9380
|
return html38`
|
|
9168
|
-
<img
|
|
9381
|
+
<img
|
|
9382
|
+
part="image"
|
|
9383
|
+
src=${this.src}
|
|
9384
|
+
alt=${this.alt}
|
|
9385
|
+
loading=${ifDefined5(this.loading || void 0)}
|
|
9386
|
+
style=${radius ? `border-radius: ${radius}` : ""}
|
|
9387
|
+
@load=${this._handleLoad}
|
|
9388
|
+
@error=${this._handleError}
|
|
9389
|
+
/>
|
|
9169
9390
|
`;
|
|
9170
9391
|
}
|
|
9171
9392
|
};
|
|
@@ -9182,6 +9403,12 @@ __decorateClass([
|
|
|
9182
9403
|
__decorateClass([
|
|
9183
9404
|
property39({ type: Boolean, reflect: true })
|
|
9184
9405
|
], Image.prototype, "responsive", 2);
|
|
9406
|
+
__decorateClass([
|
|
9407
|
+
property39({ reflect: true })
|
|
9408
|
+
], Image.prototype, "loading", 2);
|
|
9409
|
+
__decorateClass([
|
|
9410
|
+
state5()
|
|
9411
|
+
], Image.prototype, "_errored", 2);
|
|
9185
9412
|
Image = __decorateClass([
|
|
9186
9413
|
customElement38("lt-image")
|
|
9187
9414
|
], Image);
|
|
@@ -9195,7 +9422,7 @@ import { css as css40 } from "lit";
|
|
|
9195
9422
|
var paginationStyles = css40`
|
|
9196
9423
|
:host {
|
|
9197
9424
|
display: inline-flex;
|
|
9198
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
9425
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
9199
9426
|
}
|
|
9200
9427
|
|
|
9201
9428
|
nav {
|
|
@@ -9365,7 +9592,7 @@ import { css as css41 } from "lit";
|
|
|
9365
9592
|
var datepickerStyles = css41`
|
|
9366
9593
|
:host {
|
|
9367
9594
|
display: block;
|
|
9368
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
9595
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
9369
9596
|
}
|
|
9370
9597
|
|
|
9371
9598
|
.wrapper {
|
|
@@ -9388,7 +9615,7 @@ var datepickerStyles = css41`
|
|
|
9388
9615
|
input {
|
|
9389
9616
|
background: var(--lt-bg-surface);
|
|
9390
9617
|
border-radius: var(--lt-border-radius);
|
|
9391
|
-
border: 1px solid var(--lt-border-default);
|
|
9618
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
9392
9619
|
color: var(--lt-text-default);
|
|
9393
9620
|
font-family: inherit;
|
|
9394
9621
|
font-size: 0.9375rem;
|
|
@@ -9582,12 +9809,12 @@ Datepicker = __decorateClass([
|
|
|
9582
9809
|
|
|
9583
9810
|
// src/components/date-input/date-input.ts
|
|
9584
9811
|
import { html as html42, nothing as nothing12 } from "lit";
|
|
9585
|
-
import { customElement as customElement42, property as property43, state as
|
|
9812
|
+
import { customElement as customElement42, property as property43, state as state7 } from "lit/decorators.js";
|
|
9586
9813
|
import "@latty-ds/icons";
|
|
9587
9814
|
|
|
9588
9815
|
// src/components/calendar/calendar.ts
|
|
9589
9816
|
import { html as html41 } from "lit";
|
|
9590
|
-
import { customElement as customElement41, property as property42, state as
|
|
9817
|
+
import { customElement as customElement41, property as property42, state as state6 } from "lit/decorators.js";
|
|
9591
9818
|
import "@latty-ds/icons";
|
|
9592
9819
|
|
|
9593
9820
|
// src/components/calendar/calendar.styles.ts
|
|
@@ -9595,13 +9822,13 @@ import { css as css42 } from "lit";
|
|
|
9595
9822
|
var calendarStyles = css42`
|
|
9596
9823
|
:host {
|
|
9597
9824
|
display: inline-block;
|
|
9598
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
9825
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
9599
9826
|
}
|
|
9600
9827
|
|
|
9601
9828
|
.calendar {
|
|
9602
9829
|
background: var(--lt-bg-default);
|
|
9603
9830
|
border-radius: var(--lt-border-radius);
|
|
9604
|
-
border: 1px solid var(--lt-border-default);
|
|
9831
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
9605
9832
|
display: flex;
|
|
9606
9833
|
flex-direction: column;
|
|
9607
9834
|
gap: var(--lt-spacing-2);
|
|
@@ -9944,7 +10171,7 @@ var calendarStyles = css42`
|
|
|
9944
10171
|
.today-btn {
|
|
9945
10172
|
background: transparent;
|
|
9946
10173
|
border-radius: var(--lt-border-radius);
|
|
9947
|
-
border: 1px solid var(--lt-border-default);
|
|
10174
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
9948
10175
|
color: var(--lt-text-subtle);
|
|
9949
10176
|
cursor: pointer;
|
|
9950
10177
|
font-family: inherit;
|
|
@@ -10482,22 +10709,22 @@ __decorateClass([
|
|
|
10482
10709
|
property42({ type: Number, reflect: true })
|
|
10483
10710
|
], Calendar.prototype, "months", 2);
|
|
10484
10711
|
__decorateClass([
|
|
10485
|
-
|
|
10712
|
+
state6()
|
|
10486
10713
|
], Calendar.prototype, "_viewYear", 2);
|
|
10487
10714
|
__decorateClass([
|
|
10488
|
-
|
|
10715
|
+
state6()
|
|
10489
10716
|
], Calendar.prototype, "_viewMonth", 2);
|
|
10490
10717
|
__decorateClass([
|
|
10491
|
-
|
|
10718
|
+
state6()
|
|
10492
10719
|
], Calendar.prototype, "_focusedDate", 2);
|
|
10493
10720
|
__decorateClass([
|
|
10494
|
-
|
|
10721
|
+
state6()
|
|
10495
10722
|
], Calendar.prototype, "_hoverDate", 2);
|
|
10496
10723
|
__decorateClass([
|
|
10497
|
-
|
|
10724
|
+
state6()
|
|
10498
10725
|
], Calendar.prototype, "_pickingMonthYear", 2);
|
|
10499
10726
|
__decorateClass([
|
|
10500
|
-
|
|
10727
|
+
state6()
|
|
10501
10728
|
], Calendar.prototype, "_pickerYear", 2);
|
|
10502
10729
|
Calendar = __decorateClass([
|
|
10503
10730
|
customElement41("lt-calendar")
|
|
@@ -10510,7 +10737,7 @@ var dateInputStyles = [
|
|
|
10510
10737
|
css43`
|
|
10511
10738
|
:host {
|
|
10512
10739
|
display: block;
|
|
10513
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
10740
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
10514
10741
|
}
|
|
10515
10742
|
|
|
10516
10743
|
.wrapper {
|
|
@@ -10539,7 +10766,7 @@ var dateInputStyles = [
|
|
|
10539
10766
|
align-items: center;
|
|
10540
10767
|
background: var(--lt-bg-surface);
|
|
10541
10768
|
border-radius: var(--lt-border-radius);
|
|
10542
|
-
border: 1px solid var(--lt-border-default);
|
|
10769
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
10543
10770
|
color: var(--lt-text-default);
|
|
10544
10771
|
cursor: pointer;
|
|
10545
10772
|
display: flex;
|
|
@@ -10848,7 +11075,7 @@ __decorateClass([
|
|
|
10848
11075
|
property43({ reflect: true })
|
|
10849
11076
|
], DateInput.prototype, "name", 2);
|
|
10850
11077
|
__decorateClass([
|
|
10851
|
-
|
|
11078
|
+
state7()
|
|
10852
11079
|
], DateInput.prototype, "_open", 2);
|
|
10853
11080
|
DateInput = __decorateClass([
|
|
10854
11081
|
customElement42("lt-date-input")
|
|
@@ -10856,7 +11083,7 @@ DateInput = __decorateClass([
|
|
|
10856
11083
|
|
|
10857
11084
|
// src/components/combobox/combobox.ts
|
|
10858
11085
|
import { html as html43, nothing as nothing13 } from "lit";
|
|
10859
|
-
import { customElement as customElement43, property as property44, state as
|
|
11086
|
+
import { customElement as customElement43, property as property44, state as state8 } from "lit/decorators.js";
|
|
10860
11087
|
|
|
10861
11088
|
// src/components/combobox/combobox.styles.ts
|
|
10862
11089
|
import { css as css44 } from "lit";
|
|
@@ -10865,7 +11092,7 @@ var comboboxStyles = [
|
|
|
10865
11092
|
css44`
|
|
10866
11093
|
:host {
|
|
10867
11094
|
display: block;
|
|
10868
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
11095
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
10869
11096
|
position: relative;
|
|
10870
11097
|
}
|
|
10871
11098
|
|
|
@@ -10888,7 +11115,7 @@ var comboboxStyles = [
|
|
|
10888
11115
|
align-items: center;
|
|
10889
11116
|
background: var(--lt-bg-surface);
|
|
10890
11117
|
border-radius: var(--lt-border-radius);
|
|
10891
|
-
border: 1px solid var(--lt-border-default);
|
|
11118
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
10892
11119
|
cursor: text;
|
|
10893
11120
|
display: flex;
|
|
10894
11121
|
gap: var(--lt-spacing-2);
|
|
@@ -10983,7 +11210,7 @@ var comboboxStyles = [
|
|
|
10983
11210
|
.dropdown {
|
|
10984
11211
|
background: var(--lt-bg-surface);
|
|
10985
11212
|
border-radius: var(--lt-border-radius);
|
|
10986
|
-
border: 1px solid var(--lt-border-default);
|
|
11213
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
10987
11214
|
box-shadow: var(--lt-shadow-md);
|
|
10988
11215
|
max-height: 240px;
|
|
10989
11216
|
overflow-y: auto;
|
|
@@ -11238,13 +11465,13 @@ __decorateClass([
|
|
|
11238
11465
|
property44({ reflect: true })
|
|
11239
11466
|
], Combobox.prototype, "name", 2);
|
|
11240
11467
|
__decorateClass([
|
|
11241
|
-
|
|
11468
|
+
state8()
|
|
11242
11469
|
], Combobox.prototype, "query", 2);
|
|
11243
11470
|
__decorateClass([
|
|
11244
|
-
|
|
11471
|
+
state8()
|
|
11245
11472
|
], Combobox.prototype, "open", 2);
|
|
11246
11473
|
__decorateClass([
|
|
11247
|
-
|
|
11474
|
+
state8()
|
|
11248
11475
|
], Combobox.prototype, "activeIndex", 2);
|
|
11249
11476
|
Combobox = __decorateClass([
|
|
11250
11477
|
customElement43("lt-combobox")
|
|
@@ -11252,6 +11479,7 @@ Combobox = __decorateClass([
|
|
|
11252
11479
|
|
|
11253
11480
|
// src/components/color-input/color-input.ts
|
|
11254
11481
|
import { html as html44 } from "lit";
|
|
11482
|
+
import { ifDefined as ifDefined6 } from "lit/directives/if-defined.js";
|
|
11255
11483
|
import { customElement as customElement44, property as property45 } from "lit/decorators.js";
|
|
11256
11484
|
|
|
11257
11485
|
// src/components/color-input/color-input.styles.ts
|
|
@@ -11259,7 +11487,7 @@ import { css as css45 } from "lit";
|
|
|
11259
11487
|
var colorInputStyles = css45`
|
|
11260
11488
|
:host {
|
|
11261
11489
|
display: inline-block;
|
|
11262
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
11490
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
11263
11491
|
width: 100%;
|
|
11264
11492
|
}
|
|
11265
11493
|
|
|
@@ -11284,7 +11512,7 @@ var colorInputStyles = css45`
|
|
|
11284
11512
|
display: flex;
|
|
11285
11513
|
align-items: center;
|
|
11286
11514
|
background: var(--lt-bg-subtle);
|
|
11287
|
-
border: 1px solid var(--lt-border-default);
|
|
11515
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
11288
11516
|
border-radius: var(--lt-border-radius);
|
|
11289
11517
|
box-sizing: border-box;
|
|
11290
11518
|
transition:
|
|
@@ -11496,6 +11724,7 @@ var ColorInput = class extends ThemeableElement {
|
|
|
11496
11724
|
return this._internals.reportValidity();
|
|
11497
11725
|
}
|
|
11498
11726
|
_handleChange(e) {
|
|
11727
|
+
e.stopPropagation();
|
|
11499
11728
|
const pickerHex = e.target.value;
|
|
11500
11729
|
this.value = formatColor(pickerHex, this.format);
|
|
11501
11730
|
this.dispatchEvent(
|
|
@@ -11519,6 +11748,7 @@ var ColorInput = class extends ThemeableElement {
|
|
|
11519
11748
|
type="color"
|
|
11520
11749
|
class="native-picker"
|
|
11521
11750
|
.value=${hex || "#000000"}
|
|
11751
|
+
name=${ifDefined6(this.name || void 0)}
|
|
11522
11752
|
?disabled=${this.disabled}
|
|
11523
11753
|
aria-label=${this.label || this.placeholder}
|
|
11524
11754
|
@change=${this._handleChange}
|