@gspa/ui 0.1.1 → 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/README.md +18 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/components/Accordion.cjs +1 -0
- package/dist/components/Accordion.js +192 -0
- package/dist/components/AccordionItem.cjs +1 -0
- package/dist/components/AccordionItem.js +109 -0
- package/dist/components/AddReminderModal.cjs +1 -0
- package/dist/components/AddReminderModal.js +107 -0
- package/dist/components/Alert.cjs +1 -0
- package/dist/components/Alert.js +222 -0
- package/dist/components/Avatar.cjs +1 -0
- package/dist/components/Avatar.js +86 -0
- package/dist/components/Badge.cjs +1 -0
- package/dist/components/Badge.js +109 -0
- package/dist/components/Breadcrumb.cjs +1 -0
- package/dist/components/Breadcrumb.js +72 -0
- package/dist/components/Button.cjs +1 -0
- package/dist/components/Button.js +190 -0
- package/dist/components/ButtonGroup.cjs +1 -0
- package/dist/components/ButtonGroup.js +46 -0
- package/dist/components/Calendar.cjs +1 -0
- package/dist/components/Calendar.js +341 -0
- package/dist/components/Card.cjs +1 -0
- package/dist/components/Card.js +316 -0
- package/dist/components/CardBody.cjs +1 -0
- package/dist/components/CardBody.js +34 -0
- package/dist/components/CardContent.cjs +1 -0
- package/dist/components/CardContent.js +17 -0
- package/dist/components/CardFooter.cjs +1 -0
- package/dist/components/CardFooter.js +34 -0
- package/dist/components/CardHeader.cjs +1 -0
- package/dist/components/CardHeader.js +91 -0
- package/dist/components/CardTitle.cjs +1 -0
- package/dist/components/CardTitle.js +17 -0
- package/dist/components/Checkbox.cjs +1 -0
- package/dist/components/Checkbox.js +185 -0
- package/dist/components/CircularProgress.cjs +1 -0
- package/dist/components/CircularProgress.js +141 -0
- package/dist/components/DataTable.cjs +1 -0
- package/dist/components/DataTable.js +863 -0
- package/dist/components/DataTableCell.cjs +1 -0
- package/dist/components/DataTableCell.js +95 -0
- package/dist/components/DataTableFilters.cjs +1 -0
- package/dist/components/DataTableFilters.js +519 -0
- package/dist/components/DataTableHeader.cjs +1 -0
- package/dist/components/DataTableHeader.js +116 -0
- package/dist/components/DataTablePagination.cjs +1 -0
- package/dist/components/DataTablePagination.js +290 -0
- package/dist/components/DataTableRow.cjs +1 -0
- package/dist/components/DataTableRow.js +199 -0
- package/dist/components/DataTableToolBar.cjs +1 -0
- package/dist/components/DataTableToolBar.js +477 -0
- package/dist/components/DatePicker.cjs +1 -0
- package/dist/components/DatePicker.js +401 -0
- package/dist/components/Divider.cjs +1 -0
- package/dist/components/Divider.js +103 -0
- package/dist/components/Dropdown.cjs +1 -0
- package/dist/components/Dropdown.js +104 -0
- package/dist/components/DropdownItem.cjs +1 -0
- package/dist/components/DropdownItem.js +60 -0
- package/dist/components/EventsCalendar.cjs +1 -0
- package/dist/components/EventsCalendar.js +863 -0
- package/dist/components/FileUpload.cjs +1 -0
- package/dist/components/FileUpload.js +195 -0
- package/dist/components/FilterDrawer.cjs +1 -0
- package/dist/components/FilterDrawer.js +412 -0
- package/dist/components/Footer.cjs +1 -0
- package/dist/components/Footer.js +157 -0
- package/dist/components/FormField.cjs +1 -0
- package/dist/components/FormField.js +190 -0
- package/dist/components/Graph.cjs +1 -0
- package/dist/components/Graph.js +164 -0
- package/dist/components/GraphFilters.cjs +1 -0
- package/dist/components/GraphFilters.js +305 -0
- package/dist/components/Header.cjs +1 -0
- package/dist/components/Header.js +674 -0
- package/dist/components/Icon.cjs +1 -0
- package/dist/components/Icon.js +51 -0
- package/dist/components/Image.cjs +1 -0
- package/dist/components/Image.js +112 -0
- package/dist/components/Input.cjs +1 -0
- package/dist/components/Input.js +166 -0
- package/dist/components/InputGroup.cjs +1 -0
- package/dist/components/InputGroup.js +45 -0
- package/dist/components/Label.cjs +1 -0
- package/dist/components/Label.js +46 -0
- package/dist/components/Link.cjs +1 -0
- package/dist/components/Link.js +119 -0
- package/dist/components/ListItem.cjs +1 -0
- package/dist/components/ListItem.js +89 -0
- package/dist/components/Loader.cjs +1 -0
- package/dist/components/Loader.js +154 -0
- package/dist/components/Logo.cjs +1 -0
- package/dist/components/Logo.js +67 -0
- package/dist/components/MenuItem.cjs +1 -0
- package/dist/components/MenuItem.js +66 -0
- package/dist/components/Modal.cjs +1 -0
- package/dist/components/Modal.js +110 -0
- package/dist/components/ModalBody.cjs +1 -0
- package/dist/components/ModalBody.js +33 -0
- package/dist/components/ModalFooter.cjs +1 -0
- package/dist/components/ModalFooter.js +33 -0
- package/dist/components/ModalHeader.cjs +1 -0
- package/dist/components/ModalHeader.js +24 -0
- package/dist/components/MultiSelect.cjs +1 -0
- package/dist/components/MultiSelect.js +211 -0
- package/dist/components/Notification.cjs +1 -0
- package/dist/components/Notification.js +121 -0
- package/dist/components/Option.cjs +1 -0
- package/dist/components/Option.js +44 -0
- package/dist/components/Progress.cjs +1 -0
- package/dist/components/Progress.js +77 -0
- package/dist/components/ProgressBar.cjs +1 -0
- package/dist/components/ProgressBar.js +101 -0
- package/dist/components/Radio.cjs +1 -0
- package/dist/components/Radio.js +81 -0
- package/dist/components/RailNav.cjs +1 -0
- package/dist/components/RailNav.js +124 -0
- package/dist/components/ReminderConfig.cjs +1 -0
- package/dist/components/ReminderConfig.js +375 -0
- package/dist/components/ReusableForm.cjs +1 -0
- package/dist/components/ReusableForm.js +657 -0
- package/dist/components/ReusableFormModal.cjs +1 -0
- package/dist/components/ReusableFormModal.js +112 -0
- package/dist/components/RightDrawer.cjs +1 -0
- package/dist/components/RightDrawer.js +143 -0
- package/dist/components/Search.cjs +1 -0
- package/dist/components/Search.js +252 -0
- package/dist/components/Select.cjs +1 -0
- package/dist/components/Select.js +243 -0
- package/dist/components/Sidebar.cjs +1 -0
- package/dist/components/Sidebar.js +372 -0
- package/dist/components/Slider.cjs +1 -0
- package/dist/components/Slider.js +42 -0
- package/dist/components/Spinner.cjs +1 -0
- package/dist/components/Spinner.js +87 -0
- package/dist/components/Stepper.cjs +1 -0
- package/dist/components/Stepper.js +12 -0
- package/dist/components/StepperItem.cjs +1 -0
- package/dist/components/StepperItem.js +33 -0
- package/dist/components/Switch.cjs +1 -0
- package/dist/components/Switch.js +112 -0
- package/dist/components/Tab.cjs +1 -0
- package/dist/components/Tab.js +134 -0
- package/dist/components/TabPanel.cjs +1 -0
- package/dist/components/TabPanel.js +49 -0
- package/dist/components/Text.cjs +1 -0
- package/dist/components/Text.js +84 -0
- package/dist/components/Textarea.cjs +1 -0
- package/dist/components/Textarea.js +102 -0
- package/dist/components/ThemeConfigurator.cjs +1 -0
- package/dist/components/ThemeConfigurator.js +50 -0
- package/dist/components/Timeline.cjs +1 -0
- package/dist/components/Timeline.js +24 -0
- package/dist/components/TimelineItem.cjs +1 -0
- package/dist/components/TimelineItem.js +63 -0
- package/dist/components/Toast.cjs +1 -0
- package/dist/components/Toast.js +231 -0
- package/dist/components/Tooltip.cjs +1 -0
- package/dist/components/Tooltip.js +124 -0
- package/dist/components/Typography.cjs +1 -0
- package/dist/components/Typography.js +267 -0
- package/dist/components/charts/BarChart.cjs +1 -0
- package/dist/components/charts/BarChart.js +323 -0
- package/dist/components/charts/LineChart.cjs +1 -0
- package/dist/components/charts/LineChart.js +322 -0
- package/dist/components/charts/PieChart.cjs +1 -0
- package/dist/components/charts/PieChart.js +311 -0
- package/dist/components/charts/StackedBarChart.cjs +1 -0
- package/dist/components/charts/StackedBarChart.js +348 -0
- package/dist/components/widgets/DashboardWidget.cjs +1 -0
- package/dist/components/widgets/DashboardWidget.js +309 -0
- package/dist/directives/tooltip.cjs +47 -0
- package/dist/directives/tooltip.js +115 -0
- package/dist/index.cjs +1 -0
- package/dist/index.esm.js +310 -19533
- package/dist/layouts/AuthLayout.cjs +1 -0
- package/dist/layouts/AuthLayout.js +190 -0
- package/dist/layouts/DashboardLayout.cjs +1 -0
- package/dist/layouts/DashboardLayout.js +244 -0
- package/dist/layouts/DefaultLayout.cjs +1 -0
- package/dist/layouts/DefaultLayout.js +94 -0
- package/dist/layouts/ErrorLayout.cjs +1 -0
- package/dist/layouts/ErrorLayout.js +452 -0
- package/dist/lib/auth.cjs +1 -0
- package/dist/lib/auth.js +4 -0
- package/dist/lib/theme.cjs +1 -0
- package/dist/lib/theme.js +135 -0
- package/dist/lib/toast.cjs +1 -0
- package/dist/lib/toast.js +81 -0
- package/dist/src/__tests__/AuthLayout.spec.d.ts +2 -0
- package/dist/src/__tests__/AuthLayout.spec.d.ts.map +1 -0
- package/dist/src/layouts/AuthLayout.vue.d.ts +10 -6
- package/dist/src/layouts/AuthLayout.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/cn.cjs +1 -0
- package/dist/utils/cn.js +7 -0
- package/package.json +43 -11
- package/dist/applogo.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.js +0 -605
- package/dist/logo.png +0 -0
- package/dist/stlbacklogo.jpeg +0 -0
- package/dist/stlbacklogo.png +0 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { computed as f, createBlock as v, openBlock as a, resolveDynamicComponent as p, normalizeClass as n, unref as l, withCtx as h, createElementBlock as i, createCommentVNode as r, createElementVNode as g, renderSlot as o, createTextVNode as T, toDisplayString as b, Fragment as j } from "vue";
|
|
2
|
+
import { cva as c } from "class-variance-authority";
|
|
3
|
+
import { cn as d } from "../utils/cn.js";
|
|
4
|
+
const E = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "absolute inset-0 bg-[color:color-mix(in oklab, var(--ui-surface), transparent 40%)] backdrop-blur-sm flex items-center justify-center z-10",
|
|
7
|
+
"aria-hidden": "true"
|
|
8
|
+
}, q = { class: "flex items-start justify-between gap-4" }, D = { class: "flex-1 min-w-0" }, N = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "shrink-0"
|
|
11
|
+
}, K = ["src", "alt", "loading"], L = {
|
|
12
|
+
key: 5,
|
|
13
|
+
class: "absolute top-3 right-3"
|
|
14
|
+
}, W = { class: "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ui-bg ui-text" }, F = "w-full h-full object-cover", I = "font-semibold ui-text line-clamp-2", O = "text-sm ui-text mt-1 line-clamp-2", M = {
|
|
15
|
+
__name: "Card",
|
|
16
|
+
props: {
|
|
17
|
+
// Component type
|
|
18
|
+
as: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "div"
|
|
21
|
+
},
|
|
22
|
+
// Styling variants
|
|
23
|
+
variant: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "default",
|
|
26
|
+
validator: (e) => ["default", "outlined", "elevated", "filled", "ghost"].includes(e)
|
|
27
|
+
},
|
|
28
|
+
padding: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "none",
|
|
31
|
+
validator: (e) => ["none", "sm", "md", "lg", "xl"].includes(e)
|
|
32
|
+
},
|
|
33
|
+
bordered: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
// Content props
|
|
38
|
+
title: String,
|
|
39
|
+
titleTag: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "h3"
|
|
42
|
+
},
|
|
43
|
+
titleSize: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "default",
|
|
46
|
+
validator: (e) => ["sm", "default", "lg", "xl"].includes(e)
|
|
47
|
+
},
|
|
48
|
+
subtitle: String,
|
|
49
|
+
badge: String,
|
|
50
|
+
contentClass: {
|
|
51
|
+
type: [String, Array, Object],
|
|
52
|
+
default: ""
|
|
53
|
+
},
|
|
54
|
+
contentWrapper: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: !0
|
|
57
|
+
},
|
|
58
|
+
// Image props
|
|
59
|
+
image: String,
|
|
60
|
+
imageAlt: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "Card image"
|
|
63
|
+
},
|
|
64
|
+
imageAspect: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "auto",
|
|
67
|
+
validator: (e) => ["auto", "video", "square", "portrait"].includes(e)
|
|
68
|
+
},
|
|
69
|
+
imageLazy: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: !0
|
|
72
|
+
},
|
|
73
|
+
// Interaction states
|
|
74
|
+
hoverable: Boolean,
|
|
75
|
+
clickable: Boolean,
|
|
76
|
+
disabled: Boolean,
|
|
77
|
+
loading: Boolean
|
|
78
|
+
},
|
|
79
|
+
emits: ["click"],
|
|
80
|
+
setup(e, { emit: y }) {
|
|
81
|
+
const s = e, x = y, k = /* @__PURE__ */ new Set(["textbox", "searchbox", "combobox", "spinbutton"]), S = (t) => {
|
|
82
|
+
if (!(t instanceof Element)) return !1;
|
|
83
|
+
if (t.closest('input, textarea, select, button, a, [contenteditable], [contenteditable="true"]'))
|
|
84
|
+
return !0;
|
|
85
|
+
const u = t.getAttribute("role");
|
|
86
|
+
return u ? k.has(u) : !1;
|
|
87
|
+
}, m = (t) => {
|
|
88
|
+
s.clickable && !s.disabled && !s.loading && x("click", t);
|
|
89
|
+
}, C = (t) => {
|
|
90
|
+
!s.clickable || s.disabled || s.loading || t.key !== "Enter" && t.key !== " " && t.key !== "Spacebar" || S(t.target) || t.currentTarget === t.target && (t.preventDefault(), m(t));
|
|
91
|
+
}, $ = f(() => ({
|
|
92
|
+
sm: "text-base",
|
|
93
|
+
default: "text-lg",
|
|
94
|
+
lg: "text-xl",
|
|
95
|
+
xl: "text-2xl"
|
|
96
|
+
})[s.titleSize]), w = f(() => ({
|
|
97
|
+
auto: "",
|
|
98
|
+
video: "aspect-video",
|
|
99
|
+
square: "aspect-square",
|
|
100
|
+
portrait: "aspect-[3/4]"
|
|
101
|
+
})[s.imageAspect]), B = c(
|
|
102
|
+
"rounded-lg overflow-hidden transition-all duration-200 relative ui-text",
|
|
103
|
+
{
|
|
104
|
+
variants: {
|
|
105
|
+
variant: {
|
|
106
|
+
default: "ui-surface",
|
|
107
|
+
outlined: "ui-surface",
|
|
108
|
+
elevated: "ui-surface shadow-md",
|
|
109
|
+
filled: "ui-surface-soft",
|
|
110
|
+
ghost: "bg-transparent"
|
|
111
|
+
},
|
|
112
|
+
padding: {
|
|
113
|
+
none: "",
|
|
114
|
+
sm: "p-3",
|
|
115
|
+
md: "p-4",
|
|
116
|
+
lg: "p-6",
|
|
117
|
+
xl: "p-8"
|
|
118
|
+
},
|
|
119
|
+
bordered: {
|
|
120
|
+
true: "",
|
|
121
|
+
false: ""
|
|
122
|
+
},
|
|
123
|
+
hoverable: {
|
|
124
|
+
true: "hover:shadow-lg hover:scale-[1.02]"
|
|
125
|
+
},
|
|
126
|
+
clickable: {
|
|
127
|
+
true: "cursor-pointer focus:outline-none focus:ring-2 focus:ring-(--ui-ring) focus:ring-offset-2"
|
|
128
|
+
},
|
|
129
|
+
loading: {
|
|
130
|
+
true: ""
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
compoundVariants: [
|
|
134
|
+
{
|
|
135
|
+
variant: "default",
|
|
136
|
+
bordered: !0,
|
|
137
|
+
class: "border ui-border-strong"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
variant: "outlined",
|
|
141
|
+
bordered: !0,
|
|
142
|
+
class: "border-2 ui-border-strong"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
variant: "elevated",
|
|
146
|
+
bordered: !0,
|
|
147
|
+
class: "border ui-border-strong"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
variant: "filled",
|
|
151
|
+
bordered: !0,
|
|
152
|
+
class: "border ui-border-strong"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
clickable: !0,
|
|
156
|
+
hoverable: !1,
|
|
157
|
+
class: "hover:bg-(--ui-surface)"
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
defaultVariants: {
|
|
161
|
+
variant: "default",
|
|
162
|
+
padding: "md",
|
|
163
|
+
bordered: !0
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
), V = c("", {
|
|
167
|
+
variants: {
|
|
168
|
+
padding: {
|
|
169
|
+
none: "p-4 pb-3",
|
|
170
|
+
sm: "px-3 pt-3 pb-2",
|
|
171
|
+
md: "px-4 pt-4 pb-3",
|
|
172
|
+
lg: "px-6 pt-6 pb-4",
|
|
173
|
+
xl: "px-8 pt-8 pb-6"
|
|
174
|
+
},
|
|
175
|
+
hasBorder: {
|
|
176
|
+
true: "border-b ui-border-strong mb-0",
|
|
177
|
+
false: ""
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}), z = c("", {
|
|
181
|
+
variants: {
|
|
182
|
+
padding: {
|
|
183
|
+
none: "p-4",
|
|
184
|
+
sm: "p-3",
|
|
185
|
+
md: "p-4",
|
|
186
|
+
lg: "p-6",
|
|
187
|
+
xl: "p-8"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}), A = c("border-t ui-border-strong bg-[color:color-mix(in oklab, var(--ui-surface), transparent 50%)]", {
|
|
191
|
+
variants: {
|
|
192
|
+
padding: {
|
|
193
|
+
none: "p-4 pt-3",
|
|
194
|
+
sm: "px-3 pb-3 pt-2",
|
|
195
|
+
md: "px-4 pb-4 pt-3",
|
|
196
|
+
lg: "px-6 pb-6 pt-4",
|
|
197
|
+
xl: "px-8 pb-8 pt-6"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}), H = c("overflow-hidden", {
|
|
201
|
+
variants: {
|
|
202
|
+
padding: {
|
|
203
|
+
none: "",
|
|
204
|
+
sm: "-mx-3 mb-3",
|
|
205
|
+
md: "-mx-4 mb-4",
|
|
206
|
+
lg: "-mx-6 mb-6",
|
|
207
|
+
xl: "-mx-8 mb-8"
|
|
208
|
+
},
|
|
209
|
+
hasHeader: {
|
|
210
|
+
true: "",
|
|
211
|
+
false: ""
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
compoundVariants: [
|
|
215
|
+
{
|
|
216
|
+
hasHeader: !0,
|
|
217
|
+
padding: "sm",
|
|
218
|
+
class: "-mt-3"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
hasHeader: !0,
|
|
222
|
+
padding: "md",
|
|
223
|
+
class: "-mt-4"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
hasHeader: !0,
|
|
227
|
+
padding: "lg",
|
|
228
|
+
class: "-mt-6"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
hasHeader: !0,
|
|
232
|
+
padding: "xl",
|
|
233
|
+
class: "-mt-8"
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
});
|
|
237
|
+
return (t, u) => (a(), v(p(e.as), {
|
|
238
|
+
class: n(l(d)(l(B)({ variant: e.variant, padding: e.padding, hoverable: e.hoverable, clickable: e.clickable, loading: e.loading, bordered: e.bordered }))),
|
|
239
|
+
disabled: e.disabled || e.loading,
|
|
240
|
+
"aria-busy": e.loading,
|
|
241
|
+
"aria-disabled": e.disabled,
|
|
242
|
+
role: e.clickable ? "button" : void 0,
|
|
243
|
+
tabindex: e.clickable && !e.disabled ? 0 : void 0,
|
|
244
|
+
onClick: m,
|
|
245
|
+
onKeydown: C
|
|
246
|
+
}, {
|
|
247
|
+
default: h(() => [
|
|
248
|
+
e.loading ? (a(), i("div", E, [...u[0] || (u[0] = [
|
|
249
|
+
g("div", { class: "animate-spin rounded-full h-8 w-8 border-b-2 ui-border-strong" }, null, -1)
|
|
250
|
+
])])) : r("", !0),
|
|
251
|
+
t.$slots.header || e.title || e.subtitle || t.$slots.actions ? (a(), i("div", {
|
|
252
|
+
key: 1,
|
|
253
|
+
class: n(l(d)(l(V)({ padding: e.padding, hasBorder: !!(t.$slots.default || t.$slots.footer) })))
|
|
254
|
+
}, [
|
|
255
|
+
o(t.$slots, "header", {}, () => [
|
|
256
|
+
g("div", q, [
|
|
257
|
+
g("div", D, [
|
|
258
|
+
e.title ? (a(), v(p(e.titleTag), {
|
|
259
|
+
key: 0,
|
|
260
|
+
class: n(l(d)(I, $.value))
|
|
261
|
+
}, {
|
|
262
|
+
default: h(() => [
|
|
263
|
+
T(b(e.title), 1)
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
}, 8, ["class"])) : r("", !0),
|
|
267
|
+
e.subtitle ? (a(), i("p", {
|
|
268
|
+
key: 1,
|
|
269
|
+
class: n(O)
|
|
270
|
+
}, b(e.subtitle), 1)) : r("", !0)
|
|
271
|
+
]),
|
|
272
|
+
t.$slots.actions ? (a(), i("div", N, [
|
|
273
|
+
o(t.$slots, "actions")
|
|
274
|
+
])) : r("", !0)
|
|
275
|
+
])
|
|
276
|
+
])
|
|
277
|
+
], 2)) : r("", !0),
|
|
278
|
+
t.$slots.image || e.image ? (a(), i("div", {
|
|
279
|
+
key: 2,
|
|
280
|
+
class: n(l(d)(l(H)({ padding: e.padding, hasHeader: !!(t.$slots.header || e.title) })))
|
|
281
|
+
}, [
|
|
282
|
+
o(t.$slots, "image", {}, () => [
|
|
283
|
+
e.image ? (a(), i("img", {
|
|
284
|
+
key: 0,
|
|
285
|
+
src: e.image,
|
|
286
|
+
alt: e.imageAlt,
|
|
287
|
+
class: n(l(d)(F, w.value)),
|
|
288
|
+
loading: e.imageLazy ? "lazy" : "eager"
|
|
289
|
+
}, null, 10, K)) : r("", !0)
|
|
290
|
+
])
|
|
291
|
+
], 2)) : r("", !0),
|
|
292
|
+
t.$slots.default ? (a(), i(j, { key: 3 }, [
|
|
293
|
+
e.contentWrapper ? (a(), i("div", {
|
|
294
|
+
key: 0,
|
|
295
|
+
class: n(l(d)(l(z)({ padding: e.padding }), e.contentClass))
|
|
296
|
+
}, [
|
|
297
|
+
o(t.$slots, "default")
|
|
298
|
+
], 2)) : o(t.$slots, "default", { key: 1 })
|
|
299
|
+
], 64)) : r("", !0),
|
|
300
|
+
t.$slots.footer ? (a(), i("div", {
|
|
301
|
+
key: 4,
|
|
302
|
+
class: n(l(d)(l(A)({ padding: e.padding })))
|
|
303
|
+
}, [
|
|
304
|
+
o(t.$slots, "footer")
|
|
305
|
+
], 2)) : r("", !0),
|
|
306
|
+
e.badge ? (a(), i("div", L, [
|
|
307
|
+
g("span", W, b(e.badge), 1)
|
|
308
|
+
])) : r("", !0)
|
|
309
|
+
]),
|
|
310
|
+
_: 3
|
|
311
|
+
}, 40, ["class", "disabled", "aria-busy", "aria-disabled", "role", "tabindex"]));
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
export {
|
|
315
|
+
M as default
|
|
316
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("class-variance-authority"),n=require("../utils/cn.cjs"),u={__name:"CardBody",props:{variant:{type:String,default:"default",validator:t=>["default","compact","spacious"].includes(t)}},setup(t){const a=t,s=c.cva("p-6 ui-text",{variants:{variant:{default:"p-6",compact:"p-4",spacious:"p-8"}}}),r=e.computed(()=>n.cn(s({variant:a.variant})));return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value)},[e.renderSlot(o.$slots,"default")],2))}};exports.default=u;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { computed as s, createElementBlock as c, openBlock as n, normalizeClass as p, renderSlot as i } from "vue";
|
|
2
|
+
import { cva as l } from "class-variance-authority";
|
|
3
|
+
import { cn as d } from "../utils/cn.js";
|
|
4
|
+
const _ = {
|
|
5
|
+
__name: "CardBody",
|
|
6
|
+
props: {
|
|
7
|
+
variant: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "default",
|
|
10
|
+
validator: (a) => ["default", "compact", "spacious"].includes(a)
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
setup(a) {
|
|
14
|
+
const t = a, o = l("p-6 ui-text", {
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
default: "p-6",
|
|
18
|
+
compact: "p-4",
|
|
19
|
+
spacious: "p-8"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}), e = s(
|
|
23
|
+
() => d(o({ variant: t.variant }))
|
|
24
|
+
);
|
|
25
|
+
return (r, u) => (n(), c("div", {
|
|
26
|
+
class: p(e.value)
|
|
27
|
+
}, [
|
|
28
|
+
i(r.$slots, "default")
|
|
29
|
+
], 2));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
_ as default
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../utils/cn.cjs"),r=Object.assign({inheritAttrs:!1},{__name:"CardContent",setup(n){return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(s.cn)("p-6 pt-0 ui-text",t.$attrs.class))},[e.renderSlot(t.$slots,"default")],2))}});exports.default=r;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as r, normalizeClass as s, unref as a, renderSlot as n } from "vue";
|
|
2
|
+
import { cn as o } from "../utils/cn.js";
|
|
3
|
+
const m = /* @__PURE__ */ Object.assign({
|
|
4
|
+
inheritAttrs: !1
|
|
5
|
+
}, {
|
|
6
|
+
__name: "CardContent",
|
|
7
|
+
setup(l) {
|
|
8
|
+
return (t, c) => (r(), e("div", {
|
|
9
|
+
class: s(a(o)("p-6 pt-0 ui-text", t.$attrs.class))
|
|
10
|
+
}, [
|
|
11
|
+
n(t.$slots, "default")
|
|
12
|
+
], 2));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
m as default
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("class-variance-authority"),n=require("../utils/cn.cjs"),u={__name:"CardFooter",props:{variant:{type:String,default:"default",validator:e=>["default","compact","spacious"].includes(e)}},setup(e){const a=e,r=c.cva("flex items-center p-6 pt-0 ui-text",{variants:{variant:{default:"p-6 pt-0",compact:"p-4 pt-0",spacious:"p-8 pt-0"}}}),s=t.computed(()=>n.cn(r({variant:a.variant})));return(o,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(s.value)},[t.renderSlot(o.$slots,"default")],2))}};exports.default=u;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { computed as s, createElementBlock as p, openBlock as c, normalizeClass as n, renderSlot as i } from "vue";
|
|
2
|
+
import { cva as l } from "class-variance-authority";
|
|
3
|
+
import { cn as u } from "../utils/cn.js";
|
|
4
|
+
const _ = {
|
|
5
|
+
__name: "CardFooter",
|
|
6
|
+
props: {
|
|
7
|
+
variant: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "default",
|
|
10
|
+
validator: (t) => ["default", "compact", "spacious"].includes(t)
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
setup(t) {
|
|
14
|
+
const a = t, e = l("flex items-center p-6 pt-0 ui-text", {
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
default: "p-6 pt-0",
|
|
18
|
+
compact: "p-4 pt-0",
|
|
19
|
+
spacious: "p-8 pt-0"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}), o = s(
|
|
23
|
+
() => u(e({ variant: a.variant }))
|
|
24
|
+
);
|
|
25
|
+
return (r, m) => (c(), p("div", {
|
|
26
|
+
class: n(o.value)
|
|
27
|
+
}, [
|
|
28
|
+
i(r.$slots, "default")
|
|
29
|
+
], 2));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
_ as default
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("class-variance-authority"),i=require("../utils/cn.cjs"),r={key:0,class:"ui-text"},o={key:1,class:"ui-text"},c={key:0},u=Object.assign({inheritAttrs:!1},{__name:"CardHeader",props:{title:{type:String,default:""},subtitle:{type:String,default:""},size:{type:String,default:"medium",validator:t=>["small","medium","large"].includes(t)},alignment:{type:String,default:"left",validator:t=>["left","center","right"].includes(t)}},setup(t){const a=n.cva("flex items-center justify-between",{variants:{size:{small:"p-2",medium:"p-4",large:"p-6"}},defaultVariants:{size:"medium"}}),s=n.cva("",{variants:{alignment:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{alignment:"left"}});return(l,d)=>(e.openBlock(),e.createElementBlock("header",{class:e.normalizeClass(e.unref(i.cn)(e.unref(a)({size:t.size}),"ui-text",l.$attrs.class))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i.cn)(e.unref(s)({alignment:t.alignment}),"flex flex-col"))},[t.title||l.$slots.title?(e.openBlock(),e.createElementBlock("h2",r,[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])])):e.createCommentVNode("",!0),t.subtitle||l.$slots.description?(e.openBlock(),e.createElementBlock("p",o,[e.renderSlot(l.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.subtitle),1)])])):e.createCommentVNode("",!0)],2),l.$slots.actions?(e.openBlock(),e.createElementBlock("div",c,[e.renderSlot(l.$slots,"actions")])):e.createCommentVNode("",!0)],2))}});exports.default=u;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { createElementBlock as i, openBlock as s, normalizeClass as r, unref as a, createElementVNode as g, createCommentVNode as l, renderSlot as n, createTextVNode as o, toDisplayString as d } from "vue";
|
|
2
|
+
import { cva as c } from "class-variance-authority";
|
|
3
|
+
import { cn as m } from "../utils/cn.js";
|
|
4
|
+
const h = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "ui-text"
|
|
7
|
+
}, p = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "ui-text"
|
|
10
|
+
}, y = { key: 0 }, S = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
11
|
+
__name: "CardHeader",
|
|
12
|
+
props: {
|
|
13
|
+
title: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
subtitle: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "medium",
|
|
24
|
+
validator: (t) => ["small", "medium", "large"].includes(t)
|
|
25
|
+
},
|
|
26
|
+
alignment: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "left",
|
|
29
|
+
validator: (t) => ["left", "center", "right"].includes(t)
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
setup(t) {
|
|
33
|
+
const u = c(
|
|
34
|
+
"flex items-center justify-between",
|
|
35
|
+
{
|
|
36
|
+
variants: {
|
|
37
|
+
size: {
|
|
38
|
+
small: "p-2",
|
|
39
|
+
medium: "p-4",
|
|
40
|
+
large: "p-6"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
defaultVariants: {
|
|
44
|
+
size: "medium"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
), f = c(
|
|
48
|
+
"",
|
|
49
|
+
{
|
|
50
|
+
variants: {
|
|
51
|
+
alignment: {
|
|
52
|
+
left: "text-left",
|
|
53
|
+
center: "text-center",
|
|
54
|
+
right: "text-right"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: {
|
|
58
|
+
alignment: "left"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
return (e, v) => (s(), i("header", {
|
|
63
|
+
class: r(a(m)(
|
|
64
|
+
a(u)({ size: t.size }),
|
|
65
|
+
"ui-text",
|
|
66
|
+
e.$attrs.class
|
|
67
|
+
))
|
|
68
|
+
}, [
|
|
69
|
+
g("div", {
|
|
70
|
+
class: r(a(m)(a(f)({ alignment: t.alignment }), "flex flex-col"))
|
|
71
|
+
}, [
|
|
72
|
+
t.title || e.$slots.title ? (s(), i("h2", h, [
|
|
73
|
+
n(e.$slots, "title", {}, () => [
|
|
74
|
+
o(d(t.title), 1)
|
|
75
|
+
])
|
|
76
|
+
])) : l("", !0),
|
|
77
|
+
t.subtitle || e.$slots.description ? (s(), i("p", p, [
|
|
78
|
+
n(e.$slots, "description", {}, () => [
|
|
79
|
+
o(d(t.subtitle), 1)
|
|
80
|
+
])
|
|
81
|
+
])) : l("", !0)
|
|
82
|
+
], 2),
|
|
83
|
+
e.$slots.actions ? (s(), i("div", y, [
|
|
84
|
+
n(e.$slots, "actions")
|
|
85
|
+
])) : l("", !0)
|
|
86
|
+
], 2));
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
export {
|
|
90
|
+
S as default
|
|
91
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../utils/cn.cjs"),r=Object.assign({inheritAttrs:!1},{__name:"CardTitle",setup(n){return(t,l)=>(e.openBlock(),e.createElementBlock("h3",{class:e.normalizeClass(e.unref(s.cn)("text-2xl font-semibold leading-none tracking-tight ui-text",t.$attrs.class))},[e.renderSlot(t.$slots,"default")],2))}});exports.default=r;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as r, normalizeClass as s, unref as n, renderSlot as a } from "vue";
|
|
2
|
+
import { cn as l } from "../utils/cn.js";
|
|
3
|
+
const f = /* @__PURE__ */ Object.assign({
|
|
4
|
+
inheritAttrs: !1
|
|
5
|
+
}, {
|
|
6
|
+
__name: "CardTitle",
|
|
7
|
+
setup(o) {
|
|
8
|
+
return (t, i) => (r(), e("h3", {
|
|
9
|
+
class: s(n(l)("text-2xl font-semibold leading-none tracking-tight ui-text", t.$attrs.class))
|
|
10
|
+
}, [
|
|
11
|
+
a(t.$slots, "default")
|
|
12
|
+
], 2));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
f as default
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C={class:"flex items-center gap-3"},w={class:"relative"},V=["id","checked","indeterminate","disabled","required","aria-describedby"],B={class:"flex-1"},S=["for"],z={__name:"Checkbox",props:{modelValue:{type:[Boolean,Array],default:!1},value:{type:[String,Number,Boolean],default:null},label:{type:String,default:null},description:{type:String,default:null},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},size:{type:String,default:"md",validator:r=>["sm","md","lg"].includes(r)},variant:{type:String,default:"default",validator:r=>["default","error"].includes(r)},id:{type:String,default:null},error:{type:String,default:null}},emits:["update:modelValue","change"],setup(r,{emit:c}){const m={render(){return e.h("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"})])}},f={render(){return e.h("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 12h14"})])}},t=r,d=c,i=e.ref(null),s=e.computed(()=>t.id||e.useId()),a=e.computed(()=>Array.isArray(t.modelValue)?t.modelValue.includes(t.value):t.modelValue),b=l=>{const n=l.target.checked;if(Array.isArray(t.modelValue)){const o=[...t.modelValue];if(n)o.push(t.value);else{const u=o.indexOf(t.value);u>-1&&o.splice(u,1)}d("update:modelValue",o)}else d("update:modelValue",n);d("change",n)},v=()=>{!t.disabled&&i.value&&i.value.click()},h=e.computed(()=>{if(t.error)return`${s.value}-error`}),p=e.computed(()=>({sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"})[t.size]),g=e.computed(()=>["absolute inset-0 w-full h-full opacity-0 cursor-pointer",{"cursor-not-allowed":t.disabled}]),k=e.computed(()=>["flex items-center justify-center rounded border-2 transition-all duration-200","cursor-pointer select-none",p.value,{"ui-primary-bg border-(--ui-primary) ui-text":a.value&&!t.disabled&&t.variant==="default","ui-danger-bg border-(--ui-danger) ui-text":a.value&&!t.disabled&&t.variant==="error","ui-bg ui-border-strong ui-text":a.value&&t.disabled,"ui-surface ui-border-strong hover:border-(--ui-border-strong)":!a.value&&!t.disabled&&t.variant==="default","ui-surface border-(--ui-danger-soft) hover:border-(--ui-danger-soft)":!a.value&&!t.disabled&&t.variant==="error","ui-surface-muted ui-border-strong ":!a.value&&t.disabled,"cursor-not-allowed":t.disabled,"focus-within:ring-2 focus-within:ring-offset-2":!t.disabled,"focus-within:ring-(--ui-primary)":!t.disabled&&t.variant==="default","focus-within:ring-(--ui-danger)":!t.disabled&&t.variant==="error"}]),y=e.computed(()=>["text-sm font-medium cursor-pointer select-none",{"ui-text":!t.disabled,"ui-text-muted":t.disabled}]),x=e.computed(()=>["text-xs ui-text mt-1"]);return e.watch(()=>t.indeterminate,l=>{i.value&&(i.value.indeterminate=l)},{immediate:!0}),(l,n)=>(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("div",w,[e.createElementVNode("input",{id:s.value,ref_key:"checkboxRef",ref:i,type:"checkbox",checked:a.value,indeterminate:r.indeterminate,disabled:r.disabled,required:r.required,class:e.normalizeClass(g.value),"aria-describedby":h.value,onChange:b},null,42,V),e.createElementVNode("div",{class:e.normalizeClass(k.value),onClick:v},[a.value&&!r.indeterminate?(e.openBlock(),e.createBlock(m,{key:0,class:"w-3 h-3"})):r.indeterminate?(e.openBlock(),e.createBlock(f,{key:1,class:"w-3 h-3"})):e.createCommentVNode("",!0)],2)]),e.createElementVNode("div",B,[e.createElementVNode("label",{for:s.value,class:e.normalizeClass(y.value)},[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(r.label),1)])],10,S),r.description?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(x.value)},e.toDisplayString(r.description),3)):e.createCommentVNode("",!0)])]))}};exports.default=z;
|