@antify/ui 2.2.0 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AntAccordion.vue +25 -12
- package/dist/components/AntAccordionItem.vue +28 -13
- package/dist/components/AntAlert.vue +25 -15
- package/dist/components/AntCard.vue +26 -14
- package/dist/components/AntContent.vue +4 -4
- package/dist/components/AntDropdown.vue +41 -23
- package/dist/components/AntIcon.vue +18 -6
- package/dist/components/AntKeycap.vue +31 -16
- package/dist/components/AntListGroup.vue +13 -11
- package/dist/components/AntListGroupItem.vue +19 -9
- package/dist/components/AntModal.vue +26 -15
- package/dist/components/AntPagination.vue +28 -15
- package/dist/components/AntPopover.vue +74 -51
- package/dist/components/AntSkeleton.vue +8 -4
- package/dist/components/AntSpinner.vue +14 -6
- package/dist/components/AntTag.vue +25 -13
- package/dist/components/AntToast.vue +19 -11
- package/dist/components/AntToaster.vue +13 -5
- package/dist/components/AntTooltip.vue +78 -54
- package/dist/components/__stories/AntAccordion.stories.js +4 -4
- package/dist/components/__stories/AntAccordion.stories.mjs +50 -17
- package/dist/components/__stories/AntAlert.stories.mjs +18 -5
- package/dist/components/__stories/AntCard.stories.mjs +36 -10
- package/dist/components/__stories/AntContent.stories.mjs +14 -4
- package/dist/components/__stories/AntDropdown.stories.mjs +20 -4
- package/dist/components/__stories/AntIcon.stories.mjs +38 -12
- package/dist/components/__stories/AntKeycap.stories.mjs +35 -10
- package/dist/components/__stories/AntListGroup.stories.d.ts +1 -1
- package/dist/components/__stories/AntListGroup.stories.mjs +22 -4
- package/dist/components/__stories/AntListGroupItem.stories.mjs +27 -8
- package/dist/components/__stories/AntModal.stories.mjs +17 -4
- package/dist/components/__stories/AntPagination.stories.mjs +21 -6
- package/dist/components/__stories/AntPopover.stories.mjs +20 -4
- package/dist/components/__stories/AntSkeleton.stories.mjs +17 -5
- package/dist/components/__stories/AntSpinner.stories.mjs +33 -9
- package/dist/components/__stories/AntTag.stories.mjs +28 -8
- package/dist/components/__stories/AntToast.stories.mjs +19 -5
- package/dist/components/__stories/AntToaster.stories.d.ts +1 -1
- package/dist/components/__stories/AntToaster.stories.mjs +35 -9
- package/dist/components/__stories/AntTooltip.stories.js +1 -1
- package/dist/components/__stories/AntTooltip.stories.mjs +44 -13
- package/dist/components/buttons/AntActionButton.vue +38 -29
- package/dist/components/buttons/AntButton.vue +34 -13
- package/dist/components/buttons/AntCreateButton.vue +11 -4
- package/dist/components/buttons/AntDeleteButton.vue +11 -4
- package/dist/components/buttons/AntDuplicateButton.vue +11 -4
- package/dist/components/buttons/AntEditButton.vue +11 -4
- package/dist/components/buttons/AntSaveAndNewButton.vue +11 -4
- package/dist/components/buttons/AntSaveButton.vue +11 -4
- package/dist/components/buttons/__stories/AntActionButton.stories.mjs +35 -10
- package/dist/components/buttons/__stories/AntButton.stories.mjs +77 -23
- package/dist/components/buttons/__stories/AntCreateButton.stories.mjs +25 -7
- package/dist/components/buttons/__stories/AntDeleteButton.stories.mjs +25 -7
- package/dist/components/buttons/__stories/AntDuplicateButton.stories.mjs +25 -7
- package/dist/components/buttons/__stories/AntEditButton.stories.mjs +25 -7
- package/dist/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +25 -7
- package/dist/components/buttons/__stories/AntSaveButton.stories.mjs +25 -7
- package/dist/components/crud/AntCrud.vue +6 -6
- package/dist/components/crud/AntCrudDetail.vue +8 -5
- package/dist/components/crud/AntCrudDetailActions.vue +14 -8
- package/dist/components/crud/AntCrudDetailNav.vue +21 -13
- package/dist/components/crud/AntCrudTableFilter.vue +29 -17
- package/dist/components/crud/AntCrudTableNav.vue +36 -22
- package/dist/components/crud/__stories/AntCrud.stories.mjs +17 -5
- package/dist/components/crud/__stories/AntCrudDetail.stories.mjs +11 -3
- package/dist/components/crud/__stories/AntCrudDetailActions.stories.mjs +10 -2
- package/dist/components/crud/__stories/AntCrudDetailNav.stories.mjs +11 -3
- package/dist/components/crud/__stories/AntCrudTableFilter.stories.mjs +17 -5
- package/dist/components/crud/__stories/AntCrudTableNav.stories.mjs +23 -7
- package/dist/components/dialogs/AntDeleteDialog.vue +13 -5
- package/dist/components/dialogs/AntDialog.vue +23 -13
- package/dist/components/dialogs/__stories/AndDeleteDialog.stories.mjs +12 -3
- package/dist/components/dialogs/__stories/AntDialog.stories.mjs +28 -7
- package/dist/components/forms/AntField.vue +18 -7
- package/dist/components/forms/AntFormGroup.vue +9 -5
- package/dist/components/forms/AntFormGroupLabel.vue +1 -1
- package/dist/components/forms/__stories/AntField.stories.mjs +37 -9
- package/dist/components/forms/__stories/AntFormGroup.stories.mjs +20 -5
- package/dist/components/forms/__stories/AntFormGroupLabel.stories.mjs +11 -3
- package/dist/components/index.d.ts +1 -1
- package/dist/components/inputs/AntCheckbox.vue +61 -36
- package/dist/components/inputs/AntCheckboxGroup.vue +40 -15
- package/dist/components/inputs/AntDateInput.vue +35 -12
- package/dist/components/inputs/AntNumberInput.vue +33 -12
- package/dist/components/inputs/AntPasswordInput.vue +32 -11
- package/dist/components/inputs/AntRadio.vue +57 -34
- package/dist/components/inputs/AntRadioGroup.vue +60 -35
- package/dist/components/inputs/AntRangeSlider.vue +31 -12
- package/dist/components/inputs/AntSearch.vue +19 -7
- package/dist/components/inputs/AntSelect.vue +107 -83
- package/dist/components/inputs/AntSwitch.vue +36 -18
- package/dist/components/inputs/AntSwitcher.vue +30 -15
- package/dist/components/inputs/AntTagInput.vue +91 -61
- package/dist/components/inputs/AntTextInput.vue +31 -11
- package/dist/components/inputs/AntTextarea.vue +53 -25
- package/dist/components/inputs/AntUnitInput.vue +33 -12
- package/dist/components/inputs/Elements/AntBaseInput.vue +47 -18
- package/dist/components/inputs/Elements/AntInputDescription.vue +16 -8
- package/dist/components/inputs/Elements/AntInputLabel.vue +13 -5
- package/dist/components/inputs/Elements/AntInputLimiter.vue +13 -5
- package/dist/components/inputs/Elements/AntSelectMenu.vue +65 -41
- package/dist/components/inputs/Elements/__stories/AntBaseInput.stories.mjs +104 -27
- package/dist/components/inputs/Elements/__stories/AntInputDescription.stories.mjs +33 -9
- package/dist/components/inputs/Elements/__stories/AntInputLabel.stories.mjs +34 -9
- package/dist/components/inputs/Elements/__stories/AntInputLimiter.stories.mjs +33 -9
- package/dist/components/inputs/Elements/index.d.ts +1 -1
- package/dist/components/inputs/__stories/AntCheckbox.stories.mjs +34 -9
- package/dist/components/inputs/__stories/AntCheckboxGroup.stories.mjs +45 -21
- package/dist/components/inputs/__stories/AntDateInput.stories.mjs +52 -14
- package/dist/components/inputs/__stories/AntNumberInput.stories.mjs +66 -17
- package/dist/components/inputs/__stories/AntPasswordInput.stories.mjs +51 -13
- package/dist/components/inputs/__stories/AntRadioGroup.stories.mjs +45 -12
- package/dist/components/inputs/__stories/AntRangeSlider.stories.mjs +16 -5
- package/dist/components/inputs/__stories/AntSearch.stories.mjs +41 -10
- package/dist/components/inputs/__stories/AntSelect.stories.mjs +59 -15
- package/dist/components/inputs/__stories/AntSwitch.stories.js +126 -102
- package/dist/components/inputs/__stories/AntSwitch.stories.mjs +162 -112
- package/dist/components/inputs/__stories/AntSwitcher.stories.mjs +38 -10
- package/dist/components/inputs/__stories/AntTagInput.stories.mjs +46 -12
- package/dist/components/inputs/__stories/AntTextInput.stories.mjs +59 -16
- package/dist/components/inputs/__stories/AntTextarea.stories.mjs +47 -13
- package/dist/components/inputs/__stories/AntUnitInput.stories.mjs +46 -12
- package/dist/components/layouts/AntNavLeftLayout.vue +12 -6
- package/dist/components/layouts/__stories/AntNavLeftLayout.stories.mjs +10 -2
- package/dist/components/navbar/AntNavbar.vue +7 -3
- package/dist/components/navbar/AntNavbarItem.vue +12 -6
- package/dist/components/navbar/__stories/AntNavbar.stories.mjs +59 -37
- package/dist/components/table/AntCollapsibleTableRowContent.vue +7 -5
- package/dist/components/table/AntTable.vue +227 -165
- package/dist/components/table/AntTableSkeleton.vue +126 -0
- package/dist/components/table/AntTableSortButton.vue +22 -13
- package/dist/components/table/AntTd.vue +21 -17
- package/dist/components/table/AntTh.vue +19 -12
- package/dist/components/table/__stories/AntTable.stories.js +132 -14
- package/dist/components/table/__stories/AntTable.stories.mjs +253 -31
- package/dist/components/table/__types/index.d.ts +0 -1
- package/dist/components/table/__types/index.js +0 -11
- package/dist/components/table/__types/index.mjs +0 -1
- package/dist/components/tabs/AntTabItem.vue +20 -8
- package/dist/components/tabs/AntTabs.vue +35 -21
- package/dist/components/tabs/__stories/AntTabItem.stories.mjs +23 -7
- package/dist/components/tabs/__stories/AntTabs.stories.mjs +45 -13
- package/dist/components/transitions/AntTransitionCollapseHeight.vue +1 -1
- package/dist/composables/useToaster.mjs +25 -7
- package/dist/index.css +1 -0
- package/dist/utils.mjs +3 -1
- package/package.json +23 -16
- package/dist/tailwind.config.d.ts +0 -3
- package/dist/tailwind.config.js +0 -198
- package/dist/tailwind.config.mjs +0 -189
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import AntTagInput from "../AntTagInput.vue";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import {
|
|
3
|
+
ref
|
|
4
|
+
} from "vue";
|
|
5
|
+
import {
|
|
6
|
+
InputState
|
|
7
|
+
} from "../../../enums/index.mjs";
|
|
8
|
+
import {
|
|
9
|
+
AntTagInputSize
|
|
10
|
+
} from "../__types/AntTagInput.types.mjs";
|
|
5
11
|
import AntFormGroup from "../../forms/AntFormGroup.vue";
|
|
6
12
|
import AntFormGroupLabel from "../../forms/AntFormGroupLabel.vue";
|
|
7
13
|
const meta = {
|
|
@@ -10,19 +16,35 @@ const meta = {
|
|
|
10
16
|
argTypes: {
|
|
11
17
|
modelValue: {
|
|
12
18
|
control: "text",
|
|
13
|
-
table: {
|
|
19
|
+
table: {
|
|
20
|
+
type: {
|
|
21
|
+
summary: "string|null"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
14
24
|
},
|
|
15
25
|
state: {
|
|
16
|
-
control: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "select"
|
|
28
|
+
},
|
|
17
29
|
options: Object.values(InputState)
|
|
18
30
|
},
|
|
19
31
|
size: {
|
|
20
|
-
control: {
|
|
32
|
+
control: {
|
|
33
|
+
type: "select"
|
|
34
|
+
},
|
|
21
35
|
options: Object.values(AntTagInputSize),
|
|
22
|
-
table: {
|
|
36
|
+
table: {
|
|
37
|
+
defaultValue: {
|
|
38
|
+
summary: AntTagInputSize.md
|
|
39
|
+
}
|
|
40
|
+
}
|
|
23
41
|
},
|
|
24
42
|
placeholder: {
|
|
25
|
-
table: {
|
|
43
|
+
table: {
|
|
44
|
+
defaultValue: {
|
|
45
|
+
summary: "this.label"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
26
48
|
},
|
|
27
49
|
createCallback: {
|
|
28
50
|
description: "If allowCreate is true the createCallback needs to be specified. It will be called when the user creates a new tag. It should return a promise that resolves to a SelectOption.",
|
|
@@ -62,7 +84,9 @@ const options = [
|
|
|
62
84
|
];
|
|
63
85
|
export const Docs = {
|
|
64
86
|
render: (args) => ({
|
|
65
|
-
components: {
|
|
87
|
+
components: {
|
|
88
|
+
AntTagInput
|
|
89
|
+
},
|
|
66
90
|
setup() {
|
|
67
91
|
const value = ref([]);
|
|
68
92
|
return {
|
|
@@ -87,16 +111,26 @@ export const AllowCreate = {
|
|
|
87
111
|
allowCreate: true,
|
|
88
112
|
createCallback(item) {
|
|
89
113
|
return new Promise((resolve) => {
|
|
90
|
-
resolve({
|
|
114
|
+
resolve({
|
|
115
|
+
label: item,
|
|
116
|
+
value: `${Math.random()}-${item}`
|
|
117
|
+
});
|
|
91
118
|
});
|
|
92
119
|
}
|
|
93
120
|
}
|
|
94
121
|
};
|
|
95
122
|
export const summary = {
|
|
96
123
|
render: (args) => ({
|
|
97
|
-
components: {
|
|
124
|
+
components: {
|
|
125
|
+
AntTagInput,
|
|
126
|
+
AntFormGroup,
|
|
127
|
+
AntFormGroupLabel
|
|
128
|
+
},
|
|
98
129
|
setup() {
|
|
99
|
-
const value = ref([
|
|
130
|
+
const value = ref([
|
|
131
|
+
"1",
|
|
132
|
+
"2"
|
|
133
|
+
]);
|
|
100
134
|
const noValue = ref([]);
|
|
101
135
|
return {
|
|
102
136
|
args,
|
|
@@ -1,41 +1,77 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Size
|
|
3
|
+
} from "../../../enums/Size.enum.mjs";
|
|
2
4
|
import AntTextInput from "../AntTextInput.vue";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
+
import {
|
|
6
|
+
TextInputType
|
|
7
|
+
} from "../__types/AntTextInput.types.mjs";
|
|
8
|
+
import {
|
|
9
|
+
InputState
|
|
10
|
+
} from "../../../enums/index.mjs";
|
|
5
11
|
const meta = {
|
|
6
12
|
title: "Inputs/Text Input",
|
|
7
13
|
component: AntTextInput,
|
|
8
|
-
parameters: {
|
|
14
|
+
parameters: {
|
|
15
|
+
controls: {
|
|
16
|
+
sort: "requiredFirst"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
9
19
|
argTypes: {
|
|
10
20
|
modelValue: {
|
|
11
21
|
control: "text",
|
|
12
|
-
table: {
|
|
22
|
+
table: {
|
|
23
|
+
type: {
|
|
24
|
+
summary: "string|null"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
13
27
|
},
|
|
14
28
|
state: {
|
|
15
|
-
control: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select"
|
|
31
|
+
},
|
|
16
32
|
options: Object.values(InputState)
|
|
17
33
|
},
|
|
18
34
|
size: {
|
|
19
|
-
control: {
|
|
35
|
+
control: {
|
|
36
|
+
type: "select"
|
|
37
|
+
},
|
|
20
38
|
options: Object.values(Size),
|
|
21
|
-
table: {
|
|
39
|
+
table: {
|
|
40
|
+
defaultValue: {
|
|
41
|
+
summary: Size.md
|
|
42
|
+
}
|
|
43
|
+
}
|
|
22
44
|
},
|
|
23
45
|
placeholder: {
|
|
24
|
-
table: {
|
|
46
|
+
table: {
|
|
47
|
+
defaultValue: {
|
|
48
|
+
summary: "this.label"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
25
51
|
},
|
|
26
52
|
type: {
|
|
27
|
-
control: {
|
|
53
|
+
control: {
|
|
54
|
+
type: "select"
|
|
55
|
+
},
|
|
28
56
|
options: Object.values(TextInputType),
|
|
29
|
-
table: {
|
|
57
|
+
table: {
|
|
58
|
+
defaultValue: {
|
|
59
|
+
summary: TextInputType.text
|
|
60
|
+
}
|
|
61
|
+
}
|
|
30
62
|
}
|
|
31
63
|
}
|
|
32
64
|
};
|
|
33
65
|
export default meta;
|
|
34
66
|
export const Docs = {
|
|
35
67
|
render: (args) => ({
|
|
36
|
-
components: {
|
|
68
|
+
components: {
|
|
69
|
+
AntTextInput
|
|
70
|
+
},
|
|
37
71
|
setup() {
|
|
38
|
-
return {
|
|
72
|
+
return {
|
|
73
|
+
args
|
|
74
|
+
};
|
|
39
75
|
},
|
|
40
76
|
template: `
|
|
41
77
|
<AntTextInput
|
|
@@ -51,12 +87,19 @@ export const Docs = {
|
|
|
51
87
|
};
|
|
52
88
|
export const Summary = {
|
|
53
89
|
parameters: {
|
|
54
|
-
chromatic: {
|
|
90
|
+
chromatic: {
|
|
91
|
+
disableSnapshot: false
|
|
92
|
+
}
|
|
55
93
|
},
|
|
56
94
|
render: (args) => ({
|
|
57
|
-
components: {
|
|
95
|
+
components: {
|
|
96
|
+
AntTextInput
|
|
97
|
+
},
|
|
58
98
|
setup() {
|
|
59
|
-
return {
|
|
99
|
+
return {
|
|
100
|
+
args,
|
|
101
|
+
InputState
|
|
102
|
+
};
|
|
60
103
|
},
|
|
61
104
|
template: `
|
|
62
105
|
<div class="flex gap-2.5">
|
|
@@ -1,46 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
Grouped as _Grouped
|
|
3
|
+
} from "../../../enums/Grouped.enum.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Size
|
|
6
|
+
} from "../../../enums/Size.enum.mjs";
|
|
3
7
|
import AntTextarea from "../AntTextarea.vue";
|
|
4
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
InputState
|
|
10
|
+
} from "../../../enums/index.mjs";
|
|
5
11
|
const meta = {
|
|
6
12
|
title: "Inputs/Textarea",
|
|
7
13
|
component: AntTextarea,
|
|
8
|
-
parameters: {
|
|
14
|
+
parameters: {
|
|
15
|
+
controls: {
|
|
16
|
+
sort: "requiredFirst"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
9
19
|
argTypes: {
|
|
10
20
|
state: {
|
|
11
|
-
control: {
|
|
21
|
+
control: {
|
|
22
|
+
type: "select"
|
|
23
|
+
},
|
|
12
24
|
options: Object.values(InputState)
|
|
13
25
|
},
|
|
14
26
|
size: {
|
|
15
|
-
control: {
|
|
27
|
+
control: {
|
|
28
|
+
type: "select"
|
|
29
|
+
},
|
|
16
30
|
options: Object.values(Size)
|
|
17
31
|
},
|
|
18
32
|
placeholder: {
|
|
19
|
-
table: {
|
|
33
|
+
table: {
|
|
34
|
+
defaultValue: {
|
|
35
|
+
summary: "this.label"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
20
38
|
},
|
|
21
39
|
grouped: {
|
|
22
|
-
control: {
|
|
40
|
+
control: {
|
|
41
|
+
type: "select"
|
|
42
|
+
},
|
|
23
43
|
options: Object.values(_Grouped),
|
|
24
44
|
description: "Where is this fields position in a group"
|
|
25
45
|
},
|
|
26
46
|
wrapperClass: {
|
|
27
47
|
control: "text",
|
|
28
48
|
description: 'Class for the first element because the attribute "class" would affect the input element.',
|
|
29
|
-
table: {
|
|
49
|
+
table: {
|
|
50
|
+
type: {
|
|
51
|
+
summary: "string|object"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
30
54
|
},
|
|
31
55
|
showIcon: {
|
|
32
56
|
control: "boolean",
|
|
33
57
|
description: "Some InputStates can has an icon. Control with this property if it get shown or not.",
|
|
34
|
-
table: {
|
|
58
|
+
table: {
|
|
59
|
+
type: {
|
|
60
|
+
summary: "Type"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
35
63
|
}
|
|
36
64
|
}
|
|
37
65
|
};
|
|
38
66
|
export default meta;
|
|
39
67
|
export const Docs = {
|
|
40
68
|
render: (args) => ({
|
|
41
|
-
components: {
|
|
69
|
+
components: {
|
|
70
|
+
AntTextarea
|
|
71
|
+
},
|
|
42
72
|
setup: () => {
|
|
43
|
-
return {
|
|
73
|
+
return {
|
|
74
|
+
args
|
|
75
|
+
};
|
|
44
76
|
},
|
|
45
77
|
template: `
|
|
46
78
|
<div class="h-screen">
|
|
@@ -59,7 +91,9 @@ export const Docs = {
|
|
|
59
91
|
};
|
|
60
92
|
export const summary = {
|
|
61
93
|
parameters: {
|
|
62
|
-
chromatic: {
|
|
94
|
+
chromatic: {
|
|
95
|
+
disableSnapshot: false
|
|
96
|
+
}
|
|
63
97
|
},
|
|
64
98
|
render: (args, ctx) => ({
|
|
65
99
|
// @ts-ignore
|
|
@@ -1,44 +1,78 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Size
|
|
3
|
+
} from "../../../enums/Size.enum.mjs";
|
|
2
4
|
import AntUnitInput from "../AntUnitInput.vue";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
+
import {
|
|
6
|
+
faEuroSign
|
|
7
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
8
|
+
import {
|
|
9
|
+
InputState
|
|
10
|
+
} from "../../../enums/index.mjs";
|
|
5
11
|
const meta = {
|
|
6
12
|
title: "Inputs/Unit Input",
|
|
7
13
|
component: AntUnitInput,
|
|
8
|
-
parameters: {
|
|
14
|
+
parameters: {
|
|
15
|
+
controls: {
|
|
16
|
+
sort: "requiredFirst"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
9
19
|
argTypes: {
|
|
10
20
|
modelValue: {
|
|
11
|
-
table: {
|
|
21
|
+
table: {
|
|
22
|
+
type: {
|
|
23
|
+
summary: "number|null"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
12
26
|
},
|
|
13
27
|
unit: {
|
|
14
28
|
control: "text",
|
|
15
29
|
description: "Will be displayed right to the input.<br>Use text or Font-awesome Icons.",
|
|
16
|
-
table: {
|
|
30
|
+
table: {
|
|
31
|
+
type: {
|
|
32
|
+
summary: "string|IconDefinition"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
17
35
|
},
|
|
18
36
|
state: {
|
|
19
|
-
control: {
|
|
37
|
+
control: {
|
|
38
|
+
type: "select"
|
|
39
|
+
},
|
|
20
40
|
options: Object.values(InputState)
|
|
21
41
|
},
|
|
22
42
|
size: {
|
|
23
|
-
control: {
|
|
43
|
+
control: {
|
|
44
|
+
type: "select"
|
|
45
|
+
},
|
|
24
46
|
options: Object.values(Size)
|
|
25
47
|
},
|
|
26
48
|
placeholder: {
|
|
27
|
-
table: {
|
|
49
|
+
table: {
|
|
50
|
+
defaultValue: {
|
|
51
|
+
summary: "this.label"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
28
54
|
},
|
|
29
55
|
wrapperClass: {
|
|
30
56
|
control: "text",
|
|
31
57
|
description: 'Class for the first element because the attribute "class" would affect the input element.',
|
|
32
|
-
table: {
|
|
58
|
+
table: {
|
|
59
|
+
type: {
|
|
60
|
+
summary: "string|object"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
33
63
|
}
|
|
34
64
|
}
|
|
35
65
|
};
|
|
36
66
|
export default meta;
|
|
37
67
|
export const Docs = {
|
|
38
68
|
render: (args) => ({
|
|
39
|
-
components: {
|
|
69
|
+
components: {
|
|
70
|
+
AntUnitInput
|
|
71
|
+
},
|
|
40
72
|
setup() {
|
|
41
|
-
return {
|
|
73
|
+
return {
|
|
74
|
+
args
|
|
75
|
+
};
|
|
42
76
|
},
|
|
43
77
|
template: `
|
|
44
78
|
<AntUnitInput
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
computed, useSlots,
|
|
4
|
+
} from 'vue';
|
|
3
5
|
import AntNavbar from '../navbar/AntNavbar.vue';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
+
import type {
|
|
7
|
+
RouteLocationRaw,
|
|
8
|
+
} from 'vue-router';
|
|
9
|
+
import type {
|
|
10
|
+
NavbarItemTypes,
|
|
11
|
+
} from '../navbar/__types/NavbarItem.types';
|
|
6
12
|
|
|
7
13
|
defineProps<{
|
|
8
14
|
navbarItems: NavbarItemTypes[];
|
|
@@ -21,7 +27,7 @@ const hasLogoImageSlot = computed(() => useSlots()['logo-image'] || false);
|
|
|
21
27
|
:to="logoRoute"
|
|
22
28
|
class="bg-white min-h-[60px] flex justify-center items-center p-2.5"
|
|
23
29
|
>
|
|
24
|
-
<slot name="logo-image"/>
|
|
30
|
+
<slot name="logo-image" />
|
|
25
31
|
</component>
|
|
26
32
|
|
|
27
33
|
<AntNavbar
|
|
@@ -29,8 +35,8 @@ const hasLogoImageSlot = computed(() => useSlots()['logo-image'] || false);
|
|
|
29
35
|
/>
|
|
30
36
|
</div>
|
|
31
37
|
|
|
32
|
-
<div class="w-px
|
|
33
|
-
<slot/>
|
|
38
|
+
<div class="w-px grow">
|
|
39
|
+
<slot />
|
|
34
40
|
</div>
|
|
35
41
|
</div>
|
|
36
42
|
</template>
|
|
@@ -3,8 +3,16 @@ import AntNavLeftLayout from "../AntNavLeftLayout.vue";
|
|
|
3
3
|
const meta = {
|
|
4
4
|
title: "Layouts/NavLeftLayout",
|
|
5
5
|
component: AntNavLeftLayout,
|
|
6
|
-
parameters: {
|
|
7
|
-
|
|
6
|
+
parameters: {
|
|
7
|
+
controls: {
|
|
8
|
+
sort: "requiredFirst"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
decorators: [
|
|
12
|
+
() => ({
|
|
13
|
+
template: '<div class="border border-dashed border-base-300"><story/></div>'
|
|
14
|
+
})
|
|
15
|
+
],
|
|
8
16
|
argTypes: {}
|
|
9
17
|
};
|
|
10
18
|
export default meta;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
computed,
|
|
5
|
+
} from 'vue';
|
|
6
|
+
import type {
|
|
7
|
+
NavbarItemTypes,
|
|
8
|
+
} from './__types/NavbarItem.types';
|
|
5
9
|
import AntNavbarItem from './AntNavbarItem.vue';
|
|
6
10
|
|
|
7
11
|
defineProps<{
|
|
8
|
-
navbarItems: NavbarItemTypes[]
|
|
12
|
+
navbarItems: NavbarItemTypes[];
|
|
9
13
|
}>();
|
|
10
14
|
|
|
11
15
|
const containerClasses = computed(() => ({
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type {
|
|
3
|
+
NavbarItemTypes,
|
|
4
|
+
} from './__types/NavbarItem.types';
|
|
5
|
+
import {
|
|
6
|
+
computed, ref,
|
|
7
|
+
} from 'vue';
|
|
4
8
|
import AntIcon from '../AntIcon.vue';
|
|
5
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
faChevronDown, faChevronUp,
|
|
11
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
6
12
|
import AntTransitionCollapseHeight from '../transitions/AntTransitionCollapseHeight.vue';
|
|
7
13
|
|
|
8
14
|
const props = defineProps<{
|
|
9
|
-
navbarItem: NavbarItemTypes
|
|
15
|
+
navbarItem: NavbarItemTypes;
|
|
10
16
|
}>();
|
|
11
17
|
|
|
12
18
|
const itemClasses = computed(() => ({
|
|
13
19
|
'w-full text-sm p-1.5 rounded-md cursor-pointer flex items-center flex-nowrap gap-1': true,
|
|
14
20
|
'transition-colors hover:bg-base-100': true,
|
|
15
|
-
'text-primary-500': props.navbarItem.active
|
|
21
|
+
'text-primary-500': props.navbarItem.active,
|
|
16
22
|
}));
|
|
17
23
|
|
|
18
24
|
const open = ref(false);
|
|
@@ -42,7 +48,7 @@ function itemClick(): void {
|
|
|
42
48
|
:color="navbarItem.active ? 'text-primary-500' : 'text-for-white-bg-font'"
|
|
43
49
|
/>
|
|
44
50
|
|
|
45
|
-
<div class="
|
|
51
|
+
<div class="grow select-none">
|
|
46
52
|
{{ navbarItem.label }}
|
|
47
53
|
</div>
|
|
48
54
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import AntNavbar from "../AntNavbar.vue";
|
|
2
2
|
import AntNavbarItem from "../AntNavbarItem.vue";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
faUserCircle
|
|
5
|
+
} from "@fortawesome/free-regular-svg-icons";
|
|
6
|
+
import {
|
|
7
|
+
faBook
|
|
8
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
5
9
|
const meta = {
|
|
6
10
|
title: "Components/Navbar",
|
|
7
11
|
component: AntNavbar,
|
|
@@ -13,7 +17,9 @@ const meta = {
|
|
|
13
17
|
export default meta;
|
|
14
18
|
export const Docs = {
|
|
15
19
|
render: (args) => ({
|
|
16
|
-
components: {
|
|
20
|
+
components: {
|
|
21
|
+
AntNavbar
|
|
22
|
+
},
|
|
17
23
|
setup() {
|
|
18
24
|
return {
|
|
19
25
|
args
|
|
@@ -26,39 +32,55 @@ export const Docs = {
|
|
|
26
32
|
`
|
|
27
33
|
}),
|
|
28
34
|
args: {
|
|
29
|
-
navbarItems: [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
35
|
+
navbarItems: [
|
|
36
|
+
{
|
|
37
|
+
icon: faUserCircle,
|
|
38
|
+
label: "Navbar item",
|
|
39
|
+
children: [
|
|
40
|
+
{
|
|
41
|
+
label: "Child"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
icon: faBook,
|
|
47
|
+
label: "Navbar item"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: "Navbar item"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: "Navbar item"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: "Navbar item"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
icon: faBook,
|
|
60
|
+
label: "Navbar item",
|
|
61
|
+
active: true,
|
|
62
|
+
children: [
|
|
63
|
+
{
|
|
64
|
+
label: "Child",
|
|
65
|
+
icon: faBook
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: "Navbar item"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: "Navbar item"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: "Navbar item"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: "Navbar item"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: "Navbar item"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
63
85
|
}
|
|
64
86
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
computed,
|
|
4
|
+
} from 'vue';
|
|
3
5
|
|
|
4
6
|
const props = withDefaults(defineProps<{
|
|
5
7
|
isOpen: boolean;
|
|
@@ -9,9 +11,9 @@ const props = withDefaults(defineProps<{
|
|
|
9
11
|
});
|
|
10
12
|
|
|
11
13
|
const rowContentClasses = computed(() => ({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
'grid transition-all duration-300 delay-0 ease-in-out': true,
|
|
15
|
+
'grid-rows-[0fr]': !props.isOpen,
|
|
16
|
+
'grid-rows-[1fr]': props.isOpen,
|
|
15
17
|
}));
|
|
16
18
|
|
|
17
19
|
</script>
|
|
@@ -19,7 +21,7 @@ const rowContentClasses = computed(() => ({
|
|
|
19
21
|
<template>
|
|
20
22
|
<div :class="rowContentClasses">
|
|
21
23
|
<div class="overflow-hidden">
|
|
22
|
-
<slot/>
|
|
24
|
+
<slot />
|
|
23
25
|
</div>
|
|
24
26
|
</div>
|
|
25
27
|
</template>
|