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,14 +1,14 @@
|
|
|
1
|
-
import { sizes } from
|
|
2
|
-
import BasePassword from
|
|
3
|
-
import { createFieldStory } from
|
|
1
|
+
import { sizes } from "../../.storybook/utils";
|
|
2
|
+
import BasePassword from "./BasePassword.vue";
|
|
3
|
+
import { createFieldStory } from "@/../.storybook/utils";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title:
|
|
6
|
+
title: "Form/BasePassword",
|
|
7
7
|
component: BasePassword,
|
|
8
8
|
args: {},
|
|
9
9
|
argTypes: {
|
|
10
10
|
size: {
|
|
11
|
-
control: { type:
|
|
11
|
+
control: { type: "select" },
|
|
12
12
|
options: sizes,
|
|
13
13
|
},
|
|
14
14
|
},
|
|
@@ -19,7 +19,7 @@ const Template = (args) => ({
|
|
|
19
19
|
BasePassword,
|
|
20
20
|
},
|
|
21
21
|
setup() {
|
|
22
|
-
const value = ref(
|
|
22
|
+
const value = ref("");
|
|
23
23
|
return { args, value };
|
|
24
24
|
},
|
|
25
25
|
template: `
|
|
@@ -32,22 +32,21 @@ const Template = (args) => ({
|
|
|
32
32
|
export const Demo = Template.bind({});
|
|
33
33
|
Demo.args = {
|
|
34
34
|
required: true,
|
|
35
|
-
placeholder:
|
|
35
|
+
placeholder: "Enter your password",
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export const Disabled = Template.bind({});
|
|
39
39
|
Disabled.args = {
|
|
40
40
|
disabled: true,
|
|
41
|
-
placeholder:
|
|
41
|
+
placeholder: "Enter your password",
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export const Field = createFieldStory({
|
|
45
45
|
component: BasePassword,
|
|
46
|
-
componentName:
|
|
47
|
-
label:
|
|
46
|
+
componentName: "BasePassword",
|
|
47
|
+
label: "Password",
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
|
|
51
50
|
const FocusTemplate = (args) => ({
|
|
52
51
|
components: { BasePassword },
|
|
53
52
|
setup() {
|
|
@@ -78,4 +77,4 @@ const TemplateSizes = (args) => ({
|
|
|
78
77
|
|
|
79
78
|
export const Sizes = TemplateSizes.bind({});
|
|
80
79
|
|
|
81
|
-
export const Focus = FocusTemplate.bind({});
|
|
80
|
+
export const Focus = FocusTemplate.bind({});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import BaseProgressCircle from
|
|
1
|
+
import BaseProgressCircle from "./BaseProgressCircle.vue";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title:
|
|
4
|
+
title: "Components/BaseProgressCircle",
|
|
5
5
|
component: BaseProgressCircle,
|
|
6
6
|
args: {
|
|
7
|
-
class:
|
|
7
|
+
class: "text-primary-500",
|
|
8
8
|
radius: 100,
|
|
9
9
|
stroke: 5,
|
|
10
10
|
progress: 0.6,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { options } from
|
|
2
|
-
import BaseRadioGroup from
|
|
3
|
-
import { createFieldStory } from
|
|
4
|
-
import ShowValue from
|
|
1
|
+
import { options } from "../../.storybook/utils";
|
|
2
|
+
import BaseRadioGroup from "./BaseRadioGroup.vue";
|
|
3
|
+
import { createFieldStory } from "@/../.storybook/utils";
|
|
4
|
+
import ShowValue from "../../.storybook/components/ShowValue.vue";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title:
|
|
7
|
+
title: "Form/BaseRadioGroup",
|
|
8
8
|
component: BaseRadioGroup,
|
|
9
9
|
argTypes: {},
|
|
10
10
|
args: {
|
|
11
|
-
labelKey:
|
|
12
|
-
valueKey:
|
|
11
|
+
labelKey: "label",
|
|
12
|
+
valueKey: "value",
|
|
13
13
|
options: options,
|
|
14
14
|
},
|
|
15
15
|
decorators: [() => ({ template: '<div class="mb-36"><story/></div>' })],
|
|
@@ -20,7 +20,7 @@ const Template = (args) => ({
|
|
|
20
20
|
setup() {
|
|
21
21
|
const value = ref(options[0].value);
|
|
22
22
|
function onSubmit() {
|
|
23
|
-
alert(
|
|
23
|
+
alert("submit");
|
|
24
24
|
}
|
|
25
25
|
return { args, value, onSubmit };
|
|
26
26
|
},
|
|
@@ -52,11 +52,11 @@ export const SlotOption = (args) => ({
|
|
|
52
52
|
const value = ref(null);
|
|
53
53
|
|
|
54
54
|
const options = [
|
|
55
|
-
{ label:
|
|
56
|
-
{ label:
|
|
57
|
-
{ label:
|
|
58
|
-
{ label:
|
|
59
|
-
{ label:
|
|
55
|
+
{ label: "Red", value: "red" },
|
|
56
|
+
{ label: "Blue", value: "blue" },
|
|
57
|
+
{ label: "Green", value: "green" },
|
|
58
|
+
{ label: "Black", value: "black" },
|
|
59
|
+
{ label: "Gray", value: "gray" },
|
|
60
60
|
];
|
|
61
61
|
|
|
62
62
|
return { value, options, args };
|
|
@@ -82,6 +82,6 @@ export const SlotOption = (args) => ({
|
|
|
82
82
|
|
|
83
83
|
export const Field = createFieldStory({
|
|
84
84
|
component: BaseRadioGroup,
|
|
85
|
-
componentName:
|
|
86
|
-
label:
|
|
85
|
+
componentName: "BaseRadioGroup",
|
|
86
|
+
label: "Choose your character",
|
|
87
87
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import BaseReadMore from
|
|
2
|
-
import BaseContainer from
|
|
1
|
+
import BaseReadMore from "./BaseReadMore.vue";
|
|
2
|
+
import BaseContainer from "./BaseContainer.vue";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title:
|
|
5
|
+
title: "Components/BaseReadMore",
|
|
6
6
|
component: BaseReadMore,
|
|
7
7
|
args: {},
|
|
8
8
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import BaseRichText from
|
|
2
|
-
import ShowValue from
|
|
3
|
-
import { createFieldStory } from
|
|
4
|
-
import { sizes } from
|
|
1
|
+
import BaseRichText from "./BaseRichText.vue";
|
|
2
|
+
import ShowValue from "@/../.storybook/components/ShowValue.vue";
|
|
3
|
+
import { createFieldStory } from "@/../.storybook/utils";
|
|
4
|
+
import { sizes } from "../../.storybook/utils";
|
|
5
5
|
|
|
6
6
|
const toolbarOptions = [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
7
|
+
"full",
|
|
8
|
+
"essential",
|
|
9
|
+
"minimal",
|
|
10
|
+
["bold", "italic", "underline", "link"],
|
|
11
|
+
["bold", "italic", "underline", "strike"],
|
|
12
|
+
["blockquote", "code-block"],
|
|
13
|
+
["clean"], // remove formatting button
|
|
14
14
|
];
|
|
15
15
|
|
|
16
16
|
export default {
|
|
17
|
-
title:
|
|
17
|
+
title: "Form/BaseRichText",
|
|
18
18
|
component: BaseRichText,
|
|
19
19
|
decorators: [
|
|
20
20
|
(story) => ({
|
|
@@ -26,19 +26,19 @@ export default {
|
|
|
26
26
|
}),
|
|
27
27
|
],
|
|
28
28
|
args: {
|
|
29
|
-
placeholder:
|
|
29
|
+
placeholder: "Describe your complete life in 4 sentences...",
|
|
30
30
|
},
|
|
31
31
|
argTypes: {
|
|
32
32
|
size: {
|
|
33
|
-
control: { type:
|
|
33
|
+
control: { type: "select" },
|
|
34
34
|
options: sizes,
|
|
35
35
|
},
|
|
36
36
|
theme: {
|
|
37
|
-
control: { type:
|
|
38
|
-
options: [
|
|
37
|
+
control: { type: "select" },
|
|
38
|
+
options: ["snow", "bubble", ""],
|
|
39
39
|
},
|
|
40
40
|
toolbar: {
|
|
41
|
-
control: { type:
|
|
41
|
+
control: { type: "select" },
|
|
42
42
|
options: toolbarOptions,
|
|
43
43
|
},
|
|
44
44
|
},
|
|
@@ -60,48 +60,48 @@ export const Demo = Template.bind({});
|
|
|
60
60
|
|
|
61
61
|
export const Basic = Template.bind({});
|
|
62
62
|
Basic.args = {
|
|
63
|
-
placeholder:
|
|
63
|
+
placeholder: "Describe your complete life in 4 sentences...",
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
export const FullToolbar = Template.bind({});
|
|
67
67
|
FullToolbar.args = {
|
|
68
|
-
toolbar:
|
|
69
|
-
placeholder:
|
|
68
|
+
toolbar: "full",
|
|
69
|
+
placeholder: "Describe your complete life in 4 sentences...",
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
export const EssentialToolbar = Template.bind({});
|
|
73
73
|
EssentialToolbar.args = {
|
|
74
|
-
toolbar:
|
|
75
|
-
placeholder:
|
|
74
|
+
toolbar: "essential",
|
|
75
|
+
placeholder: "Describe your complete life in 4 sentences...",
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
export const MinimalToolbar = Template.bind({});
|
|
79
79
|
MinimalToolbar.args = {
|
|
80
|
-
toolbar:
|
|
81
|
-
placeholder:
|
|
80
|
+
toolbar: "minimal",
|
|
81
|
+
placeholder: "Describe your complete life in 4 sentences...",
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
export const SnowTheme = Template.bind({});
|
|
85
85
|
SnowTheme.args = {
|
|
86
|
-
theme:
|
|
87
|
-
placeholder:
|
|
86
|
+
theme: "snow",
|
|
87
|
+
placeholder: "Describe your complete life in 4 sentences...",
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
export const BubbleTheme = Template.bind({});
|
|
91
91
|
BubbleTheme.args = {
|
|
92
|
-
theme:
|
|
93
|
-
placeholder:
|
|
92
|
+
theme: "bubble",
|
|
93
|
+
placeholder: "Describe your complete life in 4 sentences...",
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
export const Disabled = Template.bind({});
|
|
97
97
|
Disabled.args = {
|
|
98
|
-
modelValue:
|
|
98
|
+
modelValue: "Lorem ipsum...",
|
|
99
99
|
disabled: true,
|
|
100
|
-
placeholder:
|
|
100
|
+
placeholder: "",
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
export const Field = createFieldStory({
|
|
104
104
|
component: BaseRichText,
|
|
105
|
-
componentName:
|
|
106
|
-
label:
|
|
105
|
+
componentName: "BaseRichText",
|
|
106
|
+
label: "Name",
|
|
107
107
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import BaseSelect from
|
|
2
|
-
import BaseInputLabel from
|
|
3
|
-
import ShowValue from
|
|
4
|
-
import { createFieldStory, sizes } from
|
|
5
|
-
import { options } from
|
|
6
|
-
import { computed } from
|
|
1
|
+
import BaseSelect from "./BaseSelect.vue";
|
|
2
|
+
import BaseInputLabel from "./BaseInputLabel.vue";
|
|
3
|
+
import ShowValue from "../../.storybook/components/ShowValue.vue";
|
|
4
|
+
import { createFieldStory, sizes } from "../../.storybook/utils.js";
|
|
5
|
+
import { options } from "../../.storybook/utils";
|
|
6
|
+
import { computed } from "vue";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
title:
|
|
9
|
+
title: "Form/BaseSelect",
|
|
10
10
|
component: BaseSelect,
|
|
11
11
|
args: {
|
|
12
|
-
class:
|
|
12
|
+
class: "w-full",
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ const Template = (args) => ({
|
|
|
21
21
|
},
|
|
22
22
|
setup() {
|
|
23
23
|
function onSubmit() {
|
|
24
|
-
alert(
|
|
24
|
+
alert("submit");
|
|
25
25
|
}
|
|
26
26
|
// To test, you should try the following scenarios
|
|
27
27
|
// - valid (ex: 'javascript')
|
|
@@ -34,7 +34,7 @@ const Template = (args) => ({
|
|
|
34
34
|
|
|
35
35
|
// For optional, make sure the default option is selected
|
|
36
36
|
// For required, try to submit, it should be prevented
|
|
37
|
-
const value = ref(
|
|
37
|
+
const value = ref("test");
|
|
38
38
|
|
|
39
39
|
// Test if dynamically added options are available & selected
|
|
40
40
|
const showTest = ref(false);
|
|
@@ -62,19 +62,19 @@ const Template = (args) => ({
|
|
|
62
62
|
export const Optional = Template.bind({});
|
|
63
63
|
Optional.args = {
|
|
64
64
|
required: false,
|
|
65
|
-
placeholder:
|
|
65
|
+
placeholder: "I dont like programing languages",
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
export const Required = Template.bind({});
|
|
69
69
|
Required.args = {
|
|
70
70
|
required: true,
|
|
71
|
-
placeholder:
|
|
71
|
+
placeholder: "Choose a language",
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
export const Disabled = Template.bind({});
|
|
75
75
|
Disabled.args = {
|
|
76
76
|
required: true,
|
|
77
|
-
placeholder:
|
|
77
|
+
placeholder: "Choose a language",
|
|
78
78
|
disabled: true,
|
|
79
79
|
};
|
|
80
80
|
|
|
@@ -97,7 +97,7 @@ export const Sizes = TemplateSizes.bind({});
|
|
|
97
97
|
export const OptionsAsProps = (args) => ({
|
|
98
98
|
components: { BaseSelect, ShowValue },
|
|
99
99
|
setup() {
|
|
100
|
-
const value = ref(
|
|
100
|
+
const value = ref("test");
|
|
101
101
|
const showTest = ref(false);
|
|
102
102
|
|
|
103
103
|
setTimeout(() => {
|
|
@@ -108,7 +108,7 @@ export const OptionsAsProps = (args) => ({
|
|
|
108
108
|
if (!showTest.value) {
|
|
109
109
|
return options;
|
|
110
110
|
}
|
|
111
|
-
return [...options, { label:
|
|
111
|
+
return [...options, { label: "Test", value: "test" }];
|
|
112
112
|
});
|
|
113
113
|
return { args, options2, value };
|
|
114
114
|
},
|
|
@@ -118,8 +118,8 @@ export const OptionsAsProps = (args) => ({
|
|
|
118
118
|
|
|
119
119
|
OptionsAsProps.args = {
|
|
120
120
|
required: true,
|
|
121
|
-
labelKey:
|
|
122
|
-
valueKey:
|
|
121
|
+
labelKey: "label",
|
|
122
|
+
valueKey: "label",
|
|
123
123
|
};
|
|
124
124
|
|
|
125
125
|
const CustomClassesT = (args) => ({
|
|
@@ -141,11 +141,11 @@ export const CustomClasses = CustomClassesT.bind({});
|
|
|
141
141
|
|
|
142
142
|
export const Field = createFieldStory({
|
|
143
143
|
component: BaseSelect,
|
|
144
|
-
componentName:
|
|
144
|
+
componentName: "BaseSelect",
|
|
145
145
|
template: `<BaseSelect v-model="value" v-bind="args" class="w-full">
|
|
146
146
|
<option value="javascript">JavaScript</option>
|
|
147
147
|
<option value="typescript">Typescript</option>
|
|
148
148
|
<option value="golang">Golang</option>
|
|
149
149
|
</BaseSelect>`,
|
|
150
|
-
label:
|
|
150
|
+
label: "Choose your favorite programing language",
|
|
151
151
|
});
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import BaseShortcut from
|
|
2
|
-
import { palette } from
|
|
1
|
+
import BaseShortcut from "./BaseShortcut.vue";
|
|
2
|
+
import { palette } from "@/utils/colors";
|
|
3
3
|
|
|
4
|
-
const colors = [...Object.keys(palette),
|
|
4
|
+
const colors = [...Object.keys(palette), "#ff0000", "#dbeafe"];
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title:
|
|
7
|
+
title: "Components/BaseShortcut",
|
|
8
8
|
component: BaseShortcut,
|
|
9
9
|
argTypes: {
|
|
10
10
|
color: {
|
|
11
|
-
control: { type:
|
|
11
|
+
control: { type: "select" },
|
|
12
12
|
options: colors,
|
|
13
13
|
},
|
|
14
14
|
contrast: {
|
|
15
|
-
control: { type:
|
|
16
|
-
options: [
|
|
15
|
+
control: { type: "select" },
|
|
16
|
+
options: ["low", "high"],
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
};
|
|
@@ -31,10 +31,10 @@ const Template = (args) => ({
|
|
|
31
31
|
|
|
32
32
|
export const Basic = Template.bind({});
|
|
33
33
|
Basic.args = {
|
|
34
|
-
to:
|
|
35
|
-
title:
|
|
36
|
-
icon:
|
|
37
|
-
color:
|
|
34
|
+
to: "/restaurants",
|
|
35
|
+
title: "Basic shortcut",
|
|
36
|
+
icon: "heroicons:user-solid",
|
|
37
|
+
color: "blue",
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export const Colors = (args) => ({
|
|
@@ -51,12 +51,12 @@ export const Colors = (args) => ({
|
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
Colors.args = {
|
|
54
|
-
contrast:
|
|
55
|
-
to:
|
|
56
|
-
title:
|
|
54
|
+
contrast: "high",
|
|
55
|
+
to: "/restaurants",
|
|
56
|
+
title: "Contrast example",
|
|
57
57
|
description:
|
|
58
|
-
|
|
59
|
-
linkText:
|
|
58
|
+
"Le lorem ipsum est, en imprimerie, une suite de mots sans signification utilisée à titre provisoire pour calibrer une mise en page",
|
|
59
|
+
linkText: "Open app",
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
export const Contrast = (args) => ({
|
|
@@ -73,20 +73,20 @@ export const Contrast = (args) => ({
|
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
Contrast.args = {
|
|
76
|
-
contrast:
|
|
77
|
-
to:
|
|
78
|
-
title:
|
|
76
|
+
contrast: "low",
|
|
77
|
+
to: "/restaurants",
|
|
78
|
+
title: "Contrast example",
|
|
79
79
|
description:
|
|
80
|
-
|
|
81
|
-
linkText:
|
|
80
|
+
"Le lorem ipsum est, en imprimerie, une suite de mots sans signification utilisée à titre provisoire pour calibrer une mise en page",
|
|
81
|
+
linkText: "Open app",
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
export const Href = Template.bind({});
|
|
85
85
|
Href.args = {
|
|
86
|
-
href:
|
|
87
|
-
title:
|
|
88
|
-
icon:
|
|
89
|
-
color:
|
|
86
|
+
href: "https://www.google.com",
|
|
87
|
+
title: "Basic shortcut",
|
|
88
|
+
icon: "heroicons:user-solid",
|
|
89
|
+
color: "blue",
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
export const Action = Template.bind({});
|
|
@@ -94,7 +94,7 @@ Action.args = {
|
|
|
94
94
|
action() {
|
|
95
95
|
alert(1);
|
|
96
96
|
},
|
|
97
|
-
title:
|
|
98
|
-
icon:
|
|
99
|
-
color:
|
|
97
|
+
title: "Basic shortcut",
|
|
98
|
+
icon: "heroicons:user-solid",
|
|
99
|
+
color: "blue",
|
|
100
100
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import BaseSideNavigation from
|
|
2
|
-
import BaseSideNavigationItem from
|
|
3
|
-
import BaseContainer from
|
|
4
|
-
import BaseCard from
|
|
5
|
-
import BaseCardRow from
|
|
6
|
-
import BaseCounter from
|
|
1
|
+
import BaseSideNavigation from "./BaseSideNavigation.vue";
|
|
2
|
+
import BaseSideNavigationItem from "./BaseSideNavigationItem.vue";
|
|
3
|
+
import BaseContainer from "./BaseContainer.vue";
|
|
4
|
+
import BaseCard from "./BaseCard.vue";
|
|
5
|
+
import BaseCardRow from "./BaseCardRow.vue";
|
|
6
|
+
import BaseCounter from "./BaseCounter.vue";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
title:
|
|
9
|
+
title: "Navigation/BaseSideNavigation",
|
|
10
10
|
component: BaseSideNavigation,
|
|
11
11
|
args: {},
|
|
12
12
|
};
|
|
@@ -66,20 +66,20 @@ Demo.args = {};
|
|
|
66
66
|
|
|
67
67
|
export const SizeXS = Template.bind({});
|
|
68
68
|
SizeXS.args = {
|
|
69
|
-
size:
|
|
69
|
+
size: "xs",
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
export const SizeSM = Template.bind({});
|
|
73
73
|
SizeSM.args = {
|
|
74
|
-
size:
|
|
74
|
+
size: "sm",
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
export const SizeMD = Template.bind({});
|
|
78
78
|
SizeMD.args = {
|
|
79
|
-
size:
|
|
79
|
+
size: "md",
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
export const SizeLG = Template.bind({});
|
|
83
83
|
SizeLG.args = {
|
|
84
|
-
size:
|
|
84
|
+
size: "lg",
|
|
85
85
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import BaseSkeleton from
|
|
2
|
-
import BaseContainer from
|
|
1
|
+
import BaseSkeleton from "./BaseSkeleton.vue";
|
|
2
|
+
import BaseContainer from "./BaseContainer.vue";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title:
|
|
5
|
+
title: "Components/BaseSkeleton",
|
|
6
6
|
component: BaseSkeleton,
|
|
7
7
|
args: {},
|
|
8
8
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import BaseStatistic from
|
|
1
|
+
import BaseStatistic from "./BaseStatistic.vue";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title:
|
|
4
|
+
title: "Data/BaseStatistic",
|
|
5
5
|
component: BaseStatistic,
|
|
6
6
|
argTypes: {
|
|
7
7
|
trend: {
|
|
8
|
-
control: { type:
|
|
9
|
-
options: [
|
|
8
|
+
control: { type: "select" },
|
|
9
|
+
options: ["up", "down", null],
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
12
|
};
|
|
@@ -24,28 +24,28 @@ const Template = (args) => ({
|
|
|
24
24
|
|
|
25
25
|
export const Simple = Template.bind({});
|
|
26
26
|
Simple.args = {
|
|
27
|
-
primaryValue:
|
|
27
|
+
primaryValue: "$7,552.90",
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export const TrendUp = Template.bind({});
|
|
31
31
|
TrendUp.args = {
|
|
32
|
-
primaryValue:
|
|
33
|
-
secondaryValue:
|
|
34
|
-
trend:
|
|
32
|
+
primaryValue: "$15,289.63",
|
|
33
|
+
secondaryValue: "15%",
|
|
34
|
+
trend: "up",
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export const TrendDown = Template.bind({});
|
|
38
38
|
TrendDown.args = {
|
|
39
|
-
primaryValue:
|
|
40
|
-
secondaryValue:
|
|
41
|
-
trend:
|
|
39
|
+
primaryValue: "$10,123.25",
|
|
40
|
+
secondaryValue: "-22%",
|
|
41
|
+
trend: "down",
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export const Complex = Template.bind({});
|
|
45
45
|
Complex.args = {
|
|
46
|
-
label:
|
|
47
|
-
primaryValue:
|
|
48
|
-
secondaryValue:
|
|
49
|
-
trend:
|
|
50
|
-
caption:
|
|
46
|
+
label: "Complex example",
|
|
47
|
+
primaryValue: "$10,123.25",
|
|
48
|
+
secondaryValue: "-22%",
|
|
49
|
+
trend: "down",
|
|
50
|
+
caption: "Since last week",
|
|
51
51
|
};
|