@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,263 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import { fn } from 'storybook/test';
|
|
4
|
+
|
|
5
|
+
import Section from './Section.svelte';
|
|
6
|
+
|
|
7
|
+
const { Story } = defineMeta({
|
|
8
|
+
title: 'UI/Section',
|
|
9
|
+
component: Section,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
hide: {
|
|
13
|
+
control: 'boolean',
|
|
14
|
+
description: 'Whether to hide the section'
|
|
15
|
+
},
|
|
16
|
+
borders: {
|
|
17
|
+
control: 'check',
|
|
18
|
+
options: ['top', 'bottom', 'left', 'right'],
|
|
19
|
+
description: 'Which borders to show on the section'
|
|
20
|
+
},
|
|
21
|
+
active: {
|
|
22
|
+
control: 'boolean',
|
|
23
|
+
description: 'Whether to show an active state'
|
|
24
|
+
},
|
|
25
|
+
clickable: {
|
|
26
|
+
control: 'boolean',
|
|
27
|
+
description: 'Whether the section is clickable (enables hover effects and interaction)'
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
control: 'boolean',
|
|
31
|
+
description: 'Whether the section is disabled'
|
|
32
|
+
},
|
|
33
|
+
scrollable: {
|
|
34
|
+
control: 'boolean',
|
|
35
|
+
description: 'Enable scrollable content with OverlayScrollbars'
|
|
36
|
+
},
|
|
37
|
+
class: {
|
|
38
|
+
control: 'text',
|
|
39
|
+
description: 'Custom CSS class names'
|
|
40
|
+
},
|
|
41
|
+
disabledMessage: {
|
|
42
|
+
control: 'text',
|
|
43
|
+
description: 'Message to show in disabled tooltip (enables edit mode warning)'
|
|
44
|
+
},
|
|
45
|
+
disabledTooltipWidth: {
|
|
46
|
+
control: 'text',
|
|
47
|
+
description: 'Width of the disabled tooltip'
|
|
48
|
+
},
|
|
49
|
+
onclick: { action: 'clicked' }
|
|
50
|
+
},
|
|
51
|
+
args: {
|
|
52
|
+
onclick: fn()
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const defaultArgs = {
|
|
57
|
+
backgroundColor: 'black',
|
|
58
|
+
color: 'white',
|
|
59
|
+
width: '400px',
|
|
60
|
+
height: '300px'
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const scrollableArgs = {
|
|
64
|
+
backgroundColor: 'black',
|
|
65
|
+
color: 'white',
|
|
66
|
+
width: '400px',
|
|
67
|
+
height: '200px'
|
|
68
|
+
};
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<!-- Basic stories -->
|
|
72
|
+
<Story
|
|
73
|
+
name="Default"
|
|
74
|
+
args={{
|
|
75
|
+
...defaultArgs
|
|
76
|
+
}}>Default section content</Story
|
|
77
|
+
>
|
|
78
|
+
|
|
79
|
+
<Story
|
|
80
|
+
name="With Borders"
|
|
81
|
+
args={{
|
|
82
|
+
borders: ['top', 'bottom'],
|
|
83
|
+
...defaultArgs
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
Section with top and bottom borders
|
|
87
|
+
</Story>
|
|
88
|
+
|
|
89
|
+
<Story
|
|
90
|
+
name="All Borders"
|
|
91
|
+
args={{
|
|
92
|
+
borders: ['top', 'bottom', 'left', 'right'],
|
|
93
|
+
...defaultArgs
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
Section with all borders
|
|
97
|
+
</Story>
|
|
98
|
+
|
|
99
|
+
<Story
|
|
100
|
+
name="Active"
|
|
101
|
+
args={{
|
|
102
|
+
active: true,
|
|
103
|
+
...defaultArgs
|
|
104
|
+
}}
|
|
105
|
+
>
|
|
106
|
+
Active section
|
|
107
|
+
</Story>
|
|
108
|
+
|
|
109
|
+
<Story
|
|
110
|
+
name="Clickable"
|
|
111
|
+
args={{
|
|
112
|
+
clickable: true,
|
|
113
|
+
...defaultArgs
|
|
114
|
+
}}
|
|
115
|
+
>
|
|
116
|
+
Clickable section - try clicking or using keyboard
|
|
117
|
+
</Story>
|
|
118
|
+
|
|
119
|
+
<Story
|
|
120
|
+
name="Disabled Clickable"
|
|
121
|
+
args={{
|
|
122
|
+
clickable: true,
|
|
123
|
+
disabled: true,
|
|
124
|
+
...defaultArgs
|
|
125
|
+
}}
|
|
126
|
+
>
|
|
127
|
+
Disabled clickable section
|
|
128
|
+
</Story>
|
|
129
|
+
|
|
130
|
+
<Story
|
|
131
|
+
name="Scrollable"
|
|
132
|
+
args={{
|
|
133
|
+
scrollable: true,
|
|
134
|
+
...defaultArgs
|
|
135
|
+
}}
|
|
136
|
+
>
|
|
137
|
+
<div style=" width:100%">
|
|
138
|
+
<h3 style="margin: 0 0 12px 0; color: white; font-size: 16px;">Scrollable Content Test</h3>
|
|
139
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">
|
|
140
|
+
This is scrollable content that should overflow the container.
|
|
141
|
+
</p>
|
|
142
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 2 of content</p>
|
|
143
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 3 of content</p>
|
|
144
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 4 of content</p>
|
|
145
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 5 of content</p>
|
|
146
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 6 of content</p>
|
|
147
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 7 of content</p>
|
|
148
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 8 of content</p>
|
|
149
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 9 of content</p>
|
|
150
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 10 of content</p>
|
|
151
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 11 of content</p>
|
|
152
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 12 of content</p>
|
|
153
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 13 of content</p>
|
|
154
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 14 of content</p>
|
|
155
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 15 of content</p>
|
|
156
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 16 of content</p>
|
|
157
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 17 of content</p>
|
|
158
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 18 of content</p>
|
|
159
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">Line 19 of content</p>
|
|
160
|
+
<p style="margin: 8px 0; color: #ccc; line-height: 1.4;">This should be scrollable! 🎯</p>
|
|
161
|
+
</div>
|
|
162
|
+
</Story>
|
|
163
|
+
|
|
164
|
+
<Story
|
|
165
|
+
name="With Tooltip"
|
|
166
|
+
args={{
|
|
167
|
+
tooltip: {
|
|
168
|
+
message: 'This is a helpful tooltip message',
|
|
169
|
+
placement: 'top',
|
|
170
|
+
...defaultArgs
|
|
171
|
+
}
|
|
172
|
+
}}
|
|
173
|
+
>
|
|
174
|
+
Section with custom tooltip - hover to see
|
|
175
|
+
</Story>
|
|
176
|
+
|
|
177
|
+
<Story
|
|
178
|
+
name="Disabled in Edit Mode"
|
|
179
|
+
args={{
|
|
180
|
+
disabledMessage:
|
|
181
|
+
'This option is disabled in edit mode. If you want to change it, please generate a new Component.',
|
|
182
|
+
...defaultArgs
|
|
183
|
+
}}
|
|
184
|
+
>
|
|
185
|
+
Section disabled in edit mode - hover to see warning
|
|
186
|
+
</Story>
|
|
187
|
+
|
|
188
|
+
<Story
|
|
189
|
+
name="Combined Features"
|
|
190
|
+
args={{
|
|
191
|
+
clickable: true,
|
|
192
|
+
active: true,
|
|
193
|
+
borders: ['top', 'bottom'],
|
|
194
|
+
scrollable: true,
|
|
195
|
+
width: '400px',
|
|
196
|
+
height: '120px', // Small height to force scrolling
|
|
197
|
+
backgroundColor: 'black'
|
|
198
|
+
}}
|
|
199
|
+
>
|
|
200
|
+
<div style="padding: 12px;">
|
|
201
|
+
<p style="margin: 4px 0; color: white;">
|
|
202
|
+
Combined features: clickable, active, bordered, and scrollable
|
|
203
|
+
</p>
|
|
204
|
+
<p style="margin: 4px 0; color: #ccc;">More content to scroll through</p>
|
|
205
|
+
<p style="margin: 4px 0; color: #ccc;">Even more content here</p>
|
|
206
|
+
<p style="margin: 4px 0; color: #ccc;">Additional line of text</p>
|
|
207
|
+
<p style="margin: 4px 0; color: #ccc;">Last line of content</p>
|
|
208
|
+
</div>
|
|
209
|
+
</Story>
|
|
210
|
+
|
|
211
|
+
<Story
|
|
212
|
+
name="Complex Layout"
|
|
213
|
+
args={{
|
|
214
|
+
...defaultArgs
|
|
215
|
+
}}
|
|
216
|
+
>
|
|
217
|
+
<div class="space-y-4">
|
|
218
|
+
<h3 class="text-lg font-semibold">Complex Content</h3>
|
|
219
|
+
<p>This section contains various UI elements:</p>
|
|
220
|
+
<button class="px-3 py-1 bg-blue-500 text-white rounded">Button</button>
|
|
221
|
+
<input type="text" placeholder="Input field" class="border rounded px-2 py-1" />
|
|
222
|
+
<select class="border rounded px-2 py-1">
|
|
223
|
+
<option>Select option</option>
|
|
224
|
+
</select>
|
|
225
|
+
</div>
|
|
226
|
+
</Story>
|
|
227
|
+
|
|
228
|
+
<Story
|
|
229
|
+
name="Interactive Demo"
|
|
230
|
+
args={{
|
|
231
|
+
clickable: true,
|
|
232
|
+
borders: ['left'],
|
|
233
|
+
...defaultArgs
|
|
234
|
+
}}
|
|
235
|
+
>
|
|
236
|
+
<div class="p-2">
|
|
237
|
+
<h4 class="font-medium mb-2">Interactive Demo</h4>
|
|
238
|
+
<p class="text-sm text-gray-600">
|
|
239
|
+
Click this section or use keyboard navigation (Tab + Enter/Space)
|
|
240
|
+
</p>
|
|
241
|
+
</div>
|
|
242
|
+
</Story>
|
|
243
|
+
|
|
244
|
+
<Story
|
|
245
|
+
name="Accessibility Test"
|
|
246
|
+
args={{
|
|
247
|
+
clickable: true,
|
|
248
|
+
borders: ['all'],
|
|
249
|
+
...defaultArgs
|
|
250
|
+
}}
|
|
251
|
+
>
|
|
252
|
+
Accessibility test - proper ARIA attributes and keyboard support
|
|
253
|
+
</Story>
|
|
254
|
+
|
|
255
|
+
<Story
|
|
256
|
+
name="Hidden"
|
|
257
|
+
args={{
|
|
258
|
+
hide: true,
|
|
259
|
+
...defaultArgs
|
|
260
|
+
}}
|
|
261
|
+
>
|
|
262
|
+
This section is hidden
|
|
263
|
+
</Story>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default Section;
|
|
2
|
+
type Section = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const Section: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import Section from './Section.svelte';
|
|
15
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
+
$$bindings?: Bindings;
|
|
18
|
+
} & Exports;
|
|
19
|
+
(internal: unknown, props: {
|
|
20
|
+
$$events?: Events;
|
|
21
|
+
$$slots?: Slots;
|
|
22
|
+
}): Exports & {
|
|
23
|
+
$set?: any;
|
|
24
|
+
$on?: any;
|
|
25
|
+
};
|
|
26
|
+
z_$$bindings?: Bindings;
|
|
27
|
+
}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import 'overlayscrollbars/overlayscrollbars.css';
|
|
3
|
+
|
|
4
|
+
import type { PartialOptions } from 'overlayscrollbars';
|
|
5
|
+
import { OverlayScrollbarsComponent } from 'overlayscrollbars-svelte';
|
|
6
|
+
|
|
7
|
+
import { BRAND } from '../../../utils';
|
|
8
|
+
|
|
9
|
+
import { WarningCircleOutlineIcon } from '../../icons';
|
|
10
|
+
import { Tooltip } from '../tooltip';
|
|
11
|
+
import type { SectionProps } from './types.js';
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
hide = false,
|
|
15
|
+
borders = [],
|
|
16
|
+
active = false,
|
|
17
|
+
clickable = false,
|
|
18
|
+
disabled = false,
|
|
19
|
+
scrollable = false,
|
|
20
|
+
width,
|
|
21
|
+
height,
|
|
22
|
+
backgroundColor,
|
|
23
|
+
padding = 'var(--Spacing-12, 12px)',
|
|
24
|
+
gap = 'var(--Spacing-8, 8px)',
|
|
25
|
+
class: className = '',
|
|
26
|
+
tooltip,
|
|
27
|
+
disabledMessage,
|
|
28
|
+
disabledTooltipWidth = '249px',
|
|
29
|
+
children,
|
|
30
|
+
onclick,
|
|
31
|
+
onkeydown,
|
|
32
|
+
onmouseover,
|
|
33
|
+
onmouseleave,
|
|
34
|
+
onfocus,
|
|
35
|
+
onblur,
|
|
36
|
+
...restProps
|
|
37
|
+
}: SectionProps = $props();
|
|
38
|
+
|
|
39
|
+
// Generate unique ID using $state for reactivity
|
|
40
|
+
let uniqueId = $state(crypto.randomUUID());
|
|
41
|
+
|
|
42
|
+
// Component state
|
|
43
|
+
let sectionElement: HTMLDivElement | undefined = $state();
|
|
44
|
+
|
|
45
|
+
// Handle click events
|
|
46
|
+
function handleClick(event: MouseEvent) {
|
|
47
|
+
if (disabled || !clickable) return;
|
|
48
|
+
onclick?.(event);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Handle keyboard events
|
|
52
|
+
function handleKeydown(event: KeyboardEvent) {
|
|
53
|
+
if (disabled || !clickable) return;
|
|
54
|
+
|
|
55
|
+
// Activate on Enter or Space
|
|
56
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
// Call the click handler directly for better test compatibility
|
|
59
|
+
handleClick(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
onkeydown?.(event);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Handle other events
|
|
66
|
+
function handleMouseOver(event: MouseEvent) {
|
|
67
|
+
if (disabled) return;
|
|
68
|
+
onmouseover?.(event);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function handleMouseLeave(event: MouseEvent) {
|
|
72
|
+
if (disabled) return;
|
|
73
|
+
onmouseleave?.(event);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function handleFocus(event: FocusEvent) {
|
|
77
|
+
if (disabled) return;
|
|
78
|
+
onfocus?.(event);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function handleBlur(event: FocusEvent) {
|
|
82
|
+
if (disabled) return;
|
|
83
|
+
onblur?.(event);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Computed classes
|
|
87
|
+
let computedClasses = $derived.by(() => {
|
|
88
|
+
const classes = ['section-wrap'];
|
|
89
|
+
|
|
90
|
+
if (active) classes.push('active');
|
|
91
|
+
if (clickable) classes.push('clickable');
|
|
92
|
+
if (disabled || disabledMessage) classes.push('disabled');
|
|
93
|
+
if (scrollable) classes.push('scrollable');
|
|
94
|
+
if (disabledMessage) classes.push('disabled-in-edit-mode');
|
|
95
|
+
if (className) classes.push(className);
|
|
96
|
+
|
|
97
|
+
// Add border classes
|
|
98
|
+
borders.forEach((border) => {
|
|
99
|
+
classes.push(`border-${border}`);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
return classes.join(' ');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// Computed inline styles
|
|
106
|
+
let computedStyles = $derived.by(() => {
|
|
107
|
+
const styles: Record<string, string> = {};
|
|
108
|
+
|
|
109
|
+
if (width) styles.width = width;
|
|
110
|
+
if (height) styles.height = height;
|
|
111
|
+
if (backgroundColor) styles['background-color'] = backgroundColor;
|
|
112
|
+
if (padding) styles.padding = padding;
|
|
113
|
+
if (gap) styles.gap = gap;
|
|
114
|
+
|
|
115
|
+
return styles;
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// Determine accessibility attributes based on clickable state
|
|
119
|
+
let role = $derived(clickable ? 'button' : undefined);
|
|
120
|
+
let tabindex = $derived(clickable ? (disabled ? -1 : 0) : undefined);
|
|
121
|
+
let ariaDisabled = $derived(clickable ? disabled : undefined);
|
|
122
|
+
|
|
123
|
+
// Determine tooltip configuration
|
|
124
|
+
let shouldShowTooltip = $derived(!!tooltip?.message || !!tooltip?.tooltipContent);
|
|
125
|
+
let shouldShowDisabledTooltip = $derived(!!disabledMessage);
|
|
126
|
+
let hasAnyTooltip = $derived(shouldShowTooltip || shouldShowDisabledTooltip);
|
|
127
|
+
|
|
128
|
+
// Default disabled message
|
|
129
|
+
let defaultDisabledMessage = $derived(
|
|
130
|
+
disabledMessage ||
|
|
131
|
+
`This option is disabled in edit mode. If you want to change it, please generate a new ${BRAND.COMPONENT}.`
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
// OverlayScrollbars options
|
|
135
|
+
let overlayScrollbarsOptions: PartialOptions = {
|
|
136
|
+
overflow: {
|
|
137
|
+
x: 'hidden',
|
|
138
|
+
y: 'scroll'
|
|
139
|
+
},
|
|
140
|
+
scrollbars: {
|
|
141
|
+
theme: 'os-theme-dark',
|
|
142
|
+
visibility: 'auto',
|
|
143
|
+
autoHide: 'never',
|
|
144
|
+
autoHideDelay: 800
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
</script>
|
|
148
|
+
|
|
149
|
+
{#snippet sectionContent()}
|
|
150
|
+
<div
|
|
151
|
+
bind:this={sectionElement}
|
|
152
|
+
id={uniqueId}
|
|
153
|
+
class={computedClasses}
|
|
154
|
+
style={Object.keys(computedStyles).length > 0
|
|
155
|
+
? Object.entries(computedStyles)
|
|
156
|
+
.map(([key, value]) => `${key}: ${value}`)
|
|
157
|
+
.join('; ')
|
|
158
|
+
: undefined}
|
|
159
|
+
{role}
|
|
160
|
+
{...clickable ? { tabindex } : {}}
|
|
161
|
+
aria-disabled={ariaDisabled}
|
|
162
|
+
onclick={handleClick}
|
|
163
|
+
onkeydown={handleKeydown}
|
|
164
|
+
onmouseover={handleMouseOver}
|
|
165
|
+
onmouseleave={handleMouseLeave}
|
|
166
|
+
onfocus={handleFocus}
|
|
167
|
+
onblur={handleBlur}
|
|
168
|
+
{...restProps}
|
|
169
|
+
>
|
|
170
|
+
{#if scrollable}
|
|
171
|
+
<OverlayScrollbarsComponent options={overlayScrollbarsOptions} defer>
|
|
172
|
+
{#if children}
|
|
173
|
+
{@render children()}
|
|
174
|
+
{/if}
|
|
175
|
+
</OverlayScrollbarsComponent>
|
|
176
|
+
{:else if children}
|
|
177
|
+
{@render children()}
|
|
178
|
+
{/if}
|
|
179
|
+
</div>
|
|
180
|
+
{/snippet}
|
|
181
|
+
|
|
182
|
+
{#if !hide}
|
|
183
|
+
{#if shouldShowDisabledTooltip}
|
|
184
|
+
<Tooltip
|
|
185
|
+
tooltipIcon={WarningCircleOutlineIcon}
|
|
186
|
+
tooltipIconColor="var(--yellowText)"
|
|
187
|
+
message={defaultDisabledMessage}
|
|
188
|
+
width={disabledTooltipWidth}
|
|
189
|
+
>
|
|
190
|
+
{#snippet target()}
|
|
191
|
+
{@render sectionContent()}
|
|
192
|
+
{/snippet}
|
|
193
|
+
</Tooltip>
|
|
194
|
+
{:else if shouldShowTooltip}
|
|
195
|
+
<Tooltip {...tooltip}>
|
|
196
|
+
{#snippet target()}
|
|
197
|
+
{@render sectionContent()}
|
|
198
|
+
{/snippet}
|
|
199
|
+
</Tooltip>
|
|
200
|
+
{:else}
|
|
201
|
+
{@render sectionContent()}
|
|
202
|
+
{/if}
|
|
203
|
+
{/if}
|
|
204
|
+
|
|
205
|
+
<style>
|
|
206
|
+
.section-wrap {
|
|
207
|
+
display: flex;
|
|
208
|
+
flex-direction: column;
|
|
209
|
+
align-items: flex-start;
|
|
210
|
+
align-self: stretch;
|
|
211
|
+
position: relative;
|
|
212
|
+
border: 1px solid transparent;
|
|
213
|
+
transition:
|
|
214
|
+
opacity 0.2s ease,
|
|
215
|
+
background-color 0.2s ease,
|
|
216
|
+
transform 0.1s ease;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.section-wrap :global(.dropdown-wrapper) {
|
|
220
|
+
align-self: stretch;
|
|
221
|
+
justify-content: space-between;
|
|
222
|
+
width: 100%;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* Border styles */
|
|
226
|
+
.section-wrap.border-top {
|
|
227
|
+
border-top: 1px solid var(--border1);
|
|
228
|
+
}
|
|
229
|
+
.section-wrap.border-left {
|
|
230
|
+
border-left: 1px solid var(--border1);
|
|
231
|
+
}
|
|
232
|
+
.section-wrap.border-right {
|
|
233
|
+
border-right: 1px solid var(--border1);
|
|
234
|
+
}
|
|
235
|
+
.section-wrap.border-bottom {
|
|
236
|
+
border-bottom: 1px solid var(--border1);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* Clickable styles */
|
|
240
|
+
.section-wrap.clickable {
|
|
241
|
+
cursor: pointer;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.section-wrap.clickable:hover:not(.disabled) {
|
|
245
|
+
background: var(--defaultLightHover);
|
|
246
|
+
opacity: 0.8;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.section-wrap.clickable:active:not(.disabled) {
|
|
250
|
+
transform: translateY(1px);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.section-wrap.clickable:focus-visible {
|
|
254
|
+
outline: 2px solid var(--color-focus, #007bff);
|
|
255
|
+
outline-offset: 2px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* Active state */
|
|
259
|
+
.section-wrap.active {
|
|
260
|
+
border-bottom: 1px solid var(--background2);
|
|
261
|
+
background: var(--defaultLightActive);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/* Disabled state */
|
|
265
|
+
.section-wrap.disabled {
|
|
266
|
+
opacity: 0.6;
|
|
267
|
+
cursor: not-allowed;
|
|
268
|
+
pointer-events: none;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* Disabled in edit mode styles */
|
|
272
|
+
.section-wrap.disabled-in-edit-mode {
|
|
273
|
+
pointer-events: none;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.section-wrap.disabled-in-edit-mode :global(.label-popup .labels span) {
|
|
277
|
+
opacity: 1;
|
|
278
|
+
pointer-events: none;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/* Make sure disabled state overrides any other cursor styles */
|
|
282
|
+
.section-wrap.disabled,
|
|
283
|
+
.section-wrap.disabled:hover,
|
|
284
|
+
.section-wrap.disabled:active,
|
|
285
|
+
.section-wrap.disabled:focus {
|
|
286
|
+
cursor: not-allowed !important;
|
|
287
|
+
pointer-events: none !important;
|
|
288
|
+
opacity: 0.6 !important;
|
|
289
|
+
transform: none !important;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.section-wrap.scrollable :global([data-overlayscrollbars-initialize]) {
|
|
293
|
+
width: 100% !important;
|
|
294
|
+
height: 100% !important;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* Scrollable content styles */
|
|
298
|
+
.section-wrap.scrollable {
|
|
299
|
+
overflow: hidden; /* Let OverlayScrollbars handle the overflow */
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* OverlayScrollbars dark theme customization using design system */
|
|
303
|
+
.section-wrap :global(.os-scrollbar) {
|
|
304
|
+
--os-size: var(--sb-size, 6px);
|
|
305
|
+
--os-padding-perpendicular: 2px;
|
|
306
|
+
--os-padding-axis: 2px;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.section-wrap :global(.os-scrollbar-track) {
|
|
310
|
+
background: var(--sb-track-color);
|
|
311
|
+
border-radius: 4px;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.section-wrap :global(.os-scrollbar-handle) {
|
|
315
|
+
background: var(--sb-thumb-color);
|
|
316
|
+
border-radius: 4px;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.section-wrap :global(.os-scrollbar-handle:hover) {
|
|
320
|
+
background: var(--background3);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.section-wrap :global(.os-scrollbar-handle:active) {
|
|
324
|
+
background: var(--background2);
|
|
325
|
+
}
|
|
326
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Section } from './Section.svelte';
|