@latty-ds/web 0.9.0 → 0.10.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/dist/index.js CHANGED
@@ -202,61 +202,97 @@ var textStyles = css2`
202
202
  /* ── Display ─────────────────────────────────────────────────────────── */
203
203
 
204
204
  :host([variant='display-2xl']) [part='base'] {
205
+ font-family: var(
206
+ --lt-typography-fontFamilyHeading,
207
+ var(--lt-typography-fontFamilyPrimary, 'Hanken Grotesk', sans-serif)
208
+ );
205
209
  font-size: clamp(2.5rem, 6vw, 4.5rem);
206
210
  font-weight: var(--lt-text-weight, 200);
207
211
  line-height: 1.1;
208
- letter-spacing: -0.02em;
212
+ letter-spacing: var(--lt-text-tracking, -0.02em);
209
213
  }
210
214
 
211
215
  :host([variant='display-xl']) [part='base'] {
216
+ font-family: var(
217
+ --lt-typography-fontFamilyHeading,
218
+ var(--lt-typography-fontFamilyPrimary, 'Hanken Grotesk', sans-serif)
219
+ );
212
220
  font-size: clamp(2rem, 5vw, 3.75rem);
213
221
  font-weight: var(--lt-text-weight, 200);
214
222
  line-height: 1.1;
215
- letter-spacing: -0.02em;
223
+ letter-spacing: var(--lt-text-tracking, -0.02em);
216
224
  }
217
225
 
218
226
  :host([variant='display-lg']) [part='base'] {
227
+ font-family: var(
228
+ --lt-typography-fontFamilyHeading,
229
+ var(--lt-typography-fontFamilyPrimary, 'Hanken Grotesk', sans-serif)
230
+ );
219
231
  font-size: clamp(2rem, 4vw, 3rem);
220
232
  font-weight: var(--lt-text-weight, 200);
221
233
  line-height: 1.15;
222
- letter-spacing: -0.01em;
234
+ letter-spacing: var(--lt-text-tracking, -0.01em);
223
235
  }
224
236
 
225
237
  /* ── Headings ─────────────────────────────────────────────────────────── */
226
238
 
227
239
  :host([variant='h1']) [part='base'] {
240
+ font-family: var(
241
+ --lt-typography-fontFamilyHeading,
242
+ var(--lt-typography-fontFamilyPrimary, 'Hanken Grotesk', sans-serif)
243
+ );
228
244
  font-size: clamp(1.75rem, 2.5vw + 0.75rem, 2.5rem);
229
245
  font-weight: var(--lt-text-weight, 600);
230
246
  line-height: 1.2;
231
- letter-spacing: -0.02em;
247
+ letter-spacing: var(--lt-text-tracking, -0.02em);
232
248
  }
233
249
 
234
250
  :host([variant='h2']) [part='base'] {
251
+ font-family: var(
252
+ --lt-typography-fontFamilyHeading,
253
+ var(--lt-typography-fontFamilyPrimary, 'Hanken Grotesk', sans-serif)
254
+ );
235
255
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
236
256
  font-weight: var(--lt-text-weight, 600);
237
257
  line-height: 1.25;
238
- letter-spacing: -0.01em;
258
+ letter-spacing: var(--lt-text-tracking, -0.01em);
239
259
  }
240
260
 
241
261
  :host([variant='h3']) [part='base'] {
262
+ font-family: var(
263
+ --lt-typography-fontFamilyHeading,
264
+ var(--lt-typography-fontFamilyPrimary, 'Hanken Grotesk', sans-serif)
265
+ );
242
266
  font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.5rem);
243
267
  font-weight: var(--lt-text-weight, 600);
244
268
  line-height: 1.3;
245
269
  }
246
270
 
247
271
  :host([variant='h4']) [part='base'] {
272
+ font-family: var(
273
+ --lt-typography-fontFamilyHeading,
274
+ var(--lt-typography-fontFamilyPrimary, 'Hanken Grotesk', sans-serif)
275
+ );
248
276
  font-size: 1.25rem;
249
277
  font-weight: var(--lt-text-weight, 600);
250
278
  line-height: 1.35;
251
279
  }
252
280
 
253
281
  :host([variant='h5']) [part='base'] {
282
+ font-family: var(
283
+ --lt-typography-fontFamilyHeading,
284
+ var(--lt-typography-fontFamilyPrimary, 'Hanken Grotesk', sans-serif)
285
+ );
254
286
  font-size: 1.125rem;
255
287
  font-weight: var(--lt-text-weight, 600);
256
288
  line-height: 1.4;
257
289
  }
258
290
 
259
291
  :host([variant='h6']) [part='base'] {
292
+ font-family: var(
293
+ --lt-typography-fontFamilyHeading,
294
+ var(--lt-typography-fontFamilyPrimary, 'Hanken Grotesk', sans-serif)
295
+ );
260
296
  font-size: 1rem;
261
297
  font-weight: var(--lt-text-weight, 600);
262
298
  line-height: 1.4;
@@ -295,7 +331,7 @@ var textStyles = css2`
295
331
  font-size: 0.6875rem;
296
332
  font-weight: var(--lt-text-weight, 600);
297
333
  line-height: 1.2;
298
- letter-spacing: 0.08em;
334
+ letter-spacing: var(--lt-text-tracking, 0.08em);
299
335
  text-transform: uppercase;
300
336
  }
301
337
 
@@ -706,6 +742,30 @@ var buttonStyles = css3`
706
742
  opacity: 0.8;
707
743
  }
708
744
 
745
+ /* bordered — adds a border on top of whatever appearance is active; a no-op on
746
+ outlined, which already sets the same border color. */
747
+ :host([bordered][variant='primary']) {
748
+ --_border-color: var(--lt-border-primary-strong);
749
+ }
750
+ :host([bordered][variant='secondary']) {
751
+ --_border-color: var(--lt-border-secondary-strong);
752
+ }
753
+ :host([bordered][variant='neutral']) {
754
+ --_border-color: var(--lt-border-strong);
755
+ }
756
+ :host([bordered][variant='success']) {
757
+ --_border-color: var(--lt-border-success-strong);
758
+ }
759
+ :host([bordered][variant='warning']) {
760
+ --_border-color: var(--lt-border-warning-strong);
761
+ }
762
+ :host([bordered][variant='error']) {
763
+ --_border-color: var(--lt-border-error-strong);
764
+ }
765
+ :host([bordered][variant='info']) {
766
+ --_border-color: var(--lt-border-info-strong);
767
+ }
768
+
709
769
  /* loading */
710
770
  .spinner {
711
771
  animation: spin 700ms linear infinite;
@@ -871,6 +931,7 @@ var Button = class extends ThemeableElement {
871
931
  this._ariaForwarding = new AriaForwardingController(this, () => this.shadowRoot?.querySelector('[part="base"]'));
872
932
  this.variant = "primary";
873
933
  this.appearance = "filled";
934
+ this.bordered = false;
874
935
  this.size = "md";
875
936
  this.disabled = false;
876
937
  this.loading = false;
@@ -933,6 +994,9 @@ __decorateClass([
933
994
  __decorateClass([
934
995
  property5({ reflect: true })
935
996
  ], Button.prototype, "appearance", 2);
997
+ __decorateClass([
998
+ property5({ type: Boolean, reflect: true })
999
+ ], Button.prototype, "bordered", 2);
936
1000
  __decorateClass([
937
1001
  property5({ reflect: true })
938
1002
  ], Button.prototype, "size", 2);
@@ -1894,6 +1958,30 @@ var iconButtonStyles = css9`
1894
1958
  --_active-bg: var(--lt-bg-info-subtle);
1895
1959
  }
1896
1960
 
1961
+ /* bordered — adds a border on top of whatever appearance is active; a no-op on
1962
+ outlined, which already sets the same border color. */
1963
+ :host([bordered][variant='primary']) {
1964
+ --_border-color: var(--lt-border-primary-strong);
1965
+ }
1966
+ :host([bordered][variant='secondary']) {
1967
+ --_border-color: var(--lt-border-secondary-strong);
1968
+ }
1969
+ :host([bordered][variant='neutral']) {
1970
+ --_border-color: var(--lt-border-strong);
1971
+ }
1972
+ :host([bordered][variant='success']) {
1973
+ --_border-color: var(--lt-border-success-strong);
1974
+ }
1975
+ :host([bordered][variant='warning']) {
1976
+ --_border-color: var(--lt-border-warning-strong);
1977
+ }
1978
+ :host([bordered][variant='error']) {
1979
+ --_border-color: var(--lt-border-error-strong);
1980
+ }
1981
+ :host([bordered][variant='info']) {
1982
+ --_border-color: var(--lt-border-info-strong);
1983
+ }
1984
+
1897
1985
  /* round shape */
1898
1986
  :host([round]) [part='base'] {
1899
1987
  border-radius: 50%;
@@ -1910,6 +1998,7 @@ var IconButton = class extends ThemeableElement {
1910
1998
  this.label = "";
1911
1999
  this.variant = "neutral";
1912
2000
  this.appearance = "ghost";
2001
+ this.bordered = false;
1913
2002
  this.size = "md";
1914
2003
  this.disabled = false;
1915
2004
  this.href = "";
@@ -1956,6 +2045,9 @@ __decorateClass([
1956
2045
  __decorateClass([
1957
2046
  property8({ reflect: true })
1958
2047
  ], IconButton.prototype, "appearance", 2);
2048
+ __decorateClass([
2049
+ property8({ type: Boolean, reflect: true })
2050
+ ], IconButton.prototype, "bordered", 2);
1959
2051
  __decorateClass([
1960
2052
  property8({ reflect: true })
1961
2053
  ], IconButton.prototype, "size", 2);
@@ -2078,6 +2170,8 @@ var Dialog = class extends ThemeableElement {
2078
2170
  this.closeOnEscape = true;
2079
2171
  this.uppercase = false;
2080
2172
  this.backdropBlur = false;
2173
+ this.elevation = "4";
2174
+ this.appearance = "filled";
2081
2175
  this.handleKeydown = (event) => {
2082
2176
  if (this.open && this.closeOnEscape && event.key === "Escape") {
2083
2177
  event.preventDefault();
@@ -2155,7 +2249,8 @@ var Dialog = class extends ThemeableElement {
2155
2249
  return html9`
2156
2250
  <div class="backdrop" ?inert=${!this.open} @click=${this.handleBackdropClick} part="backdrop">
2157
2251
  <lt-surface
2158
- elevation="4"
2252
+ elevation=${this.elevation}
2253
+ appearance=${this.appearance}
2159
2254
  role="dialog"
2160
2255
  aria-modal="true"
2161
2256
  aria-labelledby="dialog-title"
@@ -2222,6 +2317,12 @@ __decorateClass([
2222
2317
  __decorateClass([
2223
2318
  property10({ type: Boolean, reflect: true, attribute: "backdrop-blur" })
2224
2319
  ], Dialog.prototype, "backdropBlur", 2);
2320
+ __decorateClass([
2321
+ property10({ reflect: true })
2322
+ ], Dialog.prototype, "elevation", 2);
2323
+ __decorateClass([
2324
+ property10({ reflect: true })
2325
+ ], Dialog.prototype, "appearance", 2);
2225
2326
  __decorateClass([
2226
2327
  query3("lt-surface")
2227
2328
  ], Dialog.prototype, "dialogElement", 2);
@@ -4744,7 +4845,15 @@ var Select = class extends ThemeableElement {
4744
4845
  </span>
4745
4846
  <lt-icon class="icon-end" name="caret-down"></lt-icon>
4746
4847
  </div>
4747
- <lt-surface class="dropdown" popover="manual" elevation="2" role="listbox">
4848
+ <lt-surface
4849
+ class="dropdown"
4850
+ popover="manual"
4851
+ elevation="2"
4852
+ appearance="outlined"
4853
+ background="--lt-bg-default"
4854
+ role="listbox"
4855
+ part="listbox"
4856
+ >
4748
4857
  <div class="options-container">
4749
4858
  ${this.options.map(
4750
4859
  (option) => html14`
@@ -7289,6 +7398,8 @@ var Snackbar = class extends ThemeableElement {
7289
7398
  this.closable = true;
7290
7399
  this.actionLabel = "";
7291
7400
  this.icon = "";
7401
+ this.elevation = "5";
7402
+ this.appearance = "filled";
7292
7403
  }
7293
7404
  /** Shows the snackbar and starts the auto-dismiss timer. */
7294
7405
  show() {
@@ -7341,7 +7452,7 @@ var Snackbar = class extends ThemeableElement {
7341
7452
  render() {
7342
7453
  const iconName = this._resolvedIcon;
7343
7454
  return html24`
7344
- <lt-surface elevation="5" background=${Snackbar._bgMap[this.variant]}>
7455
+ <lt-surface elevation=${this.elevation} appearance=${this.appearance} background=${Snackbar._bgMap[this.variant]}>
7345
7456
  <div class="inner" role="status" aria-live="polite" part="base">
7346
7457
  ${iconName ? html24`<lt-icon class="variant-icon" name=${iconName} part="icon"></lt-icon>` : ""}
7347
7458
  <span class="message" part="message">
@@ -7388,6 +7499,12 @@ __decorateClass([
7388
7499
  __decorateClass([
7389
7500
  property25({ reflect: true })
7390
7501
  ], Snackbar.prototype, "icon", 2);
7502
+ __decorateClass([
7503
+ property25({ reflect: true })
7504
+ ], Snackbar.prototype, "elevation", 2);
7505
+ __decorateClass([
7506
+ property25({ reflect: true })
7507
+ ], Snackbar.prototype, "appearance", 2);
7391
7508
  Snackbar = __decorateClass([
7392
7509
  customElement24("lt-snackbar")
7393
7510
  ], Snackbar);
@@ -7911,6 +8028,7 @@ var dropdownStyles = [
7911
8028
 
7912
8029
  lt-surface.menu::part(surface) {
7913
8030
  overflow: hidden;
8031
+ padding-block: var(--lt-dropdown-menu-padding, var(--lt-spacing-2));
7914
8032
  }
7915
8033
  `
7916
8034
  ];
@@ -9109,28 +9227,28 @@ var sidepanelStyles = css38`
9109
9227
  inset-block: 0;
9110
9228
  left: 0;
9111
9229
  transform: translateX(-100%);
9112
- box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
9230
+ box-shadow: var(--lt-sidepanel-shadow, 4px 0 24px rgba(0, 0, 0, 0.12));
9113
9231
  }
9114
9232
 
9115
9233
  :host([anchor='right']) [part='panel'] {
9116
9234
  inset-block: 0;
9117
9235
  right: 0;
9118
9236
  transform: translateX(100%);
9119
- box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
9237
+ box-shadow: var(--lt-sidepanel-shadow, -4px 0 24px rgba(0, 0, 0, 0.12));
9120
9238
  }
9121
9239
 
9122
9240
  :host([anchor='top']) [part='panel'] {
9123
9241
  inset-inline: 0;
9124
9242
  top: 0;
9125
9243
  transform: translateY(-100%);
9126
- box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
9244
+ box-shadow: var(--lt-sidepanel-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));
9127
9245
  }
9128
9246
 
9129
9247
  :host([anchor='bottom']) [part='panel'] {
9130
9248
  inset-inline: 0;
9131
9249
  bottom: 0;
9132
9250
  transform: translateY(100%);
9133
- box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
9251
+ box-shadow: var(--lt-sidepanel-shadow, 0 -4px 24px rgba(0, 0, 0, 0.12));
9134
9252
  }
9135
9253
 
9136
9254
  /* ── Open state — must come after anchors to win the cascade ────────────── */
@@ -9171,6 +9289,7 @@ var sidepanelStyles = css38`
9171
9289
  .body {
9172
9290
  flex: 1;
9173
9291
  overflow-y: auto;
9292
+ padding: var(--lt-spacing-5);
9174
9293
  }
9175
9294
 
9176
9295
  /* ── Reduced motion ─────────────────────────────────────────────────────── */
@@ -430,6 +430,12 @@
430
430
  ],
431
431
  "default": "filled"
432
432
  },
433
+ {
434
+ "name": "bordered",
435
+ "description": "Adds a variant-colored border on top of the current appearance. A no-op on\n`outlined` (which already has one); adds a border to `filled`/`ghost`.",
436
+ "type": "boolean",
437
+ "default": false
438
+ },
433
439
  {
434
440
  "name": "size",
435
441
  "description": "Size of the button (affects height, font size, and padding).",
@@ -1114,6 +1120,18 @@
1114
1120
  "description": "Apply a frosted-glass blur effect to the backdrop.",
1115
1121
  "type": "boolean",
1116
1122
  "default": false
1123
+ },
1124
+ {
1125
+ "name": "elevation",
1126
+ "description": "Elevation level of the internal surface, matching `lt-surface`'s scale.",
1127
+ "type": "text",
1128
+ "default": "4"
1129
+ },
1130
+ {
1131
+ "name": "appearance",
1132
+ "description": "Visual appearance of the internal surface, matching `lt-surface`'s vocabulary.",
1133
+ "type": "text",
1134
+ "default": "filled"
1117
1135
  }
1118
1136
  ]
1119
1137
  },
@@ -1243,6 +1261,12 @@
1243
1261
  ],
1244
1262
  "default": "ghost"
1245
1263
  },
1264
+ {
1265
+ "name": "bordered",
1266
+ "description": "Adds a variant-colored border on top of the current appearance. A no-op on\n`outlined` (which already has one); adds a border to `filled`/`ghost`.",
1267
+ "type": "boolean",
1268
+ "default": false
1269
+ },
1246
1270
  {
1247
1271
  "name": "size",
1248
1272
  "description": "Size of the button.",
@@ -1954,6 +1978,18 @@
1954
1978
  "description": "Icon to show before the message. Leave empty for auto (shows variant icon for status variants),\nset to `\"none\"` to suppress, or pass any icon name to override.",
1955
1979
  "type": "icon",
1956
1980
  "default": ""
1981
+ },
1982
+ {
1983
+ "name": "elevation",
1984
+ "description": "Elevation level of the internal surface, matching `lt-surface`'s scale.",
1985
+ "type": "text",
1986
+ "default": "5"
1987
+ },
1988
+ {
1989
+ "name": "appearance",
1990
+ "description": "Visual appearance of the internal surface, matching `lt-surface`'s vocabulary.",
1991
+ "type": "text",
1992
+ "default": "filled"
1957
1993
  }
1958
1994
  ]
1959
1995
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latty-ds/web",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Web Components for the Latty design system — framework-agnostic UI components built with Lit",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -224,8 +224,8 @@
224
224
  },
225
225
  "dependencies": {
226
226
  "@floating-ui/dom": "^1.7.6",
227
- "@latty-ds/icons": "0.9.0"
227
+ "@latty-ds/icons": "0.10.0"
228
228
  },
229
229
  "customElements": "custom-elements.json",
230
- "gitHead": "8d5627a4a71bb4c7efdf3b754198c6450ce5467f"
230
+ "gitHead": "7b0b9856be6755a573abf02c0b7cbdb1a6db4fef"
231
231
  }