aetherx-dt-ui 0.1.3 → 0.1.4
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/package.json +1 -1
- package/src/registry/components/badge/DtBadge.vue +94 -94
- package/src/registry/components/button/DtButton.vue +176 -176
- package/src/registry/components/card/DtCard.vue +46 -46
- package/src/registry/components/card/DtCardContent.vue +15 -15
- package/src/registry/components/card/DtCardFooter.vue +17 -17
- package/src/registry/components/card/DtCardHeader.vue +31 -31
- package/src/registry/components/data-table/DtDataTable.vue +161 -0
- package/src/registry/components/data-table/index.ts +2 -0
- package/src/registry/components/dialog/DtDialogContent.vue +140 -140
- package/src/registry/components/dialog/DtDialogFooter.vue +18 -18
- package/src/registry/components/dialog/DtDialogHeader.vue +32 -32
- package/src/registry/components/input/DtInput.vue +140 -140
- package/src/registry/components/layout/DtDivider.vue +18 -0
- package/src/registry/components/layout/DtLayout.vue +68 -0
- package/src/registry/components/layout/DtLayoutHeader.vue +145 -0
- package/src/registry/components/layout/DtLayoutSidebar.vue +305 -0
- package/src/registry/components/layout/DtPageView.vue +42 -0
- package/src/registry/components/layout/DtProfileModal.vue +558 -0
- package/src/registry/components/layout/index.ts +8 -0
- package/src/registry/components/pagination/DtPagination.vue +99 -0
- package/src/registry/components/pagination/index.ts +1 -0
- package/src/registry/components/search-toolbar/DtSearchToolbar.vue +127 -0
- package/src/registry/components/search-toolbar/index.ts +1 -0
- package/src/registry/components/select/DtSelectContent.vue +103 -103
- package/src/registry/components/select/DtSelectItem.vue +123 -123
- package/src/registry/components/select/DtSelectTrigger.vue +128 -128
- package/src/registry/components/status-badge/DtStatusBadge.vue +46 -0
- package/src/registry/components/status-badge/index.ts +2 -0
- package/src/registry/components/tab-switcher/DtTabSwitcher.vue +191 -0
- package/src/registry/components/tab-switcher/index.ts +2 -0
- package/src/registry/docs/badge.md +171 -171
- package/src/registry/docs/button.md +184 -184
- package/src/registry/docs/card.md +199 -199
- package/src/registry/docs/data-table.md +117 -0
- package/src/registry/docs/dialog.md +282 -282
- package/src/registry/docs/input.md +168 -168
- package/src/registry/docs/layout.md +303 -0
- package/src/registry/docs/pagination.md +84 -0
- package/src/registry/docs/search-toolbar.md +84 -0
- package/src/registry/docs/select.md +346 -346
- package/src/registry/docs/status-badge.md +94 -0
- package/src/registry/docs/tab-switcher.md +104 -0
- package/src/registry/registry.json +100 -52
- package/src/registry/styles/base.css +221 -143
- package/src/registry/styles/table-cells.css +117 -0
package/package.json
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
export type BadgeVariant = 'default' | 'secondary' | 'outline' | 'destructive' | 'success' | 'warning'
|
|
5
|
-
export type BadgeSize = 'sm' | 'default'
|
|
6
|
-
|
|
7
|
-
const props = withDefaults(defineProps<{
|
|
8
|
-
variant?: BadgeVariant
|
|
9
|
-
size?: BadgeSize
|
|
10
|
-
dot?: boolean
|
|
11
|
-
}>(), {
|
|
12
|
-
variant: 'default',
|
|
13
|
-
size: 'default',
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
const classes = computed(() => [
|
|
17
|
-
'dt-badge',
|
|
18
|
-
`dt-badge--${props.variant}`,
|
|
19
|
-
`dt-badge--${props.size}`,
|
|
20
|
-
props.dot && 'dt-badge--dot',
|
|
21
|
-
].filter(Boolean))
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<template>
|
|
25
|
-
<span :class="classes" v-bind="$attrs">
|
|
26
|
-
<span v-if="dot" class="dt-badge__dot" aria-hidden="true" />
|
|
27
|
-
<slot />
|
|
28
|
-
</span>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<style scoped>
|
|
32
|
-
.dt-badge {
|
|
33
|
-
display: inline-flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
gap: var(--dt-space-1);
|
|
36
|
-
font-weight: 500;
|
|
37
|
-
border-radius: var(--dt-radius-
|
|
38
|
-
white-space: nowrap;
|
|
39
|
-
transition: background-color var(--dt-transition-base), color var(--dt-transition-base);
|
|
40
|
-
border: 1px solid transparent;
|
|
41
|
-
line-height: 1;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* Sizes */
|
|
45
|
-
.dt-badge--sm {
|
|
46
|
-
padding: 0.125rem 0.
|
|
47
|
-
font-size: var(--dt-
|
|
48
|
-
}
|
|
49
|
-
.dt-badge--default {
|
|
50
|
-
padding: 0.25rem 0.
|
|
51
|
-
font-size: var(--dt-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* Variants */
|
|
55
|
-
.dt-badge--default {
|
|
56
|
-
background-color: var(--dt-
|
|
57
|
-
color: var(--dt-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.dt-badge--secondary {
|
|
61
|
-
background-color: var(--dt-
|
|
62
|
-
color: var(--dt-secondary
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.dt-badge--outline {
|
|
66
|
-
border-color: var(--dt-border);
|
|
67
|
-
background-color: transparent;
|
|
68
|
-
color: var(--dt-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.dt-badge--destructive {
|
|
72
|
-
background-color: var(--dt-
|
|
73
|
-
color: var(--dt-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.dt-badge--success {
|
|
77
|
-
background-color: var(--dt-success);
|
|
78
|
-
color: var(--dt-success
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.dt-badge--warning {
|
|
82
|
-
background-color: var(--dt-warning);
|
|
83
|
-
color: var(--dt-warning
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* Dot */
|
|
87
|
-
.dt-badge__dot {
|
|
88
|
-
width: 0.375rem;
|
|
89
|
-
height: 0.375rem;
|
|
90
|
-
border-radius: var(--dt-radius-full);
|
|
91
|
-
background-color: currentColor;
|
|
92
|
-
flex-shrink: 0;
|
|
93
|
-
}
|
|
94
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
export type BadgeVariant = 'default' | 'secondary' | 'outline' | 'destructive' | 'success' | 'warning'
|
|
5
|
+
export type BadgeSize = 'sm' | 'default'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<{
|
|
8
|
+
variant?: BadgeVariant
|
|
9
|
+
size?: BadgeSize
|
|
10
|
+
dot?: boolean
|
|
11
|
+
}>(), {
|
|
12
|
+
variant: 'default',
|
|
13
|
+
size: 'default',
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const classes = computed(() => [
|
|
17
|
+
'dt-badge',
|
|
18
|
+
`dt-badge--${props.variant}`,
|
|
19
|
+
`dt-badge--${props.size}`,
|
|
20
|
+
props.dot && 'dt-badge--dot',
|
|
21
|
+
].filter(Boolean))
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<span :class="classes" v-bind="$attrs">
|
|
26
|
+
<span v-if="dot" class="dt-badge__dot" aria-hidden="true" />
|
|
27
|
+
<slot />
|
|
28
|
+
</span>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<style scoped>
|
|
32
|
+
.dt-badge {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: var(--dt-space-1);
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
border-radius: var(--dt-radius-sm);
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
transition: background-color var(--dt-transition-base), color var(--dt-transition-base);
|
|
40
|
+
border: 1px solid transparent;
|
|
41
|
+
line-height: 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Sizes */
|
|
45
|
+
.dt-badge--sm {
|
|
46
|
+
padding: 0.125rem 0.375rem;
|
|
47
|
+
font-size: var(--dt-text-xs);
|
|
48
|
+
}
|
|
49
|
+
.dt-badge--default {
|
|
50
|
+
padding: 0.25rem 0.5rem;
|
|
51
|
+
font-size: var(--dt-text-xs);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Variants */
|
|
55
|
+
.dt-badge--default {
|
|
56
|
+
background-color: var(--dt-color-accent-light);
|
|
57
|
+
color: var(--dt-color-accent);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.dt-badge--secondary {
|
|
61
|
+
background-color: var(--dt-color-background-tertiary);
|
|
62
|
+
color: var(--dt-color-text-secondary);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.dt-badge--outline {
|
|
66
|
+
border-color: var(--dt-color-border);
|
|
67
|
+
background-color: transparent;
|
|
68
|
+
color: var(--dt-color-text);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.dt-badge--destructive {
|
|
72
|
+
background-color: var(--dt-color-error-light);
|
|
73
|
+
color: var(--dt-color-error);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dt-badge--success {
|
|
77
|
+
background-color: var(--dt-color-success-light);
|
|
78
|
+
color: var(--dt-color-success);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dt-badge--warning {
|
|
82
|
+
background-color: var(--dt-color-warning-light);
|
|
83
|
+
color: var(--dt-color-warning);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Dot */
|
|
87
|
+
.dt-badge__dot {
|
|
88
|
+
width: 0.375rem;
|
|
89
|
+
height: 0.375rem;
|
|
90
|
+
border-radius: var(--dt-radius-full);
|
|
91
|
+
background-color: currentColor;
|
|
92
|
+
flex-shrink: 0;
|
|
93
|
+
}
|
|
94
|
+
</style>
|
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
export type ButtonVariant = 'default' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link'
|
|
5
|
-
export type ButtonSize = 'sm' | 'default' | 'lg' | 'icon'
|
|
6
|
-
|
|
7
|
-
const props = withDefaults(defineProps<{
|
|
8
|
-
variant?: ButtonVariant
|
|
9
|
-
size?: ButtonSize
|
|
10
|
-
disabled?: boolean
|
|
11
|
-
loading?: boolean
|
|
12
|
-
}>(), {
|
|
13
|
-
variant: 'default',
|
|
14
|
-
size: 'default',
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const classes = computed(() => [
|
|
18
|
-
'dt-button',
|
|
19
|
-
`dt-button--${props.variant}`,
|
|
20
|
-
`dt-button--${props.size}`,
|
|
21
|
-
props.disabled && 'dt-button--disabled',
|
|
22
|
-
props.loading && 'dt-button--loading',
|
|
23
|
-
].filter(Boolean))
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<button
|
|
28
|
-
:class="classes"
|
|
29
|
-
:disabled="disabled || loading"
|
|
30
|
-
v-bind="$attrs"
|
|
31
|
-
>
|
|
32
|
-
<span v-if="loading" class="dt-button__spinner" aria-hidden="true" />
|
|
33
|
-
<span v-if="$slots['icon-left']" class="dt-button__icon dt-button__icon--left">
|
|
34
|
-
<slot name="icon-left" />
|
|
35
|
-
</span>
|
|
36
|
-
<slot />
|
|
37
|
-
<span v-if="$slots['icon-right']" class="dt-button__icon dt-button__icon--right">
|
|
38
|
-
<slot name="icon-right" />
|
|
39
|
-
</span>
|
|
40
|
-
</button>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<style scoped>
|
|
44
|
-
.dt-button {
|
|
45
|
-
display: inline-flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
gap: var(--dt-space-2);
|
|
49
|
-
font-weight: 500;
|
|
50
|
-
border-radius: var(--dt-radius-
|
|
51
|
-
transition: background-color var(--dt-transition-base),
|
|
52
|
-
border-color var(--dt-transition-base),
|
|
53
|
-
color var(--dt-transition-base),
|
|
54
|
-
box-shadow var(--dt-transition-base);
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
border: 1px solid transparent;
|
|
57
|
-
font-family: inherit;
|
|
58
|
-
line-height: 1;
|
|
59
|
-
white-space: nowrap;
|
|
60
|
-
user-select: none;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Variants */
|
|
64
|
-
.dt-button--default {
|
|
65
|
-
background-color: var(--dt-
|
|
66
|
-
color: var(--dt-
|
|
67
|
-
}
|
|
68
|
-
.dt-button--default:hover {
|
|
69
|
-
background-color: var(--dt-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.dt-button--secondary {
|
|
73
|
-
background-color: var(--dt-secondary);
|
|
74
|
-
color: var(--dt-secondary-foreground);
|
|
75
|
-
}
|
|
76
|
-
.dt-button--secondary:hover {
|
|
77
|
-
background-color: var(--dt-secondary-hover);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.dt-button--outline {
|
|
81
|
-
border-color: var(--dt-border);
|
|
82
|
-
background-color: transparent;
|
|
83
|
-
color: var(--dt-
|
|
84
|
-
}
|
|
85
|
-
.dt-button--outline:hover {
|
|
86
|
-
background-color: var(--dt-
|
|
87
|
-
border-color: var(--dt-border-hover);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.dt-button--ghost {
|
|
91
|
-
background-color: transparent;
|
|
92
|
-
color: var(--dt-
|
|
93
|
-
}
|
|
94
|
-
.dt-button--ghost:hover {
|
|
95
|
-
background-color: var(--dt-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.dt-button--destructive {
|
|
99
|
-
background-color: var(--dt-
|
|
100
|
-
color: var(--dt-
|
|
101
|
-
}
|
|
102
|
-
.dt-button--destructive:hover {
|
|
103
|
-
background-color: var(--dt-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.dt-button--link {
|
|
107
|
-
background-color: transparent;
|
|
108
|
-
color: var(--dt-
|
|
109
|
-
text-decoration: underline;
|
|
110
|
-
text-underline-offset: 4px;
|
|
111
|
-
}
|
|
112
|
-
.dt-button--link:hover {
|
|
113
|
-
color: var(--dt-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/* Sizes */
|
|
117
|
-
.dt-button--sm {
|
|
118
|
-
height: 2rem;
|
|
119
|
-
padding: 0 0.75rem;
|
|
120
|
-
font-size: var(--dt-
|
|
121
|
-
}
|
|
122
|
-
.dt-button--default {
|
|
123
|
-
height: 2.5rem;
|
|
124
|
-
padding: 0 1rem;
|
|
125
|
-
font-size: var(--dt-
|
|
126
|
-
}
|
|
127
|
-
.dt-button--lg {
|
|
128
|
-
height: 2.75rem;
|
|
129
|
-
padding: 0 1.5rem;
|
|
130
|
-
font-size: var(--dt-
|
|
131
|
-
}
|
|
132
|
-
.dt-button--icon {
|
|
133
|
-
height: 2.5rem;
|
|
134
|
-
width: 2.5rem;
|
|
135
|
-
padding: 0;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/* States */
|
|
139
|
-
.dt-button--disabled {
|
|
140
|
-
opacity: 0.5;
|
|
141
|
-
pointer-events: none;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.dt-button--loading {
|
|
145
|
-
position: relative;
|
|
146
|
-
pointer-events: none;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.dt-button:focus-visible {
|
|
150
|
-
outline: 2px solid var(--dt-ring);
|
|
151
|
-
outline-offset: 2px;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/* Spinner */
|
|
155
|
-
.dt-button__spinner {
|
|
156
|
-
width: 1em;
|
|
157
|
-
height: 1em;
|
|
158
|
-
border: 2px solid currentColor;
|
|
159
|
-
border-right-color: transparent;
|
|
160
|
-
border-radius: var(--dt-radius-full);
|
|
161
|
-
animation: dt-spin 0.6s linear infinite;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.dt-button__icon {
|
|
165
|
-
display: inline-flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
justify-content: center;
|
|
168
|
-
flex-shrink: 0;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
@keyframes dt-spin {
|
|
172
|
-
to {
|
|
173
|
-
transform: rotate(360deg);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
export type ButtonVariant = 'default' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link'
|
|
5
|
+
export type ButtonSize = 'sm' | 'default' | 'lg' | 'icon'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<{
|
|
8
|
+
variant?: ButtonVariant
|
|
9
|
+
size?: ButtonSize
|
|
10
|
+
disabled?: boolean
|
|
11
|
+
loading?: boolean
|
|
12
|
+
}>(), {
|
|
13
|
+
variant: 'default',
|
|
14
|
+
size: 'default',
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const classes = computed(() => [
|
|
18
|
+
'dt-button',
|
|
19
|
+
`dt-button--${props.variant}`,
|
|
20
|
+
`dt-button--${props.size}`,
|
|
21
|
+
props.disabled && 'dt-button--disabled',
|
|
22
|
+
props.loading && 'dt-button--loading',
|
|
23
|
+
].filter(Boolean))
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<button
|
|
28
|
+
:class="classes"
|
|
29
|
+
:disabled="disabled || loading"
|
|
30
|
+
v-bind="$attrs"
|
|
31
|
+
>
|
|
32
|
+
<span v-if="loading" class="dt-button__spinner" aria-hidden="true" />
|
|
33
|
+
<span v-if="$slots['icon-left']" class="dt-button__icon dt-button__icon--left">
|
|
34
|
+
<slot name="icon-left" />
|
|
35
|
+
</span>
|
|
36
|
+
<slot />
|
|
37
|
+
<span v-if="$slots['icon-right']" class="dt-button__icon dt-button__icon--right">
|
|
38
|
+
<slot name="icon-right" />
|
|
39
|
+
</span>
|
|
40
|
+
</button>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<style scoped>
|
|
44
|
+
.dt-button {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
gap: var(--dt-space-2);
|
|
49
|
+
font-weight: 500;
|
|
50
|
+
border-radius: var(--dt-radius-base);
|
|
51
|
+
transition: background-color var(--dt-transition-base),
|
|
52
|
+
border-color var(--dt-transition-base),
|
|
53
|
+
color var(--dt-transition-base),
|
|
54
|
+
box-shadow var(--dt-transition-base);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
border: 1px solid transparent;
|
|
57
|
+
font-family: inherit;
|
|
58
|
+
line-height: 1;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
user-select: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Variants */
|
|
64
|
+
.dt-button--default {
|
|
65
|
+
background-color: var(--dt-color-accent);
|
|
66
|
+
color: var(--dt-color-accent-foreground);
|
|
67
|
+
}
|
|
68
|
+
.dt-button--default:hover {
|
|
69
|
+
background-color: var(--dt-color-accent-hover);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.dt-button--secondary {
|
|
73
|
+
background-color: var(--dt-color-secondary);
|
|
74
|
+
color: var(--dt-color-secondary-foreground);
|
|
75
|
+
}
|
|
76
|
+
.dt-button--secondary:hover {
|
|
77
|
+
background-color: var(--dt-color-secondary-hover);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.dt-button--outline {
|
|
81
|
+
border-color: var(--dt-color-border);
|
|
82
|
+
background-color: transparent;
|
|
83
|
+
color: var(--dt-color-text);
|
|
84
|
+
}
|
|
85
|
+
.dt-button--outline:hover {
|
|
86
|
+
background-color: var(--dt-color-surface-hover);
|
|
87
|
+
border-color: var(--dt-color-border-hover);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.dt-button--ghost {
|
|
91
|
+
background-color: transparent;
|
|
92
|
+
color: var(--dt-color-text);
|
|
93
|
+
}
|
|
94
|
+
.dt-button--ghost:hover {
|
|
95
|
+
background-color: var(--dt-color-surface-hover);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.dt-button--destructive {
|
|
99
|
+
background-color: var(--dt-color-error);
|
|
100
|
+
color: var(--dt-color-error-foreground);
|
|
101
|
+
}
|
|
102
|
+
.dt-button--destructive:hover {
|
|
103
|
+
background-color: var(--dt-color-error-hover);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.dt-button--link {
|
|
107
|
+
background-color: transparent;
|
|
108
|
+
color: var(--dt-color-accent);
|
|
109
|
+
text-decoration: underline;
|
|
110
|
+
text-underline-offset: 4px;
|
|
111
|
+
}
|
|
112
|
+
.dt-button--link:hover {
|
|
113
|
+
color: var(--dt-color-accent-hover);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Sizes */
|
|
117
|
+
.dt-button--sm {
|
|
118
|
+
height: 2rem;
|
|
119
|
+
padding: 0 0.75rem;
|
|
120
|
+
font-size: var(--dt-text-sm);
|
|
121
|
+
}
|
|
122
|
+
.dt-button--default {
|
|
123
|
+
height: 2.5rem;
|
|
124
|
+
padding: 0 1rem;
|
|
125
|
+
font-size: var(--dt-text-sm);
|
|
126
|
+
}
|
|
127
|
+
.dt-button--lg {
|
|
128
|
+
height: 2.75rem;
|
|
129
|
+
padding: 0 1.5rem;
|
|
130
|
+
font-size: var(--dt-text-base);
|
|
131
|
+
}
|
|
132
|
+
.dt-button--icon {
|
|
133
|
+
height: 2.5rem;
|
|
134
|
+
width: 2.5rem;
|
|
135
|
+
padding: 0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* States */
|
|
139
|
+
.dt-button--disabled {
|
|
140
|
+
opacity: 0.5;
|
|
141
|
+
pointer-events: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.dt-button--loading {
|
|
145
|
+
position: relative;
|
|
146
|
+
pointer-events: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.dt-button:focus-visible {
|
|
150
|
+
outline: 2px solid var(--dt-color-ring);
|
|
151
|
+
outline-offset: 2px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Spinner */
|
|
155
|
+
.dt-button__spinner {
|
|
156
|
+
width: 1em;
|
|
157
|
+
height: 1em;
|
|
158
|
+
border: 2px solid currentColor;
|
|
159
|
+
border-right-color: transparent;
|
|
160
|
+
border-radius: var(--dt-radius-full);
|
|
161
|
+
animation: dt-spin 0.6s linear infinite;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.dt-button__icon {
|
|
165
|
+
display: inline-flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
flex-shrink: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@keyframes dt-spin {
|
|
172
|
+
to {
|
|
173
|
+
transform: rotate(360deg);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
</style>
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = withDefaults(defineProps<{
|
|
5
|
-
bordered?: boolean
|
|
6
|
-
shadow?: boolean
|
|
7
|
-
padding?: boolean
|
|
8
|
-
}>(), {
|
|
9
|
-
bordered: true,
|
|
10
|
-
shadow: false,
|
|
11
|
-
padding: true,
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
const classes = computed(() => [
|
|
15
|
-
'dt-card',
|
|
16
|
-
props.bordered && 'dt-card--bordered',
|
|
17
|
-
props.shadow && 'dt-card--shadow',
|
|
18
|
-
props.padding && 'dt-card--padding',
|
|
19
|
-
].filter(Boolean))
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<template>
|
|
23
|
-
<div :class="classes" v-bind="$attrs">
|
|
24
|
-
<slot />
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<style scoped>
|
|
29
|
-
.dt-card {
|
|
30
|
-
background-color: var(--dt-background);
|
|
31
|
-
border-radius: var(--dt-radius-lg);
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.dt-card--bordered {
|
|
36
|
-
border: 1px solid var(--dt-border);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.dt-card--shadow {
|
|
40
|
-
box-shadow: var(--dt-shadow-md);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.dt-card--padding {
|
|
44
|
-
padding: var(--dt-space-6);
|
|
45
|
-
}
|
|
46
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(defineProps<{
|
|
5
|
+
bordered?: boolean
|
|
6
|
+
shadow?: boolean
|
|
7
|
+
padding?: boolean
|
|
8
|
+
}>(), {
|
|
9
|
+
bordered: true,
|
|
10
|
+
shadow: false,
|
|
11
|
+
padding: true,
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
const classes = computed(() => [
|
|
15
|
+
'dt-card',
|
|
16
|
+
props.bordered && 'dt-card--bordered',
|
|
17
|
+
props.shadow && 'dt-card--shadow',
|
|
18
|
+
props.padding && 'dt-card--padding',
|
|
19
|
+
].filter(Boolean))
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div :class="classes" v-bind="$attrs">
|
|
24
|
+
<slot />
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style scoped>
|
|
29
|
+
.dt-card {
|
|
30
|
+
background-color: var(--dt-color-background);
|
|
31
|
+
border-radius: var(--dt-radius-lg);
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dt-card--bordered {
|
|
36
|
+
border: 1px solid var(--dt-color-border);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.dt-card--shadow {
|
|
40
|
+
box-shadow: var(--dt-shadow-md);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.dt-card--padding {
|
|
44
|
+
padding: var(--dt-space-6);
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
</script>
|
|
3
|
-
|
|
4
|
-
<template>
|
|
5
|
-
<div class="dt-card-content" v-bind="$attrs">
|
|
6
|
-
<slot />
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<style scoped>
|
|
11
|
-
.dt-card-content {
|
|
12
|
-
font-size: var(--dt-
|
|
13
|
-
color: var(--dt-
|
|
14
|
-
}
|
|
15
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<template>
|
|
5
|
+
<div class="dt-card-content" v-bind="$attrs">
|
|
6
|
+
<slot />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<style scoped>
|
|
11
|
+
.dt-card-content {
|
|
12
|
+
font-size: var(--dt-text-base);
|
|
13
|
+
color: var(--dt-color-text);
|
|
14
|
+
}
|
|
15
|
+
</style>
|