sprintify-ui 0.8.34 → 0.8.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/sprintify-ui.es.js +7597 -7492
- package/dist/types/components/BaseActionItem.vue.d.ts +12 -2
- package/dist/types/components/BaseActionItemButton.vue.d.ts +3 -3
- package/dist/types/components/BaseAddressForm.vue.d.ts +19 -19
- package/dist/types/components/BaseAlert.vue.d.ts +19 -17
- package/dist/types/components/BaseApp.vue.d.ts +4 -2
- package/dist/types/components/BaseAppDialogs.vue.d.ts +2 -2
- package/dist/types/components/BaseAutocomplete.vue.d.ts +47 -44
- package/dist/types/components/BaseAutocompleteDrawer.vue.d.ts +22 -19
- package/dist/types/components/BaseAutocompleteFetch.vue.d.ts +44 -41
- package/dist/types/components/BaseAvatar.vue.d.ts +4 -4
- package/dist/types/components/BaseAvatarGroup.vue.d.ts +1 -1
- package/dist/types/components/BaseBadge.vue.d.ts +22 -19
- package/dist/types/components/BaseBelongsTo.vue.d.ts +38 -35
- package/dist/types/components/BaseBelongsToFetch.vue.d.ts +39 -36
- package/dist/types/components/BaseButton.vue.d.ts +54 -31
- package/dist/types/components/BaseButtonGroup.vue.d.ts +22 -19
- package/dist/types/components/BaseCalendar.vue.d.ts +24 -22
- package/dist/types/components/BaseCard.vue.d.ts +6 -4
- package/dist/types/components/BaseCardRow.vue.d.ts +9 -7
- package/dist/types/components/BaseCharacterCounter.vue.d.ts +1 -1
- package/dist/types/components/BaseClipboard.vue.d.ts +6 -4
- package/dist/types/components/BaseCollapse.vue.d.ts +34 -32
- package/dist/types/components/BaseColor.vue.d.ts +5 -4
- package/dist/types/components/BaseContainer.vue.d.ts +19 -13
- package/dist/types/components/BaseCounter.vue.d.ts +1 -1
- package/dist/types/components/BaseCropper.vue.d.ts +24 -22
- package/dist/types/components/BaseCropperModal.vue.d.ts +4 -4
- package/dist/types/components/BaseDataIterator.vue.d.ts +13 -24
- package/dist/types/components/BaseDataIteratorSectionBox.vue.d.ts +6 -4
- package/dist/types/components/BaseDataIteratorSectionColumns.vue.d.ts +3 -818
- package/dist/types/components/BaseDataIteratorSectionModal.vue.d.ts +6 -4
- package/dist/types/components/BaseDataTable.vue.d.ts +37 -40
- package/dist/types/components/BaseDataTableRowAction.vue.d.ts +2 -2
- package/dist/types/components/BaseDataTableTemplate.vue.d.ts +28 -25
- package/dist/types/components/BaseDatePicker.vue.d.ts +33 -33
- package/dist/types/components/BaseDateSelect.vue.d.ts +3 -2
- package/dist/types/components/BaseDescriptionList.vue.d.ts +4 -2
- package/dist/types/components/BaseDescriptionListItem.vue.d.ts +4 -2
- package/dist/types/components/BaseDialog.vue.d.ts +9 -7
- package/dist/types/components/BaseDisplayRelativeTime.vue.d.ts +9 -7
- package/dist/types/components/BaseDraggable.vue.d.ts +10 -8
- package/dist/types/components/BaseDropdown.vue.d.ts +10 -8
- package/dist/types/components/BaseDropdownAutocomplete.vue.d.ts +20 -18
- package/dist/types/components/BaseField.vue.d.ts +11 -8
- package/dist/types/components/BaseFieldI18n.vue.d.ts +6 -6
- package/dist/types/components/BaseFilePicker.vue.d.ts +24 -22
- package/dist/types/components/BaseFilePickerCrop.vue.d.ts +18 -16
- package/dist/types/components/BaseFileUploader.vue.d.ts +58 -56
- package/dist/types/components/BaseForm.vue.d.ts +21 -19
- package/dist/types/components/BaseGantt.vue.d.ts +20 -411
- package/dist/types/components/BaseHasMany.vue.d.ts +39 -37
- package/dist/types/components/BaseHeader.vue.d.ts +20 -20
- package/dist/types/components/BaseIconPicker.vue.d.ts +7 -7
- package/dist/types/components/BaseInput.vue.d.ts +32 -31
- package/dist/types/components/BaseInputError.vue.d.ts +9 -6
- package/dist/types/components/BaseInputLabel.vue.d.ts +3 -2
- package/dist/types/components/BaseInputPercent.vue.d.ts +8 -8
- package/dist/types/components/BaseJsonReader.vue.d.ts +7 -7
- package/dist/types/components/BaseJsonReaderItem.vue.d.ts +4 -4
- package/dist/types/components/BaseLayoutNotificationDropdown.vue.d.ts +1 -1
- package/dist/types/components/BaseLayoutSidebar.vue.d.ts +13 -10
- package/dist/types/components/BaseLayoutSidebarConfigurable.vue.d.ts +10 -8
- package/dist/types/components/BaseLayoutStacked.vue.d.ts +25 -23
- package/dist/types/components/BaseLayoutStackedConfigurable.vue.d.ts +9 -7
- package/dist/types/components/BaseLoadingCover.vue.d.ts +3 -3
- package/dist/types/components/BaseMediaGallery.vue.d.ts +1 -1
- package/dist/types/components/BaseMediaLibrary.vue.d.ts +39 -38
- package/dist/types/components/BaseMediaList.vue.d.ts +1 -1
- package/dist/types/components/BaseMediaListItem.vue.d.ts +1 -1
- package/dist/types/components/BaseMediaPictures.vue.d.ts +1 -1
- package/dist/types/components/BaseMenu.vue.d.ts +26 -18
- package/dist/types/components/BaseMenuItem.vue.d.ts +5 -5
- package/dist/types/components/BaseModalCenter.vue.d.ts +8 -6
- package/dist/types/components/BaseModalSide.vue.d.ts +8 -6
- package/dist/types/components/BaseNavbar.vue.d.ts +17 -15
- package/dist/types/components/BaseNavbarItem.vue.d.ts +1 -1
- package/dist/types/components/BaseNavbarItemContent.vue.d.ts +4 -4
- package/dist/types/components/BaseNavbarSideItem.vue.d.ts +1 -1
- package/dist/types/components/BaseNavbarSideItemContent.vue.d.ts +4 -4
- package/dist/types/components/BasePanel.vue.d.ts +1 -1
- package/dist/types/components/BasePassword.vue.d.ts +6 -5
- package/dist/types/components/BaseProgressCircle.vue.d.ts +2 -2
- package/dist/types/components/BaseRadioGroup.vue.d.ts +10 -8
- package/dist/types/components/BaseReadMore.vue.d.ts +6 -4
- package/dist/types/components/BaseRichText.vue.d.ts +6 -5
- package/dist/types/components/BaseScrollColumn.vue.d.ts +1 -1
- package/dist/types/components/BaseSelect.vue.d.ts +13 -10
- package/dist/types/components/BaseShortcut.vue.d.ts +4 -4
- package/dist/types/components/BaseSideNavigation.vue.d.ts +8 -6
- package/dist/types/components/BaseSideNavigationItem.vue.d.ts +12 -10
- package/dist/types/components/BaseStatistic.vue.d.ts +1 -1
- package/dist/types/components/BaseSwitch.vue.d.ts +14 -12
- package/dist/types/components/BaseSystemAlert.vue.d.ts +13 -11
- package/dist/types/components/BaseTabItem.vue.d.ts +12 -10
- package/dist/types/components/BaseTable.vue.d.ts +27 -24
- package/dist/types/components/BaseTableBody.vue.d.ts +4 -2
- package/dist/types/components/BaseTableCell.vue.d.ts +29 -27
- package/dist/types/components/BaseTableColumn.vue.d.ts +11 -11
- package/dist/types/components/BaseTableHead.vue.d.ts +6 -4
- package/dist/types/components/BaseTableHeader.vue.d.ts +11 -9
- package/dist/types/components/BaseTableRow.vue.d.ts +20 -18
- package/dist/types/components/BaseTabs.vue.d.ts +8 -6
- package/dist/types/components/BaseTagAutocomplete.vue.d.ts +47 -44
- package/dist/types/components/BaseTagAutocompleteFetch.vue.d.ts +40 -38
- package/dist/types/components/BaseTextarea.vue.d.ts +8 -7
- package/dist/types/components/BaseTextareaAutoresize.vue.d.ts +7 -6
- package/dist/types/components/BaseTimePicker.vue.d.ts +4 -3
- package/dist/types/components/BaseTooltip.vue.d.ts +15 -13
- package/dist/types/composables/breakpoints.d.ts +6 -6
- package/dist/types/composables/mediaQuery.d.ts +1 -1
- package/dist/types/composables/modal.d.ts +1 -1
- package/package.json +14 -20
- package/src/components/BaseAddressForm.stories.js +32 -33
- package/src/components/BaseAlert.stories.js +13 -13
- package/src/components/BaseAutocomplete.stories.js +26 -26
- package/src/components/BaseAutocomplete.vue +10 -3
- package/src/components/BaseAutocompleteFetch.stories.js +24 -28
- package/src/components/BaseAvatar.stories.js +11 -11
- package/src/components/BaseAvatarGroup.stories.js +9 -9
- package/src/components/BaseBadge.stories.js +18 -19
- package/src/components/BaseBelongsTo.stories.js +20 -20
- package/src/components/BaseBelongsToFetch.stories.js +21 -25
- package/src/components/BaseBoolean.stories.js +3 -3
- package/src/components/BaseBreadcrumbs.stories.js +14 -14
- package/src/components/BaseButton.stories.js +34 -34
- package/src/components/BaseButtonGroup.stories.js +18 -18
- package/src/components/BaseCalendar.stories.js +122 -46
- package/src/components/BaseCard.stories.js +3 -3
- package/src/components/BaseCharacterCounter.stories.js +5 -5
- package/src/components/BaseClipboard.stories.js +6 -6
- package/src/components/BaseCollapse.stories.js +81 -82
- package/src/components/BaseColor.stories.js +8 -8
- package/src/components/BaseContainer.stories.js +6 -6
- package/src/components/BaseCounter.stories.js +9 -9
- package/src/components/BaseCropper.stories.js +11 -11
- package/src/components/BaseCropperModal.stories.js +6 -6
- package/src/components/BaseDataIterator.stories.js +30 -33
- package/src/components/BaseDataTable.stories.js +61 -56
- package/src/components/BaseDatePicker.stories.js +29 -29
- package/src/components/BaseDateSelect.stories.js +9 -9
- package/src/components/BaseDescriptionList.stories.js +4 -4
- package/src/components/BaseDialog.stories.js +27 -27
- package/src/components/BaseDisplayRelativeTime.stories.js +4 -4
- package/src/components/BaseDropdown.stories.js +13 -13
- package/src/components/BaseDropdownAutocomplete.stories.js +25 -25
- package/src/components/BaseFieldI18n.stories.js +9 -9
- package/src/components/BaseFilePicker.stories.js +8 -8
- package/src/components/BaseFilePickerCrop.stories.js +15 -15
- package/src/components/BaseFileUploader.stories.js +12 -13
- package/src/components/BaseForm.stories.js +7 -7
- package/src/components/BaseForm.vue +1 -1
- package/src/components/BaseGantt.stories.js +22 -16
- package/src/components/BaseHasMany.stories.js +18 -22
- package/src/components/BaseHeader.stories.js +43 -43
- package/src/components/BaseIconPicker.stories.js +4 -4
- package/src/components/BaseInput.stories.js +48 -48
- package/src/components/BaseInputLabel.stories.js +6 -6
- package/src/components/BaseInputPercent.stories.js +8 -8
- package/src/components/BaseJsonReader.stories.js +42 -49
- package/src/components/BaseJsonReader.vue +0 -1
- package/src/components/BaseLayoutSidebar.vue +1 -1
- package/src/components/BaseLayoutSidebarConfigurable.stories.js +72 -73
- package/src/components/BaseLayoutSidebarConfigurable.vue +1 -1
- package/src/components/BaseLayoutStackedConfigurable.stories.js +68 -69
- package/src/components/BaseLoadingCover.stories.js +9 -9
- package/src/components/BaseMediaItem.stories.js +10 -10
- package/src/components/BaseMediaLibrary.stories.js +58 -58
- package/src/components/BaseMediaPreview.stories.js +21 -21
- package/src/components/BaseMenu.stories.js +34 -34
- package/src/components/BaseModalCenter.stories.js +9 -9
- package/src/components/BaseModalSide.stories.js +6 -6
- package/src/components/BaseNavbar.stories.js +26 -26
- package/src/components/BasePagination.stories.js +2 -2
- package/src/components/BasePanel.stories.js +9 -9
- package/src/components/BasePassword.stories.js +11 -12
- package/src/components/BaseProgressCircle.stories.js +3 -3
- package/src/components/BaseRadioGroup.stories.js +15 -15
- package/src/components/BaseReadMore.stories.js +3 -3
- package/src/components/BaseRichText.stories.js +32 -32
- package/src/components/BaseSelect.stories.js +19 -19
- package/src/components/BaseShortcut.stories.js +28 -28
- package/src/components/BaseSideNavigation.stories.js +11 -11
- package/src/components/BaseSkeleton.stories.js +3 -3
- package/src/components/BaseStatistic.stories.js +16 -16
- package/src/components/BaseStepper.stories.js +29 -29
- package/src/components/BaseStepperItem.stories.js +11 -11
- package/src/components/BaseSwitch.stories.js +25 -25
- package/src/components/BaseSystemAlert.stories.js +7 -7
- package/src/components/BaseTable.stories.js +14 -16
- package/src/components/BaseTabs.stories.js +12 -13
- package/src/components/BaseTagAutocomplete.stories.js +19 -19
- package/src/components/BaseTagAutocompleteFetch.stories.js +11 -11
- package/src/components/BaseTextarea.stories.js +10 -10
- package/src/components/BaseTextareaAutoresize.stories.js +13 -13
- package/src/components/BaseTimePicker.stories.js +9 -9
- package/src/components/BaseTimeline.stories.js +22 -22
- package/src/components/BaseTimelineItem.stories.js +23 -22
- package/src/components/BaseToast.stories.js +6 -6
- package/src/components/BaseTooltip.stories.js +27 -27
- package/src/components/BaseUniqueCode.stories.js +7 -7
- package/src/stories/InputSizes.stories.js +13 -14
- package/src/stories/List.stories.js +92 -92
- package/src/stories/Show.stories.js +13 -14
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import BaseDialog from
|
|
1
|
+
import BaseDialog from "./BaseDialog.vue";
|
|
2
2
|
|
|
3
|
-
const colors = [
|
|
3
|
+
const colors = ["info", "success", "warning", "danger"];
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title:
|
|
6
|
+
title: "Components/BaseDialog",
|
|
7
7
|
component: BaseDialog,
|
|
8
8
|
argTypes: {
|
|
9
9
|
color: {
|
|
10
|
-
control: { type:
|
|
11
|
-
options: [
|
|
10
|
+
control: { type: "select" },
|
|
11
|
+
options: ["success", "info", "warning", "danger"],
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
args: {
|
|
15
|
-
color:
|
|
15
|
+
color: "info",
|
|
16
16
|
message:
|
|
17
|
-
|
|
17
|
+
"Nisi Lorem sunt amet aliqua dolor ullamco deserunt enim irure non ad. Excepteur culpa consectetur dolore culpa sunt aliquip proident quis.",
|
|
18
18
|
},
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const Template = (args) => ({
|
|
22
22
|
components: { BaseDialog },
|
|
23
23
|
setup() {
|
|
24
|
-
|
|
25
24
|
const confirm = () => {
|
|
26
|
-
alert(
|
|
27
|
-
}
|
|
25
|
+
alert("Confirmed");
|
|
26
|
+
};
|
|
28
27
|
|
|
29
28
|
const cancel = () => {
|
|
30
|
-
alert(
|
|
31
|
-
}
|
|
29
|
+
alert("Canceled");
|
|
30
|
+
};
|
|
32
31
|
|
|
33
32
|
return { args, confirm, cancel };
|
|
34
33
|
},
|
|
@@ -40,13 +39,14 @@ const Template = (args) => ({
|
|
|
40
39
|
|
|
41
40
|
export const Demo = Template.bind({});
|
|
42
41
|
Demo.args = {
|
|
43
|
-
title:
|
|
42
|
+
title: "Be careful",
|
|
44
43
|
};
|
|
45
44
|
|
|
46
45
|
export const Html = Template.bind({});
|
|
47
46
|
Html.args = {
|
|
48
|
-
title:
|
|
49
|
-
message:
|
|
47
|
+
title: "Be careful",
|
|
48
|
+
message:
|
|
49
|
+
'<strong>HTML</strong> is allowed. <a href="#">Link</a><p>Eiusmod id Lorem est ullamco et ex exercitation cupidatat do velit nisi Lorem officia et.</p>',
|
|
50
50
|
html: true,
|
|
51
51
|
};
|
|
52
52
|
|
|
@@ -66,30 +66,30 @@ const ColorsTemplate = (args) => ({
|
|
|
66
66
|
|
|
67
67
|
export const Colors = ColorsTemplate.bind({});
|
|
68
68
|
Colors.args = {
|
|
69
|
-
title:
|
|
69
|
+
title: "Be careful",
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
export const WithInput = Template.bind({});
|
|
73
73
|
WithInput.args = {
|
|
74
74
|
input: {
|
|
75
|
-
label:
|
|
76
|
-
type:
|
|
77
|
-
size:
|
|
75
|
+
label: "Enter your password",
|
|
76
|
+
type: "password",
|
|
77
|
+
size: "sm",
|
|
78
78
|
required: true,
|
|
79
|
-
placeholder:
|
|
79
|
+
placeholder: "Password",
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
export const ErrorMessage = Template.bind({});
|
|
84
84
|
ErrorMessage.args = {
|
|
85
|
-
color:
|
|
86
|
-
title:
|
|
87
|
-
errorMessage:
|
|
85
|
+
color: "danger",
|
|
86
|
+
title: "Please confirm your password",
|
|
87
|
+
errorMessage: "Invalid password",
|
|
88
88
|
input: {
|
|
89
|
-
label:
|
|
90
|
-
type:
|
|
91
|
-
size:
|
|
89
|
+
label: "Enter your password",
|
|
90
|
+
type: "password",
|
|
91
|
+
size: "sm",
|
|
92
92
|
required: true,
|
|
93
|
-
placeholder:
|
|
93
|
+
placeholder: "Password",
|
|
94
94
|
},
|
|
95
95
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import BaseDisplayRelativeTime from
|
|
2
|
-
import { DateTime } from
|
|
1
|
+
import BaseDisplayRelativeTime from "./BaseDisplayRelativeTime.vue";
|
|
2
|
+
import { DateTime } from "luxon";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title:
|
|
5
|
+
title: "Data/BaseDisplayRelativeTime",
|
|
6
6
|
component: BaseDisplayRelativeTime,
|
|
7
7
|
argTypes: {
|
|
8
8
|
showTooltip: {
|
|
9
|
-
control: { type:
|
|
9
|
+
control: { type: "boolean" },
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
12
|
args: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import BaseBadge from
|
|
2
|
-
import BaseAutocomplete from
|
|
3
|
-
import BaseModalCenter from
|
|
4
|
-
import BaseDropdown from
|
|
5
|
-
import BaseDatePicker from
|
|
6
|
-
import { options } from
|
|
1
|
+
import BaseBadge from "./BaseBadge.vue";
|
|
2
|
+
import BaseAutocomplete from "./BaseAutocomplete.vue";
|
|
3
|
+
import BaseModalCenter from "./BaseModalCenter.vue";
|
|
4
|
+
import BaseDropdown from "./BaseDropdown.vue";
|
|
5
|
+
import BaseDatePicker from "./BaseDatePicker.vue";
|
|
6
|
+
import { options } from "../../.storybook/utils";
|
|
7
7
|
|
|
8
8
|
const items = [];
|
|
9
9
|
|
|
@@ -14,16 +14,16 @@ for (let i = 0; i < 100; i++) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export default {
|
|
17
|
-
title:
|
|
17
|
+
title: "Components/BaseDropdown",
|
|
18
18
|
component: BaseDropdown,
|
|
19
19
|
argTypes: {
|
|
20
20
|
placement: {
|
|
21
|
-
control: { type:
|
|
22
|
-
options: [
|
|
21
|
+
control: { type: "select" },
|
|
22
|
+
options: ["top-start", "top-end", "bottom-start", "bottom-end"],
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
args: {
|
|
26
|
-
placement:
|
|
26
|
+
placement: "bottom-start",
|
|
27
27
|
},
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -106,13 +106,13 @@ export const WithAutocomplete = (args) => ({
|
|
|
106
106
|
|
|
107
107
|
WithAutocomplete.args = {
|
|
108
108
|
animated: true,
|
|
109
|
-
placement:
|
|
109
|
+
placement: "bottom-start",
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
export const WithDatePicker = (args) => ({
|
|
113
113
|
components: { BaseDropdown, BaseDatePicker },
|
|
114
114
|
setup() {
|
|
115
|
-
const date = ref(
|
|
115
|
+
const date = ref("2022-01-01");
|
|
116
116
|
return { args, items, date };
|
|
117
117
|
},
|
|
118
118
|
template: `
|
|
@@ -131,7 +131,7 @@ export const WithDatePicker = (args) => ({
|
|
|
131
131
|
|
|
132
132
|
WithDatePicker.args = {
|
|
133
133
|
animated: true,
|
|
134
|
-
placement:
|
|
134
|
+
placement: "bottom-start",
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
export const ModalWithScroll = (args) => ({
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import BaseBadge from
|
|
2
|
-
import BaseDropdownAutocomplete from
|
|
3
|
-
import ShowValue from
|
|
4
|
-
import { options } from
|
|
1
|
+
import BaseBadge from "./BaseBadge.vue";
|
|
2
|
+
import BaseDropdownAutocomplete from "./BaseDropdownAutocomplete.vue";
|
|
3
|
+
import ShowValue from "@/../.storybook/components/ShowValue.vue";
|
|
4
|
+
import { options } from "../../.storybook/utils";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title:
|
|
7
|
+
title: "Components/BaseDropdownAutocomplete",
|
|
8
8
|
component: BaseDropdownAutocomplete,
|
|
9
9
|
argTypes: {
|
|
10
10
|
placement: {
|
|
11
|
-
control: { type:
|
|
12
|
-
options: [
|
|
11
|
+
control: { type: "select" },
|
|
12
|
+
options: ["top-start", "top-end", "bottom-start", "bottom-end"],
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
args: {
|
|
16
|
-
placement:
|
|
16
|
+
placement: "bottom-start",
|
|
17
17
|
padding: 8,
|
|
18
|
-
emptyOptionLabel:
|
|
18
|
+
emptyOptionLabel: "Nothing",
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -46,7 +46,7 @@ const template = `<template #button="{ newValue }">
|
|
|
46
46
|
{{ option.label }}
|
|
47
47
|
</span>
|
|
48
48
|
</div>
|
|
49
|
-
</template
|
|
49
|
+
</template>`;
|
|
50
50
|
|
|
51
51
|
export const Autocomplete = (args) => ({
|
|
52
52
|
components: { BaseDropdownAutocomplete, BaseBadge, ShowValue },
|
|
@@ -68,16 +68,16 @@ export const Autocomplete = (args) => ({
|
|
|
68
68
|
Autocomplete.args = {
|
|
69
69
|
options: options,
|
|
70
70
|
multiple: false,
|
|
71
|
-
labelKey:
|
|
72
|
-
valueKey:
|
|
71
|
+
labelKey: "label",
|
|
72
|
+
valueKey: "value",
|
|
73
73
|
select: {
|
|
74
74
|
options: [
|
|
75
|
-
{ label:
|
|
76
|
-
{ label:
|
|
77
|
-
{ label:
|
|
75
|
+
{ label: "Option 1", value: "option-1" },
|
|
76
|
+
{ label: "Option 2", value: "option-2" },
|
|
77
|
+
{ label: "Option 3", value: "option-3" },
|
|
78
78
|
],
|
|
79
|
-
labelKey:
|
|
80
|
-
valueKey:
|
|
79
|
+
labelKey: "label",
|
|
80
|
+
valueKey: "value",
|
|
81
81
|
},
|
|
82
82
|
};
|
|
83
83
|
|
|
@@ -113,9 +113,9 @@ export const AutocompleteFetch = (args) => ({
|
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
AutocompleteFetch.args = {
|
|
116
|
-
valueKey:
|
|
117
|
-
labelKey:
|
|
118
|
-
url:
|
|
116
|
+
valueKey: "id",
|
|
117
|
+
labelKey: "name",
|
|
118
|
+
url: "https://effettandem.com/api/content/tags",
|
|
119
119
|
multiple: false,
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -155,8 +155,8 @@ export const TagAutocomplete = (args) => ({
|
|
|
155
155
|
TagAutocomplete.args = {
|
|
156
156
|
options: options,
|
|
157
157
|
multiple: true,
|
|
158
|
-
labelKey:
|
|
159
|
-
valueKey:
|
|
158
|
+
labelKey: "label",
|
|
159
|
+
valueKey: "value",
|
|
160
160
|
};
|
|
161
161
|
|
|
162
162
|
export const TagAutocompleteFetch = (args) => ({
|
|
@@ -193,8 +193,8 @@ export const TagAutocompleteFetch = (args) => ({
|
|
|
193
193
|
});
|
|
194
194
|
|
|
195
195
|
TagAutocompleteFetch.args = {
|
|
196
|
-
valueKey:
|
|
197
|
-
labelKey:
|
|
198
|
-
url:
|
|
196
|
+
valueKey: "id",
|
|
197
|
+
labelKey: "name",
|
|
198
|
+
url: "https://effettandem.com/api/content/tags",
|
|
199
199
|
multiple: true,
|
|
200
200
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import BaseFieldI18n from
|
|
2
|
-
import BaseForm from
|
|
3
|
-
import ShowValue from
|
|
1
|
+
import BaseFieldI18n from "./BaseFieldI18n.vue";
|
|
2
|
+
import BaseForm from "./BaseForm.vue";
|
|
3
|
+
import ShowValue from "@/../.storybook/components/ShowValue.vue";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title:
|
|
6
|
+
title: "Form/BaseFieldI18n",
|
|
7
7
|
component: BaseFieldI18n,
|
|
8
8
|
args: {
|
|
9
|
-
component:
|
|
9
|
+
component: "BaseInput",
|
|
10
10
|
required: true,
|
|
11
|
-
name:
|
|
12
|
-
label:
|
|
11
|
+
name: "name",
|
|
12
|
+
label: "Name",
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -19,8 +19,8 @@ const Template = (args) => ({
|
|
|
19
19
|
const form = ref({
|
|
20
20
|
_status: 422,
|
|
21
21
|
name: {
|
|
22
|
-
en:
|
|
23
|
-
fr:
|
|
22
|
+
en: "Name",
|
|
23
|
+
fr: "Nom",
|
|
24
24
|
},
|
|
25
25
|
});
|
|
26
26
|
return { args, form };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import BaseFilePicker from
|
|
2
|
-
import { Icon as BaseIcon } from
|
|
3
|
-
import ShowValue from
|
|
4
|
-
import BaseAppSnackbars from
|
|
5
|
-
import { t } from
|
|
1
|
+
import BaseFilePicker from "./BaseFilePicker.vue";
|
|
2
|
+
import { Icon as BaseIcon } from "@iconify/vue";
|
|
3
|
+
import ShowValue from "../../.storybook/components/ShowValue.vue";
|
|
4
|
+
import BaseAppSnackbars from "@/components/BaseAppSnackbars.vue";
|
|
5
|
+
import { t } from "@/i18n";
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
|
-
title:
|
|
8
|
+
title: "Media/BaseFilePicker",
|
|
9
9
|
component: BaseFilePicker,
|
|
10
10
|
args: {},
|
|
11
11
|
};
|
|
@@ -70,12 +70,12 @@ MaxSize.args = {
|
|
|
70
70
|
|
|
71
71
|
export const FileExtension = Template.bind({});
|
|
72
72
|
FileExtension.args = {
|
|
73
|
-
acceptedExtensions: [
|
|
73
|
+
acceptedExtensions: ["xlsx", "xls"],
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
export const Multiple = Template.bind({});
|
|
77
77
|
Multiple.args = {
|
|
78
|
-
multiple: true
|
|
78
|
+
multiple: true,
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
export const Disabled = Template.bind({});
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import BaseFilePickerCrop from
|
|
2
|
-
import BaseLoadingCover from
|
|
3
|
-
import BaseAppSnackbars from
|
|
4
|
-
import BaseCropper from
|
|
5
|
-
import BaseModalCenter from
|
|
6
|
-
import BaseButton from
|
|
7
|
-
import { Icon as BaseIcon } from
|
|
8
|
-
import ShowValue from
|
|
9
|
-
import { t } from
|
|
1
|
+
import BaseFilePickerCrop from "@/components/BaseFilePickerCrop.vue";
|
|
2
|
+
import BaseLoadingCover from "@/components/BaseLoadingCover.vue";
|
|
3
|
+
import BaseAppSnackbars from "@/components/BaseAppSnackbars.vue";
|
|
4
|
+
import BaseCropper from "@/components/BaseCropper.vue";
|
|
5
|
+
import BaseModalCenter from "@/components/BaseModalCenter.vue";
|
|
6
|
+
import BaseButton from "@/components/BaseButton.vue";
|
|
7
|
+
import { Icon as BaseIcon } from "@iconify/vue";
|
|
8
|
+
import ShowValue from "../../.storybook/components/ShowValue.vue";
|
|
9
|
+
import { t } from "@/i18n";
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
title:
|
|
12
|
+
title: "Media/BaseFilePickerCrop",
|
|
13
13
|
component: BaseFilePickerCrop,
|
|
14
14
|
args: {
|
|
15
|
-
twButton:
|
|
16
|
-
acceptedExtensions: [
|
|
15
|
+
twButton: "w-full",
|
|
16
|
+
acceptedExtensions: ["jpg", "jpeg", "png"],
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -87,7 +87,7 @@ Demo.args = {};
|
|
|
87
87
|
export const Avatar = Template.bind({});
|
|
88
88
|
Avatar.args = {
|
|
89
89
|
cropper: {
|
|
90
|
-
preset:
|
|
90
|
+
preset: "avatar",
|
|
91
91
|
presetOptions: {
|
|
92
92
|
size: 300,
|
|
93
93
|
},
|
|
@@ -100,7 +100,7 @@ Avatar.args = {
|
|
|
100
100
|
export const Cover = Template.bind({});
|
|
101
101
|
Cover.args = {
|
|
102
102
|
cropper: {
|
|
103
|
-
preset:
|
|
103
|
+
preset: "cover",
|
|
104
104
|
presetOptions: {
|
|
105
105
|
size: 600,
|
|
106
106
|
},
|
|
@@ -117,7 +117,7 @@ Resize.args = {
|
|
|
117
117
|
config: {
|
|
118
118
|
initialResize: 100,
|
|
119
119
|
},
|
|
120
|
-
preset:
|
|
120
|
+
preset: "cover",
|
|
121
121
|
presetOptions: {
|
|
122
122
|
size: 600,
|
|
123
123
|
},
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import BaseFileUploader from
|
|
2
|
-
import BaseLoadingCover from
|
|
3
|
-
import BaseAppSnackbars from
|
|
4
|
-
import ShowValue from
|
|
5
|
-
import { Icon as BaseIcon } from
|
|
6
|
-
import { t } from
|
|
1
|
+
import BaseFileUploader from "@/components/BaseFileUploader.vue";
|
|
2
|
+
import BaseLoadingCover from "@/components/BaseLoadingCover.vue";
|
|
3
|
+
import BaseAppSnackbars from "@/components/BaseAppSnackbars.vue";
|
|
4
|
+
import ShowValue from "../../.storybook/components/ShowValue.vue";
|
|
5
|
+
import { Icon as BaseIcon } from "@iconify/vue";
|
|
6
|
+
import { t } from "@/i18n";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
title:
|
|
9
|
+
title: "Media/BaseFileUploader",
|
|
10
10
|
component: BaseFileUploader,
|
|
11
11
|
args: {
|
|
12
|
-
twButton:
|
|
13
|
-
acceptedExtensions: [
|
|
12
|
+
twButton: "w-full",
|
|
13
|
+
acceptedExtensions: ["jpg", "png"],
|
|
14
14
|
maxSize: 1024 * 1024 * 20, // 20MB
|
|
15
|
-
url:
|
|
15
|
+
url: "https://faker.witify.io/api/todos/upload",
|
|
16
16
|
},
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -25,7 +25,6 @@ const Template = (args) => ({
|
|
|
25
25
|
ShowValue,
|
|
26
26
|
},
|
|
27
27
|
setup() {
|
|
28
|
-
|
|
29
28
|
const files = ref([]);
|
|
30
29
|
|
|
31
30
|
function onSuccess(payload) {
|
|
@@ -80,9 +79,9 @@ Demo.args = {};
|
|
|
80
79
|
|
|
81
80
|
export const ImagePicker = Template.bind({});
|
|
82
81
|
ImagePicker.args = {
|
|
83
|
-
component:
|
|
82
|
+
component: "BaseFilePickerCrop",
|
|
84
83
|
cropper: {
|
|
85
|
-
preset:
|
|
84
|
+
preset: "avatar",
|
|
86
85
|
},
|
|
87
86
|
};
|
|
88
87
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import BaseForm from
|
|
2
|
-
import BaseField from
|
|
3
|
-
import BaseInput from
|
|
4
|
-
import BaseMediaLibrary from
|
|
5
|
-
import ShowValue from
|
|
6
|
-
import BaseAppSnackbars from
|
|
1
|
+
import BaseForm from "./BaseForm.vue";
|
|
2
|
+
import BaseField from "./BaseField.vue";
|
|
3
|
+
import BaseInput from "./BaseInput.vue";
|
|
4
|
+
import BaseMediaLibrary from "./BaseMediaLibrary.vue";
|
|
5
|
+
import ShowValue from "../../.storybook/components/ShowValue.vue";
|
|
6
|
+
import BaseAppSnackbars from "./BaseAppSnackbars.vue";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
title:
|
|
9
|
+
title: "Form/BaseForm",
|
|
10
10
|
component: BaseForm,
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -251,7 +251,7 @@ function successHandler(response: AxiosResponse<any, any>) {
|
|
|
251
251
|
if (props.successHandler) {
|
|
252
252
|
props.successHandler(response);
|
|
253
253
|
} else {
|
|
254
|
-
const message = get(response, '
|
|
254
|
+
const message = get(response, 'data.message', null);
|
|
255
255
|
|
|
256
256
|
if (!message) {
|
|
257
257
|
return;
|
|
@@ -1,22 +1,31 @@
|
|
|
1
|
-
import { DateTime } from
|
|
2
|
-
import BaseGantt from
|
|
3
|
-
import defaultColors from
|
|
4
|
-
import { Icon } from
|
|
5
|
-
import BaseCard from
|
|
6
|
-
import { random } from
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
import BaseGantt from "./BaseGantt.vue";
|
|
3
|
+
import defaultColors from "tailwindcss/colors";
|
|
4
|
+
import { Icon } from "@iconify/vue";
|
|
5
|
+
import BaseCard from "./BaseCard.vue";
|
|
6
|
+
import { random } from "lodash";
|
|
7
7
|
|
|
8
8
|
const rows = [];
|
|
9
9
|
|
|
10
10
|
for (let i = 0; i < 10; i++) {
|
|
11
|
-
|
|
12
11
|
const items = [];
|
|
13
12
|
|
|
14
13
|
for (let j = 0; j < 1; j++) {
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const start = DateTime.now()
|
|
15
|
+
.minus({ days: 50 })
|
|
16
|
+
.plus({ days: i * 2 });
|
|
17
17
|
const end = start.plus({ days: 50 });
|
|
18
18
|
|
|
19
|
-
const colors = [
|
|
19
|
+
const colors = [
|
|
20
|
+
"blue",
|
|
21
|
+
"green",
|
|
22
|
+
"red",
|
|
23
|
+
"yellow",
|
|
24
|
+
"indigo",
|
|
25
|
+
"pink",
|
|
26
|
+
"purple",
|
|
27
|
+
"gray",
|
|
28
|
+
];
|
|
20
29
|
|
|
21
30
|
const colorKey = random(0, colors.length - 1);
|
|
22
31
|
|
|
@@ -38,14 +47,13 @@ for (let i = 0; i < 10; i++) {
|
|
|
38
47
|
});
|
|
39
48
|
}
|
|
40
49
|
|
|
41
|
-
|
|
42
50
|
export default {
|
|
43
|
-
title:
|
|
51
|
+
title: "Data/BaseGantt",
|
|
44
52
|
component: BaseGantt,
|
|
45
53
|
args: {
|
|
46
54
|
rows,
|
|
47
55
|
maxHeight: 300,
|
|
48
|
-
}
|
|
56
|
+
},
|
|
49
57
|
};
|
|
50
58
|
|
|
51
59
|
const Template = (args) => ({
|
|
@@ -54,7 +62,6 @@ const Template = (args) => ({
|
|
|
54
62
|
BaseGantt,
|
|
55
63
|
},
|
|
56
64
|
setup() {
|
|
57
|
-
|
|
58
65
|
function onItemClick(item) {
|
|
59
66
|
alert(`Item "${item.name}" clicked`);
|
|
60
67
|
}
|
|
@@ -114,7 +121,6 @@ const SlotSidebarItemTemplate = (args) => ({
|
|
|
114
121
|
Icon,
|
|
115
122
|
},
|
|
116
123
|
setup() {
|
|
117
|
-
|
|
118
124
|
function onItemClick(item) {
|
|
119
125
|
alert(`Item "${item.name}" clicked`);
|
|
120
126
|
}
|
|
@@ -136,4 +142,4 @@ const SlotSidebarItemTemplate = (args) => ({
|
|
|
136
142
|
});
|
|
137
143
|
|
|
138
144
|
export const SlotSidebarItem = SlotSidebarItemTemplate.bind({});
|
|
139
|
-
SlotSidebarItem.args = {};
|
|
145
|
+
SlotSidebarItem.args = {};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import BaseHasMany from
|
|
2
|
-
import ShowValue from
|
|
3
|
-
import { createFieldStory, options, sizes } from
|
|
4
|
-
import BaseAppSnackbars from
|
|
5
|
-
import QueryString from
|
|
6
|
-
import { random } from
|
|
1
|
+
import BaseHasMany from "./BaseHasMany.vue";
|
|
2
|
+
import ShowValue from "@/../.storybook/components/ShowValue.vue";
|
|
3
|
+
import { createFieldStory, options, sizes } from "../../.storybook/utils";
|
|
4
|
+
import BaseAppSnackbars from "./BaseAppSnackbars.vue";
|
|
5
|
+
import QueryString from "qs";
|
|
6
|
+
import { random } from "lodash";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
title:
|
|
9
|
+
title: "Form/BaseHasMany",
|
|
10
10
|
component: BaseHasMany,
|
|
11
11
|
argTypes: {
|
|
12
12
|
size: {
|
|
13
|
-
control: { type:
|
|
13
|
+
control: { type: "select" },
|
|
14
14
|
options: sizes,
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
18
|
-
url:
|
|
19
|
-
field:
|
|
20
|
-
primaryKey:
|
|
18
|
+
url: "https://faker.witify.io/api/todos",
|
|
19
|
+
field: "name",
|
|
20
|
+
primaryKey: "id",
|
|
21
21
|
showRouteUrl: (ids) => {
|
|
22
22
|
const params = QueryString.stringify({ filter: { id: ids } });
|
|
23
23
|
return `https://faker.witify.io/api/todos?${params}`;
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
25
|
},
|
|
26
26
|
decorators: [() => ({ template: '<div class="mb-36"><story/></div>' })],
|
|
27
27
|
};
|
|
@@ -32,9 +32,9 @@ const Template = (args) => {
|
|
|
32
32
|
setup() {
|
|
33
33
|
const value = ref(4);
|
|
34
34
|
const currentModels = ref([
|
|
35
|
-
{ id: 4, name:
|
|
36
|
-
{ id: 6, name:
|
|
37
|
-
])
|
|
35
|
+
{ id: 4, name: "Todo 4 (local)" },
|
|
36
|
+
{ id: 6, name: "Todo 6 (local)" },
|
|
37
|
+
]);
|
|
38
38
|
return { args, value, currentModels };
|
|
39
39
|
},
|
|
40
40
|
template: `
|
|
@@ -225,11 +225,7 @@ const RaceConditionTemplate = (args) => {
|
|
|
225
225
|
return {
|
|
226
226
|
components: { BaseHasMany, ShowValue, BaseAppSnackbars },
|
|
227
227
|
setup() {
|
|
228
|
-
|
|
229
|
-
const value = ref([
|
|
230
|
-
"4",
|
|
231
|
-
"6",
|
|
232
|
-
]);
|
|
228
|
+
const value = ref(["4", "6"]);
|
|
233
229
|
|
|
234
230
|
const valueExternal = ref([]);
|
|
235
231
|
|
|
@@ -270,6 +266,6 @@ RaceCondition.args = {};
|
|
|
270
266
|
|
|
271
267
|
export const Field = createFieldStory({
|
|
272
268
|
component: BaseHasMany,
|
|
273
|
-
componentName:
|
|
274
|
-
label:
|
|
269
|
+
componentName: "BaseHasMany",
|
|
270
|
+
label: "Name",
|
|
275
271
|
});
|