sprintify-ui 0.8.35 → 0.8.38
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 +7603 -7495
- 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 +60 -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/BaseButton.vue +4 -1
- 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/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,35 +1,35 @@
|
|
|
1
|
-
import BaseAddressForm from
|
|
2
|
-
import ShowValue from
|
|
3
|
-
import { sizes } from
|
|
1
|
+
import BaseAddressForm from "./BaseAddressForm.vue";
|
|
2
|
+
import ShowValue from "../../.storybook/components/ShowValue.vue";
|
|
3
|
+
import { sizes } from "../../.storybook/utils";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title:
|
|
6
|
+
title: "Form/BaseAddressForm",
|
|
7
7
|
component: BaseAddressForm,
|
|
8
8
|
argTypes: {
|
|
9
9
|
size: {
|
|
10
|
-
control: { type:
|
|
10
|
+
control: { type: "select" },
|
|
11
11
|
options: sizes,
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
args: {
|
|
15
15
|
countries: [
|
|
16
|
-
{ name:
|
|
17
|
-
{ name:
|
|
18
|
-
{ name:
|
|
16
|
+
{ name: "United States", id: "us" },
|
|
17
|
+
{ name: "Canada", id: "ca" },
|
|
18
|
+
{ name: "Mexico", id: "mx" },
|
|
19
19
|
],
|
|
20
20
|
regions: [
|
|
21
|
-
{ name:
|
|
22
|
-
{ name:
|
|
23
|
-
{ name:
|
|
24
|
-
{ name:
|
|
25
|
-
{ name:
|
|
26
|
-
{ name:
|
|
27
|
-
{ name:
|
|
28
|
-
{ name:
|
|
29
|
-
{ name:
|
|
30
|
-
{ name:
|
|
31
|
-
{ name:
|
|
32
|
-
{ name:
|
|
21
|
+
{ name: "Alabama", id: "us-al", country_id: "us" },
|
|
22
|
+
{ name: "Alaska", id: "us-ak", country_id: "us" },
|
|
23
|
+
{ name: "Arizona", id: "us-az", country_id: "us" },
|
|
24
|
+
{ name: "Alberta", id: "ca-ab", country_id: "ca" },
|
|
25
|
+
{ name: "British Columbia", id: "ca-bc", country_id: "ca" },
|
|
26
|
+
{ name: "Manitoba", id: "ca-mb", country_id: "ca" },
|
|
27
|
+
{ name: "Nova Scotia", id: "ca-ns", country_id: "ca" },
|
|
28
|
+
{ name: "Ontario", id: "ca-on", country_id: "ca" },
|
|
29
|
+
{ name: "Prince Edward Island", id: "ca-pe", country_id: "ca" },
|
|
30
|
+
{ name: "Quebec", id: "ca-qc", country_id: "ca" },
|
|
31
|
+
{ name: "Saskatchewan", id: "ca-sk", country_id: "ca" },
|
|
32
|
+
{ name: "Northwest Territories", id: "ca-nt", country_id: "ca" },
|
|
33
33
|
],
|
|
34
34
|
},
|
|
35
35
|
};
|
|
@@ -39,12 +39,12 @@ const Template = (args) => ({
|
|
|
39
39
|
setup() {
|
|
40
40
|
const form = ref({
|
|
41
41
|
shipping_address: {
|
|
42
|
-
address_1:
|
|
43
|
-
address_2:
|
|
44
|
-
city:
|
|
45
|
-
country:
|
|
46
|
-
region:
|
|
47
|
-
postal_code:
|
|
42
|
+
address_1: "333 rue Sherbrooke Est",
|
|
43
|
+
address_2: "Suite 100",
|
|
44
|
+
city: "Montreal",
|
|
45
|
+
country: "ca",
|
|
46
|
+
region: "ca-qc",
|
|
47
|
+
postal_code: "H2X 4E3",
|
|
48
48
|
},
|
|
49
49
|
});
|
|
50
50
|
return { args, form };
|
|
@@ -56,12 +56,11 @@ const Template = (args) => ({
|
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
export const Demo = Template.bind({});
|
|
59
|
-
Demo.args = {
|
|
60
|
-
};
|
|
59
|
+
Demo.args = {};
|
|
61
60
|
|
|
62
61
|
export const Required = Template.bind({});
|
|
63
62
|
Required.args = {
|
|
64
|
-
required: true
|
|
63
|
+
required: true,
|
|
65
64
|
};
|
|
66
65
|
|
|
67
66
|
const DefaultCountryTemplate = (args) => ({
|
|
@@ -69,7 +68,7 @@ const DefaultCountryTemplate = (args) => ({
|
|
|
69
68
|
setup() {
|
|
70
69
|
const form = ref({
|
|
71
70
|
shipping_address: {
|
|
72
|
-
country:
|
|
71
|
+
country: "ca",
|
|
73
72
|
},
|
|
74
73
|
});
|
|
75
74
|
return { args, form };
|
|
@@ -88,13 +87,13 @@ const DefaultCountryAndRegionTemplate = (args) => ({
|
|
|
88
87
|
setup() {
|
|
89
88
|
const form = ref({
|
|
90
89
|
shipping_address: {
|
|
91
|
-
country:
|
|
92
|
-
region:
|
|
90
|
+
country: "ca",
|
|
91
|
+
region: "ca-qc",
|
|
93
92
|
},
|
|
94
93
|
});
|
|
95
94
|
|
|
96
95
|
setTimeout(() => {
|
|
97
|
-
form.value.shipping_address.country =
|
|
96
|
+
form.value.shipping_address.country = "us";
|
|
98
97
|
}, 2000);
|
|
99
98
|
|
|
100
99
|
return { args, form };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import BaseAlert from
|
|
1
|
+
import BaseAlert from "./BaseAlert.vue";
|
|
2
2
|
|
|
3
|
-
import { palette } from
|
|
3
|
+
import { palette } from "@/utils/colors";
|
|
4
4
|
|
|
5
|
-
const colors = [...Object.keys(palette),
|
|
5
|
+
const colors = [...Object.keys(palette), "#ff0000", "#dbeafe"];
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
|
-
title:
|
|
8
|
+
title: "Components/BaseAlert",
|
|
9
9
|
component: BaseAlert,
|
|
10
10
|
argTypes: {
|
|
11
11
|
color: {
|
|
12
|
-
control: { type:
|
|
12
|
+
control: { type: "select" },
|
|
13
13
|
options: colors,
|
|
14
14
|
},
|
|
15
15
|
},
|
|
@@ -29,29 +29,29 @@ const Template = (args) => ({
|
|
|
29
29
|
|
|
30
30
|
export const Demo = Template.bind({});
|
|
31
31
|
Demo.args = {
|
|
32
|
-
title:
|
|
33
|
-
color:
|
|
32
|
+
title: "Be careful",
|
|
33
|
+
color: "warning",
|
|
34
34
|
bordered: true,
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export const Success = Template.bind({});
|
|
38
38
|
Success.args = {
|
|
39
|
-
title:
|
|
40
|
-
color:
|
|
39
|
+
title: "Success",
|
|
40
|
+
color: "success",
|
|
41
41
|
bordered: true,
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export const Danger = Template.bind({});
|
|
45
45
|
Danger.args = {
|
|
46
|
-
title:
|
|
47
|
-
color:
|
|
46
|
+
title: "Error",
|
|
47
|
+
color: "danger",
|
|
48
48
|
bordered: true,
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
export const Info = Template.bind({});
|
|
52
52
|
Info.args = {
|
|
53
|
-
title:
|
|
54
|
-
color:
|
|
53
|
+
title: "Information",
|
|
54
|
+
color: "info",
|
|
55
55
|
bordered: true,
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { createFieldStory, options, sizes } from
|
|
2
|
-
import BaseAutocomplete from
|
|
3
|
-
import ShowValue from
|
|
4
|
-
import { computed } from
|
|
1
|
+
import { createFieldStory, options, sizes } from "../../.storybook/utils";
|
|
2
|
+
import BaseAutocomplete from "./BaseAutocomplete.vue";
|
|
3
|
+
import ShowValue from "@/../.storybook/components/ShowValue.vue";
|
|
4
|
+
import { computed } from "vue";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title:
|
|
7
|
+
title: "Form/BaseAutocomplete",
|
|
8
8
|
component: BaseAutocomplete,
|
|
9
9
|
argTypes: {
|
|
10
10
|
size: {
|
|
11
|
-
control: { type:
|
|
11
|
+
control: { type: "select" },
|
|
12
12
|
options: sizes,
|
|
13
13
|
},
|
|
14
14
|
dropdownShow: {
|
|
15
|
-
control: { type:
|
|
16
|
-
options: [
|
|
15
|
+
control: { type: "select" },
|
|
16
|
+
options: ["always", "focus"],
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
args: {
|
|
20
|
-
labelKey:
|
|
21
|
-
valueKey:
|
|
20
|
+
labelKey: "label",
|
|
21
|
+
valueKey: "value",
|
|
22
22
|
options: options,
|
|
23
23
|
},
|
|
24
24
|
decorators: [() => ({ template: '<div class="mb-36"><story/></div>' })],
|
|
@@ -42,7 +42,7 @@ Demo.args = {};
|
|
|
42
42
|
export const AlwaysShowDropdown = Template.bind({});
|
|
43
43
|
AlwaysShowDropdown.args = {
|
|
44
44
|
inline: true,
|
|
45
|
-
dropdownShow:
|
|
45
|
+
dropdownShow: "always",
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
export const NoFocus = Template.bind({});
|
|
@@ -54,7 +54,7 @@ export const Disabled = Template.bind({});
|
|
|
54
54
|
Disabled.args = {
|
|
55
55
|
options: [],
|
|
56
56
|
disabled: true,
|
|
57
|
-
modelValue: { label:
|
|
57
|
+
modelValue: { label: "Dark Maul", value: "1" },
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
export const Loading = Template.bind({});
|
|
@@ -65,7 +65,7 @@ Loading.args = {
|
|
|
65
65
|
export const ShowEmptyOption = Template.bind({});
|
|
66
66
|
ShowEmptyOption.args = {
|
|
67
67
|
showEmptyOption: true,
|
|
68
|
-
emptyOptionLabel:
|
|
68
|
+
emptyOptionLabel: "No Jedi",
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
export const Inline = Template.bind({});
|
|
@@ -93,11 +93,11 @@ export const SlotOption = (args) => ({
|
|
|
93
93
|
const value = ref(null);
|
|
94
94
|
|
|
95
95
|
const options = [
|
|
96
|
-
{ label:
|
|
97
|
-
{ label:
|
|
98
|
-
{ label:
|
|
99
|
-
{ label:
|
|
100
|
-
{ label:
|
|
96
|
+
{ label: "Red", value: "red" },
|
|
97
|
+
{ label: "Blue", value: "blue" },
|
|
98
|
+
{ label: "Green", value: "green" },
|
|
99
|
+
{ label: "Black", value: "black" },
|
|
100
|
+
{ label: "Gray", value: "gray" },
|
|
101
101
|
];
|
|
102
102
|
|
|
103
103
|
return { value, options, args };
|
|
@@ -183,19 +183,19 @@ export const WithSelect = (args) => {
|
|
|
183
183
|
|
|
184
184
|
const select = {
|
|
185
185
|
options: [
|
|
186
|
-
{ label:
|
|
187
|
-
{ label:
|
|
188
|
-
{ label:
|
|
186
|
+
{ label: "All", value: "all" },
|
|
187
|
+
{ label: "Jedi", value: "jedi" },
|
|
188
|
+
{ label: "Sith", value: "sith" },
|
|
189
189
|
],
|
|
190
|
-
labelKey:
|
|
191
|
-
valueKey:
|
|
190
|
+
labelKey: "label",
|
|
191
|
+
valueKey: "value",
|
|
192
192
|
onChange: (option) => {
|
|
193
193
|
selected.value = option.value;
|
|
194
194
|
},
|
|
195
195
|
};
|
|
196
196
|
|
|
197
197
|
const options2 = computed(() => {
|
|
198
|
-
if (selected.value ==
|
|
198
|
+
if (selected.value == "all" || !selected.value) {
|
|
199
199
|
return options;
|
|
200
200
|
}
|
|
201
201
|
return options.filter((option) => option.type === selected.value);
|
|
@@ -225,6 +225,6 @@ export const WithSelect = (args) => {
|
|
|
225
225
|
|
|
226
226
|
export const Field = createFieldStory({
|
|
227
227
|
component: BaseAutocomplete,
|
|
228
|
-
componentName:
|
|
229
|
-
label:
|
|
228
|
+
componentName: "BaseAutocomplete",
|
|
229
|
+
label: "Article",
|
|
230
230
|
});
|
|
@@ -117,7 +117,9 @@ import BaseAutocompleteDrawer from './BaseAutocompleteDrawer.vue';
|
|
|
117
117
|
import { SelectConfiguration } from '@/types';
|
|
118
118
|
import { t } from '@/i18n';
|
|
119
119
|
import { Size, sizes } from '@/utils/sizes';
|
|
120
|
-
import
|
|
120
|
+
import BaseInput from './BaseInput.vue';
|
|
121
|
+
import BaseSelect from './BaseSelect.vue';
|
|
122
|
+
import { twMerge } from 'tailwind-merge';
|
|
121
123
|
|
|
122
124
|
const props = defineProps({
|
|
123
125
|
modelValue: {
|
|
@@ -522,12 +524,17 @@ const inputClasses = computed(() => {
|
|
|
522
524
|
const paddingRight = showRemoveButtonInternal.value ? 'pr-5' : '';
|
|
523
525
|
const withSelect = props.select ? 'rounded-l-none' : '';
|
|
524
526
|
|
|
525
|
-
|
|
527
|
+
const internalClasses = [
|
|
526
528
|
base,
|
|
527
529
|
withSelect,
|
|
528
530
|
paddingRight,
|
|
529
|
-
props.twInput,
|
|
530
531
|
];
|
|
532
|
+
|
|
533
|
+
if (!props.twInput) {
|
|
534
|
+
return internalClasses;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
return twMerge(internalClasses, props.twInput);
|
|
531
538
|
})
|
|
532
539
|
|
|
533
540
|
const showRemoveButtonInternal = computed(() => {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import BaseAutocompleteFetch from
|
|
2
|
-
import ShowValue from
|
|
3
|
-
import { options } from
|
|
4
|
-
import { createFieldStory, sizes } from
|
|
1
|
+
import BaseAutocompleteFetch from "./BaseAutocompleteFetch.vue";
|
|
2
|
+
import ShowValue from "@/../.storybook/components/ShowValue.vue";
|
|
3
|
+
import { options } from "@/../.storybook/utils";
|
|
4
|
+
import { createFieldStory, sizes } from "../../.storybook/utils";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title:
|
|
7
|
+
title: "Form/BaseAutocompleteFetch",
|
|
8
8
|
component: BaseAutocompleteFetch,
|
|
9
9
|
argTypes: {
|
|
10
10
|
size: {
|
|
11
|
-
control: { type:
|
|
11
|
+
control: { type: "select" },
|
|
12
12
|
options: sizes,
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
args: {
|
|
16
|
-
url:
|
|
17
|
-
labelKey:
|
|
18
|
-
valueKey:
|
|
16
|
+
url: "https://faker.witify.io/api/todos",
|
|
17
|
+
labelKey: "title",
|
|
18
|
+
valueKey: "id",
|
|
19
19
|
},
|
|
20
20
|
decorators: [() => ({ template: '<div class="mb-36"><story/></div>' })],
|
|
21
21
|
};
|
|
@@ -38,7 +38,7 @@ Demo.args = {};
|
|
|
38
38
|
export const AlwaysShowDropdown = Template.bind({});
|
|
39
39
|
AlwaysShowDropdown.args = {
|
|
40
40
|
inline: true,
|
|
41
|
-
dropdownShow:
|
|
41
|
+
dropdownShow: "always",
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export const NoFocus = Template.bind({});
|
|
@@ -48,8 +48,8 @@ NoFocus.args = {
|
|
|
48
48
|
|
|
49
49
|
export const Disabled = Template.bind({});
|
|
50
50
|
Disabled.args = {
|
|
51
|
-
labelKey:
|
|
52
|
-
valueKey:
|
|
51
|
+
labelKey: "label",
|
|
52
|
+
valueKey: "value",
|
|
53
53
|
modelValue: options[0],
|
|
54
54
|
disabled: true,
|
|
55
55
|
};
|
|
@@ -57,7 +57,7 @@ Disabled.args = {
|
|
|
57
57
|
export const ShowEmptyOption = Template.bind({});
|
|
58
58
|
ShowEmptyOption.args = {
|
|
59
59
|
showEmptyOption: true,
|
|
60
|
-
emptyOptionLabel:
|
|
60
|
+
emptyOptionLabel: "No Jedi",
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
export const Inline = Template.bind({});
|
|
@@ -169,27 +169,23 @@ export const WithSelect = (args) => {
|
|
|
169
169
|
|
|
170
170
|
const select = {
|
|
171
171
|
options: [
|
|
172
|
-
{ label:
|
|
173
|
-
{ label:
|
|
174
|
-
{ label:
|
|
175
|
-
{ label:
|
|
172
|
+
{ label: "All", value: "all" },
|
|
173
|
+
{ label: "Work", value: "work" },
|
|
174
|
+
{ label: "Personal", value: "personal" },
|
|
175
|
+
{ label: "Family", value: "family" },
|
|
176
176
|
],
|
|
177
|
-
labelKey:
|
|
178
|
-
valueKey:
|
|
177
|
+
labelKey: "label",
|
|
178
|
+
valueKey: "value",
|
|
179
179
|
onChange: (option) => {
|
|
180
180
|
selected.value = option.value;
|
|
181
181
|
},
|
|
182
182
|
};
|
|
183
183
|
|
|
184
184
|
const url = computed(() => {
|
|
185
|
-
if (selected.value ==
|
|
186
|
-
return
|
|
185
|
+
if (selected.value == "all" || !selected.value) {
|
|
186
|
+
return "https://faker.witify.io/api/todos";
|
|
187
187
|
}
|
|
188
|
-
return
|
|
189
|
-
'https://faker.witify.io/api/todos' +
|
|
190
|
-
'?type=' +
|
|
191
|
-
selected.value
|
|
192
|
-
);
|
|
188
|
+
return "https://faker.witify.io/api/todos" + "?type=" + selected.value;
|
|
193
189
|
});
|
|
194
190
|
|
|
195
191
|
return { args, value, url, selected, select };
|
|
@@ -216,6 +212,6 @@ export const WithSelect = (args) => {
|
|
|
216
212
|
|
|
217
213
|
export const Field = createFieldStory({
|
|
218
214
|
component: BaseAutocompleteFetch,
|
|
219
|
-
componentName:
|
|
220
|
-
label:
|
|
215
|
+
componentName: "BaseAutocompleteFetch",
|
|
216
|
+
label: "Article",
|
|
221
217
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import BaseAvatar from
|
|
1
|
+
import BaseAvatar from "./BaseAvatar.vue";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title:
|
|
4
|
+
title: "Data/BaseAvatar",
|
|
5
5
|
component: BaseAvatar,
|
|
6
6
|
argTypes: {
|
|
7
7
|
size: {
|
|
8
|
-
control: { type:
|
|
9
|
-
options: [
|
|
8
|
+
control: { type: "select" },
|
|
9
|
+
options: ["xs", "sm", "base", "lg", "xl"],
|
|
10
10
|
},
|
|
11
11
|
detailsPosition: {
|
|
12
|
-
control: { type:
|
|
13
|
-
options: [
|
|
12
|
+
control: { type: "select" },
|
|
13
|
+
options: ["left", "right"],
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
};
|
|
@@ -29,11 +29,11 @@ export const Demo = Template.bind({});
|
|
|
29
29
|
Demo.args = {
|
|
30
30
|
showDetails: true,
|
|
31
31
|
user: {
|
|
32
|
-
email:
|
|
33
|
-
first_name:
|
|
34
|
-
last_name:
|
|
35
|
-
full_name:
|
|
32
|
+
email: "jane@witify.io",
|
|
33
|
+
first_name: "Jane",
|
|
34
|
+
last_name: "Doe",
|
|
35
|
+
full_name: "Jane Doe",
|
|
36
36
|
avatar_url:
|
|
37
|
-
|
|
37
|
+
"https://images.unsplash.com/photo-1494790108377-be9c29b29330??auto=format&fit=crop&w=200&h=200&q=80&g=face",
|
|
38
38
|
},
|
|
39
39
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import BaseAvatarGroup from
|
|
1
|
+
import BaseAvatarGroup from "./BaseAvatarGroup.vue";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title:
|
|
4
|
+
title: "Data/BaseAvatarGroup",
|
|
5
5
|
component: BaseAvatarGroup,
|
|
6
6
|
argTypes: {
|
|
7
7
|
size: {
|
|
8
|
-
control: { type:
|
|
9
|
-
options: [
|
|
8
|
+
control: { type: "select" },
|
|
9
|
+
options: ["xs", "sm", "base", "lg", "xl"],
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const user = {
|
|
15
|
-
email:
|
|
16
|
-
full_name:
|
|
15
|
+
email: "jane@witify.io",
|
|
16
|
+
full_name: "Jane Doe with a very long name",
|
|
17
17
|
avatar_url:
|
|
18
|
-
|
|
18
|
+
"https://images.unsplash.com/photo-1494790108377-be9c29b29330??auto=format&fit=crop&w=200&h=200&q=80&g=face",
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const n = 40;
|
|
@@ -44,7 +44,7 @@ export const Demo = Template.bind({});
|
|
|
44
44
|
Demo.args = {
|
|
45
45
|
users: users,
|
|
46
46
|
to(user) {
|
|
47
|
-
return
|
|
47
|
+
return "/" + user.email;
|
|
48
48
|
},
|
|
49
49
|
};
|
|
50
50
|
|
|
@@ -66,6 +66,6 @@ export const MaxItems = TemplateWithMaxItems.bind({});
|
|
|
66
66
|
MaxItems.args = {
|
|
67
67
|
users: users,
|
|
68
68
|
to(user) {
|
|
69
|
-
return
|
|
69
|
+
return "/" + user.email;
|
|
70
70
|
},
|
|
71
71
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { sizes } from
|
|
2
|
-
import BaseBadge from
|
|
1
|
+
import { sizes } from "../../.storybook/utils";
|
|
2
|
+
import BaseBadge from "./BaseBadge.vue";
|
|
3
3
|
|
|
4
|
-
import { palette } from
|
|
4
|
+
import { palette } from "@/utils/colors";
|
|
5
5
|
|
|
6
|
-
const colors = [...Object.keys(palette),
|
|
6
|
+
const colors = [...Object.keys(palette), "#ff0000", "#dbeafe"];
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
title:
|
|
9
|
+
title: "Components/BaseBadge",
|
|
10
10
|
component: BaseBadge,
|
|
11
11
|
argTypes: {
|
|
12
12
|
color: {
|
|
13
|
-
control: { type:
|
|
13
|
+
control: { type: "select" },
|
|
14
14
|
options: colors,
|
|
15
15
|
},
|
|
16
16
|
size: {
|
|
17
|
-
control: { type:
|
|
17
|
+
control: { type: "select" },
|
|
18
18
|
options: sizes,
|
|
19
19
|
},
|
|
20
20
|
contrast: {
|
|
21
|
-
control: { type:
|
|
22
|
-
options: [
|
|
21
|
+
control: { type: "select" },
|
|
22
|
+
options: ["low", "high"],
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
};
|
|
@@ -38,9 +38,9 @@ const Template = (args) => ({
|
|
|
38
38
|
|
|
39
39
|
export const Demo = Template.bind({});
|
|
40
40
|
Demo.args = {
|
|
41
|
-
color:
|
|
42
|
-
icon:
|
|
43
|
-
contrast:
|
|
41
|
+
color: "red",
|
|
42
|
+
icon: "heroicons:exclamation-triangle-20-solid",
|
|
43
|
+
contrast: "high",
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export const Colors = (args) => ({
|
|
@@ -59,8 +59,8 @@ export const Colors = (args) => ({
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
Colors.args = {
|
|
62
|
-
contrast:
|
|
63
|
-
icon:
|
|
62
|
+
contrast: "high",
|
|
63
|
+
icon: "heroicons:beaker-20-solid",
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
export const Contrast = (args) => ({
|
|
@@ -79,8 +79,8 @@ export const Contrast = (args) => ({
|
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
Contrast.args = {
|
|
82
|
-
contrast:
|
|
83
|
-
icon:
|
|
82
|
+
contrast: "low",
|
|
83
|
+
icon: "heroicons:beaker-20-solid",
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
export const Sizes = (args) => ({
|
|
@@ -99,11 +99,10 @@ export const Sizes = (args) => ({
|
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
Sizes.args = {
|
|
102
|
-
contrast:
|
|
103
|
-
icon:
|
|
102
|
+
contrast: "high",
|
|
103
|
+
icon: "heroicons:beaker-20-solid",
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
-
|
|
107
106
|
export const Wrap = (args) => ({
|
|
108
107
|
components: { BaseBadge },
|
|
109
108
|
setup() {
|