@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,52 @@
1
+ import { ThemeableElement } from '../../base';
2
+ import type { DatepickerType, DatepickerSize, DatepickerVariant } from './datepicker.types';
3
+ import '../text/text';
4
+ /**
5
+ * Date and time picker wrapping the native browser date/time input with design-system styling.
6
+ *
7
+ * @element lt-datepicker
8
+ *
9
+ * @fires {CustomEvent<{value: string}>} change - Fired when the value changes (on blur).
10
+ * @fires {CustomEvent<{value: string}>} input - Fired on every keystroke / picker selection.
11
+ *
12
+ * @example
13
+ * ```html
14
+ * <lt-datepicker label="Start date" type="date"></lt-datepicker>
15
+ * ```
16
+ *
17
+ * @example
18
+ * ```html
19
+ * <lt-datepicker label="Meeting time" type="datetime-local" required></lt-datepicker>
20
+ * ```
21
+ */
22
+ export declare class Datepicker extends ThemeableElement {
23
+ static styles: import("lit").CSSResult;
24
+ /** Native input type. */
25
+ type: DatepickerType;
26
+ /** Current value in the format required by the native input (`YYYY-MM-DD`, `HH:MM`, or `YYYY-MM-DDTHH:MM`). */
27
+ value: string;
28
+ /** Minimum allowed value. */
29
+ min: string;
30
+ /** Maximum allowed value. */
31
+ max: string;
32
+ /** Field label displayed above the input. */
33
+ label: string;
34
+ /** Helper or error text displayed below the input. */
35
+ helperText: string;
36
+ /** Visual state variant. */
37
+ variant: DatepickerVariant;
38
+ /** Visual size. */
39
+ size: DatepickerSize;
40
+ /** Whether the field is disabled. */
41
+ disabled: boolean;
42
+ /** Whether the field is required. */
43
+ required: boolean;
44
+ /** Whether the field is read-only. */
45
+ readonly: boolean;
46
+ /** Name used in form submission. */
47
+ name: string;
48
+ private input;
49
+ private handleChange;
50
+ private handleInput;
51
+ render(): import("lit").TemplateResult<1>;
52
+ }
@@ -0,0 +1 @@
1
+ export declare const datepickerStyles: import("lit").CSSResult;
@@ -0,0 +1,3 @@
1
+ export type DatepickerType = 'date' | 'time' | 'datetime-local';
2
+ export type DatepickerSize = 'sm' | 'md' | 'lg';
3
+ export type DatepickerVariant = 'default' | 'success' | 'warning' | 'error';
@@ -0,0 +1,2 @@
1
+ export { Datepicker } from './datepicker';
2
+ export type { DatepickerType, DatepickerSize, DatepickerVariant } from './datepicker.types';
@@ -0,0 +1,416 @@
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/datepicker/datepicker.ts
13
+ import { html as html2, nothing } 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/datepicker/datepicker.ts
38
+ import { customElement as customElement2, property as property3, query } from "lit/decorators.js";
39
+
40
+ // src/components/datepicker/datepicker.styles.ts
41
+ import { css } from "lit";
42
+ var datepickerStyles = css`
43
+ :host {
44
+ display: block;
45
+ font-family: 'Hanken Grotesk', sans-serif;
46
+ }
47
+
48
+ .wrapper {
49
+ display: flex;
50
+ flex-direction: column;
51
+ gap: var(--lt-spacing-1);
52
+ }
53
+
54
+ label {
55
+ color: var(--lt-text-default);
56
+ display: flex;
57
+ flex-direction: column;
58
+ gap: var(--lt-spacing-1);
59
+ }
60
+
61
+ .required-indicator {
62
+ color: var(--lt-color-error-500);
63
+ }
64
+
65
+ input {
66
+ background: var(--lt-bg-surface);
67
+ border-radius: var(--lt-border-radius);
68
+ border: 1px solid var(--lt-border-default);
69
+ color: var(--lt-text-default);
70
+ font-family: inherit;
71
+ font-size: 0.9375rem;
72
+ outline: none;
73
+ transition:
74
+ border-color 150ms ease,
75
+ box-shadow 150ms ease;
76
+ width: 100%;
77
+ box-sizing: border-box;
78
+ }
79
+
80
+ input:focus {
81
+ border-color: var(--lt-border-primary);
82
+ box-shadow: 0 0 0 3px var(--lt-bg-primary-subtle);
83
+ }
84
+
85
+ input:disabled {
86
+ background: var(--lt-bg-neutral-subtle);
87
+ color: var(--lt-text-subtle);
88
+ cursor: not-allowed;
89
+ }
90
+
91
+ /* Sizes */
92
+ :host([size='sm']) input {
93
+ font-size: 0.8125rem;
94
+ height: 32px;
95
+ padding: 0 var(--lt-spacing-2);
96
+ }
97
+ :host([size='md']) input,
98
+ :host(:not([size])) input {
99
+ font-size: 0.9375rem;
100
+ height: 40px;
101
+ padding: 0 var(--lt-spacing-3);
102
+ }
103
+ :host([size='lg']) input {
104
+ font-size: 1rem;
105
+ height: 48px;
106
+ padding: 0 var(--lt-spacing-4);
107
+ }
108
+
109
+ /* Variants */
110
+ :host([variant='success']) input {
111
+ border-color: var(--lt-color-success-500);
112
+ }
113
+ :host([variant='success']) input:focus {
114
+ box-shadow: 0 0 0 3px var(--lt-bg-success-subtle);
115
+ }
116
+ :host([variant='warning']) input {
117
+ border-color: var(--lt-color-warning-500);
118
+ }
119
+ :host([variant='warning']) input:focus {
120
+ box-shadow: 0 0 0 3px var(--lt-bg-warning-subtle);
121
+ }
122
+ :host([variant='error']) input {
123
+ border-color: var(--lt-color-error-500);
124
+ }
125
+ :host([variant='error']) input:focus {
126
+ box-shadow: 0 0 0 3px var(--lt-bg-error-subtle);
127
+ }
128
+
129
+ .helper-text {
130
+ color: var(--lt-text-subtle);
131
+ font-size: 0.8125rem;
132
+ }
133
+
134
+ :host([variant='error']) .helper-text {
135
+ color: var(--lt-color-error-600);
136
+ }
137
+ :host([variant='success']) .helper-text {
138
+ color: var(--lt-color-success-600);
139
+ }
140
+ :host([variant='warning']) .helper-text {
141
+ color: var(--lt-color-warning-700);
142
+ }
143
+ `;
144
+
145
+ // src/utils/dispatch.ts
146
+ var dispatch = (host, name, detail, init) => host.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true, ...init }));
147
+
148
+ // src/components/text/text.ts
149
+ import { customElement, property as property2 } from "lit/decorators.js";
150
+ import { html, unsafeStatic } from "lit/static-html.js";
151
+
152
+ // src/components/text/text.styles.ts
153
+ import { css as css2 } from "lit";
154
+ var textStyles = css2`
155
+ :host {
156
+ display: block;
157
+ color: inherit;
158
+ }
159
+
160
+ /* Inline variants sit in text flow */
161
+ :host([variant='caption']),
162
+ :host([variant='overline']),
163
+ :host([variant='label']) {
164
+ display: inline;
165
+ }
166
+
167
+ [part='base'] {
168
+ margin: 0;
169
+ color: inherit;
170
+ font-family: var(--lt-typography-fontfamily);
171
+ }
172
+
173
+ /* ── Display ─────────────────────────────────────────────────────────── */
174
+
175
+ :host([variant='display-2xl']) [part='base'] {
176
+ font-size: clamp(2.5rem, 6vw, 4.5rem);
177
+ font-weight: var(--lt-text-weight, 200);
178
+ line-height: 1.1;
179
+ letter-spacing: -0.02em;
180
+ }
181
+
182
+ :host([variant='display-xl']) [part='base'] {
183
+ font-size: clamp(2rem, 5vw, 3.75rem);
184
+ font-weight: var(--lt-text-weight, 200);
185
+ line-height: 1.1;
186
+ letter-spacing: -0.02em;
187
+ }
188
+
189
+ :host([variant='display-lg']) [part='base'] {
190
+ font-size: clamp(2rem, 4vw, 3rem);
191
+ font-weight: var(--lt-text-weight, 200);
192
+ line-height: 1.15;
193
+ letter-spacing: -0.01em;
194
+ }
195
+
196
+ /* ── Headings ─────────────────────────────────────────────────────────── */
197
+
198
+ :host([variant='h1']) [part='base'] {
199
+ font-size: clamp(1.75rem, 2.5vw + 0.75rem, 2.5rem);
200
+ font-weight: var(--lt-text-weight, 600);
201
+ line-height: 1.2;
202
+ letter-spacing: -0.02em;
203
+ }
204
+
205
+ :host([variant='h2']) [part='base'] {
206
+ font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
207
+ font-weight: var(--lt-text-weight, 600);
208
+ line-height: 1.25;
209
+ letter-spacing: -0.01em;
210
+ }
211
+
212
+ :host([variant='h3']) [part='base'] {
213
+ font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.5rem);
214
+ font-weight: var(--lt-text-weight, 600);
215
+ line-height: 1.3;
216
+ }
217
+
218
+ :host([variant='h4']) [part='base'] {
219
+ font-size: 1.25rem;
220
+ font-weight: var(--lt-text-weight, 600);
221
+ line-height: 1.35;
222
+ }
223
+
224
+ :host([variant='h5']) [part='base'] {
225
+ font-size: 1.125rem;
226
+ font-weight: var(--lt-text-weight, 600);
227
+ line-height: 1.4;
228
+ }
229
+
230
+ :host([variant='h6']) [part='base'] {
231
+ font-size: 1rem;
232
+ font-weight: var(--lt-text-weight, 600);
233
+ line-height: 1.4;
234
+ }
235
+
236
+ /* ── Body ─────────────────────────────────────────────────────────────── */
237
+
238
+ :host([variant='lead']) [part='base'] {
239
+ font-size: 1.25rem;
240
+ font-weight: var(--lt-text-weight, 400);
241
+ line-height: 1.6;
242
+ }
243
+
244
+ :host([variant='body']) [part='base'],
245
+ :host(:not([variant])) [part='base'] {
246
+ font-size: 1rem;
247
+ font-weight: var(--lt-text-weight, 400);
248
+ line-height: 1.6;
249
+ }
250
+
251
+ :host([variant='body-sm']) [part='base'] {
252
+ font-size: 0.875rem;
253
+ font-weight: var(--lt-text-weight, 400);
254
+ line-height: 1.6;
255
+ }
256
+
257
+ /* ── Inline ───────────────────────────────────────────────────────────── */
258
+
259
+ :host([variant='caption']) [part='base'] {
260
+ font-size: 0.75rem;
261
+ font-weight: var(--lt-text-weight, 400);
262
+ line-height: 1.5;
263
+ }
264
+
265
+ :host([variant='overline']) [part='base'] {
266
+ font-size: 0.6875rem;
267
+ font-weight: var(--lt-text-weight, 600);
268
+ line-height: 1.2;
269
+ letter-spacing: 0.08em;
270
+ text-transform: uppercase;
271
+ }
272
+
273
+ :host([variant='label']) [part='base'] {
274
+ font-size: 0.875rem;
275
+ font-weight: var(--lt-text-weight, 600);
276
+ line-height: 1.4;
277
+ }
278
+ `;
279
+
280
+ // src/components/text/text.ts
281
+ var VARIANT_TAG = {
282
+ "display-2xl": "p",
283
+ "display-xl": "p",
284
+ "display-lg": "p",
285
+ h1: "h1",
286
+ h2: "h2",
287
+ h3: "h3",
288
+ h4: "h4",
289
+ h5: "h5",
290
+ h6: "h6",
291
+ lead: "p",
292
+ body: "p",
293
+ "body-sm": "p",
294
+ caption: "span",
295
+ overline: "span",
296
+ label: "span"
297
+ };
298
+ var Text = class extends ThemeableElement {
299
+ constructor() {
300
+ super(...arguments);
301
+ this.variant = "body";
302
+ this.as = "";
303
+ }
304
+ render() {
305
+ const tag = unsafeStatic(this.as || VARIANT_TAG[this.variant] || "p");
306
+ return html`<${tag} part="base"><slot></slot></${tag}>`;
307
+ }
308
+ };
309
+ Text.styles = textStyles;
310
+ __decorateClass([
311
+ property2({ reflect: true })
312
+ ], Text.prototype, "variant", 2);
313
+ __decorateClass([
314
+ property2({ reflect: true })
315
+ ], Text.prototype, "as", 2);
316
+ Text = __decorateClass([
317
+ customElement("lt-text")
318
+ ], Text);
319
+
320
+ // src/components/datepicker/datepicker.ts
321
+ var Datepicker = class extends ThemeableElement {
322
+ constructor() {
323
+ super(...arguments);
324
+ this.type = "date";
325
+ this.value = "";
326
+ this.min = "";
327
+ this.max = "";
328
+ this.label = "";
329
+ this.helperText = "";
330
+ this.variant = "default";
331
+ this.size = "md";
332
+ this.disabled = false;
333
+ this.required = false;
334
+ this.readonly = false;
335
+ this.name = "";
336
+ }
337
+ handleChange() {
338
+ this.value = this.input.value;
339
+ dispatch(this, "change", { value: this.value });
340
+ }
341
+ handleInput() {
342
+ this.value = this.input.value;
343
+ dispatch(this, "input", { value: this.value });
344
+ }
345
+ render() {
346
+ const inputEl = html2`
347
+ <input
348
+ type=${this.type}
349
+ .value=${this.value}
350
+ min=${this.min || nothing}
351
+ max=${this.max || nothing}
352
+ name=${this.name || nothing}
353
+ ?disabled=${this.disabled}
354
+ ?required=${this.required}
355
+ ?readonly=${this.readonly}
356
+ @change=${this.handleChange}
357
+ @input=${this.handleInput}
358
+ />
359
+ `;
360
+ return html2`
361
+ <div class="wrapper">
362
+ ${this.label ? html2`<label>
363
+ <lt-text variant="label" as="span">${this.label}</lt-text>
364
+ ${this.required ? html2`<span class="required-indicator">*</span>` : nothing} ${inputEl}
365
+ </label>` : inputEl}
366
+ ${this.helperText ? html2`<span class="helper-text">${this.helperText}</span>` : nothing}
367
+ </div>
368
+ `;
369
+ }
370
+ };
371
+ Datepicker.styles = datepickerStyles;
372
+ __decorateClass([
373
+ property3({ reflect: true })
374
+ ], Datepicker.prototype, "type", 2);
375
+ __decorateClass([
376
+ property3()
377
+ ], Datepicker.prototype, "value", 2);
378
+ __decorateClass([
379
+ property3()
380
+ ], Datepicker.prototype, "min", 2);
381
+ __decorateClass([
382
+ property3()
383
+ ], Datepicker.prototype, "max", 2);
384
+ __decorateClass([
385
+ property3()
386
+ ], Datepicker.prototype, "label", 2);
387
+ __decorateClass([
388
+ property3({ attribute: "helper-text" })
389
+ ], Datepicker.prototype, "helperText", 2);
390
+ __decorateClass([
391
+ property3({ reflect: true })
392
+ ], Datepicker.prototype, "variant", 2);
393
+ __decorateClass([
394
+ property3({ reflect: true })
395
+ ], Datepicker.prototype, "size", 2);
396
+ __decorateClass([
397
+ property3({ type: Boolean, reflect: true })
398
+ ], Datepicker.prototype, "disabled", 2);
399
+ __decorateClass([
400
+ property3({ type: Boolean, reflect: true })
401
+ ], Datepicker.prototype, "required", 2);
402
+ __decorateClass([
403
+ property3({ type: Boolean, reflect: true })
404
+ ], Datepicker.prototype, "readonly", 2);
405
+ __decorateClass([
406
+ property3()
407
+ ], Datepicker.prototype, "name", 2);
408
+ __decorateClass([
409
+ query("input")
410
+ ], Datepicker.prototype, "input", 2);
411
+ Datepicker = __decorateClass([
412
+ customElement2("lt-datepicker")
413
+ ], Datepicker);
414
+ export {
415
+ Datepicker
416
+ };
@@ -0,0 +1,114 @@
1
+ import { ThemeableElement } from '../../base';
2
+ import { DialogSize } from './dialog.types';
3
+ import '../icon-button/icon-button';
4
+ import '../surface/surface';
5
+ import '../text/text';
6
+ /**
7
+ * Dialog component (modal) with backdrop, animations, and accessibility features.
8
+ *
9
+ * @element lt-dialog
10
+ *
11
+ * Features:
12
+ * - Multiple size options (sm, md, lg, xl, fullscreen)
13
+ * - Backdrop overlay with configurable click-to-close
14
+ * - Close on Escape key
15
+ * - Header with optional title and close button
16
+ * - Scrollable body content
17
+ * - Optional footer for actions
18
+ * - Focus trap and restoration
19
+ * - Custom open/close events
20
+ * - Accessible with aria-modal and role="dialog"
21
+ *
22
+ * @slot - Dialog body content
23
+ * @slot header - Custom header content (overrides title prop)
24
+ * @slot footer - Footer content (typically for action buttons)
25
+ *
26
+ * @fires dialog-open - Fired when dialog opens
27
+ * @fires dialog-close - Fired when dialog closes
28
+ *
29
+ * @example
30
+ * ```html
31
+ * <lt-dialog open title="Confirm Action">
32
+ * <p>Are you sure you want to proceed?</p>
33
+ * <div slot="footer">
34
+ * <lt-button variant="neutral">Cancel</lt-button>
35
+ * <lt-button variant="primary">Confirm</lt-button>
36
+ * </div>
37
+ * </lt-dialog>
38
+ * ```
39
+ *
40
+ * @example
41
+ * ```html
42
+ * <lt-dialog size="lg" open title="Settings" no-close-button>
43
+ * <p>Dialog content here...</p>
44
+ * </lt-dialog>
45
+ * ```
46
+ */
47
+ export declare class Dialog extends ThemeableElement {
48
+ static styles: import("lit").CSSResult[];
49
+ /**
50
+ * Size of the dialog (affects max width).
51
+ * @default 'md'
52
+ */
53
+ size: DialogSize;
54
+ /**
55
+ * Whether the dialog is open.
56
+ * @default false
57
+ */
58
+ open: boolean;
59
+ /**
60
+ * Dialog title displayed in the header.
61
+ * @default ''
62
+ */
63
+ title: string;
64
+ /**
65
+ * Suppress the built-in close button in the header.
66
+ * @default false
67
+ */
68
+ noCloseButton: boolean;
69
+ /**
70
+ * Whether clicking the backdrop closes the dialog.
71
+ * @default true
72
+ */
73
+ closeOnBackdropClick: boolean;
74
+ /**
75
+ * Whether pressing Escape closes the dialog.
76
+ * @default true
77
+ */
78
+ closeOnEscape: boolean;
79
+ /**
80
+ * Renders the dialog title in small caps with wider letter spacing.
81
+ * @default false
82
+ */
83
+ uppercase: boolean;
84
+ /**
85
+ * Apply a frosted-glass blur effect to the backdrop.
86
+ * @default false
87
+ */
88
+ backdropBlur: boolean;
89
+ private dialogElement?;
90
+ private previouslyFocusedElement?;
91
+ /**
92
+ * Opens the dialog.
93
+ */
94
+ show(): void;
95
+ /**
96
+ * Closes the dialog.
97
+ */
98
+ hide(): void;
99
+ /**
100
+ * Toggles the dialog open/closed state.
101
+ */
102
+ toggle(): void;
103
+ connectedCallback(): void;
104
+ disconnectedCallback(): void;
105
+ updated(changedProperties: Map<string, unknown>): void;
106
+ private handleOpen;
107
+ private handleClose;
108
+ private restoreFocus;
109
+ private handleKeydown;
110
+ private handleBackdropClick;
111
+ private handleCloseClick;
112
+ render(): import("lit").TemplateResult<1>;
113
+ private hasSlot;
114
+ }
@@ -0,0 +1 @@
1
+ export declare const dialogStyles: import("lit").CSSResult;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Size variant of the dialog component.
3
+ * Determines the width and overall size of the dialog.
4
+ *
5
+ * - `sm`: 400px max width
6
+ * - `md`: 600px max width (default)
7
+ * - `lg`: 800px max width
8
+ * - `xl`: 1000px max width
9
+ * - `fullscreen`: Full viewport width and height
10
+ */
11
+ export type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
@@ -0,0 +1,2 @@
1
+ export { Dialog } from './dialog';
2
+ export type { DialogSize } from './dialog.types';