tyrell-components 1.0.0-RC13 → 1.0.0-RC14
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/README.md +1 -1
- package/css/tyrell-theme.css +167 -178
- package/css/tyrell.css +19 -0
- package/dist/tyrell-theme.css +167 -178
- package/dist/tyrell.css +19 -0
- package/dist/tyrell.js +1 -1
- package/lib/base/ty-component.d.ts +20 -10
- package/lib/base/ty-component.js +21 -144
- package/lib/components/button.d.ts +2 -16
- package/lib/components/button.js +0 -36
- package/lib/components/calendar-month.d.ts +2 -48
- package/lib/components/calendar-month.js +4 -166
- package/lib/components/calendar-navigation.d.ts +3 -48
- package/lib/components/calendar-navigation.js +3 -126
- package/lib/components/calendar.d.ts +3 -80
- package/lib/components/calendar.js +8 -230
- package/lib/components/checkbox.d.ts +4 -71
- package/lib/components/checkbox.js +7 -151
- package/lib/components/copy.d.ts +3 -56
- package/lib/components/copy.js +1 -120
- package/lib/components/date-picker.d.ts +13 -162
- package/lib/components/date-picker.js +41 -592
- package/lib/components/file-upload.d.ts +9 -15
- package/lib/components/file-upload.js +19 -41
- package/lib/components/icon.d.ts +3 -24
- package/lib/components/icon.js +1 -90
- package/lib/components/input.d.ts +7 -107
- package/lib/components/input.js +5 -193
- package/lib/components/modal.d.ts +17 -26
- package/lib/components/modal.js +57 -201
- package/lib/components/option.d.ts +2 -9
- package/lib/components/option.js +0 -48
- package/lib/components/popup.d.ts +2 -17
- package/lib/components/popup.js +8 -139
- package/lib/components/radio.d.ts +3 -23
- package/lib/components/radio.js +10 -65
- package/lib/components/resize-observer.d.ts +3 -30
- package/lib/components/resize-observer.js +12 -46
- package/lib/components/scroll-container.d.ts +2 -12
- package/lib/components/scroll-container.js +3 -46
- package/lib/components/select.d.ts +22 -153
- package/lib/components/select.js +33 -590
- package/lib/components/selected-tags.d.ts +4 -47
- package/lib/components/selected-tags.js +1 -95
- package/lib/components/step.d.ts +1 -6
- package/lib/components/step.js +0 -6
- package/lib/components/switch.d.ts +0 -11
- package/lib/components/switch.js +2 -36
- package/lib/components/tab.d.ts +1 -6
- package/lib/components/tab.js +0 -7
- package/lib/components/tabs.d.ts +5 -63
- package/lib/components/tabs.js +20 -283
- package/lib/components/tag.d.ts +2 -36
- package/lib/components/tag.js +5 -105
- package/lib/components/textarea.d.ts +6 -86
- package/lib/components/textarea.js +2 -173
- package/lib/components/tooltip.d.ts +3 -11
- package/lib/components/tooltip.js +24 -160
- package/lib/components/wizard.d.ts +6 -54
- package/lib/components/wizard.js +15 -228
- package/lib/icons/fontawesome/brands.d.ts +0 -1
- package/lib/icons/fontawesome/brands.js +0 -8
- package/lib/icons/fontawesome/regular.d.ts +0 -1
- package/lib/icons/fontawesome/regular.js +0 -8
- package/lib/icons/fontawesome/solid.d.ts +0 -1
- package/lib/icons/fontawesome/solid.js +0 -8
- package/lib/icons/heroicons/micro.d.ts +0 -1
- package/lib/icons/heroicons/micro.js +0 -8
- package/lib/icons/heroicons/mini.d.ts +0 -1
- package/lib/icons/heroicons/mini.js +0 -8
- package/lib/icons/heroicons/outline.d.ts +0 -1
- package/lib/icons/heroicons/outline.js +0 -8
- package/lib/icons/heroicons/solid.d.ts +0 -1
- package/lib/icons/heroicons/solid.js +0 -8
- package/lib/icons/lucide.d.ts +0 -1
- package/lib/icons/lucide.js +0 -1872
- package/lib/icons/material/filled.d.ts +0 -1
- package/lib/icons/material/filled.js +0 -10
- package/lib/icons/material/outlined.d.ts +0 -1
- package/lib/icons/material/outlined.js +0 -10
- package/lib/icons/material/round.d.ts +0 -1
- package/lib/icons/material/round.js +0 -10
- package/lib/icons/material/sharp.d.ts +0 -1
- package/lib/icons/material/sharp.js +0 -10
- package/lib/icons/material/two-tone.d.ts +0 -1
- package/lib/icons/material/two-tone.js +0 -10
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -20
- package/lib/styles/button.d.ts +2 -20
- package/lib/styles/button.js +22 -122
- package/lib/styles/calendar-month.d.ts +1 -5
- package/lib/styles/calendar-month.js +4 -61
- package/lib/styles/calendar-navigation.d.ts +2 -6
- package/lib/styles/calendar-navigation.js +2 -27
- package/lib/styles/calendar.d.ts +1 -2
- package/lib/styles/calendar.js +1 -14
- package/lib/styles/checkbox.d.ts +0 -1
- package/lib/styles/checkbox.js +1 -23
- package/lib/styles/copy.d.ts +0 -1
- package/lib/styles/copy.js +2 -17
- package/lib/styles/custom-scrollbar.d.ts +1 -2
- package/lib/styles/custom-scrollbar.js +3 -18
- package/lib/styles/date-picker.d.ts +1 -5
- package/lib/styles/date-picker.js +35 -39
- package/lib/styles/file-upload.d.ts +1 -2
- package/lib/styles/file-upload.js +1 -16
- package/lib/styles/icon.d.ts +2 -6
- package/lib/styles/icon.js +7 -21
- package/lib/styles/input.d.ts +1 -6
- package/lib/styles/input.js +5 -54
- package/lib/styles/modal.d.ts +1 -2
- package/lib/styles/modal.js +21 -23
- package/lib/styles/option.d.ts +2 -6
- package/lib/styles/option.js +17 -12
- package/lib/styles/popup.d.ts +1 -2
- package/lib/styles/popup.js +26 -30
- package/lib/styles/radio.d.ts +0 -1
- package/lib/styles/radio.js +2 -16
- package/lib/styles/resize-observer.d.ts +1 -2
- package/lib/styles/resize-observer.js +0 -7
- package/lib/styles/scroll-container.d.ts +1 -2
- package/lib/styles/scroll-container.js +0 -19
- package/lib/styles/select-base.d.ts +0 -1
- package/lib/styles/select-base.js +68 -79
- package/lib/styles/select.d.ts +1 -2
- package/lib/styles/select.js +7 -15
- package/lib/styles/step.d.ts +1 -2
- package/lib/styles/step.js +0 -4
- package/lib/styles/switch.d.ts +0 -1
- package/lib/styles/switch.js +2 -20
- package/lib/styles/tab.d.ts +1 -2
- package/lib/styles/tab.js +0 -5
- package/lib/styles/tabs.d.ts +3 -11
- package/lib/styles/tabs.js +10 -48
- package/lib/styles/tag.d.ts +1 -5
- package/lib/styles/tag.js +2 -31
- package/lib/styles/textarea.d.ts +1 -2
- package/lib/styles/textarea.js +2 -45
- package/lib/styles/tooltip.d.ts +0 -1
- package/lib/styles/tooltip.js +0 -10
- package/lib/styles/wizard.d.ts +5 -21
- package/lib/styles/wizard.js +8 -88
- package/lib/types/common.d.ts +0 -2
- package/lib/types/common.js +0 -12
- package/lib/utils/calendar-utils.d.ts +4 -21
- package/lib/utils/calendar-utils.js +4 -177
- package/lib/utils/custom-scrollbar.d.ts +6 -20
- package/lib/utils/custom-scrollbar.js +1 -45
- package/lib/utils/flavor-sheet.d.ts +0 -1
- package/lib/utils/flavor-sheet.js +0 -23
- package/lib/utils/icon-registry.d.ts +0 -2
- package/lib/utils/icon-registry.js +1 -107
- package/lib/utils/icons.d.ts +0 -1
- package/lib/utils/icons.js +0 -9
- package/lib/utils/loader-registry.d.ts +0 -1
- package/lib/utils/loader-registry.js +0 -32
- package/lib/utils/locale.d.ts +2 -23
- package/lib/utils/locale.js +0 -86
- package/lib/utils/mobile.d.ts +0 -1
- package/lib/utils/mobile.js +0 -17
- package/lib/utils/number-format.d.ts +6 -3
- package/lib/utils/number-format.js +11 -67
- package/lib/utils/positioning.d.ts +50 -7
- package/lib/utils/positioning.js +52 -62
- package/lib/utils/property-capture.d.ts +5 -27
- package/lib/utils/property-capture.js +0 -108
- package/lib/utils/property-manager.d.ts +0 -1
- package/lib/utils/property-manager.js +0 -70
- package/lib/utils/resize-observer.d.ts +0 -1
- package/lib/utils/resize-observer.js +0 -36
- package/lib/utils/scroll-lock.d.ts +4 -11
- package/lib/utils/scroll-lock.js +0 -107
- package/lib/utils/styles.d.ts +0 -1
- package/lib/utils/styles.js +0 -24
- package/lib/version.d.ts +1 -2
- package/lib/version.js +1 -11
- package/package.json +2 -2
- package/lib/base/ty-component.d.ts.map +0 -1
- package/lib/base/ty-component.js.map +0 -1
- package/lib/components/button.d.ts.map +0 -1
- package/lib/components/button.js.map +0 -1
- package/lib/components/calendar-month.d.ts.map +0 -1
- package/lib/components/calendar-month.js.map +0 -1
- package/lib/components/calendar-navigation.d.ts.map +0 -1
- package/lib/components/calendar-navigation.js.map +0 -1
- package/lib/components/calendar.d.ts.map +0 -1
- package/lib/components/calendar.js.map +0 -1
- package/lib/components/checkbox.d.ts.map +0 -1
- package/lib/components/checkbox.js.map +0 -1
- package/lib/components/copy.d.ts.map +0 -1
- package/lib/components/copy.js.map +0 -1
- package/lib/components/date-picker.d.ts.map +0 -1
- package/lib/components/date-picker.js.map +0 -1
- package/lib/components/file-upload.d.ts.map +0 -1
- package/lib/components/file-upload.js.map +0 -1
- package/lib/components/icon.d.ts.map +0 -1
- package/lib/components/icon.js.map +0 -1
- package/lib/components/input.d.ts.map +0 -1
- package/lib/components/input.js.map +0 -1
- package/lib/components/modal.d.ts.map +0 -1
- package/lib/components/modal.js.map +0 -1
- package/lib/components/option.d.ts.map +0 -1
- package/lib/components/option.js.map +0 -1
- package/lib/components/popup.d.ts.map +0 -1
- package/lib/components/popup.js.map +0 -1
- package/lib/components/radio.d.ts.map +0 -1
- package/lib/components/radio.js.map +0 -1
- package/lib/components/resize-observer.d.ts.map +0 -1
- package/lib/components/resize-observer.js.map +0 -1
- package/lib/components/scroll-container.d.ts.map +0 -1
- package/lib/components/scroll-container.js.map +0 -1
- package/lib/components/select.d.ts.map +0 -1
- package/lib/components/select.js.map +0 -1
- package/lib/components/selected-tags.d.ts.map +0 -1
- package/lib/components/selected-tags.js.map +0 -1
- package/lib/components/step.d.ts.map +0 -1
- package/lib/components/step.js.map +0 -1
- package/lib/components/switch.d.ts.map +0 -1
- package/lib/components/switch.js.map +0 -1
- package/lib/components/tab.d.ts.map +0 -1
- package/lib/components/tab.js.map +0 -1
- package/lib/components/tabs.d.ts.map +0 -1
- package/lib/components/tabs.js.map +0 -1
- package/lib/components/tag.d.ts.map +0 -1
- package/lib/components/tag.js.map +0 -1
- package/lib/components/textarea.d.ts.map +0 -1
- package/lib/components/textarea.js.map +0 -1
- package/lib/components/tooltip.d.ts.map +0 -1
- package/lib/components/tooltip.js.map +0 -1
- package/lib/components/wizard.d.ts.map +0 -1
- package/lib/components/wizard.js.map +0 -1
- package/lib/icons/fontawesome/brands.d.ts.map +0 -1
- package/lib/icons/fontawesome/brands.js.map +0 -1
- package/lib/icons/fontawesome/regular.d.ts.map +0 -1
- package/lib/icons/fontawesome/regular.js.map +0 -1
- package/lib/icons/fontawesome/solid.d.ts.map +0 -1
- package/lib/icons/fontawesome/solid.js.map +0 -1
- package/lib/icons/heroicons/micro.d.ts.map +0 -1
- package/lib/icons/heroicons/micro.js.map +0 -1
- package/lib/icons/heroicons/mini.d.ts.map +0 -1
- package/lib/icons/heroicons/mini.js.map +0 -1
- package/lib/icons/heroicons/outline.d.ts.map +0 -1
- package/lib/icons/heroicons/outline.js.map +0 -1
- package/lib/icons/heroicons/solid.d.ts.map +0 -1
- package/lib/icons/heroicons/solid.js.map +0 -1
- package/lib/icons/lucide.d.ts.map +0 -1
- package/lib/icons/lucide.js.map +0 -1
- package/lib/icons/material/filled.d.ts.map +0 -1
- package/lib/icons/material/filled.js.map +0 -1
- package/lib/icons/material/outlined.d.ts.map +0 -1
- package/lib/icons/material/outlined.js.map +0 -1
- package/lib/icons/material/round.d.ts.map +0 -1
- package/lib/icons/material/round.js.map +0 -1
- package/lib/icons/material/sharp.d.ts.map +0 -1
- package/lib/icons/material/sharp.js.map +0 -1
- package/lib/icons/material/two-tone.d.ts.map +0 -1
- package/lib/icons/material/two-tone.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/styles/button.d.ts.map +0 -1
- package/lib/styles/button.js.map +0 -1
- package/lib/styles/calendar-month.d.ts.map +0 -1
- package/lib/styles/calendar-month.js.map +0 -1
- package/lib/styles/calendar-navigation.d.ts.map +0 -1
- package/lib/styles/calendar-navigation.js.map +0 -1
- package/lib/styles/calendar.d.ts.map +0 -1
- package/lib/styles/calendar.js.map +0 -1
- package/lib/styles/checkbox.d.ts.map +0 -1
- package/lib/styles/checkbox.js.map +0 -1
- package/lib/styles/copy.d.ts.map +0 -1
- package/lib/styles/copy.js.map +0 -1
- package/lib/styles/custom-scrollbar.d.ts.map +0 -1
- package/lib/styles/custom-scrollbar.js.map +0 -1
- package/lib/styles/date-picker.d.ts.map +0 -1
- package/lib/styles/date-picker.js.map +0 -1
- package/lib/styles/file-upload.d.ts.map +0 -1
- package/lib/styles/file-upload.js.map +0 -1
- package/lib/styles/icon.d.ts.map +0 -1
- package/lib/styles/icon.js.map +0 -1
- package/lib/styles/input.d.ts.map +0 -1
- package/lib/styles/input.js.map +0 -1
- package/lib/styles/modal.d.ts.map +0 -1
- package/lib/styles/modal.js.map +0 -1
- package/lib/styles/multiselect.d.ts +0 -8
- package/lib/styles/multiselect.d.ts.map +0 -1
- package/lib/styles/multiselect.js +0 -849
- package/lib/styles/multiselect.js.map +0 -1
- package/lib/styles/option.d.ts.map +0 -1
- package/lib/styles/option.js.map +0 -1
- package/lib/styles/popup.d.ts.map +0 -1
- package/lib/styles/popup.js.map +0 -1
- package/lib/styles/radio.d.ts.map +0 -1
- package/lib/styles/radio.js.map +0 -1
- package/lib/styles/resize-observer.d.ts.map +0 -1
- package/lib/styles/resize-observer.js.map +0 -1
- package/lib/styles/scroll-container.d.ts.map +0 -1
- package/lib/styles/scroll-container.js.map +0 -1
- package/lib/styles/select-base.d.ts.map +0 -1
- package/lib/styles/select-base.js.map +0 -1
- package/lib/styles/select.d.ts.map +0 -1
- package/lib/styles/select.js.map +0 -1
- package/lib/styles/step.d.ts.map +0 -1
- package/lib/styles/step.js.map +0 -1
- package/lib/styles/switch.d.ts.map +0 -1
- package/lib/styles/switch.js.map +0 -1
- package/lib/styles/tab.d.ts.map +0 -1
- package/lib/styles/tab.js.map +0 -1
- package/lib/styles/tabs.d.ts.map +0 -1
- package/lib/styles/tabs.js.map +0 -1
- package/lib/styles/tag.d.ts.map +0 -1
- package/lib/styles/tag.js.map +0 -1
- package/lib/styles/textarea.d.ts.map +0 -1
- package/lib/styles/textarea.js.map +0 -1
- package/lib/styles/tooltip.d.ts.map +0 -1
- package/lib/styles/tooltip.js.map +0 -1
- package/lib/styles/wizard.d.ts.map +0 -1
- package/lib/styles/wizard.js.map +0 -1
- package/lib/types/common.d.ts.map +0 -1
- package/lib/types/common.js.map +0 -1
- package/lib/utils/calendar-utils.d.ts.map +0 -1
- package/lib/utils/calendar-utils.js.map +0 -1
- package/lib/utils/custom-scrollbar.d.ts.map +0 -1
- package/lib/utils/custom-scrollbar.js.map +0 -1
- package/lib/utils/flavor-sheet.d.ts.map +0 -1
- package/lib/utils/flavor-sheet.js.map +0 -1
- package/lib/utils/icon-registry.d.ts.map +0 -1
- package/lib/utils/icon-registry.js.map +0 -1
- package/lib/utils/icons.d.ts.map +0 -1
- package/lib/utils/icons.js.map +0 -1
- package/lib/utils/loader-registry.d.ts.map +0 -1
- package/lib/utils/loader-registry.js.map +0 -1
- package/lib/utils/locale.d.ts.map +0 -1
- package/lib/utils/locale.js.map +0 -1
- package/lib/utils/mobile.d.ts.map +0 -1
- package/lib/utils/mobile.js.map +0 -1
- package/lib/utils/number-format.d.ts.map +0 -1
- package/lib/utils/number-format.js.map +0 -1
- package/lib/utils/parse-boolean.d.ts +0 -39
- package/lib/utils/parse-boolean.d.ts.map +0 -1
- package/lib/utils/parse-boolean.js +0 -58
- package/lib/utils/parse-boolean.js.map +0 -1
- package/lib/utils/positioning.d.ts.map +0 -1
- package/lib/utils/positioning.js.map +0 -1
- package/lib/utils/property-capture.d.ts.map +0 -1
- package/lib/utils/property-capture.js.map +0 -1
- package/lib/utils/property-manager.d.ts.map +0 -1
- package/lib/utils/property-manager.js.map +0 -1
- package/lib/utils/resize-observer.d.ts.map +0 -1
- package/lib/utils/resize-observer.js.map +0 -1
- package/lib/utils/scroll-lock.d.ts.map +0 -1
- package/lib/utils/scroll-lock.js.map +0 -1
- package/lib/utils/styles.d.ts.map +0 -1
- package/lib/utils/styles.js.map +0 -1
- package/lib/version.d.ts.map +0 -1
- package/lib/version.js.map +0 -1
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Date Picker Component Styles
|
|
3
|
-
* PORTED FROM: cljs/ty/components/date_picker.css
|
|
4
|
-
*/
|
|
5
1
|
import { FLAVORS } from "../types/common.js";
|
|
6
|
-
/* Flavor rules only set --date-picker-accent (border), -accent-bold
|
|
7
|
-
(hover/focus border), and -ring (focus shadow); the stub base rules
|
|
8
|
-
consume them. Doubles as the per-instance override API. Neutral is
|
|
9
|
-
skipped — the 'default' flavor is the unstyled --ty-date-picker-* chrome.
|
|
10
|
-
Fallback flavor `fb` is used for custom flavors (suffixed tokens fall
|
|
11
|
-
back to the custom base color, then neutral). */
|
|
12
2
|
const datePickerFlavor = (f, fb) => {
|
|
13
3
|
const c = (s) => fb
|
|
14
4
|
? s
|
|
@@ -35,21 +25,16 @@ const datePickerFlavor = (f, fb) => {
|
|
|
35
25
|
}
|
|
36
26
|
`;
|
|
37
27
|
};
|
|
38
|
-
/** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
|
|
39
28
|
export const datePickerCustomFlavorCss = (base) => datePickerFlavor(base, "neutral");
|
|
40
29
|
export const datePickerStyles = `
|
|
41
|
-
/* Date Picker Component Styles */
|
|
42
30
|
:host {
|
|
43
31
|
display: block;
|
|
44
32
|
width: auto;
|
|
45
33
|
min-width: 200px;
|
|
46
|
-
font-family:
|
|
34
|
+
font-family: inherit;
|
|
47
35
|
|
|
48
|
-
/*
|
|
49
|
-
|
|
50
|
-
Thin shim over --ty-input-*. Override these to retheme just the date-picker
|
|
51
|
-
trigger without affecting other inputs.
|
|
52
|
-
========================================================================== */
|
|
36
|
+
/* Theming tokens — date-picker stub. Thin shim over --ty-input-*: override
|
|
37
|
+
these to retheme just the date-picker trigger, not other inputs. */
|
|
53
38
|
--ty-date-picker-bg: var(--ty-input-bg);
|
|
54
39
|
--ty-date-picker-color: var(--ty-input-color);
|
|
55
40
|
--ty-date-picker-placeholder: var(--ty-input-placeholder);
|
|
@@ -61,18 +46,14 @@ export const datePickerStyles = `
|
|
|
61
46
|
--ty-date-picker-disabled-color: var(--ty-input-disabled-color);
|
|
62
47
|
--ty-date-picker-radius: var(--ty-radius-md);
|
|
63
48
|
|
|
64
|
-
/*
|
|
65
|
-
|
|
66
|
-
Shared with ty-calendar / ty-calendar-month theming.
|
|
67
|
-
========================================================================== */
|
|
49
|
+
/* Theming tokens — calendar popup surface. Shared with ty-calendar /
|
|
50
|
+
ty-calendar-month theming. */
|
|
68
51
|
--ty-calendar-surface-bg: var(--ty-surface-floating);
|
|
69
52
|
--ty-calendar-surface-border: var(--ty-input-border);
|
|
70
53
|
--ty-calendar-surface-shadow: var(--ty-shadow-lg, 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1));
|
|
71
54
|
--ty-calendar-surface-radius: var(--ty-radius-lg);
|
|
72
55
|
|
|
73
|
-
/*
|
|
74
|
-
Theming Tokens — Time Section
|
|
75
|
-
========================================================================== */
|
|
56
|
+
/* Theming tokens — time section */
|
|
76
57
|
--ty-calendar-time-bg: transparent;
|
|
77
58
|
--ty-calendar-time-border: var(--ty-border-faint);
|
|
78
59
|
--ty-calendar-time-label-color: var(--ty-color-neutral);
|
|
@@ -117,7 +98,6 @@ export const datePickerStyles = `
|
|
|
117
98
|
width: 100%;
|
|
118
99
|
}
|
|
119
100
|
|
|
120
|
-
/* Start-slot icon (leading content inside the date-picker stub) */
|
|
121
101
|
.date-picker-stub ::slotted([slot="start"]) {
|
|
122
102
|
display: flex;
|
|
123
103
|
align-items: center;
|
|
@@ -132,7 +112,6 @@ export const datePickerStyles = `
|
|
|
132
112
|
height: 1em;
|
|
133
113
|
}
|
|
134
114
|
|
|
135
|
-
/* Date picker stub (styled like dropdown) */
|
|
136
115
|
.date-picker-stub {
|
|
137
116
|
width: 100%;
|
|
138
117
|
cursor: pointer;
|
|
@@ -144,7 +123,7 @@ export const datePickerStyles = `
|
|
|
144
123
|
color: var(--ty-date-picker-color);
|
|
145
124
|
border: 1px solid var(--date-picker-accent, var(--ty-date-picker-border));
|
|
146
125
|
border-radius: var(--ty-date-picker-radius);
|
|
147
|
-
font-family:
|
|
126
|
+
font-family: inherit;
|
|
148
127
|
font-size: var(--ty-font-sm);
|
|
149
128
|
font-weight: var(--ty-font-normal);
|
|
150
129
|
line-height: var(--ty-line-height-tight);
|
|
@@ -172,7 +151,6 @@ export const datePickerStyles = `
|
|
|
172
151
|
box-shadow: 0 0 0 3px var(--date-picker-ring, var(--ty-date-picker-shadow-focus));
|
|
173
152
|
}
|
|
174
153
|
|
|
175
|
-
/* Size variants */
|
|
176
154
|
.date-picker-stub.sm {
|
|
177
155
|
min-height: var(--ty-size-sm);
|
|
178
156
|
font-size: var(--ty-font-xs);
|
|
@@ -190,7 +168,6 @@ export const datePickerStyles = `
|
|
|
190
168
|
/* Flavor variants — set --date-picker-accent*, consumed by the stub rules above */
|
|
191
169
|
${FLAVORS.filter((f) => f !== "neutral").map((f) => datePickerFlavor(f)).join("")}
|
|
192
170
|
|
|
193
|
-
/* Text content */
|
|
194
171
|
.stub-text {
|
|
195
172
|
flex: 1;
|
|
196
173
|
white-space: nowrap;
|
|
@@ -205,7 +182,6 @@ ${FLAVORS.filter((f) => f !== "neutral").map((f) => datePickerFlavor(f)).join(""
|
|
|
205
182
|
color: var(--ty-date-picker-placeholder);
|
|
206
183
|
}
|
|
207
184
|
|
|
208
|
-
/* Icons */
|
|
209
185
|
.stub-icons {
|
|
210
186
|
display: flex;
|
|
211
187
|
align-items: center;
|
|
@@ -275,16 +251,22 @@ ${FLAVORS.filter((f) => f !== "neutral").map((f) => datePickerFlavor(f)).join(""
|
|
|
275
251
|
box-sizing: border-box;
|
|
276
252
|
padding: var(--calendar-padding, 8px);
|
|
277
253
|
|
|
278
|
-
/* Hidden by default */
|
|
279
254
|
opacity: 0;
|
|
280
|
-
|
|
255
|
+
/* Entrance motion uses the individual scale/translate properties so it
|
|
256
|
+
composes with the collision-shift transform below (they apply first). */
|
|
257
|
+
scale: 0.96;
|
|
258
|
+
translate: 0 -6px;
|
|
259
|
+
transform-origin: top center;
|
|
260
|
+
transition:
|
|
261
|
+
opacity var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1)),
|
|
262
|
+
scale var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1)),
|
|
263
|
+
translate var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1));
|
|
281
264
|
|
|
282
265
|
transform: translate(var(--calendar-offset-x, 0px), var(--calendar-offset-y, 0px));
|
|
283
266
|
top: -1000px;
|
|
284
267
|
left: -1000px;
|
|
285
268
|
}
|
|
286
269
|
|
|
287
|
-
/* Direction-based positioning with CSS classes */
|
|
288
270
|
.calendar-dialog.position-below {
|
|
289
271
|
left: var(--calendar-x);
|
|
290
272
|
top: var(--calendar-y);
|
|
@@ -295,17 +277,34 @@ ${FLAVORS.filter((f) => f !== "neutral").map((f) => datePickerFlavor(f)).join(""
|
|
|
295
277
|
bottom: var(--calendar-y);
|
|
296
278
|
top: auto;
|
|
297
279
|
flex-direction: column-reverse;
|
|
280
|
+
translate: 0 6px;
|
|
281
|
+
transform-origin: bottom center;
|
|
298
282
|
}
|
|
299
283
|
|
|
300
284
|
.calendar-dialog.open {
|
|
301
285
|
opacity: 1;
|
|
286
|
+
scale: 1;
|
|
287
|
+
translate: 0 0;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* First-frame "from" values — see select-base.ts: transitions can't start on
|
|
291
|
+
an element that was display:none last frame; @starting-style fixes that. */
|
|
292
|
+
@starting-style {
|
|
293
|
+
.calendar-dialog.open {
|
|
294
|
+
opacity: 0;
|
|
295
|
+
scale: 0.96;
|
|
296
|
+
translate: 0 -6px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.calendar-dialog.open.position-above {
|
|
300
|
+
translate: 0 6px;
|
|
301
|
+
}
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
.calendar-dialog::backdrop {
|
|
305
305
|
background: transparent
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
/* Calendar content container */
|
|
309
308
|
.calendar-content {
|
|
310
309
|
background-color: var(--ty-calendar-surface-bg);
|
|
311
310
|
border: 1px solid var(--ty-calendar-surface-border);
|
|
@@ -317,7 +316,6 @@ ${FLAVORS.filter((f) => f !== "neutral").map((f) => datePickerFlavor(f)).join(""
|
|
|
317
316
|
align-items: center;
|
|
318
317
|
}
|
|
319
318
|
|
|
320
|
-
/* Native date input for mobile */
|
|
321
319
|
/* Native input is invisible — used only to trigger the OS picker */
|
|
322
320
|
.native-date-input {
|
|
323
321
|
position: absolute;
|
|
@@ -342,7 +340,6 @@ ${FLAVORS.filter((f) => f !== "neutral").map((f) => datePickerFlavor(f)).join(""
|
|
|
342
340
|
cursor: pointer;
|
|
343
341
|
}
|
|
344
342
|
|
|
345
|
-
/* Time input section */
|
|
346
343
|
.time-section {
|
|
347
344
|
display: flex;
|
|
348
345
|
min-height: 2.5rem;
|
|
@@ -370,7 +367,7 @@ ${FLAVORS.filter((f) => f !== "neutral").map((f) => datePickerFlavor(f)).join(""
|
|
|
370
367
|
border-radius: var(--ty-radius-sm);
|
|
371
368
|
background: var(--ty-input-bg);
|
|
372
369
|
color: var(--ty-calendar-time-input-color);
|
|
373
|
-
font-family:
|
|
370
|
+
font-family: inherit;
|
|
374
371
|
font-size: var(--ty-font-sm);
|
|
375
372
|
font-variant-numeric: tabular-nums;
|
|
376
373
|
text-align: center;
|
|
@@ -397,4 +394,3 @@ ${FLAVORS.filter((f) => f !== "neutral").map((f) => datePickerFlavor(f)).join(""
|
|
|
397
394
|
flex-shrink: 0;
|
|
398
395
|
}
|
|
399
396
|
`;
|
|
400
|
-
//# sourceMappingURL=date-picker.js.map
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export declare const fileUploadStyles = "\n:host {\n display: block;\n font-family:
|
|
2
|
-
//# sourceMappingURL=file-upload.d.ts.map
|
|
1
|
+
export declare const fileUploadStyles = "\n:host {\n display: block;\n font-family: inherit;\n width: 100%;\n}\n\n.file-upload-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n box-sizing: border-box;\n}\n\n.upload-label {\n font-size: var(--ty-font-sm);\n line-height: var(--ty-leading-sm);\n letter-spacing: var(--ty-tracking-sm);\n font-weight: var(--ty-font-medium);\n color: var(--ty-label-color);\n margin-bottom: 6px;\n padding-left: 4px;\n display: flex;\n align-items: center;\n}\n\n.required-icon {\n color: var(--ty-color-danger);\n margin-left: 4px;\n font-size: 0.75rem;\n line-height: 1;\n}\n\n.drop-zone {\n border: 2px dashed var(--ty-border);\n border-radius: var(--ty-radius-base);\n padding: 2rem 1.5rem;\n text-align: center;\n cursor: pointer;\n transition: var(--ty-local-transition, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease);\n outline: none;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n min-height: 140px;\n user-select: none;\n}\n\n.drop-zone:hover:not(.disabled) {\n border-color: var(--ty-input-border-hover);\n background: var(--ty-surface-content);\n}\n\n.drop-zone.focused {\n border-color: var(--ty-input-border-focus);\n box-shadow: 0 0 0 3px var(--ty-input-shadow-focus);\n}\n\n.drop-zone.drag-active {\n border-color: var(--ty-color-primary);\n border-style: solid;\n background: var(--ty-bg-primary-);\n}\n\n.drop-zone.drag-active .upload-icon {\n color: var(--ty-color-primary);\n transform: translateY(-2px);\n}\n\n.drop-zone.has-files {\n min-height: 80px;\n padding: 1.25rem 1.5rem;\n}\n\n.drop-zone.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n.drop-zone.error {\n border-color: var(--ty-color-danger);\n}\n\n.drop-zone.error:not(.disabled) {\n background: var(--ty-bg-danger-);\n}\n\n.upload-icon {\n color: var(--ty-text-faint);\n width: 2.5rem;\n height: 2.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: var(--ty-local-transition, color 0.15s ease, transform 0.15s ease);\n pointer-events: none;\n}\n\n.upload-icon svg {\n width: 100%;\n height: 100%;\n}\n\n.upload-hint {\n color: var(--ty-text-soft);\n font-size: var(--ty-font-sm);\n line-height: var(--ty-leading-sm);\n pointer-events: none;\n}\n\n.browse-link {\n color: var(--ty-color-primary);\n font-weight: var(--ty-font-medium);\n}\n\n.upload-sub-hint {\n color: var(--ty-text-faint);\n font-size: var(--ty-font-xs);\n line-height: var(--ty-leading-xs);\n pointer-events: none;\n}\n\n.file-list {\n display: flex;\n flex-direction: column;\n gap: 0.375rem;\n margin-top: 0.5rem;\n}\n\n.file-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 0.75rem;\n border-radius: var(--ty-radius-base);\n background: var(--ty-surface-content);\n border: 1px solid var(--ty-border-soft);\n}\n\n.file-icon {\n color: var(--ty-text-faint);\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n display: flex;\n align-items: center;\n}\n\n.file-icon svg {\n width: 100%;\n height: 100%;\n}\n\n.file-name {\n flex: 1;\n font-size: var(--ty-font-sm);\n color: var(--ty-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n}\n\n.file-size {\n font-size: var(--ty-font-xs);\n color: var(--ty-text-faint);\n flex-shrink: 0;\n font-variant-numeric: tabular-nums;\n}\n\n.file-remove {\n flex-shrink: 0;\n cursor: pointer;\n color: var(--ty-text-faint);\n width: 1.25rem;\n height: 1.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n transition: var(--ty-local-transition, color 0.15s ease, background-color 0.15s ease);\n border: none;\n background: none;\n padding: 0;\n outline: none;\n}\n\n.file-remove:hover {\n color: var(--ty-color-danger);\n background: var(--ty-bg-danger-);\n}\n\n.file-remove:focus-visible {\n box-shadow: 0 0 0 2px var(--ty-color-danger);\n}\n\n.file-remove svg {\n width: 12px;\n height: 12px;\n}\n\n.error-message {\n font-size: var(--ty-font-xs);\n line-height: var(--ty-leading-xs);\n color: var(--ty-color-danger);\n margin-top: 4px;\n padding-left: 4px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .drop-zone,\n .upload-icon,\n .file-remove {\n transition: none;\n }\n}\n\n@media (prefers-contrast: high) {\n .drop-zone {\n border-width: 3px;\n }\n}\n";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const fileUploadStyles = `
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
|
-
font-family:
|
|
4
|
+
font-family: inherit;
|
|
5
5
|
width: 100%;
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -12,8 +12,6 @@ export const fileUploadStyles = `
|
|
|
12
12
|
box-sizing: border-box;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
/* ===== LABEL ===== */
|
|
16
|
-
|
|
17
15
|
.upload-label {
|
|
18
16
|
font-size: var(--ty-font-sm);
|
|
19
17
|
line-height: var(--ty-leading-sm);
|
|
@@ -33,8 +31,6 @@ export const fileUploadStyles = `
|
|
|
33
31
|
line-height: 1;
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
/* ===== DROP ZONE ===== */
|
|
37
|
-
|
|
38
34
|
.drop-zone {
|
|
39
35
|
border: 2px dashed var(--ty-border);
|
|
40
36
|
border-radius: var(--ty-radius-base);
|
|
@@ -92,8 +88,6 @@ export const fileUploadStyles = `
|
|
|
92
88
|
background: var(--ty-bg-danger-);
|
|
93
89
|
}
|
|
94
90
|
|
|
95
|
-
/* ===== UPLOAD ICON ===== */
|
|
96
|
-
|
|
97
91
|
.upload-icon {
|
|
98
92
|
color: var(--ty-text-faint);
|
|
99
93
|
width: 2.5rem;
|
|
@@ -110,8 +104,6 @@ export const fileUploadStyles = `
|
|
|
110
104
|
height: 100%;
|
|
111
105
|
}
|
|
112
106
|
|
|
113
|
-
/* ===== HINT TEXT ===== */
|
|
114
|
-
|
|
115
107
|
.upload-hint {
|
|
116
108
|
color: var(--ty-text-soft);
|
|
117
109
|
font-size: var(--ty-font-sm);
|
|
@@ -131,8 +123,6 @@ export const fileUploadStyles = `
|
|
|
131
123
|
pointer-events: none;
|
|
132
124
|
}
|
|
133
125
|
|
|
134
|
-
/* ===== FILE LIST ===== */
|
|
135
|
-
|
|
136
126
|
.file-list {
|
|
137
127
|
display: flex;
|
|
138
128
|
flex-direction: column;
|
|
@@ -212,8 +202,6 @@ export const fileUploadStyles = `
|
|
|
212
202
|
height: 12px;
|
|
213
203
|
}
|
|
214
204
|
|
|
215
|
-
/* ===== ERROR MESSAGE ===== */
|
|
216
|
-
|
|
217
205
|
.error-message {
|
|
218
206
|
font-size: var(--ty-font-xs);
|
|
219
207
|
line-height: var(--ty-leading-xs);
|
|
@@ -222,8 +210,6 @@ export const fileUploadStyles = `
|
|
|
222
210
|
padding-left: 4px;
|
|
223
211
|
}
|
|
224
212
|
|
|
225
|
-
/* ===== ACCESSIBILITY ===== */
|
|
226
|
-
|
|
227
213
|
@media (prefers-reduced-motion: reduce) {
|
|
228
214
|
.drop-zone,
|
|
229
215
|
.upload-icon,
|
|
@@ -238,4 +224,3 @@ export const fileUploadStyles = `
|
|
|
238
224
|
}
|
|
239
225
|
}
|
|
240
226
|
`;
|
|
241
|
-
//# sourceMappingURL=file-upload.js.map
|
package/lib/styles/icon.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* PORTED FROM: clj/ty/components/icon.css
|
|
4
|
-
*/
|
|
5
|
-
export declare const iconStyles = "\n:host {\n /* Display & Layout - CRITICAL: No containment to prevent paint deferral */\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n \n /* Dimensions with CSS variable support for flexibility */\n width: var(--ty-icon-size, 1em);\n height: var(--ty-icon-size, 1em);\n \n /* Enforce square aspect ratio */\n aspect-ratio: 1 / 1;\n \n \n /* Color & Transitions */\n color: inherit;\n transition: color var(--ty-transition-fast);\n \n /* Flex Behavior */\n flex-shrink: 0;\n \n /* Visibility - Force immediate rendering */\n visibility: visible !important;\n opacity: 1;\n \n /* ANTI-FLICKER: Force browser to paint immediately */\n will-change: contents;\n \n /* Prevent any sub-pixel rendering issues */\n transform: translateZ(0);\n -webkit-font-smoothing: antialiased;\n}\n\n/* The SVG element inside shadow DOM (registry / fallback path) */\n:host svg {\n width: 100%;\n height: 100%;\n display: block;\n\n /* Force immediate SVG rendering */\n will-change: auto;\n transform: translateZ(0);\n}\n\n/* Slotted SVG (server-side path: <ty-icon><svg>...</svg></ty-icon>).\n ::slotted() targets light-DOM children so they fill the host the same way\n shadow-DOM SVG does. Color is inherited from :host via currentColor. */\n::slotted(svg),\n::slotted(img) {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n/* When used in slots, ensure proper display */\n:host([slot]) {\n display: inline-flex;\n}\n\n/* Size variants via CSS classes on the host */\n:host(.icon-xs) {\n width: 0.75em;\n height: 0.75em;\n}\n\n:host(.icon-sm) {\n width: 0.875em;\n height: 0.875em;\n}\n\n:host(.icon-md) {\n width: 1em;\n height: 1em;\n}\n\n:host(.icon-lg) {\n width: 1.25em;\n height: 1.25em;\n}\n\n:host(.icon-xl) {\n width: 1.5em;\n height: 1.5em;\n}\n\n:host(.icon-2xl) {\n width: 2em;\n height: 2em;\n}\n\n/* Fixed pixel sizes */\n:host(.icon-12) {\n width: 12px;\n height: 12px;\n}\n\n:host(.icon-14) {\n width: 14px;\n height: 14px;\n}\n\n:host(.icon-16) {\n width: 16px;\n height: 16px;\n}\n\n:host(.icon-18) {\n width: 18px;\n height: 18px;\n}\n\n:host(.icon-20) {\n width: 20px;\n height: 20px;\n}\n\n:host(.icon-24) {\n width: 24px;\n height: 24px;\n}\n\n:host(.icon-32) {\n width: 32px;\n height: 32px;\n}\n\n:host(.icon-48) {\n width: 48px;\n height: 48px;\n}\n\n:host(.icon-64) {\n width: 64px;\n height: 64px;\n}\n\n:host(.icon-80) {\n width: 80px;\n height: 80px;\n}\n\n:host(.icon-96) {\n width: 96px;\n height: 96px;\n}\n\n/* Spinning animation - default tempo */\n:host(.icon-spin) {\n animation: icon-spin 1s linear infinite;\n}\n\n/* Spinning animation - slow tempo */\n:host(.icon-spin.icon-tempo-slow) {\n animation: icon-spin 2s linear infinite;\n}\n\n/* Spinning animation - fast tempo */\n:host(.icon-spin.icon-tempo-fast) {\n animation: icon-spin 0.5s linear infinite;\n}\n\n@keyframes icon-spin {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n\n/* Pulse animation - default tempo */\n:host(.icon-pulse) {\n animation: icon-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n/* Pulse animation - slow tempo */\n:host(.icon-pulse.icon-tempo-slow) {\n animation: icon-pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n/* Pulse animation - fast tempo */\n:host(.icon-pulse.icon-tempo-fast) {\n animation: icon-pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n@keyframes icon-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.5;\n }\n}\n\n/* Accessibility: ensure icons are not announced by screen readers by default */\n:host {\n -webkit-user-select: none;\n user-select: none;\n}\n\n/* Allow pointer events to pass through by default */\n:host(:not(.icon-clickable)) {\n pointer-events: none;\n}\n\n/* Clickable icons */\n:host(.icon-clickable) {\n cursor: pointer;\n pointer-events: auto;\n transition: color var(--ty-transition-fast), transform var(--ty-transition-fast);\n}\n\n:host(.icon-clickable:hover) {\n transform: scale(1.1);\n}\n\n:host(.icon-clickable:active) {\n transform: scale(0.95);\n}\n\n/* Disabled state */\n:host(.icon-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Block display variant */\n:host(.icon-block) {\n display: block;\n}\n";
|
|
6
|
-
//# sourceMappingURL=icon.d.ts.map
|
|
1
|
+
/** Icon Component Styles */
|
|
2
|
+
export declare const iconStyles = "\n:host {\n /* Display & Layout - CRITICAL: No containment to prevent paint deferral */\n /* Block-level flex, NOT inline-flex: as an inline box the icon generates a\n line box in its parent, so a shrink-wrapping wrapper (badge, .rounded-full\n chip) inherits the parent's line-height strut and renders taller than wide\n \u2014 a 12px icon in a 24px-line-height badge becomes a 22x34 oval. To place an\n icon inline with text, make the *text wrapper* inline-flex instead. */\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n \n width: var(--ty-icon-size, 1em);\n height: var(--ty-icon-size, 1em);\n \n aspect-ratio: 1 / 1;\n \n \n color: inherit;\n transition: color var(--ty-transition-fast);\n \n flex-shrink: 0;\n \n /* Visibility - Force immediate rendering */\n visibility: visible !important;\n opacity: 1;\n \n /* ANTI-FLICKER: Force browser to paint immediately */\n will-change: contents;\n \n /* Prevent any sub-pixel rendering issues */\n transform: translateZ(0);\n -webkit-font-smoothing: antialiased;\n}\n\n/* The SVG element inside shadow DOM (registry / fallback path) */\n:host svg {\n width: 100%;\n height: 100%;\n display: block;\n\n /* Force immediate SVG rendering */\n will-change: auto;\n transform: translateZ(0);\n}\n\n/* Slotted SVG (server-side path: <ty-icon><svg>...</svg></ty-icon>).\n ::slotted() targets light-DOM children so they fill the host the same way\n shadow-DOM SVG does. Color is inherited from :host via currentColor. */\n::slotted(svg),\n::slotted(img) {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n/* In a named slot the icon sits alongside text (button start/end), so inline\n layout is what the host expects there. */\n:host([slot]) {\n display: inline-flex;\n}\n\n:host(.icon-xs) {\n width: 0.75em;\n height: 0.75em;\n}\n\n:host(.icon-sm) {\n width: 0.875em;\n height: 0.875em;\n}\n\n:host(.icon-md) {\n width: 1em;\n height: 1em;\n}\n\n:host(.icon-lg) {\n width: 1.25em;\n height: 1.25em;\n}\n\n:host(.icon-xl) {\n width: 1.5em;\n height: 1.5em;\n}\n\n:host(.icon-2xl) {\n width: 2em;\n height: 2em;\n}\n\n/* Fixed pixel sizes */\n:host(.icon-12) {\n width: 12px;\n height: 12px;\n}\n\n:host(.icon-14) {\n width: 14px;\n height: 14px;\n}\n\n:host(.icon-16) {\n width: 16px;\n height: 16px;\n}\n\n:host(.icon-18) {\n width: 18px;\n height: 18px;\n}\n\n:host(.icon-20) {\n width: 20px;\n height: 20px;\n}\n\n:host(.icon-24) {\n width: 24px;\n height: 24px;\n}\n\n:host(.icon-32) {\n width: 32px;\n height: 32px;\n}\n\n:host(.icon-48) {\n width: 48px;\n height: 48px;\n}\n\n:host(.icon-64) {\n width: 64px;\n height: 64px;\n}\n\n:host(.icon-80) {\n width: 80px;\n height: 80px;\n}\n\n:host(.icon-96) {\n width: 96px;\n height: 96px;\n}\n\n:host(.icon-spin) {\n animation: icon-spin 1s linear infinite;\n}\n\n:host(.icon-spin.icon-tempo-slow) {\n animation: icon-spin 2s linear infinite;\n}\n\n:host(.icon-spin.icon-tempo-fast) {\n animation: icon-spin 0.5s linear infinite;\n}\n\n@keyframes icon-spin {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n\n:host(.icon-pulse) {\n animation: icon-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n:host(.icon-pulse.icon-tempo-slow) {\n animation: icon-pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n:host(.icon-pulse.icon-tempo-fast) {\n animation: icon-pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n@keyframes icon-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.5;\n }\n}\n\n/* Accessibility: ensure icons are not announced by screen readers by default */\n:host {\n -webkit-user-select: none;\n user-select: none;\n}\n\n:host(:not(.icon-clickable)) {\n pointer-events: none;\n}\n\n:host(.icon-clickable) {\n cursor: pointer;\n pointer-events: auto;\n transition: color var(--ty-transition-fast), transform var(--ty-transition-fast);\n}\n\n:host(.icon-clickable:hover) {\n transform: scale(1.1);\n}\n\n:host(.icon-clickable:active) {\n transform: scale(0.95);\n}\n\n:host(.icon-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n:host(.icon-block) {\n display: block;\n}\n";
|
package/lib/styles/icon.js
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Icon Component Styles
|
|
3
|
-
* PORTED FROM: clj/ty/components/icon.css
|
|
4
|
-
*/
|
|
5
1
|
export const iconStyles = `
|
|
6
2
|
:host {
|
|
7
3
|
/* Display & Layout - CRITICAL: No containment to prevent paint deferral */
|
|
4
|
+
/* Block-level flex, NOT inline-flex: as an inline box the icon generates a
|
|
5
|
+
line box in its parent, so a shrink-wrapping wrapper (badge, .rounded-full
|
|
6
|
+
chip) inherits the parent's line-height strut and renders taller than wide
|
|
7
|
+
— a 12px icon in a 24px-line-height badge becomes a 22x34 oval. To place an
|
|
8
|
+
icon inline with text, make the *text wrapper* inline-flex instead. */
|
|
8
9
|
display: flex;
|
|
9
10
|
align-items: center;
|
|
10
11
|
justify-content: center;
|
|
11
12
|
line-height: 0;
|
|
12
13
|
|
|
13
|
-
/* Dimensions with CSS variable support for flexibility */
|
|
14
14
|
width: var(--ty-icon-size, 1em);
|
|
15
15
|
height: var(--ty-icon-size, 1em);
|
|
16
16
|
|
|
17
|
-
/* Enforce square aspect ratio */
|
|
18
17
|
aspect-ratio: 1 / 1;
|
|
19
18
|
|
|
20
19
|
|
|
21
|
-
/* Color & Transitions */
|
|
22
20
|
color: inherit;
|
|
23
21
|
transition: color var(--ty-transition-fast);
|
|
24
22
|
|
|
25
|
-
/* Flex Behavior */
|
|
26
23
|
flex-shrink: 0;
|
|
27
24
|
|
|
28
25
|
/* Visibility - Force immediate rendering */
|
|
@@ -58,12 +55,12 @@ export const iconStyles = `
|
|
|
58
55
|
display: block;
|
|
59
56
|
}
|
|
60
57
|
|
|
61
|
-
/*
|
|
58
|
+
/* In a named slot the icon sits alongside text (button start/end), so inline
|
|
59
|
+
layout is what the host expects there. */
|
|
62
60
|
:host([slot]) {
|
|
63
61
|
display: inline-flex;
|
|
64
62
|
}
|
|
65
63
|
|
|
66
|
-
/* Size variants via CSS classes on the host */
|
|
67
64
|
:host(.icon-xs) {
|
|
68
65
|
width: 0.75em;
|
|
69
66
|
height: 0.75em;
|
|
@@ -150,17 +147,14 @@ export const iconStyles = `
|
|
|
150
147
|
height: 96px;
|
|
151
148
|
}
|
|
152
149
|
|
|
153
|
-
/* Spinning animation - default tempo */
|
|
154
150
|
:host(.icon-spin) {
|
|
155
151
|
animation: icon-spin 1s linear infinite;
|
|
156
152
|
}
|
|
157
153
|
|
|
158
|
-
/* Spinning animation - slow tempo */
|
|
159
154
|
:host(.icon-spin.icon-tempo-slow) {
|
|
160
155
|
animation: icon-spin 2s linear infinite;
|
|
161
156
|
}
|
|
162
157
|
|
|
163
|
-
/* Spinning animation - fast tempo */
|
|
164
158
|
:host(.icon-spin.icon-tempo-fast) {
|
|
165
159
|
animation: icon-spin 0.5s linear infinite;
|
|
166
160
|
}
|
|
@@ -175,17 +169,14 @@ export const iconStyles = `
|
|
|
175
169
|
}
|
|
176
170
|
}
|
|
177
171
|
|
|
178
|
-
/* Pulse animation - default tempo */
|
|
179
172
|
:host(.icon-pulse) {
|
|
180
173
|
animation: icon-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
181
174
|
}
|
|
182
175
|
|
|
183
|
-
/* Pulse animation - slow tempo */
|
|
184
176
|
:host(.icon-pulse.icon-tempo-slow) {
|
|
185
177
|
animation: icon-pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
186
178
|
}
|
|
187
179
|
|
|
188
|
-
/* Pulse animation - fast tempo */
|
|
189
180
|
:host(.icon-pulse.icon-tempo-fast) {
|
|
190
181
|
animation: icon-pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
191
182
|
}
|
|
@@ -207,12 +198,10 @@ export const iconStyles = `
|
|
|
207
198
|
user-select: none;
|
|
208
199
|
}
|
|
209
200
|
|
|
210
|
-
/* Allow pointer events to pass through by default */
|
|
211
201
|
:host(:not(.icon-clickable)) {
|
|
212
202
|
pointer-events: none;
|
|
213
203
|
}
|
|
214
204
|
|
|
215
|
-
/* Clickable icons */
|
|
216
205
|
:host(.icon-clickable) {
|
|
217
206
|
cursor: pointer;
|
|
218
207
|
pointer-events: auto;
|
|
@@ -227,15 +216,12 @@ export const iconStyles = `
|
|
|
227
216
|
transform: scale(0.95);
|
|
228
217
|
}
|
|
229
218
|
|
|
230
|
-
/* Disabled state */
|
|
231
219
|
:host(.icon-disabled) {
|
|
232
220
|
opacity: 0.5;
|
|
233
221
|
cursor: not-allowed;
|
|
234
222
|
}
|
|
235
223
|
|
|
236
|
-
/* Block display variant */
|
|
237
224
|
:host(.icon-block) {
|
|
238
225
|
display: block;
|
|
239
226
|
}
|
|
240
227
|
`;
|
|
241
|
-
//# sourceMappingURL=icon.js.map
|
package/lib/styles/input.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Input Component Styles
|
|
3
|
-
* PORTED FROM: clj/ty/components/input.css
|
|
4
|
-
* Phase A: Regular input styles only (no checkbox, no numeric formatting)
|
|
5
|
-
*/
|
|
1
|
+
/** Input Component Styles */
|
|
6
2
|
/** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
|
|
7
3
|
export declare const inputCustomFlavorCss: (base: string) => string;
|
|
8
4
|
export declare const inputStyles: string;
|
|
9
|
-
//# sourceMappingURL=input.d.ts.map
|
package/lib/styles/input.js
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Input Component Styles
|
|
3
|
-
* PORTED FROM: clj/ty/components/input.css
|
|
4
|
-
* Phase A: Regular input styles only (no checkbox, no numeric formatting)
|
|
5
|
-
*/
|
|
6
1
|
import { FLAVORS } from "../types/common.js";
|
|
7
|
-
/* Flavor rules only set --input-accent (border), --input-accent-bold
|
|
8
|
-
(hover/focus border), and --input-ring (focus shadow); the wrapper base
|
|
9
|
-
rules consume them. They double as the per-instance override API:
|
|
10
|
-
`ty-input { --input-accent: … }`. Neutral is skipped — it IS the default
|
|
11
|
-
chrome (--ty-input-* tokens), and input's auto-danger-on-error logic
|
|
12
|
-
relies on neutral being the unstyled state.
|
|
13
|
-
|
|
14
|
-
Fallback flavor `fb` is used for custom flavors: suffixed tokens fall
|
|
15
|
-
back to the custom base color first (a flavor defining only
|
|
16
|
-
--ty-color-X still gets sensible hover/focus), then to neutral.
|
|
17
|
-
|
|
18
|
-
Emphasis ladder mirrors the neutral chrome (faint rest → soft hover →
|
|
19
|
-
focus + ring): a flavored field rests on its -soft shade and only
|
|
20
|
-
escalates to the full color on hover/focus — a resting field shouldn't
|
|
21
|
-
shout its full-saturation border (tones shift the whole ladder). */
|
|
22
2
|
const inputFlavor = (f, fb) => {
|
|
23
3
|
const c = (s) => fb
|
|
24
4
|
? s
|
|
@@ -45,12 +25,11 @@ const inputFlavor = (f, fb) => {
|
|
|
45
25
|
}
|
|
46
26
|
`;
|
|
47
27
|
};
|
|
48
|
-
/** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
|
|
49
28
|
export const inputCustomFlavorCss = (base) => inputFlavor(base, "neutral");
|
|
50
29
|
export const inputStyles = `
|
|
51
30
|
:host {
|
|
52
31
|
display: block;
|
|
53
|
-
font-family:
|
|
32
|
+
font-family: inherit;
|
|
54
33
|
width: 100%;
|
|
55
34
|
}
|
|
56
35
|
|
|
@@ -69,8 +48,6 @@ export const inputStyles = `
|
|
|
69
48
|
box-sizing: border-box;
|
|
70
49
|
}
|
|
71
50
|
|
|
72
|
-
/* ===== LABEL STYLING ===== */
|
|
73
|
-
|
|
74
51
|
.ty-field-label {
|
|
75
52
|
font-size: var(--ty-font-sm);
|
|
76
53
|
line-height: var(--ty-leading-sm);
|
|
@@ -83,7 +60,6 @@ export const inputStyles = `
|
|
|
83
60
|
align-items: center;
|
|
84
61
|
}
|
|
85
62
|
|
|
86
|
-
/* Required indicator - using SVG icon */
|
|
87
63
|
.required-icon {
|
|
88
64
|
display: inline-flex;
|
|
89
65
|
align-items: center;
|
|
@@ -99,12 +75,10 @@ export const inputStyles = `
|
|
|
99
75
|
height: 100%;
|
|
100
76
|
}
|
|
101
77
|
|
|
102
|
-
/* ===== INPUT WRAPPER WITH SLOTS ===== */
|
|
103
|
-
|
|
104
78
|
.input-wrapper {
|
|
105
79
|
display: flex;
|
|
106
80
|
align-items: center;
|
|
107
|
-
gap: 0.5rem;
|
|
81
|
+
gap: 0.5rem;
|
|
108
82
|
width: 100%;
|
|
109
83
|
box-sizing: border-box;
|
|
110
84
|
border: 1px solid var(--input-accent, var(--input-border, var(--ty-input-border)));
|
|
@@ -112,7 +86,6 @@ export const inputStyles = `
|
|
|
112
86
|
background: var(--input-bg, var(--input-bg, var(--ty-input-bg)));
|
|
113
87
|
transition: var(--ty-local-transition, all 0.15s ease-in-out);
|
|
114
88
|
|
|
115
|
-
/* Default size (md) */
|
|
116
89
|
min-height: var(--ty-size-md);
|
|
117
90
|
padding: 0 12px;
|
|
118
91
|
}
|
|
@@ -141,9 +114,6 @@ export const inputStyles = `
|
|
|
141
114
|
border-color: var(--input-disabled-border, var(--ty-input-disabled-border));
|
|
142
115
|
}
|
|
143
116
|
|
|
144
|
-
/* ===== SLOT STYLING ===== */
|
|
145
|
-
|
|
146
|
-
/* Style slotted content directly (no wrappers needed) */
|
|
147
117
|
::slotted([slot="start"]),
|
|
148
118
|
::slotted([slot="end"]) {
|
|
149
119
|
display: flex;
|
|
@@ -181,15 +151,12 @@ export const inputStyles = `
|
|
|
181
151
|
height: 1rem;
|
|
182
152
|
}
|
|
183
153
|
|
|
184
|
-
/* Icon sizing for slotted icons */
|
|
185
154
|
::slotted(ty-icon) {
|
|
186
155
|
width: 1em;
|
|
187
156
|
height: 1em;
|
|
188
157
|
flex-shrink: 0;
|
|
189
158
|
}
|
|
190
159
|
|
|
191
|
-
/* ===== ERROR MESSAGE STYLING ===== */
|
|
192
|
-
|
|
193
160
|
.error-message {
|
|
194
161
|
font-size: var(--ty-font-xs);
|
|
195
162
|
line-height: var(--ty-leading-xs);
|
|
@@ -199,7 +166,6 @@ export const inputStyles = `
|
|
|
199
166
|
padding-left: 12px;
|
|
200
167
|
}
|
|
201
168
|
|
|
202
|
-
/* Error state for wrapper */
|
|
203
169
|
.input-wrapper.error {
|
|
204
170
|
border-color: var(--ty-color-danger);
|
|
205
171
|
background: var(--ty-bg-danger-soft);
|
|
@@ -210,10 +176,9 @@ export const inputStyles = `
|
|
|
210
176
|
box-shadow: 0 0 0 3px var(--input-shadow-focus, var(--ty-input-shadow-focus));
|
|
211
177
|
}
|
|
212
178
|
|
|
213
|
-
/* ===== INPUT BASE STYLING ===== */
|
|
214
|
-
|
|
215
179
|
input {
|
|
216
|
-
/*
|
|
180
|
+
/* Linear-paired typography */
|
|
181
|
+
font-family: inherit;
|
|
217
182
|
flex: 1;
|
|
218
183
|
min-width: 0;
|
|
219
184
|
box-sizing: border-box;
|
|
@@ -241,21 +206,16 @@ input[type="number"] {
|
|
|
241
206
|
-moz-appearance: textfield;
|
|
242
207
|
}
|
|
243
208
|
|
|
244
|
-
/* Disabled state */
|
|
245
209
|
input:disabled {
|
|
246
210
|
cursor: not-allowed;
|
|
247
211
|
color: var(--input-disabled-color, var(--ty-input-disabled-color));
|
|
248
212
|
}
|
|
249
213
|
|
|
250
|
-
/* Placeholder styling */
|
|
251
214
|
input::placeholder {
|
|
252
215
|
color: var(--input-placeholder, var(--ty-input-placeholder));
|
|
253
216
|
font-weight: 400;
|
|
254
217
|
}
|
|
255
218
|
|
|
256
|
-
/* ===== SIZE MODIFIERS ===== */
|
|
257
|
-
|
|
258
|
-
/* Small */
|
|
259
219
|
.input-wrapper.sm {
|
|
260
220
|
min-height: var(--ty-size-sm);
|
|
261
221
|
padding: 0 10px;
|
|
@@ -268,7 +228,6 @@ input::placeholder {
|
|
|
268
228
|
letter-spacing: var(--ty-tracking-sm);
|
|
269
229
|
}
|
|
270
230
|
|
|
271
|
-
/* Medium (default) */
|
|
272
231
|
.input-wrapper.md {
|
|
273
232
|
min-height: var(--ty-size-md);
|
|
274
233
|
padding: 0 12px;
|
|
@@ -281,7 +240,6 @@ input::placeholder {
|
|
|
281
240
|
letter-spacing: var(--ty-tracking-sm);
|
|
282
241
|
}
|
|
283
242
|
|
|
284
|
-
/* Large */
|
|
285
243
|
.input-wrapper.lg {
|
|
286
244
|
min-height: var(--ty-size-lg);
|
|
287
245
|
padding: 0 14px;
|
|
@@ -294,31 +252,25 @@ input::placeholder {
|
|
|
294
252
|
letter-spacing: var(--ty-tracking-base);
|
|
295
253
|
}
|
|
296
254
|
|
|
297
|
-
/*
|
|
255
|
+
/* Semantic flavor modifiers set --input-accent*, consumed above */
|
|
298
256
|
${FLAVORS.filter((f) => f !== "neutral").map((f) => inputFlavor(f)).join("")}
|
|
299
257
|
|
|
300
|
-
/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
|
|
301
|
-
|
|
302
258
|
input:focus-visible {
|
|
303
259
|
outline: none;
|
|
304
260
|
}
|
|
305
261
|
|
|
306
|
-
/* High contrast mode support */
|
|
307
262
|
@media (prefers-contrast: high) {
|
|
308
263
|
.input-wrapper {
|
|
309
264
|
border-width: 2px;
|
|
310
265
|
}
|
|
311
266
|
}
|
|
312
267
|
|
|
313
|
-
/* Reduced motion support */
|
|
314
268
|
@media (prefers-reduced-motion: reduce) {
|
|
315
269
|
.input-wrapper {
|
|
316
270
|
transition: none;
|
|
317
271
|
}
|
|
318
272
|
}
|
|
319
273
|
|
|
320
|
-
/* ===== RESPONSIVE BEHAVIOR ===== */
|
|
321
|
-
|
|
322
274
|
@media (max-width: 640px) {
|
|
323
275
|
.input-wrapper.lg {
|
|
324
276
|
min-height: 40px;
|
|
@@ -356,4 +308,3 @@ input:focus-visible {
|
|
|
356
308
|
}
|
|
357
309
|
}
|
|
358
310
|
`;
|
|
359
|
-
//# sourceMappingURL=input.js.map
|
package/lib/styles/modal.d.ts
CHANGED
|
@@ -4,5 +4,4 @@
|
|
|
4
4
|
* CSS for the modal component wrapper.
|
|
5
5
|
* The modal is a pure wrapper - all content styling is user-defined.
|
|
6
6
|
*/
|
|
7
|
-
export declare const modalStyles = "\n
|
|
8
|
-
//# sourceMappingURL=modal.d.ts.map
|
|
7
|
+
export declare const modalStyles = "\n:host {\n display: contents;\n /* Don't interfere with layout */\n}\n\n/* Part of the modal wrapper functionality, not user content styling */\n.close-button {\n position: absolute;\n top: -8px;\n right: -8px;\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 4px;\n border-radius: 4px;\n transition: var(--ty-transition-colors);\n z-index: 1;\n color: #d8d8d8;\n\n /* Remove all default browser styling that could cause outlines/borders */\n outline: none;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n\n /* Remove mobile tap highlights and focus rings */\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.close-button:hover {\n color: white;\n}\n\n/* Explicitly remove focus and active states for all interaction modes */\n.close-button:focus,\n.close-button:focus-visible,\n.close-button:focus-within,\n.close-button:active {\n outline: none !important;\n box-shadow: none !important;\n border: none !important;\n background: transparent !important;\n}\n\n/* Override hover color even in focus/active states */\n.close-button:hover,\n.close-button:focus:hover,\n.close-button:active:hover {\n color: white;\n}\n\n.close-button.hide {\n visibility: hidden;\n}\n\n/* Pure wrapper: only essential modal functionality, no styling of user content */\n.ty-modal-dialog {\n /* Reset default dialog styles */\n padding: 18px;\n border: none;\n margin: 0;\n background: transparent;\n\n /* Centered */\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n z-index: 1000;\n overflow: hidden;\n\n /* No sizing - let user content determine size */\n max-width: 85vw;\n max-height: 90vh;\n\n outline: none;\n}\n\n/* Panel zoom-in synced with the backdrop fade (shadcn-style zoom-in-95).\n Enter-only: animating exit on a native <dialog> means delaying close(). */\n.ty-modal-dialog[open] {\n animation: ty-modal-enter var(--ty-modal-duration, 200ms) ease-out;\n}\n\n@keyframes ty-modal-enter {\n from {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.93);\n }\n\n to {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n\n/* Backdrop is part of modal functionality, not user content */\n.ty-modal-dialog::backdrop {\n background: var(--ty-modal-backdrop, rgba(0, 0, 0, 0.5));\n backdrop-filter: var(--ty-modal-backdrop-blur, blur(2px));\n animation: ty-modal-backdrop-enter var(--ty-modal-duration, 200ms) ease-out;\n}\n\n/* When backdrop is disabled */\n.ty-modal-dialog:not([data-backdrop])::backdrop {\n background: transparent;\n backdrop-filter: none;\n}\n\n/* Minimal container - no styling imposed on user content */\n.modal-content {\n color: var(--ty-text);\n}\n\n@keyframes ty-modal-backdrop-enter {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n";
|