@latty-ds/web 0.2.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.
Files changed (228) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +106 -0
  3. package/custom-elements.json +8785 -0
  4. package/dist/base/index.d.ts +1 -0
  5. package/dist/base/index.js +35 -0
  6. package/dist/base/themeable-element.d.ts +20 -0
  7. package/dist/components/accordion/accordion.d.ts +82 -0
  8. package/dist/components/accordion/accordion.styles.d.ts +1 -0
  9. package/dist/components/accordion/accordion.types.d.ts +10 -0
  10. package/dist/components/accordion/index.d.ts +8 -0
  11. package/dist/components/accordion/index.js +468 -0
  12. package/dist/components/alert/alert.d.ts +51 -0
  13. package/dist/components/alert/alert.styles.d.ts +1 -0
  14. package/dist/components/alert/alert.types.d.ts +2 -0
  15. package/dist/components/alert/index.d.ts +2 -0
  16. package/dist/components/alert/index.js +746 -0
  17. package/dist/components/avatar/avatar.d.ts +27 -0
  18. package/dist/components/avatar/avatar.styles.d.ts +1 -0
  19. package/dist/components/avatar/avatar.types.d.ts +3 -0
  20. package/dist/components/avatar/index.d.ts +2 -0
  21. package/dist/components/avatar/index.js +222 -0
  22. package/dist/components/badge/badge.d.ts +29 -0
  23. package/dist/components/badge/badge.styles.d.ts +1 -0
  24. package/dist/components/badge/badge.types.d.ts +3 -0
  25. package/dist/components/badge/index.d.ts +2 -0
  26. package/dist/components/badge/index.js +277 -0
  27. package/dist/components/breadcrumb/breadcrumb.d.ts +53 -0
  28. package/dist/components/breadcrumb/breadcrumb.styles.d.ts +2 -0
  29. package/dist/components/breadcrumb/breadcrumb.types.d.ts +1 -0
  30. package/dist/components/breadcrumb/index.d.ts +2 -0
  31. package/dist/components/breadcrumb/index.js +166 -0
  32. package/dist/components/button/button.d.ts +111 -0
  33. package/dist/components/button/button.styles.d.ts +1 -0
  34. package/dist/components/button/button.types.d.ts +38 -0
  35. package/dist/components/button/index.d.ts +8 -0
  36. package/dist/components/button/index.js +466 -0
  37. package/dist/components/calendar/calendar.d.ts +84 -0
  38. package/dist/components/calendar/calendar.styles.d.ts +1 -0
  39. package/dist/components/calendar/calendar.types.d.ts +15 -0
  40. package/dist/components/calendar/index.d.ts +1 -0
  41. package/dist/components/calendar/index.js +958 -0
  42. package/dist/components/checkbox/checkbox.d.ts +113 -0
  43. package/dist/components/checkbox/checkbox.styles.d.ts +1 -0
  44. package/dist/components/checkbox/checkbox.types.d.ts +21 -0
  45. package/dist/components/checkbox/index.d.ts +8 -0
  46. package/dist/components/checkbox/index.js +320 -0
  47. package/dist/components/chip/chip.d.ts +35 -0
  48. package/dist/components/chip/chip.styles.d.ts +1 -0
  49. package/dist/components/chip/chip.types.d.ts +3 -0
  50. package/dist/components/chip/index.d.ts +2 -0
  51. package/dist/components/chip/index.js +282 -0
  52. package/dist/components/color-input/color-input.d.ts +55 -0
  53. package/dist/components/color-input/color-input.styles.d.ts +1 -0
  54. package/dist/components/color-input/color-input.types.d.ts +2 -0
  55. package/dist/components/color-input/index.d.ts +1 -0
  56. package/dist/components/color-input/index.js +489 -0
  57. package/dist/components/combobox/combobox.d.ts +59 -0
  58. package/dist/components/combobox/combobox.styles.d.ts +1 -0
  59. package/dist/components/combobox/combobox.types.d.ts +7 -0
  60. package/dist/components/combobox/index.d.ts +2 -0
  61. package/dist/components/combobox/index.js +1988 -0
  62. package/dist/components/date-input/date-input.d.ts +66 -0
  63. package/dist/components/date-input/date-input.styles.d.ts +1 -0
  64. package/dist/components/date-input/date-input.types.d.ts +3 -0
  65. package/dist/components/date-input/index.d.ts +2 -0
  66. package/dist/components/date-input/index.js +2863 -0
  67. package/dist/components/datepicker/datepicker.d.ts +52 -0
  68. package/dist/components/datepicker/datepicker.styles.d.ts +1 -0
  69. package/dist/components/datepicker/datepicker.types.d.ts +3 -0
  70. package/dist/components/datepicker/index.d.ts +2 -0
  71. package/dist/components/datepicker/index.js +416 -0
  72. package/dist/components/dialog/dialog.d.ts +114 -0
  73. package/dist/components/dialog/dialog.styles.d.ts +1 -0
  74. package/dist/components/dialog/dialog.types.d.ts +11 -0
  75. package/dist/components/dialog/index.d.ts +2 -0
  76. package/dist/components/dialog/index.js +920 -0
  77. package/dist/components/divider/divider.d.ts +35 -0
  78. package/dist/components/divider/divider.styles.d.ts +1 -0
  79. package/dist/components/divider/divider.types.d.ts +2 -0
  80. package/dist/components/divider/index.d.ts +2 -0
  81. package/dist/components/divider/index.js +149 -0
  82. package/dist/components/dropdown/dropdown-item.d.ts +24 -0
  83. package/dist/components/dropdown/dropdown-item.styles.d.ts +1 -0
  84. package/dist/components/dropdown/dropdown.d.ts +30 -0
  85. package/dist/components/dropdown/dropdown.styles.d.ts +1 -0
  86. package/dist/components/dropdown/dropdown.types.d.ts +1 -0
  87. package/dist/components/dropdown/index.d.ts +3 -0
  88. package/dist/components/dropdown/index.js +1791 -0
  89. package/dist/components/header/header.d.ts +19 -0
  90. package/dist/components/header/header.styles.d.ts +1 -0
  91. package/dist/components/header/header.types.d.ts +1 -0
  92. package/dist/components/header/index.d.ts +2 -0
  93. package/dist/components/header/index.js +104 -0
  94. package/dist/components/icon-button/icon-button.d.ts +52 -0
  95. package/dist/components/icon-button/icon-button.styles.d.ts +1 -0
  96. package/dist/components/icon-button/icon-button.types.d.ts +8 -0
  97. package/dist/components/icon-button/index.d.ts +1 -0
  98. package/dist/components/icon-button/index.js +342 -0
  99. package/dist/components/image/image.d.ts +26 -0
  100. package/dist/components/image/image.styles.d.ts +1 -0
  101. package/dist/components/image/image.types.d.ts +0 -0
  102. package/dist/components/image/index.d.ts +1 -0
  103. package/dist/components/image/index.js +105 -0
  104. package/dist/components/link/index.d.ts +1 -0
  105. package/dist/components/link/index.js +108 -0
  106. package/dist/components/link/link.d.ts +22 -0
  107. package/dist/components/link/link.styles.d.ts +1 -0
  108. package/dist/components/link/link.types.d.ts +1 -0
  109. package/dist/components/list/index.d.ts +9 -0
  110. package/dist/components/list/index.js +254 -0
  111. package/dist/components/list/list-item.d.ts +41 -0
  112. package/dist/components/list/list-item.styles.d.ts +1 -0
  113. package/dist/components/list/list.d.ts +85 -0
  114. package/dist/components/list/list.styles.d.ts +1 -0
  115. package/dist/components/list/list.types.d.ts +16 -0
  116. package/dist/components/nav/index.d.ts +3 -0
  117. package/dist/components/nav/index.js +345 -0
  118. package/dist/components/nav/nav-item.d.ts +73 -0
  119. package/dist/components/nav/nav.d.ts +49 -0
  120. package/dist/components/nav/nav.styles.d.ts +2 -0
  121. package/dist/components/nav/nav.types.d.ts +1 -0
  122. package/dist/components/pagination/index.d.ts +2 -0
  123. package/dist/components/pagination/index.js +210 -0
  124. package/dist/components/pagination/pagination.d.ts +34 -0
  125. package/dist/components/pagination/pagination.styles.d.ts +1 -0
  126. package/dist/components/pagination/pagination.types.d.ts +1 -0
  127. package/dist/components/progress/index.d.ts +2 -0
  128. package/dist/components/progress/index.js +167 -0
  129. package/dist/components/progress/progress.d.ts +44 -0
  130. package/dist/components/progress/progress.styles.d.ts +1 -0
  131. package/dist/components/progress/progress.types.d.ts +2 -0
  132. package/dist/components/radio/index.d.ts +8 -0
  133. package/dist/components/radio/index.js +294 -0
  134. package/dist/components/radio/radio.d.ts +96 -0
  135. package/dist/components/radio/radio.styles.d.ts +1 -0
  136. package/dist/components/radio/radio.types.d.ts +21 -0
  137. package/dist/components/radio-group/index.d.ts +8 -0
  138. package/dist/components/radio-group/index.js +384 -0
  139. package/dist/components/radio-group/radio-group.d.ts +100 -0
  140. package/dist/components/radio-group/radio-group.styles.d.ts +1 -0
  141. package/dist/components/radio-group/radio-group.types.d.ts +8 -0
  142. package/dist/components/select/index.d.ts +8 -0
  143. package/dist/components/select/index.js +2123 -0
  144. package/dist/components/select/select.d.ts +129 -0
  145. package/dist/components/select/select.styles.d.ts +1 -0
  146. package/dist/components/select/select.types.d.ts +37 -0
  147. package/dist/components/shared/backdrop.styles.d.ts +1 -0
  148. package/dist/components/shared/floating.d.ts +10 -0
  149. package/dist/components/sidepanel/index.d.ts +1 -0
  150. package/dist/components/sidepanel/index.js +768 -0
  151. package/dist/components/sidepanel/sidepanel.d.ts +48 -0
  152. package/dist/components/sidepanel/sidepanel.styles.d.ts +1 -0
  153. package/dist/components/sidepanel/sidepanel.types.d.ts +1 -0
  154. package/dist/components/skeleton/index.d.ts +2 -0
  155. package/dist/components/skeleton/index.js +129 -0
  156. package/dist/components/skeleton/skeleton.d.ts +39 -0
  157. package/dist/components/skeleton/skeleton.styles.d.ts +1 -0
  158. package/dist/components/skeleton/skeleton.types.d.ts +1 -0
  159. package/dist/components/slider/index.d.ts +2 -0
  160. package/dist/components/slider/index.js +635 -0
  161. package/dist/components/slider/slider.d.ts +33 -0
  162. package/dist/components/slider/slider.styles.d.ts +1 -0
  163. package/dist/components/slider/slider.types.d.ts +1 -0
  164. package/dist/components/snackbar/index.d.ts +2 -0
  165. package/dist/components/snackbar/index.js +358 -0
  166. package/dist/components/snackbar/snackbar.d.ts +63 -0
  167. package/dist/components/snackbar/snackbar.styles.d.ts +1 -0
  168. package/dist/components/snackbar/snackbar.types.d.ts +1 -0
  169. package/dist/components/spinner/index.d.ts +8 -0
  170. package/dist/components/spinner/index.js +131 -0
  171. package/dist/components/spinner/spineer.styles.d.ts +1 -0
  172. package/dist/components/spinner/spinner.d.ts +52 -0
  173. package/dist/components/spinner/spinner.types.d.ts +18 -0
  174. package/dist/components/surface/index.d.ts +8 -0
  175. package/dist/components/surface/index.js +128 -0
  176. package/dist/components/surface/surface.d.ts +48 -0
  177. package/dist/components/surface/surface.styles.d.ts +1 -0
  178. package/dist/components/surface/surface.types.d.ts +20 -0
  179. package/dist/components/switch/index.d.ts +8 -0
  180. package/dist/components/switch/index.js +293 -0
  181. package/dist/components/switch/switch.d.ts +90 -0
  182. package/dist/components/switch/switch.styles.d.ts +1 -0
  183. package/dist/components/switch/switch.types.d.ts +21 -0
  184. package/dist/components/tab/index.d.ts +9 -0
  185. package/dist/components/tab/index.js +252 -0
  186. package/dist/components/tab/tab-panel.d.ts +28 -0
  187. package/dist/components/tab/tab-panel.styles.d.ts +1 -0
  188. package/dist/components/tab/tab.d.ts +59 -0
  189. package/dist/components/tab/tab.styles.d.ts +1 -0
  190. package/dist/components/tab/tab.types.d.ts +7 -0
  191. package/dist/components/tab-group/index.d.ts +8 -0
  192. package/dist/components/tab-group/index.js +441 -0
  193. package/dist/components/tab-group/tab-group.d.ts +99 -0
  194. package/dist/components/tab-group/tab-group.styles.d.ts +1 -0
  195. package/dist/components/tab-group/tab-group.types.d.ts +11 -0
  196. package/dist/components/table/index.d.ts +2 -0
  197. package/dist/components/table/index.js +582 -0
  198. package/dist/components/table/table.d.ts +160 -0
  199. package/dist/components/table/table.styles.d.ts +1 -0
  200. package/dist/components/table/table.types.d.ts +106 -0
  201. package/dist/components/text/index.d.ts +1 -0
  202. package/dist/components/text/index.js +207 -0
  203. package/dist/components/text/text.d.ts +32 -0
  204. package/dist/components/text/text.styles.d.ts +1 -0
  205. package/dist/components/text/text.types.d.ts +2 -0
  206. package/dist/components/textfield/index.d.ts +8 -0
  207. package/dist/components/textfield/index.js +718 -0
  208. package/dist/components/textfield/textfield.d.ts +168 -0
  209. package/dist/components/textfield/textfield.styles.d.ts +1 -0
  210. package/dist/components/textfield/textfield.types.d.ts +40 -0
  211. package/dist/components/tooltip/index.d.ts +2 -0
  212. package/dist/components/tooltip/index.js +379 -0
  213. package/dist/components/tooltip/tooltip.d.ts +42 -0
  214. package/dist/components/tooltip/tooltip.styles.d.ts +1 -0
  215. package/dist/components/tooltip/tooltip.types.d.ts +1 -0
  216. package/dist/css/font-face.css +22 -0
  217. package/dist/css/latty.css +57 -0
  218. package/dist/fonts/HankenGrotesk-Variable.woff2 +0 -0
  219. package/dist/fonts/HankenGrotesk-VariableItalic.woff2 +0 -0
  220. package/dist/index.cjs +12739 -0
  221. package/dist/index.d.ts +101 -0
  222. package/dist/index.js +11406 -0
  223. package/dist/manifest.json +2396 -0
  224. package/dist/utils/click-outside.d.ts +22 -0
  225. package/dist/utils/color.d.ts +14 -0
  226. package/dist/utils/dispatch.d.ts +18 -0
  227. package/dist/utils/index.d.ts +3 -0
  228. package/package.json +231 -0
@@ -0,0 +1,920 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+
12
+ // src/components/dialog/dialog.ts
13
+ import { html as html4 } from "lit";
14
+
15
+ // src/base/themeable-element.ts
16
+ import { LitElement } from "lit";
17
+ import { property } from "lit/decorators.js";
18
+ var ThemeableElement = class extends LitElement {
19
+ willUpdate(changed) {
20
+ super.willUpdate(changed);
21
+ if (changed.has("theme")) {
22
+ this._syncThemeAttribute();
23
+ }
24
+ }
25
+ _syncThemeAttribute() {
26
+ if (this.theme === "dark" || this.theme === "light") {
27
+ this.setAttribute("data-theme", this.theme);
28
+ } else {
29
+ this.removeAttribute("data-theme");
30
+ }
31
+ }
32
+ };
33
+ __decorateClass([
34
+ property({ reflect: true })
35
+ ], ThemeableElement.prototype, "theme", 2);
36
+
37
+ // src/components/dialog/dialog.ts
38
+ import { customElement as customElement4, property as property5, query } from "lit/decorators.js";
39
+
40
+ // src/components/dialog/dialog.styles.ts
41
+ import { css } from "lit";
42
+ var dialogStyles = css`
43
+ :host {
44
+ font-family: 'Hanken Grotesk', sans-serif;
45
+ }
46
+
47
+ /* Backdrop */
48
+ .backdrop {
49
+ align-items: center;
50
+ background: rgba(0, 0, 0, var(--lt-dialog-overlay-opacity, 0.5));
51
+ display: flex;
52
+ height: 100vh;
53
+ justify-content: center;
54
+ left: 0;
55
+ opacity: 0;
56
+ padding: var(--lt-spacing-4);
57
+ position: fixed;
58
+ top: 0;
59
+ transition: opacity 200ms ease;
60
+ width: 100vw;
61
+ z-index: 1000;
62
+ }
63
+
64
+ :host([open]) .backdrop {
65
+ opacity: 1;
66
+ }
67
+
68
+ :host(:not([open])) .backdrop {
69
+ pointer-events: none;
70
+ }
71
+
72
+ /* lt-surface host — flex item inside .backdrop, sized per size variant */
73
+ lt-surface {
74
+ width: 100%;
75
+ }
76
+
77
+ :host([size='sm']) lt-surface {
78
+ max-width: 400px;
79
+ }
80
+ :host([size='md']) lt-surface {
81
+ max-width: 600px;
82
+ }
83
+ :host([size='lg']) lt-surface {
84
+ max-width: 800px;
85
+ }
86
+ :host([size='xl']) lt-surface {
87
+ max-width: 1000px;
88
+ }
89
+
90
+ :host([size='fullscreen']) .backdrop {
91
+ padding: 0;
92
+ }
93
+
94
+ :host([size='fullscreen']) lt-surface {
95
+ height: 100vh;
96
+ max-height: 100vh;
97
+ max-width: 100vw;
98
+ }
99
+
100
+ /* lt-surface inner div — layout and animation */
101
+ lt-surface::part(surface) {
102
+ display: flex;
103
+ flex-direction: column;
104
+ max-height: calc(100vh - var(--lt-spacing-8));
105
+ opacity: 0;
106
+ position: relative;
107
+ transform: translateY(16px);
108
+ transition:
109
+ opacity 220ms ease,
110
+ transform 220ms cubic-bezier(0.34, 1.2, 0.64, 1);
111
+ }
112
+
113
+ :host([open]) lt-surface::part(surface) {
114
+ opacity: 1;
115
+ transform: translateY(0);
116
+ }
117
+
118
+ :host([size='fullscreen']) lt-surface::part(surface) {
119
+ border-radius: 0;
120
+ max-height: 100vh;
121
+ }
122
+
123
+ /* Header */
124
+ .header {
125
+ align-items: center;
126
+ border-bottom: 1px solid var(--lt-border-default);
127
+ display: flex;
128
+ gap: var(--lt-spacing-4);
129
+ padding: var(--lt-spacing-5);
130
+ position: relative;
131
+ }
132
+
133
+ .header-content {
134
+ flex: 1;
135
+ }
136
+
137
+ .title {
138
+ color: var(--lt-text-default);
139
+ }
140
+
141
+ .close-button {
142
+ flex-shrink: 0;
143
+ }
144
+
145
+ /* Body */
146
+ .body {
147
+ color: var(--lt-color-neutral-700);
148
+ flex: 1;
149
+ overflow-y: auto;
150
+ padding: var(--lt-spacing-5);
151
+ }
152
+
153
+ /* Footer */
154
+ .footer {
155
+ border-top: 1px solid var(--lt-border-default);
156
+ display: flex;
157
+ gap: var(--lt-spacing-3);
158
+ justify-content: flex-end;
159
+ padding: var(--lt-spacing-5);
160
+ }
161
+
162
+ :host([uppercase]) .title::part(base) {
163
+ font-variant-caps: small-caps;
164
+ letter-spacing: 0.05rem;
165
+ text-transform: lowercase;
166
+ }
167
+ `;
168
+
169
+ // src/components/shared/backdrop.styles.ts
170
+ import { css as css2 } from "lit";
171
+ var backdropFeatureStyles = css2`
172
+ :host([backdrop-blur]) .backdrop,
173
+ :host([backdrop-blur]) [part='overlay'] {
174
+ backdrop-filter: blur(6px);
175
+ -webkit-backdrop-filter: blur(6px);
176
+ }
177
+ `;
178
+
179
+ // src/components/icon-button/icon-button.ts
180
+ import { html, nothing } from "lit";
181
+ import { customElement, property as property2 } from "lit/decorators.js";
182
+ import { ifDefined } from "lit/directives/if-defined.js";
183
+
184
+ // src/components/icon-button/icon-button.styles.ts
185
+ import { css as css3 } from "lit";
186
+ var iconButtonStyles = css3`
187
+ :host {
188
+ display: inline-flex;
189
+
190
+ /* Internal state props — set per variant/appearance below */
191
+ --_color: var(--lt-text-subtle);
192
+ --_bg: transparent;
193
+ --_border-color: transparent;
194
+ --_hover-bg: var(--lt-bg-subtle);
195
+ --_hover-color: var(--lt-text-default);
196
+ --_active-bg: var(--lt-bg-subtle);
197
+ }
198
+
199
+ [part='base'] {
200
+ align-items: center;
201
+ background: var(--lt-icon-button-bg, var(--_bg));
202
+ border-radius: var(--lt-border-radius);
203
+ border: 1px solid var(--lt-icon-button-border-color, var(--_border-color));
204
+ box-sizing: border-box;
205
+ color: var(--lt-icon-button-color, var(--_color));
206
+ cursor: pointer;
207
+ display: inline-flex;
208
+ justify-content: center;
209
+ padding: 0;
210
+ transition:
211
+ background-color 120ms ease,
212
+ border-color 120ms ease,
213
+ transform 50ms ease;
214
+ user-select: none;
215
+ }
216
+
217
+ [part='base']:hover:not([disabled]) {
218
+ background: var(--lt-icon-button-hover-bg, var(--_hover-bg));
219
+ color: var(--lt-icon-button-hover-color, var(--lt-icon-button-color, var(--_hover-color)));
220
+ }
221
+
222
+ [part='base']:active {
223
+ transform: translateY(1px);
224
+ }
225
+
226
+ [part='base']:active:not([disabled]) {
227
+ background: var(--lt-icon-button-hover-bg, var(--_active-bg));
228
+ }
229
+
230
+ [part='base']:focus-visible {
231
+ outline: 3px solid var(--lt-border-focus);
232
+ outline-offset: 2px;
233
+ }
234
+
235
+ [part='base'][disabled] {
236
+ cursor: not-allowed;
237
+ opacity: 0.5;
238
+ pointer-events: none;
239
+ transform: none;
240
+ }
241
+
242
+ a[part='base'] {
243
+ text-decoration: none;
244
+ color: inherit;
245
+ }
246
+
247
+ /* sizes */
248
+ :host([size='sm']) [part='base'] {
249
+ height: 28px;
250
+ width: 28px;
251
+ }
252
+
253
+ :host([size='md']) [part='base'] {
254
+ height: 36px;
255
+ width: 36px;
256
+ }
257
+
258
+ :host([size='lg']) [part='base'] {
259
+ height: 44px;
260
+ width: 44px;
261
+ }
262
+
263
+ /* ── ghost ────────────────────────────────────────────────── */
264
+ :host([appearance='ghost'][variant='primary']) {
265
+ --_color: var(--lt-text-primary);
266
+ --_hover-bg: var(--lt-bg-primary-subtle);
267
+ --_hover-color: var(--lt-text-primary);
268
+ --_active-bg: var(--lt-bg-primary-subtle);
269
+ }
270
+ :host([appearance='ghost'][variant='secondary']) {
271
+ --_color: var(--lt-text-secondary);
272
+ --_hover-bg: var(--lt-bg-secondary-subtle);
273
+ --_hover-color: var(--lt-text-secondary);
274
+ --_active-bg: var(--lt-bg-secondary-subtle);
275
+ }
276
+ :host([appearance='ghost'][variant='success']) {
277
+ --_color: var(--lt-text-success);
278
+ --_hover-bg: var(--lt-bg-success-subtle);
279
+ --_hover-color: var(--lt-text-success);
280
+ --_active-bg: var(--lt-bg-success-subtle);
281
+ }
282
+ :host([appearance='ghost'][variant='warning']) {
283
+ --_color: var(--lt-text-warning);
284
+ --_hover-bg: var(--lt-bg-warning-subtle);
285
+ --_hover-color: var(--lt-text-warning);
286
+ --_active-bg: var(--lt-bg-warning-subtle);
287
+ }
288
+ :host([appearance='ghost'][variant='error']) {
289
+ --_color: var(--lt-text-error);
290
+ --_hover-bg: var(--lt-bg-error-subtle);
291
+ --_hover-color: var(--lt-text-error);
292
+ --_active-bg: var(--lt-bg-error-subtle);
293
+ }
294
+ :host([appearance='ghost'][variant='info']) {
295
+ --_color: var(--lt-text-info);
296
+ --_hover-bg: var(--lt-bg-info-subtle);
297
+ --_hover-color: var(--lt-text-info);
298
+ --_active-bg: var(--lt-bg-info-subtle);
299
+ }
300
+
301
+ /* ── filled ───────────────────────────────────────────────── */
302
+ :host([appearance='filled'][variant='primary']) {
303
+ --_bg: var(--lt-interactive-primary-bg);
304
+ --_color: var(--lt-text-on-primary);
305
+ --_hover-bg: var(--lt-interactive-primary-bg-hover);
306
+ --_hover-color: var(--lt-text-on-primary);
307
+ --_active-bg: var(--lt-interactive-primary-bg-active);
308
+ }
309
+ :host([appearance='filled'][variant='secondary']) {
310
+ --_bg: var(--lt-interactive-secondary-bg);
311
+ --_color: var(--lt-text-on-secondary);
312
+ --_hover-bg: var(--lt-interactive-secondary-bg-hover);
313
+ --_hover-color: var(--lt-text-on-secondary);
314
+ --_active-bg: var(--lt-interactive-secondary-bg-active);
315
+ }
316
+ :host([appearance='filled'][variant='neutral']) {
317
+ --_bg: var(--lt-color-neutral-500);
318
+ --_color: var(--lt-color-neutral-50);
319
+ --_hover-bg: var(--lt-color-neutral-700);
320
+ --_hover-color: var(--lt-color-neutral-50);
321
+ --_active-bg: var(--lt-color-neutral-800);
322
+ }
323
+ :host([appearance='filled'][variant='success']) {
324
+ --_bg: var(--lt-interactive-success-bg);
325
+ --_color: var(--lt-text-on-success);
326
+ --_hover-bg: var(--lt-interactive-success-bg-hover);
327
+ --_hover-color: var(--lt-text-on-success);
328
+ --_active-bg: var(--lt-interactive-success-bg-active);
329
+ }
330
+ :host([appearance='filled'][variant='warning']) {
331
+ --_bg: var(--lt-interactive-warning-bg);
332
+ --_color: var(--lt-text-on-warning);
333
+ --_hover-bg: var(--lt-interactive-warning-bg-hover);
334
+ --_hover-color: var(--lt-text-on-warning);
335
+ --_active-bg: var(--lt-interactive-warning-bg-active);
336
+ }
337
+ :host([appearance='filled'][variant='error']) {
338
+ --_bg: var(--lt-interactive-error-bg);
339
+ --_color: var(--lt-text-on-error);
340
+ --_hover-bg: var(--lt-interactive-error-bg-hover);
341
+ --_hover-color: var(--lt-text-on-error);
342
+ --_active-bg: var(--lt-interactive-error-bg-active);
343
+ }
344
+ :host([appearance='filled'][variant='info']) {
345
+ --_bg: var(--lt-interactive-info-bg);
346
+ --_color: var(--lt-text-on-info);
347
+ --_hover-bg: var(--lt-interactive-info-bg-hover);
348
+ --_hover-color: var(--lt-text-on-info);
349
+ --_active-bg: var(--lt-interactive-info-bg-active);
350
+ }
351
+
352
+ /* ── outlined ─────────────────────────────────────────────── */
353
+ :host([appearance='outlined'][variant='primary']) {
354
+ --_color: var(--lt-text-primary);
355
+ --_border-color: var(--lt-border-primary-strong);
356
+ --_hover-bg: var(--lt-bg-primary-subtle);
357
+ --_hover-color: var(--lt-text-primary);
358
+ --_active-bg: var(--lt-bg-primary-subtle);
359
+ }
360
+ :host([appearance='outlined'][variant='secondary']) {
361
+ --_color: var(--lt-text-secondary);
362
+ --_border-color: var(--lt-border-secondary-strong);
363
+ --_hover-bg: var(--lt-bg-secondary-subtle);
364
+ --_hover-color: var(--lt-text-secondary);
365
+ --_active-bg: var(--lt-bg-secondary-subtle);
366
+ }
367
+ :host([appearance='outlined'][variant='neutral']) {
368
+ --_color: var(--lt-text-neutral);
369
+ --_border-color: var(--lt-border-strong);
370
+ --_hover-bg: var(--lt-bg-subtle);
371
+ --_hover-color: var(--lt-text-default);
372
+ --_active-bg: var(--lt-bg-subtle);
373
+ }
374
+ :host([appearance='outlined'][variant='success']) {
375
+ --_color: var(--lt-text-success);
376
+ --_border-color: var(--lt-border-success-strong);
377
+ --_hover-bg: var(--lt-bg-success-subtle);
378
+ --_hover-color: var(--lt-text-success);
379
+ --_active-bg: var(--lt-bg-success-subtle);
380
+ }
381
+ :host([appearance='outlined'][variant='warning']) {
382
+ --_color: var(--lt-text-warning);
383
+ --_border-color: var(--lt-border-warning-strong);
384
+ --_hover-bg: var(--lt-bg-warning-subtle);
385
+ --_hover-color: var(--lt-text-warning);
386
+ --_active-bg: var(--lt-bg-warning-subtle);
387
+ }
388
+ :host([appearance='outlined'][variant='error']) {
389
+ --_color: var(--lt-text-error);
390
+ --_border-color: var(--lt-border-error-strong);
391
+ --_hover-bg: var(--lt-bg-error-subtle);
392
+ --_hover-color: var(--lt-text-error);
393
+ --_active-bg: var(--lt-bg-error-subtle);
394
+ }
395
+ :host([appearance='outlined'][variant='info']) {
396
+ --_color: var(--lt-text-info);
397
+ --_border-color: var(--lt-border-info-strong);
398
+ --_hover-bg: var(--lt-bg-info-subtle);
399
+ --_hover-color: var(--lt-text-info);
400
+ --_active-bg: var(--lt-bg-info-subtle);
401
+ }
402
+
403
+ /* round shape */
404
+ :host([round]) [part='base'] {
405
+ border-radius: 50%;
406
+ }
407
+ `;
408
+
409
+ // src/components/icon-button/icon-button.ts
410
+ import "@latty-ds/icons";
411
+ var IconButton = class extends ThemeableElement {
412
+ constructor() {
413
+ super(...arguments);
414
+ this.icon = "";
415
+ this.label = "";
416
+ this.variant = "neutral";
417
+ this.appearance = "ghost";
418
+ this.size = "md";
419
+ this.disabled = false;
420
+ this.href = "";
421
+ this.target = "";
422
+ this.rel = "";
423
+ this.round = false;
424
+ }
425
+ _inner() {
426
+ return this.icon ? html`<lt-icon name=${this.icon}></lt-icon>` : html`<slot></slot>`;
427
+ }
428
+ render() {
429
+ const label = this.label || void 0;
430
+ if (this.href) {
431
+ const rel = this.rel || (this.target === "_blank" ? "noopener noreferrer" : void 0);
432
+ return html`
433
+ <a
434
+ part="base"
435
+ href=${this.href}
436
+ target=${ifDefined(this.target || void 0)}
437
+ rel=${ifDefined(rel)}
438
+ aria-label=${ifDefined(label)}
439
+ aria-disabled=${this.disabled ? "true" : nothing}
440
+ tabindex=${this.disabled ? "-1" : nothing}
441
+ >
442
+ ${this._inner()}
443
+ </a>
444
+ `;
445
+ }
446
+ return html`
447
+ <button part="base" ?disabled=${this.disabled} aria-label=${ifDefined(label)}>${this._inner()}</button>
448
+ `;
449
+ }
450
+ };
451
+ IconButton.styles = iconButtonStyles;
452
+ __decorateClass([
453
+ property2({ reflect: true })
454
+ ], IconButton.prototype, "icon", 2);
455
+ __decorateClass([
456
+ property2({ reflect: true })
457
+ ], IconButton.prototype, "label", 2);
458
+ __decorateClass([
459
+ property2({ reflect: true })
460
+ ], IconButton.prototype, "variant", 2);
461
+ __decorateClass([
462
+ property2({ reflect: true })
463
+ ], IconButton.prototype, "appearance", 2);
464
+ __decorateClass([
465
+ property2({ reflect: true })
466
+ ], IconButton.prototype, "size", 2);
467
+ __decorateClass([
468
+ property2({ type: Boolean, reflect: true })
469
+ ], IconButton.prototype, "disabled", 2);
470
+ __decorateClass([
471
+ property2()
472
+ ], IconButton.prototype, "href", 2);
473
+ __decorateClass([
474
+ property2()
475
+ ], IconButton.prototype, "target", 2);
476
+ __decorateClass([
477
+ property2()
478
+ ], IconButton.prototype, "rel", 2);
479
+ __decorateClass([
480
+ property2({ type: Boolean, reflect: true })
481
+ ], IconButton.prototype, "round", 2);
482
+ IconButton = __decorateClass([
483
+ customElement("lt-icon-button")
484
+ ], IconButton);
485
+
486
+ // src/components/surface/surface.ts
487
+ import { html as html2 } from "lit";
488
+ import { customElement as customElement2, property as property3 } from "lit/decorators.js";
489
+ import { styleMap } from "lit/directives/style-map.js";
490
+
491
+ // src/components/surface/surface.styles.ts
492
+ import { css as css4 } from "lit";
493
+ var surfaceStyles = css4`
494
+ :host {
495
+ display: block;
496
+ font-family: 'Hanken Grotesk', sans-serif;
497
+ }
498
+
499
+ .surface {
500
+ background: var(--lt-surface-bg, var(--lt-bg-subtle));
501
+ border-radius: var(--lt-border-radius);
502
+ box-sizing: border-box;
503
+ transition:
504
+ box-shadow 120ms ease,
505
+ border-color 120ms ease;
506
+ }
507
+
508
+ /* Elevation variants */
509
+ :host([elevation='0']) .surface {
510
+ box-shadow: var(--lt-elevation-0);
511
+ }
512
+ :host([elevation='1']) .surface {
513
+ box-shadow: var(--lt-elevation-1);
514
+ }
515
+ :host([elevation='2']) .surface {
516
+ box-shadow: var(--lt-elevation-2);
517
+ }
518
+ :host([elevation='3']) .surface {
519
+ box-shadow: var(--lt-elevation-3);
520
+ }
521
+ :host([elevation='4']) .surface {
522
+ box-shadow: var(--lt-elevation-4);
523
+ }
524
+ :host([elevation='5']) .surface {
525
+ box-shadow: var(--lt-elevation-5);
526
+ }
527
+
528
+ /* Visual appearances */
529
+ :host([appearance='filled']) .surface {
530
+ border: none;
531
+ }
532
+
533
+ :host([appearance='outlined']) .surface {
534
+ background: var(--lt-surface-bg, transparent);
535
+ border: 1px solid var(--lt-border-default);
536
+ }
537
+
538
+ :host([appearance='outlined']:hover) .surface {
539
+ border-color: var(--lt-border-strong);
540
+ }
541
+ `;
542
+
543
+ // src/utils/color.ts
544
+ var resolveColorValue = (value) => value.startsWith("--") ? `var(${value})` : value;
545
+
546
+ // src/components/surface/surface.ts
547
+ var Surface = class extends ThemeableElement {
548
+ constructor() {
549
+ super(...arguments);
550
+ this.elevation = "1";
551
+ this.appearance = "filled";
552
+ this.background = "";
553
+ }
554
+ render() {
555
+ const style = this.background ? { "--_surface-bg": resolveColorValue(this.background) } : {};
556
+ return html2`
557
+ <div class="surface" part="surface" style=${styleMap(style)}>
558
+ <slot></slot>
559
+ </div>
560
+ `;
561
+ }
562
+ };
563
+ Surface.styles = surfaceStyles;
564
+ __decorateClass([
565
+ property3({ reflect: true })
566
+ ], Surface.prototype, "elevation", 2);
567
+ __decorateClass([
568
+ property3({ reflect: true })
569
+ ], Surface.prototype, "appearance", 2);
570
+ __decorateClass([
571
+ property3({ reflect: true })
572
+ ], Surface.prototype, "background", 2);
573
+ Surface = __decorateClass([
574
+ customElement2("lt-surface")
575
+ ], Surface);
576
+
577
+ // src/components/text/text.ts
578
+ import { customElement as customElement3, property as property4 } from "lit/decorators.js";
579
+ import { html as html3, unsafeStatic } from "lit/static-html.js";
580
+
581
+ // src/components/text/text.styles.ts
582
+ import { css as css5 } from "lit";
583
+ var textStyles = css5`
584
+ :host {
585
+ display: block;
586
+ color: inherit;
587
+ }
588
+
589
+ /* Inline variants sit in text flow */
590
+ :host([variant='caption']),
591
+ :host([variant='overline']),
592
+ :host([variant='label']) {
593
+ display: inline;
594
+ }
595
+
596
+ [part='base'] {
597
+ margin: 0;
598
+ color: inherit;
599
+ font-family: var(--lt-typography-fontfamily);
600
+ }
601
+
602
+ /* ── Display ─────────────────────────────────────────────────────────── */
603
+
604
+ :host([variant='display-2xl']) [part='base'] {
605
+ font-size: clamp(2.5rem, 6vw, 4.5rem);
606
+ font-weight: var(--lt-text-weight, 200);
607
+ line-height: 1.1;
608
+ letter-spacing: -0.02em;
609
+ }
610
+
611
+ :host([variant='display-xl']) [part='base'] {
612
+ font-size: clamp(2rem, 5vw, 3.75rem);
613
+ font-weight: var(--lt-text-weight, 200);
614
+ line-height: 1.1;
615
+ letter-spacing: -0.02em;
616
+ }
617
+
618
+ :host([variant='display-lg']) [part='base'] {
619
+ font-size: clamp(2rem, 4vw, 3rem);
620
+ font-weight: var(--lt-text-weight, 200);
621
+ line-height: 1.15;
622
+ letter-spacing: -0.01em;
623
+ }
624
+
625
+ /* ── Headings ─────────────────────────────────────────────────────────── */
626
+
627
+ :host([variant='h1']) [part='base'] {
628
+ font-size: clamp(1.75rem, 2.5vw + 0.75rem, 2.5rem);
629
+ font-weight: var(--lt-text-weight, 600);
630
+ line-height: 1.2;
631
+ letter-spacing: -0.02em;
632
+ }
633
+
634
+ :host([variant='h2']) [part='base'] {
635
+ font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
636
+ font-weight: var(--lt-text-weight, 600);
637
+ line-height: 1.25;
638
+ letter-spacing: -0.01em;
639
+ }
640
+
641
+ :host([variant='h3']) [part='base'] {
642
+ font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.5rem);
643
+ font-weight: var(--lt-text-weight, 600);
644
+ line-height: 1.3;
645
+ }
646
+
647
+ :host([variant='h4']) [part='base'] {
648
+ font-size: 1.25rem;
649
+ font-weight: var(--lt-text-weight, 600);
650
+ line-height: 1.35;
651
+ }
652
+
653
+ :host([variant='h5']) [part='base'] {
654
+ font-size: 1.125rem;
655
+ font-weight: var(--lt-text-weight, 600);
656
+ line-height: 1.4;
657
+ }
658
+
659
+ :host([variant='h6']) [part='base'] {
660
+ font-size: 1rem;
661
+ font-weight: var(--lt-text-weight, 600);
662
+ line-height: 1.4;
663
+ }
664
+
665
+ /* ── Body ─────────────────────────────────────────────────────────────── */
666
+
667
+ :host([variant='lead']) [part='base'] {
668
+ font-size: 1.25rem;
669
+ font-weight: var(--lt-text-weight, 400);
670
+ line-height: 1.6;
671
+ }
672
+
673
+ :host([variant='body']) [part='base'],
674
+ :host(:not([variant])) [part='base'] {
675
+ font-size: 1rem;
676
+ font-weight: var(--lt-text-weight, 400);
677
+ line-height: 1.6;
678
+ }
679
+
680
+ :host([variant='body-sm']) [part='base'] {
681
+ font-size: 0.875rem;
682
+ font-weight: var(--lt-text-weight, 400);
683
+ line-height: 1.6;
684
+ }
685
+
686
+ /* ── Inline ───────────────────────────────────────────────────────────── */
687
+
688
+ :host([variant='caption']) [part='base'] {
689
+ font-size: 0.75rem;
690
+ font-weight: var(--lt-text-weight, 400);
691
+ line-height: 1.5;
692
+ }
693
+
694
+ :host([variant='overline']) [part='base'] {
695
+ font-size: 0.6875rem;
696
+ font-weight: var(--lt-text-weight, 600);
697
+ line-height: 1.2;
698
+ letter-spacing: 0.08em;
699
+ text-transform: uppercase;
700
+ }
701
+
702
+ :host([variant='label']) [part='base'] {
703
+ font-size: 0.875rem;
704
+ font-weight: var(--lt-text-weight, 600);
705
+ line-height: 1.4;
706
+ }
707
+ `;
708
+
709
+ // src/components/text/text.ts
710
+ var VARIANT_TAG = {
711
+ "display-2xl": "p",
712
+ "display-xl": "p",
713
+ "display-lg": "p",
714
+ h1: "h1",
715
+ h2: "h2",
716
+ h3: "h3",
717
+ h4: "h4",
718
+ h5: "h5",
719
+ h6: "h6",
720
+ lead: "p",
721
+ body: "p",
722
+ "body-sm": "p",
723
+ caption: "span",
724
+ overline: "span",
725
+ label: "span"
726
+ };
727
+ var Text = class extends ThemeableElement {
728
+ constructor() {
729
+ super(...arguments);
730
+ this.variant = "body";
731
+ this.as = "";
732
+ }
733
+ render() {
734
+ const tag = unsafeStatic(this.as || VARIANT_TAG[this.variant] || "p");
735
+ return html3`<${tag} part="base"><slot></slot></${tag}>`;
736
+ }
737
+ };
738
+ Text.styles = textStyles;
739
+ __decorateClass([
740
+ property4({ reflect: true })
741
+ ], Text.prototype, "variant", 2);
742
+ __decorateClass([
743
+ property4({ reflect: true })
744
+ ], Text.prototype, "as", 2);
745
+ Text = __decorateClass([
746
+ customElement3("lt-text")
747
+ ], Text);
748
+
749
+ // src/components/dialog/dialog.ts
750
+ var Dialog = class extends ThemeableElement {
751
+ constructor() {
752
+ super(...arguments);
753
+ this.size = "md";
754
+ this.open = false;
755
+ this.title = "";
756
+ this.noCloseButton = false;
757
+ this.closeOnBackdropClick = true;
758
+ this.closeOnEscape = true;
759
+ this.uppercase = false;
760
+ this.backdropBlur = false;
761
+ this.handleKeydown = (event) => {
762
+ if (this.open && this.closeOnEscape && event.key === "Escape") {
763
+ event.preventDefault();
764
+ this.hide();
765
+ }
766
+ };
767
+ }
768
+ /**
769
+ * Opens the dialog.
770
+ */
771
+ show() {
772
+ this.open = true;
773
+ }
774
+ /**
775
+ * Closes the dialog.
776
+ */
777
+ hide() {
778
+ this.open = false;
779
+ }
780
+ /**
781
+ * Toggles the dialog open/closed state.
782
+ */
783
+ toggle() {
784
+ this.open = !this.open;
785
+ }
786
+ connectedCallback() {
787
+ super.connectedCallback();
788
+ this.addEventListener("keydown", this.handleKeydown);
789
+ }
790
+ disconnectedCallback() {
791
+ super.disconnectedCallback();
792
+ this.removeEventListener("keydown", this.handleKeydown);
793
+ this.restoreFocus();
794
+ }
795
+ updated(changedProperties) {
796
+ if (changedProperties.has("open")) {
797
+ if (this.open) {
798
+ this.handleOpen();
799
+ } else {
800
+ this.handleClose();
801
+ }
802
+ }
803
+ }
804
+ handleOpen() {
805
+ this.previouslyFocusedElement = document.activeElement;
806
+ document.body.style.overflow = "hidden";
807
+ this.updateComplete.then(() => {
808
+ this.dialogElement?.focus();
809
+ });
810
+ this.dispatchEvent(
811
+ new CustomEvent("dialog-open", {
812
+ bubbles: true,
813
+ composed: true
814
+ })
815
+ );
816
+ }
817
+ handleClose() {
818
+ document.body.style.overflow = "";
819
+ this.restoreFocus();
820
+ this.dispatchEvent(
821
+ new CustomEvent("dialog-close", {
822
+ bubbles: true,
823
+ composed: true
824
+ })
825
+ );
826
+ }
827
+ restoreFocus() {
828
+ if (this.previouslyFocusedElement) {
829
+ this.previouslyFocusedElement.focus();
830
+ this.previouslyFocusedElement = void 0;
831
+ }
832
+ }
833
+ handleBackdropClick(event) {
834
+ if (this.closeOnBackdropClick && event.target === event.currentTarget) {
835
+ this.hide();
836
+ }
837
+ }
838
+ handleCloseClick() {
839
+ this.hide();
840
+ }
841
+ render() {
842
+ return html4`
843
+ <div class="backdrop" ?inert=${!this.open} @click=${this.handleBackdropClick} part="backdrop">
844
+ <lt-surface
845
+ elevation="4"
846
+ role="dialog"
847
+ aria-modal="true"
848
+ aria-labelledby="dialog-title"
849
+ tabindex="-1"
850
+ part="dialog"
851
+ >
852
+ <div class="header" part="header">
853
+ <div class="header-content">
854
+ <slot name="header">
855
+ ${this.title ? html4`<lt-text variant="h4" as="h2" id="dialog-title" class="title">${this.title}</lt-text>` : ""}
856
+ </slot>
857
+ </div>
858
+ ${!this.noCloseButton ? html4`
859
+ <lt-icon-button
860
+ class="close-button"
861
+ part="close-button"
862
+ icon="xmark"
863
+ label="Close dialog"
864
+ size="sm"
865
+ @click=${this.handleCloseClick}
866
+ ></lt-icon-button>
867
+ ` : ""}
868
+ </div>
869
+
870
+ <div class="body" part="body">
871
+ <slot></slot>
872
+ </div>
873
+
874
+ ${this.hasSlot("footer") ? html4`
875
+ <div class="footer" part="footer">
876
+ <slot name="footer"></slot>
877
+ </div>
878
+ ` : ""}
879
+ </lt-surface>
880
+ </div>
881
+ `;
882
+ }
883
+ hasSlot(name) {
884
+ return !!this.querySelector(`[slot="${name}"]`);
885
+ }
886
+ };
887
+ Dialog.styles = [dialogStyles, backdropFeatureStyles];
888
+ __decorateClass([
889
+ property5({ reflect: true })
890
+ ], Dialog.prototype, "size", 2);
891
+ __decorateClass([
892
+ property5({ type: Boolean, reflect: true })
893
+ ], Dialog.prototype, "open", 2);
894
+ __decorateClass([
895
+ property5()
896
+ ], Dialog.prototype, "title", 2);
897
+ __decorateClass([
898
+ property5({ type: Boolean, attribute: "no-close-button" })
899
+ ], Dialog.prototype, "noCloseButton", 2);
900
+ __decorateClass([
901
+ property5({ type: Boolean, attribute: "close-on-backdrop-click" })
902
+ ], Dialog.prototype, "closeOnBackdropClick", 2);
903
+ __decorateClass([
904
+ property5({ type: Boolean, attribute: "close-on-escape" })
905
+ ], Dialog.prototype, "closeOnEscape", 2);
906
+ __decorateClass([
907
+ property5({ type: Boolean, reflect: true })
908
+ ], Dialog.prototype, "uppercase", 2);
909
+ __decorateClass([
910
+ property5({ type: Boolean, reflect: true, attribute: "backdrop-blur" })
911
+ ], Dialog.prototype, "backdropBlur", 2);
912
+ __decorateClass([
913
+ query("lt-surface")
914
+ ], Dialog.prototype, "dialogElement", 2);
915
+ Dialog = __decorateClass([
916
+ customElement4("lt-dialog")
917
+ ], Dialog);
918
+ export {
919
+ Dialog
920
+ };