@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
|
@@ -42,7 +42,7 @@ import { css } from "lit";
|
|
|
42
42
|
var accordionStyles = css`
|
|
43
43
|
:host {
|
|
44
44
|
display: block;
|
|
45
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
45
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
46
46
|
width: 100%;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -127,7 +127,7 @@ var accordionStyles = css`
|
|
|
127
127
|
/* Variant: default */
|
|
128
128
|
:host([appearance='default']) details {
|
|
129
129
|
background: var(--lt-bg-subtle);
|
|
130
|
-
border: 1px solid var(--lt-border-default);
|
|
130
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
:host([appearance='default']) details:hover {
|
|
@@ -147,7 +147,7 @@ var accordionStyles = css`
|
|
|
147
147
|
/* Variant: outlined */
|
|
148
148
|
:host([appearance='outlined']) details {
|
|
149
149
|
background: transparent;
|
|
150
|
-
border: 1px solid var(--lt-border-default);
|
|
150
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
:host([appearance='outlined']) details:hover {
|
|
@@ -198,7 +198,7 @@ var textStyles = css2`
|
|
|
198
198
|
[part='base'] {
|
|
199
199
|
margin: 0;
|
|
200
200
|
color: inherit;
|
|
201
|
-
font-family: var(--lt-typography-
|
|
201
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
/* ── Display ─────────────────────────────────────────────────────────── */
|
|
@@ -43,7 +43,7 @@ import { css } from "lit";
|
|
|
43
43
|
var alertStyles = css`
|
|
44
44
|
:host {
|
|
45
45
|
display: block;
|
|
46
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
46
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
47
47
|
opacity: 1;
|
|
48
48
|
transform: translateY(0);
|
|
49
49
|
transition:
|
|
@@ -113,14 +113,14 @@ var alertStyles = css`
|
|
|
113
113
|
:host([appearance='filled']) .inner,
|
|
114
114
|
:host(:not([appearance])) .inner {
|
|
115
115
|
background: var(--_bg-subtle);
|
|
116
|
-
border: 1px solid var(--_border);
|
|
116
|
+
border: var(--lt-border-width, 1px) solid var(--_border);
|
|
117
117
|
color: var(--_color);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
/* outlined — white bg + colored border */
|
|
121
121
|
:host([appearance='outlined']) .inner {
|
|
122
122
|
background: var(--lt-bg-default);
|
|
123
|
-
border: 1px solid var(--_border);
|
|
123
|
+
border: var(--lt-border-width, 1px) solid var(--_border);
|
|
124
124
|
color: var(--_color);
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -208,7 +208,7 @@ var iconButtonStyles = css2`
|
|
|
208
208
|
align-items: center;
|
|
209
209
|
background: var(--lt-icon-button-bg, var(--_bg));
|
|
210
210
|
border-radius: var(--lt-border-radius);
|
|
211
|
-
border: 1px solid var(--lt-icon-button-border-color, var(--_border-color));
|
|
211
|
+
border: var(--lt-border-width, 1px) solid var(--lt-icon-button-border-color, var(--_border-color));
|
|
212
212
|
box-sizing: border-box;
|
|
213
213
|
color: var(--lt-icon-button-color, var(--_color));
|
|
214
214
|
cursor: pointer;
|
|
@@ -414,11 +414,45 @@ var iconButtonStyles = css2`
|
|
|
414
414
|
}
|
|
415
415
|
`;
|
|
416
416
|
|
|
417
|
+
// src/components/shared/aria-forwarding.ts
|
|
418
|
+
var FORWARDED_ARIA_ATTRIBUTES = [
|
|
419
|
+
"aria-pressed",
|
|
420
|
+
"aria-expanded",
|
|
421
|
+
"aria-haspopup",
|
|
422
|
+
"aria-controls",
|
|
423
|
+
"aria-current"
|
|
424
|
+
];
|
|
425
|
+
var AriaForwardingController = class {
|
|
426
|
+
constructor(host, getTarget) {
|
|
427
|
+
this._host = host;
|
|
428
|
+
this._getTarget = getTarget;
|
|
429
|
+
this._observer = new MutationObserver(() => this._host.requestUpdate());
|
|
430
|
+
host.addController(this);
|
|
431
|
+
}
|
|
432
|
+
hostConnected() {
|
|
433
|
+
this._observer.observe(this._host, { attributes: true, attributeFilter: [...FORWARDED_ARIA_ATTRIBUTES] });
|
|
434
|
+
this._host.requestUpdate();
|
|
435
|
+
}
|
|
436
|
+
hostDisconnected() {
|
|
437
|
+
this._observer.disconnect();
|
|
438
|
+
}
|
|
439
|
+
hostUpdated() {
|
|
440
|
+
const target = this._getTarget();
|
|
441
|
+
if (!target) return;
|
|
442
|
+
for (const attr of FORWARDED_ARIA_ATTRIBUTES) {
|
|
443
|
+
const value = this._host.getAttribute(attr);
|
|
444
|
+
if (value === null) target.removeAttribute(attr);
|
|
445
|
+
else if (target.getAttribute(attr) !== value) target.setAttribute(attr, value);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
|
|
417
450
|
// src/components/icon-button/icon-button.ts
|
|
418
451
|
import "@latty-ds/icons";
|
|
419
452
|
var IconButton = class extends ThemeableElement {
|
|
420
453
|
constructor() {
|
|
421
454
|
super(...arguments);
|
|
455
|
+
this._ariaForwarding = new AriaForwardingController(this, () => this.shadowRoot?.querySelector('[part="base"]'));
|
|
422
456
|
this.icon = "";
|
|
423
457
|
this.label = "";
|
|
424
458
|
this.variant = "neutral";
|
|
@@ -513,7 +547,7 @@ var textStyles = css3`
|
|
|
513
547
|
[part='base'] {
|
|
514
548
|
margin: 0;
|
|
515
549
|
color: inherit;
|
|
516
|
-
font-family: var(--lt-typography-
|
|
550
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
517
551
|
}
|
|
518
552
|
|
|
519
553
|
/* ── Display ─────────────────────────────────────────────────────────── */
|
|
@@ -42,7 +42,7 @@ import { css } from "lit";
|
|
|
42
42
|
var badgeStyles = css`
|
|
43
43
|
:host {
|
|
44
44
|
display: inline-flex;
|
|
45
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
45
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
46
46
|
vertical-align: middle;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -50,7 +50,11 @@ var badgeStyles = css`
|
|
|
50
50
|
align-items: center;
|
|
51
51
|
background: var(--lt-badge-bg);
|
|
52
52
|
border-radius: 999px;
|
|
53
|
-
|
|
53
|
+
/* Badges are even smaller than chips (as short as 18px at size="sm") — a
|
|
54
|
+
"thick" (4px) themed border reads as compressed, so cap what the badge
|
|
55
|
+
actually renders at "medium" (2px) regardless of the theme's configured
|
|
56
|
+
border width. */
|
|
57
|
+
border: min(var(--lt-border-width, 1px), 2px) solid var(--lt-badge-border-color, transparent);
|
|
54
58
|
color: var(--lt-badge-color);
|
|
55
59
|
box-sizing: border-box;
|
|
56
60
|
display: inline-flex;
|
|
@@ -9,17 +9,21 @@ import '@latty-ds/icons';
|
|
|
9
9
|
*
|
|
10
10
|
* Features:
|
|
11
11
|
* - Multiple visual variants (primary, secondary, neutral, success, warning, error, info)
|
|
12
|
-
* -
|
|
12
|
+
* - Three appearance styles (filled, outlined, ghost)
|
|
13
13
|
* - Three size options (sm, md, lg)
|
|
14
14
|
* - Loading state with spinner
|
|
15
15
|
* - Icon support at start and end positions
|
|
16
16
|
* - Disabled state
|
|
17
17
|
* - Accessible with aria-busy for loading state
|
|
18
|
+
* - Forwards host `aria-pressed`, `aria-expanded`, `aria-haspopup`, `aria-controls`, and
|
|
19
|
+
* `aria-current` onto the internal native control (e.g. for toggle buttons)
|
|
18
20
|
* - Renders as `<a>` when `href` is provided (link button)
|
|
19
21
|
* - Form-associated: `type="submit"` submits the containing form, `type="reset"` resets it
|
|
20
22
|
*
|
|
21
23
|
* @slot - Button label/content
|
|
22
24
|
*
|
|
25
|
+
* @cssprop [--lt-button-min-width=88px] - Minimum width of the button; set to `0` for compact/inline buttons
|
|
26
|
+
*
|
|
23
27
|
* @example
|
|
24
28
|
* ```html
|
|
25
29
|
* <lt-button variant="primary" size="md">Click me</lt-button>
|
|
@@ -39,6 +43,7 @@ export declare class Button extends ThemeableElement {
|
|
|
39
43
|
static styles: import("lit").CSSResult;
|
|
40
44
|
static formAssociated: boolean;
|
|
41
45
|
private _internals;
|
|
46
|
+
private _ariaForwarding;
|
|
42
47
|
constructor();
|
|
43
48
|
/**
|
|
44
49
|
* Visual variant that determines the button's color scheme.
|
|
@@ -46,7 +51,7 @@ export declare class Button extends ThemeableElement {
|
|
|
46
51
|
*/
|
|
47
52
|
variant: ButtonVariant;
|
|
48
53
|
/**
|
|
49
|
-
* Appearance style (filled or
|
|
54
|
+
* Appearance style (filled, outlined, or ghost).
|
|
50
55
|
* @default 'filled'
|
|
51
56
|
*/
|
|
52
57
|
appearance: ButtonAppearance;
|
|
@@ -13,12 +13,13 @@
|
|
|
13
13
|
export type ButtonVariant = 'primary' | 'secondary' | 'neutral' | 'success' | 'warning' | 'error' | 'info';
|
|
14
14
|
/**
|
|
15
15
|
* Appearance style of the button component.
|
|
16
|
-
* Determines whether the button is filled or
|
|
16
|
+
* Determines whether the button is filled, outlined, or ghost.
|
|
17
17
|
*
|
|
18
18
|
* - `filled`: Solid background with the variant color (default)
|
|
19
19
|
* - `outlined`: Transparent background with colored border and text
|
|
20
|
+
* - `ghost`: Transparent background with colored text and no border (low-emphasis text button)
|
|
20
21
|
*/
|
|
21
|
-
export type ButtonAppearance = 'filled' | 'outlined';
|
|
22
|
+
export type ButtonAppearance = 'filled' | 'outlined' | 'ghost';
|
|
22
23
|
/**
|
|
23
24
|
* Size variant of the button component.
|
|
24
25
|
* Affects height, font size, and padding.
|
|
@@ -43,7 +43,7 @@ import { css } from "lit";
|
|
|
43
43
|
var buttonStyles = css`
|
|
44
44
|
:host {
|
|
45
45
|
display: inline-block;
|
|
46
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
46
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
47
47
|
|
|
48
48
|
/* Internal state props — set per variant/appearance below */
|
|
49
49
|
--_color: var(--lt-text-on-primary);
|
|
@@ -66,7 +66,7 @@ var buttonStyles = css`
|
|
|
66
66
|
align-items: center;
|
|
67
67
|
background: var(--lt-button-bg, var(--_bg));
|
|
68
68
|
border-radius: var(--lt-border-radius);
|
|
69
|
-
border: 1px solid var(--lt-button-border-color, var(--_border-color));
|
|
69
|
+
border: var(--lt-border-width, 1px) solid var(--lt-button-border-color, var(--_border-color));
|
|
70
70
|
box-sizing: border-box;
|
|
71
71
|
color: var(--lt-button-color, var(--_color));
|
|
72
72
|
cursor: pointer;
|
|
@@ -76,7 +76,7 @@ var buttonStyles = css`
|
|
|
76
76
|
gap: var(--lt-spacing-2);
|
|
77
77
|
justify-content: center;
|
|
78
78
|
line-height: 1;
|
|
79
|
-
min-width: 88px;
|
|
79
|
+
min-width: var(--lt-button-min-width, 88px);
|
|
80
80
|
user-select: none;
|
|
81
81
|
transition:
|
|
82
82
|
background-color 120ms ease,
|
|
@@ -228,7 +228,52 @@ var buttonStyles = css`
|
|
|
228
228
|
--_active-bg: var(--lt-bg-info-subtle);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
|
|
231
|
+
/* ghost appearance — transparent background, no border, low-emphasis text button */
|
|
232
|
+
:host([appearance='ghost'][variant='primary']) {
|
|
233
|
+
--_bg: transparent;
|
|
234
|
+
--_color: var(--lt-text-primary);
|
|
235
|
+
--_hover-bg: var(--lt-bg-primary-subtle);
|
|
236
|
+
--_active-bg: var(--lt-bg-primary-subtle);
|
|
237
|
+
}
|
|
238
|
+
:host([appearance='ghost'][variant='secondary']) {
|
|
239
|
+
--_bg: transparent;
|
|
240
|
+
--_color: var(--lt-text-secondary);
|
|
241
|
+
--_hover-bg: var(--lt-bg-secondary-subtle);
|
|
242
|
+
--_active-bg: var(--lt-bg-secondary-subtle);
|
|
243
|
+
}
|
|
244
|
+
:host([appearance='ghost'][variant='neutral']) {
|
|
245
|
+
--_bg: transparent;
|
|
246
|
+
--_color: var(--lt-text-neutral);
|
|
247
|
+
--_hover-bg: var(--lt-bg-subtle);
|
|
248
|
+
--_active-bg: var(--lt-bg-surface);
|
|
249
|
+
}
|
|
250
|
+
:host([appearance='ghost'][variant='success']) {
|
|
251
|
+
--_bg: transparent;
|
|
252
|
+
--_color: var(--lt-text-success);
|
|
253
|
+
--_hover-bg: var(--lt-bg-success-subtle);
|
|
254
|
+
--_active-bg: var(--lt-bg-success-subtle);
|
|
255
|
+
}
|
|
256
|
+
:host([appearance='ghost'][variant='warning']) {
|
|
257
|
+
--_bg: transparent;
|
|
258
|
+
--_color: var(--lt-text-warning);
|
|
259
|
+
--_hover-bg: var(--lt-bg-warning-subtle);
|
|
260
|
+
--_active-bg: var(--lt-bg-warning-subtle);
|
|
261
|
+
}
|
|
262
|
+
:host([appearance='ghost'][variant='error']) {
|
|
263
|
+
--_bg: transparent;
|
|
264
|
+
--_color: var(--lt-text-error);
|
|
265
|
+
--_hover-bg: var(--lt-bg-error-subtle);
|
|
266
|
+
--_active-bg: var(--lt-bg-error-subtle);
|
|
267
|
+
}
|
|
268
|
+
:host([appearance='ghost'][variant='info']) {
|
|
269
|
+
--_bg: transparent;
|
|
270
|
+
--_color: var(--lt-text-info);
|
|
271
|
+
--_hover-bg: var(--lt-bg-info-subtle);
|
|
272
|
+
--_active-bg: var(--lt-bg-info-subtle);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
:host([appearance='outlined']) [part='base']:active:not([disabled]):not([aria-disabled='true']),
|
|
276
|
+
:host([appearance='ghost']) [part='base']:active:not([disabled]):not([aria-disabled='true']) {
|
|
232
277
|
opacity: 0.8;
|
|
233
278
|
}
|
|
234
279
|
|
|
@@ -262,6 +307,39 @@ var buttonStyles = css`
|
|
|
262
307
|
}
|
|
263
308
|
`;
|
|
264
309
|
|
|
310
|
+
// src/components/shared/aria-forwarding.ts
|
|
311
|
+
var FORWARDED_ARIA_ATTRIBUTES = [
|
|
312
|
+
"aria-pressed",
|
|
313
|
+
"aria-expanded",
|
|
314
|
+
"aria-haspopup",
|
|
315
|
+
"aria-controls",
|
|
316
|
+
"aria-current"
|
|
317
|
+
];
|
|
318
|
+
var AriaForwardingController = class {
|
|
319
|
+
constructor(host, getTarget) {
|
|
320
|
+
this._host = host;
|
|
321
|
+
this._getTarget = getTarget;
|
|
322
|
+
this._observer = new MutationObserver(() => this._host.requestUpdate());
|
|
323
|
+
host.addController(this);
|
|
324
|
+
}
|
|
325
|
+
hostConnected() {
|
|
326
|
+
this._observer.observe(this._host, { attributes: true, attributeFilter: [...FORWARDED_ARIA_ATTRIBUTES] });
|
|
327
|
+
this._host.requestUpdate();
|
|
328
|
+
}
|
|
329
|
+
hostDisconnected() {
|
|
330
|
+
this._observer.disconnect();
|
|
331
|
+
}
|
|
332
|
+
hostUpdated() {
|
|
333
|
+
const target = this._getTarget();
|
|
334
|
+
if (!target) return;
|
|
335
|
+
for (const attr of FORWARDED_ARIA_ATTRIBUTES) {
|
|
336
|
+
const value = this._host.getAttribute(attr);
|
|
337
|
+
if (value === null) target.removeAttribute(attr);
|
|
338
|
+
else if (target.getAttribute(attr) !== value) target.setAttribute(attr, value);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
|
|
265
343
|
// src/components/spinner/spinner.ts
|
|
266
344
|
import { html } from "lit";
|
|
267
345
|
import { customElement, property as property2 } from "lit/decorators.js";
|
|
@@ -361,6 +439,7 @@ import "@latty-ds/icons";
|
|
|
361
439
|
var Button = class extends ThemeableElement {
|
|
362
440
|
constructor() {
|
|
363
441
|
super();
|
|
442
|
+
this._ariaForwarding = new AriaForwardingController(this, () => this.shadowRoot?.querySelector('[part="base"]'));
|
|
364
443
|
this.variant = "primary";
|
|
365
444
|
this.appearance = "filled";
|
|
366
445
|
this.size = "md";
|
|
@@ -43,13 +43,13 @@ import { css } from "lit";
|
|
|
43
43
|
var calendarStyles = css`
|
|
44
44
|
:host {
|
|
45
45
|
display: inline-block;
|
|
46
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
46
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.calendar {
|
|
50
50
|
background: var(--lt-bg-default);
|
|
51
51
|
border-radius: var(--lt-border-radius);
|
|
52
|
-
border: 1px solid var(--lt-border-default);
|
|
52
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
53
53
|
display: flex;
|
|
54
54
|
flex-direction: column;
|
|
55
55
|
gap: var(--lt-spacing-2);
|
|
@@ -392,7 +392,7 @@ var calendarStyles = css`
|
|
|
392
392
|
.today-btn {
|
|
393
393
|
background: transparent;
|
|
394
394
|
border-radius: var(--lt-border-radius);
|
|
395
|
-
border: 1px solid var(--lt-border-default);
|
|
395
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
396
396
|
color: var(--lt-text-subtle);
|
|
397
397
|
cursor: pointer;
|
|
398
398
|
font-family: inherit;
|
|
@@ -42,7 +42,7 @@ import { css } from "lit";
|
|
|
42
42
|
var checkboxStyles = css`
|
|
43
43
|
:host {
|
|
44
44
|
display: inline-block;
|
|
45
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
45
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.checkbox-wrapper {
|
|
@@ -242,6 +242,7 @@ var Checkbox = class extends ThemeableElement {
|
|
|
242
242
|
* @private
|
|
243
243
|
*/
|
|
244
244
|
handleChange(e) {
|
|
245
|
+
e.stopPropagation();
|
|
245
246
|
const target = e.target;
|
|
246
247
|
this.checked = target.checked;
|
|
247
248
|
this.indeterminate = false;
|
|
@@ -43,7 +43,7 @@ import { css } from "lit";
|
|
|
43
43
|
var chipStyles = css`
|
|
44
44
|
:host {
|
|
45
45
|
display: inline-flex;
|
|
46
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
46
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
47
47
|
vertical-align: middle;
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -51,7 +51,11 @@ var chipStyles = css`
|
|
|
51
51
|
align-items: center;
|
|
52
52
|
background: var(--lt-chip-bg);
|
|
53
53
|
border-radius: 999px;
|
|
54
|
-
|
|
54
|
+
/* Chips are small pills (as short as 20px tall at size="sm") — a "thick"
|
|
55
|
+
(4px) themed border eats too much of that height and reads as
|
|
56
|
+
compressed/squished, so cap what the chip actually renders at "medium"
|
|
57
|
+
(2px) regardless of the theme's configured border width. */
|
|
58
|
+
border: min(var(--lt-border-width, 1px), 2px) solid var(--lt-chip-border-color, transparent);
|
|
55
59
|
color: var(--lt-chip-color);
|
|
56
60
|
box-sizing: border-box;
|
|
57
61
|
display: inline-flex;
|
|
@@ -11,6 +11,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
11
11
|
|
|
12
12
|
// src/components/color-input/color-input.ts
|
|
13
13
|
import { html as html2 } from "lit";
|
|
14
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
14
15
|
import { customElement as customElement2, property as property3 } from "lit/decorators.js";
|
|
15
16
|
|
|
16
17
|
// src/base/themeable-element.ts
|
|
@@ -40,7 +41,7 @@ import { css } from "lit";
|
|
|
40
41
|
var colorInputStyles = css`
|
|
41
42
|
:host {
|
|
42
43
|
display: inline-block;
|
|
43
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
44
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
44
45
|
width: 100%;
|
|
45
46
|
}
|
|
46
47
|
|
|
@@ -65,7 +66,7 @@ var colorInputStyles = css`
|
|
|
65
66
|
display: flex;
|
|
66
67
|
align-items: center;
|
|
67
68
|
background: var(--lt-bg-subtle);
|
|
68
|
-
border: 1px solid var(--lt-border-default);
|
|
69
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
69
70
|
border-radius: var(--lt-border-radius);
|
|
70
71
|
box-sizing: border-box;
|
|
71
72
|
transition:
|
|
@@ -211,7 +212,7 @@ var textStyles = css2`
|
|
|
211
212
|
[part='base'] {
|
|
212
213
|
margin: 0;
|
|
213
214
|
color: inherit;
|
|
214
|
-
font-family: var(--lt-typography-
|
|
215
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
215
216
|
}
|
|
216
217
|
|
|
217
218
|
/* ── Display ─────────────────────────────────────────────────────────── */
|
|
@@ -451,6 +452,7 @@ var ColorInput = class extends ThemeableElement {
|
|
|
451
452
|
return this._internals.reportValidity();
|
|
452
453
|
}
|
|
453
454
|
_handleChange(e) {
|
|
455
|
+
e.stopPropagation();
|
|
454
456
|
const pickerHex = e.target.value;
|
|
455
457
|
this.value = formatColor(pickerHex, this.format);
|
|
456
458
|
this.dispatchEvent(
|
|
@@ -474,6 +476,7 @@ var ColorInput = class extends ThemeableElement {
|
|
|
474
476
|
type="color"
|
|
475
477
|
class="native-picker"
|
|
476
478
|
.value=${hex || "#000000"}
|
|
479
|
+
name=${ifDefined(this.name || void 0)}
|
|
477
480
|
?disabled=${this.disabled}
|
|
478
481
|
aria-label=${this.label || this.placeholder}
|
|
479
482
|
@change=${this._handleChange}
|
|
@@ -1432,7 +1432,7 @@ var comboboxStyles = [
|
|
|
1432
1432
|
css2`
|
|
1433
1433
|
:host {
|
|
1434
1434
|
display: block;
|
|
1435
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
1435
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
1436
1436
|
position: relative;
|
|
1437
1437
|
}
|
|
1438
1438
|
|
|
@@ -1455,7 +1455,7 @@ var comboboxStyles = [
|
|
|
1455
1455
|
align-items: center;
|
|
1456
1456
|
background: var(--lt-bg-surface);
|
|
1457
1457
|
border-radius: var(--lt-border-radius);
|
|
1458
|
-
border: 1px solid var(--lt-border-default);
|
|
1458
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
1459
1459
|
cursor: text;
|
|
1460
1460
|
display: flex;
|
|
1461
1461
|
gap: var(--lt-spacing-2);
|
|
@@ -1550,7 +1550,7 @@ var comboboxStyles = [
|
|
|
1550
1550
|
.dropdown {
|
|
1551
1551
|
background: var(--lt-bg-surface);
|
|
1552
1552
|
border-radius: var(--lt-border-radius);
|
|
1553
|
-
border: 1px solid var(--lt-border-default);
|
|
1553
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
1554
1554
|
box-shadow: var(--lt-shadow-md);
|
|
1555
1555
|
max-height: 240px;
|
|
1556
1556
|
overflow-y: auto;
|
|
@@ -1648,7 +1648,7 @@ var textStyles = css3`
|
|
|
1648
1648
|
[part='base'] {
|
|
1649
1649
|
margin: 0;
|
|
1650
1650
|
color: inherit;
|
|
1651
|
-
font-family: var(--lt-typography-
|
|
1651
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
1652
1652
|
}
|
|
1653
1653
|
|
|
1654
1654
|
/* ── Display ─────────────────────────────────────────────────────────── */
|
|
@@ -48,13 +48,13 @@ import { css } from "lit";
|
|
|
48
48
|
var calendarStyles = css`
|
|
49
49
|
:host {
|
|
50
50
|
display: inline-block;
|
|
51
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
51
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.calendar {
|
|
55
55
|
background: var(--lt-bg-default);
|
|
56
56
|
border-radius: var(--lt-border-radius);
|
|
57
|
-
border: 1px solid var(--lt-border-default);
|
|
57
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
58
58
|
display: flex;
|
|
59
59
|
flex-direction: column;
|
|
60
60
|
gap: var(--lt-spacing-2);
|
|
@@ -397,7 +397,7 @@ var calendarStyles = css`
|
|
|
397
397
|
.today-btn {
|
|
398
398
|
background: transparent;
|
|
399
399
|
border-radius: var(--lt-border-radius);
|
|
400
|
-
border: 1px solid var(--lt-border-default);
|
|
400
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
401
401
|
color: var(--lt-text-subtle);
|
|
402
402
|
cursor: pointer;
|
|
403
403
|
font-family: inherit;
|
|
@@ -992,7 +992,7 @@ var textStyles = css2`
|
|
|
992
992
|
[part='base'] {
|
|
993
993
|
margin: 0;
|
|
994
994
|
color: inherit;
|
|
995
|
-
font-family: var(--lt-typography-
|
|
995
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
996
996
|
}
|
|
997
997
|
|
|
998
998
|
/* ── Display ─────────────────────────────────────────────────────────── */
|
|
@@ -2537,7 +2537,7 @@ var dateInputStyles = [
|
|
|
2537
2537
|
css4`
|
|
2538
2538
|
:host {
|
|
2539
2539
|
display: block;
|
|
2540
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
2540
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
2541
2541
|
}
|
|
2542
2542
|
|
|
2543
2543
|
.wrapper {
|
|
@@ -2566,7 +2566,7 @@ var dateInputStyles = [
|
|
|
2566
2566
|
align-items: center;
|
|
2567
2567
|
background: var(--lt-bg-surface);
|
|
2568
2568
|
border-radius: var(--lt-border-radius);
|
|
2569
|
-
border: 1px solid var(--lt-border-default);
|
|
2569
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
2570
2570
|
color: var(--lt-text-default);
|
|
2571
2571
|
cursor: pointer;
|
|
2572
2572
|
display: flex;
|
|
@@ -42,7 +42,7 @@ import { css } from "lit";
|
|
|
42
42
|
var datepickerStyles = css`
|
|
43
43
|
:host {
|
|
44
44
|
display: block;
|
|
45
|
-
font-family: 'Hanken Grotesk', sans-serif;
|
|
45
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.wrapper {
|
|
@@ -65,7 +65,7 @@ var datepickerStyles = css`
|
|
|
65
65
|
input {
|
|
66
66
|
background: var(--lt-bg-surface);
|
|
67
67
|
border-radius: var(--lt-border-radius);
|
|
68
|
-
border: 1px solid var(--lt-border-default);
|
|
68
|
+
border: var(--lt-border-width, 1px) solid var(--lt-border-default);
|
|
69
69
|
color: var(--lt-text-default);
|
|
70
70
|
font-family: inherit;
|
|
71
71
|
font-size: 0.9375rem;
|
|
@@ -167,7 +167,7 @@ var textStyles = css2`
|
|
|
167
167
|
[part='base'] {
|
|
168
168
|
margin: 0;
|
|
169
169
|
color: inherit;
|
|
170
|
-
font-family: var(--lt-typography-
|
|
170
|
+
font-family: var(--lt-typography-fontFamily, 'Hanken Grotesk', sans-serif);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
/* ── Display ─────────────────────────────────────────────────────────── */
|