tyrell-components 1.0.0-RC10 → 1.0.0-RC12
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/css/tyrell-brand.css +531 -283
- package/css/tyrell.css +38 -31
- package/dist/tyrell-brand.css +531 -283
- package/dist/tyrell.css +38 -31
- package/dist/tyrell.js +1 -1
- package/lib/base/ty-component.d.ts +7 -0
- package/lib/base/ty-component.d.ts.map +1 -1
- package/lib/base/ty-component.js +27 -0
- package/lib/base/ty-component.js.map +1 -1
- package/lib/components/button.d.ts +9 -1
- package/lib/components/button.d.ts.map +1 -1
- package/lib/components/button.js +22 -3
- package/lib/components/button.js.map +1 -1
- package/lib/components/calendar-month.d.ts +6 -0
- package/lib/components/calendar-month.d.ts.map +1 -1
- package/lib/components/calendar-month.js +52 -9
- package/lib/components/calendar-month.js.map +1 -1
- package/lib/components/calendar-navigation.d.ts +31 -5
- package/lib/components/calendar-navigation.d.ts.map +1 -1
- package/lib/components/calendar-navigation.js +71 -31
- package/lib/components/calendar-navigation.js.map +1 -1
- package/lib/components/calendar.d.ts +14 -1
- package/lib/components/calendar.d.ts.map +1 -1
- package/lib/components/calendar.js +65 -4
- package/lib/components/calendar.js.map +1 -1
- package/lib/components/checkbox.d.ts +10 -0
- package/lib/components/checkbox.d.ts.map +1 -1
- package/lib/components/checkbox.js +68 -27
- package/lib/components/checkbox.js.map +1 -1
- package/lib/components/copy.d.ts +10 -0
- package/lib/components/copy.d.ts.map +1 -1
- package/lib/components/copy.js +25 -4
- package/lib/components/copy.js.map +1 -1
- package/lib/components/date-picker.d.ts +14 -0
- package/lib/components/date-picker.d.ts.map +1 -1
- package/lib/components/date-picker.js +29 -0
- package/lib/components/date-picker.js.map +1 -1
- package/lib/components/input.d.ts +14 -0
- package/lib/components/input.d.ts.map +1 -1
- package/lib/components/input.js +80 -4
- package/lib/components/input.js.map +1 -1
- package/lib/components/modal.js +6 -0
- package/lib/components/modal.js.map +1 -1
- package/lib/components/option.d.ts +0 -16
- package/lib/components/option.d.ts.map +1 -1
- package/lib/components/option.js +9 -1
- package/lib/components/option.js.map +1 -1
- package/lib/components/radio.d.ts +1 -0
- package/lib/components/radio.d.ts.map +1 -1
- package/lib/components/radio.js +39 -8
- package/lib/components/radio.js.map +1 -1
- package/lib/components/scroll-container.d.ts +16 -0
- package/lib/components/scroll-container.d.ts.map +1 -1
- package/lib/components/scroll-container.js +105 -1
- package/lib/components/scroll-container.js.map +1 -1
- package/lib/components/{multiselect.d.ts → select.d.ts} +110 -67
- package/lib/components/select.d.ts.map +1 -0
- package/lib/components/{multiselect.js → select.js} +642 -490
- package/lib/components/select.js.map +1 -0
- package/lib/components/selected-tags.d.ts +80 -0
- package/lib/components/selected-tags.d.ts.map +1 -0
- package/lib/components/selected-tags.js +250 -0
- package/lib/components/selected-tags.js.map +1 -0
- package/lib/components/switch.d.ts +2 -0
- package/lib/components/switch.d.ts.map +1 -1
- package/lib/components/switch.js +37 -7
- package/lib/components/switch.js.map +1 -1
- package/lib/components/tabs.d.ts.map +1 -1
- package/lib/components/tabs.js +10 -0
- package/lib/components/tabs.js.map +1 -1
- package/lib/components/tag.d.ts +9 -1
- package/lib/components/tag.d.ts.map +1 -1
- package/lib/components/tag.js +40 -4
- package/lib/components/tag.js.map +1 -1
- package/lib/components/textarea.d.ts +3 -0
- package/lib/components/textarea.d.ts.map +1 -1
- package/lib/components/textarea.js +61 -6
- package/lib/components/textarea.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/styles/button.d.ts +7 -2
- package/lib/styles/button.d.ts.map +1 -1
- package/lib/styles/button.js +75 -238
- package/lib/styles/button.js.map +1 -1
- package/lib/styles/calendar-month.d.ts +1 -1
- package/lib/styles/calendar-month.d.ts.map +1 -1
- package/lib/styles/calendar-month.js +44 -66
- package/lib/styles/calendar-month.js.map +1 -1
- package/lib/styles/calendar-navigation.d.ts +1 -1
- package/lib/styles/calendar-navigation.d.ts.map +1 -1
- package/lib/styles/calendar-navigation.js +19 -27
- package/lib/styles/calendar-navigation.js.map +1 -1
- package/lib/styles/checkbox.d.ts +5 -5
- package/lib/styles/checkbox.d.ts.map +1 -1
- package/lib/styles/checkbox.js +147 -8
- package/lib/styles/checkbox.js.map +1 -1
- package/lib/styles/copy.d.ts +1 -1
- package/lib/styles/copy.d.ts.map +1 -1
- package/lib/styles/copy.js +32 -0
- package/lib/styles/copy.js.map +1 -1
- package/lib/styles/date-picker.d.ts +1 -1
- package/lib/styles/date-picker.d.ts.map +1 -1
- package/lib/styles/date-picker.js +12 -4
- package/lib/styles/date-picker.js.map +1 -1
- package/lib/styles/input.d.ts +1 -1
- package/lib/styles/input.d.ts.map +1 -1
- package/lib/styles/input.js +28 -298
- package/lib/styles/input.js.map +1 -1
- package/lib/styles/option.d.ts +1 -1
- package/lib/styles/option.d.ts.map +1 -1
- package/lib/styles/option.js +29 -5
- package/lib/styles/option.js.map +1 -1
- package/lib/styles/radio.d.ts +1 -1
- package/lib/styles/radio.d.ts.map +1 -1
- package/lib/styles/scroll-container.d.ts +1 -1
- package/lib/styles/scroll-container.d.ts.map +1 -1
- package/lib/styles/scroll-container.js +6 -0
- package/lib/styles/scroll-container.js.map +1 -1
- package/lib/styles/select.d.ts +12 -0
- package/lib/styles/select.d.ts.map +1 -0
- package/lib/styles/select.js +240 -0
- package/lib/styles/select.js.map +1 -0
- package/lib/styles/switch.d.ts +1 -1
- package/lib/styles/switch.d.ts.map +1 -1
- package/lib/styles/tag.d.ts +1 -1
- package/lib/styles/tag.d.ts.map +1 -1
- package/lib/styles/tag.js +36 -140
- package/lib/styles/tag.js.map +1 -1
- package/lib/styles/textarea.d.ts +1 -1
- package/lib/styles/textarea.d.ts.map +1 -1
- package/lib/styles/textarea.js +67 -33
- package/lib/styles/textarea.js.map +1 -1
- package/lib/types/common.d.ts +2 -1
- package/lib/types/common.d.ts.map +1 -1
- package/lib/types/common.js +13 -1
- package/lib/types/common.js.map +1 -1
- package/lib/utils/calendar-utils.d.ts +0 -48
- package/lib/utils/calendar-utils.d.ts.map +1 -1
- package/lib/utils/calendar-utils.js +0 -69
- package/lib/utils/calendar-utils.js.map +1 -1
- package/lib/utils/flavor-sheet.d.ts +32 -0
- package/lib/utils/flavor-sheet.d.ts.map +1 -0
- package/lib/utils/flavor-sheet.js +40 -0
- package/lib/utils/flavor-sheet.js.map +1 -0
- package/lib/utils/icon-registry.d.ts +0 -13
- package/lib/utils/icon-registry.d.ts.map +1 -1
- package/lib/utils/icon-registry.js +0 -35
- package/lib/utils/icon-registry.js.map +1 -1
- package/lib/utils/locale.d.ts +0 -57
- package/lib/utils/locale.d.ts.map +1 -1
- package/lib/utils/locale.js +0 -89
- package/lib/utils/locale.js.map +1 -1
- package/lib/utils/number-format.d.ts +0 -21
- package/lib/utils/number-format.d.ts.map +1 -1
- package/lib/utils/number-format.js +0 -27
- package/lib/utils/number-format.js.map +1 -1
- package/lib/utils/positioning.d.ts +0 -24
- package/lib/utils/positioning.d.ts.map +1 -1
- package/lib/utils/positioning.js +3 -86
- package/lib/utils/positioning.js.map +1 -1
- package/lib/utils/scroll-lock.d.ts.map +1 -1
- package/lib/utils/scroll-lock.js +0 -1
- package/lib/utils/scroll-lock.js.map +1 -1
- package/lib/utils/styles.d.ts +0 -5
- package/lib/utils/styles.d.ts.map +1 -1
- package/lib/utils/styles.js +0 -7
- package/lib/utils/styles.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +17 -9
- package/lib/components/dropdown.d.ts +0 -424
- package/lib/components/dropdown.d.ts.map +0 -1
- package/lib/components/dropdown.js +0 -1640
- package/lib/components/dropdown.js.map +0 -1
- package/lib/components/multiselect.d.ts.map +0 -1
- package/lib/components/multiselect.js.map +0 -1
- package/lib/styles/dropdown.d.ts +0 -12
- package/lib/styles/dropdown.d.ts.map +0 -1
- package/lib/styles/dropdown.js +0 -1081
- package/lib/styles/dropdown.js.map +0 -1
package/lib/styles/button.js
CHANGED
|
@@ -3,13 +3,71 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Three appearance variants × six semantic flavors × three tones (+/base/-).
|
|
5
5
|
* Each variant uses ONE token system:
|
|
6
|
-
* - solid →
|
|
6
|
+
* - solid → flat per-segment tokens --ty-solid-{flavor}{,-hover,-active,
|
|
7
|
+
* -strong,-soft,-fg}. Derived in tyrell-brand.css via OKLCH on
|
|
8
|
+
* 3 axes (color / hover-active / theme chroma-hue); literal in
|
|
9
|
+
* tyrell.css. The component does no color math.
|
|
7
10
|
* - outlined → --ty-color-{flavor}-{strong|base|soft} (text === border)
|
|
8
11
|
* - ghost → --ty-color-{flavor}-{strong|base|soft} (text), --ty-bg-{flavor}-soft (hover)
|
|
9
12
|
*
|
|
10
13
|
* Per-instance overrides via host CSS variables:
|
|
11
14
|
* --ty-button-bg, --ty-button-bg-hover, --ty-button-color, --ty-button-border
|
|
12
15
|
*/
|
|
16
|
+
import { FLAVORS } from '../types/common.js';
|
|
17
|
+
/* One block per flavor, per appearance. Selectors and tokens are formulaic —
|
|
18
|
+
see the section comments below for which token system each appearance uses.
|
|
19
|
+
|
|
20
|
+
Each generator takes an optional fallback flavor `fb`: token references
|
|
21
|
+
then become var(--ty-*-f, var(--ty-*-fb)). Built-ins pass no fallback
|
|
22
|
+
(their tokens always exist); buttonCustomFlavorCss() passes 'neutral' so a
|
|
23
|
+
custom flavor with missing tokens degrades to neutral instead of an
|
|
24
|
+
invisible button. */
|
|
25
|
+
const tokenRef = (prefix, f, suffix, fb) => fb
|
|
26
|
+
? `var(${prefix}-${f}${suffix}, var(${prefix}-${fb}${suffix}))`
|
|
27
|
+
: `var(${prefix}-${f}${suffix})`;
|
|
28
|
+
const solidFlavor = (f, fb) => {
|
|
29
|
+
const solid = (suffix) => tokenRef('--ty-solid', f, suffix, fb);
|
|
30
|
+
return `
|
|
31
|
+
button.solid.${f} { --_ring: ${tokenRef('--ty-color', f, '', fb)}; background: var(--ty-button-bg, ${solid('')}); color: var(--ty-button-color, ${solid('-fg')}); }
|
|
32
|
+
button.solid.${f}.tone-plus { background: var(--ty-button-bg, ${solid('-strong')}); }
|
|
33
|
+
button.solid.${f}.tone-minus { background: var(--ty-button-bg, ${solid('-soft')}); }
|
|
34
|
+
button.solid.${f}:hover:not(:disabled) { background: var(--ty-button-bg-hover, ${solid('-hover')}); }
|
|
35
|
+
button.solid.${f}:active:not(:disabled) { background: ${solid('-active')}; }
|
|
36
|
+
`;
|
|
37
|
+
};
|
|
38
|
+
const outlinedFlavor = (f, fb) => {
|
|
39
|
+
const color = (suffix) => tokenRef('--ty-color', f, suffix, fb);
|
|
40
|
+
return `
|
|
41
|
+
button.outlined.${f} {
|
|
42
|
+
color: var(--ty-button-color, ${color('')});
|
|
43
|
+
border-color: var(--ty-button-border, ${color('')});
|
|
44
|
+
}
|
|
45
|
+
button.outlined.${f}.tone-plus {
|
|
46
|
+
color: var(--ty-button-color, ${color('-strong')});
|
|
47
|
+
border-color: var(--ty-button-border, ${color('-strong')});
|
|
48
|
+
}
|
|
49
|
+
button.outlined.${f}.tone-minus {
|
|
50
|
+
color: var(--ty-button-color, ${color('-soft')});
|
|
51
|
+
border-color: var(--ty-button-border, ${color('-soft')});
|
|
52
|
+
}
|
|
53
|
+
button.outlined.${f}:hover:not(:disabled) {
|
|
54
|
+
background: var(--ty-button-bg-hover, ${tokenRef('--ty-bg', f, '-soft', fb)});
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
};
|
|
58
|
+
const ghostFlavor = (f, fb) => {
|
|
59
|
+
const color = (suffix) => tokenRef('--ty-color', f, suffix, fb);
|
|
60
|
+
return `
|
|
61
|
+
button.ghost.${f} { color: var(--ty-button-color, ${color('')}); }
|
|
62
|
+
button.ghost.${f}.tone-plus { color: var(--ty-button-color, ${color('-strong')}); }
|
|
63
|
+
button.ghost.${f}.tone-minus { color: var(--ty-button-color, ${color('-soft')}); }
|
|
64
|
+
button.ghost.${f}:hover:not(:disabled) {
|
|
65
|
+
background: var(--ty-button-bg-hover, ${tokenRef('--ty-bg', f, '-soft', fb)});
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
};
|
|
69
|
+
/** Rules for one custom (non-built-in) flavor across all three appearances. */
|
|
70
|
+
export const buttonCustomFlavorCss = (base) => solidFlavor(base, 'neutral') + outlinedFlavor(base, 'neutral') + ghostFlavor(base, 'neutral');
|
|
13
71
|
export const buttonStyles = `
|
|
14
72
|
:host {
|
|
15
73
|
display: inline-block;
|
|
@@ -30,7 +88,7 @@ button {
|
|
|
30
88
|
font-size: var(--ty-font-xs);
|
|
31
89
|
line-height: var(--ty-leading-xs);
|
|
32
90
|
letter-spacing: var(--ty-tracking-xs);
|
|
33
|
-
font-weight: var(--ty-font-
|
|
91
|
+
font-weight: var(--ty-font-semibold);
|
|
34
92
|
white-space: nowrap;
|
|
35
93
|
cursor: pointer;
|
|
36
94
|
user-select: none;
|
|
@@ -218,101 +276,27 @@ button.pill.lg:has(ty-icon:only-child) { min-width: 2.25rem; min-height: 2.25rem
|
|
|
218
276
|
button.pill.xl:has(ty-icon:only-child) { min-width: 2.5rem; min-height: 2.5rem; }
|
|
219
277
|
|
|
220
278
|
/* ============================================================
|
|
221
|
-
SOLID —
|
|
222
|
-
|
|
279
|
+
SOLID — flat: one variable per segment. No color math here; all the
|
|
280
|
+
--ty-solid-{flavor}-{hover,active,strong,soft} tokens are DERIVED in
|
|
281
|
+
tyrell-brand.css (OKLCH) or set literally in tyrell.css. Override any
|
|
282
|
+
single token to recolor that one segment. Bare .solid = custom-flavor
|
|
283
|
+
fallback, themable via --ty-button-{bg,bg-hover,color}.
|
|
223
284
|
============================================================ */
|
|
224
285
|
|
|
225
286
|
button.solid {
|
|
226
287
|
border: none;
|
|
288
|
+
--_ring: var(--ty-color-neutral);
|
|
227
289
|
background: var(--ty-button-bg, var(--ty-solid-neutral));
|
|
228
290
|
color: var(--ty-button-color, var(--ty-solid-neutral-fg));
|
|
229
291
|
}
|
|
230
|
-
button.solid:
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/* Primary */
|
|
235
|
-
button.solid.primary {
|
|
236
|
-
background: var(--ty-button-bg, var(--ty-solid-primary));
|
|
237
|
-
color: var(--ty-button-color, var(--ty-solid-primary-fg));
|
|
238
|
-
}
|
|
239
|
-
button.solid.primary.tone-plus { background: var(--ty-button-bg, var(--ty-solid-primary-strong)); }
|
|
240
|
-
button.solid.primary.tone-minus { background: var(--ty-button-bg, var(--ty-solid-primary-soft)); }
|
|
241
|
-
button.solid.primary:hover:not(:disabled) {
|
|
242
|
-
background: var(--ty-button-bg-hover, var(--ty-solid-primary-strong));
|
|
243
|
-
}
|
|
244
|
-
button.solid.primary:focus-visible {
|
|
245
|
-
box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-primary);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/* Secondary */
|
|
249
|
-
button.solid.secondary {
|
|
250
|
-
background: var(--ty-button-bg, var(--ty-solid-secondary));
|
|
251
|
-
color: var(--ty-button-color, var(--ty-solid-secondary-fg));
|
|
252
|
-
}
|
|
253
|
-
button.solid.secondary.tone-plus { background: var(--ty-button-bg, var(--ty-solid-secondary-strong)); }
|
|
254
|
-
button.solid.secondary.tone-minus { background: var(--ty-button-bg, var(--ty-solid-secondary-soft)); }
|
|
255
|
-
button.solid.secondary:hover:not(:disabled) {
|
|
256
|
-
background: var(--ty-button-bg-hover, var(--ty-solid-secondary-strong));
|
|
257
|
-
}
|
|
258
|
-
button.solid.secondary:focus-visible {
|
|
259
|
-
box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-secondary);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/* Success */
|
|
263
|
-
button.solid.success {
|
|
264
|
-
background: var(--ty-button-bg, var(--ty-solid-success));
|
|
265
|
-
color: var(--ty-button-color, var(--ty-solid-success-fg));
|
|
266
|
-
}
|
|
267
|
-
button.solid.success.tone-plus { background: var(--ty-button-bg, var(--ty-solid-success-strong)); }
|
|
268
|
-
button.solid.success.tone-minus { background: var(--ty-button-bg, var(--ty-solid-success-soft)); }
|
|
269
|
-
button.solid.success:hover:not(:disabled) {
|
|
270
|
-
background: var(--ty-button-bg-hover, var(--ty-solid-success-strong));
|
|
271
|
-
}
|
|
272
|
-
button.solid.success:focus-visible {
|
|
273
|
-
box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-success);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/* Danger */
|
|
277
|
-
button.solid.danger {
|
|
278
|
-
background: var(--ty-button-bg, var(--ty-solid-danger));
|
|
279
|
-
color: var(--ty-button-color, var(--ty-solid-danger-fg));
|
|
280
|
-
}
|
|
281
|
-
button.solid.danger.tone-plus { background: var(--ty-button-bg, var(--ty-solid-danger-strong)); }
|
|
282
|
-
button.solid.danger.tone-minus { background: var(--ty-button-bg, var(--ty-solid-danger-soft)); }
|
|
283
|
-
button.solid.danger:hover:not(:disabled) {
|
|
284
|
-
background: var(--ty-button-bg-hover, var(--ty-solid-danger-strong));
|
|
285
|
-
}
|
|
286
|
-
button.solid.danger:focus-visible {
|
|
287
|
-
box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-danger);
|
|
288
|
-
}
|
|
292
|
+
button.solid.tone-plus { background: var(--ty-button-bg, var(--ty-solid-neutral-strong)); }
|
|
293
|
+
button.solid.tone-minus { background: var(--ty-button-bg, var(--ty-solid-neutral-soft)); }
|
|
294
|
+
button.solid:hover:not(:disabled) { background: var(--ty-button-bg-hover, var(--ty-solid-neutral-hover)); }
|
|
295
|
+
button.solid:active:not(:disabled) { background: var(--ty-solid-neutral-active); }
|
|
289
296
|
|
|
290
|
-
|
|
291
|
-
button.solid
|
|
292
|
-
|
|
293
|
-
color: var(--ty-button-color, var(--ty-solid-warning-fg));
|
|
294
|
-
}
|
|
295
|
-
button.solid.warning.tone-plus { background: var(--ty-button-bg, var(--ty-solid-warning-strong)); }
|
|
296
|
-
button.solid.warning.tone-minus { background: var(--ty-button-bg, var(--ty-solid-warning-soft)); }
|
|
297
|
-
button.solid.warning:hover:not(:disabled) {
|
|
298
|
-
background: var(--ty-button-bg-hover, var(--ty-solid-warning-strong));
|
|
299
|
-
}
|
|
300
|
-
button.solid.warning:focus-visible {
|
|
301
|
-
box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-warning);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/* Neutral */
|
|
305
|
-
button.solid.neutral {
|
|
306
|
-
background: var(--ty-button-bg, var(--ty-solid-neutral));
|
|
307
|
-
color: var(--ty-button-color, var(--ty-solid-neutral-fg));
|
|
308
|
-
}
|
|
309
|
-
button.solid.neutral.tone-plus { background: var(--ty-button-bg, var(--ty-solid-neutral-strong)); }
|
|
310
|
-
button.solid.neutral.tone-minus { background: var(--ty-button-bg, var(--ty-solid-neutral-soft)); }
|
|
311
|
-
button.solid.neutral:hover:not(:disabled) {
|
|
312
|
-
background: var(--ty-button-bg-hover, var(--ty-solid-neutral-strong));
|
|
313
|
-
}
|
|
314
|
-
button.solid.neutral:focus-visible {
|
|
315
|
-
box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-neutral);
|
|
297
|
+
${FLAVORS.map((f) => solidFlavor(f)).join('')}
|
|
298
|
+
button.solid:focus-visible {
|
|
299
|
+
box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--_ring);
|
|
316
300
|
}
|
|
317
301
|
|
|
318
302
|
/* ============================================================
|
|
@@ -331,107 +315,7 @@ button.outlined:hover:not(:disabled) {
|
|
|
331
315
|
background: var(--ty-button-bg-hover, var(--ty-bg-neutral-soft));
|
|
332
316
|
}
|
|
333
317
|
|
|
334
|
-
|
|
335
|
-
button.outlined.primary {
|
|
336
|
-
color: var(--ty-button-color, var(--ty-color-primary));
|
|
337
|
-
border-color: var(--ty-button-border, var(--ty-color-primary));
|
|
338
|
-
}
|
|
339
|
-
button.outlined.primary.tone-plus {
|
|
340
|
-
color: var(--ty-button-color, var(--ty-color-primary-strong));
|
|
341
|
-
border-color: var(--ty-button-border, var(--ty-color-primary-strong));
|
|
342
|
-
}
|
|
343
|
-
button.outlined.primary.tone-minus {
|
|
344
|
-
color: var(--ty-button-color, var(--ty-color-primary-soft));
|
|
345
|
-
border-color: var(--ty-button-border, var(--ty-color-primary-soft));
|
|
346
|
-
}
|
|
347
|
-
button.outlined.primary:hover:not(:disabled) {
|
|
348
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-primary-soft));
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
/* Secondary */
|
|
352
|
-
button.outlined.secondary {
|
|
353
|
-
color: var(--ty-button-color, var(--ty-color-secondary));
|
|
354
|
-
border-color: var(--ty-button-border, var(--ty-color-secondary));
|
|
355
|
-
}
|
|
356
|
-
button.outlined.secondary.tone-plus {
|
|
357
|
-
color: var(--ty-button-color, var(--ty-color-secondary-strong));
|
|
358
|
-
border-color: var(--ty-button-border, var(--ty-color-secondary-strong));
|
|
359
|
-
}
|
|
360
|
-
button.outlined.secondary.tone-minus {
|
|
361
|
-
color: var(--ty-button-color, var(--ty-color-secondary-soft));
|
|
362
|
-
border-color: var(--ty-button-border, var(--ty-color-secondary-soft));
|
|
363
|
-
}
|
|
364
|
-
button.outlined.secondary:hover:not(:disabled) {
|
|
365
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-secondary-soft));
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
/* Success */
|
|
369
|
-
button.outlined.success {
|
|
370
|
-
color: var(--ty-button-color, var(--ty-color-success));
|
|
371
|
-
border-color: var(--ty-button-border, var(--ty-color-success));
|
|
372
|
-
}
|
|
373
|
-
button.outlined.success.tone-plus {
|
|
374
|
-
color: var(--ty-button-color, var(--ty-color-success-strong));
|
|
375
|
-
border-color: var(--ty-button-border, var(--ty-color-success-strong));
|
|
376
|
-
}
|
|
377
|
-
button.outlined.success.tone-minus {
|
|
378
|
-
color: var(--ty-button-color, var(--ty-color-success-soft));
|
|
379
|
-
border-color: var(--ty-button-border, var(--ty-color-success-soft));
|
|
380
|
-
}
|
|
381
|
-
button.outlined.success:hover:not(:disabled) {
|
|
382
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-success-soft));
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/* Danger */
|
|
386
|
-
button.outlined.danger {
|
|
387
|
-
color: var(--ty-button-color, var(--ty-color-danger));
|
|
388
|
-
border-color: var(--ty-button-border, var(--ty-color-danger));
|
|
389
|
-
}
|
|
390
|
-
button.outlined.danger.tone-plus {
|
|
391
|
-
color: var(--ty-button-color, var(--ty-color-danger-strong));
|
|
392
|
-
border-color: var(--ty-button-border, var(--ty-color-danger-strong));
|
|
393
|
-
}
|
|
394
|
-
button.outlined.danger.tone-minus {
|
|
395
|
-
color: var(--ty-button-color, var(--ty-color-danger-soft));
|
|
396
|
-
border-color: var(--ty-button-border, var(--ty-color-danger-soft));
|
|
397
|
-
}
|
|
398
|
-
button.outlined.danger:hover:not(:disabled) {
|
|
399
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-danger-soft));
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
/* Warning */
|
|
403
|
-
button.outlined.warning {
|
|
404
|
-
color: var(--ty-button-color, var(--ty-color-warning));
|
|
405
|
-
border-color: var(--ty-button-border, var(--ty-color-warning));
|
|
406
|
-
}
|
|
407
|
-
button.outlined.warning.tone-plus {
|
|
408
|
-
color: var(--ty-button-color, var(--ty-color-warning-strong));
|
|
409
|
-
border-color: var(--ty-button-border, var(--ty-color-warning-strong));
|
|
410
|
-
}
|
|
411
|
-
button.outlined.warning.tone-minus {
|
|
412
|
-
color: var(--ty-button-color, var(--ty-color-warning-soft));
|
|
413
|
-
border-color: var(--ty-button-border, var(--ty-color-warning-soft));
|
|
414
|
-
}
|
|
415
|
-
button.outlined.warning:hover:not(:disabled) {
|
|
416
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-warning-soft));
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
/* Neutral */
|
|
420
|
-
button.outlined.neutral {
|
|
421
|
-
color: var(--ty-button-color, var(--ty-color-neutral));
|
|
422
|
-
border-color: var(--ty-button-border, var(--ty-color-neutral));
|
|
423
|
-
}
|
|
424
|
-
button.outlined.neutral.tone-plus {
|
|
425
|
-
color: var(--ty-button-color, var(--ty-color-neutral-strong));
|
|
426
|
-
border-color: var(--ty-button-border, var(--ty-color-neutral-strong));
|
|
427
|
-
}
|
|
428
|
-
button.outlined.neutral.tone-minus {
|
|
429
|
-
color: var(--ty-button-color, var(--ty-color-neutral-soft));
|
|
430
|
-
border-color: var(--ty-button-border, var(--ty-color-neutral-soft));
|
|
431
|
-
}
|
|
432
|
-
button.outlined.neutral:hover:not(:disabled) {
|
|
433
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-neutral-soft));
|
|
434
|
-
}
|
|
318
|
+
${FLAVORS.map((f) => outlinedFlavor(f)).join('')}
|
|
435
319
|
|
|
436
320
|
/* ============================================================
|
|
437
321
|
GHOST — text only, hover bg (uses --ty-color-* + --ty-bg-*-soft)
|
|
@@ -447,52 +331,5 @@ button.ghost:hover:not(:disabled) {
|
|
|
447
331
|
background: var(--ty-button-bg-hover, var(--ty-bg-neutral-soft));
|
|
448
332
|
}
|
|
449
333
|
|
|
450
|
-
|
|
451
|
-
button.ghost.primary { color: var(--ty-button-color, var(--ty-color-primary)); }
|
|
452
|
-
button.ghost.primary.tone-plus { color: var(--ty-button-color, var(--ty-color-primary-strong)); }
|
|
453
|
-
button.ghost.primary.tone-minus { color: var(--ty-button-color, var(--ty-color-primary-soft)); }
|
|
454
|
-
button.ghost.primary:hover:not(:disabled) {
|
|
455
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-primary-soft));
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
/* Secondary */
|
|
459
|
-
button.ghost.secondary { color: var(--ty-button-color, var(--ty-color-secondary)); }
|
|
460
|
-
button.ghost.secondary.tone-plus { color: var(--ty-button-color, var(--ty-color-secondary-strong)); }
|
|
461
|
-
button.ghost.secondary.tone-minus { color: var(--ty-button-color, var(--ty-color-secondary-soft)); }
|
|
462
|
-
button.ghost.secondary:hover:not(:disabled) {
|
|
463
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-secondary-soft));
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/* Success */
|
|
467
|
-
button.ghost.success { color: var(--ty-button-color, var(--ty-color-success)); }
|
|
468
|
-
button.ghost.success.tone-plus { color: var(--ty-button-color, var(--ty-color-success-strong)); }
|
|
469
|
-
button.ghost.success.tone-minus { color: var(--ty-button-color, var(--ty-color-success-soft)); }
|
|
470
|
-
button.ghost.success:hover:not(:disabled) {
|
|
471
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-success-soft));
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
/* Danger */
|
|
475
|
-
button.ghost.danger { color: var(--ty-button-color, var(--ty-color-danger)); }
|
|
476
|
-
button.ghost.danger.tone-plus { color: var(--ty-button-color, var(--ty-color-danger-strong)); }
|
|
477
|
-
button.ghost.danger.tone-minus { color: var(--ty-button-color, var(--ty-color-danger-soft)); }
|
|
478
|
-
button.ghost.danger:hover:not(:disabled) {
|
|
479
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-danger-soft));
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
/* Warning */
|
|
483
|
-
button.ghost.warning { color: var(--ty-button-color, var(--ty-color-warning)); }
|
|
484
|
-
button.ghost.warning.tone-plus { color: var(--ty-button-color, var(--ty-color-warning-strong)); }
|
|
485
|
-
button.ghost.warning.tone-minus { color: var(--ty-button-color, var(--ty-color-warning-soft)); }
|
|
486
|
-
button.ghost.warning:hover:not(:disabled) {
|
|
487
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-warning-soft));
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
/* Neutral */
|
|
491
|
-
button.ghost.neutral { color: var(--ty-button-color, var(--ty-color-neutral)); }
|
|
492
|
-
button.ghost.neutral.tone-plus { color: var(--ty-button-color, var(--ty-color-neutral-strong)); }
|
|
493
|
-
button.ghost.neutral.tone-minus { color: var(--ty-button-color, var(--ty-color-neutral-soft)); }
|
|
494
|
-
button.ghost.neutral:hover:not(:disabled) {
|
|
495
|
-
background: var(--ty-button-bg-hover, var(--ty-bg-neutral-soft));
|
|
496
|
-
}
|
|
497
|
-
`;
|
|
334
|
+
${FLAVORS.map((f) => ghostFlavor(f)).join('')}`;
|
|
498
335
|
//# sourceMappingURL=button.js.map
|
package/lib/styles/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/styles/button.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/styles/button.ts"],"names":[],"mappings":"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"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Calendar Month Styles
|
|
3
3
|
* Improved design with better visual hierarchy and size variants
|
|
4
4
|
*/
|
|
5
|
-
export declare const calendarMonthStyles = "\n/* ============================================================================\n Theming Tokens\n Override these to retheme the calendar without touching the global palette.\n Defaults chain back to the global --ty-color-* / --ty-bg-* / --ty-border tokens.\n ============================================================================ */\n\n
|
|
5
|
+
export declare const calendarMonthStyles = "\n/* ============================================================================\n Theming Tokens\n Override these to retheme the calendar without touching the global palette.\n Defaults chain back to the global --ty-color-* / --ty-bg-* / --ty-border tokens.\n ============================================================================ */\n\n/* Theming tokens are applied as var(--ty-calendar-*, <default>) at point\n of use (not declared on :host) so consumers can override any of them\n from outside the shadow root. The 3 accent aliases \u2014 --ty-calendar-accent,\n --ty-calendar-today-accent, --ty-calendar-muted \u2014 still cascade into the\n derived defaults, so overriding one retints the related cells. */\n\n/* ============================================================================\n Base Calendar Container\n ============================================================================ */\n\n.calendar-flex-container {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n gap: 0;\n padding: 0.75rem;\n border-radius: var(--ty-radius-md);\n font-family: system-ui, sans-serif;\n user-select: none;\n width: var(--calendar-width, fit-content);\n min-width: 280px;\n max-width: var(--calendar-max-width, none);\n}\n\n/* ============================================================================\n Rows (Header + 6 Day Rows)\n ============================================================================ */\n\n.calendar-row {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.calendar-header-row {\n flex: 0 0 auto;\n color: var(--ty-calendar-header-color, var(--ty-color-neutral-soft));\n}\n\n.calendar-day-row {\n flex: 1;\n min-height: 2rem;\n margin-bottom: 0.125rem;\n}\n\n/* ============================================================================\n Base Cell Styles\n ============================================================================ */\n\n.calendar-cell {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 0;\n position: relative;\n box-sizing: border-box;\n}\n\n/* ============================================================================\n Header Cells\n ============================================================================ */\n\n.calendar-header-cell {\n text-align: center;\n font-weight: 500;\n text-transform: uppercase;\n padding: 0.25rem;\n letter-spacing: 0.05em;\n}\n\n/* ============================================================================\n Day Cells - Square with Better Visual Hierarchy\n ============================================================================ */\n\n.calendar-day-cell {\n /* Square cells */\n aspect-ratio: 1;\n\n /* Layout */\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n\n /* Spacing */\n margin: 0.125rem;\n\n /* Visual: ghost cells \u2014 no boxes; the border is a theming hook only */\n border-radius: var(--ty-calendar-day-radius, 0.5rem);\n border: 1px solid var(--ty-calendar-day-border, transparent);\n background-color: var(--ty-calendar-day-bg, transparent);\n color: var(--ty-calendar-day-color, var(--ty-calendar-muted, var(--ty-text)));\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease;\n\n /* Typography */\n font-weight: 400;\n font-variant-numeric: tabular-nums;\n}\n\n/* Hover: soft rounded pill, no border flash */\n.calendar-day-cell:hover {\n color: var(--ty-calendar-day-hover-color, var(--ty-text-strong));\n background-color: var(--ty-calendar-day-hover-bg, var(--ty-bg-neutral-soft));\n border-color: var(--ty-calendar-day-hover-border, transparent);\n}\n\n/* ============================================================================\n Day States\n ============================================================================ */\n\n/* Today: accent number, no slab \u2014 never collides with hover, and the\n selected pill wins when today is picked */\n.calendar-day-cell.today {\n background-color: var(--ty-calendar-today-bg, transparent);\n color: var(--ty-calendar-today-color, var(--ty-calendar-today-accent, var(--ty-color-primary)));\n border-color: var(--ty-calendar-today-border, transparent);\n font-weight: 600;\n}\n\n/* Weekend: no distinction by default (hook kept for theming) */\n.calendar-day-cell.weekend {\n color: var(--ty-calendar-weekend-color, var(--ty-calendar-day-color, var(--ty-text)));\n}\n\n/* Other Month - Muted */\n.calendar-day-cell.other-month {\n color: var(--ty-calendar-other-month-color, var(--ty-color-neutral-faint));\n opacity: var(--ty-calendar-other-month-opacity, 0.5);\n}\n\n.calendar-day-cell.other-month:hover { \n color: var(--ty-calendar-day-hover-color, var(--ty-color-neutral-strong));\n background-color: var(--ty-calendar-day-hover-bg, var(--ty-bg-neutral-soft));\n opacity: 0.7;\n}\n\n/* Disabled - outside min/max bounds */\n.calendar-day-cell.disabled {\n color: var(--ty-calendar-disabled-color, var(--ty-color-neutral-faint));\n opacity: var(--ty-calendar-disabled-opacity, 0.35);\n cursor: default;\n pointer-events: none;\n}\n\n/* Selected: the one strong element in the grid */\n.calendar-day-cell.selected {\n background-color: var(--ty-calendar-selected-bg, var(--ty-bg-primary));\n color: var(--ty-calendar-selected-color, var(--ty-color-primary-strong));\n border-color: var(--ty-calendar-selected-border, var(--ty-calendar-accent, transparent));\n font-weight: 600;\n}\n\n.calendar-day-cell.selected:hover {\n background-color: var(--ty-calendar-selected-hover-bg, var(--ty-bg-primary-bold));\n border-color: var(--ty-calendar-selected-hover-border, transparent);\n}\n\n.calendar-day-cell.selected.other-month {\n opacity: 0.7;\n}\n\n/* ============================================================================\n Size Variants\n ============================================================================ */\n\n/* Small - Compact (240px min-width) */\n.calendar-size-sm {\n padding: 0.5rem;\n min-width: 240px;\n}\n\n.calendar-size-sm .calendar-header-cell {\n font-size: 0.625rem;\n padding: 0.125rem;\n}\n\n.calendar-size-sm .calendar-day-cell {\n font-size: 0.75rem;\n margin: 0.0625rem;\n}\n\n.calendar-size-sm .calendar-day-row {\n min-height: 1.5rem;\n}\n\n/* Medium - Default (280px min-width) */\n.calendar-size-md {\n padding: 0.75rem;\n min-width: 280px;\n}\n\n.calendar-size-md .calendar-header-cell {\n font-size: 0.6875rem;\n padding: 0.25rem;\n}\n\n.calendar-size-md .calendar-day-cell {\n font-size: 0.8125rem;\n margin: 0.125rem;\n}\n\n.calendar-size-md .calendar-day-row {\n min-height: 2rem;\n}\n\n/* Large - Spacious (360px min-width) */\n.calendar-size-lg {\n padding: 1rem;\n min-width: 360px;\n}\n\n.calendar-size-lg .calendar-header-cell {\n font-size: 0.75rem;\n padding: 0.375rem;\n}\n\n.calendar-size-lg .calendar-day-cell {\n font-size: 0.875rem;\n margin: 0.1875rem;\n}\n\n.calendar-size-lg .calendar-day-row {\n min-height: 2.5rem;\n}\n\n/* ============================================================================\n Backwards Compatibility\n ============================================================================ */\n\n.calendar-day {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n";
|
|
6
6
|
//# sourceMappingURL=calendar-month.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-month.d.ts","sourceRoot":"","sources":["../../src/styles/calendar-month.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"calendar-month.d.ts","sourceRoot":"","sources":["../../src/styles/calendar-month.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,6vOAuP/B,CAAC"}
|
|
@@ -9,43 +9,11 @@ export const calendarMonthStyles = `
|
|
|
9
9
|
Defaults chain back to the global --ty-color-* / --ty-bg-* / --ty-border tokens.
|
|
10
10
|
============================================================================ */
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/* Header (weekday names) */
|
|
19
|
-
--ty-calendar-header-color: var(--ty-color-neutral-strong);
|
|
20
|
-
|
|
21
|
-
/* Day cell — base */
|
|
22
|
-
--ty-calendar-day-color: var(--ty-calendar-muted);
|
|
23
|
-
--ty-calendar-day-bg: transparent;
|
|
24
|
-
--ty-calendar-day-border: var(--ty-border);
|
|
25
|
-
--ty-calendar-day-radius: 0.375rem;
|
|
26
|
-
|
|
27
|
-
/* Day cell — hover */
|
|
28
|
-
--ty-calendar-day-hover-color: var(--ty-color-neutral-strong);
|
|
29
|
-
--ty-calendar-day-hover-bg: var(--ty-bg-neutral-soft);
|
|
30
|
-
--ty-calendar-day-hover-border: var(--ty-border-bold);
|
|
31
|
-
|
|
32
|
-
/* Today */
|
|
33
|
-
--ty-calendar-today-color: var(--ty-color-secondary-strong);
|
|
34
|
-
--ty-calendar-today-bg: var(--ty-bg-secondary-soft);
|
|
35
|
-
--ty-calendar-today-border: var(--ty-calendar-today-accent);
|
|
36
|
-
|
|
37
|
-
/* Selected */
|
|
38
|
-
--ty-calendar-selected-color: var(--ty-color-primary-strong);
|
|
39
|
-
--ty-calendar-selected-bg: var(--ty-bg-primary);
|
|
40
|
-
--ty-calendar-selected-border: var(--ty-calendar-accent);
|
|
41
|
-
--ty-calendar-selected-hover-bg: var(--ty-bg-primary-bold);
|
|
42
|
-
--ty-calendar-selected-hover-border: var(--ty-color-primary-bold);
|
|
43
|
-
|
|
44
|
-
/* Modifier states */
|
|
45
|
-
--ty-calendar-weekend-color: var(--ty-color-danger-soft);
|
|
46
|
-
--ty-calendar-other-month-color: var(--ty-color-neutral-faint);
|
|
47
|
-
--ty-calendar-other-month-opacity: 0.5;
|
|
48
|
-
}
|
|
12
|
+
/* Theming tokens are applied as var(--ty-calendar-*, <default>) at point
|
|
13
|
+
of use (not declared on :host) so consumers can override any of them
|
|
14
|
+
from outside the shadow root. The 3 accent aliases — --ty-calendar-accent,
|
|
15
|
+
--ty-calendar-today-accent, --ty-calendar-muted — still cascade into the
|
|
16
|
+
derived defaults, so overriding one retints the related cells. */
|
|
49
17
|
|
|
50
18
|
/* ============================================================================
|
|
51
19
|
Base Calendar Container
|
|
@@ -57,7 +25,7 @@ export const calendarMonthStyles = `
|
|
|
57
25
|
box-sizing: border-box;
|
|
58
26
|
gap: 0;
|
|
59
27
|
padding: 0.75rem;
|
|
60
|
-
border-radius:
|
|
28
|
+
border-radius: var(--ty-radius-md);
|
|
61
29
|
font-family: system-ui, sans-serif;
|
|
62
30
|
user-select: none;
|
|
63
31
|
width: var(--calendar-width, fit-content);
|
|
@@ -77,7 +45,7 @@ export const calendarMonthStyles = `
|
|
|
77
45
|
|
|
78
46
|
.calendar-header-row {
|
|
79
47
|
flex: 0 0 auto;
|
|
80
|
-
color: var(--ty-calendar-header-color);
|
|
48
|
+
color: var(--ty-calendar-header-color, var(--ty-color-neutral-soft));
|
|
81
49
|
}
|
|
82
50
|
|
|
83
51
|
.calendar-day-row {
|
|
@@ -106,7 +74,7 @@ export const calendarMonthStyles = `
|
|
|
106
74
|
|
|
107
75
|
.calendar-header-cell {
|
|
108
76
|
text-align: center;
|
|
109
|
-
font-weight:
|
|
77
|
+
font-weight: 500;
|
|
110
78
|
text-transform: uppercase;
|
|
111
79
|
padding: 0.25rem;
|
|
112
80
|
letter-spacing: 0.05em;
|
|
@@ -129,65 +97,75 @@ export const calendarMonthStyles = `
|
|
|
129
97
|
/* Spacing */
|
|
130
98
|
margin: 0.125rem;
|
|
131
99
|
|
|
132
|
-
/* Visual */
|
|
133
|
-
border-radius: var(--ty-calendar-day-radius);
|
|
134
|
-
border: 1px solid var(--ty-calendar-day-border);
|
|
135
|
-
background-color: var(--ty-calendar-day-bg);
|
|
136
|
-
color: var(--ty-calendar-day-color);
|
|
100
|
+
/* Visual: ghost cells — no boxes; the border is a theming hook only */
|
|
101
|
+
border-radius: var(--ty-calendar-day-radius, 0.5rem);
|
|
102
|
+
border: 1px solid var(--ty-calendar-day-border, transparent);
|
|
103
|
+
background-color: var(--ty-calendar-day-bg, transparent);
|
|
104
|
+
color: var(--ty-calendar-day-color, var(--ty-calendar-muted, var(--ty-text)));
|
|
137
105
|
cursor: pointer;
|
|
138
|
-
transition:
|
|
106
|
+
transition: background-color 0.15s ease, color 0.15s ease;
|
|
139
107
|
|
|
140
108
|
/* Typography */
|
|
141
109
|
font-weight: 400;
|
|
110
|
+
font-variant-numeric: tabular-nums;
|
|
142
111
|
}
|
|
143
112
|
|
|
144
|
-
/* Hover
|
|
113
|
+
/* Hover: soft rounded pill, no border flash */
|
|
145
114
|
.calendar-day-cell:hover {
|
|
146
|
-
color: var(--ty-calendar-day-hover-color);
|
|
147
|
-
background-color: var(--ty-calendar-day-hover-bg);
|
|
148
|
-
border-color: var(--ty-calendar-day-hover-border);
|
|
115
|
+
color: var(--ty-calendar-day-hover-color, var(--ty-text-strong));
|
|
116
|
+
background-color: var(--ty-calendar-day-hover-bg, var(--ty-bg-neutral-soft));
|
|
117
|
+
border-color: var(--ty-calendar-day-hover-border, transparent);
|
|
149
118
|
}
|
|
150
119
|
|
|
151
120
|
/* ============================================================================
|
|
152
121
|
Day States
|
|
153
122
|
============================================================================ */
|
|
154
123
|
|
|
155
|
-
/* Today
|
|
124
|
+
/* Today: accent number, no slab — never collides with hover, and the
|
|
125
|
+
selected pill wins when today is picked */
|
|
156
126
|
.calendar-day-cell.today {
|
|
157
|
-
background-color: var(--ty-calendar-today-bg);
|
|
158
|
-
color: var(--ty-calendar-today-color);
|
|
159
|
-
border-color: var(--ty-calendar-today-border);
|
|
127
|
+
background-color: var(--ty-calendar-today-bg, transparent);
|
|
128
|
+
color: var(--ty-calendar-today-color, var(--ty-calendar-today-accent, var(--ty-color-primary)));
|
|
129
|
+
border-color: var(--ty-calendar-today-border, transparent);
|
|
160
130
|
font-weight: 600;
|
|
161
131
|
}
|
|
162
132
|
|
|
163
|
-
/* Weekend
|
|
133
|
+
/* Weekend: no distinction by default (hook kept for theming) */
|
|
164
134
|
.calendar-day-cell.weekend {
|
|
165
|
-
color: var(--ty-calendar-weekend-color);
|
|
135
|
+
color: var(--ty-calendar-weekend-color, var(--ty-calendar-day-color, var(--ty-text)));
|
|
166
136
|
}
|
|
167
137
|
|
|
168
138
|
/* Other Month - Muted */
|
|
169
139
|
.calendar-day-cell.other-month {
|
|
170
|
-
color: var(--ty-calendar-other-month-color);
|
|
171
|
-
opacity: var(--ty-calendar-other-month-opacity);
|
|
140
|
+
color: var(--ty-calendar-other-month-color, var(--ty-color-neutral-faint));
|
|
141
|
+
opacity: var(--ty-calendar-other-month-opacity, 0.5);
|
|
172
142
|
}
|
|
173
143
|
|
|
174
144
|
.calendar-day-cell.other-month:hover {
|
|
175
|
-
color: var(--ty-calendar-day-hover-color);
|
|
176
|
-
background-color: var(--ty-calendar-day-hover-bg);
|
|
145
|
+
color: var(--ty-calendar-day-hover-color, var(--ty-color-neutral-strong));
|
|
146
|
+
background-color: var(--ty-calendar-day-hover-bg, var(--ty-bg-neutral-soft));
|
|
177
147
|
opacity: 0.7;
|
|
178
148
|
}
|
|
179
149
|
|
|
180
|
-
/*
|
|
150
|
+
/* Disabled - outside min/max bounds */
|
|
151
|
+
.calendar-day-cell.disabled {
|
|
152
|
+
color: var(--ty-calendar-disabled-color, var(--ty-color-neutral-faint));
|
|
153
|
+
opacity: var(--ty-calendar-disabled-opacity, 0.35);
|
|
154
|
+
cursor: default;
|
|
155
|
+
pointer-events: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Selected: the one strong element in the grid */
|
|
181
159
|
.calendar-day-cell.selected {
|
|
182
|
-
background-color: var(--ty-calendar-selected-bg);
|
|
183
|
-
color: var(--ty-calendar-selected-color);
|
|
184
|
-
border-color: var(--ty-calendar-selected-border);
|
|
160
|
+
background-color: var(--ty-calendar-selected-bg, var(--ty-bg-primary));
|
|
161
|
+
color: var(--ty-calendar-selected-color, var(--ty-color-primary-strong));
|
|
162
|
+
border-color: var(--ty-calendar-selected-border, var(--ty-calendar-accent, transparent));
|
|
185
163
|
font-weight: 600;
|
|
186
164
|
}
|
|
187
165
|
|
|
188
166
|
.calendar-day-cell.selected:hover {
|
|
189
|
-
background-color: var(--ty-calendar-selected-hover-bg);
|
|
190
|
-
border-color: var(--ty-calendar-selected-hover-border);
|
|
167
|
+
background-color: var(--ty-calendar-selected-hover-bg, var(--ty-bg-primary-bold));
|
|
168
|
+
border-color: var(--ty-calendar-selected-hover-border, transparent);
|
|
191
169
|
}
|
|
192
170
|
|
|
193
171
|
.calendar-day-cell.selected.other-month {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-month.js","sourceRoot":"","sources":["../../src/styles/calendar-month.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG
|
|
1
|
+
{"version":3,"file":"calendar-month.js","sourceRoot":"","sources":["../../src/styles/calendar-month.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuPlC,CAAC"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Calendar Navigation Styles
|
|
3
3
|
* Clean, modern design with proper visual hierarchy and size variants
|
|
4
4
|
*/
|
|
5
|
-
export declare const calendarNavigationStyles = "\n/* ============================================================================\n Size Variants (CSS Custom Properties)\n ============================================================================ */\n\n
|
|
5
|
+
export declare const calendarNavigationStyles = "\n/* ============================================================================\n Size Variants (CSS Custom Properties)\n ============================================================================ */\n\n/* Theming tokens applied as var(--ty-calendar-nav-*, <default>) at point of\n use (NOT on :host) so consumers can override them from outside \u2014 this\n component is nested inside ty-calendar's shadow, so a :host default would\n block inherited overrides. --ty-calendar-accent still cascades in. */\n\n:host([data-size=\"md\"]) {\n --nav-btn-size: 2rem;\n --nav-btn-icon-size: 1.25rem;\n --nav-font-size: 1rem;\n --nav-padding: 0.5rem 0.75rem;\n --nav-default-width: 280px;\n}\n\n:host([data-size=\"sm\"]) {\n --nav-btn-size: 1.5rem;\n --nav-btn-icon-size: 1rem;\n --nav-font-size: 0.875rem;\n --nav-padding: 0.375rem 0.5rem;\n --nav-default-width: 240px;\n}\n\n:host([data-size=\"lg\"]) {\n --nav-btn-size: 2.5rem;\n --nav-btn-icon-size: 1.5rem;\n --nav-font-size: 1.125rem;\n --nav-padding: 0.625rem 1rem;\n --nav-default-width: 360px;\n}\n\n/* ============================================================================\n Main Navigation Header\n ============================================================================ */\n\n.calendar-navigation-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--nav-padding);\n font-family: system-ui, sans-serif;\n user-select: none;\n width: var(--nav-width, var(--nav-default-width));\n box-sizing: border-box;\n}\n\n/* ============================================================================\n Navigation Groups (Left, Center, Right)\n ============================================================================ */\n\n.nav-group {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.nav-group-left,\n.nav-group-right {\n flex: 0 0 auto;\n}\n\n.nav-group-center {\n flex: 1;\n justify-content: center;\n}\n\n/* ============================================================================\n Navigation Buttons\n ============================================================================ */\n\n.nav-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nav-btn-size);\n height: var(--nav-btn-size);\n padding: 0;\n border: none;\n border-radius: var(--ty-radius-base);\n background-color: transparent;\n color: var(--ty-calendar-nav-color, var(--ty-color-neutral));\n cursor: pointer;\n transition: all 0.15s ease;\n outline: none;\n}\n\n.nav-btn:hover {\n background-color: var(--ty-calendar-nav-hover-bg, var(--ty-bg-neutral-soft));\n color: var(--ty-calendar-nav-hover-color, var(--ty-color-neutral-strong));\n}\n\n.nav-btn:active {\n background-color: var(--ty-calendar-nav-active-bg, var(--ty-bg-neutral));\n transform: scale(0.95);\n}\n\n.nav-btn:disabled {\n opacity: 0.35;\n cursor: default;\n pointer-events: none;\n}\n\n.nav-btn:focus-visible {\n outline: 2px solid var(--ty-calendar-nav-focus-outline, var(--ty-calendar-accent, var(--ty-color-primary)));\n outline-offset: 2px;\n}\n\n/* SVG sizing */\n.nav-btn svg {\n width: var(--nav-btn-icon-size);\n height: var(--nav-btn-icon-size);\n display: block;\n}\n\n/* ============================================================================\n Month/Year Display (Center)\n ============================================================================ */\n\n.month-year-display {\n font-size: var(--nav-font-size);\n font-weight: 600;\n color: var(--ty-calendar-nav-title-color, var(--ty-color-neutral-strong));\n text-align: center;\n white-space: nowrap;\n letter-spacing: -0.01em;\n}\n";
|
|
6
6
|
//# sourceMappingURL=calendar-navigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-navigation.d.ts","sourceRoot":"","sources":["../../src/styles/calendar-navigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"calendar-navigation.d.ts","sourceRoot":"","sources":["../../src/styles/calendar-navigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,wBAAwB,snHAiIpC,CAAC"}
|