@antify/ui 1.3.0 → 2.1.0
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 +1 -1
- package/dist/components/AntAlert.vue +2 -2
- package/dist/components/AntCard.vue +1 -1
- package/dist/components/AntDropdown.vue +1 -1
- package/dist/components/AntKeycap.vue +1 -1
- package/dist/components/AntListGroup.vue +1 -1
- package/dist/components/AntListGroupItem.vue +1 -1
- package/dist/components/AntModal.vue +2 -2
- package/dist/components/AntPopover.vue +6 -6
- package/dist/components/AntSpinner.vue +4 -4
- package/dist/components/AntTag.vue +2 -2
- package/dist/components/AntToast.vue +2 -2
- package/dist/components/AntTooltip.vue +5 -3
- package/dist/components/__stories/AntContent.stories.js +1 -1
- package/dist/components/__stories/AntContent.stories.mjs +1 -1
- package/dist/components/__stories/AntListGroup.stories.js +1 -1
- package/dist/components/__stories/AntListGroup.stories.mjs +1 -1
- package/dist/components/__stories/AntListGroupItem.stories.js +1 -1
- package/dist/components/__stories/AntListGroupItem.stories.mjs +1 -1
- package/dist/components/__stories/AntTooltip.stories.d.ts +1 -0
- package/dist/components/__stories/AntTooltip.stories.js +8 -1
- package/dist/components/__stories/AntTooltip.stories.mjs +7 -0
- package/dist/components/buttons/AntButton.vue +4 -4
- package/dist/components/crud/AntCrud.vue +2 -2
- package/dist/components/crud/AntCrudDetail.vue +1 -1
- package/dist/components/crud/AntCrudTableFilter.vue +18 -20
- package/dist/components/crud/__stories/AntCrudDetailActions.stories.js +1 -1
- package/dist/components/crud/__stories/AntCrudDetailActions.stories.mjs +1 -1
- package/dist/components/crud/__stories/AntCrudTableFilter.stories.js +1 -1
- package/dist/components/crud/__stories/AntCrudTableFilter.stories.mjs +1 -1
- package/dist/components/dialogs/AntDialog.vue +4 -4
- package/dist/components/dialogs/__stories/AntDialog.stories.js +1 -1
- package/dist/components/dialogs/__stories/AntDialog.stories.mjs +1 -1
- package/dist/components/inputs/AntCheckbox.vue +2 -2
- package/dist/components/inputs/AntPasswordInput.vue +1 -1
- package/dist/components/inputs/AntRadio.vue +1 -1
- package/dist/components/inputs/AntRangeSlider.vue +2 -2
- package/dist/components/inputs/AntSelect.vue +2 -2
- package/dist/components/inputs/AntSwitch.vue +2 -2
- package/dist/components/inputs/AntSwitcher.vue +1 -1
- package/dist/components/inputs/AntTagInput.vue +2 -2
- package/dist/components/inputs/AntTextarea.vue +1 -1
- package/dist/components/inputs/Elements/AntBaseInput.vue +1 -1
- package/dist/components/inputs/Elements/AntSelectMenu.vue +27 -28
- package/dist/components/inputs/__stories/AntSelect.stories.d.ts +1 -0
- package/dist/components/inputs/__stories/AntSelect.stories.js +14 -2
- package/dist/components/inputs/__stories/AntSelect.stories.mjs +12 -1
- package/dist/components/layouts/AntNavLeftLayout.vue +2 -2
- package/dist/components/layouts/__stories/AntNavLeftLayout.stories.js +1 -1
- package/dist/components/layouts/__stories/AntNavLeftLayout.stories.mjs +1 -1
- package/dist/components/navbar/AntNavbarItem.vue +1 -1
- package/dist/components/table/AntTable.vue +8 -6
- package/dist/components/table/AntTh.vue +1 -1
- package/dist/components/table/__stories/AntTable.stories.js +38 -2
- package/dist/components/table/__stories/AntTable.stories.mjs +32 -2
- package/dist/components/tabs/AntTabItem.vue +3 -3
- package/dist/components/tabs/AntTabs.vue +1 -1
- package/dist/tailwind.config.js +92 -92
- package/dist/tailwind.config.mjs +92 -92
- package/package.json +1 -1
|
@@ -48,7 +48,7 @@ const classes = computed(() => {
|
|
|
48
48
|
const variants: Record<InputState, string> = {
|
|
49
49
|
[InputState.danger]: 'bg-danger-100 text-danger-700',
|
|
50
50
|
[InputState.info]: 'bg-info-100 text-info-700',
|
|
51
|
-
[InputState.base]: 'bg-
|
|
51
|
+
[InputState.base]: 'bg-base-100 text-base-100-font',
|
|
52
52
|
[InputState.success]: 'bg-success-100 text-success-700',
|
|
53
53
|
[InputState.warning]: 'bg-warning-100 text-warning-700',
|
|
54
54
|
};
|
|
@@ -63,7 +63,7 @@ const hasDefaultSlot = computed(() => useSlots()['default'] || false);
|
|
|
63
63
|
const hasQuestionMark = computed(() => (useSlots()['question-mark-text'] || false) || props.questionMarkText);
|
|
64
64
|
const iconColor = computed(() => {
|
|
65
65
|
const variants = {
|
|
66
|
-
[InputState.base]: 'text-
|
|
66
|
+
[InputState.base]: 'text-base-100-font',
|
|
67
67
|
[InputState.danger]: 'text-danger-700',
|
|
68
68
|
[InputState.info]: 'text-info-700',
|
|
69
69
|
[InputState.success]: 'text-success-700',
|
|
@@ -77,7 +77,7 @@ const onClickOutside = [
|
|
|
77
77
|
:style="floatingStyles"
|
|
78
78
|
>
|
|
79
79
|
<div
|
|
80
|
-
class="shadow-lg border border-
|
|
80
|
+
class="shadow-lg border border-base-300 rounded-md text-sm relative inline-flex flex-col bg-white text-for-white-bg-font w-full overflow-hidden"
|
|
81
81
|
:class="{'p-2': contentPadding}"
|
|
82
82
|
>
|
|
83
83
|
<slot name="content"/>
|
|
@@ -37,7 +37,7 @@ const iconClasses = computed(() => {
|
|
|
37
37
|
</script>
|
|
38
38
|
|
|
39
39
|
<template>
|
|
40
|
-
<div class="inline-flex relative justify-center items-center bg-
|
|
40
|
+
<div class="inline-flex relative justify-center items-center bg-base-300 rounded-md text-center text-base-300-font font-medium" :class="classes">
|
|
41
41
|
<AntIcon
|
|
42
42
|
v-if="icon"
|
|
43
43
|
:icon="icon"
|
|
@@ -17,7 +17,7 @@ withDefaults(
|
|
|
17
17
|
<AntSkeleton v-if="skeleton" absolute rounded/>
|
|
18
18
|
|
|
19
19
|
<div
|
|
20
|
-
class="flex flex-col rounded-md bg-
|
|
20
|
+
class="flex flex-col rounded-md bg-base-300 gap-px relative border border-base-300 overflow-hidden"
|
|
21
21
|
:class="{'invisible': skeleton, 'shadow-md': shadow}"
|
|
22
22
|
>
|
|
23
23
|
<slot/>
|
|
@@ -19,7 +19,7 @@ const classes = computed(() => {
|
|
|
19
19
|
const variants: Record<ListGroupItemState, string> = {
|
|
20
20
|
[ListGroupItemState.danger]: 'bg-danger-500 text-danger-500-font hover:bg-danger-700',
|
|
21
21
|
[ListGroupItemState.info]: 'bg-info-500 text-info-500-font hover:bg-info-700',
|
|
22
|
-
[ListGroupItemState.base]: 'bg-white text-for-white-bg-font hover:bg-
|
|
22
|
+
[ListGroupItemState.base]: 'bg-white text-for-white-bg-font hover:bg-base-200',
|
|
23
23
|
[ListGroupItemState.primary]: 'bg-primary-500 text-primary-500-font hover:bg-primary-700',
|
|
24
24
|
[ListGroupItemState.secondary]: 'bg-secondary-500 text-secondary-500-font hover:bg-secondary-700',
|
|
25
25
|
[ListGroupItemState.success]: 'bg-success-500 text-success-500-font hover:bg-success-700',
|
|
@@ -54,8 +54,8 @@ function closeModal() {
|
|
|
54
54
|
<Transition :name="!fullscreen ? 'bounce' : 'bounce-slow'">
|
|
55
55
|
<div
|
|
56
56
|
v-if="openModal"
|
|
57
|
-
class="flex flex-col gap-px bg-
|
|
58
|
-
:class="{'w-full h-full': fullscreen, 'border border-
|
|
57
|
+
class="flex flex-col gap-px bg-base-300 overflow-hidden cursor-auto"
|
|
58
|
+
:class="{'w-full h-full': fullscreen, 'border border-base-300 rounded-md shadow-md': !fullscreen}"
|
|
59
59
|
>
|
|
60
60
|
<div
|
|
61
61
|
class="bg-white p-2 flex items-center justify-between"
|
|
@@ -107,10 +107,10 @@ const onClickOutside = [
|
|
|
107
107
|
ref="floating"
|
|
108
108
|
:style="floatingStyles"
|
|
109
109
|
>
|
|
110
|
-
<div class="shadow-lg border-
|
|
110
|
+
<div class="shadow-lg border-base-300 rounded-md text-sm relative inline-flex flex-col">
|
|
111
111
|
|
|
112
112
|
<div
|
|
113
|
-
class="border-
|
|
113
|
+
class="border-base-300 border-b p-2 bg-base-100 rounded-t-md border-t border-l border-r text-base-100-font font-semibold"
|
|
114
114
|
>
|
|
115
115
|
<slot name="title">
|
|
116
116
|
{{ title }}
|
|
@@ -118,7 +118,7 @@ const onClickOutside = [
|
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
120
|
<div
|
|
121
|
-
class="p-2 rounded-b-md text-for-white-bg-font border-
|
|
121
|
+
class="p-2 rounded-b-md text-for-white-bg-font border-base-300 border-l border-b border-r bg-white"
|
|
122
122
|
>
|
|
123
123
|
<slot name="content"/>
|
|
124
124
|
</div>
|
|
@@ -154,12 +154,12 @@ const onClickOutside = [
|
|
|
154
154
|
>
|
|
155
155
|
<path
|
|
156
156
|
d="M20.3284 1.82843L23.1569 4.65685C24.6571 6.15715 26.692 7 28.8137 7L6.18629 7C8.30802 7 10.3429 6.15715 11.8431 4.65686L14.6716 1.82843C16.2337 0.266331 18.7663 0.266328 20.3284 1.82843Z"
|
|
157
|
-
:class="{'fill-
|
|
157
|
+
:class="{'fill-base-100': placement === Position.bottom, 'fill-white': placement === Position.top || placement === Position.right || placement === Position.left}"
|
|
158
158
|
/>
|
|
159
159
|
|
|
160
160
|
<path
|
|
161
161
|
d="M34.5 7L28.8137 7C26.692 7 24.6571 6.15715 23.1569 4.65685L20.3284 1.82843C18.7663 0.266328 16.2337 0.266331 14.6716 1.82843L11.8431 4.65686C10.3429 6.15715 8.30802 7 6.18629 7L0.5 7L34.5 7Z"
|
|
162
|
-
:class="{'stroke-
|
|
162
|
+
:class="{'stroke-base-100': placement === Position.bottom, 'stroke-white': placement === Position.top || placement === Position.right || placement === Position.left}"
|
|
163
163
|
/>
|
|
164
164
|
</svg>
|
|
165
165
|
|
|
@@ -173,7 +173,7 @@ const onClickOutside = [
|
|
|
173
173
|
>
|
|
174
174
|
<path
|
|
175
175
|
d="M34.5 7L28.8137 7C26.692 7 24.6571 6.15715 23.1569 4.65685L20.3284 1.82843C18.7663 0.266328 16.2337 0.266331 14.6716 1.82843L11.8431 4.65686C10.3429 6.15715 8.30802 7 6.18629 7L0.5 7"
|
|
176
|
-
class="stroke-
|
|
176
|
+
class="stroke-base-300"
|
|
177
177
|
/>
|
|
178
178
|
</svg>
|
|
179
179
|
</div>
|
|
@@ -31,7 +31,7 @@ onMounted(() => {
|
|
|
31
31
|
});
|
|
32
32
|
const circleClass = computed(() => {
|
|
33
33
|
const invertedVariants: Record<State, string> = {
|
|
34
|
-
[State.base]: 'fill-
|
|
34
|
+
[State.base]: 'fill-base-500',
|
|
35
35
|
[State.primary]: 'fill-primary-700',
|
|
36
36
|
[State.secondary]: 'fill-secondary-700',
|
|
37
37
|
[State.danger]: 'fill-danger-700',
|
|
@@ -40,7 +40,7 @@ const circleClass = computed(() => {
|
|
|
40
40
|
[State.warning]: 'fill-warning-700',
|
|
41
41
|
};
|
|
42
42
|
const notInvertedVariants: Record<State, string> = {
|
|
43
|
-
[State.base]: 'fill-
|
|
43
|
+
[State.base]: 'fill-base-100',
|
|
44
44
|
[State.primary]: 'fill-primary-100',
|
|
45
45
|
[State.secondary]: 'fill-secondary-100',
|
|
46
46
|
[State.danger]: 'fill-danger-100',
|
|
@@ -56,7 +56,7 @@ const circleClass = computed(() => {
|
|
|
56
56
|
});
|
|
57
57
|
const spinningElementClass = computed(() => {
|
|
58
58
|
const invertedVariants: Record<State, string> = {
|
|
59
|
-
[State.base]: 'fill-
|
|
59
|
+
[State.base]: 'fill-base-100',
|
|
60
60
|
[State.primary]: 'fill-primary-100',
|
|
61
61
|
[State.secondary]: 'fill-secondary-100',
|
|
62
62
|
[State.danger]: 'fill-danger-100',
|
|
@@ -65,7 +65,7 @@ const spinningElementClass = computed(() => {
|
|
|
65
65
|
[State.warning]: 'fill-warning-100',
|
|
66
66
|
};
|
|
67
67
|
const notInvertedVariants: Record<State, string> = {
|
|
68
|
-
[State.base]: 'fill-
|
|
68
|
+
[State.base]: 'fill-base-500',
|
|
69
69
|
[State.primary]: 'fill-primary-500',
|
|
70
70
|
[State.secondary]: 'fill-secondary-500',
|
|
71
71
|
[State.danger]: 'fill-danger-500',
|
|
@@ -24,7 +24,7 @@ const classes = computed(() => {
|
|
|
24
24
|
[TagState.info]: 'bg-info-500 text-info-500-font',
|
|
25
25
|
[TagState.primary]: 'bg-primary-500 text-primary-500-font',
|
|
26
26
|
[TagState.secondary]: 'bg-secondary-500 text-secondary-500-font',
|
|
27
|
-
[TagState.base]: 'bg-
|
|
27
|
+
[TagState.base]: 'bg-base-300 text-base-300-font',
|
|
28
28
|
[TagState.success]: 'bg-success-500 text-success-500-font',
|
|
29
29
|
[TagState.warning]: 'bg-warning-500 text-warning-500-font',
|
|
30
30
|
};
|
|
@@ -61,7 +61,7 @@ const iconState = computed(() => {
|
|
|
61
61
|
case TagState.secondary:
|
|
62
62
|
return 'text-secondary-500-font';
|
|
63
63
|
default:
|
|
64
|
-
return 'text-
|
|
64
|
+
return 'text-base-300-font';
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
const iconWrapperClass = computed(() => {
|
|
@@ -35,7 +35,7 @@ const icons = {
|
|
|
35
35
|
const _icon = computed(() => icons[props.state]);
|
|
36
36
|
const classes = computed(() => {
|
|
37
37
|
const variants: Record<InputState, string> = {
|
|
38
|
-
[InputState.base]: 'bg-
|
|
38
|
+
[InputState.base]: 'bg-base-100 border-base-500 text-base-500',
|
|
39
39
|
[InputState.danger]: 'bg-danger-100 border-danger-500 text-danger-500',
|
|
40
40
|
[InputState.info]: 'bg-info-100 border-info-500 text-info-500',
|
|
41
41
|
[InputState.success]: 'bg-success-100 border-success-500 text-success-500',
|
|
@@ -50,7 +50,7 @@ const classes = computed(() => {
|
|
|
50
50
|
const hasDefaultSlot = computed(() => useSlots()['default'] || false);
|
|
51
51
|
const iconColor = computed(() => {
|
|
52
52
|
const variants = {
|
|
53
|
-
[InputState.base]: 'text-
|
|
53
|
+
[InputState.base]: 'text-base-100-font',
|
|
54
54
|
[InputState.danger]: 'text-danger-500',
|
|
55
55
|
[InputState.info]: 'text-info-500',
|
|
56
56
|
[InputState.success]: 'text-success-500',
|
|
@@ -9,10 +9,12 @@ const props = withDefaults(defineProps<{
|
|
|
9
9
|
state?: InputState,
|
|
10
10
|
delay?: number,
|
|
11
11
|
tooltipClasses?: string | Record<string, boolean>
|
|
12
|
+
disabled?: boolean;
|
|
12
13
|
}>(), {
|
|
13
14
|
state: InputState.base,
|
|
14
15
|
delay: 600,
|
|
15
16
|
tooltipClasses: '',
|
|
17
|
+
disabled: false,
|
|
16
18
|
});
|
|
17
19
|
|
|
18
20
|
const floatOpen = ref<boolean>(false)
|
|
@@ -70,7 +72,7 @@ const svgPathClasses = computed(() => {
|
|
|
70
72
|
});
|
|
71
73
|
const arrowSvgPathClasses = computed(() => {
|
|
72
74
|
const variants: Record<InputState, string> = {
|
|
73
|
-
[InputState.base]: 'stroke-
|
|
75
|
+
[InputState.base]: 'stroke-base-300',
|
|
74
76
|
[InputState.danger]: 'stroke-danger-500',
|
|
75
77
|
[InputState.info]: 'stroke-info-500',
|
|
76
78
|
[InputState.success]: 'stroke-success-500',
|
|
@@ -81,7 +83,7 @@ const arrowSvgPathClasses = computed(() => {
|
|
|
81
83
|
});
|
|
82
84
|
const contentClasses = computed(() => {
|
|
83
85
|
const variants: Record<InputState, string> = {
|
|
84
|
-
[InputState.base]: 'text-for-white-bg-font bg-white border-
|
|
86
|
+
[InputState.base]: 'text-for-white-bg-font bg-white border-base-300',
|
|
85
87
|
[InputState.danger]: 'text-danger-500-font bg-danger-500 border-danger-500',
|
|
86
88
|
[InputState.info]: 'text-info-500-font bg-info-500 border-info-500',
|
|
87
89
|
[InputState.success]: 'text-success-500-font bg-success-500 border-success-500',
|
|
@@ -157,7 +159,7 @@ function onClick() {
|
|
|
157
159
|
|
|
158
160
|
<teleport to="body">
|
|
159
161
|
<div
|
|
160
|
-
v-if="floatOpen && hasSlotContent($slots.content)"
|
|
162
|
+
v-if="floatOpen && hasSlotContent($slots.content) && !disabled"
|
|
161
163
|
:class="_tooltipClasses"
|
|
162
164
|
ref="floating"
|
|
163
165
|
:style="{
|
|
@@ -35,7 +35,7 @@ const Docs = exports.Docs = {
|
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
37
|
template: `
|
|
38
|
-
<div class="p-4 bg-
|
|
38
|
+
<div class="p-4 bg-base-100">
|
|
39
39
|
<AntListGroup v-bind="args">
|
|
40
40
|
<AntListGroupItem to="/example" :icon-left="faUser">Profile</AntListGroupItem>
|
|
41
41
|
<AntListGroupItem to="/example" :icon-left="faDownload">Downloads</AntListGroupItem>
|
|
@@ -15,7 +15,7 @@ export const Docs = {
|
|
|
15
15
|
return { args, faUser, faDownload, faMessage, faCog };
|
|
16
16
|
},
|
|
17
17
|
template: `
|
|
18
|
-
<div class="p-4 bg-
|
|
18
|
+
<div class="p-4 bg-base-100">
|
|
19
19
|
<AntListGroup v-bind="args">
|
|
20
20
|
<AntListGroupItem to="/example" :icon-left="faUser">Profile</AntListGroupItem>
|
|
21
21
|
<AntListGroupItem to="/example" :icon-left="faDownload">Downloads</AntListGroupItem>
|
|
@@ -48,7 +48,7 @@ const Docs = exports.Docs = {
|
|
|
48
48
|
args
|
|
49
49
|
};
|
|
50
50
|
},
|
|
51
|
-
template: '<div class="p-4 bg-
|
|
51
|
+
template: '<div class="p-4 bg-base-100"><AntListGroupItem v-bind="args">Item</AntListGroupItem></div>'
|
|
52
52
|
}),
|
|
53
53
|
args: {}
|
|
54
54
|
};
|
|
@@ -27,7 +27,7 @@ export const Docs = {
|
|
|
27
27
|
setup() {
|
|
28
28
|
return { args };
|
|
29
29
|
},
|
|
30
|
-
template: '<div class="p-4 bg-
|
|
30
|
+
template: '<div class="p-4 bg-base-100"><AntListGroupItem v-bind="args">Item</AntListGroupItem></div>'
|
|
31
31
|
}),
|
|
32
32
|
args: {}
|
|
33
33
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
6
|
+
exports.disabled = exports.default = exports.Docs = void 0;
|
|
7
7
|
var _AntTooltip = _interopRequireDefault(require("../AntTooltip.vue"));
|
|
8
8
|
var _enums = require("../../enums");
|
|
9
9
|
var _AntButton = _interopRequireDefault(require("../buttons/AntButton.vue"));
|
|
@@ -102,4 +102,11 @@ const Docs = exports.Docs = {
|
|
|
102
102
|
});
|
|
103
103
|
},
|
|
104
104
|
args: {}
|
|
105
|
+
};
|
|
106
|
+
const disabled = exports.disabled = {
|
|
107
|
+
render: Docs.render,
|
|
108
|
+
args: {
|
|
109
|
+
...Docs.args,
|
|
110
|
+
disabled: true
|
|
111
|
+
}
|
|
105
112
|
};
|
|
@@ -61,7 +61,7 @@ const groupedClassList = computed(() => ({
|
|
|
61
61
|
}));
|
|
62
62
|
const classes = computed(() => {
|
|
63
63
|
const variants = {
|
|
64
|
-
[State.base]: 'ring-primary-200 outline-
|
|
64
|
+
[State.base]: 'ring-primary-200 outline-base-300',
|
|
65
65
|
[State.danger]: 'ring-danger-200 outline-danger-500',
|
|
66
66
|
[State.info]: 'ring-info-200 outline-info-500',
|
|
67
67
|
[State.primary]: 'ring-primary-200 outline-primary-500',
|
|
@@ -79,7 +79,7 @@ const classes = computed(() => {
|
|
|
79
79
|
[State.warning]: 'bg-white text-warning-500',
|
|
80
80
|
};
|
|
81
81
|
const notFilledHoverVariants = {
|
|
82
|
-
[State.base]: 'hover:bg-
|
|
82
|
+
[State.base]: 'hover:bg-base-100',
|
|
83
83
|
[State.danger]: 'hover:bg-danger-100',
|
|
84
84
|
[State.info]: 'hover:bg-info-100',
|
|
85
85
|
[State.primary]: 'hover:bg-primary-100',
|
|
@@ -88,7 +88,7 @@ const classes = computed(() => {
|
|
|
88
88
|
[State.warning]: 'hover:bg-warning-100',
|
|
89
89
|
};
|
|
90
90
|
const filledVariants = {
|
|
91
|
-
[State.base]: 'bg-
|
|
91
|
+
[State.base]: 'bg-base-50 text-base-50-font',
|
|
92
92
|
[State.danger]: 'bg-danger-500 text-danger-500-font',
|
|
93
93
|
[State.info]: 'bg-info-500 text-info-500-font',
|
|
94
94
|
[State.primary]: 'bg-primary-500 text-primary-500-font',
|
|
@@ -97,7 +97,7 @@ const classes = computed(() => {
|
|
|
97
97
|
[State.warning]: 'bg-warning-500 text-warning-500-font',
|
|
98
98
|
};
|
|
99
99
|
const filledHoverVariants = {
|
|
100
|
-
[State.base]: 'hover:bg-
|
|
100
|
+
[State.base]: 'hover:bg-base-200',
|
|
101
101
|
[State.danger]: 'hover:bg-danger-600',
|
|
102
102
|
[State.info]: 'hover:bg-info-600',
|
|
103
103
|
[State.primary]: 'hover:bg-primary-600',
|
|
@@ -12,7 +12,7 @@ withDefaults(defineProps<{
|
|
|
12
12
|
data-e2e="crud"
|
|
13
13
|
>
|
|
14
14
|
<div
|
|
15
|
-
class="left-content h-full flex flex-col bg-
|
|
15
|
+
class="left-content h-full flex flex-col bg-base-300 gap-px overflow-hidden"
|
|
16
16
|
:class="{'w-[40rem]': showDetail, 'w-full': !showDetail}"
|
|
17
17
|
>
|
|
18
18
|
<div class="bg-white">
|
|
@@ -31,7 +31,7 @@ withDefaults(defineProps<{
|
|
|
31
31
|
<Transition name="right-content">
|
|
32
32
|
<div
|
|
33
33
|
v-if="showDetail"
|
|
34
|
-
class="flex flex-col gap-px border-l border-
|
|
34
|
+
class="flex flex-col gap-px border-l border-base-300 overflow-hidden"
|
|
35
35
|
:class="{'w-full': showDetail}"
|
|
36
36
|
>
|
|
37
37
|
<slot/>
|
|
@@ -81,27 +81,25 @@ watch(() => props.fullWidth, (val) => {
|
|
|
81
81
|
v-model:show-dropdown="showDropdown"
|
|
82
82
|
:position="Position.left"
|
|
83
83
|
>
|
|
84
|
-
<
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
/>
|
|
84
|
+
<div class="flex">
|
|
85
|
+
<AntButton
|
|
86
|
+
:state="hasFilter ? State.info : State.base"
|
|
87
|
+
:grouped="hasFilter ? Grouped.left : Grouped.none"
|
|
88
|
+
:skeleton="skeleton"
|
|
89
|
+
:icon-left="faFilter"
|
|
90
|
+
@click="() => showDropdown = !showDropdown"
|
|
91
|
+
/>
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
</template>
|
|
93
|
+
<AntButton
|
|
94
|
+
v-if="hasFilter"
|
|
95
|
+
:state="State.info"
|
|
96
|
+
:grouped="Grouped.right"
|
|
97
|
+
:skeleton="skeleton"
|
|
98
|
+
:icon-left="faMultiply"
|
|
99
|
+
filled
|
|
100
|
+
@click="$emit('removeFilter')"
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
105
103
|
|
|
106
104
|
<template #content>
|
|
107
105
|
<slot name="dropdownContent"/>
|
|
@@ -4,7 +4,7 @@ const meta = {
|
|
|
4
4
|
title: "Crud/Crud Detail Actions",
|
|
5
5
|
component: AntCrudDetailActions,
|
|
6
6
|
parameters: { controls: { sort: "requiredFirst" } },
|
|
7
|
-
decorators: [() => ({ template: '<div class="border border-dashed border-
|
|
7
|
+
decorators: [() => ({ template: '<div class="border border-dashed border-base-300"><story/></div>' })],
|
|
8
8
|
argTypes: {}
|
|
9
9
|
};
|
|
10
10
|
export default meta;
|
|
@@ -41,7 +41,7 @@ const icons = {
|
|
|
41
41
|
|
|
42
42
|
const iconColor = computed(() => {
|
|
43
43
|
const variants = {
|
|
44
|
-
[InputState.base]: 'text-
|
|
44
|
+
[InputState.base]: 'text-base-100-font',
|
|
45
45
|
[InputState.danger]: 'text-danger-500',
|
|
46
46
|
[InputState.info]: 'text-info-500',
|
|
47
47
|
[InputState.success]: 'text-success-500',
|
|
@@ -91,11 +91,11 @@ function confirmDialog() {
|
|
|
91
91
|
<Transition :name="'bounce'">
|
|
92
92
|
<div
|
|
93
93
|
v-if="openDialog"
|
|
94
|
-
class="flex flex-col gap-px bg-
|
|
94
|
+
class="flex flex-col gap-px bg-base-300 overflow-hidden cursor-auto w-96 border border-base-300 rounded-md shadow-md"
|
|
95
95
|
>
|
|
96
96
|
<div
|
|
97
97
|
v-if="title || $slots['title']"
|
|
98
|
-
class="bg-
|
|
98
|
+
class="bg-base-100 p-2 flex items-center justify-between text-base-100-font text-sm font-semibold"
|
|
99
99
|
>
|
|
100
100
|
<slot name="title">
|
|
101
101
|
{{ title }}
|
|
@@ -117,7 +117,7 @@ function confirmDialog() {
|
|
|
117
117
|
</div>
|
|
118
118
|
|
|
119
119
|
<div
|
|
120
|
-
class="bg-
|
|
120
|
+
class="bg-base-100 p-2 gap-2 text-for-white-bg-font flex w-full justify-end"
|
|
121
121
|
>
|
|
122
122
|
<slot name="footer">
|
|
123
123
|
<AntButton
|
|
@@ -5,7 +5,7 @@ const meta = {
|
|
|
5
5
|
title: "Components/Dialogs/Dialog",
|
|
6
6
|
component: AntDialog,
|
|
7
7
|
parameters: { controls: { sort: "requiredFirst" } },
|
|
8
|
-
decorators: [() => ({ template: '<div class="border border-dashed border-
|
|
8
|
+
decorators: [() => ({ template: '<div class="border border-dashed border-base-300"><story/></div>' })],
|
|
9
9
|
argTypes: {
|
|
10
10
|
state: {
|
|
11
11
|
control: { type: "select" },
|
|
@@ -49,7 +49,7 @@ const inputClasses = computed(() => {
|
|
|
49
49
|
[InputState.warning]: 'text-warning-500',
|
|
50
50
|
};
|
|
51
51
|
const inactiveColorVariant: Record<InputState, string> = {
|
|
52
|
-
[InputState.base]: 'outline-
|
|
52
|
+
[InputState.base]: 'outline-base-300',
|
|
53
53
|
[InputState.danger]: 'outline-danger-500',
|
|
54
54
|
[InputState.info]: 'outline-info-500',
|
|
55
55
|
[InputState.success]: 'outline-success-500',
|
|
@@ -57,7 +57,7 @@ const inputClasses = computed(() => {
|
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
return {
|
|
60
|
-
'relative inline-flex flex-shrink-0 bg-
|
|
60
|
+
'relative inline-flex flex-shrink-0 bg-base-100 border-0': true,
|
|
61
61
|
'outline outline-1 outline-offset-[-1px] rounded': true,
|
|
62
62
|
'focus:ring-offset-0': true,
|
|
63
63
|
'invisible': props.skeleton,
|
|
@@ -47,7 +47,7 @@ const inputClasses = computed(() => {
|
|
|
47
47
|
'rounded-full transition-colors ease-in-out duration-200 disabled:opacity-50': true,
|
|
48
48
|
'focus:ring-2': !hasInputState.value && (props.size === Size.sm || props.size === Size.xs || props.size === Size.xs2),
|
|
49
49
|
'focus:ring-4': !hasInputState.value && (props.size === Size.lg || props.size === Size.md),
|
|
50
|
-
'outline-
|
|
50
|
+
'outline-base-300': props.state === InputState.base,
|
|
51
51
|
'outline-primary-500': props.state === InputState.base && isActive.value,
|
|
52
52
|
'outline-info-500': props.state === InputState.info,
|
|
53
53
|
'outline-success-500': props.state === InputState.success,
|
|
@@ -30,7 +30,7 @@ const props = withDefaults(defineProps<{
|
|
|
30
30
|
const _modelValue = useVModel(props, 'modelValue', emit);
|
|
31
31
|
const inputClasses = computed(() => {
|
|
32
32
|
const variants: Record<InputState, string> = {
|
|
33
|
-
[InputState.base]: 'text-
|
|
33
|
+
[InputState.base]: 'text-base-base',
|
|
34
34
|
[InputState.danger]: 'text-danger-base',
|
|
35
35
|
[InputState.info]: 'text-info-base',
|
|
36
36
|
[InputState.success]: 'text-success-base',
|
|
@@ -38,7 +38,7 @@ const inputClasses = computed(() => {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
return {
|
|
41
|
-
'ant-range-slider transition-colors relative border-none w-full focus:z-10 h-2 bg-
|
|
41
|
+
'ant-range-slider transition-colors relative border-none w-full focus:z-10 h-2 bg-base-300 rounded-md outline-none': true,
|
|
42
42
|
'disabled:opacity-50 disabled:cursor-not-allowed': props.disabled,
|
|
43
43
|
'invisible': props.skeleton,
|
|
44
44
|
[variants[props.state]]: true
|
|
@@ -71,7 +71,7 @@ const hasInputState = computed(() => props.skeleton || props.readonly || props.d
|
|
|
71
71
|
const valueLabel = computed(() => props.options.find(option => option.value === _modelValue.value)?.label || null);
|
|
72
72
|
const inputClasses = computed(() => {
|
|
73
73
|
const variants: Record<InputState, string> = {
|
|
74
|
-
[InputState.base]: 'outline-
|
|
74
|
+
[InputState.base]: 'outline-base-300 bg-white focus:ring-primary-200',
|
|
75
75
|
[InputState.success]: 'outline-success-500 bg-success-100 focus:ring-success-200',
|
|
76
76
|
[InputState.info]: 'outline-info-500 bg-info-100 focus:ring-info-200',
|
|
77
77
|
[InputState.warning]: 'outline-warning-500 bg-warning-100 focus:ring-warning-200',
|
|
@@ -106,7 +106,7 @@ const inputClasses = computed(() => {
|
|
|
106
106
|
});
|
|
107
107
|
const placeholderClasses = computed(() => {
|
|
108
108
|
const variants: Record<InputState, string> = {
|
|
109
|
-
[InputState.base]: 'text-
|
|
109
|
+
[InputState.base]: 'text-base-500',
|
|
110
110
|
[InputState.success]: 'text-success-700',
|
|
111
111
|
[InputState.info]: 'text-info-700',
|
|
112
112
|
[InputState.warning]: 'text-warning-700',
|