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,24 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TyResizeObserver Web Component
|
|
3
|
-
*
|
|
4
|
-
* Self-observing resize component that tracks its own dimensions
|
|
5
|
-
* and stores them in a global registry accessible by element ID.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```html
|
|
9
|
-
* <ty-resize-observer id="parent-container">
|
|
10
|
-
* <div class="child">
|
|
11
|
-
* <!-- Child can query parent size via getSize('parent-container') -->
|
|
12
|
-
* </div>
|
|
13
|
-
* </ty-resize-observer>
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* @example With debouncing
|
|
17
|
-
* ```html
|
|
18
|
-
* <ty-resize-observer id="container" debounce="100">
|
|
19
|
-
* <!-- Only updates after 100ms of no resize activity -->
|
|
20
|
-
* </ty-resize-observer>
|
|
21
|
-
* ```
|
|
2
|
+
* TyResizeObserver Web Component - self-observing element that tracks its own
|
|
3
|
+
* dimensions in a global registry keyed by element ID. Optional debounce.
|
|
22
4
|
*/
|
|
23
5
|
export declare class TyResizeObserver extends HTMLElement {
|
|
24
6
|
private _resizeObserver;
|
|
@@ -31,18 +13,9 @@ export declare class TyResizeObserver extends HTMLElement {
|
|
|
31
13
|
set debounce(value: number);
|
|
32
14
|
constructor();
|
|
33
15
|
connectedCallback(): void;
|
|
16
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
34
17
|
disconnectedCallback(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Setup ResizeObserver to watch this element
|
|
37
|
-
*/
|
|
38
18
|
private setupObserver;
|
|
39
|
-
/**
|
|
40
|
-
* Handle resize events - update registry and notify callbacks
|
|
41
|
-
*/
|
|
42
19
|
private handleResize;
|
|
43
|
-
/**
|
|
44
|
-
* Cleanup observer and remove from registry
|
|
45
|
-
*/
|
|
46
20
|
private cleanup;
|
|
47
21
|
}
|
|
48
|
-
//# sourceMappingURL=resize-observer.d.ts.map
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TyResizeObserver Web Component
|
|
3
|
-
*
|
|
4
|
-
* Self-observing resize component that tracks its own dimensions
|
|
5
|
-
* and stores them in a global registry accessible by element ID.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```html
|
|
9
|
-
* <ty-resize-observer id="parent-container">
|
|
10
|
-
* <div class="child">
|
|
11
|
-
* <!-- Child can query parent size via getSize('parent-container') -->
|
|
12
|
-
* </div>
|
|
13
|
-
* </ty-resize-observer>
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* @example With debouncing
|
|
17
|
-
* ```html
|
|
18
|
-
* <ty-resize-observer id="container" debounce="100">
|
|
19
|
-
* <!-- Only updates after 100ms of no resize activity -->
|
|
20
|
-
* </ty-resize-observer>
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
1
|
import { ensureStyles } from '../utils/styles.js';
|
|
24
2
|
import { resizeObserverStyles } from '../styles/resize-observer.js';
|
|
25
3
|
import { updateSize, removeSize } from '../utils/resize-observer.js';
|
|
@@ -27,9 +5,6 @@ export class TyResizeObserver extends HTMLElement {
|
|
|
27
5
|
static get observedAttributes() {
|
|
28
6
|
return ['id', 'debounce'];
|
|
29
7
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Debounce in milliseconds (default: 0 = no debounce)
|
|
32
|
-
*/
|
|
33
8
|
get debounce() {
|
|
34
9
|
return parseInt(this.getAttribute('debounce') || '0');
|
|
35
10
|
}
|
|
@@ -40,25 +15,28 @@ export class TyResizeObserver extends HTMLElement {
|
|
|
40
15
|
super();
|
|
41
16
|
this._resizeObserver = null;
|
|
42
17
|
this._debounceTimer = null;
|
|
43
|
-
// Setup shadow DOM with styles
|
|
44
18
|
const shadow = this.attachShadow({ mode: 'open' });
|
|
45
19
|
ensureStyles(shadow, { css: resizeObserverStyles, id: 'ty-resize-observer' });
|
|
46
|
-
// Simple slot for content
|
|
47
20
|
shadow.innerHTML = '<slot></slot>';
|
|
48
21
|
}
|
|
49
22
|
connectedCallback() {
|
|
50
23
|
this.setupObserver();
|
|
51
24
|
}
|
|
25
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
26
|
+
if (name === 'id' && oldValue && oldValue !== newValue) {
|
|
27
|
+
removeSize(oldValue);
|
|
28
|
+
if (newValue && this.isConnected) {
|
|
29
|
+
const { width, height } = this.getBoundingClientRect();
|
|
30
|
+
updateSize(newValue, width, height);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
52
34
|
disconnectedCallback() {
|
|
53
35
|
this.cleanup();
|
|
54
36
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Setup ResizeObserver to watch this element
|
|
57
|
-
*/
|
|
58
37
|
setupObserver() {
|
|
59
38
|
this._resizeObserver = new ResizeObserver((entries) => {
|
|
60
39
|
if (this.debounce > 0) {
|
|
61
|
-
// Debounced handling
|
|
62
40
|
if (this._debounceTimer)
|
|
63
41
|
clearTimeout(this._debounceTimer);
|
|
64
42
|
this._debounceTimer = window.setTimeout(() => {
|
|
@@ -66,43 +44,31 @@ export class TyResizeObserver extends HTMLElement {
|
|
|
66
44
|
}, this.debounce);
|
|
67
45
|
}
|
|
68
46
|
else {
|
|
69
|
-
// Immediate handling
|
|
70
47
|
this.handleResize(entries);
|
|
71
48
|
}
|
|
72
49
|
});
|
|
73
|
-
// Observe the custom element itself (not shadow root)
|
|
74
50
|
this._resizeObserver.observe(this);
|
|
75
51
|
}
|
|
76
|
-
/**
|
|
77
|
-
* Handle resize events - update registry and notify callbacks
|
|
78
|
-
*/
|
|
79
52
|
handleResize(entries) {
|
|
80
53
|
const { width, height } = entries[0].contentRect;
|
|
81
|
-
// Only update if element has an ID
|
|
82
54
|
if (this.id) {
|
|
83
55
|
updateSize(this.id, width, height);
|
|
84
56
|
}
|
|
85
57
|
}
|
|
86
|
-
/**
|
|
87
|
-
* Cleanup observer and remove from registry
|
|
88
|
-
*/
|
|
89
58
|
cleanup() {
|
|
90
|
-
// Disconnect observer
|
|
91
59
|
if (this._resizeObserver) {
|
|
92
60
|
this._resizeObserver.disconnect();
|
|
93
61
|
this._resizeObserver = null;
|
|
94
62
|
}
|
|
95
|
-
// Clear pending debounce timer
|
|
96
63
|
if (this._debounceTimer) {
|
|
97
64
|
clearTimeout(this._debounceTimer);
|
|
98
65
|
this._debounceTimer = null;
|
|
99
66
|
}
|
|
100
|
-
// Remove from registry
|
|
101
67
|
if (this.id) {
|
|
102
68
|
removeSize(this.id);
|
|
103
69
|
}
|
|
104
70
|
}
|
|
105
71
|
}
|
|
106
|
-
|
|
107
|
-
customElements.define('ty-resize-observer', TyResizeObserver);
|
|
108
|
-
|
|
72
|
+
if (!customElements.get('ty-resize-observer')) {
|
|
73
|
+
customElements.define('ty-resize-observer', TyResizeObserver);
|
|
74
|
+
}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TyScrollContainer Web Component
|
|
3
|
-
*
|
|
4
|
-
* A scroll container with shadow indicators and an optional custom-rendered scrollbar.
|
|
5
|
-
* Uses the CustomScrollbar utility internally.
|
|
6
|
-
*
|
|
7
|
-
* @example Custom scrollbar
|
|
8
|
-
* ```html
|
|
9
|
-
* <ty-scroll-container max-height="300px" custom-scrollbar>
|
|
10
|
-
* <div>Long content...</div>
|
|
11
|
-
* </ty-scroll-container>
|
|
12
|
-
* ```
|
|
2
|
+
* TyScrollContainer Web Component - scroll wrapper with edge shadow indicators
|
|
3
|
+
* and an optional custom-rendered scrollbar (CustomScrollbar utility).
|
|
13
4
|
*/
|
|
14
5
|
export declare class TyScrollContainer extends HTMLElement {
|
|
15
6
|
private _scrollWrapper;
|
|
@@ -64,4 +55,3 @@ export declare class TyScrollContainer extends HTMLElement {
|
|
|
64
55
|
scrollToElement(target: Element | string, smooth?: boolean): void;
|
|
65
56
|
get scrollElement(): HTMLElement | null;
|
|
66
57
|
}
|
|
67
|
-
//# sourceMappingURL=scroll-container.d.ts.map
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TyScrollContainer Web Component
|
|
3
|
-
*
|
|
4
|
-
* A scroll container with shadow indicators and an optional custom-rendered scrollbar.
|
|
5
|
-
* Uses the CustomScrollbar utility internally.
|
|
6
|
-
*
|
|
7
|
-
* @example Custom scrollbar
|
|
8
|
-
* ```html
|
|
9
|
-
* <ty-scroll-container max-height="300px" custom-scrollbar>
|
|
10
|
-
* <div>Long content...</div>
|
|
11
|
-
* </ty-scroll-container>
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
1
|
import { ensureStyles } from '../utils/styles.js';
|
|
15
2
|
import { scrollContainerStyles } from '../styles/scroll-container.js';
|
|
16
3
|
import { CustomScrollbar } from '../utils/custom-scrollbar.js';
|
|
@@ -18,7 +5,6 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
18
5
|
static get observedAttributes() {
|
|
19
6
|
return ['shadow', 'max-height', 'hide-scrollbar', 'custom-scrollbar', 'overflow-x', 'scroll-anchoring'];
|
|
20
7
|
}
|
|
21
|
-
// ============ Property Accessors ============
|
|
22
8
|
get shadow() {
|
|
23
9
|
return this.getAttribute('shadow') !== 'false';
|
|
24
10
|
}
|
|
@@ -65,7 +51,6 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
65
51
|
else
|
|
66
52
|
this.removeAttribute('overflow-x');
|
|
67
53
|
}
|
|
68
|
-
/** Distance (px) from an edge at which nearstart/nearend fire. Default 100. */
|
|
69
54
|
get nearEdgeThreshold() {
|
|
70
55
|
const v = parseInt(this.getAttribute('near-edge-threshold') || '', 10);
|
|
71
56
|
return Number.isFinite(v) ? v : 100;
|
|
@@ -76,8 +61,6 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
76
61
|
else
|
|
77
62
|
this.setAttribute('near-edge-threshold', String(value));
|
|
78
63
|
}
|
|
79
|
-
/** Preserve visual position when content is added above the viewport
|
|
80
|
-
* (e.g. prepending older messages in a chat). Opt-in. */
|
|
81
64
|
get scrollAnchoring() {
|
|
82
65
|
return this.hasAttribute('scroll-anchoring');
|
|
83
66
|
}
|
|
@@ -98,10 +81,8 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
98
81
|
this._resizeObserver = null;
|
|
99
82
|
this._contentObserver = null;
|
|
100
83
|
this._rafId = null;
|
|
101
|
-
// Edge-trigger state for nearstart/nearend (fire once on entering the zone).
|
|
102
84
|
this._nearStartFired = false;
|
|
103
85
|
this._nearEndFired = false;
|
|
104
|
-
// ============ Private: Scroll Handling ============
|
|
105
86
|
this._onScroll = () => {
|
|
106
87
|
if (this._rafId !== null)
|
|
107
88
|
return;
|
|
@@ -182,12 +163,6 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
182
163
|
this._setupAnchoring();
|
|
183
164
|
}
|
|
184
165
|
}
|
|
185
|
-
// ============ Private: Scroll Anchoring ============
|
|
186
|
-
// Preserve visual position when content is added ABOVE the viewport (chat
|
|
187
|
-
// "load older" prepends). A MutationObserver watches the host's children;
|
|
188
|
-
// any added node sitting above the visible area shifts everything down, so we
|
|
189
|
-
// add its (above-the-fold) height back to scrollTop. Append-at-bottom is
|
|
190
|
-
// untouched. CSS sets overflow-anchor:none so native anchoring doesn't fight us.
|
|
191
166
|
_setupAnchoring() {
|
|
192
167
|
if (this._contentObserver || !this.scrollAnchoring)
|
|
193
168
|
return;
|
|
@@ -203,9 +178,9 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
203
178
|
return;
|
|
204
179
|
const rect = n.getBoundingClientRect();
|
|
205
180
|
if (rect.bottom <= wrapTop)
|
|
206
|
-
addedAbove += rect.height;
|
|
181
|
+
addedAbove += rect.height;
|
|
207
182
|
else if (rect.top < wrapTop)
|
|
208
|
-
addedAbove += wrapTop - rect.top;
|
|
183
|
+
addedAbove += wrapTop - rect.top;
|
|
209
184
|
});
|
|
210
185
|
}
|
|
211
186
|
if (addedAbove > 0) {
|
|
@@ -219,11 +194,7 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
219
194
|
this._contentObserver?.disconnect();
|
|
220
195
|
this._contentObserver = null;
|
|
221
196
|
}
|
|
222
|
-
// ============ Private: Scrollbar Setup ============
|
|
223
197
|
_setupScrollbar() {
|
|
224
|
-
// Idempotent: attributeChangedCallback (attrs set before insertion) and
|
|
225
|
-
// connectedCallback can both call this. Without the guard a second
|
|
226
|
-
// CustomScrollbar + track is created → two thumbs.
|
|
227
198
|
if (this._scrollbar)
|
|
228
199
|
return;
|
|
229
200
|
if (!this._scrollWrapper || !this.customScrollbar)
|
|
@@ -232,7 +203,6 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
232
203
|
vertical: true,
|
|
233
204
|
horizontal: this.overflowX
|
|
234
205
|
});
|
|
235
|
-
// Append track elements to shadow DOM
|
|
236
206
|
const shadowRoot = this.shadowRoot;
|
|
237
207
|
if (this._scrollbar.trackY)
|
|
238
208
|
shadowRoot.appendChild(this._scrollbar.trackY);
|
|
@@ -241,14 +211,12 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
241
211
|
}
|
|
242
212
|
_destroyScrollbar() {
|
|
243
213
|
if (this._scrollbar) {
|
|
244
|
-
// Remove track elements from DOM
|
|
245
214
|
this._scrollbar.trackY?.remove();
|
|
246
215
|
this._scrollbar.trackX?.remove();
|
|
247
216
|
this._scrollbar.destroy();
|
|
248
217
|
this._scrollbar = null;
|
|
249
218
|
}
|
|
250
219
|
}
|
|
251
|
-
// ============ Private: Max Height ============
|
|
252
220
|
_updateMaxHeight() {
|
|
253
221
|
if (this._scrollWrapper) {
|
|
254
222
|
const maxHeight = this.maxHeight;
|
|
@@ -262,7 +230,6 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
262
230
|
}
|
|
263
231
|
}
|
|
264
232
|
}
|
|
265
|
-
// ============ Private: Shadow State ============
|
|
266
233
|
_updateShadowState() {
|
|
267
234
|
if (!this._scrollWrapper)
|
|
268
235
|
return;
|
|
@@ -282,10 +249,6 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
282
249
|
this._shadowRight.classList.toggle('visible', scrollLeft + clientWidth < scrollWidth - threshold);
|
|
283
250
|
}
|
|
284
251
|
}
|
|
285
|
-
// Near-edge events for infinite scroll (vertical). Edge-triggered: fire once
|
|
286
|
-
// when entering the zone, re-arm only after leaving it. Runs on scroll,
|
|
287
|
-
// slotchange and resize (all route through here), so loading more content
|
|
288
|
-
// re-arms naturally once it grows the scroll distance.
|
|
289
252
|
const scrollable = scrollHeight - clientHeight;
|
|
290
253
|
if (scrollable > 0) {
|
|
291
254
|
const t = this.nearEdgeThreshold;
|
|
@@ -294,21 +257,18 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
294
257
|
this._nearStartFired = this._maybeEmitEdge('nearstart', scrollTop, t, this._nearStartFired, { distance: scrollTop, scrollTop, scrollHeight, clientHeight });
|
|
295
258
|
}
|
|
296
259
|
else {
|
|
297
|
-
// Not scrollable → re-arm both so they fire fresh once content overflows.
|
|
298
260
|
this._nearStartFired = false;
|
|
299
261
|
this._nearEndFired = false;
|
|
300
262
|
}
|
|
301
263
|
}
|
|
302
|
-
/** Edge-trigger one near-edge event; returns the new "fired" state. */
|
|
303
264
|
_maybeEmitEdge(name, distance, threshold, fired, detail) {
|
|
304
265
|
if (distance > threshold)
|
|
305
|
-
return false;
|
|
266
|
+
return false;
|
|
306
267
|
if (!fired) {
|
|
307
268
|
this.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));
|
|
308
269
|
}
|
|
309
270
|
return true;
|
|
310
271
|
}
|
|
311
|
-
// ============ Public API ============
|
|
312
272
|
updateShadows() {
|
|
313
273
|
this._updateShadowState();
|
|
314
274
|
this._scrollbar?.update();
|
|
@@ -329,7 +289,6 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
329
289
|
this._scrollWrapper.scrollTo({ left: this._scrollWrapper.scrollWidth, behavior: smooth ? 'smooth' : 'auto' });
|
|
330
290
|
}
|
|
331
291
|
}
|
|
332
|
-
/** Scroll a slotted descendant (element or CSS selector) into view. */
|
|
333
292
|
scrollToElement(target, smooth = true) {
|
|
334
293
|
const el = typeof target === 'string' ? this.querySelector(target) : target;
|
|
335
294
|
el?.scrollIntoView({ behavior: smooth ? 'smooth' : 'auto', block: 'nearest' });
|
|
@@ -338,6 +297,4 @@ export class TyScrollContainer extends HTMLElement {
|
|
|
338
297
|
return this._scrollWrapper;
|
|
339
298
|
}
|
|
340
299
|
}
|
|
341
|
-
// Register custom element
|
|
342
300
|
customElements.define('ty-scroll-container', TyScrollContainer);
|
|
343
|
-
//# sourceMappingURL=scroll-container.js.map
|
|
@@ -1,57 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TySelect Web Component
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Cardinality (native <select> semantics):
|
|
7
|
-
* - default: SINGLE select — scalar value, picking an option closes the popup
|
|
8
|
-
* - `multiple`: multi select — comma value / repeated FormData entries,
|
|
9
|
-
* options toggle and the popup stays open
|
|
10
|
-
*
|
|
11
|
-
* Skins:
|
|
12
|
-
* - default: form FIELD — full width, --ty-input-* tokens, matches ty-input;
|
|
13
|
-
* shows the selected label(s) inline
|
|
14
|
-
* - `compact`: content-hugging trigger for toolbars/filter bars; single shows
|
|
15
|
-
* the selected label, multiple shows placeholder + count badge (pair with
|
|
16
|
-
* <ty-selected-options>)
|
|
17
|
-
* - slot="trigger": consumer skin — replaces field/compact chrome entirely,
|
|
18
|
-
* behavior/ARIA/form participation unchanged
|
|
19
|
-
*
|
|
20
|
-
* - ty-option children (ty-tag also accepted)
|
|
21
|
-
* - Desktop popup with smart positioning, mobile full-screen modal
|
|
22
|
-
* - Search / external-search / debounce, keyboard navigation
|
|
23
|
-
* - Form association: single submits one entry, multiple submits repeated
|
|
24
|
-
* `name=` entries (HTMX-ready)
|
|
25
|
-
* - change event detail: { value, values, items: [{value, label, flavor}], action, item }
|
|
26
|
-
* (`value` is a scalar for single, array for multiple)
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```html
|
|
30
|
-
* <!-- Single select, field skin -->
|
|
31
|
-
* <ty-select label="Robot" name="robot">
|
|
32
|
-
* <ty-option value="bobo">Bobo Robot</ty-option>
|
|
33
|
-
* <ty-option value="eywa">EYWA Dataset Example</ty-option>
|
|
34
|
-
* </ty-select>
|
|
35
|
-
*
|
|
36
|
-
* <!-- Multi select, compact skin + out-of-band chips -->
|
|
37
|
-
* <ty-select multiple compact label="Robots" name="robots" id="robots">...</ty-select>
|
|
38
|
-
* <ty-selected-options for="robots"></ty-selected-options>
|
|
39
|
-
* ```
|
|
2
|
+
* TySelect Web Component — THE select control (replaces ty-dropdown/ty-multiselect).
|
|
3
|
+
* Cardinality follows native <select>: default single (scalar value, picking closes
|
|
4
|
+
* the popup), `multiple` toggles options and submits repeated `name=` FormData entries.
|
|
5
|
+
* Skins: default form field, `compact` content-hugging trigger, slot="trigger" custom.
|
|
40
6
|
*/
|
|
41
7
|
import type { Flavor, Size } from "../types/common.js";
|
|
8
|
+
import { type Placement } from "../utils/positioning.js";
|
|
42
9
|
import { TyComponent } from "../base/ty-component.js";
|
|
43
10
|
import type { PropertyChange } from "../utils/property-manager.js";
|
|
44
|
-
/**
|
|
45
|
-
* Tag data structure
|
|
46
|
-
*/
|
|
47
11
|
interface TagData {
|
|
48
12
|
value: string;
|
|
49
13
|
text: string;
|
|
50
14
|
element: HTMLElement;
|
|
51
15
|
}
|
|
52
|
-
/**
|
|
53
|
-
* Component state structure
|
|
54
|
-
*/
|
|
55
16
|
interface SelectState {
|
|
56
17
|
open: boolean;
|
|
57
18
|
search: string;
|
|
@@ -156,7 +117,12 @@ export declare class TySelect extends TyComponent<SelectState> {
|
|
|
156
117
|
visual: boolean;
|
|
157
118
|
default: string;
|
|
158
119
|
validate: (v: any) => boolean;
|
|
159
|
-
coerce: (v: any) => "start" | "end";
|
|
120
|
+
coerce: (v: any) => "start" | "end" | "center";
|
|
121
|
+
};
|
|
122
|
+
placement: {
|
|
123
|
+
type: "string";
|
|
124
|
+
visual: boolean;
|
|
125
|
+
default: string;
|
|
160
126
|
};
|
|
161
127
|
size: {
|
|
162
128
|
type: "string";
|
|
@@ -223,22 +189,12 @@ export declare class TySelect extends TyComponent<SelectState> {
|
|
|
223
189
|
private _selectedClone;
|
|
224
190
|
private _customFlavorSheet;
|
|
225
191
|
constructor();
|
|
226
|
-
/**
|
|
227
|
-
* Called when component is connected to DOM
|
|
228
|
-
* TyComponent handles property capture automatically
|
|
229
|
-
*/
|
|
192
|
+
/** TyComponent handles property capture automatically. */
|
|
230
193
|
protected onConnect(): void;
|
|
231
194
|
/** Custom (non-built-in) flavors — see utils/flavor-sheet.ts. */
|
|
232
195
|
private _syncCustomFlavor;
|
|
233
|
-
/**
|
|
234
|
-
* Called when component is disconnected from DOM
|
|
235
|
-
* Clean up event listeners and timers
|
|
236
|
-
*/
|
|
237
196
|
protected onDisconnect(): void;
|
|
238
|
-
/**
|
|
239
|
-
* Called when properties change
|
|
240
|
-
* Handle state synchronization BEFORE render
|
|
241
|
-
*/
|
|
197
|
+
/** Handle state synchronization BEFORE render. */
|
|
242
198
|
protected onPropertiesChanged(changes: PropertyChange[]): void;
|
|
243
199
|
/**
|
|
244
200
|
* Toggle the loading visual state on the open popup.
|
|
@@ -247,27 +203,15 @@ export declare class TySelect extends TyComponent<SelectState> {
|
|
|
247
203
|
* take effect on the next loading toggle.
|
|
248
204
|
*/
|
|
249
205
|
private applyLoadingState;
|
|
250
|
-
/**
|
|
251
|
-
* Get the form value for this component
|
|
252
|
-
* Returns FormData with multiple entries (HTMX standard)
|
|
253
|
-
*/
|
|
206
|
+
/** Form value: a plain entry for single, FormData with repeated entries for multiple (HTMX standard). */
|
|
254
207
|
protected getFormValue(): FormDataEntryValue | FormData | null;
|
|
255
|
-
/**
|
|
256
|
-
* Parse select value (comma-separated string to array)
|
|
257
|
-
*/
|
|
258
208
|
private parseValue;
|
|
259
|
-
/**
|
|
260
|
-
* Initialize component state from attributes
|
|
261
|
-
* Reads from both property and attribute (like ClojureScript version)
|
|
262
|
-
*/
|
|
209
|
+
/** Initialize component state from the value property / pre-selected children. */
|
|
263
210
|
private initializeState;
|
|
264
211
|
/**
|
|
265
212
|
* Get all option elements from the component (ty-option preferred, ty-tag accepted)
|
|
266
213
|
*/
|
|
267
214
|
private getTagElements;
|
|
268
|
-
/**
|
|
269
|
-
* Extract value and text from a ty-tag element
|
|
270
|
-
*/
|
|
271
215
|
private getTagData;
|
|
272
216
|
/**
|
|
273
217
|
* Select an option - attribute only. The option stays in the list with
|
|
@@ -282,9 +226,6 @@ export declare class TySelect extends TyComponent<SelectState> {
|
|
|
282
226
|
* Get array of currently selected values from tags (ALWAYS reads from DOM)
|
|
283
227
|
*/
|
|
284
228
|
private getSelectedValues;
|
|
285
|
-
/**
|
|
286
|
-
* Sync tag selection states with desired values
|
|
287
|
-
*/
|
|
288
229
|
private syncSelectedTags;
|
|
289
230
|
/**
|
|
290
231
|
* role="option" for every current option/tag — separate from
|
|
@@ -294,18 +235,12 @@ export declare class TySelect extends TyComponent<SelectState> {
|
|
|
294
235
|
* on every light-DOM change.
|
|
295
236
|
*/
|
|
296
237
|
private ensureOptionRoles;
|
|
297
|
-
/**
|
|
298
|
-
* Central update function - synchronizes everything
|
|
299
|
-
* Uses TyComponent's property system for proper lifecycle
|
|
300
|
-
*/
|
|
238
|
+
/** Central update function — synchronizes everything via TyComponent's property system. */
|
|
301
239
|
private updateComponentValue;
|
|
302
240
|
/**
|
|
303
241
|
* Build rich item info for values, read off the matching option elements
|
|
304
242
|
*/
|
|
305
243
|
private getSelectedItems;
|
|
306
|
-
/**
|
|
307
|
-
* Calculate and set dropdown position with smart direction detection
|
|
308
|
-
*/
|
|
309
244
|
private calculatePosition;
|
|
310
245
|
private _setupOptionsScrollbar;
|
|
311
246
|
private _destroyOptionsScrollbar;
|
|
@@ -319,19 +254,9 @@ export declare class TySelect extends TyComponent<SelectState> {
|
|
|
319
254
|
* implement.
|
|
320
255
|
*/
|
|
321
256
|
private openDropdown;
|
|
322
|
-
/**
|
|
323
|
-
* Close dropdown dialog (desktop mode)
|
|
324
|
-
*/
|
|
325
257
|
private closeDropdown;
|
|
326
|
-
/**
|
|
327
|
-
* Open mobile modal (mobile mode)
|
|
328
|
-
* Now using <dialog> element for native z-index management
|
|
329
|
-
*/
|
|
258
|
+
/** Open mobile modal — <dialog> handles z-index natively. */
|
|
330
259
|
private openMobileModal;
|
|
331
|
-
/**
|
|
332
|
-
* Close mobile modal (mobile mode)
|
|
333
|
-
* Now using <dialog> element for native management
|
|
334
|
-
*/
|
|
335
260
|
private closeMobileModal;
|
|
336
261
|
private handleStubClick;
|
|
337
262
|
/**
|
|
@@ -374,34 +299,13 @@ export declare class TySelect extends TyComponent<SelectState> {
|
|
|
374
299
|
private blockSearchClick;
|
|
375
300
|
private handleSearchInput;
|
|
376
301
|
private handleKeyboard;
|
|
377
|
-
/**
|
|
378
|
-
* Filter tags based on search query
|
|
379
|
-
*/
|
|
380
302
|
private filterTags;
|
|
381
|
-
/**
|
|
382
|
-
* Update visibility of tags based on filtered list
|
|
383
|
-
*/
|
|
384
303
|
private updateTagVisibility;
|
|
385
|
-
/**
|
|
386
|
-
* Show/hide the dropdown options area
|
|
387
|
-
*/
|
|
388
304
|
private updateOptionsVisibility;
|
|
389
|
-
/**
|
|
390
|
-
* Clear all tag highlights
|
|
391
|
-
*/
|
|
392
305
|
private clearHighlights;
|
|
393
|
-
/**
|
|
394
|
-
* Highlight tag at specific index
|
|
395
|
-
*/
|
|
396
306
|
private highlightTag;
|
|
397
|
-
/**
|
|
398
|
-
* Dispatch search event for external search handling
|
|
399
|
-
* With optional debounce support
|
|
400
|
-
*/
|
|
307
|
+
/** Dispatch the search event for external search handling, with optional debounce. */
|
|
401
308
|
private dispatchSearchEvent;
|
|
402
|
-
/**
|
|
403
|
-
* Fire the actual search event
|
|
404
|
-
*/
|
|
405
309
|
private fireSearchEvent;
|
|
406
310
|
/**
|
|
407
311
|
* Dispatch lifecycle events for popup open/close.
|
|
@@ -410,14 +314,7 @@ export declare class TySelect extends TyComponent<SelectState> {
|
|
|
410
314
|
*/
|
|
411
315
|
private fireOpenEvent;
|
|
412
316
|
private fireCloseEvent;
|
|
413
|
-
/**
|
|
414
|
-
* Dispatch custom change event
|
|
415
|
-
*/
|
|
416
317
|
private dispatchChangeEvent;
|
|
417
|
-
/**
|
|
418
|
-
* Main render method (required by TyComponent)
|
|
419
|
-
* Delegates to mode-specific renderer
|
|
420
|
-
*/
|
|
421
318
|
protected render(): void;
|
|
422
319
|
/**
|
|
423
320
|
* Reflect constraint validation to the owning <form> via ElementInternals.
|
|
@@ -432,45 +329,16 @@ export declare class TySelect extends TyComponent<SelectState> {
|
|
|
432
329
|
* default field chrome so the trigger is styled entirely by the consumer.
|
|
433
330
|
*/
|
|
434
331
|
private setupTriggerSlot;
|
|
435
|
-
/**
|
|
436
|
-
* Setup event listeners
|
|
437
|
-
*/
|
|
438
332
|
private setupEventListeners;
|
|
439
|
-
/**
|
|
440
|
-
* Build CSS class list for stub
|
|
441
|
-
*/
|
|
442
333
|
private buildStubClasses;
|
|
443
|
-
/**
|
|
444
|
-
* Render desktop mode with dialog
|
|
445
|
-
*/
|
|
446
334
|
private renderDesktop;
|
|
447
|
-
/**
|
|
448
|
-
* Render mobile mode with full-screen modal
|
|
449
|
-
* Following dropdown.ts mobile structure
|
|
450
|
-
*/
|
|
451
335
|
private renderMobile;
|
|
452
|
-
/**
|
|
453
|
-
* Setup event listeners for mobile mode
|
|
454
|
-
* Using <dialog> element - backdrop clicks handled natively
|
|
455
|
-
*/
|
|
456
336
|
private setupMobileEventListeners;
|
|
457
|
-
/**
|
|
458
|
-
* Handle mobile stub click - open modal
|
|
459
|
-
*/
|
|
460
337
|
private handleMobileStubClick;
|
|
461
338
|
/** Keyboard-open the (closed) mobile stub — see handleStubKeydown for why this is needed. */
|
|
462
339
|
private handleMobileStubKeydown;
|
|
463
|
-
/**
|
|
464
|
-
* Handle mobile tag click - select and potentially close
|
|
465
|
-
*/
|
|
466
340
|
private handleMobileTagClick;
|
|
467
|
-
/**
|
|
468
|
-
* Update mobile options section state (count, empty state)
|
|
469
|
-
*/
|
|
470
341
|
private updateMobileSelectedState;
|
|
471
|
-
/**
|
|
472
|
-
* Update selection display: count badge next to the placeholder
|
|
473
|
-
*/
|
|
474
342
|
/**
|
|
475
343
|
* Should the popup show a search row? external-search always (the input is
|
|
476
344
|
* the mechanism); searchable always/never wins otherwise; 'auto' shows it
|
|
@@ -540,11 +408,12 @@ export declare class TySelect extends TyComponent<SelectState> {
|
|
|
540
408
|
set debounce(value: number | string);
|
|
541
409
|
get size(): Size;
|
|
542
410
|
set size(value: Size);
|
|
543
|
-
get align(): "start" | "end";
|
|
544
|
-
set align(value: "start" | "end");
|
|
411
|
+
get align(): "start" | "center" | "end";
|
|
412
|
+
set align(value: "start" | "center" | "end");
|
|
413
|
+
get placement(): Placement | "";
|
|
414
|
+
set placement(value: Placement | "");
|
|
545
415
|
get flavor(): Flavor;
|
|
546
416
|
set flavor(value: Flavor);
|
|
547
417
|
get form(): HTMLFormElement | null;
|
|
548
418
|
}
|
|
549
419
|
export {};
|
|
550
|
-
//# sourceMappingURL=select.d.ts.map
|