tyrell-components 1.0.0-RC13 → 1.0.0-RC15
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 +10 -2
- package/css/tyrell-theme.css +192 -180
- package/css/tyrell.css +23 -0
- package/dist/tyrell-colors-static.css +1 -316
- package/dist/tyrell-theme.css +1 -1454
- package/dist/tyrell.css +1 -1371
- package/dist/tyrell.js +1 -1
- package/lib/base/ty-component.d.ts +20 -10
- package/lib/base/ty-component.js +196 -319
- package/lib/components/button.d.ts +3 -17
- package/lib/components/button.js +261 -295
- package/lib/components/calendar-month.d.ts +4 -50
- package/lib/components/calendar-month.js +443 -582
- package/lib/components/calendar-navigation.d.ts +3 -48
- package/lib/components/calendar-navigation.js +239 -362
- package/lib/components/calendar.d.ts +8 -83
- package/lib/components/calendar.js +616 -829
- package/lib/components/checkbox.d.ts +5 -72
- package/lib/components/checkbox.js +273 -416
- package/lib/components/copy.d.ts +4 -57
- package/lib/components/copy.js +280 -397
- package/lib/components/date-picker.d.ts +21 -163
- package/lib/components/date-picker.js +1143 -1674
- package/lib/components/file-upload.d.ts +9 -15
- package/lib/components/file-upload.js +404 -426
- package/lib/components/icon.d.ts +3 -24
- package/lib/components/icon.js +141 -230
- package/lib/components/input.d.ts +8 -108
- package/lib/components/input.js +593 -784
- package/lib/components/modal.d.ts +17 -26
- package/lib/components/modal.js +340 -484
- package/lib/components/option.d.ts +2 -9
- package/lib/components/option.js +168 -216
- package/lib/components/popup.d.ts +2 -17
- package/lib/components/popup.js +249 -380
- package/lib/components/radio.d.ts +5 -25
- package/lib/components/radio.js +407 -461
- package/lib/components/resize-observer.d.ts +3 -30
- package/lib/components/resize-observer.js +69 -103
- package/lib/components/scroll-container.d.ts +2 -12
- package/lib/components/scroll-container.js +293 -338
- package/lib/components/select.d.ts +87 -159
- package/lib/components/select.js +1609 -2090
- package/lib/components/selected-tags.d.ts +5 -48
- package/lib/components/selected-tags.js +188 -276
- package/lib/components/step.d.ts +1 -6
- package/lib/components/step.js +62 -68
- package/lib/components/switch.d.ts +1 -12
- package/lib/components/switch.js +214 -247
- package/lib/components/tab.d.ts +1 -6
- package/lib/components/tab.js +62 -69
- package/lib/components/tabs.d.ts +6 -63
- package/lib/components/tabs.js +545 -777
- package/lib/components/tag.d.ts +3 -37
- package/lib/components/tag.js +236 -335
- package/lib/components/textarea.d.ts +7 -87
- package/lib/components/textarea.js +457 -627
- package/lib/components/tooltip.d.ts +3 -11
- package/lib/components/tooltip.js +307 -443
- package/lib/components/wizard.d.ts +6 -54
- package/lib/components/wizard.js +405 -618
- 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 +392 -400
- package/lib/icons/heroicons/mini.d.ts +0 -1
- package/lib/icons/heroicons/mini.js +382 -390
- package/lib/icons/heroicons/outline.d.ts +0 -1
- package/lib/icons/heroicons/outline.js +337 -345
- package/lib/icons/heroicons/solid.d.ts +0 -1
- package/lib/icons/heroicons/solid.js +407 -415
- package/lib/icons/lucide.d.ts +0 -1
- package/lib/icons/lucide.js +24479 -26351
- package/lib/icons/material/filled.d.ts +0 -1
- package/lib/icons/material/filled.js +9653 -9663
- package/lib/icons/material/outlined.d.ts +0 -1
- package/lib/icons/material/outlined.js +10271 -10281
- package/lib/icons/material/round.d.ts +0 -1
- package/lib/icons/material/round.js +10495 -10505
- package/lib/icons/material/sharp.d.ts +0 -1
- package/lib/icons/material/sharp.js +9905 -9915
- package/lib/icons/material/two-tone.d.ts +0 -1
- package/lib/icons/material/two-tone.js +12792 -12802
- package/lib/index.d.ts +0 -1
- package/lib/index.js +21 -41
- package/lib/styles/button.d.ts +2 -20
- package/lib/styles/button.js +202 -404
- package/lib/styles/calendar-month.d.ts +1 -5
- package/lib/styles/calendar-month.js +127 -244
- package/lib/styles/calendar-navigation.d.ts +2 -6
- package/lib/styles/calendar-navigation.js +64 -104
- package/lib/styles/calendar.d.ts +1 -2
- package/lib/styles/calendar.js +9 -22
- package/lib/styles/checkbox.d.ts +0 -1
- package/lib/styles/checkbox.js +45 -94
- package/lib/styles/copy.d.ts +0 -1
- package/lib/styles/copy.js +67 -106
- package/lib/styles/custom-scrollbar.d.ts +1 -2
- package/lib/styles/custom-scrollbar.js +80 -115
- package/lib/styles/date-picker.d.ts +1 -5
- package/lib/styles/date-picker.js +261 -335
- package/lib/styles/field-size.d.ts +6 -0
- package/lib/styles/field-size.js +91 -0
- package/lib/styles/file-upload.d.ts +1 -2
- package/lib/styles/file-upload.js +143 -188
- package/lib/styles/icon.d.ts +2 -6
- package/lib/styles/icon.js +92 -170
- package/lib/styles/input.d.ts +1 -6
- package/lib/styles/input.js +125 -290
- package/lib/styles/modal.d.ts +1 -2
- package/lib/styles/modal.js +71 -108
- package/lib/styles/option.d.ts +2 -6
- package/lib/styles/option.js +49 -64
- package/lib/styles/popup.d.ts +1 -2
- package/lib/styles/popup.js +42 -77
- package/lib/styles/radio.d.ts +0 -1
- package/lib/styles/radio.js +69 -110
- package/lib/styles/resize-observer.d.ts +1 -2
- package/lib/styles/resize-observer.js +2 -12
- package/lib/styles/scroll-container.d.ts +1 -2
- package/lib/styles/scroll-container.js +100 -149
- package/lib/styles/select-base.d.ts +0 -1
- package/lib/styles/select-base.js +597 -785
- package/lib/styles/select.d.ts +1 -2
- package/lib/styles/select.js +140 -236
- package/lib/styles/step.d.ts +1 -2
- package/lib/styles/step.js +22 -33
- package/lib/styles/switch.d.ts +0 -1
- package/lib/styles/switch.js +34 -73
- package/lib/styles/tab.d.ts +1 -2
- package/lib/styles/tab.js +22 -34
- package/lib/styles/tabs.d.ts +3 -11
- package/lib/styles/tabs.js +190 -222
- package/lib/styles/tag.d.ts +1 -5
- package/lib/styles/tag.js +136 -218
- package/lib/styles/textarea.d.ts +1 -2
- package/lib/styles/textarea.js +210 -319
- package/lib/styles/tooltip.d.ts +0 -1
- package/lib/styles/tooltip.js +3 -13
- package/lib/styles/wizard.d.ts +5 -21
- package/lib/styles/wizard.js +170 -306
- package/lib/types/common.d.ts +2 -2
- package/lib/types/common.js +6 -17
- package/lib/utils/calendar-utils.d.ts +4 -21
- package/lib/utils/calendar-utils.js +100 -273
- package/lib/utils/custom-scrollbar.d.ts +6 -20
- package/lib/utils/custom-scrollbar.js +273 -317
- package/lib/utils/flavor-sheet.d.ts +0 -1
- package/lib/utils/flavor-sheet.js +14 -37
- package/lib/utils/icon-registry.d.ts +0 -2
- package/lib/utils/icon-registry.js +137 -243
- 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 +3 -35
- package/lib/utils/locale.d.ts +2 -23
- package/lib/utils/locale.js +34 -120
- package/lib/utils/mobile.d.ts +0 -1
- package/lib/utils/mobile.js +1 -18
- package/lib/utils/number-format.d.ts +6 -3
- package/lib/utils/number-format.js +54 -110
- package/lib/utils/positioning.d.ts +50 -7
- package/lib/utils/positioning.js +224 -234
- package/lib/utils/property-capture.d.ts +5 -27
- package/lib/utils/property-capture.js +36 -144
- package/lib/utils/property-manager.d.ts +0 -1
- package/lib/utils/property-manager.js +126 -196
- package/lib/utils/resize-observer.d.ts +0 -1
- package/lib/utils/resize-observer.js +23 -59
- package/lib/utils/scroll-lock.d.ts +4 -11
- package/lib/utils/scroll-lock.js +65 -172
- package/lib/utils/styles.d.ts +0 -1
- package/lib/utils/styles.js +17 -41
- package/lib/version.d.ts +1 -2
- package/lib/version.js +1 -11
- package/package.json +4 -4
- 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
package/lib/styles/calendar.d.ts
CHANGED
|
@@ -2,5 +2,4 @@
|
|
|
2
2
|
* Calendar Orchestration Styles
|
|
3
3
|
* Simple container for navigation + month display
|
|
4
4
|
*/
|
|
5
|
-
export declare const calendarStyles = "\n
|
|
6
|
-
//# sourceMappingURL=calendar.d.ts.map
|
|
5
|
+
export declare const calendarStyles = "\n.calendar-container {\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n box-sizing: border-box;\n font-family: inherit;\n /* Nav is a fixed width and the grid is fit-content, so in any host wider\n than them (a popup, a stretched cell) the default stretch alignment\n left-pinned both. Centring keeps the block centred in whatever space it\n gets \u2014 without widening the calendar itself to fill it. */\n align-items: center;\n}\n\n@media (max-width: 320px) {\n .calendar-container {\n gap: 0.375rem;\n }\n}\n";
|
package/lib/styles/calendar.js
CHANGED
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Calendar Orchestration Styles
|
|
3
|
-
* Simple container for navigation + month display
|
|
4
|
-
*/
|
|
5
1
|
export const calendarStyles = `
|
|
6
|
-
/* ============================================================================
|
|
7
|
-
Calendar Container
|
|
8
|
-
============================================================================ */
|
|
9
|
-
|
|
10
2
|
.calendar-container {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 0.125rem;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
font-family: inherit;
|
|
8
|
+
align-items: center;
|
|
16
9
|
}
|
|
17
|
-
|
|
18
|
-
/* ============================================================================
|
|
19
|
-
Responsive Adjustments
|
|
20
|
-
============================================================================ */
|
|
21
|
-
|
|
22
10
|
@media (max-width: 320px) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
.calendar-container {
|
|
12
|
+
gap: 0.375rem;
|
|
13
|
+
}
|
|
26
14
|
}
|
|
27
15
|
`;
|
|
28
|
-
//# sourceMappingURL=calendar.js.map
|
package/lib/styles/checkbox.d.ts
CHANGED
package/lib/styles/checkbox.js
CHANGED
|
@@ -1,136 +1,87 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checkbox Component Styles — self-contained (no inputStyles import).
|
|
3
|
-
*
|
|
4
|
-
* The checkbox is "just the tick": a single checkmark whose color/opacity
|
|
5
|
-
* carries the state. Full flavor color when checked, faint when unchecked,
|
|
6
|
-
* dash at mid-opacity when indeterminate, grayscale when disabled.
|
|
7
|
-
*/
|
|
8
1
|
import { FLAVORS } from "../types/common.js";
|
|
9
|
-
/* Flavor rules only set --checkbox-color (checked) / --checkbox-color-off
|
|
10
|
-
(unchecked) / --checkbox-ring (focus ring); the base rules below consume
|
|
11
|
-
them. Doubles as the per-instance override API: `ty-checkbox {
|
|
12
|
-
--checkbox-color: … }`. --checkbox-ring pre-resolves the color-mix() here
|
|
13
|
-
(rather than inlining a nested var(...,fallback) as a color-mix argument
|
|
14
|
-
directly in the box-shadow rule) — that nested form fails at
|
|
15
|
-
computed-value time in some engines. Fallback flavor `fb` is used for
|
|
16
|
-
custom flavors so missing tokens degrade to neutral. */
|
|
17
2
|
const checkboxFlavor = (f, fb) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
const tok = (s) => fb
|
|
4
|
+
? `var(--ty-color-${f}${s}, var(--ty-color-${fb}${s}))`
|
|
5
|
+
: `var(--ty-color-${f}${s})`;
|
|
6
|
+
return `
|
|
22
7
|
:host([flavor="${f}"]) { --checkbox-color: ${tok("")}; --checkbox-color-off: ${tok("-soft")}; --checkbox-ring: color-mix(in oklab, ${tok("")} 25%, transparent); }
|
|
23
8
|
:host([flavor="${f}+"]) { --checkbox-color: ${tok("-strong")}; --checkbox-color-off: ${tok("-soft")}; --checkbox-ring: color-mix(in oklab, ${tok("-strong")} 25%, transparent); }
|
|
24
9
|
:host([flavor="${f}-"]) { --checkbox-color: ${tok("-soft")}; --checkbox-color-off: ${tok("-faint")}; --checkbox-ring: color-mix(in oklab, ${tok("-soft")} 25%, transparent); }
|
|
25
10
|
`;
|
|
26
11
|
};
|
|
27
|
-
/** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
|
|
28
12
|
export const checkboxCustomFlavorCss = (base) => checkboxFlavor(base, "neutral");
|
|
29
13
|
export const checkboxStyles = `
|
|
30
14
|
:host {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
width: auto;
|
|
17
|
+
vertical-align: middle;
|
|
34
18
|
}
|
|
35
|
-
|
|
36
19
|
.checkbox-container {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
color: var(--checkbox-color-off, var(--ty-color-neutral-soft));
|
|
48
|
-
}
|
|
49
|
-
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
outline: none;
|
|
23
|
+
transition: var(--ty-local-transition, all 0.15s ease-in-out);
|
|
24
|
+
user-select: none;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
border-radius: 6px;
|
|
27
|
+
gap: var(--ty-spacing-1);
|
|
28
|
+
color: var(--checkbox-color-off, var(--ty-color-neutral-soft));
|
|
29
|
+
}
|
|
50
30
|
.checkbox-container[aria-checked="true"] {
|
|
51
|
-
|
|
31
|
+
color: var(--checkbox-color, var(--ty-color-neutral));
|
|
52
32
|
}
|
|
53
|
-
|
|
54
|
-
/* Visible focus ring (keyboard) — .focused is toggled by the component.
|
|
55
|
-
Matches the checked-state color so a danger checkbox gets a red ring,
|
|
56
|
-
not a fixed primary one. */
|
|
57
33
|
.checkbox-container.focused,
|
|
58
34
|
.checkbox-container:focus-visible {
|
|
59
|
-
|
|
35
|
+
box-shadow: 0 0 0 3px var(--checkbox-ring, color-mix(in oklab, var(--ty-color-primary) 25%, transparent));
|
|
60
36
|
}
|
|
61
|
-
|
|
62
37
|
.checkbox-icon {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* ===== SIZES ===== */
|
|
73
|
-
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
color: inherit;
|
|
42
|
+
transition: var(--ty-local-transition, color 0.15s ease-in-out);
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
74
45
|
.checkbox-container svg {
|
|
75
|
-
|
|
76
|
-
|
|
46
|
+
width: 16px;
|
|
47
|
+
height: 16px;
|
|
77
48
|
}
|
|
78
|
-
|
|
79
49
|
.checkbox-container.xs svg {
|
|
80
|
-
|
|
81
|
-
|
|
50
|
+
width: 12px;
|
|
51
|
+
height: 12px;
|
|
82
52
|
}
|
|
83
|
-
|
|
84
53
|
.checkbox-container.sm svg {
|
|
85
|
-
|
|
86
|
-
|
|
54
|
+
width: 14px;
|
|
55
|
+
height: 14px;
|
|
87
56
|
}
|
|
88
|
-
|
|
89
57
|
.checkbox-container.lg svg {
|
|
90
|
-
|
|
91
|
-
|
|
58
|
+
width: 20px;
|
|
59
|
+
height: 20px;
|
|
92
60
|
}
|
|
93
|
-
|
|
94
61
|
.checkbox-container.xl svg {
|
|
95
|
-
|
|
96
|
-
|
|
62
|
+
width: 24px;
|
|
63
|
+
height: 24px;
|
|
97
64
|
}
|
|
98
|
-
|
|
99
|
-
/* ===== SEMANTIC FLAVORS (set --checkbox-color[-off], consumed above) ===== */
|
|
100
65
|
${FLAVORS.map((f) => checkboxFlavor(f)).join("")}
|
|
101
|
-
|
|
102
|
-
/* ===== STATES ===== */
|
|
103
|
-
|
|
104
|
-
/* Clean tick: no box outline, just the checkmark. Inactive = faint tick. */
|
|
105
66
|
.checkbox-container:not([aria-checked="true"]) {
|
|
106
|
-
|
|
67
|
+
opacity: 0.35;
|
|
107
68
|
}
|
|
108
|
-
|
|
109
|
-
/* Indeterminate (dash) sits between unchecked and checked */
|
|
110
69
|
.checkbox-container[aria-checked="mixed"] {
|
|
111
|
-
|
|
70
|
+
opacity: 0.7;
|
|
112
71
|
}
|
|
113
|
-
|
|
114
|
-
/* Disabled must stay distinguishable from merely-unchecked: grayscale kills
|
|
115
|
-
the flavor color, and disabled-unchecked drops below the unchecked 0.35. */
|
|
116
72
|
.checkbox-container.disabled {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
cursor: not-allowed;
|
|
75
|
+
opacity: 0.5;
|
|
76
|
+
filter: grayscale(1);
|
|
121
77
|
}
|
|
122
|
-
|
|
123
78
|
.checkbox-container.disabled:not([aria-checked="true"]) {
|
|
124
|
-
|
|
79
|
+
opacity: 0.2;
|
|
125
80
|
}
|
|
126
|
-
|
|
127
|
-
/* Error state */
|
|
128
81
|
.checkbox-container.error .checkbox-icon {
|
|
129
|
-
|
|
82
|
+
color: var(--ty-color-danger);
|
|
130
83
|
}
|
|
131
|
-
|
|
132
84
|
.checkbox-container.error:focus {
|
|
133
|
-
|
|
85
|
+
box-shadow: 0 0 0 3px color-mix(in oklab, var(--ty-color-danger) 15%, transparent);
|
|
134
86
|
}
|
|
135
87
|
`;
|
|
136
|
-
//# sourceMappingURL=checkbox.js.map
|
package/lib/styles/copy.d.ts
CHANGED
package/lib/styles/copy.js
CHANGED
|
@@ -1,149 +1,110 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copy Component Styles
|
|
3
|
-
* Read-only field with copy-to-clipboard functionality
|
|
4
|
-
* Extends input styles with copy-specific styling
|
|
5
|
-
*/
|
|
6
1
|
import { FLAVORS } from "../types/common.js";
|
|
7
|
-
/* Flavor rules only set --copy-color (button), --copy-color-hover, and
|
|
8
|
-
--copy-bg-hover (wrapper hover); the base rules below consume them.
|
|
9
|
-
Doubles as the per-instance override API. Fallback flavor `fb` is used
|
|
10
|
-
for custom flavors so missing tokens degrade to neutral. */
|
|
11
2
|
const copyFlavor = (f, fb) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
const c = (s) => fb
|
|
4
|
+
? `var(--ty-color-${f}${s}, var(--ty-color-${fb}${s}))`
|
|
5
|
+
: `var(--ty-color-${f}${s})`;
|
|
6
|
+
const bg = (s) => fb
|
|
7
|
+
? `var(--ty-bg-${f}${s}, var(--ty-bg-${fb}${s}))`
|
|
8
|
+
: `var(--ty-bg-${f}${s})`;
|
|
9
|
+
return `
|
|
19
10
|
:host([flavor="${f}"]) { --copy-color: ${c("")}; --copy-color-hover: ${c("-strong")}; --copy-bg-hover: ${bg("-soft")}; }
|
|
20
11
|
:host([flavor="${f}+"]) { --copy-color: ${c("-strong")}; --copy-color-hover: ${c("-strong")}; --copy-bg-hover: ${bg("-soft")}; }
|
|
21
12
|
:host([flavor="${f}-"]) { --copy-color: ${c("-soft")}; --copy-color-hover: ${c("")}; --copy-bg-hover: ${bg("-soft")}; }
|
|
22
13
|
`;
|
|
23
14
|
};
|
|
24
|
-
/** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
|
|
25
15
|
export const copyCustomFlavorCss = (base) => copyFlavor(base, "neutral");
|
|
26
16
|
export const copyStyles = `
|
|
27
|
-
/* Copy field value display */
|
|
28
17
|
.copy-field-value {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/* Multiline variant */
|
|
18
|
+
flex: 1;
|
|
19
|
+
font-size: var(--ty-field-font);
|
|
20
|
+
line-height: var(--ty-field-leading);
|
|
21
|
+
letter-spacing: var(--ty-field-tracking);
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
text-overflow: ellipsis;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
user-select: none;
|
|
26
|
+
padding: 0;
|
|
27
|
+
margin: 0;
|
|
28
|
+
background: transparent;
|
|
29
|
+
border: none;
|
|
30
|
+
color: inherit;
|
|
31
|
+
font-family: inherit;
|
|
32
|
+
}
|
|
45
33
|
.copy-field-value.multiline {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
white-space: pre-wrap;
|
|
35
|
+
word-break: break-word;
|
|
36
|
+
max-height: 200px;
|
|
37
|
+
overflow-y: auto;
|
|
50
38
|
}
|
|
51
|
-
|
|
52
|
-
/* Keep the copy button pinned to the top-right when content wraps to multiple lines */
|
|
53
39
|
.input-wrapper:has(.copy-field-value.multiline) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
40
|
+
align-items: flex-start;
|
|
41
|
+
padding-top: 8px;
|
|
42
|
+
padding-bottom: 8px;
|
|
57
43
|
}
|
|
58
|
-
|
|
59
|
-
/* Horizontal scroll variant - scroll long content instead of clipping with ellipsis */
|
|
60
44
|
.copy-field-value.horizontal-scroll {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
45
|
+
overflow-x: auto;
|
|
46
|
+
overflow-y: hidden;
|
|
47
|
+
text-overflow: clip;
|
|
48
|
+
white-space: nowrap;
|
|
65
49
|
}
|
|
66
|
-
|
|
67
|
-
/* Multiline + horizontal scroll (e.g. code blocks): preserve lines, scroll both axes */
|
|
68
50
|
.copy-field-value.multiline.horizontal-scroll {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
51
|
+
white-space: pre;
|
|
52
|
+
word-break: normal;
|
|
53
|
+
overflow-y: auto;
|
|
72
54
|
}
|
|
73
|
-
|
|
74
|
-
/* Hide scrollbars on scrollable value - content still scrolls, chrome stays clean */
|
|
75
55
|
.copy-field-value.multiline,
|
|
76
56
|
.copy-field-value.horizontal-scroll {
|
|
77
|
-
|
|
57
|
+
scrollbar-width: none;
|
|
78
58
|
}
|
|
79
59
|
.copy-field-value.multiline::-webkit-scrollbar,
|
|
80
60
|
.copy-field-value.horizontal-scroll::-webkit-scrollbar {
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* Code format */
|
|
85
|
-
.copy-field-value {
|
|
86
|
-
font-size: 0.8em;
|
|
61
|
+
display: none;
|
|
87
62
|
}
|
|
88
|
-
|
|
89
|
-
/* Hover state — flavor-soft background (primary by default) */
|
|
90
63
|
.input-wrapper:not(.disabled):hover {
|
|
91
|
-
|
|
92
|
-
|
|
64
|
+
background: var(--copy-bg-hover, var(--ty-bg-primary-soft));
|
|
65
|
+
transition: var(--ty-local-transition, background 0.2s ease);
|
|
93
66
|
}
|
|
94
|
-
|
|
95
|
-
/* Copy button */
|
|
96
67
|
.copy-button {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
width: var(--ty-field-control);
|
|
73
|
+
height: var(--ty-field-control);
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
border: none;
|
|
76
|
+
background: transparent;
|
|
77
|
+
color: var(--copy-color, var(--ty-text-soft));
|
|
78
|
+
transition: var(--ty-local-transition, color 0.2s ease, transform 0.2s ease);
|
|
79
|
+
padding: 0;
|
|
80
|
+
margin: 0;
|
|
81
|
+
}
|
|
112
82
|
.copy-button:hover:not(.disabled) {
|
|
113
|
-
|
|
114
|
-
|
|
83
|
+
color: var(--copy-color-hover, var(--ty-text));
|
|
84
|
+
transform: scale(1.1);
|
|
115
85
|
}
|
|
116
|
-
|
|
117
86
|
.copy-button.success {
|
|
118
|
-
|
|
119
|
-
|
|
87
|
+
color: var(--ty-color-success);
|
|
88
|
+
animation: copy-feedback 0.3s ease;
|
|
120
89
|
}
|
|
121
|
-
|
|
122
90
|
.copy-button.error {
|
|
123
|
-
|
|
124
|
-
|
|
91
|
+
color: var(--ty-color-danger);
|
|
92
|
+
animation: copy-feedback 0.3s ease;
|
|
125
93
|
}
|
|
126
|
-
|
|
127
94
|
@keyframes copy-feedback {
|
|
128
|
-
|
|
129
|
-
|
|
95
|
+
0%, 100% { transform: scale(1); }
|
|
96
|
+
50% { transform: scale(1.2); }
|
|
130
97
|
}
|
|
131
|
-
|
|
132
98
|
.copy-button svg {
|
|
133
|
-
|
|
134
|
-
|
|
99
|
+
width: var(--ty-field-icon);
|
|
100
|
+
height: var(--ty-field-icon);
|
|
135
101
|
}
|
|
136
|
-
|
|
137
102
|
.input-wrapper.disabled .copy-button {
|
|
138
|
-
|
|
139
|
-
|
|
103
|
+
cursor: not-allowed;
|
|
104
|
+
opacity: 0.5;
|
|
140
105
|
}
|
|
141
|
-
|
|
142
106
|
.input-wrapper.disabled {
|
|
143
|
-
|
|
107
|
+
cursor: not-allowed;
|
|
144
108
|
}
|
|
145
|
-
|
|
146
|
-
/* ===== SEMANTIC FLAVORS (set --copy-*, consumed above) ===== */
|
|
147
109
|
${FLAVORS.map((f) => copyFlavor(f)).join("")}
|
|
148
110
|
`;
|
|
149
|
-
//# sourceMappingURL=copy.js.map
|
|
@@ -2,5 +2,4 @@
|
|
|
2
2
|
* Shared CSS for CustomScrollbar utility
|
|
3
3
|
* Include this in any component that uses CustomScrollbar
|
|
4
4
|
*/
|
|
5
|
-
export declare const customScrollbarStyles = "\n/*
|
|
6
|
-
//# sourceMappingURL=custom-scrollbar.d.ts.map
|
|
5
|
+
export declare const customScrollbarStyles = "\n/* Vertical track */\n.ty-scrollbar-track-y {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: var(--ty-scrollbar-width, 8px);\n z-index: 3;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.25s ease-out;\n cursor: pointer;\n}\n\n.ty-scrollbar-track-y.has-overflow {\n pointer-events: auto;\n}\n\n.ty-scrollbar-track-y.has-overflow:hover,\n.ty-scrollbar-track-y.has-overflow.scrolling,\n.ty-scrollbar-track-y.dragging {\n opacity: 1;\n}\n\n.ty-scrollbar-track-y::before {\n content: '';\n position: absolute;\n inset: 0;\n background: var(--ty-scrollbar-track, transparent);\n border-radius: var(--ty-scrollbar-radius, 4px);\n opacity: 0;\n transition: opacity 0.15s ease-out;\n}\n\n.ty-scrollbar-track-y:hover::before,\n.ty-scrollbar-track-y.dragging::before {\n opacity: 1;\n background: var(--ty-scrollbar-track-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 8%, transparent));\n}\n\n.ty-scrollbar-thumb-y {\n position: absolute;\n right: 0;\n width: 100%;\n min-height: var(--ty-scrollbar-thumb-min-height, 30px);\n background: var(--ty-scrollbar-thumb, color-mix(in oklab, var(--ty-color-neutral-bold) 40%, transparent));\n border-radius: var(--ty-scrollbar-radius, 4px);\n transition: var(--ty-local-transition, background 0.15s ease-out);\n box-sizing: border-box;\n border: 1px solid transparent;\n}\n\n.ty-scrollbar-thumb-y:hover,\n.ty-scrollbar-track-y.dragging .ty-scrollbar-thumb-y {\n background: var(--ty-scrollbar-thumb-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 55%, transparent));\n}\n\n.ty-scrollbar-thumb-y:active,\n.ty-scrollbar-track-y.dragging .ty-scrollbar-thumb-y {\n background: var(--ty-scrollbar-thumb-active, color-mix(in oklab, var(--ty-color-neutral-bold) 70%, transparent));\n}\n\n/* Horizontal track */\n.ty-scrollbar-track-x {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: var(--ty-scrollbar-width, 8px);\n z-index: 3;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.25s ease-out;\n cursor: pointer;\n}\n\n.ty-scrollbar-track-x.has-overflow {\n pointer-events: auto;\n}\n\n.ty-scrollbar-track-x.has-overflow:hover,\n.ty-scrollbar-track-x.has-overflow.scrolling,\n.ty-scrollbar-track-x.dragging {\n opacity: 1;\n}\n\n.ty-scrollbar-track-x::before {\n content: '';\n position: absolute;\n inset: 0;\n background: var(--ty-scrollbar-track, transparent);\n border-radius: var(--ty-scrollbar-radius, 4px);\n opacity: 0;\n transition: opacity 0.15s ease-out;\n}\n\n.ty-scrollbar-track-x:hover::before,\n.ty-scrollbar-track-x.dragging::before {\n opacity: 1;\n background: var(--ty-scrollbar-track-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 8%, transparent));\n}\n\n.ty-scrollbar-thumb-x {\n position: absolute;\n bottom: 0;\n height: 100%;\n min-width: var(--ty-scrollbar-thumb-min-height, 30px);\n background: var(--ty-scrollbar-thumb, color-mix(in oklab, var(--ty-color-neutral-bold) 40%, transparent));\n border-radius: var(--ty-scrollbar-radius, 4px);\n transition: var(--ty-local-transition, background 0.15s ease-out);\n box-sizing: border-box;\n border: 1px solid transparent;\n}\n\n.ty-scrollbar-thumb-x:hover,\n.ty-scrollbar-track-x.dragging .ty-scrollbar-thumb-x {\n background: var(--ty-scrollbar-thumb-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 55%, transparent));\n}\n\n.ty-scrollbar-thumb-x:active,\n.ty-scrollbar-track-x.dragging .ty-scrollbar-thumb-x {\n background: var(--ty-scrollbar-thumb-active, color-mix(in oklab, var(--ty-color-neutral-bold) 70%, transparent));\n}\n\n/* Touch devices: hide the custom scrollbar */\n@media (pointer: coarse) and (hover: none) {\n .ty-scrollbar-track-y,\n .ty-scrollbar-track-x {\n display: none !important;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ty-scrollbar-track-y,\n .ty-scrollbar-track-x,\n .ty-scrollbar-thumb-y,\n .ty-scrollbar-thumb-x {\n transition-duration: 0ms !important;\n }\n}\n";
|