tyrell-components 1.0.0-TC8 → 1.0.0-rc.21
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/AGENTS.md +122 -0
- package/CHANGELOG.md +1531 -0
- package/README.md +71 -53
- package/css/tyrell-colors-static.css +1 -0
- package/css/tyrell-theme.css +1 -0
- package/css/tyrell.css +1 -1783
- package/dist/tyrell-colors-static.css +1 -0
- package/dist/tyrell-theme.css +1 -0
- package/dist/tyrell.css +1 -1783
- package/dist/tyrell.js +1 -1
- package/guides/AGENT_INSTRUCTIONS.md +124 -0
- package/guides/AI_GUIDE.md +53 -0
- package/guides/CSS_GUIDE.md +1016 -0
- package/guides/DATASTAR_TY_GUIDE.md +657 -0
- package/guides/ICONS_GUIDE.md +212 -0
- package/guides/TY_GUIDE.md +935 -0
- package/guides/clj/CLOJURESCRIPT_GUIDE.md +300 -0
- package/guides/clj/CODE_SPLITTING.md +279 -0
- package/guides/clj/COMPONENT_GUIDE.md +391 -0
- package/guides/clj/HELIX_TY_GUIDE.md +428 -0
- package/guides/clj/I18N_GUIDE.md +478 -0
- package/guides/clj/LAYOUT_GUIDE.md +273 -0
- package/guides/clj/QUICKSTART.md +266 -0
- package/guides/clj/REAGENT_TY_GUIDE.md +408 -0
- package/guides/clj/REPLICANT_TY_GUIDE.md +623 -0
- package/guides/clj/ROUTING_GUIDE.md +346 -0
- package/guides/clj/UIX_TY_GUIDE.md +319 -0
- package/guides/js/HTMX_TY_GUIDE.md +252 -0
- package/guides/js/JAVASCRIPT_GUIDE.md +388 -0
- package/guides/js/REACT_TY_GUIDE.md +983 -0
- package/guides/js/SVELTE_TY_GUIDE.md +682 -0
- package/guides/js/TYCOMPONENT_GUIDE.md +962 -0
- package/guides/js/VUE_TY_GUIDE.md +738 -0
- package/lib/base/ty-component.d.ts +57 -13
- package/lib/base/ty-component.js +266 -292
- package/lib/components/button.d.ts +42 -18
- package/lib/components/button.js +318 -235
- package/lib/components/calendar-month.d.ts +30 -47
- package/lib/components/calendar-month.js +455 -429
- package/lib/components/calendar-navigation.d.ts +41 -49
- package/lib/components/calendar-navigation.js +287 -346
- package/lib/components/calendar.d.ts +73 -83
- package/lib/components/calendar.js +837 -762
- package/lib/components/checkbox.d.ts +26 -75
- package/lib/components/checkbox.js +298 -391
- package/lib/components/copy.d.ts +20 -60
- package/lib/components/copy.js +276 -380
- package/lib/components/date-picker.d.ts +100 -183
- package/lib/components/date-picker.js +1155 -1570
- package/lib/components/file-upload.d.ts +122 -0
- package/lib/components/file-upload.js +451 -0
- package/lib/components/icon.d.ts +3 -24
- package/lib/components/icon.js +141 -230
- package/lib/components/input.d.ts +93 -108
- package/lib/components/input.js +734 -710
- package/lib/components/modal.d.ts +39 -29
- package/lib/components/modal.js +419 -438
- package/lib/components/option.d.ts +20 -35
- package/lib/components/option.js +184 -309
- package/lib/components/popup.d.ts +2 -17
- package/lib/components/popup.js +353 -347
- package/lib/components/radio.d.ts +33 -25
- package/lib/components/radio.js +433 -422
- package/lib/components/resize-observer.d.ts +3 -30
- package/lib/components/resize-observer.js +71 -103
- package/lib/components/scroll-container.d.ts +21 -14
- package/lib/components/scroll-container.js +292 -234
- package/lib/components/select.d.ts +446 -0
- package/lib/components/select.js +1381 -0
- package/lib/components/selected-tags.d.ts +60 -0
- package/lib/components/selected-tags.js +225 -0
- package/lib/components/sortable.d.ts +175 -0
- package/lib/components/sortable.js +1844 -0
- package/lib/components/step.d.ts +1 -6
- package/lib/components/step.js +62 -68
- package/lib/components/switch.d.ts +15 -15
- package/lib/components/switch.js +237 -231
- package/lib/components/tab.d.ts +50 -7
- package/lib/components/tab.js +203 -69
- package/lib/components/tabs.d.ts +19 -64
- package/lib/components/tabs.js +600 -618
- package/lib/components/tag.d.ts +17 -55
- package/lib/components/tag.js +235 -308
- package/lib/components/textarea.d.ts +58 -89
- package/lib/components/textarea.js +523 -573
- package/lib/components/tooltip.d.ts +8 -13
- package/lib/components/tooltip.js +322 -409
- package/lib/components/wizard.d.ts +7 -54
- package/lib/components/wizard.js +376 -606
- 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 +15 -4
- package/lib/index.js +28 -38
- package/lib/styles/button.d.ts +24 -7
- package/lib/styles/button.js +298 -417
- package/lib/styles/calendar-month.d.ts +7 -6
- package/lib/styles/calendar-month.js +157 -179
- package/lib/styles/calendar-navigation.d.ts +2 -6
- package/lib/styles/calendar-navigation.js +108 -109
- package/lib/styles/calendar.d.ts +3 -3
- package/lib/styles/calendar.js +87 -23
- package/lib/styles/checkbox.d.ts +7 -6
- package/lib/styles/checkbox.js +101 -15
- package/lib/styles/copy.d.ts +3 -2
- package/lib/styles/copy.js +91 -71
- package/lib/styles/custom-scrollbar.d.ts +1 -2
- package/lib/styles/custom-scrollbar.js +80 -115
- package/lib/styles/date-picker.d.ts +4 -6
- package/lib/styles/date-picker.js +320 -352
- 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 -0
- package/lib/styles/file-upload.js +196 -0
- package/lib/styles/icon.d.ts +2 -6
- package/lib/styles/icon.js +92 -170
- package/lib/styles/input.d.ts +4 -7
- package/lib/styles/input.js +148 -643
- package/lib/styles/modal.d.ts +1 -2
- package/lib/styles/modal.js +127 -108
- package/lib/styles/option.d.ts +2 -6
- package/lib/styles/option.js +53 -96
- package/lib/styles/popup.d.ts +1 -2
- package/lib/styles/popup.js +47 -77
- package/lib/styles/radio.d.ts +3 -2
- package/lib/styles/radio.js +90 -116
- 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 +103 -146
- package/lib/styles/select-base.d.ts +8 -0
- package/lib/styles/select-base.js +747 -0
- package/lib/styles/select.d.ts +11 -0
- package/lib/styles/select.js +229 -0
- package/lib/styles/sortable.d.ts +16 -0
- package/lib/styles/sortable.js +85 -0
- package/lib/styles/step.d.ts +1 -2
- package/lib/styles/step.js +15 -34
- package/lib/styles/switch.d.ts +3 -2
- package/lib/styles/switch.js +52 -68
- package/lib/styles/tab.d.ts +1 -2
- package/lib/styles/tab.js +86 -34
- package/lib/styles/tabs.d.ts +3 -11
- package/lib/styles/tabs.js +204 -162
- package/lib/styles/tag.d.ts +2 -6
- package/lib/styles/tag.js +170 -359
- package/lib/styles/textarea.d.ts +1 -2
- package/lib/styles/textarea.js +238 -306
- package/lib/styles/tooltip.d.ts +4 -3
- package/lib/styles/tooltip.js +3 -131
- package/lib/styles/wizard.d.ts +8 -20
- package/lib/styles/wizard.js +306 -295
- package/lib/types/common.d.ts +9 -8
- package/lib/types/common.js +8 -5
- package/lib/utils/calendar-utils.d.ts +49 -65
- package/lib/utils/calendar-utils.js +158 -343
- package/lib/utils/custom-scrollbar.d.ts +6 -20
- package/lib/utils/custom-scrollbar.js +273 -317
- package/lib/utils/flavor-sheet.d.ts +31 -0
- package/lib/utils/flavor-sheet.js +17 -0
- package/lib/utils/icon-registry.d.ts +0 -15
- package/lib/utils/icon-registry.js +138 -279
- package/lib/utils/icons.d.ts +9 -0
- package/lib/utils/icons.js +1 -0
- package/lib/utils/loader-registry.d.ts +34 -0
- package/lib/utils/loader-registry.js +11 -0
- package/lib/utils/locale.d.ts +2 -80
- package/lib/utils/locale.js +30 -205
- package/lib/utils/mobile.d.ts +0 -1
- package/lib/utils/mobile.js +1 -18
- package/lib/utils/number-format.d.ts +6 -24
- package/lib/utils/number-format.js +53 -136
- package/lib/utils/positioning.d.ts +72 -22
- package/lib/utils/positioning.js +224 -298
- package/lib/utils/property-capture.d.ts +5 -27
- package/lib/utils/property-capture.js +36 -144
- package/lib/utils/property-manager.d.ts +6 -6
- package/lib/utils/property-manager.js +127 -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 +10 -11
- package/lib/utils/scroll-lock.js +165 -173
- package/lib/utils/styles.d.ts +0 -6
- package/lib/utils/styles.js +17 -48
- package/lib/utils/upgrade-properties.d.ts +21 -0
- package/lib/utils/upgrade-properties.js +47 -0
- package/lib/utils/validity.d.ts +122 -0
- package/lib/utils/validity.js +289 -0
- package/lib/version.d.ts +1 -2
- package/lib/version.js +1 -11
- package/package.json +66 -18
- 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/dropdown.d.ts +0 -402
- package/lib/components/dropdown.d.ts.map +0 -1
- package/lib/components/dropdown.js +0 -1564
- package/lib/components/dropdown.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/multiselect.d.ts +0 -397
- package/lib/components/multiselect.d.ts.map +0 -1
- package/lib/components/multiselect.js +0 -1580
- package/lib/components/multiselect.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/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/dropdown.d.ts +0 -12
- package/lib/styles/dropdown.d.ts.map +0 -1
- package/lib/styles/dropdown.js +0 -983
- package/lib/styles/dropdown.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 -6
- package/lib/styles/multiselect.d.ts.map +0 -1
- package/lib/styles/multiselect.js +0 -774
- 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/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/icon-registry.d.ts.map +0 -1
- package/lib/utils/icon-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/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/* sheet: full screen on phones, sliding up from the bottom. Opt-in, and only\n below 768px (the select's mobile line); wider screens keep the centered dialog. The panel is forced to\n fill the sheet (!important beats its own width, inline style included),\n since a sheet that leaves page showing around the panel isn't one. */\n@media (max-width: 768px) {\n .ty-modal-dialog[data-sheet] {\n inset: 0;\n transform: none;\n width: 100%;\n height: 100dvh;\n max-width: none;\n max-height: none;\n padding: env(safe-area-inset-top) env(safe-area-inset-right)\n env(safe-area-inset-bottom) env(safe-area-inset-left);\n background: var(--ty-surface-floating);\n box-sizing: border-box;\n }\n\n .ty-modal-dialog[data-sheet][open] {\n animation-name: ty-modal-sheet-enter;\n }\n\n .ty-modal-dialog[data-sheet] .modal-content {\n height: 100%;\n overflow-y: auto;\n overscroll-behavior: contain;\n }\n\n .ty-modal-dialog[data-sheet] ::slotted(*) {\n box-sizing: border-box !important;\n width: 100% !important;\n max-width: none !important;\n min-height: 100% !important;\n margin: 0 !important;\n border: none !important;\n border-radius: 0 !important;\n }\n\n /* On the panel, not out on the backdrop */\n .ty-modal-dialog[data-sheet] .close-button {\n top: calc(env(safe-area-inset-top) + 8px);\n right: calc(env(safe-area-inset-right) + 8px);\n color: var(--ty-text-soft);\n }\n\n .ty-modal-dialog[data-sheet] .close-button:hover,\n .ty-modal-dialog[data-sheet] .close-button:focus:hover,\n .ty-modal-dialog[data-sheet] .close-button:active:hover {\n color: var(--ty-text);\n }\n}\n\n@keyframes ty-modal-sheet-enter {\n from {\n transform: translateY(100%);\n }\n\n to {\n transform: none;\n }\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\n@media (prefers-reduced-motion: reduce) {\n .ty-modal-dialog[open],\n .ty-modal-dialog[data-sheet][open],\n .ty-modal-dialog::backdrop {\n animation: none;\n }\n}\n";
|
package/lib/styles/modal.js
CHANGED
|
@@ -1,134 +1,153 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Modal Styles
|
|
3
|
-
*
|
|
4
|
-
* CSS for the modal component wrapper.
|
|
5
|
-
* The modal is a pure wrapper - all content styling is user-defined.
|
|
6
|
-
*/
|
|
7
1
|
export const modalStyles = `
|
|
8
|
-
/* Modal Host Styling */
|
|
9
2
|
:host {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/* CSS variables are now auto-generated via the with-vars? option */
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* ===== CLOSE BUTTON STYLING ===== */
|
|
16
|
-
/* This is part of the modal wrapper functionality, not user content styling */
|
|
17
|
-
|
|
3
|
+
display: contents;
|
|
4
|
+
}
|
|
18
5
|
.close-button {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-moz-user-select: none;
|
|
43
|
-
-ms-user-select: none;
|
|
44
|
-
user-select: none;
|
|
45
|
-
}
|
|
46
|
-
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: -8px;
|
|
8
|
+
right: -8px;
|
|
9
|
+
background: transparent;
|
|
10
|
+
border: none;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
padding: 4px;
|
|
13
|
+
border-radius: 4px;
|
|
14
|
+
transition: var(--ty-transition-colors);
|
|
15
|
+
z-index: 1;
|
|
16
|
+
color: #d8d8d8;
|
|
17
|
+
outline: none;
|
|
18
|
+
box-shadow: none;
|
|
19
|
+
-webkit-appearance: none;
|
|
20
|
+
-moz-appearance: none;
|
|
21
|
+
appearance: none;
|
|
22
|
+
-webkit-tap-highlight-color: transparent;
|
|
23
|
+
-webkit-touch-callout: none;
|
|
24
|
+
-webkit-user-select: none;
|
|
25
|
+
-moz-user-select: none;
|
|
26
|
+
-ms-user-select: none;
|
|
27
|
+
user-select: none;
|
|
28
|
+
}
|
|
47
29
|
.close-button:hover {
|
|
48
|
-
|
|
30
|
+
color: white;
|
|
49
31
|
}
|
|
50
|
-
|
|
51
|
-
/* Explicitly remove focus and active states for all interaction modes */
|
|
52
32
|
.close-button:focus,
|
|
53
33
|
.close-button:focus-visible,
|
|
54
34
|
.close-button:focus-within,
|
|
55
35
|
.close-button:active {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
36
|
+
outline: none !important;
|
|
37
|
+
box-shadow: none !important;
|
|
38
|
+
border: none !important;
|
|
39
|
+
background: transparent !important;
|
|
60
40
|
}
|
|
61
|
-
|
|
62
|
-
/* Override hover color even in focus/active states */
|
|
63
41
|
.close-button:hover,
|
|
64
42
|
.close-button:focus:hover,
|
|
65
43
|
.close-button:active:hover {
|
|
66
|
-
|
|
44
|
+
color: white;
|
|
67
45
|
}
|
|
68
|
-
|
|
69
46
|
.close-button.hide {
|
|
70
|
-
|
|
47
|
+
visibility: hidden;
|
|
71
48
|
}
|
|
72
|
-
|
|
73
|
-
/* ===== DIALOG ELEMENT - PURE WRAPPER ===== */
|
|
74
|
-
/* Modal dialog - provides only essential modal functionality without styling user content */
|
|
75
|
-
|
|
76
49
|
.ty-modal-dialog {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
50
|
+
padding: 18px;
|
|
51
|
+
border: none;
|
|
52
|
+
margin: 0;
|
|
53
|
+
background: transparent;
|
|
54
|
+
position: fixed;
|
|
55
|
+
top: 50%;
|
|
56
|
+
left: 50%;
|
|
57
|
+
transform: translate(-50%, -50%);
|
|
58
|
+
z-index: 1000;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
max-width: 85vw;
|
|
61
|
+
max-height: 90vh;
|
|
62
|
+
outline: none;
|
|
63
|
+
}
|
|
64
|
+
.ty-modal-dialog[open] {
|
|
65
|
+
animation: ty-modal-enter var(--ty-modal-duration, 200ms) ease-out;
|
|
66
|
+
}
|
|
67
|
+
@keyframes ty-modal-enter {
|
|
68
|
+
from {
|
|
69
|
+
opacity: 0;
|
|
70
|
+
transform: translate(-50%, -50%) scale(0.93);
|
|
71
|
+
}
|
|
72
|
+
to {
|
|
73
|
+
opacity: 1;
|
|
74
|
+
transform: translate(-50%, -50%) scale(1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
103
77
|
.ty-modal-dialog::backdrop {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
78
|
+
background: var(--ty-modal-backdrop, rgba(0, 0, 0, 0.5));
|
|
79
|
+
backdrop-filter: var(--ty-modal-backdrop-blur, blur(2px));
|
|
80
|
+
animation: ty-modal-backdrop-enter var(--ty-modal-duration, 200ms) ease-out;
|
|
107
81
|
}
|
|
108
|
-
|
|
109
|
-
/* When backdrop is disabled */
|
|
110
82
|
.ty-modal-dialog:not([data-backdrop])::backdrop {
|
|
111
|
-
|
|
112
|
-
|
|
83
|
+
background: transparent;
|
|
84
|
+
backdrop-filter: none;
|
|
85
|
+
}
|
|
86
|
+
@media (max-width: 768px) {
|
|
87
|
+
.ty-modal-dialog[data-sheet] {
|
|
88
|
+
inset: 0;
|
|
89
|
+
transform: none;
|
|
90
|
+
width: 100%;
|
|
91
|
+
height: 100dvh;
|
|
92
|
+
max-width: none;
|
|
93
|
+
max-height: none;
|
|
94
|
+
padding: env(safe-area-inset-top) env(safe-area-inset-right)
|
|
95
|
+
env(safe-area-inset-bottom) env(safe-area-inset-left);
|
|
96
|
+
background: var(--ty-surface-floating);
|
|
97
|
+
box-sizing: border-box;
|
|
98
|
+
}
|
|
99
|
+
.ty-modal-dialog[data-sheet][open] {
|
|
100
|
+
animation-name: ty-modal-sheet-enter;
|
|
101
|
+
}
|
|
102
|
+
.ty-modal-dialog[data-sheet] .modal-content {
|
|
103
|
+
height: 100%;
|
|
104
|
+
overflow-y: auto;
|
|
105
|
+
overscroll-behavior: contain;
|
|
106
|
+
}
|
|
107
|
+
.ty-modal-dialog[data-sheet] ::slotted(*) {
|
|
108
|
+
box-sizing: border-box !important;
|
|
109
|
+
width: 100% !important;
|
|
110
|
+
max-width: none !important;
|
|
111
|
+
min-height: 100% !important;
|
|
112
|
+
margin: 0 !important;
|
|
113
|
+
border: none !important;
|
|
114
|
+
border-radius: 0 !important;
|
|
115
|
+
}
|
|
116
|
+
.ty-modal-dialog[data-sheet] .close-button {
|
|
117
|
+
top: calc(env(safe-area-inset-top) + 8px);
|
|
118
|
+
right: calc(env(safe-area-inset-right) + 8px);
|
|
119
|
+
color: var(--ty-text-soft);
|
|
120
|
+
}
|
|
121
|
+
.ty-modal-dialog[data-sheet] .close-button:hover,
|
|
122
|
+
.ty-modal-dialog[data-sheet] .close-button:focus:hover,
|
|
123
|
+
.ty-modal-dialog[data-sheet] .close-button:active:hover {
|
|
124
|
+
color: var(--ty-text);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
@keyframes ty-modal-sheet-enter {
|
|
128
|
+
from {
|
|
129
|
+
transform: translateY(100%);
|
|
130
|
+
}
|
|
131
|
+
to {
|
|
132
|
+
transform: none;
|
|
133
|
+
}
|
|
113
134
|
}
|
|
114
|
-
|
|
115
|
-
/* ===== MODAL CONTENT CONTAINER ===== */
|
|
116
|
-
/* Minimal container - no styling imposed on user content */
|
|
117
|
-
|
|
118
135
|
.modal-content {
|
|
119
|
-
|
|
136
|
+
color: var(--ty-text);
|
|
120
137
|
}
|
|
121
|
-
|
|
122
|
-
/* ===== ANIMATION KEYFRAMES ===== */
|
|
123
|
-
|
|
124
138
|
@keyframes ty-modal-backdrop-enter {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
139
|
+
from {
|
|
140
|
+
opacity: 0;
|
|
141
|
+
}
|
|
142
|
+
to {
|
|
143
|
+
opacity: 1;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
@media (prefers-reduced-motion: reduce) {
|
|
147
|
+
.ty-modal-dialog[open],
|
|
148
|
+
.ty-modal-dialog[data-sheet][open],
|
|
149
|
+
.ty-modal-dialog::backdrop {
|
|
150
|
+
animation: none;
|
|
151
|
+
}
|
|
132
152
|
}
|
|
133
153
|
`;
|
|
134
|
-
//# sourceMappingURL=modal.js.map
|
package/lib/styles/option.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* PORTED FROM: clj/ty/components/option.css
|
|
4
|
-
*/
|
|
5
|
-
export declare const optionStyles = "\n/* Ty Option Component Styles */\n\n.option-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--ty-spacing-2);\n box-sizing: border-box;\n width: 100%;\n\n /* Ensure content is clickable */\n cursor: pointer;\n user-select: none;\n\n /* Smooth transitions */\n transition: var(--ty-transition-all);\n\n /* Text styling \u2014 Linear-paired typography */\n color: var(--ty-text);\n font-family: var(--ty-font-sans);\n font-size: var(--ty-font-sm);\n line-height: var(--ty-leading-sm);\n letter-spacing: var(--ty-tracking-sm);\n padding: var(--ty-spacing-2) var(--ty-spacing-3);\n}\n\n:host([cloned]) .option-content {\n padding: 0px;\n background: transparent;\n}\n\n.option-content:hover {\n background: var(--ty-bg-primary-soft);\n}\n\n.option-content[highlighted] {\n background: var(--ty-bg-primary-soft);\n color: var(--ty-text-strong);\n font-weight: var(--ty-font-semibold);\n}\n\n.option-content[selected] {\n background: var(--ty-bg-primary-mild);\n color: var(--ty-text-strong);\n font-weight: var(--ty-font-medium);\n}\n\n.option-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.option-clear-btn {\n flex-shrink: 0;\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, 0.5);\n border: none;\n border-radius: 50%;\n cursor: pointer;\n padding: 0;\n transition: all 150ms ease;\n opacity: 0.9;\n}\n\n.option-clear-btn:hover {\n background: rgba(0, 0, 0, 0.7);\n opacity: 1;\n transform: scale(1.05);\n}\n\n.option-clear-btn:active {\n background: rgba(0, 0, 0, 0.85);\n transform: scale(0.95);\n}\n\n.option-clear-btn svg {\n width: 16px;\n height: 16px;\n color: #ffffff;\n stroke-width: 2.5;\n}\n\n.option-content[disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.option-content[hidden] {}\n\n/* Ensure nested elements inherit proper styling */\n.option-content * {\n pointer-events: none;\n}\n\n/* CRITICAL: Re-enable pointer events on clear button */\n.option-clear-btn {\n pointer-events: auto !important;\n}\n\n.option-clear-btn * {\n pointer-events: none;\n}\n";
|
|
6
|
-
//# sourceMappingURL=option.d.ts.map
|
|
1
|
+
/** Option Component Styles */
|
|
2
|
+
export declare const optionStyles = "\n/* Options the author hid and options a ty-select search left out, at any\n depth in the select (a framework component's element around each option\n too). !important beats the select's mobile list display:block. The\n select's trigger sets the variable: a hidden option can still be the\n value it shows. */\n:host([hidden]),\n:host([filtered-out]) {\n display: var(--ty-option-hidden-display, none) !important;\n}\n\n.option-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--ty-spacing-2);\n box-sizing: border-box;\n width: 100%;\n\n cursor: pointer;\n user-select: none;\n\n transition: var(--ty-transition-all);\n\n /* Linear-paired typography */\n color: var(--ty-text);\n font-family: inherit;\n font-size: var(--ty-font-sm);\n line-height: var(--ty-leading-sm);\n letter-spacing: var(--ty-tracking-sm);\n padding: var(--ty-spacing-2) var(--ty-spacing-3);\n border-radius: var(--ty-radius-md);\n}\n\n/* Shown in the select's trigger (the select sets inTrigger): one ellipsized\n line on the field size ladder (styles/field-size.ts), no row chrome. The\n select sizes the host. */\n.option-content.in-trigger {\n display: block;\n padding: 0px;\n background: transparent;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n font-size: var(--ty-field-font, var(--ty-font-sm));\n line-height: var(--ty-field-leading, var(--ty-leading-sm));\n letter-spacing: var(--ty-field-tracking, var(--ty-tracking-sm));\n}\n\n.option-content:hover {\n background: var(--ty-bg-neutral-soft);\n}\n\n.option-content[highlighted] {\n background: var(--ty-bg-neutral-soft);\n color: var(--ty-text-strong);\n}\n\n/* Selected: quiet \u2014 bolder text color only, no background slab, no weight change */\n.option-content[selected] {\n background: transparent;\n color: var(--ty-text-bold);\n}\n\n/* Lucide check \u2014 right-aligned. Its box is always reserved so selecting\n (or highlighting) never changes the row's width and rewraps the text. */\n.option-check {\n display: block;\n visibility: hidden;\n flex-shrink: 0;\n width: 14px;\n height: 14px;\n margin-left: auto;\n color: var(--ty-color-primary);\n}\n\n.option-content[selected] .option-check {\n visibility: visible;\n}\n\n.option-content.in-trigger .option-check {\n display: none;\n}\n\n.option-content[selected]:hover {\n background: var(--ty-bg-neutral-soft);\n}\n\n.option-content[disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.option-content[hidden] {}\n\n.option-content * {\n pointer-events: none;\n}\n";
|
package/lib/styles/option.js
CHANGED
|
@@ -1,116 +1,73 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Option Component Styles
|
|
3
|
-
* PORTED FROM: clj/ty/components/option.css
|
|
4
|
-
*/
|
|
5
1
|
export const optionStyles = `
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
:host([hidden]),
|
|
3
|
+
:host([filtered-out]) {
|
|
4
|
+
display: var(--ty-option-hidden-display, none) !important;
|
|
5
|
+
}
|
|
8
6
|
.option-content {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
font-family: var(--ty-font-sans);
|
|
26
|
-
font-size: var(--ty-font-sm);
|
|
27
|
-
line-height: var(--ty-leading-sm);
|
|
28
|
-
letter-spacing: var(--ty-tracking-sm);
|
|
29
|
-
padding: var(--ty-spacing-2) var(--ty-spacing-3);
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
gap: var(--ty-spacing-2);
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
width: 100%;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
user-select: none;
|
|
15
|
+
transition: var(--ty-transition-all);
|
|
16
|
+
color: var(--ty-text);
|
|
17
|
+
font-family: inherit;
|
|
18
|
+
font-size: var(--ty-font-sm);
|
|
19
|
+
line-height: var(--ty-leading-sm);
|
|
20
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
21
|
+
padding: var(--ty-spacing-2) var(--ty-spacing-3);
|
|
22
|
+
border-radius: var(--ty-radius-md);
|
|
30
23
|
}
|
|
31
|
-
|
|
32
|
-
:
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
.option-content.in-trigger {
|
|
25
|
+
display: block;
|
|
26
|
+
padding: 0px;
|
|
27
|
+
background: transparent;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
text-overflow: ellipsis;
|
|
32
|
+
font-size: var(--ty-field-font, var(--ty-font-sm));
|
|
33
|
+
line-height: var(--ty-field-leading, var(--ty-leading-sm));
|
|
34
|
+
letter-spacing: var(--ty-field-tracking, var(--ty-tracking-sm));
|
|
35
35
|
}
|
|
36
|
-
|
|
37
36
|
.option-content:hover {
|
|
38
|
-
|
|
37
|
+
background: var(--ty-bg-neutral-soft);
|
|
39
38
|
}
|
|
40
|
-
|
|
41
39
|
.option-content[highlighted] {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
font-weight: var(--ty-font-semibold);
|
|
40
|
+
background: var(--ty-bg-neutral-soft);
|
|
41
|
+
color: var(--ty-text-strong);
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
.option-content[selected] {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
font-weight: var(--ty-font-medium);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.option-text {
|
|
54
|
-
flex: 1;
|
|
55
|
-
min-width: 0;
|
|
56
|
-
overflow: hidden;
|
|
57
|
-
text-overflow: ellipsis;
|
|
58
|
-
white-space: nowrap;
|
|
44
|
+
background: transparent;
|
|
45
|
+
color: var(--ty-text-bold);
|
|
59
46
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
background: rgba(0, 0, 0, 0.5);
|
|
69
|
-
border: none;
|
|
70
|
-
border-radius: 50%;
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
padding: 0;
|
|
73
|
-
transition: all 150ms ease;
|
|
74
|
-
opacity: 0.9;
|
|
47
|
+
.option-check {
|
|
48
|
+
display: block;
|
|
49
|
+
visibility: hidden;
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
width: 14px;
|
|
52
|
+
height: 14px;
|
|
53
|
+
margin-left: auto;
|
|
54
|
+
color: var(--ty-color-primary);
|
|
75
55
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
background: rgba(0, 0, 0, 0.7);
|
|
79
|
-
opacity: 1;
|
|
80
|
-
transform: scale(1.05);
|
|
56
|
+
.option-content[selected] .option-check {
|
|
57
|
+
visibility: visible;
|
|
81
58
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
background: rgba(0, 0, 0, 0.85);
|
|
85
|
-
transform: scale(0.95);
|
|
59
|
+
.option-content.in-trigger .option-check {
|
|
60
|
+
display: none;
|
|
86
61
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
width: 16px;
|
|
90
|
-
height: 16px;
|
|
91
|
-
color: #ffffff;
|
|
92
|
-
stroke-width: 2.5;
|
|
62
|
+
.option-content[selected]:hover {
|
|
63
|
+
background: var(--ty-bg-neutral-soft);
|
|
93
64
|
}
|
|
94
|
-
|
|
95
65
|
.option-content[disabled] {
|
|
96
|
-
|
|
97
|
-
|
|
66
|
+
opacity: 0.5;
|
|
67
|
+
cursor: not-allowed;
|
|
98
68
|
}
|
|
99
|
-
|
|
100
69
|
.option-content[hidden] {}
|
|
101
|
-
|
|
102
|
-
/* Ensure nested elements inherit proper styling */
|
|
103
70
|
.option-content * {
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/* CRITICAL: Re-enable pointer events on clear button */
|
|
108
|
-
.option-clear-btn {
|
|
109
|
-
pointer-events: auto !important;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.option-clear-btn * {
|
|
113
|
-
pointer-events: none;
|
|
71
|
+
pointer-events: none;
|
|
114
72
|
}
|
|
115
73
|
`;
|
|
116
|
-
//# sourceMappingURL=option.js.map
|
package/lib/styles/popup.d.ts
CHANGED
|
@@ -4,5 +4,4 @@
|
|
|
4
4
|
* Popup component with dropdown-like behavior and tooltip positioning.
|
|
5
5
|
* Uses dialog element for top layer rendering like dropdown and date-picker.
|
|
6
6
|
*/
|
|
7
|
-
export declare const popupStyles = "\n
|
|
8
|
-
//# sourceMappingURL=popup.d.ts.map
|
|
7
|
+
export declare const popupStyles = "\n.popup-dialog {\n position: fixed;\n top: 0;\n left: 0;\n\n /* Reset dialog defaults */\n margin: 0;\n border: none;\n background: transparent;\n max-width: none;\n max-height: none;\n\n /* Shadow infrastructure - provide space for user shadows */\n padding: var(--popup-padding, 16px);\n\n /* Hidden by default - even when [open] (for positioning phase) */\n visibility: hidden;\n opacity: 0;\n /* NO TRANSFORM here - apply only when animating to avoid measurement errors! */\n\n transition:\n opacity var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1)),\n visibility var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1)),\n transform var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1));\n\n /* Prevent interactions when hidden */\n pointer-events: none;\n\n /* Focused on open when the content has nothing to focus: not a control */\n outline: none;\n}\n\n/* Apply position variables only when position is calculated (like dropdown) */\n.popup-dialog.position-calculated {\n top: var(--popup-y, 0px);\n left: var(--popup-x, 0px);\n}\n\n/* Entrance prep (right before .open): scale + a short slide from the anchor\n side. data-side is the RESOLVED side (post-flip), set by updatePosition. */\n.popup-dialog.preparing-animation {\n transform: scale(var(--ty-popup-scale, 0.96));\n}\n\n/* The prep pose must land instantly. Transitioned, it had barely left\n scale(1) when .open arrived a frame later, so the entrance (and any\n springy --ty-popup-ease) ran over almost no distance. */\n.popup-dialog.preparing-animation:not(.open) {\n transition: none;\n}\n\n.popup-dialog[data-side=\"bottom\"].preparing-animation:not(.open) {\n transform: translateY(-6px) scale(var(--ty-popup-scale, 0.96));\n}\n\n.popup-dialog[data-side=\"top\"].preparing-animation:not(.open) {\n transform: translateY(6px) scale(var(--ty-popup-scale, 0.96));\n}\n\n.popup-dialog[data-side=\"left\"].preparing-animation:not(.open) {\n transform: translateX(6px) scale(var(--ty-popup-scale, 0.96));\n}\n\n.popup-dialog[data-side=\"right\"].preparing-animation:not(.open) {\n transform: translateX(-6px) scale(var(--ty-popup-scale, 0.96));\n}\n\n.popup-dialog.open {\n visibility: visible;\n opacity: 1;\n transform: scale(1);\n pointer-events: auto;\n /* Visible at once, the opacity fades it in: focusable as soon as openPopup\n moves focus in. Closing still keeps it visible through the fade-out. */\n transition-duration: var(--ty-popup-duration, 180ms), 0s, var(--ty-popup-duration, 180ms);\n}\n\n/* Make dialog backdrop transparent like dropdown/date-picker */\n.popup-dialog::backdrop {\n background: transparent;\n}\n\n/* Neutral structural container \u2014 users control all visuals via slotted content */\n.popup-container {\n display: contents;\n}\n\n/* Slotted content defines its own styling */\n#popup-content {\n display: contents;\n}\n\n/* Users have complete control over the popup's appearance; only essential\n positioning is imposed here. */\n#popup-content ::slotted(*) {\n position: relative;\n\n /* Prevent content from being too wide - still helpful */\n max-width: min(400px, 90vw);\n max-height: min(500px, 80vh);\n overflow: auto;\n}\n";
|
package/lib/styles/popup.js
CHANGED
|
@@ -1,95 +1,65 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Popup Component Styles
|
|
3
|
-
*
|
|
4
|
-
* Popup component with dropdown-like behavior and tooltip positioning.
|
|
5
|
-
* Uses dialog element for top layer rendering like dropdown and date-picker.
|
|
6
|
-
*/
|
|
7
1
|
export const popupStyles = `
|
|
8
|
-
/* Popup component with dropdown-like behavior and tooltip positioning */
|
|
9
|
-
/* Uses dialog element for top layer rendering like dropdown and date-picker */
|
|
10
|
-
|
|
11
2
|
.popup-dialog {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/* NO TRANSFORM here - apply only when animating to avoid measurement errors! */
|
|
30
|
-
|
|
31
|
-
/* Smooth transitions */
|
|
32
|
-
transition:
|
|
33
|
-
opacity 150ms ease-out,
|
|
34
|
-
visibility 150ms ease-out,
|
|
35
|
-
transform 150ms ease-out;
|
|
36
|
-
|
|
37
|
-
/* Prevent interactions when hidden */
|
|
38
|
-
pointer-events: none;
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
border: none;
|
|
8
|
+
background: transparent;
|
|
9
|
+
max-width: none;
|
|
10
|
+
max-height: none;
|
|
11
|
+
padding: var(--popup-padding, 16px);
|
|
12
|
+
visibility: hidden;
|
|
13
|
+
opacity: 0;
|
|
14
|
+
transition:
|
|
15
|
+
opacity var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1)),
|
|
16
|
+
visibility var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1)),
|
|
17
|
+
transform var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1));
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
outline: none;
|
|
39
20
|
}
|
|
40
|
-
|
|
41
|
-
/* Apply position variables only when position is calculated (like dropdown) */
|
|
42
21
|
.popup-dialog.position-calculated {
|
|
43
|
-
|
|
44
|
-
|
|
22
|
+
top: var(--popup-y, 0px);
|
|
23
|
+
left: var(--popup-x, 0px);
|
|
45
24
|
}
|
|
46
|
-
|
|
47
|
-
/* Apply scale for entrance animation (right before .open) */
|
|
48
25
|
.popup-dialog.preparing-animation {
|
|
49
|
-
|
|
26
|
+
transform: scale(var(--ty-popup-scale, 0.96));
|
|
27
|
+
}
|
|
28
|
+
.popup-dialog.preparing-animation:not(.open) {
|
|
29
|
+
transition: none;
|
|
30
|
+
}
|
|
31
|
+
.popup-dialog[data-side="bottom"].preparing-animation:not(.open) {
|
|
32
|
+
transform: translateY(-6px) scale(var(--ty-popup-scale, 0.96));
|
|
33
|
+
}
|
|
34
|
+
.popup-dialog[data-side="top"].preparing-animation:not(.open) {
|
|
35
|
+
transform: translateY(6px) scale(var(--ty-popup-scale, 0.96));
|
|
36
|
+
}
|
|
37
|
+
.popup-dialog[data-side="left"].preparing-animation:not(.open) {
|
|
38
|
+
transform: translateX(6px) scale(var(--ty-popup-scale, 0.96));
|
|
39
|
+
}
|
|
40
|
+
.popup-dialog[data-side="right"].preparing-animation:not(.open) {
|
|
41
|
+
transform: translateX(-6px) scale(var(--ty-popup-scale, 0.96));
|
|
50
42
|
}
|
|
51
|
-
|
|
52
|
-
/* When open - smooth entrance animation */
|
|
53
43
|
.popup-dialog.open {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
visibility: visible;
|
|
45
|
+
opacity: 1;
|
|
46
|
+
transform: scale(1);
|
|
47
|
+
pointer-events: auto;
|
|
48
|
+
transition-duration: var(--ty-popup-duration, 180ms), 0s, var(--ty-popup-duration, 180ms);
|
|
58
49
|
}
|
|
59
|
-
|
|
60
|
-
/* Make dialog backdrop transparent like dropdown/date-picker */
|
|
61
50
|
.popup-dialog::backdrop {
|
|
62
|
-
|
|
51
|
+
background: transparent;
|
|
63
52
|
}
|
|
64
|
-
|
|
65
|
-
/* Inner container - neutral structural container */
|
|
66
53
|
.popup-container {
|
|
67
|
-
|
|
68
|
-
/* Users control all visual aspects via slotted content */
|
|
69
|
-
display: contents;
|
|
54
|
+
display: contents;
|
|
70
55
|
}
|
|
71
|
-
|
|
72
|
-
/* Content slot styling */
|
|
73
56
|
#popup-content {
|
|
74
|
-
|
|
75
|
-
display: contents;
|
|
57
|
+
display: contents;
|
|
76
58
|
}
|
|
77
|
-
|
|
78
|
-
/* Remove default styling from slotted content - users have full control */
|
|
79
59
|
#popup-content ::slotted(*) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
/* box-shadow: unset; */
|
|
85
|
-
|
|
86
|
-
/* Only maintain essential positioning */
|
|
87
|
-
position: relative;
|
|
88
|
-
|
|
89
|
-
/* Prevent content from being too wide - still helpful */
|
|
90
|
-
max-width: min(400px, 90vw);
|
|
91
|
-
max-height: min(500px, 80vh);
|
|
92
|
-
overflow: auto;
|
|
60
|
+
position: relative;
|
|
61
|
+
max-width: min(400px, 90vw);
|
|
62
|
+
max-height: min(500px, 80vh);
|
|
63
|
+
overflow: auto;
|
|
93
64
|
}
|
|
94
65
|
`;
|
|
95
|
-
//# sourceMappingURL=popup.js.map
|