@finsweet/webflow-apps-utils 1.0.2 → 1.0.4
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 +162 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/providers/GlobalProvider.mdx +322 -0
- package/dist/providers/GlobalProvider.svelte +58 -0
- package/dist/providers/GlobalProvider.svelte.d.ts +4 -0
- package/dist/providers/configuratorUtils.d.ts +37 -0
- package/dist/providers/configuratorUtils.js +219 -0
- package/dist/providers/globalContext.svelte.d.ts +18 -0
- package/dist/providers/globalContext.svelte.js +439 -0
- package/dist/providers/index.d.ts +5 -0
- package/dist/providers/index.js +7 -0
- package/dist/providers/types.d.ts +103 -0
- package/dist/providers/types.js +6 -0
- package/dist/router/Router.mdx +958 -0
- package/dist/router/Router.stories.d.ts +6 -0
- package/dist/router/Router.stories.js +47 -0
- package/dist/router/examples/RouterExample.svelte +271 -0
- package/dist/{ui/components/NoSettingsNeeded.svelte.d.ts → router/examples/RouterExample.svelte.d.ts} +3 -3
- package/dist/router/examples/index.d.ts +4 -0
- package/dist/router/examples/index.js +4 -0
- package/dist/router/examples/pages/AboutPage.svelte +568 -0
- package/dist/router/examples/pages/AboutPage.svelte.d.ts +13 -0
- package/dist/router/examples/pages/HomePage.svelte +200 -0
- package/dist/router/examples/pages/HomePage.svelte.d.ts +14 -0
- package/dist/router/examples/pages/NotFoundPage.svelte +307 -0
- package/dist/router/examples/pages/NotFoundPage.svelte.d.ts +17 -0
- package/dist/router/hooks.svelte.d.ts +2 -2
- package/dist/router/index.d.ts +3 -0
- package/dist/router/index.js +3 -0
- package/dist/router/{Link.svelte → providers/Link.svelte} +1 -1
- package/dist/router/{Route.svelte → providers/Route.svelte} +1 -1
- package/dist/router/{Route.svelte.d.ts → providers/Route.svelte.d.ts} +1 -1
- package/dist/router/{Router.svelte → providers/RouterProvider.svelte} +22 -5
- package/dist/router/{Router.svelte.d.ts → providers/RouterProvider.svelte.d.ts} +8 -4
- package/dist/router/providers/index.d.ts +3 -0
- package/dist/router/providers/index.js +3 -0
- package/dist/router/{index.svelte.d.ts → router.svelte.d.ts} +1 -3
- package/dist/router/{index.svelte.js → router.svelte.js} +1 -4
- package/dist/stores/docs/Form.mdx +542 -0
- package/dist/stores/forms.d.ts +41 -4
- package/dist/stores/forms.js +86 -32
- package/dist/stores/index.d.ts +0 -1
- package/dist/stores/index.js +0 -1
- package/dist/types/customCode.d.ts +1 -1
- package/dist/types/webflow.d.ts +31 -47
- package/dist/types/window.d.ts +1 -0
- package/dist/ui/components/LoadingScreen.svelte +2 -1
- package/dist/ui/components/button/Button.svelte +1 -1
- package/dist/ui/components/button-group/ButtonGroup.stories.js +112 -0
- package/dist/ui/components/{ButtonGroup.svelte → button-group/ButtonGroup.svelte} +20 -33
- package/dist/ui/components/button-group/ButtonGroup.svelte.d.ts +13 -0
- package/dist/ui/components/button-group/index.d.ts +2 -0
- package/dist/ui/components/button-group/index.js +1 -0
- package/dist/ui/components/button-group/types.d.ts +32 -0
- package/dist/ui/components/checkbox/Checkbox.stories.d.ts +55 -0
- package/dist/ui/components/checkbox/Checkbox.stories.js +162 -0
- package/dist/ui/components/checkbox/Checkbox.svelte +141 -0
- package/dist/ui/components/checkbox/Checkbox.svelte.d.ts +4 -0
- package/dist/ui/components/checkbox/index.d.ts +2 -0
- package/dist/ui/components/checkbox/index.js +1 -0
- package/dist/ui/components/checkbox/types.d.ts +32 -0
- package/dist/ui/components/controlled-buttons/ControlledButtons.stories.d.ts +32 -0
- package/dist/ui/components/controlled-buttons/ControlledButtons.stories.js +152 -0
- package/dist/ui/components/{buttons/FooterButton.svelte → controlled-buttons/ControlledButtons.svelte} +18 -67
- package/dist/ui/components/controlled-buttons/ControlledButtons.svelte.d.ts +4 -0
- package/dist/ui/components/controlled-buttons/index.d.ts +2 -0
- package/dist/ui/components/controlled-buttons/index.js +1 -0
- package/dist/ui/components/{buttons → controlled-buttons}/types.d.ts +11 -4
- package/dist/ui/components/copy-text/CopyText.stories.d.ts +70 -0
- package/dist/ui/components/copy-text/CopyText.stories.js +241 -0
- package/dist/ui/components/copy-text/CopyText.svelte +249 -0
- package/dist/ui/components/copy-text/CopyText.svelte.d.ts +4 -0
- package/dist/ui/components/copy-text/index.d.ts +2 -0
- package/dist/ui/components/copy-text/index.js +1 -0
- package/dist/ui/components/copy-text/types.d.ts +52 -0
- package/dist/ui/components/copy-text/types.js +1 -0
- package/dist/ui/components/divider/Divider.stories.svelte +134 -0
- package/dist/ui/components/{clickable/Clickable.stories.svelte.d.ts → divider/Divider.stories.svelte.d.ts} +4 -4
- package/dist/ui/components/divider/Divider.svelte +30 -0
- package/dist/ui/components/divider/Divider.svelte.d.ts +4 -0
- package/dist/ui/components/divider/index.d.ts +2 -0
- package/dist/ui/components/divider/index.js +1 -0
- package/dist/ui/components/divider/types.d.ts +23 -0
- package/dist/ui/components/divider/types.js +1 -0
- package/dist/ui/components/iframe/Iframe.stories.svelte +122 -0
- package/dist/ui/components/{ToggleItem.svelte.d.ts → iframe/Iframe.stories.svelte.d.ts} +7 -8
- package/dist/ui/components/iframe/Iframe.svelte +75 -0
- package/dist/ui/components/iframe/Iframe.svelte.d.ts +4 -0
- package/dist/ui/components/iframe/index.d.ts +2 -0
- package/dist/ui/components/iframe/index.js +1 -0
- package/dist/ui/components/iframe/types.d.ts +38 -0
- package/dist/ui/components/iframe/types.js +1 -0
- package/dist/ui/components/index.d.ts +13 -39
- package/dist/ui/components/index.js +13 -39
- package/dist/ui/components/input/Input.stories.d.ts +33 -0
- package/dist/ui/components/input/Input.stories.js +176 -0
- package/dist/ui/components/input/Input.svelte +358 -81
- package/dist/ui/components/input/types.d.ts +33 -1
- package/dist/ui/components/layout/Layout.stories.svelte +3 -3
- package/dist/ui/components/layout/Layout.svelte +10 -64
- package/dist/ui/components/layout/Layout.svelte.d.ts +2 -2
- package/dist/ui/components/layout/common/EditModeMessage.svelte +24 -12
- package/dist/ui/components/layout/{ExampleLayout.svelte → examples/ExampleLayout.svelte} +56 -39
- package/dist/ui/components/layout/examples/Wrapper.svelte +9 -0
- package/dist/ui/components/{Header.svelte.d.ts → layout/examples/Wrapper.svelte.d.ts} +4 -6
- package/dist/ui/components/layout/examples/index.d.ts +2 -0
- package/dist/ui/components/layout/examples/index.js +2 -0
- package/dist/ui/components/layout/index.d.ts +3 -2
- package/dist/ui/components/layout/index.js +2 -1
- package/dist/ui/components/layout/test-helpers/TestLayoutWithFooter.svelte +20 -0
- package/dist/ui/components/layout/test-helpers/TestLayoutWithFooter.svelte.d.ts +7 -0
- package/dist/ui/components/layout/types.d.ts +1 -10
- package/dist/ui/components/modal/Example.svelte +320 -0
- package/dist/ui/components/modal/Example.svelte.d.ts +3 -0
- package/dist/ui/components/modal/Modal.stories.svelte +18 -0
- package/dist/ui/components/modal/Modal.stories.svelte.d.ts +26 -0
- package/dist/ui/components/modal/Modal.svelte +490 -0
- package/dist/ui/components/modal/Modal.svelte.d.ts +130 -0
- package/dist/ui/components/modal/index.d.ts +2 -0
- package/dist/ui/components/modal/index.js +1 -0
- package/dist/ui/components/modal/types.d.ts +75 -0
- package/dist/ui/components/modal/types.js +1 -0
- package/dist/ui/components/notification/Notification.stories.svelte +239 -0
- package/dist/ui/components/{ToggleList.svelte.d.ts → notification/Notification.stories.svelte.d.ts} +9 -21
- package/dist/ui/components/notification/Notification.svelte +294 -0
- package/dist/ui/components/notification/Notification.svelte.d.ts +67 -0
- package/dist/ui/components/notification/index.d.ts +2 -0
- package/dist/ui/components/notification/index.js +1 -0
- package/dist/ui/components/notification/types.d.ts +68 -0
- package/dist/ui/components/notification/types.js +1 -0
- package/dist/ui/components/section/Section.stories.svelte +263 -0
- package/dist/ui/components/section/Section.stories.svelte.d.ts +27 -0
- package/dist/ui/components/section/Section.svelte +326 -0
- package/dist/ui/components/section/Section.svelte.d.ts +5 -0
- package/dist/ui/components/section/index.d.ts +2 -0
- package/dist/ui/components/section/index.js +1 -0
- package/dist/ui/components/section/types.d.ts +114 -0
- package/dist/ui/components/section/types.js +1 -0
- package/dist/ui/components/{ImageUpload.svelte → shared/ImageUpload.svelte} +3 -3
- package/dist/ui/components/{SelectBodyOrDivBlock.svelte → shared/SelectBodyOrDivBlock.svelte} +1 -1
- package/dist/ui/components/shared/index.d.ts +2 -0
- package/dist/ui/components/shared/index.js +2 -0
- package/dist/ui/components/text/Text.stories.svelte +67 -1
- package/dist/ui/components/text/Text.svelte +209 -8
- package/dist/ui/components/text/types.d.ts +4 -0
- package/dist/ui/index.css +33 -5
- package/dist/utils/animations/factory.d.ts +7 -0
- package/dist/utils/animations/factory.js +101 -0
- package/dist/utils/animations/index.d.ts +7 -0
- package/dist/utils/animations/index.js +62 -0
- package/dist/utils/animations/types.d.ts +39 -0
- package/dist/utils/animations/types.js +1 -0
- package/dist/utils/api/checkIfAppModeIsDesign.d.ts +1 -2
- package/dist/utils/api/checkIfAppModeIsDesign.js +1 -2
- package/dist/utils/api/clipboard/handlePaste.d.ts +6 -37
- package/dist/utils/api/clipboard/handlePaste.js +2 -6
- package/dist/utils/api/getAllAssets.d.ts +1 -2
- package/dist/utils/api/getAllAssets.js +1 -2
- package/dist/utils/api/getFinsweetComponentsEnvironment.d.ts +1 -2
- package/dist/utils/api/getFinsweetComponentsEnvironment.js +3 -6
- package/dist/utils/api/index.d.ts +0 -1
- package/dist/utils/api/index.js +0 -1
- package/dist/utils/api/insertWithXSCP.d.ts +1 -2
- package/dist/utils/api/insertWithXSCP.js +1 -2
- package/dist/utils/auth/crossWindowLogin.d.ts +3 -0
- package/dist/utils/auth/crossWindowLogin.js +3 -0
- package/dist/utils/auth/index.d.ts +9 -25
- package/dist/utils/auth/index.js +9 -25
- package/dist/utils/browser-storage/localStorage.d.ts +4 -12
- package/dist/utils/browser-storage/localStorage.js +4 -12
- package/dist/utils/browser-storage/sessionStorage.d.ts +4 -12
- package/dist/utils/browser-storage/sessionStorage.js +4 -12
- package/dist/utils/custom-code/api.d.ts +3 -7
- package/dist/utils/custom-code/api.js +3 -7
- package/dist/utils/custom-code/configs.d.ts +22 -0
- package/dist/utils/custom-code/configs.js +40 -0
- package/dist/utils/custom-code/index.d.ts +1 -0
- package/dist/utils/custom-code/index.js +1 -0
- package/dist/utils/helpers/capitalizeFirstLetter.d.ts +4 -0
- package/dist/utils/helpers/capitalizeFirstLetter.js +9 -0
- package/dist/utils/helpers/cleanupTooltipMessage.d.ts +1 -2
- package/dist/utils/helpers/cleanupTooltipMessage.js +1 -2
- package/dist/utils/helpers/getTimeNow.d.ts +4 -0
- package/dist/utils/helpers/getTimeNow.js +8 -0
- package/dist/utils/helpers/goto.d.ts +1 -4
- package/dist/utils/helpers/goto.js +2 -7
- package/dist/utils/helpers/index.d.ts +5 -0
- package/dist/utils/helpers/index.js +5 -0
- package/dist/utils/helpers/minifyCode.d.ts +10 -0
- package/dist/utils/helpers/minifyCode.js +73 -0
- package/dist/utils/helpers/noop.d.ts +1 -1
- package/dist/utils/helpers/noop.js +1 -1
- package/dist/utils/helpers/numbers.d.ts +4 -14
- package/dist/utils/helpers/numbers.js +4 -14
- package/dist/utils/helpers/objectsToModuleExports.d.ts +2 -4
- package/dist/utils/helpers/objectsToModuleExports.js +2 -3
- package/dist/utils/helpers/toHumanReadableList.d.ts +4 -0
- package/dist/utils/helpers/toHumanReadableList.js +11 -0
- package/dist/utils/helpers/trimText.d.ts +1 -8
- package/dist/utils/helpers/trimText.js +1 -8
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/logger/index.d.ts +0 -2
- package/dist/utils/logger/index.js +0 -2
- package/dist/utils/webflow-canvas/attributes/getAllWebflowElementAttributes.d.ts +1 -3
- package/dist/utils/webflow-canvas/attributes/getAllWebflowElementAttributes.js +1 -3
- package/dist/utils/webflow-canvas/attributes/getInstanceNamesFromObject.d.ts +1 -5
- package/dist/utils/webflow-canvas/attributes/getInstanceNamesFromObject.js +1 -5
- package/dist/utils/webflow-canvas/attributes/getWebflowElementAttribute.d.ts +1 -4
- package/dist/utils/webflow-canvas/attributes/getWebflowElementAttribute.js +1 -4
- package/dist/utils/webflow-canvas/attributes/getWebflowElementTextContent.d.ts +1 -3
- package/dist/utils/webflow-canvas/attributes/getWebflowElementTextContent.js +1 -3
- package/dist/utils/webflow-canvas/attributes/removeWebflowElementAttribute.d.ts +1 -4
- package/dist/utils/webflow-canvas/attributes/removeWebflowElementAttribute.js +1 -4
- package/dist/utils/webflow-canvas/attributes/setStyles.d.ts +1 -3
- package/dist/utils/webflow-canvas/attributes/setStyles.js +1 -3
- package/dist/utils/webflow-canvas/attributes/setWebflowElementAttribute.d.ts +1 -8
- package/dist/utils/webflow-canvas/attributes/setWebflowElementAttribute.js +1 -13
- package/dist/utils/webflow-canvas/findInstanceElement.d.ts +0 -6
- package/dist/utils/webflow-canvas/findInstanceElement.js +1 -7
- package/dist/utils/webflow-canvas/getAllChildren.d.ts +16 -0
- package/dist/utils/webflow-canvas/getAllChildren.js +65 -0
- package/dist/utils/webflow-canvas/getAllPages.d.ts +3 -10
- package/dist/utils/webflow-canvas/getAllPages.js +3 -10
- package/dist/utils/webflow-canvas/getElementClassList.d.ts +9 -0
- package/dist/utils/webflow-canvas/getElementClassList.js +19 -0
- package/dist/utils/webflow-canvas/getSiteStagingUrl.d.ts +1 -4
- package/dist/utils/webflow-canvas/getSiteStagingUrl.js +1 -4
- package/dist/utils/webflow-canvas/index.d.ts +3 -0
- package/dist/utils/webflow-canvas/index.js +3 -0
- package/package.json +14 -2
- package/dist/router/README.md +0 -397
- package/dist/stores/globalStore.d.ts +0 -10
- package/dist/stores/globalStore.js +0 -10
- package/dist/ui/components/ButtonGroup.svelte.d.ts +0 -28
- package/dist/ui/components/Checkbox.svelte +0 -94
- package/dist/ui/components/Checkbox.svelte.d.ts +0 -36
- package/dist/ui/components/Copy.svelte +0 -329
- package/dist/ui/components/Copy.svelte.d.ts +0 -35
- package/dist/ui/components/CustomModal.svelte +0 -192
- package/dist/ui/components/CustomModal.svelte.d.ts +0 -45
- package/dist/ui/components/DisableInEditMode.svelte +0 -66
- package/dist/ui/components/DisableInEditMode.svelte.d.ts +0 -33
- package/dist/ui/components/Divider.svelte +0 -31
- package/dist/ui/components/Divider.svelte.d.ts +0 -31
- package/dist/ui/components/Header.svelte +0 -30
- package/dist/ui/components/Iframe.svelte +0 -89
- package/dist/ui/components/Iframe.svelte.d.ts +0 -40
- package/dist/ui/components/InjectComponent.svelte +0 -297
- package/dist/ui/components/InjectComponent.svelte.d.ts +0 -27
- package/dist/ui/components/Modal.svelte +0 -139
- package/dist/ui/components/Modal.svelte.d.ts +0 -42
- package/dist/ui/components/Navbar.svelte +0 -132
- package/dist/ui/components/Navbar.svelte.d.ts +0 -29
- package/dist/ui/components/NoSettingsNeeded.svelte +0 -31
- package/dist/ui/components/Notification.svelte +0 -193
- package/dist/ui/components/Notification.svelte.d.ts +0 -64
- package/dist/ui/components/PlusMinusButton.svelte +0 -91
- package/dist/ui/components/PlusMinusButton.svelte.d.ts +0 -22
- package/dist/ui/components/PreviewBar.svelte +0 -40
- package/dist/ui/components/PreviewBar.svelte.d.ts +0 -20
- package/dist/ui/components/ScrollableContent.svelte +0 -18
- package/dist/ui/components/ScrollableContent.svelte.d.ts +0 -31
- package/dist/ui/components/Section.svelte +0 -97
- package/dist/ui/components/Section.svelte.d.ts +0 -50
- package/dist/ui/components/Spacer.svelte +0 -9
- package/dist/ui/components/Spacer.svelte.d.ts +0 -22
- package/dist/ui/components/SpinnerPlusMinus.svelte +0 -75
- package/dist/ui/components/SpinnerPlusMinus.svelte.d.ts +0 -23
- package/dist/ui/components/SpinnerUpDown.svelte +0 -194
- package/dist/ui/components/SpinnerUpDown.svelte.d.ts +0 -31
- package/dist/ui/components/Tabs.svelte +0 -71
- package/dist/ui/components/Tabs.svelte.d.ts +0 -26
- package/dist/ui/components/ToggleItem.svelte +0 -29
- package/dist/ui/components/ToggleList.svelte +0 -57
- package/dist/ui/components/buttons/FooterButton.svelte.d.ts +0 -10
- package/dist/ui/components/buttons/index.d.ts +0 -5
- package/dist/ui/components/buttons/index.js +0 -5
- package/dist/ui/components/clickable/Clickable.stories.svelte +0 -213
- package/dist/ui/components/clickable/Clickable.svelte +0 -93
- package/dist/ui/components/clickable/Clickable.svelte.d.ts +0 -4
- package/dist/ui/components/clickable/index.d.ts +0 -2
- package/dist/ui/components/clickable/index.js +0 -1
- package/dist/ui/components/clickable/types.d.ts +0 -17
- package/dist/utils/api/copyPaste/index.d.ts +0 -18
- /package/dist/router/{Link.svelte.d.ts → providers/Link.svelte.d.ts} +0 -0
- /package/dist/ui/components/{buttons → button-group}/types.js +0 -0
- /package/dist/ui/components/{clickable → checkbox}/types.js +0 -0
- /package/dist/{utils/api/copyPaste/index.js → ui/components/controlled-buttons/types.js} +0 -0
- /package/dist/ui/components/layout/{ExampleLayout.svelte.d.ts → examples/ExampleLayout.svelte.d.ts} +0 -0
- /package/dist/ui/components/{ImageUpload.svelte.d.ts → shared/ImageUpload.svelte.d.ts} +0 -0
- /package/dist/ui/components/{SelectBodyOrDivBlock.svelte.d.ts → shared/SelectBodyOrDivBlock.svelte.d.ts} +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import type { TooltipProps } from '../tooltip/types.js';
|
|
4
|
+
export type BorderPosition = 'top' | 'right' | 'bottom' | 'left';
|
|
5
|
+
export interface SectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to hide the section completely
|
|
8
|
+
*/
|
|
9
|
+
hide?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Array of border positions to apply
|
|
12
|
+
*/
|
|
13
|
+
borders?: BorderPosition[];
|
|
14
|
+
/**
|
|
15
|
+
* Whether the section is in active state
|
|
16
|
+
*/
|
|
17
|
+
active?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the section should be clickable with keyboard support
|
|
20
|
+
*/
|
|
21
|
+
clickable?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the section is disabled
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the section content should be scrollable with simplebar
|
|
28
|
+
*/
|
|
29
|
+
scrollable?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Width of the section (CSS value)
|
|
32
|
+
*/
|
|
33
|
+
width?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Height of the section (CSS value)
|
|
36
|
+
*/
|
|
37
|
+
height?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Background color of the section (CSS color value)
|
|
40
|
+
*/
|
|
41
|
+
backgroundColor?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Padding of the section (CSS value) - defaults to var(--Spacing-12, 12px)
|
|
44
|
+
*/
|
|
45
|
+
padding?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Gap between child elements (CSS value) - defaults to var(--Spacing-8, 8px)
|
|
48
|
+
*/
|
|
49
|
+
gap?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Additional CSS classes to apply
|
|
52
|
+
*/
|
|
53
|
+
class?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Tooltip configuration
|
|
56
|
+
*/
|
|
57
|
+
tooltip?: TooltipProps;
|
|
58
|
+
/**
|
|
59
|
+
* Message to show when section is disabled in edit mode
|
|
60
|
+
*/
|
|
61
|
+
disabledMessage?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Width of the disabled tooltip
|
|
64
|
+
*/
|
|
65
|
+
disabledTooltipWidth?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Content to render inside the section
|
|
68
|
+
*/
|
|
69
|
+
children?: Snippet;
|
|
70
|
+
/**
|
|
71
|
+
* Click event handler
|
|
72
|
+
*/
|
|
73
|
+
onclick?: (event: MouseEvent) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Keydown event handler
|
|
76
|
+
*/
|
|
77
|
+
onkeydown?: (event: KeyboardEvent) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Mouse over event handler
|
|
80
|
+
*/
|
|
81
|
+
onmouseover?: (event: MouseEvent) => void;
|
|
82
|
+
/**
|
|
83
|
+
* Mouse leave event handler
|
|
84
|
+
*/
|
|
85
|
+
onmouseleave?: (event: MouseEvent) => void;
|
|
86
|
+
/**
|
|
87
|
+
* Focus event handler
|
|
88
|
+
*/
|
|
89
|
+
onfocus?: (event: FocusEvent) => void;
|
|
90
|
+
/**
|
|
91
|
+
* Blur event handler
|
|
92
|
+
*/
|
|
93
|
+
onblur?: (event: FocusEvent) => void;
|
|
94
|
+
}
|
|
95
|
+
export interface SectionEvents {
|
|
96
|
+
click: {
|
|
97
|
+
detail: MouseEvent;
|
|
98
|
+
};
|
|
99
|
+
keydown: {
|
|
100
|
+
detail: KeyboardEvent;
|
|
101
|
+
};
|
|
102
|
+
mouseover: {
|
|
103
|
+
detail: MouseEvent;
|
|
104
|
+
};
|
|
105
|
+
mouseleave: {
|
|
106
|
+
detail: MouseEvent;
|
|
107
|
+
};
|
|
108
|
+
focus: {
|
|
109
|
+
detail: FocusEvent;
|
|
110
|
+
};
|
|
111
|
+
blur: {
|
|
112
|
+
detail: FocusEvent;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { createEventDispatcher } from 'svelte';
|
|
3
3
|
import { onDestroy } from 'svelte';
|
|
4
4
|
|
|
5
|
-
import { DeleteOutlinedIcon, FileUploadIcon, RefreshIcon } from '
|
|
6
|
-
import { Button } from '
|
|
7
|
-
import { Text } from '
|
|
5
|
+
import { DeleteOutlinedIcon, FileUploadIcon, RefreshIcon } from '../../icons';
|
|
6
|
+
import { Button } from '../button';
|
|
7
|
+
import { Text } from '../text';
|
|
8
8
|
|
|
9
9
|
type FileChangeEvent = {
|
|
10
10
|
file: File | null;
|
|
@@ -63,6 +63,11 @@
|
|
|
63
63
|
control: { type: 'object' },
|
|
64
64
|
description: 'Tooltip configuration'
|
|
65
65
|
},
|
|
66
|
+
tooltipTarget: {
|
|
67
|
+
control: { type: 'select' },
|
|
68
|
+
options: ['text', 'icon'],
|
|
69
|
+
description: 'Specifies whether to show tooltip on text or icon'
|
|
70
|
+
},
|
|
66
71
|
popup: {
|
|
67
72
|
control: { type: 'object' },
|
|
68
73
|
description: 'Popup action configuration'
|
|
@@ -144,7 +149,7 @@
|
|
|
144
149
|
</div>
|
|
145
150
|
</Story>
|
|
146
151
|
|
|
147
|
-
<!-- Tooltip
|
|
152
|
+
<!-- Tooltip Examples -->
|
|
148
153
|
<Story
|
|
149
154
|
name="With Tooltip"
|
|
150
155
|
args={{
|
|
@@ -156,6 +161,67 @@
|
|
|
156
161
|
}}
|
|
157
162
|
/>
|
|
158
163
|
|
|
164
|
+
<Story
|
|
165
|
+
name="Tooltip on Icon"
|
|
166
|
+
args={{
|
|
167
|
+
label: 'Text with tooltip on icon',
|
|
168
|
+
icon: ToolTipInfoCircleIcon,
|
|
169
|
+
tooltip: {
|
|
170
|
+
message: 'This tooltip appears on the icon',
|
|
171
|
+
placement: 'top'
|
|
172
|
+
},
|
|
173
|
+
tooltipTarget: 'icon'
|
|
174
|
+
}}
|
|
175
|
+
/>
|
|
176
|
+
|
|
177
|
+
<Story name="Tooltip Target Examples">
|
|
178
|
+
<div style="display: flex; flex-direction: column; gap: 16px; padding: 16px;">
|
|
179
|
+
<div style="border: 1px dashed #ccc; padding: 12px;">
|
|
180
|
+
<h4 style="margin: 0 0 8px 0; font-size: 12px; color: #666;">Tooltip on Text (default):</h4>
|
|
181
|
+
<Text
|
|
182
|
+
label="Hover over this text"
|
|
183
|
+
icon={AccountIcon}
|
|
184
|
+
tooltip={{ message: 'Tooltip on the text', placement: 'top' }}
|
|
185
|
+
tooltipTarget="text"
|
|
186
|
+
/>
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<div style="border: 1px dashed #ccc; padding: 12px;">
|
|
190
|
+
<h4 style="margin: 0 0 8px 0; font-size: 12px; color: #666;">Tooltip on Icon:</h4>
|
|
191
|
+
<Text
|
|
192
|
+
label="Hover over the icon"
|
|
193
|
+
icon={ToolTipInfoCircleIcon}
|
|
194
|
+
tooltip={{ message: 'Tooltip on the icon', placement: 'top' }}
|
|
195
|
+
tooltipTarget="icon"
|
|
196
|
+
/>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
<div style="border: 1px dashed #ccc; padding: 12px;">
|
|
200
|
+
<h4 style="margin: 0 0 8px 0; font-size: 12px; color: #666;">
|
|
201
|
+
With Ellipsis + Icon Tooltip:
|
|
202
|
+
</h4>
|
|
203
|
+
<Text
|
|
204
|
+
label="Long text that will be truncated with ellipsis"
|
|
205
|
+
icon={ToolTipInfoCircleIcon}
|
|
206
|
+
tooltip={{ message: 'Icon tooltip with ellipsis', placement: 'top' }}
|
|
207
|
+
tooltipTarget="icon"
|
|
208
|
+
ellipsisOnWidth="200px"
|
|
209
|
+
/>
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<div style="border: 1px dashed #ccc; padding: 12px;">
|
|
213
|
+
<h4 style="margin: 0 0 8px 0; font-size: 12px; color: #666;">
|
|
214
|
+
Invalid Configuration (no icon for icon target):
|
|
215
|
+
</h4>
|
|
216
|
+
<Text
|
|
217
|
+
label="No icon but tooltipTarget is icon"
|
|
218
|
+
tooltip={{ message: 'This tooltip should not show', placement: 'top' }}
|
|
219
|
+
tooltipTarget="icon"
|
|
220
|
+
/>
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
</Story>
|
|
224
|
+
|
|
159
225
|
<!-- Popup Example -->
|
|
160
226
|
<Story
|
|
161
227
|
name="With Popup Action"
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
// Tooltip configuration - pass any tooltip props
|
|
34
34
|
tooltip,
|
|
35
|
+
tooltipTarget = 'icon',
|
|
35
36
|
|
|
36
37
|
// Popup configuration - for action popups (reset, delete, etc.)
|
|
37
38
|
popup,
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
disabled: popup?.disabled ?? false,
|
|
88
89
|
title: popup?.title ?? 'Remove',
|
|
89
90
|
subtitle: popup?.subtitle ?? 'Alt + click',
|
|
91
|
+
onclick: popup?.onclick ?? null,
|
|
90
92
|
description: popup?.description ?? 'This action will remove the current selection.',
|
|
91
93
|
icon: popup?.icon ?? DeleteIcon,
|
|
92
94
|
active: popup?.active ?? false
|
|
@@ -114,6 +116,8 @@
|
|
|
114
116
|
wrapperElement.dispatchEvent(new CustomEvent('popupAction', actionEvent));
|
|
115
117
|
}
|
|
116
118
|
|
|
119
|
+
popup?.onclick?.();
|
|
120
|
+
|
|
117
121
|
isPopupHidden = true;
|
|
118
122
|
}
|
|
119
123
|
|
|
@@ -280,11 +284,26 @@
|
|
|
280
284
|
!disabled &&
|
|
281
285
|
(isPopupHidden || !hasPopup)
|
|
282
286
|
);
|
|
287
|
+
|
|
288
|
+
// Validate tooltipTarget - if 'icon' is specified, icon must be present and not loading
|
|
289
|
+
let isValidTooltipTarget = $derived(
|
|
290
|
+
tooltipTarget === 'text' || (tooltipTarget === 'icon' && !!icon && !loading)
|
|
291
|
+
);
|
|
292
|
+
|
|
293
|
+
// Determine if tooltip should show on text (default behavior or when explicitly set to 'text')
|
|
294
|
+
let shouldShowTooltipOnText = $derived(
|
|
295
|
+
shouldShowTooltip && isValidTooltipTarget && tooltipTarget === 'text'
|
|
296
|
+
);
|
|
297
|
+
|
|
298
|
+
// Determine if tooltip should show on icon (when explicitly set to 'icon' and icon is present)
|
|
299
|
+
let shouldShowTooltipOnIcon = $derived(
|
|
300
|
+
shouldShowTooltip && isValidTooltipTarget && tooltipTarget === 'icon' && !!icon && !loading
|
|
301
|
+
);
|
|
283
302
|
</script>
|
|
284
303
|
|
|
285
304
|
{#if label || tooltip || icon || children}
|
|
286
|
-
{#if !hasPopup &&
|
|
287
|
-
<!-- Simple text with tooltip -->
|
|
305
|
+
{#if !hasPopup && shouldShowTooltipOnText}
|
|
306
|
+
<!-- Simple text with tooltip on text -->
|
|
288
307
|
<Tooltip {...tooltip}>
|
|
289
308
|
{#snippet target()}
|
|
290
309
|
<div
|
|
@@ -314,8 +333,14 @@
|
|
|
314
333
|
<div class="loading" style="flex-shrink: 0;">
|
|
315
334
|
<Loader size={16} />
|
|
316
335
|
</div>
|
|
317
|
-
{:else if icon}
|
|
336
|
+
{:else if icon && !shouldShowTooltipOnIcon}
|
|
318
337
|
<IconComponent style="flex-shrink: 0;" />
|
|
338
|
+
{:else if icon && shouldShowTooltipOnIcon}
|
|
339
|
+
<Tooltip {...tooltip}>
|
|
340
|
+
{#snippet target()}
|
|
341
|
+
<IconComponent style="flex-shrink: 0;" />
|
|
342
|
+
{/snippet}
|
|
343
|
+
</Tooltip>
|
|
319
344
|
{/if}
|
|
320
345
|
{/if}
|
|
321
346
|
<div class={textClasses()} style={textStyles()}>
|
|
@@ -336,8 +361,14 @@
|
|
|
336
361
|
<div class="loading">
|
|
337
362
|
<Loader size={16} />
|
|
338
363
|
</div>
|
|
339
|
-
{:else if icon}
|
|
364
|
+
{:else if icon && !shouldShowTooltipOnIcon}
|
|
340
365
|
<IconComponent />
|
|
366
|
+
{:else if icon && shouldShowTooltipOnIcon}
|
|
367
|
+
<Tooltip {...tooltip}>
|
|
368
|
+
{#snippet target()}
|
|
369
|
+
<IconComponent />
|
|
370
|
+
{/snippet}
|
|
371
|
+
</Tooltip>
|
|
341
372
|
{/if}
|
|
342
373
|
{/if}
|
|
343
374
|
|
|
@@ -358,6 +389,85 @@
|
|
|
358
389
|
</div>
|
|
359
390
|
{/snippet}
|
|
360
391
|
</Tooltip>
|
|
392
|
+
{:else if !hasPopup && shouldShowTooltipOnIcon}
|
|
393
|
+
<!-- Simple text with tooltip on icon -->
|
|
394
|
+
<div
|
|
395
|
+
class={labelClasses()}
|
|
396
|
+
data-component="Text"
|
|
397
|
+
{...isInteractive ? { tabindex: 0 } : {}}
|
|
398
|
+
role={isInteractive ? 'button' : undefined}
|
|
399
|
+
onclick={handleClick}
|
|
400
|
+
{title}
|
|
401
|
+
style={labelStyles()}
|
|
402
|
+
{...restProps}
|
|
403
|
+
>
|
|
404
|
+
{#if label?.trim() || icon || children}
|
|
405
|
+
{#if ellipsisOnWidth && (icon || loading)}
|
|
406
|
+
<!-- handling ellipsis with icons -->
|
|
407
|
+
<div
|
|
408
|
+
class="text-with-icon"
|
|
409
|
+
style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
|
|
410
|
+
'center'
|
|
411
|
+
? 'center'
|
|
412
|
+
: textAlign === 'right'
|
|
413
|
+
? 'flex-end'
|
|
414
|
+
: 'flex-start'};"
|
|
415
|
+
>
|
|
416
|
+
{#if icon || loading}
|
|
417
|
+
{#if loading}
|
|
418
|
+
<div class="loading" style="flex-shrink: 0;">
|
|
419
|
+
<Loader size={16} />
|
|
420
|
+
</div>
|
|
421
|
+
{:else if icon}
|
|
422
|
+
<Tooltip {...tooltip}>
|
|
423
|
+
{#snippet target()}
|
|
424
|
+
<IconComponent style="flex-shrink: 0;" />
|
|
425
|
+
{/snippet}
|
|
426
|
+
</Tooltip>
|
|
427
|
+
{/if}
|
|
428
|
+
{/if}
|
|
429
|
+
<div class={textClasses()} style={textStyles()}>
|
|
430
|
+
{#if children}
|
|
431
|
+
{@render children()}
|
|
432
|
+
{:else if raw}
|
|
433
|
+
{@html label}
|
|
434
|
+
{:else}
|
|
435
|
+
{label}
|
|
436
|
+
{/if}
|
|
437
|
+
</div>
|
|
438
|
+
</div>
|
|
439
|
+
{:else}
|
|
440
|
+
<!-- Normal text handling -->
|
|
441
|
+
<div class={textClasses()} style={textStyles()}>
|
|
442
|
+
{#if icon || loading}
|
|
443
|
+
{#if loading}
|
|
444
|
+
<div class="loading">
|
|
445
|
+
<Loader size={16} />
|
|
446
|
+
</div>
|
|
447
|
+
{:else if icon}
|
|
448
|
+
<Tooltip {...tooltip}>
|
|
449
|
+
{#snippet target()}
|
|
450
|
+
<IconComponent />
|
|
451
|
+
{/snippet}
|
|
452
|
+
</Tooltip>
|
|
453
|
+
{/if}
|
|
454
|
+
{/if}
|
|
455
|
+
|
|
456
|
+
{#if children}
|
|
457
|
+
{@render children()}
|
|
458
|
+
{:else if raw}
|
|
459
|
+
{@html label}
|
|
460
|
+
{:else}
|
|
461
|
+
{label}
|
|
462
|
+
{/if}
|
|
463
|
+
</div>
|
|
464
|
+
{/if}
|
|
465
|
+
{/if}
|
|
466
|
+
|
|
467
|
+
{#if pill}
|
|
468
|
+
{@render pill()}
|
|
469
|
+
{/if}
|
|
470
|
+
</div>
|
|
361
471
|
{:else if !hasPopup}
|
|
362
472
|
<!-- Simple text without tooltip -->
|
|
363
473
|
<div
|
|
@@ -451,8 +561,8 @@
|
|
|
451
561
|
>
|
|
452
562
|
{#snippet target()}
|
|
453
563
|
<span class="dropdown-label item {popupConfig.active ? 'active' : ''}">
|
|
454
|
-
{#if
|
|
455
|
-
<!-- Text with popup and tooltip -->
|
|
564
|
+
{#if shouldShowTooltipOnText}
|
|
565
|
+
<!-- Text with popup and tooltip on text -->
|
|
456
566
|
<Tooltip {...tooltip}>
|
|
457
567
|
{#snippet target()}
|
|
458
568
|
<div
|
|
@@ -482,8 +592,14 @@
|
|
|
482
592
|
<div class="loading" style="flex-shrink: 0;">
|
|
483
593
|
<Loader size={16} />
|
|
484
594
|
</div>
|
|
485
|
-
{:else if icon}
|
|
595
|
+
{:else if icon && !shouldShowTooltipOnIcon}
|
|
486
596
|
<IconComponent style="flex-shrink: 0;" />
|
|
597
|
+
{:else if icon && shouldShowTooltipOnIcon}
|
|
598
|
+
<Tooltip {...tooltip}>
|
|
599
|
+
{#snippet target()}
|
|
600
|
+
<IconComponent style="flex-shrink: 0;" />
|
|
601
|
+
{/snippet}
|
|
602
|
+
</Tooltip>
|
|
487
603
|
{/if}
|
|
488
604
|
{/if}
|
|
489
605
|
<div class={textClasses()} style={textStyles()}>
|
|
@@ -504,8 +620,14 @@
|
|
|
504
620
|
<div class="loading">
|
|
505
621
|
<Loader size={16} />
|
|
506
622
|
</div>
|
|
507
|
-
{:else if icon}
|
|
623
|
+
{:else if icon && !shouldShowTooltipOnIcon}
|
|
508
624
|
<IconComponent />
|
|
625
|
+
{:else if icon && shouldShowTooltipOnIcon}
|
|
626
|
+
<Tooltip {...tooltip}>
|
|
627
|
+
{#snippet target()}
|
|
628
|
+
<IconComponent />
|
|
629
|
+
{/snippet}
|
|
630
|
+
</Tooltip>
|
|
509
631
|
{/if}
|
|
510
632
|
{/if}
|
|
511
633
|
|
|
@@ -526,6 +648,85 @@
|
|
|
526
648
|
</div>
|
|
527
649
|
{/snippet}
|
|
528
650
|
</Tooltip>
|
|
651
|
+
{:else if shouldShowTooltipOnIcon}
|
|
652
|
+
<!-- Text with popup and tooltip on icon -->
|
|
653
|
+
<div
|
|
654
|
+
class={labelClasses()}
|
|
655
|
+
data-component="Text"
|
|
656
|
+
{...isInteractive ? { tabindex: 0 } : {}}
|
|
657
|
+
role={isInteractive ? 'button' : undefined}
|
|
658
|
+
onclick={handleClick}
|
|
659
|
+
{title}
|
|
660
|
+
style={labelStyles()}
|
|
661
|
+
{...restProps}
|
|
662
|
+
>
|
|
663
|
+
{#if label?.trim() || icon || children}
|
|
664
|
+
{#if ellipsisOnWidth && (icon || loading)}
|
|
665
|
+
<!-- handling ellipsis with icons -->
|
|
666
|
+
<div
|
|
667
|
+
class="text-with-icon"
|
|
668
|
+
style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
|
|
669
|
+
'center'
|
|
670
|
+
? 'center'
|
|
671
|
+
: textAlign === 'right'
|
|
672
|
+
? 'flex-end'
|
|
673
|
+
: 'flex-start'};"
|
|
674
|
+
>
|
|
675
|
+
{#if icon || loading}
|
|
676
|
+
{#if loading}
|
|
677
|
+
<div class="loading" style="flex-shrink: 0;">
|
|
678
|
+
<Loader size={16} />
|
|
679
|
+
</div>
|
|
680
|
+
{:else if icon}
|
|
681
|
+
<Tooltip {...tooltip}>
|
|
682
|
+
{#snippet target()}
|
|
683
|
+
<IconComponent style="flex-shrink: 0;" />
|
|
684
|
+
{/snippet}
|
|
685
|
+
</Tooltip>
|
|
686
|
+
{/if}
|
|
687
|
+
{/if}
|
|
688
|
+
<div class={textClasses()} style={textStyles()}>
|
|
689
|
+
{#if children}
|
|
690
|
+
{@render children()}
|
|
691
|
+
{:else if raw}
|
|
692
|
+
{@html label}
|
|
693
|
+
{:else}
|
|
694
|
+
{label}
|
|
695
|
+
{/if}
|
|
696
|
+
</div>
|
|
697
|
+
</div>
|
|
698
|
+
{:else}
|
|
699
|
+
<!-- Normal text handling -->
|
|
700
|
+
<div class={textClasses()} style={textStyles()}>
|
|
701
|
+
{#if icon || loading}
|
|
702
|
+
{#if loading}
|
|
703
|
+
<div class="loading">
|
|
704
|
+
<Loader size={16} />
|
|
705
|
+
</div>
|
|
706
|
+
{:else if icon}
|
|
707
|
+
<Tooltip {...tooltip}>
|
|
708
|
+
{#snippet target()}
|
|
709
|
+
<IconComponent />
|
|
710
|
+
{/snippet}
|
|
711
|
+
</Tooltip>
|
|
712
|
+
{/if}
|
|
713
|
+
{/if}
|
|
714
|
+
|
|
715
|
+
{#if children}
|
|
716
|
+
{@render children()}
|
|
717
|
+
{:else if raw}
|
|
718
|
+
{@html label}
|
|
719
|
+
{:else}
|
|
720
|
+
{label}
|
|
721
|
+
{/if}
|
|
722
|
+
</div>
|
|
723
|
+
{/if}
|
|
724
|
+
{/if}
|
|
725
|
+
|
|
726
|
+
{#if pill}
|
|
727
|
+
{@render pill()}
|
|
728
|
+
{/if}
|
|
729
|
+
</div>
|
|
529
730
|
{:else}
|
|
530
731
|
<!-- Text with popup without tooltip -->
|
|
531
732
|
<div
|
|
@@ -21,6 +21,8 @@ export interface PopupConfig {
|
|
|
21
21
|
icon?: Component | null;
|
|
22
22
|
/** Whether the popup trigger is currently active */
|
|
23
23
|
active?: boolean;
|
|
24
|
+
/** Event handler for popup action */
|
|
25
|
+
onclick?: () => void;
|
|
24
26
|
}
|
|
25
27
|
export interface TextProps {
|
|
26
28
|
label?: string;
|
|
@@ -37,6 +39,8 @@ export interface TextProps {
|
|
|
37
39
|
height?: string;
|
|
38
40
|
ellipsisOnWidth?: string;
|
|
39
41
|
tooltip?: Partial<TooltipProps>;
|
|
42
|
+
/** Specifies whether to show tooltip on the text or icon. Requires icon prop when set to 'icon' */
|
|
43
|
+
tooltipTarget?: 'text' | 'icon';
|
|
40
44
|
popup?: PopupConfig;
|
|
41
45
|
icon?: Component | null;
|
|
42
46
|
loading?: boolean;
|
package/dist/ui/index.css
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
--black: #000000;
|
|
12
12
|
--background2: #353535;
|
|
13
13
|
--background3: #404040;
|
|
14
|
+
--background-background-3: #363636;
|
|
14
15
|
--background4: #373737;
|
|
15
16
|
--background5: #404040;
|
|
16
17
|
--backgroundInactive: #292929;
|
|
@@ -266,13 +267,40 @@ label {
|
|
|
266
267
|
opacity: 0.75 !important;
|
|
267
268
|
}
|
|
268
269
|
|
|
269
|
-
/*
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
/* OverlayScrollbars Global Theme */
|
|
271
|
+
:root {
|
|
272
|
+
/* OverlayScrollbars theme variables using design system colors */
|
|
273
|
+
--os-size: var(--sb-size, 6px);
|
|
274
|
+
--os-padding-perpendicular: 0px;
|
|
275
|
+
--os-padding-axis: 0px;
|
|
276
|
+
--os-track-bg: var(--background1);
|
|
277
|
+
--os-handle-bg: var(--background4);
|
|
278
|
+
--os-handle-bg-hover: var(--background3);
|
|
279
|
+
--os-handle-bg-active: var(--background2);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* OverlayScrollbars global dark theme */
|
|
283
|
+
.os-theme-dark .os-scrollbar {
|
|
284
|
+
--os-size: var(--sb-size, 6px);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.os-theme-dark .os-scrollbar-track {
|
|
288
|
+
background: var(--background1);
|
|
289
|
+
border-radius: 4px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.os-theme-dark .os-scrollbar-handle {
|
|
293
|
+
background: var(--background4);
|
|
294
|
+
border-radius: 4px;
|
|
295
|
+
transition: background-color 0.2s ease;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.os-theme-dark .os-scrollbar-handle:hover {
|
|
299
|
+
background: var(--background3);
|
|
272
300
|
}
|
|
273
301
|
|
|
274
|
-
.
|
|
275
|
-
|
|
302
|
+
.os-theme-dark .os-scrollbar-handle:active {
|
|
303
|
+
background: var(--background2);
|
|
276
304
|
}
|
|
277
305
|
|
|
278
306
|
input {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AnimationFunctions, AnimationProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new Animation.
|
|
4
|
+
* @param props The animaiton props.
|
|
5
|
+
* @returns A new `in` and `out` Animation functions.
|
|
6
|
+
*/
|
|
7
|
+
export declare const createAnimation: ({ initialStyles, keyframes }: AnimationProps) => AnimationFunctions;
|