@latty-ds/web 0.6.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 +1226 -995
- 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 +94 -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 +302 -67
- package/dist/index.js +344 -106
- package/dist/manifest.json +126 -84
- 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";
|
|
@@ -2280,11 +2366,60 @@ var listItemStyles = css12`
|
|
|
2280
2366
|
gap: var(--lt-spacing-2);
|
|
2281
2367
|
}
|
|
2282
2368
|
|
|
2369
|
+
/* Keep the slotted content as a single flex item so rich inline markup
|
|
2370
|
+
(strong, code, multiple text runs) flows as normal prose instead of each
|
|
2371
|
+
node becoming its own shrunk flex item. min-width: 0 lets it wrap. */
|
|
2372
|
+
.content {
|
|
2373
|
+
flex: 1 1 auto;
|
|
2374
|
+
min-width: 0;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2283
2377
|
lt-icon {
|
|
2284
2378
|
flex-shrink: 0;
|
|
2285
2379
|
color: var(--lt-color-neutral-500);
|
|
2286
2380
|
font-size: inherit;
|
|
2287
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
|
+
}
|
|
2288
2423
|
`;
|
|
2289
2424
|
|
|
2290
2425
|
// src/components/list/list-item.ts
|
|
@@ -2294,19 +2429,41 @@ var ListItem = class extends ThemeableElement {
|
|
|
2294
2429
|
super(...arguments);
|
|
2295
2430
|
this.iconStart = "";
|
|
2296
2431
|
this.iconEnd = "";
|
|
2432
|
+
this.clickable = false;
|
|
2433
|
+
this.href = "";
|
|
2434
|
+
this.target = "";
|
|
2435
|
+
this.rel = "";
|
|
2436
|
+
this.disabled = false;
|
|
2297
2437
|
}
|
|
2298
2438
|
connectedCallback() {
|
|
2299
2439
|
super.connectedCallback();
|
|
2300
2440
|
if (!this.hasAttribute("role")) this.setAttribute("role", "listitem");
|
|
2301
2441
|
}
|
|
2302
2442
|
render() {
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
${this.iconEnd ? html10`<lt-icon class="icon-end" name=${this.iconEnd}></lt-icon>` : nothing3}
|
|
2308
|
-
</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}
|
|
2309
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>`;
|
|
2310
2467
|
}
|
|
2311
2468
|
};
|
|
2312
2469
|
ListItem.styles = listItemStyles;
|
|
@@ -2316,6 +2473,21 @@ __decorateClass([
|
|
|
2316
2473
|
__decorateClass([
|
|
2317
2474
|
property11({ attribute: "icon-end" })
|
|
2318
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);
|
|
2319
2491
|
ListItem = __decorateClass([
|
|
2320
2492
|
customElement10("lt-list-item")
|
|
2321
2493
|
], ListItem);
|
|
@@ -2369,7 +2541,7 @@ import { css as css13 } from "lit";
|
|
|
2369
2541
|
var radioStyles = css13`
|
|
2370
2542
|
:host {
|
|
2371
2543
|
display: inline-block;
|
|
2372
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
2544
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
2373
2545
|
}
|
|
2374
2546
|
|
|
2375
2547
|
.radio-wrapper {
|
|
@@ -2573,6 +2745,7 @@ var Radio = class extends ThemeableElement {
|
|
|
2573
2745
|
* @private
|
|
2574
2746
|
*/
|
|
2575
2747
|
handleChange(e) {
|
|
2748
|
+
e.stopPropagation();
|
|
2576
2749
|
const target = e.target;
|
|
2577
2750
|
this.checked = target.checked;
|
|
2578
2751
|
this.dispatchEvent(
|
|
@@ -2646,7 +2819,7 @@ import { css as css14 } from "lit";
|
|
|
2646
2819
|
var radioGroupStyles = css14`
|
|
2647
2820
|
:host {
|
|
2648
2821
|
display: block;
|
|
2649
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
2822
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
2650
2823
|
}
|
|
2651
2824
|
|
|
2652
2825
|
.radio-group {
|
|
@@ -3003,7 +3176,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
3003
3176
|
}
|
|
3004
3177
|
return coords;
|
|
3005
3178
|
}
|
|
3006
|
-
async function detectOverflow(
|
|
3179
|
+
async function detectOverflow(state9, options) {
|
|
3007
3180
|
var _await$platform$isEle;
|
|
3008
3181
|
if (options === void 0) {
|
|
3009
3182
|
options = {};
|
|
@@ -3015,14 +3188,14 @@ async function detectOverflow(state8, options) {
|
|
|
3015
3188
|
rects,
|
|
3016
3189
|
elements,
|
|
3017
3190
|
strategy
|
|
3018
|
-
} =
|
|
3191
|
+
} = state9;
|
|
3019
3192
|
const {
|
|
3020
3193
|
boundary = "clippingAncestors",
|
|
3021
3194
|
rootBoundary = "viewport",
|
|
3022
3195
|
elementContext = "floating",
|
|
3023
3196
|
altBoundary = false,
|
|
3024
3197
|
padding = 0
|
|
3025
|
-
} = evaluate(options,
|
|
3198
|
+
} = evaluate(options, state9);
|
|
3026
3199
|
const paddingObject = getPaddingObject(padding);
|
|
3027
3200
|
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
3028
3201
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
@@ -3154,7 +3327,7 @@ var flip = function(options) {
|
|
|
3154
3327
|
return {
|
|
3155
3328
|
name: "flip",
|
|
3156
3329
|
options,
|
|
3157
|
-
async fn(
|
|
3330
|
+
async fn(state9) {
|
|
3158
3331
|
var _middlewareData$arrow, _middlewareData$flip;
|
|
3159
3332
|
const {
|
|
3160
3333
|
placement,
|
|
@@ -3163,7 +3336,7 @@ var flip = function(options) {
|
|
|
3163
3336
|
initialPlacement,
|
|
3164
3337
|
platform: platform2,
|
|
3165
3338
|
elements
|
|
3166
|
-
} =
|
|
3339
|
+
} = state9;
|
|
3167
3340
|
const {
|
|
3168
3341
|
mainAxis: checkMainAxis = true,
|
|
3169
3342
|
crossAxis: checkCrossAxis = true,
|
|
@@ -3172,7 +3345,7 @@ var flip = function(options) {
|
|
|
3172
3345
|
fallbackAxisSideDirection = "none",
|
|
3173
3346
|
flipAlignment = true,
|
|
3174
3347
|
...detectOverflowOptions
|
|
3175
|
-
} = evaluate(options,
|
|
3348
|
+
} = evaluate(options, state9);
|
|
3176
3349
|
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
3177
3350
|
return {};
|
|
3178
3351
|
}
|
|
@@ -3186,7 +3359,7 @@ var flip = function(options) {
|
|
|
3186
3359
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
3187
3360
|
}
|
|
3188
3361
|
const placements2 = [initialPlacement, ...fallbackPlacements];
|
|
3189
|
-
const overflow = await platform2.detectOverflow(
|
|
3362
|
+
const overflow = await platform2.detectOverflow(state9, detectOverflowOptions);
|
|
3190
3363
|
const overflows = [];
|
|
3191
3364
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
3192
3365
|
if (checkMainAxis) {
|
|
@@ -3257,19 +3430,19 @@ var flip = function(options) {
|
|
|
3257
3430
|
};
|
|
3258
3431
|
};
|
|
3259
3432
|
var originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
3260
|
-
async function convertValueToCoords(
|
|
3433
|
+
async function convertValueToCoords(state9, options) {
|
|
3261
3434
|
const {
|
|
3262
3435
|
placement,
|
|
3263
3436
|
platform: platform2,
|
|
3264
3437
|
elements
|
|
3265
|
-
} =
|
|
3438
|
+
} = state9;
|
|
3266
3439
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
3267
3440
|
const side = getSide(placement);
|
|
3268
3441
|
const alignment = getAlignment(placement);
|
|
3269
3442
|
const isVertical = getSideAxis(placement) === "y";
|
|
3270
3443
|
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
3271
3444
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
3272
|
-
const rawValue = evaluate(options,
|
|
3445
|
+
const rawValue = evaluate(options, state9);
|
|
3273
3446
|
let {
|
|
3274
3447
|
mainAxis,
|
|
3275
3448
|
crossAxis,
|
|
@@ -3301,15 +3474,15 @@ var offset = function(options) {
|
|
|
3301
3474
|
return {
|
|
3302
3475
|
name: "offset",
|
|
3303
3476
|
options,
|
|
3304
|
-
async fn(
|
|
3477
|
+
async fn(state9) {
|
|
3305
3478
|
var _middlewareData$offse, _middlewareData$arrow;
|
|
3306
3479
|
const {
|
|
3307
3480
|
x,
|
|
3308
3481
|
y,
|
|
3309
3482
|
placement,
|
|
3310
3483
|
middlewareData
|
|
3311
|
-
} =
|
|
3312
|
-
const diffCoords = await convertValueToCoords(
|
|
3484
|
+
} = state9;
|
|
3485
|
+
const diffCoords = await convertValueToCoords(state9, options);
|
|
3313
3486
|
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
3314
3487
|
return {};
|
|
3315
3488
|
}
|
|
@@ -3331,13 +3504,13 @@ var shift = function(options) {
|
|
|
3331
3504
|
return {
|
|
3332
3505
|
name: "shift",
|
|
3333
3506
|
options,
|
|
3334
|
-
async fn(
|
|
3507
|
+
async fn(state9) {
|
|
3335
3508
|
const {
|
|
3336
3509
|
x,
|
|
3337
3510
|
y,
|
|
3338
3511
|
placement,
|
|
3339
3512
|
platform: platform2
|
|
3340
|
-
} =
|
|
3513
|
+
} = state9;
|
|
3341
3514
|
const {
|
|
3342
3515
|
mainAxis: checkMainAxis = true,
|
|
3343
3516
|
crossAxis: checkCrossAxis = false,
|
|
@@ -3354,12 +3527,12 @@ var shift = function(options) {
|
|
|
3354
3527
|
}
|
|
3355
3528
|
},
|
|
3356
3529
|
...detectOverflowOptions
|
|
3357
|
-
} = evaluate(options,
|
|
3530
|
+
} = evaluate(options, state9);
|
|
3358
3531
|
const coords = {
|
|
3359
3532
|
x,
|
|
3360
3533
|
y
|
|
3361
3534
|
};
|
|
3362
|
-
const overflow = await platform2.detectOverflow(
|
|
3535
|
+
const overflow = await platform2.detectOverflow(state9, detectOverflowOptions);
|
|
3363
3536
|
const crossAxis = getSideAxis(getSide(placement));
|
|
3364
3537
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
3365
3538
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -3379,7 +3552,7 @@ var shift = function(options) {
|
|
|
3379
3552
|
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
3380
3553
|
}
|
|
3381
3554
|
const limitedCoords = limiter.fn({
|
|
3382
|
-
...
|
|
3555
|
+
...state9,
|
|
3383
3556
|
[mainAxis]: mainAxisCoord,
|
|
3384
3557
|
[crossAxis]: crossAxisCoord
|
|
3385
3558
|
});
|
|
@@ -4211,7 +4384,7 @@ var selectStyles = [
|
|
|
4211
4384
|
css16`
|
|
4212
4385
|
:host {
|
|
4213
4386
|
display: inline-block;
|
|
4214
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
4387
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
4215
4388
|
position: relative;
|
|
4216
4389
|
width: 100%;
|
|
4217
4390
|
}
|
|
@@ -4240,7 +4413,7 @@ var selectStyles = [
|
|
|
4240
4413
|
align-items: center;
|
|
4241
4414
|
background: var(--lt-bg-subtle);
|
|
4242
4415
|
border-radius: var(--lt-border-radius);
|
|
4243
|
-
border: 1px solid var(--lt-border-default);
|
|
4416
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
4244
4417
|
box-sizing: border-box;
|
|
4245
4418
|
cursor: pointer;
|
|
4246
4419
|
display: flex;
|
|
@@ -4648,7 +4821,7 @@ import { css as css17 } from "lit";
|
|
|
4648
4821
|
var switchStyles = css17`
|
|
4649
4822
|
:host {
|
|
4650
4823
|
display: inline-block;
|
|
4651
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
4824
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
4652
4825
|
}
|
|
4653
4826
|
|
|
4654
4827
|
.switch-wrapper {
|
|
@@ -4849,6 +5022,7 @@ var Switch = class extends ThemeableElement {
|
|
|
4849
5022
|
return this._internals.reportValidity();
|
|
4850
5023
|
}
|
|
4851
5024
|
handleChange(e) {
|
|
5025
|
+
e.stopPropagation();
|
|
4852
5026
|
const target = e.target;
|
|
4853
5027
|
this.checked = target.checked;
|
|
4854
5028
|
this.dispatchEvent(
|
|
@@ -4924,7 +5098,7 @@ import { css as css18 } from "lit";
|
|
|
4924
5098
|
var tabStyles = css18`
|
|
4925
5099
|
:host {
|
|
4926
5100
|
display: inline-block;
|
|
4927
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
5101
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
4928
5102
|
}
|
|
4929
5103
|
|
|
4930
5104
|
.tab {
|
|
@@ -5138,7 +5312,7 @@ import { css as css20 } from "lit";
|
|
|
5138
5312
|
var tabGroupStyles = css20`
|
|
5139
5313
|
:host {
|
|
5140
5314
|
display: block;
|
|
5141
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
5315
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
5142
5316
|
}
|
|
5143
5317
|
|
|
5144
5318
|
.tab-group {
|
|
@@ -5331,7 +5505,7 @@ import { css as css21 } from "lit";
|
|
|
5331
5505
|
var tableStyles = css21`
|
|
5332
5506
|
:host {
|
|
5333
5507
|
display: block;
|
|
5334
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
5508
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
5335
5509
|
overflow: hidden;
|
|
5336
5510
|
width: 100%;
|
|
5337
5511
|
}
|
|
@@ -5492,7 +5666,7 @@ var tableStyles = css21`
|
|
|
5492
5666
|
|
|
5493
5667
|
/* Border styling */
|
|
5494
5668
|
:host([bordered]) table {
|
|
5495
|
-
border: 1px solid var(--lt-border-default);
|
|
5669
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
5496
5670
|
}
|
|
5497
5671
|
|
|
5498
5672
|
:host([bordered]) th,
|
|
@@ -5548,7 +5722,7 @@ var tableStyles = css21`
|
|
|
5548
5722
|
:host([responsive-mode='stack']) tr {
|
|
5549
5723
|
background: var(--lt-bg-subtle);
|
|
5550
5724
|
border-radius: var(--lt-border-radius);
|
|
5551
|
-
border: 1px solid var(--lt-border-default);
|
|
5725
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
5552
5726
|
margin-bottom: var(--lt-spacing-3);
|
|
5553
5727
|
padding: var(--lt-spacing-4);
|
|
5554
5728
|
}
|
|
@@ -5866,7 +6040,7 @@ Table = __decorateClass([
|
|
|
5866
6040
|
|
|
5867
6041
|
// src/components/textfield/textfield.ts
|
|
5868
6042
|
import { html as html20 } from "lit";
|
|
5869
|
-
import { ifDefined as
|
|
6043
|
+
import { ifDefined as ifDefined4 } from "lit/directives/if-defined.js";
|
|
5870
6044
|
import { customElement as customElement20, property as property21, state as state3 } from "lit/decorators.js";
|
|
5871
6045
|
|
|
5872
6046
|
// src/components/textfield/textfield.styles.ts
|
|
@@ -5874,7 +6048,7 @@ import { css as css22 } from "lit";
|
|
|
5874
6048
|
var textfieldStyles = css22`
|
|
5875
6049
|
:host {
|
|
5876
6050
|
display: inline-block;
|
|
5877
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
6051
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
5878
6052
|
width: 100%;
|
|
5879
6053
|
}
|
|
5880
6054
|
|
|
@@ -5944,7 +6118,7 @@ var textfieldStyles = css22`
|
|
|
5944
6118
|
textarea {
|
|
5945
6119
|
background: var(--lt-bg-subtle);
|
|
5946
6120
|
border-radius: var(--lt-border-radius);
|
|
5947
|
-
border: 1px solid var(--lt-border-default);
|
|
6121
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
5948
6122
|
box-sizing: border-box;
|
|
5949
6123
|
color: var(--lt-text-default);
|
|
5950
6124
|
font-family: inherit;
|
|
@@ -6176,6 +6350,7 @@ var Textfield = class extends ThemeableElement {
|
|
|
6176
6350
|
return true;
|
|
6177
6351
|
}
|
|
6178
6352
|
handleInput(e) {
|
|
6353
|
+
e.stopPropagation();
|
|
6179
6354
|
const input = e.target;
|
|
6180
6355
|
this.value = input.value;
|
|
6181
6356
|
if (this._touched) this._autoError = !this._validate();
|
|
@@ -6195,6 +6370,7 @@ var Textfield = class extends ThemeableElement {
|
|
|
6195
6370
|
* @private
|
|
6196
6371
|
*/
|
|
6197
6372
|
handleChange(e) {
|
|
6373
|
+
e.stopPropagation();
|
|
6198
6374
|
const input = e.target;
|
|
6199
6375
|
this.value = input.value;
|
|
6200
6376
|
this.dispatchEvent(
|
|
@@ -6281,10 +6457,11 @@ var Textfield = class extends ThemeableElement {
|
|
|
6281
6457
|
${isMultiline ? html20`
|
|
6282
6458
|
<textarea
|
|
6283
6459
|
.value=${this.value}
|
|
6460
|
+
name=${ifDefined4(this.name || void 0)}
|
|
6284
6461
|
placeholder=${this.placeholder}
|
|
6285
6462
|
rows=${this.rows}
|
|
6286
|
-
minlength=${
|
|
6287
|
-
maxlength=${
|
|
6463
|
+
minlength=${ifDefined4(this.min !== null ? this.min : void 0)}
|
|
6464
|
+
maxlength=${ifDefined4(this.max !== null ? this.max : void 0)}
|
|
6288
6465
|
?disabled=${this.disabled}
|
|
6289
6466
|
?required=${this.required}
|
|
6290
6467
|
?readonly=${this.readonly}
|
|
@@ -6300,11 +6477,12 @@ var Textfield = class extends ThemeableElement {
|
|
|
6300
6477
|
<input
|
|
6301
6478
|
type=${actualInputType}
|
|
6302
6479
|
.value=${this.value}
|
|
6480
|
+
name=${ifDefined4(this.name || void 0)}
|
|
6303
6481
|
placeholder=${this.placeholder}
|
|
6304
|
-
min=${
|
|
6305
|
-
max=${
|
|
6306
|
-
minlength=${
|
|
6307
|
-
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)}
|
|
6308
6486
|
?disabled=${this.disabled}
|
|
6309
6487
|
?required=${this.required}
|
|
6310
6488
|
?readonly=${this.readonly}
|
|
@@ -6424,7 +6602,7 @@ var avatarStyles = css23`
|
|
|
6424
6602
|
}
|
|
6425
6603
|
|
|
6426
6604
|
.initials {
|
|
6427
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
6605
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
6428
6606
|
font-weight: 600;
|
|
6429
6607
|
letter-spacing: 0.02em;
|
|
6430
6608
|
line-height: 1;
|
|
@@ -6587,7 +6765,7 @@ import { css as css24 } from "lit";
|
|
|
6587
6765
|
var badgeStyles = css24`
|
|
6588
6766
|
:host {
|
|
6589
6767
|
display: inline-flex;
|
|
6590
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
6768
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
6591
6769
|
vertical-align: middle;
|
|
6592
6770
|
}
|
|
6593
6771
|
|
|
@@ -6595,7 +6773,11 @@ var badgeStyles = css24`
|
|
|
6595
6773
|
align-items: center;
|
|
6596
6774
|
background: var(--lt-badge-bg);
|
|
6597
6775
|
border-radius: 999px;
|
|
6598
|
-
|
|
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);
|
|
6599
6781
|
color: var(--lt-badge-color);
|
|
6600
6782
|
box-sizing: border-box;
|
|
6601
6783
|
display: inline-flex;
|
|
@@ -7021,7 +7203,7 @@ var snackbarStyles = css26`
|
|
|
7021
7203
|
align-items: center;
|
|
7022
7204
|
color: var(--lt-text-inverse);
|
|
7023
7205
|
display: flex;
|
|
7024
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
7206
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
7025
7207
|
font-size: 0.875rem;
|
|
7026
7208
|
gap: var(--lt-spacing-2);
|
|
7027
7209
|
line-height: 1.4;
|
|
@@ -7220,7 +7402,7 @@ import { css as css27 } from "lit";
|
|
|
7220
7402
|
var alertStyles = css27`
|
|
7221
7403
|
:host {
|
|
7222
7404
|
display: block;
|
|
7223
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
7405
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
7224
7406
|
opacity: 1;
|
|
7225
7407
|
transform: translateY(0);
|
|
7226
7408
|
transition:
|
|
@@ -7290,14 +7472,14 @@ var alertStyles = css27`
|
|
|
7290
7472
|
:host([appearance='filled']) .inner,
|
|
7291
7473
|
:host(:not([appearance])) .inner {
|
|
7292
7474
|
background: var(--_bg-subtle);
|
|
7293
|
-
border: 1px solid var(--_border);
|
|
7475
|
+
border: var(--lt-border-width, 1px) solid var(--_border);
|
|
7294
7476
|
color: var(--_color);
|
|
7295
7477
|
}
|
|
7296
7478
|
|
|
7297
7479
|
/* outlined — white bg + colored border */
|
|
7298
7480
|
:host([appearance='outlined']) .inner {
|
|
7299
7481
|
background: var(--lt-bg-default);
|
|
7300
|
-
border: 1px solid var(--_border);
|
|
7482
|
+
border: var(--lt-border-width, 1px) solid var(--_border);
|
|
7301
7483
|
color: var(--_color);
|
|
7302
7484
|
}
|
|
7303
7485
|
|
|
@@ -7443,7 +7625,7 @@ import { css as css28 } from "lit";
|
|
|
7443
7625
|
var sliderStyles = css28`
|
|
7444
7626
|
:host {
|
|
7445
7627
|
display: block;
|
|
7446
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
7628
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
7447
7629
|
width: 100%;
|
|
7448
7630
|
}
|
|
7449
7631
|
|
|
@@ -7714,7 +7896,7 @@ var dropdownStyles = [
|
|
|
7714
7896
|
css29`
|
|
7715
7897
|
:host {
|
|
7716
7898
|
display: inline-block;
|
|
7717
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
7899
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
7718
7900
|
}
|
|
7719
7901
|
|
|
7720
7902
|
.trigger-wrap {
|
|
@@ -7752,7 +7934,7 @@ var dropdownItemStyles = css30`
|
|
|
7752
7934
|
color: var(--lt-text-default);
|
|
7753
7935
|
cursor: pointer;
|
|
7754
7936
|
display: flex;
|
|
7755
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
7937
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
7756
7938
|
font-size: 0.875rem;
|
|
7757
7939
|
gap: var(--lt-spacing-2);
|
|
7758
7940
|
padding: var(--lt-spacing-2) var(--lt-spacing-4);
|
|
@@ -8157,7 +8339,7 @@ var navItemStyles = css32`
|
|
|
8157
8339
|
min-width: 160px;
|
|
8158
8340
|
background: var(--lt-bg-default);
|
|
8159
8341
|
color: var(--lt-color-neutral-700);
|
|
8160
|
-
border: 1px solid var(--lt-color-neutral-200);
|
|
8342
|
+
border: var(--lt-border-width, 1px) solid var(--lt-color-neutral-200);
|
|
8161
8343
|
border-radius: 8px;
|
|
8162
8344
|
box-shadow:
|
|
8163
8345
|
0 4px 6px -1px rgb(0 0 0 / 0.08),
|
|
@@ -8224,13 +8406,15 @@ var NavItem = class extends ThemeableElement {
|
|
|
8224
8406
|
}
|
|
8225
8407
|
_handleTriggerClick(e) {
|
|
8226
8408
|
if (this.disabled) return;
|
|
8227
|
-
this.dispatchEvent(
|
|
8409
|
+
const proceed = this.dispatchEvent(
|
|
8228
8410
|
new CustomEvent("nav-item-click", {
|
|
8229
8411
|
detail: { href: this.href, label: this.label },
|
|
8230
8412
|
bubbles: true,
|
|
8231
|
-
composed: true
|
|
8413
|
+
composed: true,
|
|
8414
|
+
cancelable: true
|
|
8232
8415
|
})
|
|
8233
8416
|
);
|
|
8417
|
+
if (!proceed) e.preventDefault();
|
|
8234
8418
|
if (this._hasChildren) {
|
|
8235
8419
|
e.preventDefault();
|
|
8236
8420
|
this.open = !this.open;
|
|
@@ -8250,10 +8434,22 @@ var NavItem = class extends ThemeableElement {
|
|
|
8250
8434
|
<span class="label">${this.label}</span>
|
|
8251
8435
|
${showChevron ? html30`<lt-icon class="chevron" name="caret-down" size="sm"></lt-icon>` : nothing6}
|
|
8252
8436
|
`;
|
|
8437
|
+
const ariaCurrent = this.active ? "page" : nothing6;
|
|
8253
8438
|
if (this.href && !this._hasChildren) {
|
|
8254
|
-
return html30`<a
|
|
8255
|
-
|
|
8256
|
-
|
|
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
|
+
>
|
|
8257
8453
|
${inner}
|
|
8258
8454
|
</button>`;
|
|
8259
8455
|
}
|
|
@@ -8434,7 +8630,7 @@ var breadcrumbItemStyles = css34`
|
|
|
8434
8630
|
:host {
|
|
8435
8631
|
align-items: center;
|
|
8436
8632
|
display: inline-flex;
|
|
8437
|
-
font-family: var(--lt-typography-
|
|
8633
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
8438
8634
|
font-size: 0.875rem;
|
|
8439
8635
|
}
|
|
8440
8636
|
|
|
@@ -8594,7 +8790,7 @@ var dividerStyles = css35`
|
|
|
8594
8790
|
|
|
8595
8791
|
[part='label'] {
|
|
8596
8792
|
color: var(--lt-text-subtle);
|
|
8597
|
-
font-family: var(--lt-typography-
|
|
8793
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
8598
8794
|
font-size: 0.75rem;
|
|
8599
8795
|
font-weight: 600;
|
|
8600
8796
|
padding-inline: var(--lt-spacing-3);
|
|
@@ -9112,7 +9308,8 @@ SidePanel = __decorateClass([
|
|
|
9112
9308
|
|
|
9113
9309
|
// src/components/image/image.ts
|
|
9114
9310
|
import { html as html38 } from "lit";
|
|
9115
|
-
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";
|
|
9116
9313
|
|
|
9117
9314
|
// src/components/image/image.styles.ts
|
|
9118
9315
|
import { css as css39 } from "lit";
|
|
@@ -9149,15 +9346,47 @@ var Image = class extends ThemeableElement {
|
|
|
9149
9346
|
this.alt = "";
|
|
9150
9347
|
this.rounded = null;
|
|
9151
9348
|
this.responsive = false;
|
|
9349
|
+
this.loading = "";
|
|
9350
|
+
this._errored = false;
|
|
9152
9351
|
}
|
|
9153
9352
|
get _borderRadius() {
|
|
9154
9353
|
if (this.rounded === null) return void 0;
|
|
9155
9354
|
return this.rounded || "var(--lt-border-radius)";
|
|
9156
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
|
+
}
|
|
9157
9375
|
render() {
|
|
9376
|
+
if (this._errored) {
|
|
9377
|
+
return html38`<slot name="fallback"></slot>`;
|
|
9378
|
+
}
|
|
9158
9379
|
const radius = this._borderRadius;
|
|
9159
9380
|
return html38`
|
|
9160
|
-
<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
|
+
/>
|
|
9161
9390
|
`;
|
|
9162
9391
|
}
|
|
9163
9392
|
};
|
|
@@ -9174,6 +9403,12 @@ __decorateClass([
|
|
|
9174
9403
|
__decorateClass([
|
|
9175
9404
|
property39({ type: Boolean, reflect: true })
|
|
9176
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);
|
|
9177
9412
|
Image = __decorateClass([
|
|
9178
9413
|
customElement38("lt-image")
|
|
9179
9414
|
], Image);
|
|
@@ -9187,7 +9422,7 @@ import { css as css40 } from "lit";
|
|
|
9187
9422
|
var paginationStyles = css40`
|
|
9188
9423
|
:host {
|
|
9189
9424
|
display: inline-flex;
|
|
9190
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
9425
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
9191
9426
|
}
|
|
9192
9427
|
|
|
9193
9428
|
nav {
|
|
@@ -9357,7 +9592,7 @@ import { css as css41 } from "lit";
|
|
|
9357
9592
|
var datepickerStyles = css41`
|
|
9358
9593
|
:host {
|
|
9359
9594
|
display: block;
|
|
9360
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
9595
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
9361
9596
|
}
|
|
9362
9597
|
|
|
9363
9598
|
.wrapper {
|
|
@@ -9380,7 +9615,7 @@ var datepickerStyles = css41`
|
|
|
9380
9615
|
input {
|
|
9381
9616
|
background: var(--lt-bg-surface);
|
|
9382
9617
|
border-radius: var(--lt-border-radius);
|
|
9383
|
-
border: 1px solid var(--lt-border-default);
|
|
9618
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
9384
9619
|
color: var(--lt-text-default);
|
|
9385
9620
|
font-family: inherit;
|
|
9386
9621
|
font-size: 0.9375rem;
|
|
@@ -9574,12 +9809,12 @@ Datepicker = __decorateClass([
|
|
|
9574
9809
|
|
|
9575
9810
|
// src/components/date-input/date-input.ts
|
|
9576
9811
|
import { html as html42, nothing as nothing12 } from "lit";
|
|
9577
|
-
import { customElement as customElement42, property as property43, state as
|
|
9812
|
+
import { customElement as customElement42, property as property43, state as state7 } from "lit/decorators.js";
|
|
9578
9813
|
import "@latty-ds/icons";
|
|
9579
9814
|
|
|
9580
9815
|
// src/components/calendar/calendar.ts
|
|
9581
9816
|
import { html as html41 } from "lit";
|
|
9582
|
-
import { customElement as customElement41, property as property42, state as
|
|
9817
|
+
import { customElement as customElement41, property as property42, state as state6 } from "lit/decorators.js";
|
|
9583
9818
|
import "@latty-ds/icons";
|
|
9584
9819
|
|
|
9585
9820
|
// src/components/calendar/calendar.styles.ts
|
|
@@ -9587,13 +9822,13 @@ import { css as css42 } from "lit";
|
|
|
9587
9822
|
var calendarStyles = css42`
|
|
9588
9823
|
:host {
|
|
9589
9824
|
display: inline-block;
|
|
9590
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
9825
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
9591
9826
|
}
|
|
9592
9827
|
|
|
9593
9828
|
.calendar {
|
|
9594
9829
|
background: var(--lt-bg-default);
|
|
9595
9830
|
border-radius: var(--lt-border-radius);
|
|
9596
|
-
border: 1px solid var(--lt-border-default);
|
|
9831
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
9597
9832
|
display: flex;
|
|
9598
9833
|
flex-direction: column;
|
|
9599
9834
|
gap: var(--lt-spacing-2);
|
|
@@ -9936,7 +10171,7 @@ var calendarStyles = css42`
|
|
|
9936
10171
|
.today-btn {
|
|
9937
10172
|
background: transparent;
|
|
9938
10173
|
border-radius: var(--lt-border-radius);
|
|
9939
|
-
border: 1px solid var(--lt-border-default);
|
|
10174
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
9940
10175
|
color: var(--lt-text-subtle);
|
|
9941
10176
|
cursor: pointer;
|
|
9942
10177
|
font-family: inherit;
|
|
@@ -10474,22 +10709,22 @@ __decorateClass([
|
|
|
10474
10709
|
property42({ type: Number, reflect: true })
|
|
10475
10710
|
], Calendar.prototype, "months", 2);
|
|
10476
10711
|
__decorateClass([
|
|
10477
|
-
|
|
10712
|
+
state6()
|
|
10478
10713
|
], Calendar.prototype, "_viewYear", 2);
|
|
10479
10714
|
__decorateClass([
|
|
10480
|
-
|
|
10715
|
+
state6()
|
|
10481
10716
|
], Calendar.prototype, "_viewMonth", 2);
|
|
10482
10717
|
__decorateClass([
|
|
10483
|
-
|
|
10718
|
+
state6()
|
|
10484
10719
|
], Calendar.prototype, "_focusedDate", 2);
|
|
10485
10720
|
__decorateClass([
|
|
10486
|
-
|
|
10721
|
+
state6()
|
|
10487
10722
|
], Calendar.prototype, "_hoverDate", 2);
|
|
10488
10723
|
__decorateClass([
|
|
10489
|
-
|
|
10724
|
+
state6()
|
|
10490
10725
|
], Calendar.prototype, "_pickingMonthYear", 2);
|
|
10491
10726
|
__decorateClass([
|
|
10492
|
-
|
|
10727
|
+
state6()
|
|
10493
10728
|
], Calendar.prototype, "_pickerYear", 2);
|
|
10494
10729
|
Calendar = __decorateClass([
|
|
10495
10730
|
customElement41("lt-calendar")
|
|
@@ -10502,7 +10737,7 @@ var dateInputStyles = [
|
|
|
10502
10737
|
css43`
|
|
10503
10738
|
:host {
|
|
10504
10739
|
display: block;
|
|
10505
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
10740
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
10506
10741
|
}
|
|
10507
10742
|
|
|
10508
10743
|
.wrapper {
|
|
@@ -10531,7 +10766,7 @@ var dateInputStyles = [
|
|
|
10531
10766
|
align-items: center;
|
|
10532
10767
|
background: var(--lt-bg-surface);
|
|
10533
10768
|
border-radius: var(--lt-border-radius);
|
|
10534
|
-
border: 1px solid var(--lt-border-default);
|
|
10769
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
10535
10770
|
color: var(--lt-text-default);
|
|
10536
10771
|
cursor: pointer;
|
|
10537
10772
|
display: flex;
|
|
@@ -10840,7 +11075,7 @@ __decorateClass([
|
|
|
10840
11075
|
property43({ reflect: true })
|
|
10841
11076
|
], DateInput.prototype, "name", 2);
|
|
10842
11077
|
__decorateClass([
|
|
10843
|
-
|
|
11078
|
+
state7()
|
|
10844
11079
|
], DateInput.prototype, "_open", 2);
|
|
10845
11080
|
DateInput = __decorateClass([
|
|
10846
11081
|
customElement42("lt-date-input")
|
|
@@ -10848,7 +11083,7 @@ DateInput = __decorateClass([
|
|
|
10848
11083
|
|
|
10849
11084
|
// src/components/combobox/combobox.ts
|
|
10850
11085
|
import { html as html43, nothing as nothing13 } from "lit";
|
|
10851
|
-
import { customElement as customElement43, property as property44, state as
|
|
11086
|
+
import { customElement as customElement43, property as property44, state as state8 } from "lit/decorators.js";
|
|
10852
11087
|
|
|
10853
11088
|
// src/components/combobox/combobox.styles.ts
|
|
10854
11089
|
import { css as css44 } from "lit";
|
|
@@ -10857,7 +11092,7 @@ var comboboxStyles = [
|
|
|
10857
11092
|
css44`
|
|
10858
11093
|
:host {
|
|
10859
11094
|
display: block;
|
|
10860
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
11095
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
10861
11096
|
position: relative;
|
|
10862
11097
|
}
|
|
10863
11098
|
|
|
@@ -10880,7 +11115,7 @@ var comboboxStyles = [
|
|
|
10880
11115
|
align-items: center;
|
|
10881
11116
|
background: var(--lt-bg-surface);
|
|
10882
11117
|
border-radius: var(--lt-border-radius);
|
|
10883
|
-
border: 1px solid var(--lt-border-default);
|
|
11118
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
10884
11119
|
cursor: text;
|
|
10885
11120
|
display: flex;
|
|
10886
11121
|
gap: var(--lt-spacing-2);
|
|
@@ -10975,7 +11210,7 @@ var comboboxStyles = [
|
|
|
10975
11210
|
.dropdown {
|
|
10976
11211
|
background: var(--lt-bg-surface);
|
|
10977
11212
|
border-radius: var(--lt-border-radius);
|
|
10978
|
-
border: 1px solid var(--lt-border-default);
|
|
11213
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
10979
11214
|
box-shadow: var(--lt-shadow-md);
|
|
10980
11215
|
max-height: 240px;
|
|
10981
11216
|
overflow-y: auto;
|
|
@@ -11230,13 +11465,13 @@ __decorateClass([
|
|
|
11230
11465
|
property44({ reflect: true })
|
|
11231
11466
|
], Combobox.prototype, "name", 2);
|
|
11232
11467
|
__decorateClass([
|
|
11233
|
-
|
|
11468
|
+
state8()
|
|
11234
11469
|
], Combobox.prototype, "query", 2);
|
|
11235
11470
|
__decorateClass([
|
|
11236
|
-
|
|
11471
|
+
state8()
|
|
11237
11472
|
], Combobox.prototype, "open", 2);
|
|
11238
11473
|
__decorateClass([
|
|
11239
|
-
|
|
11474
|
+
state8()
|
|
11240
11475
|
], Combobox.prototype, "activeIndex", 2);
|
|
11241
11476
|
Combobox = __decorateClass([
|
|
11242
11477
|
customElement43("lt-combobox")
|
|
@@ -11244,6 +11479,7 @@ Combobox = __decorateClass([
|
|
|
11244
11479
|
|
|
11245
11480
|
// src/components/color-input/color-input.ts
|
|
11246
11481
|
import { html as html44 } from "lit";
|
|
11482
|
+
import { ifDefined as ifDefined6 } from "lit/directives/if-defined.js";
|
|
11247
11483
|
import { customElement as customElement44, property as property45 } from "lit/decorators.js";
|
|
11248
11484
|
|
|
11249
11485
|
// src/components/color-input/color-input.styles.ts
|
|
@@ -11251,7 +11487,7 @@ import { css as css45 } from "lit";
|
|
|
11251
11487
|
var colorInputStyles = css45`
|
|
11252
11488
|
:host {
|
|
11253
11489
|
display: inline-block;
|
|
11254
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
11490
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
11255
11491
|
width: 100%;
|
|
11256
11492
|
}
|
|
11257
11493
|
|
|
@@ -11276,7 +11512,7 @@ var colorInputStyles = css45`
|
|
|
11276
11512
|
display: flex;
|
|
11277
11513
|
align-items: center;
|
|
11278
11514
|
background: var(--lt-bg-subtle);
|
|
11279
|
-
border: 1px solid var(--lt-border-default);
|
|
11515
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
11280
11516
|
border-radius: var(--lt-border-radius);
|
|
11281
11517
|
box-sizing: border-box;
|
|
11282
11518
|
transition:
|
|
@@ -11488,6 +11724,7 @@ var ColorInput = class extends ThemeableElement {
|
|
|
11488
11724
|
return this._internals.reportValidity();
|
|
11489
11725
|
}
|
|
11490
11726
|
_handleChange(e) {
|
|
11727
|
+
e.stopPropagation();
|
|
11491
11728
|
const pickerHex = e.target.value;
|
|
11492
11729
|
this.value = formatColor(pickerHex, this.format);
|
|
11493
11730
|
this.dispatchEvent(
|
|
@@ -11511,6 +11748,7 @@ var ColorInput = class extends ThemeableElement {
|
|
|
11511
11748
|
type="color"
|
|
11512
11749
|
class="native-picker"
|
|
11513
11750
|
.value=${hex || "#000000"}
|
|
11751
|
+
name=${ifDefined6(this.name || void 0)}
|
|
11514
11752
|
?disabled=${this.disabled}
|
|
11515
11753
|
aria-label=${this.label || this.placeholder}
|
|
11516
11754
|
@change=${this._handleChange}
|