@gspa/ui 0.1.3 → 0.2.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/README.md +35 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js +205 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs +1 -0
- package/dist/DataTable.css +1 -0
- package/dist/DataTableToolBar.css +1 -0
- package/dist/FormField.vue_vue_type_script_setup_true_lang-DimMUyA-.js +205 -0
- package/dist/FormField.vue_vue_type_script_setup_true_lang-mEO-VA6R.cjs +1 -0
- package/dist/Header.css +1 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-C1OQn24h.cjs +1 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-CpBoY97r.js +137 -0
- package/dist/Loader.css +1 -0
- package/dist/ReminderConfig.css +1 -0
- package/dist/ReusableForm.css +1 -0
- package/dist/Sidebar.css +1 -0
- package/dist/Toast.css +1 -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 +227 -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 +4 -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 +4 -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 +58 -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 +4 -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 +686 -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 +73 -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/gspa-ui.css +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.esm.js +315 -19546
- package/dist/layouts/AuthLayout.cjs +1 -0
- package/dist/layouts/AuthLayout.js +188 -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/form-field.cjs +1 -0
- package/dist/lib/form-field.js +4 -0
- package/dist/lib/icon.cjs +1 -0
- package/dist/lib/icon.js +4 -0
- package/dist/lib/theme.cjs +1 -0
- package/dist/lib/theme.js +145 -0
- package/dist/lib/toast.cjs +1 -0
- package/dist/lib/toast.js +81 -0
- package/dist/src/components/Alert.vue.d.ts.map +1 -1
- package/dist/src/components/Button.vue.d.ts +127 -29
- package/dist/src/components/Button.vue.d.ts.map +1 -1
- package/dist/src/components/Checkbox.vue.d.ts +2 -2
- package/dist/src/components/DataTable.vue.d.ts +1 -1
- package/dist/src/components/FormField.vue.d.ts +106 -38
- package/dist/src/components/FormField.vue.d.ts.map +1 -1
- package/dist/src/components/Icon.vue.d.ts.map +1 -1
- package/dist/src/components/Input.vue.d.ts +137 -33
- package/dist/src/components/Input.vue.d.ts.map +1 -1
- package/dist/src/components/ReusableForm.vue.d.ts +1 -1
- package/dist/src/components/ReusableForm.vue.d.ts.map +1 -1
- package/dist/src/components/ReusableFormModal.vue.d.ts +1 -1
- package/dist/src/components/Textarea.vue.d.ts +2 -2
- package/dist/src/index.d.ts +9 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/layouts/AuthLayout.vue.d.ts +2 -0
- package/dist/src/layouts/AuthLayout.vue.d.ts.map +1 -1
- package/dist/src/lib/form-field.d.ts +2 -0
- package/dist/src/lib/form-field.d.ts.map +1 -0
- package/dist/src/lib/icon.d.ts +2 -0
- package/dist/src/lib/icon.d.ts.map +1 -0
- package/dist/src/lib/theme.d.ts +4 -0
- package/dist/src/lib/theme.d.ts.map +1 -1
- package/dist/src/types.d.ts +44 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/styles/auth-layout.css +1 -0
- package/dist/styles/button.css +1 -0
- package/dist/styles/form-field.css +1 -0
- package/dist/styles/input.css +1 -0
- package/dist/styles/tokens.css +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/cn.cjs +1 -0
- package/dist/utils/cn.js +7 -0
- package/package.json +45 -8
- package/dist/index.js +0 -605
- package/dist/src/__tests__/Alert.spec.d.ts +0 -2
- package/dist/src/__tests__/Alert.spec.d.ts.map +0 -1
- package/dist/src/__tests__/App.spec.d.ts +0 -2
- package/dist/src/__tests__/App.spec.d.ts.map +0 -1
- package/dist/src/__tests__/AuthLayout.spec.d.ts +0 -2
- package/dist/src/__tests__/AuthLayout.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Badge.spec.d.ts +0 -2
- package/dist/src/__tests__/Badge.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Button.spec.d.ts +0 -2
- package/dist/src/__tests__/Button.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Card.spec.d.ts +0 -2
- package/dist/src/__tests__/Card.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Checkbox.spec.d.ts +0 -2
- package/dist/src/__tests__/Checkbox.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Dropdown.spec.d.ts +0 -2
- package/dist/src/__tests__/Dropdown.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Input.spec.d.ts +0 -2
- package/dist/src/__tests__/Input.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Modal.spec.d.ts +0 -2
- package/dist/src/__tests__/Modal.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Radio.spec.d.ts +0 -2
- package/dist/src/__tests__/Radio.spec.d.ts.map +0 -1
- package/dist/src/__tests__/ReusableForm.spec.d.ts +0 -2
- package/dist/src/__tests__/ReusableForm.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Tabs.spec.d.ts +0 -2
- package/dist/src/__tests__/Tabs.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/CardIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/CardIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/FormIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/FormIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@fortawesome/vue-fontawesome"),d=require("../lib/icon.cjs"),m={__name:"Icon",props:{icon:{type:String,default:null},name:{type:String,default:null},prefix:{type:String,default:"fa"},size:{type:String,default:"md"},color:String,ariaLabel:String},setup(a){const l=a,n=e.computed(()=>l.icon||l.name),t=e.inject(d.ICON_ADAPTER_KEY,null),r=e.computed(()=>typeof t!="function"||!n.value?null:t({name:n.value,prefix:l.prefix})),o=e.computed(()=>({xs:"xs",sm:"sm",md:"lg",lg:"xl",xl:"2x",xxl:"3x"})[l.size]||"lg"),c=e.computed(()=>l.color?l.color.startsWith("text-")?l.color:`text-${l.color}`:"text-current"),i=e.computed(()=>[c.value,"inline-block"]);return(u,f)=>r.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{key:0,class:e.normalizeClass(i.value),"aria-hidden":!a.ariaLabel,"aria-label":a.ariaLabel,role:a.ariaLabel?"img":void 0},null,8,["class","aria-hidden","aria-label","role"])):n.value?(e.openBlock(),e.createBlock(e.unref(s.FontAwesomeIcon),{key:1,icon:[a.prefix,n.value],size:o.value,class:e.normalizeClass(i.value),"aria-hidden":!a.ariaLabel,"aria-label":a.ariaLabel,role:a.ariaLabel?"img":void 0},null,8,["icon","size","class","aria-hidden","aria-label","role"])):e.createCommentVNode("",!0)}};exports.default=m;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { computed as l, inject as f, createBlock as o, createCommentVNode as x, openBlock as c, resolveDynamicComponent as b, normalizeClass as s, unref as v } from "vue";
|
|
2
|
+
import { FontAwesomeIcon as g } from "@fortawesome/vue-fontawesome";
|
|
3
|
+
import { ICON_ADAPTER_KEY as p } from "../lib/icon.js";
|
|
4
|
+
const h = {
|
|
5
|
+
__name: "Icon",
|
|
6
|
+
props: {
|
|
7
|
+
icon: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: null
|
|
10
|
+
},
|
|
11
|
+
name: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: null
|
|
14
|
+
},
|
|
15
|
+
prefix: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "fa"
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "md"
|
|
22
|
+
},
|
|
23
|
+
color: String,
|
|
24
|
+
ariaLabel: String
|
|
25
|
+
},
|
|
26
|
+
setup(e) {
|
|
27
|
+
const a = e, n = l(() => a.icon || a.name), r = f(p, null), i = l(() => typeof r != "function" || !n.value ? null : r({ name: n.value, prefix: a.prefix })), u = l(() => ({
|
|
28
|
+
xs: "xs",
|
|
29
|
+
sm: "sm",
|
|
30
|
+
md: "lg",
|
|
31
|
+
// FontAwesome sizes: xs, sm, lg, xl, 2x, 3x, etc.
|
|
32
|
+
lg: "xl",
|
|
33
|
+
xl: "2x",
|
|
34
|
+
xxl: "3x"
|
|
35
|
+
})[a.size] || "lg"), d = l(() => a.color ? a.color.startsWith("text-") ? a.color : `text-${a.color}` : "text-current"), t = l(() => [
|
|
36
|
+
d.value,
|
|
37
|
+
"inline-block"
|
|
38
|
+
]);
|
|
39
|
+
return (m, y) => i.value ? (c(), o(b(i.value), {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: s(t.value),
|
|
42
|
+
"aria-hidden": !e.ariaLabel,
|
|
43
|
+
"aria-label": e.ariaLabel,
|
|
44
|
+
role: e.ariaLabel ? "img" : void 0
|
|
45
|
+
}, null, 8, ["class", "aria-hidden", "aria-label", "role"])) : n.value ? (c(), o(v(g), {
|
|
46
|
+
key: 1,
|
|
47
|
+
icon: [e.prefix, n.value],
|
|
48
|
+
size: u.value,
|
|
49
|
+
class: s(t.value),
|
|
50
|
+
"aria-hidden": !e.ariaLabel,
|
|
51
|
+
"aria-label": e.ariaLabel,
|
|
52
|
+
role: e.ariaLabel ? "img" : void 0
|
|
53
|
+
}, null, 8, ["icon", "size", "class", "aria-hidden", "aria-label", "role"])) : x("", !0);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
h as default
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("class-variance-authority"),r=require("../utils/cn.cjs"),b=require("./Icon.cjs"),j=require("./Spinner.cjs"),h=["src","alt","loading"],k={__name:"Image",props:{src:{type:String,required:!0},alt:{type:String,default:""},aspectRatio:{type:String,default:"auto",validator:t=>["auto","square","16/9","4/3","3/2"].includes(t)},objectFit:{type:String,default:"cover",validator:t=>["cover","contain","fill","none","scale-down"].includes(t)},loading:{type:String,default:"lazy",validator:t=>["lazy","eager"].includes(t)},showSpinner:{type:Boolean,default:!0},class:String},emits:["load","error"],setup(t,{emit:i}){const a=t,n=i,o=e.ref(!0),l=e.ref(!1),u=y.cva("relative overflow-hidden ui-surface-muted",{variants:{aspectRatio:{auto:"",square:"aspect-square","16/9":"aspect-video","4/3":"aspect-[4/3]","3/2":"aspect-[3/2]"}}}),d=e.computed(()=>r.cn(u({aspectRatio:a.aspectRatio}),a.class)),m=e.computed(()=>r.cn("h-full w-full transition-opacity duration-300",{"object-cover":a.objectFit==="cover","object-contain":a.objectFit==="contain","object-fill":a.objectFit==="fill","object-none":a.objectFit==="none","object-scale-down":a.objectFit==="scale-down"},o.value&&"opacity-0",l.value&&"hidden")),f=e.computed(()=>"absolute inset-0 flex items-center justify-center ui-surface-muted"),p=e.computed(()=>"absolute inset-0 flex flex-col items-center justify-center gap-2 ui-surface-muted"),v=s=>{o.value=!1,l.value=!1,n("load",s)},g=s=>{o.value=!1,l.value=!0,n("error",s)};return(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value)},[e.createElementVNode("img",{src:t.src,alt:t.alt,class:e.normalizeClass(m.value),loading:t.loading,onLoad:v,onError:g},null,42,h),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(f.value)},[t.showSpinner?(e.openBlock(),e.createBlock(j.default,{key:0,size:"sm"})):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(p.value)},[e.createVNode(b.default,{name:"ImageOff",class:"h-8 w-8 ui-text"}),c[0]||(c[0]=e.createElementVNode("span",{class:"text-sm ui-text"},"Failed to load image",-1))],2)):e.createCommentVNode("",!0)],2))}};exports.default=k;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ref as m, computed as l, createElementBlock as n, openBlock as r, normalizeClass as c, createElementVNode as f, createCommentVNode as i, createBlock as S, createVNode as F } from "vue";
|
|
2
|
+
import { cva as k } from "class-variance-authority";
|
|
3
|
+
import { cn as v } from "../utils/cn.js";
|
|
4
|
+
import C from "./Icon.js";
|
|
5
|
+
import E from "./Spinner.js";
|
|
6
|
+
const q = ["src", "alt", "loading"], N = {
|
|
7
|
+
__name: "Image",
|
|
8
|
+
props: {
|
|
9
|
+
src: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: !0
|
|
12
|
+
},
|
|
13
|
+
alt: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
aspectRatio: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "auto",
|
|
20
|
+
validator: (e) => ["auto", "square", "16/9", "4/3", "3/2"].includes(e)
|
|
21
|
+
},
|
|
22
|
+
objectFit: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "cover",
|
|
25
|
+
validator: (e) => ["cover", "contain", "fill", "none", "scale-down"].includes(e)
|
|
26
|
+
},
|
|
27
|
+
loading: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "lazy",
|
|
30
|
+
validator: (e) => ["lazy", "eager"].includes(e)
|
|
31
|
+
},
|
|
32
|
+
showSpinner: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !0
|
|
35
|
+
},
|
|
36
|
+
class: String
|
|
37
|
+
},
|
|
38
|
+
emits: ["load", "error"],
|
|
39
|
+
setup(e, { emit: p }) {
|
|
40
|
+
const t = e, u = p, a = m(!0), o = m(!1), g = k(
|
|
41
|
+
"relative overflow-hidden ui-surface-muted",
|
|
42
|
+
{
|
|
43
|
+
variants: {
|
|
44
|
+
aspectRatio: {
|
|
45
|
+
auto: "",
|
|
46
|
+
square: "aspect-square",
|
|
47
|
+
"16/9": "aspect-video",
|
|
48
|
+
"4/3": "aspect-[4/3]",
|
|
49
|
+
"3/2": "aspect-[3/2]"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
), y = l(
|
|
54
|
+
() => v(g({ aspectRatio: t.aspectRatio }), t.class)
|
|
55
|
+
), b = l(
|
|
56
|
+
() => v(
|
|
57
|
+
"h-full w-full transition-opacity duration-300",
|
|
58
|
+
{
|
|
59
|
+
"object-cover": t.objectFit === "cover",
|
|
60
|
+
"object-contain": t.objectFit === "contain",
|
|
61
|
+
"object-fill": t.objectFit === "fill",
|
|
62
|
+
"object-none": t.objectFit === "none",
|
|
63
|
+
"object-scale-down": t.objectFit === "scale-down"
|
|
64
|
+
},
|
|
65
|
+
a.value && "opacity-0",
|
|
66
|
+
o.value && "hidden"
|
|
67
|
+
)
|
|
68
|
+
), j = l(
|
|
69
|
+
() => "absolute inset-0 flex items-center justify-center ui-surface-muted"
|
|
70
|
+
), h = l(
|
|
71
|
+
() => "absolute inset-0 flex flex-col items-center justify-center gap-2 ui-surface-muted"
|
|
72
|
+
), w = (s) => {
|
|
73
|
+
a.value = !1, o.value = !1, u("load", s);
|
|
74
|
+
}, x = (s) => {
|
|
75
|
+
a.value = !1, o.value = !0, u("error", s);
|
|
76
|
+
};
|
|
77
|
+
return (s, d) => (r(), n("div", {
|
|
78
|
+
class: c(y.value)
|
|
79
|
+
}, [
|
|
80
|
+
f("img", {
|
|
81
|
+
src: e.src,
|
|
82
|
+
alt: e.alt,
|
|
83
|
+
class: c(b.value),
|
|
84
|
+
loading: e.loading,
|
|
85
|
+
onLoad: w,
|
|
86
|
+
onError: x
|
|
87
|
+
}, null, 42, q),
|
|
88
|
+
a.value ? (r(), n("div", {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: c(j.value)
|
|
91
|
+
}, [
|
|
92
|
+
e.showSpinner ? (r(), S(E, {
|
|
93
|
+
key: 0,
|
|
94
|
+
size: "sm"
|
|
95
|
+
})) : i("", !0)
|
|
96
|
+
], 2)) : i("", !0),
|
|
97
|
+
o.value ? (r(), n("div", {
|
|
98
|
+
key: 1,
|
|
99
|
+
class: c(h.value)
|
|
100
|
+
}, [
|
|
101
|
+
F(C, {
|
|
102
|
+
name: "ImageOff",
|
|
103
|
+
class: "h-8 w-8 ui-text"
|
|
104
|
+
}),
|
|
105
|
+
d[0] || (d[0] = f("span", { class: "text-sm ui-text" }, "Failed to load image", -1))
|
|
106
|
+
], 2)) : i("", !0)
|
|
107
|
+
], 2));
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
export {
|
|
111
|
+
N as default
|
|
112
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Input.vue_vue_type_script_setup_true_lang-C1OQn24h.cjs");exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("class-variance-authority"),l=require("../utils/cn.cjs"),u={key:0,class:"flex items-center px-3 bg-muted border border-r-0 rounded-l-md"},a={key:1,class:"flex items-center px-3 bg-muted border border-l-0 rounded-r-md"},i={__name:"InputGroup",props:{variant:{type:String,default:"default",validator:t=>["default","outline"].includes(t)}},setup(t){const o=t,n=d.cva("flex w-full",{variants:{variant:{default:"[&>input]:rounded-none [&>input:first-child]:rounded-l-md [&>input:last-child]:rounded-r-md",outline:"border ui-border-strong rounded-md [&>input]:border-0 [&>input]:rounded-none"}}}),s=e.computed(()=>l.cn(n({variant:o.variant})));return(r,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.value)},[r.$slots.prefix?(e.openBlock(),e.createElementBlock("div",u,[e.renderSlot(r.$slots,"prefix")])):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"default"),r.$slots.suffix?(e.openBlock(),e.createElementBlock("div",a,[e.renderSlot(r.$slots,"suffix")])):e.createCommentVNode("",!0)],2))}};exports.default=i;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { computed as i, createElementBlock as t, openBlock as o, normalizeClass as a, createCommentVNode as n, renderSlot as d } from "vue";
|
|
2
|
+
import { cva as p } from "class-variance-authority";
|
|
3
|
+
import { cn as m } from "../utils/cn.js";
|
|
4
|
+
const f = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "flex items-center px-3 bg-muted border border-r-0 rounded-l-md"
|
|
7
|
+
}, c = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "flex items-center px-3 bg-muted border border-l-0 rounded-r-md"
|
|
10
|
+
}, h = {
|
|
11
|
+
__name: "InputGroup",
|
|
12
|
+
props: {
|
|
13
|
+
variant: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "default",
|
|
16
|
+
validator: (r) => ["default", "outline"].includes(r)
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(r) {
|
|
20
|
+
const s = r, u = p("flex w-full", {
|
|
21
|
+
variants: {
|
|
22
|
+
variant: {
|
|
23
|
+
default: "[&>input]:rounded-none [&>input:first-child]:rounded-l-md [&>input:last-child]:rounded-r-md",
|
|
24
|
+
outline: "border ui-border-strong rounded-md [&>input]:border-0 [&>input]:rounded-none"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}), l = i(
|
|
28
|
+
() => m(u({ variant: s.variant }))
|
|
29
|
+
);
|
|
30
|
+
return (e, v) => (o(), t("div", {
|
|
31
|
+
class: a(l.value)
|
|
32
|
+
}, [
|
|
33
|
+
e.$slots.prefix ? (o(), t("div", f, [
|
|
34
|
+
d(e.$slots, "prefix")
|
|
35
|
+
])) : n("", !0),
|
|
36
|
+
d(e.$slots, "default"),
|
|
37
|
+
e.$slots.suffix ? (o(), t("div", c, [
|
|
38
|
+
d(e.$slots, "suffix")
|
|
39
|
+
])) : n("", !0)
|
|
40
|
+
], 2));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
h as default
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("class-variance-authority"),n=require("../utils/cn.cjs"),i=["for"],c={__name:"Label",props:{htmlFor:String,size:{type:String,default:"md",validator:t=>["sm","md","lg"].includes(t)},required:Boolean,disabled:Boolean,class:String},setup(t){const s=t,l=r.cva("font-medium leading-none ui-text peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-sm",md:"text-sm",lg:"text-base"}}}),a=e.computed(()=>n.cn(l({size:s.size}),s.disabled&&"cursor-not-allowed opacity-70",s.class));return(o,d)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(a.value),for:t.htmlFor},[e.renderSlot(o.$slots,"default")],10,i))}};exports.default=c;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { computed as a, createElementBlock as r, openBlock as n, normalizeClass as i, renderSlot as d } from "vue";
|
|
2
|
+
import { cva as c } from "class-variance-authority";
|
|
3
|
+
import { cn as m } from "../utils/cn.js";
|
|
4
|
+
const p = ["for"], x = {
|
|
5
|
+
__name: "Label",
|
|
6
|
+
props: {
|
|
7
|
+
htmlFor: String,
|
|
8
|
+
size: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "md",
|
|
11
|
+
validator: (e) => ["sm", "md", "lg"].includes(e)
|
|
12
|
+
},
|
|
13
|
+
required: Boolean,
|
|
14
|
+
disabled: Boolean,
|
|
15
|
+
class: String
|
|
16
|
+
},
|
|
17
|
+
setup(e) {
|
|
18
|
+
const t = e, s = c(
|
|
19
|
+
"font-medium leading-none ui-text peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
20
|
+
{
|
|
21
|
+
variants: {
|
|
22
|
+
size: {
|
|
23
|
+
sm: "text-sm",
|
|
24
|
+
md: "text-sm",
|
|
25
|
+
lg: "text-base"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
), o = a(
|
|
30
|
+
() => m(
|
|
31
|
+
s({ size: t.size }),
|
|
32
|
+
t.disabled && "cursor-not-allowed opacity-70",
|
|
33
|
+
t.class
|
|
34
|
+
)
|
|
35
|
+
);
|
|
36
|
+
return (l, u) => (n(), r("label", {
|
|
37
|
+
class: i(o.value),
|
|
38
|
+
for: e.htmlFor
|
|
39
|
+
}, [
|
|
40
|
+
d(l.$slots, "default")
|
|
41
|
+
], 10, p));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
x as default
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),d=require("class-variance-authority"),f=require("../utils/cn.cjs"),r=require("./Icon.cjs"),m={__name:"Link",props:{href:{type:String,default:null},to:{type:[String,Object],default:null},external:{type:Boolean,default:!1},target:{type:String,default:null},rel:{type:String,default:null},variant:{type:String,default:"primary",validator:e=>["primary","secondary","muted","danger","success"].includes(e)},size:{type:String,default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)},underline:{type:String,default:"hover",validator:e=>["always","hover","never"].includes(e)},disabled:{type:Boolean,default:!1},icon:{type:String,default:null},iconPosition:{type:String,default:"left",validator:e=>["left","right"].includes(e)},showExternalIcon:{type:Boolean,default:!0},block:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:o}){const n=e,a=t.computed(()=>n.to&&!n.href?"router-link":n.href||n.external?"a":"button"),i=t.computed(()=>`w-4 h-4 ${n.iconPosition==="left"?"mr-2":"ml-2"}`),u=d.cva("transition-colors duration-200 inline-flex items-center",{variants:{variant:{primary:"ui-primary hover:text-(--ui-primary-strong)",secondary:"ui-text hover:text-(--ui-primary)",muted:"text-(--ui-text-muted) hover:text-(--ui-text)",danger:"ui-danger hover:text-(--ui-danger-strong)",success:"ui-success hover:text-(--ui-success-strong)"},size:{xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},underline:{always:"underline",hover:"hover:underline",never:"no-underline"},block:{true:"block w-full",false:"inline-flex items-center"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:"cursor-pointer"}},defaultVariants:{variant:"primary",size:"md",underline:"hover",block:!1,disabled:!1}}),s=l=>{if(n.disabled){l.preventDefault();return}c("click",l)},c=o;return(l,v)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),{href:a.value==="a"?e.href:void 0,to:a.value==="router-link"?e.to:void 0,target:e.external?"_blank":e.target,rel:e.external?"noopener noreferrer":e.rel,class:t.normalizeClass(t.unref(f.cn)(t.unref(u)({variant:e.variant,size:e.size,underline:e.underline,block:e.block,disabled:e.disabled}),l.$attrs.class)),onClick:s},{default:t.withCtx(()=>[e.icon&&e.iconPosition==="left"?(t.openBlock(),t.createBlock(r.default,{key:0,name:e.icon,class:t.normalizeClass(i.value)},null,8,["name","class"])):t.createCommentVNode("",!0),t.renderSlot(l.$slots,"default"),e.icon&&e.iconPosition==="right"?(t.openBlock(),t.createBlock(r.default,{key:1,name:e.icon,class:t.normalizeClass(i.value)},null,8,["name","class"])):t.createCommentVNode("",!0),e.external&&e.showExternalIcon?(t.openBlock(),t.createBlock(r.default,{key:2,name:"external-link",class:"w-3 h-3 ml-1 inline-block"})):t.createCommentVNode("",!0)]),_:3},8,["href","to","target","rel","class"]))}};exports.default=m;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { computed as c, createBlock as l, openBlock as a, resolveDynamicComponent as y, normalizeClass as i, unref as d, withCtx as g, createCommentVNode as o, renderSlot as h } from "vue";
|
|
2
|
+
import { cva as k } from "class-variance-authority";
|
|
3
|
+
import { cn as b } from "../utils/cn.js";
|
|
4
|
+
import s from "./Icon.js";
|
|
5
|
+
const P = {
|
|
6
|
+
__name: "Link",
|
|
7
|
+
props: {
|
|
8
|
+
href: { type: String, default: null },
|
|
9
|
+
to: { type: [String, Object], default: null },
|
|
10
|
+
external: { type: Boolean, default: !1 },
|
|
11
|
+
target: { type: String, default: null },
|
|
12
|
+
rel: { type: String, default: null },
|
|
13
|
+
variant: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "primary",
|
|
16
|
+
validator: (e) => ["primary", "secondary", "muted", "danger", "success"].includes(e)
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "md",
|
|
21
|
+
validator: (e) => ["xs", "sm", "md", "lg", "xl"].includes(e)
|
|
22
|
+
},
|
|
23
|
+
underline: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "hover",
|
|
26
|
+
validator: (e) => ["always", "hover", "never"].includes(e)
|
|
27
|
+
},
|
|
28
|
+
disabled: { type: Boolean, default: !1 },
|
|
29
|
+
icon: { type: String, default: null },
|
|
30
|
+
iconPosition: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "left",
|
|
33
|
+
validator: (e) => ["left", "right"].includes(e)
|
|
34
|
+
},
|
|
35
|
+
showExternalIcon: { type: Boolean, default: !0 },
|
|
36
|
+
block: { type: Boolean, default: !1 }
|
|
37
|
+
},
|
|
38
|
+
emits: ["click"],
|
|
39
|
+
setup(e, { emit: f }) {
|
|
40
|
+
const t = e, r = c(() => t.to && !t.href ? "router-link" : t.href || t.external ? "a" : "button"), u = c(() => `w-4 h-4 ${t.iconPosition === "left" ? "mr-2" : "ml-2"}`), m = k(
|
|
41
|
+
"transition-colors duration-200 inline-flex items-center",
|
|
42
|
+
{
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
primary: "ui-primary hover:text-(--ui-primary-strong)",
|
|
46
|
+
secondary: "ui-text hover:text-(--ui-primary)",
|
|
47
|
+
muted: "text-(--ui-text-muted) hover:text-(--ui-text)",
|
|
48
|
+
danger: "ui-danger hover:text-(--ui-danger-strong)",
|
|
49
|
+
success: "ui-success hover:text-(--ui-success-strong)"
|
|
50
|
+
},
|
|
51
|
+
size: {
|
|
52
|
+
xs: "text-xs",
|
|
53
|
+
sm: "text-sm",
|
|
54
|
+
md: "text-base",
|
|
55
|
+
lg: "text-lg",
|
|
56
|
+
xl: "text-xl"
|
|
57
|
+
},
|
|
58
|
+
underline: {
|
|
59
|
+
always: "underline",
|
|
60
|
+
hover: "hover:underline",
|
|
61
|
+
never: "no-underline"
|
|
62
|
+
},
|
|
63
|
+
block: {
|
|
64
|
+
true: "block w-full",
|
|
65
|
+
false: "inline-flex items-center"
|
|
66
|
+
},
|
|
67
|
+
disabled: {
|
|
68
|
+
true: "opacity-50 cursor-not-allowed pointer-events-none",
|
|
69
|
+
false: "cursor-pointer"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
variant: "primary",
|
|
74
|
+
size: "md",
|
|
75
|
+
underline: "hover",
|
|
76
|
+
block: !1,
|
|
77
|
+
disabled: !1
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
), x = (n) => {
|
|
81
|
+
if (t.disabled) {
|
|
82
|
+
n.preventDefault();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
v("click", n);
|
|
86
|
+
}, v = f;
|
|
87
|
+
return (n, S) => (a(), l(y(r.value), {
|
|
88
|
+
href: r.value === "a" ? e.href : void 0,
|
|
89
|
+
to: r.value === "router-link" ? e.to : void 0,
|
|
90
|
+
target: e.external ? "_blank" : e.target,
|
|
91
|
+
rel: e.external ? "noopener noreferrer" : e.rel,
|
|
92
|
+
class: i(d(b)(d(m)({ variant: e.variant, size: e.size, underline: e.underline, block: e.block, disabled: e.disabled }), n.$attrs.class)),
|
|
93
|
+
onClick: x
|
|
94
|
+
}, {
|
|
95
|
+
default: g(() => [
|
|
96
|
+
e.icon && e.iconPosition === "left" ? (a(), l(s, {
|
|
97
|
+
key: 0,
|
|
98
|
+
name: e.icon,
|
|
99
|
+
class: i(u.value)
|
|
100
|
+
}, null, 8, ["name", "class"])) : o("", !0),
|
|
101
|
+
h(n.$slots, "default"),
|
|
102
|
+
e.icon && e.iconPosition === "right" ? (a(), l(s, {
|
|
103
|
+
key: 1,
|
|
104
|
+
name: e.icon,
|
|
105
|
+
class: i(u.value)
|
|
106
|
+
}, null, 8, ["name", "class"])) : o("", !0),
|
|
107
|
+
e.external && e.showExternalIcon ? (a(), l(s, {
|
|
108
|
+
key: 2,
|
|
109
|
+
name: "external-link",
|
|
110
|
+
class: "w-3 h-3 ml-1 inline-block"
|
|
111
|
+
})) : o("", !0)
|
|
112
|
+
]),
|
|
113
|
+
_: 3
|
|
114
|
+
}, 8, ["href", "to", "target", "rel", "class"]));
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
export {
|
|
118
|
+
P as default
|
|
119
|
+
};
|
|
@@ -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"),i=require("../utils/cn.cjs"),v=require("./Icon.cjs"),k=["role"],f={key:0,class:"shrink-0"},h={class:"flex-1 min-w-0"},B={key:0,class:"text-sm font-medium ui-text"},C={key:1,class:"text-sm text-muted-foreground"},S={key:1,class:"shrink-0"},g={__name:"ListItem",props:{title:String,description:String,icon:String,href:String,role:String,variant:{type:String,default:"default",validator:t=>["default","interactive"].includes(t)}},emits:["click"],setup(t,{emit:a}){const o=t,s=a,r=c.cva("",{variants:{variant:{default:"",interactive:"hover:bg-(--ui-surface) cursor-pointer"}}}),l=c.cva("flex items-center space-x-3 p-3",{variants:{variant:{default:"",interactive:"transition-colors rounded-md"}}}),d=e.computed(()=>i.cn(r({variant:o.variant}))),u=e.computed(()=>i.cn(l({variant:o.variant}))),m=n=>{s("click",n)};return(n,y)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(d.value),role:t.role},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.href?"a":"div"),{href:t.href,class:e.normalizeClass(u.value),onClick:m},{default:e.withCtx(()=>[n.$slots.icon||t.icon?(e.openBlock(),e.createElementBlock("div",f,[e.renderSlot(n.$slots,"icon",{},()=>[t.icon?(e.openBlock(),e.createBlock(v.default,{key:0,name:t.icon,class:"h-5 w-5"},null,8,["name"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",h,[t.title?(e.openBlock(),e.createElementBlock("div",B,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("div",C,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")]),n.$slots.action?(e.openBlock(),e.createElementBlock("div",S,[e.renderSlot(n.$slots,"action")])):e.createCommentVNode("",!0)]),_:3},8,["href","class"]))],10,k))}};exports.default=g;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { computed as r, createElementBlock as n, openBlock as i, normalizeClass as c, createBlock as l, resolveDynamicComponent as S, withCtx as $, createCommentVNode as s, createElementVNode as x, renderSlot as a, toDisplayString as d } from "vue";
|
|
2
|
+
import { cva as m } from "class-variance-authority";
|
|
3
|
+
import { cn as u } from "../utils/cn.js";
|
|
4
|
+
import V from "./Icon.js";
|
|
5
|
+
const w = ["role"], B = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "shrink-0"
|
|
8
|
+
}, D = { class: "flex-1 min-w-0" }, E = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "text-sm font-medium ui-text"
|
|
11
|
+
}, N = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "text-sm text-muted-foreground"
|
|
14
|
+
}, b = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "shrink-0"
|
|
17
|
+
}, q = {
|
|
18
|
+
__name: "ListItem",
|
|
19
|
+
props: {
|
|
20
|
+
title: String,
|
|
21
|
+
description: String,
|
|
22
|
+
icon: String,
|
|
23
|
+
href: String,
|
|
24
|
+
role: String,
|
|
25
|
+
variant: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "default",
|
|
28
|
+
validator: (t) => ["default", "interactive"].includes(t)
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
emits: ["click"],
|
|
32
|
+
setup(t, { emit: f }) {
|
|
33
|
+
const o = t, v = f, h = m("", {
|
|
34
|
+
variants: {
|
|
35
|
+
variant: {
|
|
36
|
+
default: "",
|
|
37
|
+
interactive: "hover:bg-(--ui-surface) cursor-pointer"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}), k = m("flex items-center space-x-3 p-3", {
|
|
41
|
+
variants: {
|
|
42
|
+
variant: {
|
|
43
|
+
default: "",
|
|
44
|
+
interactive: "transition-colors rounded-md"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}), g = r(
|
|
48
|
+
() => u(h({ variant: o.variant }))
|
|
49
|
+
), y = r(
|
|
50
|
+
() => u(k({ variant: o.variant }))
|
|
51
|
+
), C = (e) => {
|
|
52
|
+
v("click", e);
|
|
53
|
+
};
|
|
54
|
+
return (e, p) => (i(), n("li", {
|
|
55
|
+
class: c(g.value),
|
|
56
|
+
role: t.role
|
|
57
|
+
}, [
|
|
58
|
+
(i(), l(S(t.href ? "a" : "div"), {
|
|
59
|
+
href: t.href,
|
|
60
|
+
class: c(y.value),
|
|
61
|
+
onClick: C
|
|
62
|
+
}, {
|
|
63
|
+
default: $(() => [
|
|
64
|
+
e.$slots.icon || t.icon ? (i(), n("div", B, [
|
|
65
|
+
a(e.$slots, "icon", {}, () => [
|
|
66
|
+
t.icon ? (i(), l(V, {
|
|
67
|
+
key: 0,
|
|
68
|
+
name: t.icon,
|
|
69
|
+
class: "h-5 w-5"
|
|
70
|
+
}, null, 8, ["name"])) : s("", !0)
|
|
71
|
+
])
|
|
72
|
+
])) : s("", !0),
|
|
73
|
+
x("div", D, [
|
|
74
|
+
t.title ? (i(), n("div", E, d(t.title), 1)) : s("", !0),
|
|
75
|
+
t.description ? (i(), n("div", N, d(t.description), 1)) : s("", !0),
|
|
76
|
+
a(e.$slots, "default")
|
|
77
|
+
]),
|
|
78
|
+
e.$slots.action ? (i(), n("div", b, [
|
|
79
|
+
a(e.$slots, "action")
|
|
80
|
+
])) : s("", !0)
|
|
81
|
+
]),
|
|
82
|
+
_: 3
|
|
83
|
+
}, 8, ["href", "class"]))
|
|
84
|
+
], 10, w));
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
export {
|
|
88
|
+
q as default
|
|
89
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../_plugin-vue_export-helper-BHFhmbuH.cjs"),d={key:0,class:"loader__backdrop"},i={class:"loader__container"},s={key:0,class:"loader__text loader__text--top"},u={key:1,class:"loader__spin"},m={key:2,class:"loader__pulse"},y={key:3,class:"loader__bounce"},k={key:4,class:"loader__ripple"},v={key:5,class:"loader__bars"},B={key:6,class:"loader__dots"},p={key:7,class:"loader__ring"},b={key:8,class:"loader__spinner-text"},f={key:9,class:"loader__text loader__text--bottom"},g={__name:"Loader",props:{loading:{type:Boolean,default:!0},type:{type:String,default:"spin",validator:t=>["spin","pulse","bounce","ripple","bars","dots","ring","spinner-text"].includes(t)},size:{type:String,default:"medium",validator:t=>["small","medium","large","xl","2xl","3xl"].includes(t)},color:{type:String,default:"var(--ui-primary)"},backgroundColor:{type:String,default:"color-mix(in oklab, var(--ui-surface), transparent 8%)"},blur:{type:[Number,String],default:0},text:{type:String,default:""},textPosition:{type:String,default:"bottom",validator:t=>["top","bottom"].includes(t)},overlay:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},setup(t){const o=t,a=e.computed(()=>{if(o.blur===null||o.blur===void 0||o.blur==="")return"0px";if(typeof o.blur=="number")return`${o.blur}px`;const n=o.blur.trim();return n?/^-?\d*\.?\d+$/.test(n)?`${n}px`:n:"0px"});return(n,r)=>t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["loader",`loader--${t.type}`,`loader--${t.size}`,t.overlay&&!t.fullscreen?"loader--overlay":"",t.fullscreen?"loader--fullscreen":""]),style:e.normalizeStyle({"--loader-color":t.color,"--loader-bg":t.backgroundColor,"--loader-blur":a.value})},[t.overlay||t.fullscreen?(e.openBlock(),e.createElementBlock("div",d)):e.createCommentVNode("",!0),e.createElementVNode("div",i,[t.text&&t.textPosition==="top"?(e.openBlock(),e.createElementBlock("div",s,e.toDisplayString(t.text),1)):e.createCommentVNode("",!0),t.type==="spin"?(e.openBlock(),e.createElementBlock("div",u)):t.type==="pulse"?(e.openBlock(),e.createElementBlock("div",m)):t.type==="bounce"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,l=>e.createElementVNode("div",{key:l,class:"loader__bounce-dot",style:e.normalizeStyle({animationDelay:`${(l-1)*.1}s`})},null,4)),64))])):t.type==="ripple"?(e.openBlock(),e.createElementBlock("div",k,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(2,l=>e.createElementVNode("div",{key:l,class:"loader__ripple-ring",style:e.normalizeStyle({animationDelay:`${(l-1)*.5}s`})},null,4)),64))])):t.type==="bars"?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,l=>e.createElementVNode("div",{key:l,class:"loader__bar",style:e.normalizeStyle({animationDelay:`${(l-1)*.1}s`})},null,4)),64))])):t.type==="dots"?(e.openBlock(),e.createElementBlock("div",B,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,l=>e.createElementVNode("div",{key:l,class:"loader__dot",style:e.normalizeStyle({animationDelay:`${(l-1)*.16}s`})},null,4)),64))])):t.type==="ring"?(e.openBlock(),e.createElementBlock("div",p,[...r[0]||(r[0]=[e.createElementVNode("div",{class:"loader__ring-track"},null,-1),e.createElementVNode("div",{class:"loader__ring-fill"},null,-1)])])):t.type==="spinner-text"?(e.openBlock(),e.createElementBlock("div",b,[...r[1]||(r[1]=[e.createElementVNode("div",{class:"loader__spinner"},null,-1)])])):e.createCommentVNode("",!0),t.text&&t.textPosition==="bottom"?(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.text),1)):e.createCommentVNode("",!0)])],6)):e.createCommentVNode("",!0)}},_=c._export_sfc(g,[["__scopeId","data-v-4cf22c8b"]]);exports.default=_;
|