seblify 0.2.1 → 0.4.0

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.
Files changed (141) hide show
  1. package/README.md +145 -49
  2. package/dist/components/AppShell.svelte +1 -1
  3. package/dist/components/Banner.svelte +3 -3
  4. package/dist/components/Button.svelte +4 -4
  5. package/dist/components/action/button/button/Button.svelte +1041 -0
  6. package/dist/components/action/button/button/Button.svelte.d.ts +28 -0
  7. package/dist/components/action/button/button-group/ButtonGroup.svelte +146 -0
  8. package/dist/components/action/button/button-group/ButtonGroup.svelte.d.ts +14 -0
  9. package/dist/components/action/button/floating-action-button/FloatingActionButton.svelte +1102 -0
  10. package/dist/components/action/button/floating-action-button/FloatingActionButton.svelte.d.ts +26 -0
  11. package/dist/components/action/button/icon-button/IconButton.svelte +954 -0
  12. package/dist/components/action/button/icon-button/IconButton.svelte.d.ts +22 -0
  13. package/dist/components/action/button/timed-button/TimedButton.svelte +1143 -0
  14. package/dist/components/action/button/timed-button/TimedButton.svelte.d.ts +32 -0
  15. package/dist/components/action/button/toggle-button/ToggleButton.svelte +1109 -0
  16. package/dist/components/action/button/toggle-button/ToggleButton.svelte.d.ts +28 -0
  17. package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.svelte +242 -0
  18. package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.svelte.d.ts +19 -0
  19. package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.test.svelte +36 -0
  20. package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.test.svelte.d.ts +11 -0
  21. package/dist/components/action/button/toggle-button-group/context.d.ts +8 -0
  22. package/dist/components/action/button/toggle-button-group/context.js +8 -0
  23. package/dist/components/action/input/field/pin-input/PinInput.svelte +4 -4
  24. package/dist/components/action/input/select/checkbox/Checkbox.svelte +4704 -25
  25. package/dist/components/action/input/select/checkbox/Checkbox.svelte.d.ts +28 -0
  26. package/dist/components/action/input/select/checkbox/checkbox-relations.svelte.d.ts +46 -0
  27. package/dist/components/action/input/select/checkbox/checkbox-relations.svelte.js +202 -0
  28. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.d.ts +1 -0
  29. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.html +27 -0
  30. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.js +13 -0
  31. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.d.ts +1 -0
  32. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.html +12 -0
  33. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.js +13 -0
  34. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.d.ts +1 -0
  35. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.html +12 -0
  36. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.js +12 -0
  37. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.d.ts +1 -0
  38. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.html +12 -0
  39. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.js +12 -0
  40. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.d.ts +1 -0
  41. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.html +12 -0
  42. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.js +13 -0
  43. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.d.ts +1 -0
  44. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.html +27 -0
  45. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.js +13 -0
  46. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.d.ts +1 -0
  47. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.html +27 -0
  48. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.js +13 -0
  49. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.d.ts +1 -0
  50. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.html +12 -0
  51. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.js +278 -0
  52. package/dist/components/action/input/select/{theme-switch/ThemeSwitch.svelte → color-mode-switch/ColorModeSwitch.svelte} +8 -8
  53. package/dist/components/action/input/select/color-mode-switch/ColorModeSwitch.svelte.d.ts +10 -0
  54. package/dist/components/action/input/select/segment-control/SegmentControl.svelte +2 -2
  55. package/dist/components/action/input/select/slider/Slider.svelte +1 -1
  56. package/dist/components/action/input/select/switch/Switch.svelte +1004 -99
  57. package/dist/components/action/input/select/switch/Switch.svelte.d.ts +8 -3
  58. package/dist/components/display/annotation/badge/Badge.svelte +732 -63
  59. package/dist/components/display/annotation/badge/Badge.svelte.d.ts +1 -1
  60. package/dist/components/display/annotation/tag/Tag.svelte +670 -58
  61. package/dist/components/display/annotation/tag/Tag.svelte.d.ts +3 -1
  62. package/dist/components/display/data-display/metric/date-time/DateTimeValue.svelte +59 -0
  63. package/dist/components/display/data-display/metric/date-time/DateTimeValue.svelte.d.ts +13 -0
  64. package/dist/components/display/data-display/metric/date-time/DateValue.svelte +52 -0
  65. package/dist/components/display/data-display/metric/date-time/DateValue.svelte.d.ts +11 -0
  66. package/dist/components/display/data-display/metric/date-time/TimeValue.svelte +55 -0
  67. package/dist/components/display/data-display/metric/date-time/TimeValue.svelte.d.ts +12 -0
  68. package/dist/components/display/data-display/metric/duration/Duration.svelte +64 -0
  69. package/dist/components/display/data-display/metric/duration/Duration.svelte.d.ts +16 -0
  70. package/dist/components/display/data-display/metric/relative-time/RelativeTime.svelte +121 -0
  71. package/dist/components/display/data-display/metric/relative-time/RelativeTime.svelte.d.ts +21 -0
  72. package/dist/components/display/data-display/metric/timestamp-card/TimestampCard.svelte +121 -0
  73. package/dist/components/display/data-display/metric/timestamp-card/TimestampCard.svelte.d.ts +25 -0
  74. package/dist/components/display/data-display/visual/timeline/TimelineItem.svelte +660 -51
  75. package/dist/components/display/data-display/visual/timeline/context.d.ts +1 -1
  76. package/dist/components/display/feedback/loading/loading-dots/LoadingDots.svelte +657 -48
  77. package/dist/components/display/feedback/loading/loading-dots/LoadingDots.svelte.d.ts +1 -1
  78. package/dist/components/display/feedback/loading/spinner/Spinner.svelte +657 -48
  79. package/dist/components/display/feedback/loading/spinner/Spinner.svelte.d.ts +1 -1
  80. package/dist/components/display/motion/collapse/Collapse.svelte +115 -0
  81. package/dist/components/display/motion/collapse/Collapse.svelte.d.ts +17 -0
  82. package/dist/components/display/typography/accordion/Accordion.svelte +347 -0
  83. package/dist/components/display/typography/accordion/Accordion.svelte.d.ts +13 -0
  84. package/dist/components/display/typography/accordion/AccordionGroup.svelte +132 -0
  85. package/dist/components/display/typography/accordion/AccordionGroup.svelte.d.ts +11 -0
  86. package/dist/components/display/typography/accordion/context.d.ts +8 -0
  87. package/dist/components/display/typography/accordion/context.js +8 -0
  88. package/dist/components/display/typography/code-snippet/CodeSnippet.svelte +3 -3
  89. package/dist/components/display/typography/eyebrow/Eyebrow.svelte +2 -2
  90. package/dist/components/display/typography/highlight/Highlight.svelte +719 -59
  91. package/dist/components/display/typography/highlight/Highlight.svelte.d.ts +1 -1
  92. package/dist/components/framework/layout/container/app-shell/AppShell.svelte +16 -2
  93. package/dist/components/framework/navigation/context/breadcrumb/Breadcrumb.svelte +1 -1
  94. package/dist/components/framework/navigation/sidebar/sidebar/Sidebar.svelte +35 -10
  95. package/dist/components/framework/navigation/sidebar/sidenav/Sidenav.svelte +5 -5
  96. package/dist/components/framework/overlay/tooltip/Tooltip.svelte +1011 -0
  97. package/dist/components/framework/overlay/tooltip/Tooltip.svelte.d.ts +31 -0
  98. package/dist/components/framework/surface/paper/Paper.svelte +730 -87
  99. package/dist/components/framework/surface/paper/Paper.svelte.d.ts +1 -1
  100. package/dist/components/utility/format/date-time/formatDateTime.d.ts +23 -0
  101. package/dist/components/utility/format/date-time/formatDateTime.js +33 -0
  102. package/dist/components/utility/format/duration/formatDuration.d.ts +15 -0
  103. package/dist/components/utility/format/duration/formatDuration.js +218 -0
  104. package/dist/components/utility/format/relative-time/formatRelativeTime.d.ts +42 -0
  105. package/dist/components/utility/format/relative-time/formatRelativeTime.js +530 -0
  106. package/dist/design-system/inheritance/tokens.js +6 -0
  107. package/dist/design-system/reserved-props/allowed-options.d.ts +9 -4
  108. package/dist/design-system/theme/tokens.d.ts +72 -2
  109. package/dist/design-system/theme/tokens.js +173 -134
  110. package/dist/icons/generated/check-thick.svelte +16 -0
  111. package/dist/icons/generated/check-thick.svelte.d.ts +7 -0
  112. package/dist/icons/generated/check.svelte +16 -0
  113. package/dist/icons/generated/check.svelte.d.ts +7 -0
  114. package/dist/icons/generated/close-thick.svelte +16 -0
  115. package/dist/icons/generated/close-thick.svelte.d.ts +7 -0
  116. package/dist/icons/generated/close.svelte +16 -0
  117. package/dist/icons/generated/close.svelte.d.ts +7 -0
  118. package/dist/icons/generated/index.d.ts +4 -0
  119. package/dist/icons/generated/index.js +4 -0
  120. package/dist/icons/generated/manifest.js +28 -0
  121. package/dist/index.d.ts +22 -2
  122. package/dist/index.js +22 -2
  123. package/dist/styles/tone-context.css +656 -46
  124. package/dist/theme.css +1 -161
  125. package/dist/themes/canopy.css +373 -0
  126. package/dist/themes/cobalt.css +373 -0
  127. package/dist/themes/iris.css +373 -0
  128. package/dist/themes/lumen.css +373 -0
  129. package/dist/themes/mono.css +373 -0
  130. package/dist/themes/moss.css +373 -0
  131. package/dist/themes/noir.css +373 -0
  132. package/dist/themes/plain.css +373 -0
  133. package/dist/themes/pulse.css +373 -0
  134. package/dist/themes/signal.css +373 -0
  135. package/dist/themes/slate.css +373 -0
  136. package/dist/themes/solar.css +373 -0
  137. package/dist/themes/sorbet.css +373 -0
  138. package/dist/themes/studio.css +369 -0
  139. package/dist/themes/vesper.css +373 -0
  140. package/package.json +32 -4
  141. package/dist/components/action/input/select/theme-switch/ThemeSwitch.svelte.d.ts +0 -10
@@ -0,0 +1,1011 @@
1
+ <script module lang="ts">
2
+ type TooltipRegistryItem = {
3
+ dismiss: () => void;
4
+ };
5
+
6
+ const uncontrolledTooltips = new Set<TooltipRegistryItem>();
7
+
8
+ function dismissOtherUncontrolledTooltips(activeItem: TooltipRegistryItem) {
9
+ for (const item of uncontrolledTooltips) {
10
+ if (item !== activeItem) {
11
+ item.dismiss();
12
+ }
13
+ }
14
+ }
15
+ </script>
16
+
17
+ <script lang="ts">
18
+ import type { CustomCssSize, SeblifyProps } from 'seblify';
19
+ import { onDestroy, onMount, tick } from 'svelte';
20
+ import type { Snippet } from 'svelte';
21
+
22
+ type TooltipAlignment = 'start' | 'center' | 'end' | 'top' | 'bottom';
23
+ type TooltipPlacement =
24
+ | 'top-start'
25
+ | 'top'
26
+ | 'top-end'
27
+ | 'end-top'
28
+ | 'end'
29
+ | 'end-bottom'
30
+ | 'bottom-start'
31
+ | 'bottom'
32
+ | 'bottom-end'
33
+ | 'start-top'
34
+ | 'start'
35
+ | 'start-bottom';
36
+ type TooltipSide = 'top' | 'end' | 'bottom' | 'start';
37
+ type TooltipTone =
38
+ | 'neutral'
39
+ | 'strong'
40
+ | 'primary'
41
+ | 'secondary'
42
+ | 'success'
43
+ | 'danger'
44
+ | 'warning'
45
+ | 'info';
46
+ type TooltipInteractionSource = 'pointer' | 'focus';
47
+ type TooltipInteractionEvent = {
48
+ trigger: TooltipInteractionSource;
49
+ originalEvent: Event;
50
+ };
51
+ type TooltipAnimation =
52
+ | 'fade'
53
+ | 'rise'
54
+ | 'settle'
55
+ | 'pop'
56
+ | 'scale'
57
+ | 'bounce'
58
+ | 'none';
59
+ const TOOLTIP_HIDE_DELAY = 120;
60
+
61
+ type Props = SeblifyProps<{
62
+ [key: string]: unknown;
63
+ animation?: TooltipAnimation;
64
+ children?: Snippet;
65
+ class?: string;
66
+ content?: string;
67
+ defaultVisible?: boolean;
68
+ gap?: number | CustomCssSize;
69
+ offset?: number | CustomCssSize;
70
+ onTooltipEnter?: (event: TooltipInteractionEvent) => void;
71
+ onTooltipLeave?: (event: TooltipInteractionEvent) => void;
72
+ onTriggerEnter?: (event: TooltipInteractionEvent) => void;
73
+ onTriggerLeave?: (event: TooltipInteractionEvent) => void;
74
+ onVisibleChange?: (visible: boolean) => void;
75
+ placement?: TooltipPlacement;
76
+ showArrow?: boolean;
77
+ tone?: TooltipTone;
78
+ tooltip?: Snippet;
79
+ visible?: boolean;
80
+ }>;
81
+
82
+ let {
83
+ animation = 'fade',
84
+ children,
85
+ class: className,
86
+ content,
87
+ defaultVisible = false,
88
+ gap,
89
+ offset,
90
+ onTooltipEnter,
91
+ onTooltipLeave,
92
+ onTriggerEnter,
93
+ onTriggerLeave,
94
+ onVisibleChange,
95
+ placement = 'top',
96
+ showArrow = true,
97
+ tone = 'strong',
98
+ tooltip,
99
+ visible,
100
+ ...restProps
101
+ }: Props = $props();
102
+
103
+ function initialVisible(): boolean {
104
+ return defaultVisible;
105
+ }
106
+
107
+ let anchorElement = $state<HTMLSpanElement>();
108
+ let bubbleElement = $state<HTMLSpanElement>();
109
+ let internalVisible = $state(initialVisible());
110
+ let tooltipX = $state(0);
111
+ let tooltipY = $state(0);
112
+ let arrowX = $state(0);
113
+ let arrowY = $state(0);
114
+ let tooltipDirection = $state<'ltr' | 'rtl'>('ltr');
115
+ let instantHide = $state(false);
116
+ let hideTimer: ReturnType<typeof window.setTimeout> | undefined;
117
+ let instantHideFrame = 0;
118
+ let triggerHasPointer = false;
119
+ let triggerHasFocus = false;
120
+ let tooltipHasPointer = false;
121
+ let tooltipHasFocus = false;
122
+
123
+ const tooltipId = $props.id();
124
+ const configuredGap = $derived(gap ?? offset ?? 8);
125
+ const gapValue = $derived(cssLength(configuredGap));
126
+ const placementSide = $derived(getPlacementSide(placement));
127
+ const hasTooltip = $derived(
128
+ tooltip !== undefined || (content ?? '').trim().length > 0,
129
+ );
130
+ const isControlled = $derived(visible !== undefined);
131
+ const tooltipVisible = $derived(visible ?? internalVisible);
132
+
133
+ function cssLength(value: number | CustomCssSize): string {
134
+ return typeof value === 'number' ? `${Math.max(0, value)}px` : value;
135
+ }
136
+
137
+ function getPlacementSide(value: TooltipPlacement): TooltipSide {
138
+ if (value.startsWith('top')) {
139
+ return 'top';
140
+ }
141
+
142
+ if (value.startsWith('bottom')) {
143
+ return 'bottom';
144
+ }
145
+
146
+ if (value.startsWith('end')) {
147
+ return 'end';
148
+ }
149
+
150
+ return 'start';
151
+ }
152
+
153
+ function getPlacementAlignment(value: TooltipPlacement): TooltipAlignment {
154
+ if (value.endsWith('-start')) {
155
+ return 'start';
156
+ }
157
+
158
+ if (value.endsWith('-end')) {
159
+ return 'end';
160
+ }
161
+
162
+ if (value.endsWith('-top')) {
163
+ return 'top';
164
+ }
165
+
166
+ if (value.endsWith('-bottom')) {
167
+ return 'bottom';
168
+ }
169
+
170
+ return 'center';
171
+ }
172
+
173
+ function numericGap(): number {
174
+ if (typeof configuredGap === 'number') {
175
+ return Math.max(0, configuredGap);
176
+ }
177
+
178
+ if (!anchorElement) {
179
+ return 0;
180
+ }
181
+
182
+ return numericCssLength(configuredGap, anchorElement);
183
+ }
184
+
185
+ function numericCssLength(value: string, container: HTMLElement): number {
186
+ const probe = document.createElement('div');
187
+
188
+ probe.style.position = 'absolute';
189
+ probe.style.visibility = 'hidden';
190
+ probe.style.width = value;
191
+ container.append(probe);
192
+
193
+ const measuredLength = probe.getBoundingClientRect().width;
194
+
195
+ probe.remove();
196
+
197
+ return Math.max(0, measuredLength);
198
+ }
199
+
200
+ function numericArrowSize(): number {
201
+ if (!showArrow || !bubbleElement) {
202
+ return 0;
203
+ }
204
+
205
+ return numericCssLength('var(--tooltip-arrow-size)', bubbleElement);
206
+ }
207
+
208
+ function clamp(value: number, minimum: number, maximum: number): number {
209
+ return Math.min(Math.max(value, minimum), maximum);
210
+ }
211
+
212
+ function applyTooltipPosition(
213
+ nextTooltipX: number,
214
+ nextTooltipY: number,
215
+ nextArrowX: number,
216
+ nextArrowY: number,
217
+ ): void {
218
+ tooltipX = nextTooltipX;
219
+ tooltipY = nextTooltipY;
220
+ arrowX = nextArrowX;
221
+ arrowY = nextArrowY;
222
+
223
+ if (!bubbleElement) {
224
+ return;
225
+ }
226
+
227
+ bubbleElement.style.setProperty('--tooltip-x', `${nextTooltipX}px`);
228
+ bubbleElement.style.setProperty('--tooltip-y', `${nextTooltipY}px`);
229
+ bubbleElement.style.setProperty('--tooltip-arrow-x', `${nextArrowX}px`);
230
+ bubbleElement.style.setProperty('--tooltip-arrow-y', `${nextArrowY}px`);
231
+ }
232
+
233
+ function updateTooltipPosition(): void {
234
+ if (!anchorElement || !bubbleElement) {
235
+ return;
236
+ }
237
+
238
+ const anchorRect = anchorElement.getBoundingClientRect();
239
+ const bubbleWidth = bubbleElement.offsetWidth;
240
+ const bubbleHeight = bubbleElement.offsetHeight;
241
+ const side = getPlacementSide(placement);
242
+ const alignment = getPlacementAlignment(placement);
243
+ const distance = numericGap() + numericArrowSize();
244
+ const isRtl = getComputedStyle(anchorElement).direction === 'rtl';
245
+
246
+ tooltipDirection = isRtl ? 'rtl' : 'ltr';
247
+
248
+ let x = anchorRect.left + anchorRect.width / 2 - bubbleWidth / 2;
249
+ let y = anchorRect.top + anchorRect.height / 2 - bubbleHeight / 2;
250
+
251
+ if (side === 'top') {
252
+ y = anchorRect.top - distance - bubbleHeight;
253
+ } else if (side === 'bottom') {
254
+ y = anchorRect.bottom + distance;
255
+ } else if (side === 'start') {
256
+ x = isRtl
257
+ ? anchorRect.right + distance
258
+ : anchorRect.left - distance - bubbleWidth;
259
+ } else {
260
+ x = isRtl
261
+ ? anchorRect.left - distance - bubbleWidth
262
+ : anchorRect.right + distance;
263
+ }
264
+
265
+ if (side === 'top' || side === 'bottom') {
266
+ if (alignment === 'start') {
267
+ x = isRtl ? anchorRect.right - bubbleWidth : anchorRect.left;
268
+ } else if (alignment === 'end') {
269
+ x = isRtl ? anchorRect.left : anchorRect.right - bubbleWidth;
270
+ }
271
+ } else if (alignment === 'top') {
272
+ y = anchorRect.top;
273
+ } else if (alignment === 'bottom') {
274
+ y = anchorRect.bottom - bubbleHeight;
275
+ }
276
+
277
+ applyTooltipPosition(
278
+ Math.round(x),
279
+ Math.round(y),
280
+ Math.round(
281
+ clamp(
282
+ anchorRect.left + anchorRect.width / 2 - x,
283
+ 10,
284
+ bubbleWidth - 10,
285
+ ),
286
+ ),
287
+ Math.round(
288
+ clamp(
289
+ anchorRect.top + anchorRect.height / 2 - y,
290
+ 10,
291
+ bubbleHeight - 10,
292
+ ),
293
+ ),
294
+ );
295
+ }
296
+
297
+ function createPositionObserver(
298
+ callback: () => void,
299
+ ): ResizeObserver | undefined {
300
+ if (typeof ResizeObserver === 'undefined') {
301
+ return undefined;
302
+ }
303
+
304
+ const observer = new ResizeObserver(callback);
305
+
306
+ if (anchorElement) {
307
+ observer.observe(anchorElement);
308
+ }
309
+
310
+ if (bubbleElement) {
311
+ observer.observe(bubbleElement);
312
+ }
313
+
314
+ observer.observe(document.documentElement);
315
+
316
+ return observer;
317
+ }
318
+
319
+ function whenFontsReady(callback: () => void): void {
320
+ void document.fonts?.ready.then(callback);
321
+ }
322
+
323
+ function setInternalVisible(nextVisible: boolean): void {
324
+ if (isControlled || internalVisible === nextVisible) {
325
+ return;
326
+ }
327
+
328
+ internalVisible = nextVisible;
329
+ onVisibleChange?.(nextVisible);
330
+ }
331
+
332
+ function hideImmediately(): void {
333
+ if (isControlled || !internalVisible) {
334
+ return;
335
+ }
336
+
337
+ clearScheduledHide();
338
+ instantHide = true;
339
+ setInternalVisible(false);
340
+
341
+ cancelAnimationFrame(instantHideFrame);
342
+ instantHideFrame = requestAnimationFrame(() => {
343
+ instantHide = false;
344
+ });
345
+ }
346
+
347
+ const registryItem: TooltipRegistryItem = {
348
+ dismiss: hideImmediately,
349
+ };
350
+
351
+ function clearScheduledHide(): void {
352
+ if (hideTimer === undefined) {
353
+ return;
354
+ }
355
+
356
+ window.clearTimeout(hideTimer);
357
+ hideTimer = undefined;
358
+ }
359
+
360
+ function hasActiveInteraction(): boolean {
361
+ return (
362
+ triggerHasPointer ||
363
+ triggerHasFocus ||
364
+ tooltipHasPointer ||
365
+ tooltipHasFocus
366
+ );
367
+ }
368
+
369
+ function showTooltip(): void {
370
+ clearScheduledHide();
371
+
372
+ if (!isControlled) {
373
+ dismissOtherUncontrolledTooltips(registryItem);
374
+ }
375
+
376
+ setInternalVisible(true);
377
+ }
378
+
379
+ function scheduleHide(): void {
380
+ clearScheduledHide();
381
+
382
+ if (isControlled || hasActiveInteraction()) {
383
+ return;
384
+ }
385
+
386
+ hideTimer = window.setTimeout(() => {
387
+ hideTimer = undefined;
388
+
389
+ if (!hasActiveInteraction()) {
390
+ setInternalVisible(false);
391
+ }
392
+ }, TOOLTIP_HIDE_DELAY);
393
+ }
394
+
395
+ function markInteraction(
396
+ area: 'trigger' | 'tooltip',
397
+ trigger: TooltipInteractionSource,
398
+ active: boolean,
399
+ ): void {
400
+ if (area === 'trigger' && trigger === 'pointer') {
401
+ triggerHasPointer = active;
402
+ } else if (area === 'trigger') {
403
+ triggerHasFocus = active;
404
+ } else if (trigger === 'pointer') {
405
+ tooltipHasPointer = active;
406
+ } else {
407
+ tooltipHasFocus = active;
408
+ }
409
+ }
410
+
411
+ function handleTriggerEnter(
412
+ trigger: TooltipInteractionSource,
413
+ originalEvent: Event,
414
+ ): void {
415
+ markInteraction('trigger', trigger, true);
416
+ onTriggerEnter?.({ trigger, originalEvent });
417
+ showTooltip();
418
+ }
419
+
420
+ function handleTriggerLeave(
421
+ trigger: TooltipInteractionSource,
422
+ originalEvent: Event,
423
+ ): void {
424
+ markInteraction('trigger', trigger, false);
425
+ onTriggerLeave?.({ trigger, originalEvent });
426
+ scheduleHide();
427
+ }
428
+
429
+ function handleTooltipEnter(
430
+ trigger: TooltipInteractionSource,
431
+ originalEvent: Event,
432
+ ): void {
433
+ markInteraction('tooltip', trigger, true);
434
+ onTooltipEnter?.({ trigger, originalEvent });
435
+ showTooltip();
436
+ }
437
+
438
+ function handleTooltipLeave(
439
+ trigger: TooltipInteractionSource,
440
+ originalEvent: Event,
441
+ ): void {
442
+ markInteraction('tooltip', trigger, false);
443
+ onTooltipLeave?.({ trigger, originalEvent });
444
+ scheduleHide();
445
+ }
446
+
447
+ onMount(() => {
448
+ uncontrolledTooltips.add(registryItem);
449
+
450
+ return () => {
451
+ uncontrolledTooltips.delete(registryItem);
452
+ };
453
+ });
454
+
455
+ onDestroy(() => {
456
+ clearScheduledHide();
457
+ cancelAnimationFrame(instantHideFrame);
458
+ });
459
+
460
+ $effect(() => {
461
+ if (!bubbleElement) {
462
+ return;
463
+ }
464
+
465
+ document.body.append(bubbleElement);
466
+
467
+ return () => {
468
+ bubbleElement?.remove();
469
+ };
470
+ });
471
+
472
+ $effect(() => {
473
+ if (
474
+ !tooltipVisible ||
475
+ !hasTooltip ||
476
+ !anchorElement ||
477
+ !bubbleElement
478
+ ) {
479
+ return;
480
+ }
481
+
482
+ const placementUpdateKey = `${placement}:${showArrow}:${gapValue}:${content ?? ''}:${tooltip === undefined}`;
483
+ const scrollListenerOptions = {
484
+ capture: true,
485
+ passive: true,
486
+ };
487
+ let scheduledFrame = 0;
488
+ let settlingFrame = 0;
489
+ let cancelled = false;
490
+
491
+ // Keep positioning reactive to geometry-affecting prop changes.
492
+ void placementUpdateKey;
493
+
494
+ function schedulePositionUpdate(): void {
495
+ if (scheduledFrame !== 0) {
496
+ return;
497
+ }
498
+
499
+ scheduledFrame = requestAnimationFrame(() => {
500
+ scheduledFrame = 0;
501
+
502
+ if (!cancelled) {
503
+ updateTooltipPosition();
504
+ }
505
+ });
506
+ }
507
+
508
+ function runSettlingPositionUpdates(remainingFrames: number): void {
509
+ if (cancelled) {
510
+ return;
511
+ }
512
+
513
+ updateTooltipPosition();
514
+
515
+ if (remainingFrames <= 0) {
516
+ return;
517
+ }
518
+
519
+ settlingFrame = requestAnimationFrame(() => {
520
+ runSettlingPositionUpdates(remainingFrames - 1);
521
+ });
522
+ }
523
+
524
+ const positionObserver = createPositionObserver(schedulePositionUpdate);
525
+ const viewport = window.visualViewport;
526
+
527
+ void tick().then(() => {
528
+ if (cancelled) {
529
+ return;
530
+ }
531
+
532
+ runSettlingPositionUpdates(8);
533
+ });
534
+
535
+ whenFontsReady(schedulePositionUpdate);
536
+
537
+ window.addEventListener('load', schedulePositionUpdate);
538
+ window.addEventListener('resize', schedulePositionUpdate);
539
+ window.addEventListener('scroll', updateTooltipPosition, scrollListenerOptions);
540
+ viewport?.addEventListener('resize', schedulePositionUpdate);
541
+ viewport?.addEventListener('scroll', updateTooltipPosition);
542
+
543
+ return () => {
544
+ cancelled = true;
545
+ cancelAnimationFrame(scheduledFrame);
546
+ cancelAnimationFrame(settlingFrame);
547
+ positionObserver?.disconnect();
548
+ window.removeEventListener('load', schedulePositionUpdate);
549
+ window.removeEventListener('resize', schedulePositionUpdate);
550
+ window.removeEventListener(
551
+ 'scroll',
552
+ updateTooltipPosition,
553
+ scrollListenerOptions,
554
+ );
555
+ viewport?.removeEventListener('resize', schedulePositionUpdate);
556
+ viewport?.removeEventListener('scroll', updateTooltipPosition);
557
+ };
558
+ });
559
+ </script>
560
+
561
+ <span
562
+ {...restProps}
563
+ aria-describedby={hasTooltip ? tooltipId : undefined}
564
+ bind:this={anchorElement}
565
+ class={`tooltip${className ? ` ${className}` : ''}`}
566
+ data-placement={placement}
567
+ data-seblify-tone={tone}
568
+ data-side={placementSide}
569
+ data-state={tooltipVisible ? 'visible' : 'hidden'}
570
+ onfocusin={(event) => {
571
+ handleTriggerEnter('focus', event);
572
+ }}
573
+ onfocusout={(event) => {
574
+ handleTriggerLeave('focus', event);
575
+ }}
576
+ onmouseenter={(event) => {
577
+ handleTriggerEnter('pointer', event);
578
+ }}
579
+ onmouseleave={(event) => {
580
+ handleTriggerLeave('pointer', event);
581
+ }}
582
+ style:--tooltip-gap={gapValue}
583
+ style:--tooltip-offset={gapValue}
584
+ >
585
+ {@render children?.()}
586
+
587
+ {#if hasTooltip}
588
+ <span
589
+ aria-hidden={!tooltipVisible}
590
+ bind:this={bubbleElement}
591
+ class="tooltip__bubble seblify-tone-context"
592
+ data-animation={animation}
593
+ data-arrow={showArrow ? 'visible' : 'hidden'}
594
+ data-instant-hide={instantHide}
595
+ data-placement={placement}
596
+ data-seblify-tone={tone}
597
+ data-side={placementSide}
598
+ data-state={tooltipVisible ? 'visible' : 'hidden'}
599
+ dir={tooltipDirection}
600
+ id={tooltipId}
601
+ onfocusin={(event) => {
602
+ handleTooltipEnter('focus', event);
603
+ }}
604
+ onfocusout={(event) => {
605
+ handleTooltipLeave('focus', event);
606
+ }}
607
+ onmouseenter={(event) => {
608
+ handleTooltipEnter('pointer', event);
609
+ }}
610
+ onmouseleave={(event) => {
611
+ handleTooltipLeave('pointer', event);
612
+ }}
613
+ role="tooltip"
614
+ style:--tooltip-arrow-x={`${arrowX}px`}
615
+ style:--tooltip-arrow-y={`${arrowY}px`}
616
+ style:--tooltip-x={`${tooltipX}px`}
617
+ style:--tooltip-y={`${tooltipY}px`}
618
+ >
619
+ {#if tooltip}
620
+ {@render tooltip()}
621
+ {:else}
622
+ {content}
623
+ {/if}
624
+ {#if showArrow}
625
+ <span class="tooltip__arrow" aria-hidden="true"></span>
626
+ {/if}
627
+ </span>
628
+ {/if}
629
+ </span>
630
+
631
+ <style>
632
+ .tooltip {
633
+ position: relative;
634
+ display: inline-flex;
635
+ width: fit-content;
636
+ max-width: 100%;
637
+ }
638
+
639
+ .tooltip__bubble {
640
+ --tooltip-background: var(--seblify-tone-fill, #172033);
641
+ --tooltip-color: var(--seblify-tone-fill-text, #ffffff);
642
+ --tooltip-shadow: var(
643
+ --seblify-shadow-raised,
644
+ 0 12px 28px rgb(23 32 51 / 22%)
645
+ );
646
+ --tooltip-arrow-size: 0.5rem;
647
+ --tooltip-arrow-overlap: 1px;
648
+ --tooltip-enter-distance: 0;
649
+ --tooltip-enter-duration: 180ms;
650
+ --tooltip-enter-easing: ease;
651
+ --tooltip-enter-x: 0;
652
+ --tooltip-enter-y: 0;
653
+ --tooltip-bounce-start-x: 0;
654
+ --tooltip-bounce-start-y: 0;
655
+ --tooltip-bounce-overshoot-x: 0;
656
+ --tooltip-bounce-overshoot-y: 0;
657
+ --tooltip-bounce-rebound-x: 0;
658
+ --tooltip-bounce-rebound-y: 0;
659
+ --tooltip-radius: 0.375rem;
660
+ --tooltip-enter-scale: 1;
661
+
662
+ position: fixed;
663
+ left: var(--tooltip-x, 0);
664
+ top: var(--tooltip-y, 0);
665
+ z-index: var(--seblify-z-index-tooltip, 30);
666
+ display: block;
667
+ width: max-content;
668
+ max-width: min(18rem, calc(100vw - 2rem));
669
+ border-radius: var(--tooltip-radius);
670
+ padding: 0.375rem 0.5rem;
671
+ background: var(--tooltip-background);
672
+ box-shadow: var(--tooltip-shadow);
673
+ box-sizing: border-box;
674
+ color: var(--tooltip-color);
675
+ font-size: 0.8125rem;
676
+ font-weight: 600;
677
+ isolation: isolate;
678
+ line-height: 1.35;
679
+ opacity: 0;
680
+ pointer-events: none;
681
+ text-align: start;
682
+ transform: translate(var(--tooltip-enter-x), var(--tooltip-enter-y))
683
+ scale(var(--tooltip-enter-scale));
684
+ transform-origin: center;
685
+ transition:
686
+ opacity var(--tooltip-enter-duration) var(--tooltip-enter-easing),
687
+ transform var(--tooltip-enter-duration) var(--tooltip-enter-easing),
688
+ visibility 120ms ease;
689
+ visibility: hidden;
690
+ white-space: normal;
691
+ }
692
+
693
+ .tooltip__bubble[data-instant-hide='true'] {
694
+ animation-duration: 0ms;
695
+ transition-duration: 0ms;
696
+ }
697
+
698
+ .tooltip__bubble[data-animation='none'] {
699
+ transition-duration: 0ms;
700
+ }
701
+
702
+ .tooltip__bubble[data-animation='rise'] {
703
+ --tooltip-enter-distance: 0.375rem;
704
+ --tooltip-enter-duration: 260ms;
705
+ --tooltip-enter-easing: cubic-bezier(0.16, 1, 0.3, 1);
706
+ }
707
+
708
+ .tooltip__bubble[data-animation='settle'] {
709
+ --tooltip-enter-distance: 1rem;
710
+ --tooltip-enter-duration: 240ms;
711
+ --tooltip-enter-easing: cubic-bezier(0.2, 0.8, 0.2, 1);
712
+ }
713
+
714
+ .tooltip__bubble[data-animation='pop'] {
715
+ --tooltip-enter-duration: 280ms;
716
+ --tooltip-enter-scale: 0.82;
717
+ }
718
+
719
+ .tooltip__bubble[data-animation='scale'] {
720
+ --tooltip-enter-duration: 260ms;
721
+ --tooltip-enter-scale: 0.72;
722
+ }
723
+
724
+ .tooltip__bubble[data-animation='bounce'] {
725
+ --tooltip-bounce-start-distance: 2rem;
726
+ --tooltip-bounce-rebound-distance: 0.1875rem;
727
+ --tooltip-enter-duration: 420ms;
728
+ --tooltip-enter-scale: 0.9;
729
+ }
730
+
731
+ .tooltip__bubble[data-animation='settle'][data-side='bottom'] {
732
+ --tooltip-enter-y: var(--tooltip-enter-distance);
733
+ }
734
+
735
+ .tooltip__bubble[data-animation='settle'][data-side='top'] {
736
+ --tooltip-enter-y: calc(0px - var(--tooltip-enter-distance));
737
+ }
738
+
739
+ .tooltip__bubble[data-animation='settle'][data-side='end'] {
740
+ --tooltip-enter-x: var(--tooltip-enter-distance);
741
+ }
742
+
743
+ .tooltip__bubble[data-animation='settle'][data-side='start'] {
744
+ --tooltip-enter-x: calc(0px - var(--tooltip-enter-distance));
745
+ }
746
+
747
+ .tooltip__bubble:dir(rtl)[data-animation='settle'][data-side='end'] {
748
+ --tooltip-enter-x: calc(0px - var(--tooltip-enter-distance));
749
+ }
750
+
751
+ .tooltip__bubble:dir(rtl)[data-animation='settle'][data-side='start'] {
752
+ --tooltip-enter-x: var(--tooltip-enter-distance);
753
+ }
754
+
755
+ .tooltip__bubble[data-animation='rise'][data-side='bottom'] {
756
+ --tooltip-enter-y: calc(0px - var(--tooltip-enter-distance));
757
+ }
758
+
759
+ .tooltip__bubble[data-animation='rise'][data-side='top'] {
760
+ --tooltip-enter-y: var(--tooltip-enter-distance);
761
+ }
762
+
763
+ .tooltip__bubble[data-animation='rise'][data-side='end'] {
764
+ --tooltip-enter-x: calc(0px - var(--tooltip-enter-distance));
765
+ }
766
+
767
+ .tooltip__bubble[data-animation='rise'][data-side='start'] {
768
+ --tooltip-enter-x: var(--tooltip-enter-distance);
769
+ }
770
+
771
+ .tooltip__bubble:dir(rtl)[data-animation='rise'][data-side='end'] {
772
+ --tooltip-enter-x: var(--tooltip-enter-distance);
773
+ }
774
+
775
+ .tooltip__bubble:dir(rtl)[data-animation='rise'][data-side='start'] {
776
+ --tooltip-enter-x: calc(0px - var(--tooltip-enter-distance));
777
+ }
778
+
779
+ .tooltip__bubble[data-animation='bounce'][data-side='top'] {
780
+ --tooltip-bounce-start-y: calc(
781
+ 0px - var(--tooltip-bounce-start-distance)
782
+ );
783
+ --tooltip-bounce-overshoot-y: 0;
784
+ --tooltip-bounce-rebound-y: calc(
785
+ 0px - var(--tooltip-bounce-rebound-distance)
786
+ );
787
+ }
788
+
789
+ .tooltip__bubble[data-animation='bounce'][data-side='bottom'] {
790
+ --tooltip-bounce-start-y: var(--tooltip-bounce-start-distance);
791
+ --tooltip-bounce-overshoot-y: 0;
792
+ --tooltip-bounce-rebound-y: var(--tooltip-bounce-rebound-distance);
793
+ }
794
+
795
+ .tooltip__bubble[data-animation='bounce'][data-side='start'] {
796
+ --tooltip-bounce-start-x: calc(
797
+ 0px - var(--tooltip-bounce-start-distance)
798
+ );
799
+ --tooltip-bounce-overshoot-x: 0;
800
+ --tooltip-bounce-rebound-x: calc(
801
+ 0px - var(--tooltip-bounce-rebound-distance)
802
+ );
803
+ }
804
+
805
+ .tooltip__bubble[data-animation='bounce'][data-side='end'] {
806
+ --tooltip-bounce-start-x: var(--tooltip-bounce-start-distance);
807
+ --tooltip-bounce-overshoot-x: 0;
808
+ --tooltip-bounce-rebound-x: var(--tooltip-bounce-rebound-distance);
809
+ }
810
+
811
+ .tooltip__bubble:dir(rtl)[data-animation='bounce'][data-side='start'] {
812
+ --tooltip-bounce-start-x: var(--tooltip-bounce-start-distance);
813
+ --tooltip-bounce-overshoot-x: 0;
814
+ --tooltip-bounce-rebound-x: var(--tooltip-bounce-rebound-distance);
815
+ }
816
+
817
+ .tooltip__bubble:dir(rtl)[data-animation='bounce'][data-side='end'] {
818
+ --tooltip-bounce-start-x: calc(
819
+ 0px - var(--tooltip-bounce-start-distance)
820
+ );
821
+ --tooltip-bounce-overshoot-x: 0;
822
+ --tooltip-bounce-rebound-x: calc(
823
+ 0px - var(--tooltip-bounce-rebound-distance)
824
+ );
825
+ }
826
+
827
+ .tooltip__bubble[data-side='top'] {
828
+ transform-origin: center bottom;
829
+ }
830
+
831
+ .tooltip__bubble[data-side='bottom'] {
832
+ transform-origin: center top;
833
+ }
834
+
835
+ .tooltip__bubble[data-side='start'] {
836
+ transform-origin: right center;
837
+ }
838
+
839
+ .tooltip__bubble[data-side='end'] {
840
+ transform-origin: left center;
841
+ }
842
+
843
+ .tooltip__bubble:dir(rtl)[data-side='start'] {
844
+ transform-origin: left center;
845
+ }
846
+
847
+ .tooltip__bubble:dir(rtl)[data-side='end'] {
848
+ transform-origin: right center;
849
+ }
850
+
851
+ .tooltip__bubble[data-state='visible'] {
852
+ opacity: 1;
853
+ pointer-events: auto;
854
+ transform: translate(0, 0) scale(1);
855
+ visibility: visible;
856
+ }
857
+
858
+ .tooltip__bubble[data-animation='bounce'][data-state='visible'] {
859
+ animation: tooltip-bounce-in var(--tooltip-enter-duration)
860
+ cubic-bezier(0.2, 0.9, 0.2, 1.1);
861
+ transition-property: visibility;
862
+ }
863
+
864
+ .tooltip__bubble[data-animation='pop'][data-state='visible'] {
865
+ animation: tooltip-pop-in var(--tooltip-enter-duration)
866
+ linear;
867
+ transition-property: visibility;
868
+ }
869
+
870
+ .tooltip__bubble[data-animation='scale'][data-state='visible'] {
871
+ animation: tooltip-scale-in var(--tooltip-enter-duration)
872
+ cubic-bezier(0.16, 1, 0.3, 1);
873
+ transition-property: visibility;
874
+ }
875
+
876
+ .tooltip__bubble[data-animation='none'][data-state='visible'],
877
+ .tooltip__bubble[data-instant-hide='true'][data-state='visible'] {
878
+ animation-name: none;
879
+ }
880
+
881
+ .tooltip__arrow {
882
+ position: absolute;
883
+ z-index: -1;
884
+ display: block;
885
+ width: var(--tooltip-arrow-size);
886
+ height: var(--tooltip-arrow-size);
887
+ background: var(--tooltip-background);
888
+ }
889
+
890
+ .tooltip__bubble[data-side='top'] .tooltip__arrow {
891
+ width: var(--tooltip-arrow-size);
892
+ height: calc(var(--tooltip-arrow-size) + var(--tooltip-arrow-overlap));
893
+ left: var(--tooltip-arrow-x, 50%);
894
+ top: calc(100% - var(--tooltip-arrow-overlap));
895
+ clip-path: polygon(0 0, 100% 0, 50% 100%);
896
+ transform: translateX(-50%);
897
+ }
898
+
899
+ .tooltip__bubble[data-side='bottom'] .tooltip__arrow {
900
+ width: var(--tooltip-arrow-size);
901
+ height: calc(var(--tooltip-arrow-size) + var(--tooltip-arrow-overlap));
902
+ bottom: calc(100% - var(--tooltip-arrow-overlap));
903
+ left: var(--tooltip-arrow-x, 50%);
904
+ clip-path: polygon(50% 0, 0 100%, 100% 100%);
905
+ transform: translateX(-50%);
906
+ }
907
+
908
+ .tooltip__bubble[data-side='start'] .tooltip__arrow {
909
+ width: calc(var(--tooltip-arrow-size) + var(--tooltip-arrow-overlap));
910
+ height: var(--tooltip-arrow-size);
911
+ inset-inline-start: calc(100% - var(--tooltip-arrow-overlap));
912
+ top: var(--tooltip-arrow-y, 50%);
913
+ clip-path: polygon(0 0, 100% 50%, 0 100%);
914
+ transform: translateY(-50%);
915
+ }
916
+
917
+ .tooltip__bubble[data-side='end'] .tooltip__arrow {
918
+ width: calc(var(--tooltip-arrow-size) + var(--tooltip-arrow-overlap));
919
+ height: var(--tooltip-arrow-size);
920
+ inset-inline-end: calc(100% - var(--tooltip-arrow-overlap));
921
+ top: var(--tooltip-arrow-y, 50%);
922
+ clip-path: polygon(0 50%, 100% 0, 100% 100%);
923
+ transform: translateY(-50%);
924
+ }
925
+
926
+ .tooltip__bubble:dir(rtl)[data-side='start'] .tooltip__arrow {
927
+ clip-path: polygon(0 50%, 100% 0, 100% 100%);
928
+ }
929
+
930
+ .tooltip__bubble:dir(rtl)[data-side='end'] .tooltip__arrow {
931
+ clip-path: polygon(0 0, 100% 50%, 0 100%);
932
+ }
933
+
934
+ @keyframes tooltip-bounce-in {
935
+ 0% {
936
+ opacity: 0;
937
+ transform: translate(
938
+ var(--tooltip-bounce-start-x),
939
+ var(--tooltip-bounce-start-y)
940
+ )
941
+ scale(var(--tooltip-enter-scale));
942
+ }
943
+
944
+ 48% {
945
+ opacity: 1;
946
+ transform: translate(
947
+ var(--tooltip-bounce-overshoot-x),
948
+ var(--tooltip-bounce-overshoot-y)
949
+ )
950
+ scale(1.06);
951
+ }
952
+
953
+ 72% {
954
+ opacity: 1;
955
+ transform: translate(
956
+ var(--tooltip-bounce-rebound-x),
957
+ var(--tooltip-bounce-rebound-y)
958
+ )
959
+ scale(0.995);
960
+ }
961
+
962
+ 100% {
963
+ opacity: 1;
964
+ transform: translate(0, 0) scale(1);
965
+ }
966
+ }
967
+
968
+ @keyframes tooltip-pop-in {
969
+ 0% {
970
+ opacity: 0;
971
+ transform: translate(0, 0) scale(var(--tooltip-enter-scale));
972
+ animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
973
+ }
974
+
975
+ 52% {
976
+ opacity: 1;
977
+ transform: translate(0, 0) scale(1.055);
978
+ animation-timing-function: cubic-bezier(0.2, 0, 0.2, 1);
979
+ }
980
+
981
+ 76% {
982
+ opacity: 1;
983
+ transform: translate(0, 0) scale(0.992);
984
+ animation-timing-function: cubic-bezier(0.2, 0, 0.2, 1);
985
+ }
986
+
987
+ 100% {
988
+ opacity: 1;
989
+ transform: translate(0, 0) scale(1);
990
+ }
991
+ }
992
+
993
+ @keyframes tooltip-scale-in {
994
+ 0% {
995
+ opacity: 0;
996
+ transform: translate(0, 0) scale(var(--tooltip-enter-scale));
997
+ }
998
+
999
+ 100% {
1000
+ opacity: 1;
1001
+ transform: translate(0, 0) scale(1);
1002
+ }
1003
+ }
1004
+
1005
+ @media (prefers-reduced-motion: reduce) {
1006
+ .tooltip__bubble {
1007
+ animation-duration: 0ms;
1008
+ transition-duration: 0ms;
1009
+ }
1010
+ }
1011
+ </style>