@eturnity/eturnity_reusable_components 9.22.2 → 9.25.1
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/dist/index.es3.js +268 -156
- package/package.json +3 -3
- package/src/assets/svgIcons/add_thin_icon.svg +3 -0
- package/src/assets/svgIcons/delete.svg +2 -3
- package/src/assets/svgIcons/location_outline.svg +3 -0
- package/src/assets/svgIcons/redo.svg +2 -5
- package/src/assets/svgIcons/save.svg +2 -2
- package/src/assets/svgIcons/subtract_thin_icon.svg +3 -0
- package/src/assets/svgIcons/undo.svg +2 -5
- package/src/assets/theme.js +202 -90
- package/src/components/accordion/Accordion.stories.js +1 -1
- package/src/components/addNewButton/AddNewButton.stories.js +40 -8
- package/src/components/banner/actionBanner/ActionBanner.stories.js +1 -1
- package/src/components/banner/actionBanner/index.vue +4 -2
- package/src/components/banner/banner/Banner.stories.js +1 -1
- package/src/components/banner/infoBanner/InfoBanner.stories.js +1 -1
- package/src/components/banner/infoBanner/index.vue +4 -2
- package/src/components/banner/notificationBanner/notificationBanner.stories.js +81 -0
- package/src/components/buttons/buttonIcon/index.vue +213 -81
- package/src/components/buttons/closeButton/CloseButton.stories.js +1 -1
- package/src/components/buttons/collection/index.vue +1 -3
- package/src/components/buttons/mainButton/index.vue +99 -45
- package/src/components/buttons/splitButtons/splitButtons.stories.js +70 -0
- package/src/components/card/Card.stories.js +16 -4
- package/src/components/card/index.vue +1 -1
- package/src/components/collapsableInfoText/collapsableInfoText.stories.js +52 -0
- package/src/components/deleteIcon/DeleteIcon.stories.js +1 -1
- package/src/components/draggableCard/draggableCard.stories.js +1 -1
- package/src/components/draggableInputHandle/draggableInputHandle.stories.js +43 -0
- package/src/components/dropdown/Dropdown.stories.js +1 -1
- package/src/components/errorMessage/errorMessage.stories.js +31 -17
- package/src/components/filter/filterSettings.vue +1 -1
- package/src/components/icon/Icon.stories.js +1 -1
- package/src/components/iconWrapper/iconWrapper.stories.js +78 -0
- package/src/components/infoCard/InfoCard.stories.js +1 -1
- package/src/components/infoLabel/infoLabel.stories.js +61 -0
- package/src/components/infoText/infoText.stories.js +1 -1
- package/src/components/inputs/checkbox/Checkbox.stories.js +1 -1
- package/src/components/inputs/checkbox/index.vue +10 -1
- package/src/components/inputs/colorSelector/ColorSelector.stories.js +78 -0
- package/src/components/inputs/colorSelector/colorSelector.spec.js +73 -0
- package/src/components/inputs/colorSelector/defaultProps.js +11 -0
- package/src/components/inputs/colorSelector/index.vue +224 -0
- package/src/components/inputs/inputNumber/InputNumber.stories.js +1 -1
- package/src/components/inputs/inputNumber/index.vue +69 -59
- package/src/components/inputs/inputNumberQuestion/inputNumberQuestion.stories.js +77 -0
- package/src/components/inputs/inputText/InputText.stories.js +1 -1
- package/src/components/inputs/inputText/index.vue +29 -20
- package/src/components/inputs/isRequiredLabelStar/isRequiredLabelStar.stories.js +26 -0
- package/src/components/inputs/radioButton/RadioButton.stories.js +1 -1
- package/src/components/inputs/radioButton/index.vue +21 -7
- package/src/components/inputs/searchInput/SearchInput.stories.js +1 -1
- package/src/components/inputs/select/index.vue +33 -21
- package/src/components/inputs/select/option/index.vue +1 -1
- package/src/components/inputs/select/select.stories.js +4 -25
- package/src/components/inputs/shared/inputLabelTypography.js +7 -0
- package/src/components/inputs/slider/index.vue +9 -12
- package/src/components/inputs/slider/slider.stories.js +71 -0
- package/src/components/inputs/switchField/index.vue +38 -10
- package/src/components/inputs/switchField/switchField.stories.js +72 -0
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +1 -1
- package/src/components/inputs/textAreaInput/index.vue +19 -6
- package/src/components/inputs/toggle/Toggle.stories.js +1 -1
- package/src/components/inputs/toggle/index.vue +10 -6
- package/src/components/label/index.vue +39 -11
- package/src/components/label/label.stories.js +69 -0
- package/src/components/markerItem/markerItem.stories.js +46 -0
- package/src/components/modals/actionModal/actionModal.stories.js +1 -1
- package/src/components/modals/actionModal/index.vue +1 -1
- package/src/components/modals/infoModal/index.vue +1 -10
- package/src/components/modals/infoModal/infoModal.stories.js +1 -1
- package/src/components/modals/modal/modal.spec.js +168 -0
- package/src/components/modals/modal/modal.stories.js +287 -26
- package/src/components/modals/modalBody/index.vue +30 -0
- package/src/components/modals/modalButtonContainer/index.vue +42 -0
- package/src/components/modals/modalButtonContainer/modalButtonContainer.stories.js +59 -0
- package/src/components/modals/modalContent/index.vue +125 -0
- package/src/components/modals/modalTitle/index.vue +34 -0
- package/src/components/navigationTabs/navigationTabs.stories.js +58 -0
- package/src/components/pageSubtitle/PageSubtitle.stories.js +1 -1
- package/src/components/pageTitle/PageTitle.stories.js +1 -1
- package/src/components/pagination/pagination.stories.js +79 -0
- package/src/components/paginationV2/paginationV2.spec.js +132 -0
- package/src/components/paginationV2/paginationV2.stories.js +68 -0
- package/src/components/panelRangeInfo/panelRangeInfo.stories.js +60 -0
- package/src/components/progressBar/ProgressBar.stories.js +1 -1
- package/src/components/progressStep/progressStep.stories.js +1 -1
- package/src/components/projectMarker/ProjectMarker.stories.js +1 -1
- package/src/components/rangeSlider/RangeSlider.stories.js +1 -1
- package/src/components/roundTabs/roundTabs.stories.js +54 -0
- package/src/components/selectedOptions/selectedOptions.stories.js +1 -1
- package/src/components/sideMenu/sideMenu.stories.js +53 -0
- package/src/components/spinner/Spinner.stories.js +1 -1
- package/src/components/spinnerGif/SpinnerGif.stories.js +1 -1
- package/src/components/statusIndicator/statusIndicator.stories.js +101 -0
- package/src/components/tableDropdown/TableDropdown.stories.js +1 -1
- package/src/components/tables/viewTable/viewTable.stories.js +85 -0
- package/src/components/tabsHeader/TabsHeader.stories.js +1 -1
- package/src/components/tag/conversionTag/conversionTag.stories.js +47 -0
- package/src/components/tag/conversionTag/index.vue +1 -1
- package/src/components/tag/freeTrialTag/freeTrialTag.stories.js +42 -0
- package/src/components/threeDots/index.vue +20 -3
- package/src/components/threeDots/threeDots.stories.js +59 -0
- package/src/components/videoThumbnail/videoThumbnail.stories.js +1 -1
- package/src/constants/colorPalettes.js +71 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import SideMenu from './index.vue'
|
|
2
|
+
import theme from '@/assets/theme'
|
|
3
|
+
|
|
4
|
+
const flatMenu = [
|
|
5
|
+
{ key: 'dashboard', label: 'Dashboard', icon: 'House' },
|
|
6
|
+
{ key: 'projects', label: 'Projects', icon: 'House' },
|
|
7
|
+
{ key: 'settings', label: 'Settings', icon: 'House' },
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Components/Navigation/SideMenu',
|
|
12
|
+
component: SideMenu,
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'fullscreen',
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const Template = (args) => ({
|
|
20
|
+
components: { SideMenu },
|
|
21
|
+
setup() {
|
|
22
|
+
return { args }
|
|
23
|
+
},
|
|
24
|
+
template: `
|
|
25
|
+
<div data-test-id="side-menu-story" style="display: flex; min-height: 100vh; background: #f5f5f5;">
|
|
26
|
+
<aside style="width: 260px; background: white; border-right: 1px solid #e0e0e0;">
|
|
27
|
+
<SideMenu
|
|
28
|
+
v-bind="args"
|
|
29
|
+
@tab-click="() => {}"
|
|
30
|
+
/>
|
|
31
|
+
</aside>
|
|
32
|
+
<main style="flex: 1; padding: 24px;">Main content area</main>
|
|
33
|
+
</div>
|
|
34
|
+
`,
|
|
35
|
+
provide: {
|
|
36
|
+
theme,
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
export const FlatItems = Template.bind({})
|
|
41
|
+
FlatItems.args = {
|
|
42
|
+
tabsData: flatMenu,
|
|
43
|
+
activeTab: 'dashboard',
|
|
44
|
+
activeParentTab: null,
|
|
45
|
+
hasLogout: false,
|
|
46
|
+
appVersion: 'Storybook',
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const SecondActive = Template.bind({})
|
|
50
|
+
SecondActive.args = {
|
|
51
|
+
...FlatItems.args,
|
|
52
|
+
activeTab: 'projects',
|
|
53
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import StatusIndicator from './index.vue'
|
|
2
|
+
import theme from '@/assets/theme'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/StatusIndicator/StatusIndicator',
|
|
6
|
+
component: StatusIndicator,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
isDirty: { control: 'boolean', description: 'User has interacted' },
|
|
13
|
+
isActive: { control: 'boolean', description: 'Focused / active step' },
|
|
14
|
+
isError: { control: 'boolean' },
|
|
15
|
+
isWarning: { control: 'boolean' },
|
|
16
|
+
isDisabled: { control: 'boolean' },
|
|
17
|
+
size: { control: 'text' },
|
|
18
|
+
borderRadius: { control: 'text' },
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const Template = (args) => ({
|
|
23
|
+
components: { StatusIndicator },
|
|
24
|
+
setup() {
|
|
25
|
+
return { args }
|
|
26
|
+
},
|
|
27
|
+
template: `
|
|
28
|
+
<StatusIndicator v-bind="args">
|
|
29
|
+
{{ args.slotNumber }}
|
|
30
|
+
</StatusIndicator>
|
|
31
|
+
`,
|
|
32
|
+
provide: {
|
|
33
|
+
theme,
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
export const NeutralNotDirty = Template.bind({})
|
|
38
|
+
NeutralNotDirty.args = {
|
|
39
|
+
isDirty: false,
|
|
40
|
+
isActive: false,
|
|
41
|
+
isError: false,
|
|
42
|
+
isWarning: false,
|
|
43
|
+
isDisabled: false,
|
|
44
|
+
size: '28px',
|
|
45
|
+
slotNumber: '1',
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const ActiveInProgress = Template.bind({})
|
|
49
|
+
ActiveInProgress.args = {
|
|
50
|
+
isDirty: false,
|
|
51
|
+
isActive: true,
|
|
52
|
+
isError: false,
|
|
53
|
+
isWarning: false,
|
|
54
|
+
isDisabled: false,
|
|
55
|
+
size: '28px',
|
|
56
|
+
slotNumber: '2',
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const ValidComplete = Template.bind({})
|
|
60
|
+
ValidComplete.args = {
|
|
61
|
+
isDirty: true,
|
|
62
|
+
isActive: false,
|
|
63
|
+
isError: false,
|
|
64
|
+
isWarning: false,
|
|
65
|
+
isDisabled: false,
|
|
66
|
+
size: '28px',
|
|
67
|
+
slotNumber: '',
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const ErrorState = Template.bind({})
|
|
71
|
+
ErrorState.args = {
|
|
72
|
+
isDirty: true,
|
|
73
|
+
isActive: false,
|
|
74
|
+
isError: true,
|
|
75
|
+
isWarning: false,
|
|
76
|
+
isDisabled: false,
|
|
77
|
+
size: '28px',
|
|
78
|
+
slotNumber: '',
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const WarningState = Template.bind({})
|
|
82
|
+
WarningState.args = {
|
|
83
|
+
isDirty: true,
|
|
84
|
+
isActive: false,
|
|
85
|
+
isError: false,
|
|
86
|
+
isWarning: true,
|
|
87
|
+
isDisabled: false,
|
|
88
|
+
size: '28px',
|
|
89
|
+
slotNumber: '',
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export const Disabled = Template.bind({})
|
|
93
|
+
Disabled.args = {
|
|
94
|
+
isDirty: true,
|
|
95
|
+
isActive: false,
|
|
96
|
+
isError: false,
|
|
97
|
+
isWarning: false,
|
|
98
|
+
isDisabled: true,
|
|
99
|
+
size: '28px',
|
|
100
|
+
slotNumber: '4',
|
|
101
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import ViewTable from './index.vue'
|
|
2
|
+
import theme from '@/assets/theme'
|
|
3
|
+
|
|
4
|
+
const headerItems = [
|
|
5
|
+
{ value: 'Site' },
|
|
6
|
+
{ value: 'Capacity' },
|
|
7
|
+
{ value: 'Status' },
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
const tableItems = [
|
|
11
|
+
[
|
|
12
|
+
{ value: 'Zürich HQ' },
|
|
13
|
+
{ value: '450 kWp' },
|
|
14
|
+
{ value: 'Live' },
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
{ value: 'Bern depot' },
|
|
18
|
+
{ value: '120 kWp' },
|
|
19
|
+
{ value: 'Planning' },
|
|
20
|
+
],
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
title: 'Components/Tables/ViewTable',
|
|
25
|
+
component: ViewTable,
|
|
26
|
+
tags: ['autodocs'],
|
|
27
|
+
parameters: {
|
|
28
|
+
layout: 'padded',
|
|
29
|
+
},
|
|
30
|
+
argTypes: {
|
|
31
|
+
tableTitle: { control: 'text' },
|
|
32
|
+
fullWidth: { control: 'boolean' },
|
|
33
|
+
showDeleteButton: { control: 'boolean' },
|
|
34
|
+
isLoading: { control: 'boolean' },
|
|
35
|
+
emptyText: { control: 'text' },
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const Template = (args) => ({
|
|
40
|
+
components: { ViewTable },
|
|
41
|
+
setup() {
|
|
42
|
+
return { args }
|
|
43
|
+
},
|
|
44
|
+
template: `
|
|
45
|
+
<div data-test-id="view-table-story">
|
|
46
|
+
<ViewTable v-bind="args" />
|
|
47
|
+
</div>
|
|
48
|
+
`,
|
|
49
|
+
provide: {
|
|
50
|
+
theme,
|
|
51
|
+
},
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
export const WithData = Template.bind({})
|
|
55
|
+
WithData.args = {
|
|
56
|
+
headerItems,
|
|
57
|
+
tableItems,
|
|
58
|
+
tableTitle: 'Installed assets',
|
|
59
|
+
fullWidth: true,
|
|
60
|
+
showDeleteButton: false,
|
|
61
|
+
isLoading: false,
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const WithDeleteColumn = Template.bind({})
|
|
65
|
+
WithDeleteColumn.args = {
|
|
66
|
+
...WithData.args,
|
|
67
|
+
showDeleteButton: true,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const Loading = Template.bind({})
|
|
71
|
+
Loading.args = {
|
|
72
|
+
headerItems,
|
|
73
|
+
tableItems: [],
|
|
74
|
+
tableTitle: 'Refreshing…',
|
|
75
|
+
isLoading: true,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export const Empty = Template.bind({})
|
|
79
|
+
Empty.args = {
|
|
80
|
+
headerItems,
|
|
81
|
+
tableItems: [],
|
|
82
|
+
tableTitle: 'No matches',
|
|
83
|
+
emptyText: 'Adjust filters or clear search to see sites.',
|
|
84
|
+
isLoading: false,
|
|
85
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import ConversionTag from './index.vue'
|
|
2
|
+
import theme from '@/assets/theme'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Tag/ConversionTag',
|
|
6
|
+
component: ConversionTag,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
text: { control: 'text' },
|
|
13
|
+
isUpperCase: { control: 'boolean' },
|
|
14
|
+
dataId: { control: 'text' },
|
|
15
|
+
dataQaId: { control: 'text' },
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const Template = (args) => ({
|
|
20
|
+
components: { ConversionTag },
|
|
21
|
+
setup() {
|
|
22
|
+
return { args }
|
|
23
|
+
},
|
|
24
|
+
template: `
|
|
25
|
+
<div data-test-id="conversion-tag-story" style="padding: 16px;">
|
|
26
|
+
<ConversionTag v-bind="args" />
|
|
27
|
+
</div>
|
|
28
|
+
`,
|
|
29
|
+
provide: {
|
|
30
|
+
theme,
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
export const Default = Template.bind({})
|
|
35
|
+
Default.args = {
|
|
36
|
+
text: 'PRO',
|
|
37
|
+
isUpperCase: true,
|
|
38
|
+
dataId: 'conversion_tag',
|
|
39
|
+
dataQaId: 'conversion_tag',
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const MixedCaseLabel = Template.bind({})
|
|
43
|
+
MixedCaseLabel.args = {
|
|
44
|
+
...Default.args,
|
|
45
|
+
text: 'Beta',
|
|
46
|
+
isUpperCase: false,
|
|
47
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import FreeTrialTag from './index.vue'
|
|
2
|
+
import theme from '@/assets/theme'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Tag/FreeTrialTag',
|
|
6
|
+
component: FreeTrialTag,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
text: {
|
|
13
|
+
control: 'text',
|
|
14
|
+
description: 'Overrides default translated “free trial” label when set',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const Template = (args) => ({
|
|
20
|
+
components: { FreeTrialTag },
|
|
21
|
+
setup() {
|
|
22
|
+
return { args }
|
|
23
|
+
},
|
|
24
|
+
template: `
|
|
25
|
+
<div data-test-id="free-trial-tag-story" style="padding: 16px;">
|
|
26
|
+
<FreeTrialTag v-bind="args" />
|
|
27
|
+
</div>
|
|
28
|
+
`,
|
|
29
|
+
provide: {
|
|
30
|
+
theme,
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
export const Default = Template.bind({})
|
|
35
|
+
Default.args = {
|
|
36
|
+
text: '',
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const CustomLabel = Template.bind({})
|
|
40
|
+
CustomLabel.args = {
|
|
41
|
+
text: '14-day trial',
|
|
42
|
+
}
|
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
hoveredBackgroundColor: String,
|
|
153
153
|
}
|
|
154
154
|
const PageContainer = styled('div', PageContainerAttrs)`
|
|
155
|
+
position: relative;
|
|
155
156
|
display: grid;
|
|
156
157
|
align-items: center;
|
|
157
158
|
justify-items: center;
|
|
@@ -395,10 +396,26 @@
|
|
|
395
396
|
}
|
|
396
397
|
},
|
|
397
398
|
setContextMenuPosition() {
|
|
398
|
-
const
|
|
399
|
-
const
|
|
399
|
+
const dropdownRef = this.$refs.dropdownContainer
|
|
400
|
+
const pageRef = this.$refs.pageContainer
|
|
401
|
+
const contextMenu = dropdownRef?.$el ?? dropdownRef
|
|
402
|
+
const button = pageRef?.$el ?? pageRef
|
|
403
|
+
if (
|
|
404
|
+
!contextMenu ||
|
|
405
|
+
!button ||
|
|
406
|
+
typeof button.getBoundingClientRect !== 'function'
|
|
407
|
+
) {
|
|
408
|
+
return
|
|
409
|
+
}
|
|
400
410
|
const rectButton = button.getBoundingClientRect()
|
|
401
|
-
const relativeParent =
|
|
411
|
+
const relativeParent =
|
|
412
|
+
this.findRelativeParent(contextMenu) || document.documentElement
|
|
413
|
+
if (
|
|
414
|
+
!relativeParent ||
|
|
415
|
+
typeof relativeParent.getBoundingClientRect !== 'function'
|
|
416
|
+
) {
|
|
417
|
+
return
|
|
418
|
+
}
|
|
402
419
|
const rectRelativeParent = relativeParent.getBoundingClientRect()
|
|
403
420
|
|
|
404
421
|
const positionArray = this.determineElementQuarter(button, rectButton)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import ThreeDots from './index.vue'
|
|
2
|
+
import theme from '@/assets/theme'
|
|
3
|
+
|
|
4
|
+
const basicOptions = [
|
|
5
|
+
{ value: 'edit', name: 'Edit' },
|
|
6
|
+
{ value: 'duplicate', name: 'Duplicate' },
|
|
7
|
+
{ value: 'delete', name: 'Delete' },
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Components/ThreeDots/ThreeDots',
|
|
12
|
+
component: ThreeDots,
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'centered',
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
isLoading: { control: 'boolean' },
|
|
19
|
+
textWrap: { control: 'boolean' },
|
|
20
|
+
colorTheme: { control: 'select', options: ['light', 'dark'] },
|
|
21
|
+
iconColor: { control: 'text' },
|
|
22
|
+
rowIndex: { control: 'number' },
|
|
23
|
+
dataId: { control: 'text' },
|
|
24
|
+
dataQaId: { control: 'text' },
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const Template = (args) => ({
|
|
29
|
+
components: { ThreeDots },
|
|
30
|
+
setup() {
|
|
31
|
+
return { args }
|
|
32
|
+
},
|
|
33
|
+
template: `
|
|
34
|
+
<div data-test-id="three-dots-story" style="padding: 40px; display: flex; justify-content: flex-end;">
|
|
35
|
+
<ThreeDots v-bind="args" />
|
|
36
|
+
</div>
|
|
37
|
+
`,
|
|
38
|
+
provide: {
|
|
39
|
+
theme,
|
|
40
|
+
},
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
export const Default = Template.bind({})
|
|
44
|
+
Default.args = {
|
|
45
|
+
options: basicOptions,
|
|
46
|
+
isLoading: false,
|
|
47
|
+
textWrap: true,
|
|
48
|
+
colorTheme: 'light',
|
|
49
|
+
iconColor: '#263238',
|
|
50
|
+
rowIndex: 0,
|
|
51
|
+
dataId: 'row_actions',
|
|
52
|
+
dataQaId: 'row_actions',
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const Loading = Template.bind({})
|
|
56
|
+
Loading.args = {
|
|
57
|
+
...Default.args,
|
|
58
|
+
isLoading: true,
|
|
59
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import theme from '@/assets/theme.js'
|
|
2
|
+
|
|
3
|
+
/** Fully transparent fill (used with cross icon in ColorSelector). */
|
|
4
|
+
export const TRANSPARENT_COLOR = '#ffffff00'
|
|
5
|
+
|
|
6
|
+
export const THEME_COLORS = [
|
|
7
|
+
theme.colors.black,
|
|
8
|
+
theme.colors.grey1,
|
|
9
|
+
theme.colors.blue,
|
|
10
|
+
theme.colors.red,
|
|
11
|
+
theme.colors.green,
|
|
12
|
+
theme.colors.yellow,
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
/** Shared palette for blueprint arrows and 3D roof plan items. */
|
|
16
|
+
export const DRAWING_ITEM_COLORS = [
|
|
17
|
+
theme.semanticColors.red[400],
|
|
18
|
+
theme.semanticColors.red[600],
|
|
19
|
+
theme.semanticColors.blue[400],
|
|
20
|
+
theme.semanticColors.blue[600],
|
|
21
|
+
theme.semanticColors.green[400],
|
|
22
|
+
theme.semanticColors.green[600],
|
|
23
|
+
theme.semanticColors.purple[400],
|
|
24
|
+
theme.semanticColors.purple[600],
|
|
25
|
+
theme.semanticColors.yellow[400],
|
|
26
|
+
theme.semanticColors.yellow[600],
|
|
27
|
+
theme.semanticColors.teal[400],
|
|
28
|
+
theme.semanticColors.grey[400],
|
|
29
|
+
theme.colors.black,
|
|
30
|
+
theme.colors.white,
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
export const ARROW_COLORS = DRAWING_ITEM_COLORS
|
|
34
|
+
|
|
35
|
+
export const ROOF_PLAN_ITEM_COLORS = DRAWING_ITEM_COLORS
|
|
36
|
+
|
|
37
|
+
export const PANEL_FILL_COLORS = [
|
|
38
|
+
TRANSPARENT_COLOR,
|
|
39
|
+
theme.semanticColors.red[400],
|
|
40
|
+
theme.semanticColors.red[600],
|
|
41
|
+
theme.semanticColors.blue[400],
|
|
42
|
+
theme.semanticColors.blue[600],
|
|
43
|
+
theme.semanticColors.green[400],
|
|
44
|
+
theme.semanticColors.green[600],
|
|
45
|
+
theme.semanticColors.purple[400],
|
|
46
|
+
theme.semanticColors.purple[600],
|
|
47
|
+
theme.semanticColors.yellow[400],
|
|
48
|
+
theme.semanticColors.yellow[600],
|
|
49
|
+
theme.semanticColors.teal[400],
|
|
50
|
+
theme.semanticColors.grey[400],
|
|
51
|
+
theme.colors.black,
|
|
52
|
+
theme.colors.white,
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
export const PANEL_STROKE_COLORS = [
|
|
56
|
+
TRANSPARENT_COLOR,
|
|
57
|
+
theme.semanticColors.red[400],
|
|
58
|
+
theme.semanticColors.red[600],
|
|
59
|
+
theme.semanticColors.blue[400],
|
|
60
|
+
theme.semanticColors.blue[600],
|
|
61
|
+
theme.semanticColors.green[400],
|
|
62
|
+
theme.semanticColors.green[600],
|
|
63
|
+
theme.semanticColors.purple[400],
|
|
64
|
+
theme.semanticColors.purple[600],
|
|
65
|
+
theme.semanticColors.yellow[400],
|
|
66
|
+
theme.semanticColors.yellow[600],
|
|
67
|
+
theme.semanticColors.teal[400],
|
|
68
|
+
theme.semanticColors.grey[400],
|
|
69
|
+
theme.colors.black,
|
|
70
|
+
theme.colors.white,
|
|
71
|
+
]
|