@gspa/ui 0.1.4 → 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 +17 -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/components/AccordionItem.cjs +1 -1
- package/dist/components/AccordionItem.js +5 -5
- package/dist/components/Alert.cjs +1 -1
- package/dist/components/Alert.js +71 -66
- package/dist/components/Button.cjs +1 -1
- package/dist/components/Button.js +2 -188
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.js +1 -1
- package/dist/components/DataTableFilters.cjs +1 -1
- package/dist/components/DataTableFilters.js +19 -19
- package/dist/components/DataTableToolBar.cjs +1 -1
- package/dist/components/DataTableToolBar.js +1 -1
- package/dist/components/FormField.cjs +1 -1
- package/dist/components/FormField.js +2 -188
- package/dist/components/GraphFilters.cjs +1 -1
- package/dist/components/GraphFilters.js +29 -29
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/Icon.js +23 -16
- package/dist/components/Input.cjs +1 -1
- package/dist/components/Input.js +2 -164
- package/dist/components/ReusableForm.cjs +1 -1
- package/dist/components/ReusableForm.js +187 -158
- package/dist/components/ThemeConfigurator.cjs +1 -1
- package/dist/components/ThemeConfigurator.js +51 -28
- package/dist/gspa-ui.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +123 -117
- package/dist/layouts/AuthLayout.cjs +1 -1
- package/dist/layouts/AuthLayout.js +110 -112
- 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 -1
- package/dist/lib/theme.js +73 -63
- 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/package.json +10 -3
- 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
package/dist/Loader.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.loader[data-v-4cf22c8b]{position:relative;width:100%;display:flex;justify-content:center;align-items:center}.loader--overlay[data-v-4cf22c8b]{position:absolute;inset:0;z-index:20;display:grid;place-items:center;box-sizing:border-box;padding:16px}.loader--fullscreen[data-v-4cf22c8b]{position:fixed;inset:0;z-index:9999;width:100%;height:100dvh;min-height:100vh;min-height:100svh;display:grid;place-items:center;box-sizing:border-box;overflow:hidden;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.loader__backdrop[data-v-4cf22c8b]{position:absolute;inset:0;background-color:var(--loader-bg);backdrop-filter:blur(var(--loader-blur));-webkit-backdrop-filter:blur(var(--loader-blur))}.loader__container[data-v-4cf22c8b]{position:relative;z-index:1;width:100%;max-width:min(360px,calc(100vw - 32px));max-width:min(360px,calc(100dvw - 32px));max-width:min(360px,calc(100svw - 32px));max-height:calc(100dvh - 32px);max-height:calc(100svh - 32px);overflow:auto;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:12px}.loader__text[data-v-4cf22c8b]{font-size:14px;color:var(--ui-text);font-weight:500;text-align:center;line-height:1.4;word-break:break-word}.loader__text--top[data-v-4cf22c8b]{margin-bottom:8px}.loader__text--bottom[data-v-4cf22c8b]{margin-top:8px}.loader--small .loader__container[data-v-4cf22c8b]{gap:8px}.loader--medium .loader__container[data-v-4cf22c8b]{gap:12px}.loader--large .loader__container[data-v-4cf22c8b]{gap:16px}.loader--xl .loader__container[data-v-4cf22c8b]{gap:20px}.loader--2xl .loader__container[data-v-4cf22c8b]{gap:24px}.loader--3xl .loader__container[data-v-4cf22c8b]{gap:28px}.loader--small .loader__text[data-v-4cf22c8b]{font-size:12px}.loader--medium .loader__text[data-v-4cf22c8b]{font-size:14px}.loader--large .loader__text[data-v-4cf22c8b]{font-size:16px}.loader--xl .loader__text[data-v-4cf22c8b]{font-size:18px}.loader--2xl .loader__text[data-v-4cf22c8b]{font-size:20px}.loader--3xl .loader__text[data-v-4cf22c8b]{font-size:22px}.loader__spin[data-v-4cf22c8b]{border:4px solid var(--ui-border-strong);border-top:4px solid var(--loader-color);border-radius:50%;animation:spin-4cf22c8b 1s linear infinite}.loader--small .loader__spin[data-v-4cf22c8b]{width:24px;height:24px;border-width:3px}.loader--medium .loader__spin[data-v-4cf22c8b]{width:40px;height:40px;border-width:4px}.loader--large .loader__spin[data-v-4cf22c8b]{width:56px;height:56px;border-width:5px}.loader--xl .loader__spin[data-v-4cf22c8b]{width:72px;height:72px;border-width:6px}.loader--2xl .loader__spin[data-v-4cf22c8b]{width:88px;height:88px;border-width:7px}.loader--3xl .loader__spin[data-v-4cf22c8b]{width:104px;height:104px;border-width:8px}.loader__pulse[data-v-4cf22c8b]{background-color:var(--loader-color);border-radius:50%;animation:pulse-4cf22c8b 2s cubic-bezier(.4,0,.6,1) infinite}.loader--small .loader__pulse[data-v-4cf22c8b]{width:24px;height:24px}.loader--medium .loader__pulse[data-v-4cf22c8b]{width:40px;height:40px}.loader--large .loader__pulse[data-v-4cf22c8b]{width:56px;height:56px}.loader--xl .loader__pulse[data-v-4cf22c8b]{width:72px;height:72px}.loader--2xl .loader__pulse[data-v-4cf22c8b]{width:88px;height:88px}.loader--3xl .loader__pulse[data-v-4cf22c8b]{width:104px;height:104px}.loader__bounce[data-v-4cf22c8b]{display:flex;gap:4px;align-items:flex-end}.loader__bounce-dot[data-v-4cf22c8b]{background-color:var(--loader-color);border-radius:50%;animation:bounce-4cf22c8b 1.4s ease-in-out infinite both}.loader--small .loader__bounce-dot[data-v-4cf22c8b]{width:8px;height:8px}.loader--medium .loader__bounce-dot[data-v-4cf22c8b]{width:12px;height:12px}.loader--large .loader__bounce-dot[data-v-4cf22c8b]{width:16px;height:16px}.loader--xl .loader__bounce-dot[data-v-4cf22c8b]{width:20px;height:20px}.loader--2xl .loader__bounce-dot[data-v-4cf22c8b]{width:24px;height:24px}.loader--3xl .loader__bounce-dot[data-v-4cf22c8b]{width:28px;height:28px}.loader__ripple[data-v-4cf22c8b]{position:relative}.loader__ripple-ring[data-v-4cf22c8b]{position:absolute;border:4px solid var(--loader-color);border-radius:50%;animation:ripple-4cf22c8b 1s linear infinite;top:50%;left:50%;transform:translate(-50%,-50%)}.loader--small .loader__ripple[data-v-4cf22c8b]{width:40px;height:40px}.loader--medium .loader__ripple[data-v-4cf22c8b]{width:60px;height:60px}.loader--large .loader__ripple[data-v-4cf22c8b]{width:80px;height:80px}.loader--xl .loader__ripple[data-v-4cf22c8b]{width:100px;height:100px}.loader--2xl .loader__ripple[data-v-4cf22c8b]{width:120px;height:120px}.loader--3xl .loader__ripple[data-v-4cf22c8b]{width:140px;height:140px}.loader--small .loader__ripple-ring[data-v-4cf22c8b]{width:40px;height:40px;border-width:2px}.loader--medium .loader__ripple-ring[data-v-4cf22c8b]{width:60px;height:60px;border-width:3px}.loader--large .loader__ripple-ring[data-v-4cf22c8b]{width:80px;height:80px;border-width:4px}.loader--xl .loader__ripple-ring[data-v-4cf22c8b]{width:100px;height:100px;border-width:5px}.loader--2xl .loader__ripple-ring[data-v-4cf22c8b]{width:120px;height:120px;border-width:6px}.loader--3xl .loader__ripple-ring[data-v-4cf22c8b]{width:140px;height:140px;border-width:7px}.loader__bars[data-v-4cf22c8b]{display:flex;gap:3px;align-items:flex-end}.loader__bar[data-v-4cf22c8b]{background-color:var(--loader-color);border-radius:2px;animation:bar-scale-4cf22c8b 1s ease-in-out infinite}.loader--small .loader__bar[data-v-4cf22c8b]{width:3px;height:16px}.loader--medium .loader__bar[data-v-4cf22c8b]{width:4px;height:24px}.loader--large .loader__bar[data-v-4cf22c8b]{width:5px;height:32px}.loader--xl .loader__bar[data-v-4cf22c8b]{width:6px;height:40px}.loader--2xl .loader__bar[data-v-4cf22c8b]{width:7px;height:48px}.loader--3xl .loader__bar[data-v-4cf22c8b]{width:8px;height:56px}.loader__dots[data-v-4cf22c8b]{display:flex;gap:6px}.loader__dot[data-v-4cf22c8b]{background-color:var(--loader-color);border-radius:50%;animation:dot-bounce-4cf22c8b 1.4s ease-in-out infinite both}.loader--small .loader__dot[data-v-4cf22c8b]{width:8px;height:8px}.loader--medium .loader__dot[data-v-4cf22c8b]{width:12px;height:12px}.loader--large .loader__dot[data-v-4cf22c8b]{width:16px;height:16px}.loader--xl .loader__dot[data-v-4cf22c8b]{width:20px;height:20px}.loader--2xl .loader__dot[data-v-4cf22c8b]{width:24px;height:24px}.loader--3xl .loader__dot[data-v-4cf22c8b]{width:28px;height:28px}.loader__ring[data-v-4cf22c8b]{position:relative}.loader__ring-track[data-v-4cf22c8b]{border:4px solid var(--ui-border-strong);border-radius:50%}.loader__ring-fill[data-v-4cf22c8b]{position:absolute;top:0;left:0;border:4px solid transparent;border-top:4px solid var(--loader-color);border-radius:50%;animation:spin-4cf22c8b 1s linear infinite}.loader--small .loader__ring-track[data-v-4cf22c8b],.loader--small .loader__ring-fill[data-v-4cf22c8b]{width:24px;height:24px;border-width:3px}.loader--medium .loader__ring-track[data-v-4cf22c8b],.loader--medium .loader__ring-fill[data-v-4cf22c8b]{width:40px;height:40px;border-width:4px}.loader--large .loader__ring-track[data-v-4cf22c8b],.loader--large .loader__ring-fill[data-v-4cf22c8b]{width:56px;height:56px;border-width:5px}.loader--xl .loader__ring-track[data-v-4cf22c8b],.loader--xl .loader__ring-fill[data-v-4cf22c8b]{width:72px;height:72px;border-width:6px}.loader--2xl .loader__ring-track[data-v-4cf22c8b],.loader--2xl .loader__ring-fill[data-v-4cf22c8b]{width:88px;height:88px;border-width:7px}.loader--3xl .loader__ring-track[data-v-4cf22c8b],.loader--3xl .loader__ring-fill[data-v-4cf22c8b]{width:104px;height:104px;border-width:8px}.loader__spinner-text[data-v-4cf22c8b]{display:flex;flex-direction:column;align-items:center;gap:12px}.loader__spinner[data-v-4cf22c8b]{border:3px solid var(--ui-border-strong);border-top:3px solid var(--loader-color);border-radius:50%;animation:spin-4cf22c8b 1s linear infinite}.loader--small .loader__spinner[data-v-4cf22c8b]{width:20px;height:20px}.loader--medium .loader__spinner[data-v-4cf22c8b]{width:32px;height:32px}.loader--large .loader__spinner[data-v-4cf22c8b]{width:44px;height:44px}.loader--xl .loader__spinner[data-v-4cf22c8b]{width:56px;height:56px}.loader--2xl .loader__spinner[data-v-4cf22c8b]{width:68px;height:68px;border-width:4px}.loader--3xl .loader__spinner[data-v-4cf22c8b]{width:80px;height:80px;border-width:5px}@media (max-width: 640px){.loader__container[data-v-4cf22c8b]{max-width:min(300px,calc(100vw - 24px));max-width:min(300px,calc(100dvw - 24px));max-width:min(300px,calc(100svw - 24px));gap:10px}.loader__text[data-v-4cf22c8b]{font-size:13px;line-height:1.35}.loader--large .loader__text[data-v-4cf22c8b],.loader--xl .loader__text[data-v-4cf22c8b],.loader--2xl .loader__text[data-v-4cf22c8b],.loader--3xl .loader__text[data-v-4cf22c8b]{font-size:14px}.loader--large .loader__spin[data-v-4cf22c8b],.loader--xl .loader__spin[data-v-4cf22c8b],.loader--2xl .loader__spin[data-v-4cf22c8b],.loader--3xl .loader__spin[data-v-4cf22c8b]{width:48px;height:48px;border-width:4px}.loader--large .loader__pulse[data-v-4cf22c8b],.loader--xl .loader__pulse[data-v-4cf22c8b],.loader--2xl .loader__pulse[data-v-4cf22c8b],.loader--3xl .loader__pulse[data-v-4cf22c8b]{width:48px;height:48px}.loader--large .loader__bounce-dot[data-v-4cf22c8b],.loader--xl .loader__bounce-dot[data-v-4cf22c8b],.loader--2xl .loader__bounce-dot[data-v-4cf22c8b],.loader--3xl .loader__bounce-dot[data-v-4cf22c8b]{width:14px;height:14px}.loader--large .loader__ripple[data-v-4cf22c8b],.loader--xl .loader__ripple[data-v-4cf22c8b],.loader--2xl .loader__ripple[data-v-4cf22c8b],.loader--3xl .loader__ripple[data-v-4cf22c8b]{width:72px;height:72px}.loader--large .loader__ripple-ring[data-v-4cf22c8b],.loader--xl .loader__ripple-ring[data-v-4cf22c8b],.loader--2xl .loader__ripple-ring[data-v-4cf22c8b],.loader--3xl .loader__ripple-ring[data-v-4cf22c8b]{width:72px;height:72px;border-width:3px}.loader--large .loader__bar[data-v-4cf22c8b],.loader--xl .loader__bar[data-v-4cf22c8b],.loader--2xl .loader__bar[data-v-4cf22c8b],.loader--3xl .loader__bar[data-v-4cf22c8b]{width:4px;height:28px}.loader--large .loader__dot[data-v-4cf22c8b],.loader--xl .loader__dot[data-v-4cf22c8b],.loader--2xl .loader__dot[data-v-4cf22c8b],.loader--3xl .loader__dot[data-v-4cf22c8b]{width:14px;height:14px}.loader--large .loader__ring-track[data-v-4cf22c8b],.loader--large .loader__ring-fill[data-v-4cf22c8b],.loader--xl .loader__ring-track[data-v-4cf22c8b],.loader--xl .loader__ring-fill[data-v-4cf22c8b],.loader--2xl .loader__ring-track[data-v-4cf22c8b],.loader--2xl .loader__ring-fill[data-v-4cf22c8b],.loader--3xl .loader__ring-track[data-v-4cf22c8b],.loader--3xl .loader__ring-fill[data-v-4cf22c8b]{width:48px;height:48px;border-width:4px}.loader--large .loader__spinner[data-v-4cf22c8b],.loader--xl .loader__spinner[data-v-4cf22c8b],.loader--2xl .loader__spinner[data-v-4cf22c8b],.loader--3xl .loader__spinner[data-v-4cf22c8b]{width:40px;height:40px}.loader--large .loader__container[data-v-4cf22c8b],.loader--xl .loader__container[data-v-4cf22c8b],.loader--2xl .loader__container[data-v-4cf22c8b],.loader--3xl .loader__container[data-v-4cf22c8b]{transform:none}}@keyframes spin-4cf22c8b{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes pulse-4cf22c8b{0%,to{opacity:1}50%{opacity:.5}}@keyframes bounce-4cf22c8b{0%,80%,to{transform:scale(0);opacity:.5}40%{transform:scale(1);opacity:1}}@keyframes ripple-4cf22c8b{0%{transform:translate(-50%,-50%) scale(0);opacity:1}to{transform:translate(-50%,-50%) scale(1);opacity:0}}@keyframes bar-scale-4cf22c8b{0%,40%,to{transform:scaleY(.4)}20%{transform:scaleY(1)}}@keyframes dot-bounce-4cf22c8b{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */.reminder-config-wrapper[data-v-c46bf185]{width:100%}.overflow-y-auto[data-v-c46bf185]::-webkit-scrollbar{width:8px}.overflow-y-auto[data-v-c46bf185]::-webkit-scrollbar-track{background:#f1f5f9;border-radius:4px}.overflow-y-auto[data-v-c46bf185]::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}.overflow-y-auto[data-v-c46bf185]::-webkit-scrollbar-thumb:hover{background:#94a3b8}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.has-trailing-icon[data-v-7f79d2a2] input{padding-right:2.5rem}
|
package/dist/Sidebar.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.kv-module-sidebar[data-v-82c80c9a]{background:color-mix(in oklab,var(--module-soft, var(--ui-primary-soft)) 45%,var(--ui-background) 55%)}.kv-module-sidebar[data-v-82c80c9a] [data-submenu-dropdown]{background:color-mix(in oklab,var(--module-soft-alt, var(--ui-accent-soft)) 50%,var(--ui-surface) 50%)}
|
package/dist/Toast.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@keyframes toast-progress-8acde4d1{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.animate-toast-progress[data-v-8acde4d1]{animation:toast-progress-8acde4d1 linear forwards}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("class-variance-authority"),s=require("../utils/cn.cjs"),p=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("class-variance-authority"),s=require("../utils/cn.cjs"),p=require("../Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs"),g={__name:"AccordionItem",props:{variant:{type:String,default:"default",validator:a=>["default","bordered","filled","flush"].includes(a)},size:{type:String,default:"md",validator:a=>["sm","md","lg"].includes(a)}},setup(a){const l={render(){return e.h("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})])}},r=a,t=e.ref(!1),i=()=>t.value=!t.value,c=n.cva("",{variants:{variant:{default:"",bordered:"border ui-border-strong rounded-lg overflow-hidden",filled:"ui-surface-strong border ui-border-strong rounded-lg overflow-hidden",flush:""}}}),u=n.cva("flex items-center justify-between w-full text-left transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:ring-offset-2",{variants:{size:{sm:"p-3 text-sm",md:"p-4 text-base",lg:"p-6 text-lg"}}}),d=n.cva("overflow-hidden ui-text border-t ui-border-strong ",{variants:{size:{sm:"p-3 text-sm",md:"p-4 text-base",lg:"p-6 text-lg"}}}),v=e.computed(()=>s.cn(c({variant:r.variant}))),m=e.computed(()=>s.cn(u({size:r.size}))),f=e.computed(()=>s.cn(d({size:r.size})));return(o,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(v.value)},[e.createVNode(p._sfc_main,{class:e.normalizeClass(m.value),"aria-expanded":t.value,onClick:i},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"header",{isOpen:t.value}),e.createVNode(l,{class:e.normalizeClass(e.unref(s.cn)("w-5 h-5 transition-transform ml-2",{"rotate-180":t.value}))},null,8,["class"])]),_:3},8,["class","aria-expanded"]),e.createVNode(e.Transition,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"opacity-100 max-h-96","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"opacity-100 max-h-96","leave-to-class":"opacity-0 max-h-0"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(f.value)},[e.renderSlot(o.$slots,"content",{isOpen:t.value})],2)):e.createCommentVNode("",!0)]),_:3})],2))}};exports.default=g;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as C, computed as o, createElementBlock as d, openBlock as c, normalizeClass as a, createVNode as n, withCtx as u, renderSlot as f, unref as
|
|
1
|
+
import { ref as C, computed as o, createElementBlock as d, openBlock as c, normalizeClass as a, createVNode as n, withCtx as u, renderSlot as f, unref as _, Transition as k, createCommentVNode as z, h as m } from "vue";
|
|
2
2
|
import { cva as i } from "class-variance-authority";
|
|
3
3
|
import { cn as s } from "../utils/cn.js";
|
|
4
|
-
import V from "
|
|
4
|
+
import { _ as V } from "../Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js";
|
|
5
5
|
const I = {
|
|
6
6
|
__name: "AccordionItem",
|
|
7
7
|
props: {
|
|
@@ -78,12 +78,12 @@ const I = {
|
|
|
78
78
|
default: u(() => [
|
|
79
79
|
f(l.$slots, "header", { isOpen: e.value }),
|
|
80
80
|
n(v, {
|
|
81
|
-
class: a(
|
|
81
|
+
class: a(_(s)("w-5 h-5 transition-transform ml-2", { "rotate-180": e.value }))
|
|
82
82
|
}, null, 8, ["class"])
|
|
83
83
|
]),
|
|
84
84
|
_: 3
|
|
85
85
|
}, 8, ["class", "aria-expanded"]),
|
|
86
|
-
n(
|
|
86
|
+
n(k, {
|
|
87
87
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
88
88
|
"enter-from-class": "opacity-0 max-h-0",
|
|
89
89
|
"enter-to-class": "opacity-100 max-h-96",
|
|
@@ -97,7 +97,7 @@ const I = {
|
|
|
97
97
|
class: a(y.value)
|
|
98
98
|
}, [
|
|
99
99
|
f(l.$slots, "content", { isOpen: e.value })
|
|
100
|
-
], 2)) :
|
|
100
|
+
], 2)) : z("", !0)
|
|
101
101
|
]),
|
|
102
102
|
_: 3
|
|
103
103
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("class-variance-authority"),y=require("../utils/cn.cjs"),B=require("../Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs"),x=["aria-live"],b={class:"flex items-start gap-3"},V={key:0,class:"shrink-0 mt-0.5"},N={class:"flex-1 min-w-0"},z={key:0,class:"font-medium text-sm mb-1"},M={key:1,class:"mt-3 flex gap-2"},S=["aria-label"],E=Object.assign({inheritAttrs:!1},{__name:"Alert",props:{variant:{type:String,default:"info",validator:t=>["info","success","warning","error","default","danger"].includes(t)},title:String,message:String,dismissible:{type:Boolean,default:!1},dismissLabel:{type:String,default:"Dismiss alert"},showIcon:{type:Boolean,default:!0},actions:{type:Array,default:()=>[]},autoClose:{type:[Boolean,Number],default:!1}},emits:["dismiss","action"],setup(t,{emit:d}){const o=t,s=d,a=e.ref(!0),i=()=>{a.value=!1,s("dismiss")},m=r=>{s("action",r),r.onClick&&r.onClick()};let l;if(o.autoClose){const r=typeof o.autoClose=="number"?o.autoClose:5e3;l=setTimeout(i,r)}e.onBeforeUnmount(()=>clearTimeout(l));const c={render(){return e.h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12A9 9 0 1112 3a9 9 0 019 9z"})])}},v={render(){return e.h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2l4-4m5 2a9 9 0 11-18 0a9 9 0 0118 0z"})])}},g={render(){return e.h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M10.29 3.86L1.82 18a1.5 1.5 0 001.29 2.25h18.78a1.5 1.5 0 001.29-2.25L13.71 3.86a1.5 1.5 0 00-2.42 0z"})])}},u={render(){return e.h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0a9 9 0 0118 0z"})])}},f={render(){return e.h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})])}},h=e.computed(()=>({info:c,success:v,warning:g,error:u,default:c,danger:u})[o.variant]),k=C.cva("relative w-full rounded-lg border p-4 flex items-start gap-3 ",{variants:{variant:{default:"ui-surface ui-text ",danger:"ui-danger-soft ui-danger",info:"ui-primary-soft ui-primary",success:"ui-success-soft ui-success",warning:"ui-warning-soft ui-warning",error:"ui-danger-soft ui-danger"}},defaultVariants:{variant:"default"}}),w=e.computed(()=>["w-5 h-5",{info:"ui-primary",success:"ui-success",warning:"ui-warning",error:"ui-danger",default:"ui-text",danger:"ui-danger"}[o.variant]]),p=e.computed(()=>["shrink-0 p-1 rounded-md transition-colors duration-200",{info:"ui-primary hover:text-(--ui-primary) hover:bg-(--ui-primary-soft)",success:"ui-success hover:text-(--ui-success) hover:bg-(--ui-success-soft)",warning:"ui-warning hover:text-(--ui-warning) hover:bg-(--ui-warning-soft)",error:"ui-danger hover:text-(--ui-danger) hover:bg-(--ui-danger-soft)",default:"ui-text hover:text-(--ui-text) hover:bg-(--ui-surface)",danger:"ui-danger hover:text-(--ui-danger) hover:bg-(--ui-danger-soft)"}[o.variant]]);return(r,I)=>(e.openBlock(),e.createBlock(e.Transition,{"enter-active-class":"transition-all duration-300","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition-all duration-200","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y.cn)(e.unref(k)({variant:t.variant}),r.$attrs.class)),role:"alert","aria-live":t.variant==="error"||t.variant==="danger"?"assertive":"polite","aria-atomic":"true"},[e.createElementVNode("div",b,[t.showIcon?(e.openBlock(),e.createElementBlock("div",V,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value),{class:e.normalizeClass(w.value)},null,8,["class"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",N,[t.title?(e.openBlock(),e.createElementBlock("h4",z,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["text-sm",{"mt-0":!t.title,"mt-1":t.title}])},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.message),1)])],2),r.$slots.actions||t.actions.length>0?(e.openBlock(),e.createElementBlock("div",M,[e.renderSlot(r.$slots,"actions",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions,n=>(e.openBlock(),e.createBlock(B._sfc_main,{key:n.label,variant:n.variant||"outline",size:n.size||"sm",onClick:T=>m(n)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["variant","size","onClick"]))),128))])])):e.createCommentVNode("",!0)]),t.dismissible?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:e.normalizeClass(p.value),"aria-label":t.dismissLabel,onClick:i},[e.createVNode(f,{class:"w-4 h-4"})],10,S)):e.createCommentVNode("",!0)])],10,x)):e.createCommentVNode("",!0)]),_:3}))}});exports.default=E;
|
package/dist/components/Alert.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ref as V, computed as c, createBlock as u, openBlock as
|
|
2
|
-
import { cva as
|
|
3
|
-
import { cn as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { ref as V, onBeforeUnmount as $, computed as c, createBlock as u, openBlock as s, Transition as A, withCtx as p, createElementBlock as i, createCommentVNode as a, normalizeClass as l, unref as y, createElementVNode as d, resolveDynamicComponent as N, toDisplayString as m, renderSlot as x, createTextVNode as C, Fragment as D, renderList as E, createVNode as X, h as r } from "vue";
|
|
2
|
+
import { cva as F } from "class-variance-authority";
|
|
3
|
+
import { cn as O } from "../utils/cn.js";
|
|
4
|
+
import { _ as U } from "../Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js";
|
|
5
|
+
const q = ["aria-live"], G = { class: "flex items-start gap-3" }, H = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "shrink-0 mt-0.5"
|
|
8
|
-
},
|
|
8
|
+
}, J = { class: "flex-1 min-w-0" }, K = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "font-medium text-sm mb-1"
|
|
11
|
-
},
|
|
11
|
+
}, P = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "mt-3 flex gap-2"
|
|
14
|
-
},
|
|
14
|
+
}, Q = ["aria-label"], te = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
15
15
|
__name: "Alert",
|
|
16
16
|
props: {
|
|
17
17
|
variant: {
|
|
@@ -30,25 +30,27 @@ const O = { class: "flex items-start gap-3" }, q = {
|
|
|
30
30
|
autoClose: { type: [Boolean, Number], default: !1 }
|
|
31
31
|
},
|
|
32
32
|
emits: ["dismiss", "action"],
|
|
33
|
-
setup(e, { emit:
|
|
34
|
-
const n = e,
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
33
|
+
setup(e, { emit: b }) {
|
|
34
|
+
const n = e, v = b, f = V(!0), g = () => {
|
|
35
|
+
f.value = !1, v("dismiss");
|
|
36
|
+
}, B = (t) => {
|
|
37
|
+
v("action", t), t.onClick && t.onClick();
|
|
38
38
|
};
|
|
39
|
+
let h;
|
|
39
40
|
if (n.autoClose) {
|
|
40
41
|
const t = typeof n.autoClose == "number" ? n.autoClose : 5e3;
|
|
41
|
-
setTimeout(
|
|
42
|
+
h = setTimeout(g, t);
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
$(() => clearTimeout(h));
|
|
45
|
+
const w = {
|
|
44
46
|
render() {
|
|
45
|
-
return
|
|
47
|
+
return r("svg", {
|
|
46
48
|
xmlns: "http://www.w3.org/2000/svg",
|
|
47
49
|
fill: "none",
|
|
48
50
|
viewBox: "0 0 24 24",
|
|
49
51
|
stroke: "currentColor"
|
|
50
52
|
}, [
|
|
51
|
-
|
|
53
|
+
r("path", {
|
|
52
54
|
"stroke-linecap": "round",
|
|
53
55
|
"stroke-linejoin": "round",
|
|
54
56
|
"stroke-width": "2",
|
|
@@ -56,15 +58,15 @@ const O = { class: "flex items-start gap-3" }, q = {
|
|
|
56
58
|
})
|
|
57
59
|
]);
|
|
58
60
|
}
|
|
59
|
-
},
|
|
61
|
+
}, M = {
|
|
60
62
|
render() {
|
|
61
|
-
return
|
|
63
|
+
return r("svg", {
|
|
62
64
|
xmlns: "http://www.w3.org/2000/svg",
|
|
63
65
|
fill: "none",
|
|
64
66
|
viewBox: "0 0 24 24",
|
|
65
67
|
stroke: "currentColor"
|
|
66
68
|
}, [
|
|
67
|
-
|
|
69
|
+
r("path", {
|
|
68
70
|
"stroke-linecap": "round",
|
|
69
71
|
"stroke-linejoin": "round",
|
|
70
72
|
"stroke-width": "2",
|
|
@@ -72,15 +74,15 @@ const O = { class: "flex items-start gap-3" }, q = {
|
|
|
72
74
|
})
|
|
73
75
|
]);
|
|
74
76
|
}
|
|
75
|
-
},
|
|
77
|
+
}, z = {
|
|
76
78
|
render() {
|
|
77
|
-
return
|
|
79
|
+
return r("svg", {
|
|
78
80
|
xmlns: "http://www.w3.org/2000/svg",
|
|
79
81
|
fill: "none",
|
|
80
82
|
viewBox: "0 0 24 24",
|
|
81
83
|
stroke: "currentColor"
|
|
82
84
|
}, [
|
|
83
|
-
|
|
85
|
+
r("path", {
|
|
84
86
|
"stroke-linecap": "round",
|
|
85
87
|
"stroke-linejoin": "round",
|
|
86
88
|
"stroke-width": "2",
|
|
@@ -88,15 +90,15 @@ const O = { class: "flex items-start gap-3" }, q = {
|
|
|
88
90
|
})
|
|
89
91
|
]);
|
|
90
92
|
}
|
|
91
|
-
},
|
|
93
|
+
}, k = {
|
|
92
94
|
render() {
|
|
93
|
-
return
|
|
95
|
+
return r("svg", {
|
|
94
96
|
xmlns: "http://www.w3.org/2000/svg",
|
|
95
97
|
fill: "none",
|
|
96
98
|
viewBox: "0 0 24 24",
|
|
97
99
|
stroke: "currentColor"
|
|
98
100
|
}, [
|
|
99
|
-
|
|
101
|
+
r("path", {
|
|
100
102
|
"stroke-linecap": "round",
|
|
101
103
|
"stroke-linejoin": "round",
|
|
102
104
|
"stroke-width": "2",
|
|
@@ -104,15 +106,15 @@ const O = { class: "flex items-start gap-3" }, q = {
|
|
|
104
106
|
})
|
|
105
107
|
]);
|
|
106
108
|
}
|
|
107
|
-
},
|
|
109
|
+
}, I = {
|
|
108
110
|
render() {
|
|
109
|
-
return
|
|
111
|
+
return r("svg", {
|
|
110
112
|
xmlns: "http://www.w3.org/2000/svg",
|
|
111
113
|
fill: "none",
|
|
112
114
|
viewBox: "0 0 24 24",
|
|
113
115
|
stroke: "currentColor"
|
|
114
116
|
}, [
|
|
115
|
-
|
|
117
|
+
r("path", {
|
|
116
118
|
"stroke-linecap": "round",
|
|
117
119
|
"stroke-linejoin": "round",
|
|
118
120
|
"stroke-width": "2",
|
|
@@ -120,14 +122,14 @@ const O = { class: "flex items-start gap-3" }, q = {
|
|
|
120
122
|
})
|
|
121
123
|
]);
|
|
122
124
|
}
|
|
123
|
-
},
|
|
124
|
-
info:
|
|
125
|
-
success:
|
|
126
|
-
warning:
|
|
127
|
-
error:
|
|
128
|
-
default:
|
|
129
|
-
danger:
|
|
130
|
-
})[n.variant]),
|
|
125
|
+
}, j = c(() => ({
|
|
126
|
+
info: w,
|
|
127
|
+
success: M,
|
|
128
|
+
warning: z,
|
|
129
|
+
error: k,
|
|
130
|
+
default: w,
|
|
131
|
+
danger: k
|
|
132
|
+
})[n.variant]), L = F(
|
|
131
133
|
"relative w-full rounded-lg border p-4 flex items-start gap-3 ",
|
|
132
134
|
{
|
|
133
135
|
variants: {
|
|
@@ -142,14 +144,14 @@ const O = { class: "flex items-start gap-3" }, q = {
|
|
|
142
144
|
},
|
|
143
145
|
defaultVariants: { variant: "default" }
|
|
144
146
|
}
|
|
145
|
-
),
|
|
147
|
+
), S = c(() => ["w-5 h-5", {
|
|
146
148
|
info: "ui-primary",
|
|
147
149
|
success: "ui-success",
|
|
148
150
|
warning: "ui-warning",
|
|
149
151
|
error: "ui-danger",
|
|
150
152
|
default: "ui-text",
|
|
151
153
|
danger: "ui-danger"
|
|
152
|
-
}[n.variant]]),
|
|
154
|
+
}[n.variant]]), T = c(() => ["shrink-0 p-1 rounded-md transition-colors duration-200", {
|
|
153
155
|
info: "ui-primary hover:text-(--ui-primary) hover:bg-(--ui-primary-soft)",
|
|
154
156
|
success: "ui-success hover:text-(--ui-success) hover:bg-(--ui-success-soft)",
|
|
155
157
|
warning: "ui-warning hover:text-(--ui-warning) hover:bg-(--ui-warning-soft)",
|
|
@@ -157,7 +159,7 @@ const O = { class: "flex items-start gap-3" }, q = {
|
|
|
157
159
|
default: "ui-text hover:text-(--ui-text) hover:bg-(--ui-surface)",
|
|
158
160
|
danger: "ui-danger hover:text-(--ui-danger) hover:bg-(--ui-danger-soft)"
|
|
159
161
|
}[n.variant]]);
|
|
160
|
-
return (t,
|
|
162
|
+
return (t, R) => (s(), u(A, {
|
|
161
163
|
"enter-active-class": "transition-all duration-300",
|
|
162
164
|
"enter-from-class": "opacity-0 scale-95",
|
|
163
165
|
"enter-to-class": "opacity-100 scale-100",
|
|
@@ -165,58 +167,61 @@ const O = { class: "flex items-start gap-3" }, q = {
|
|
|
165
167
|
"leave-from-class": "opacity-100 scale-100",
|
|
166
168
|
"leave-to-class": "opacity-0 scale-95"
|
|
167
169
|
}, {
|
|
168
|
-
default:
|
|
169
|
-
|
|
170
|
+
default: p(() => [
|
|
171
|
+
f.value ? (s(), i("div", {
|
|
170
172
|
key: 0,
|
|
171
|
-
class: l(
|
|
172
|
-
role: "alert"
|
|
173
|
+
class: l(y(O)(y(L)({ variant: e.variant }), t.$attrs.class)),
|
|
174
|
+
role: "alert",
|
|
175
|
+
"aria-live": e.variant === "error" || e.variant === "danger" ? "assertive" : "polite",
|
|
176
|
+
"aria-atomic": "true"
|
|
173
177
|
}, [
|
|
174
|
-
d("div",
|
|
175
|
-
e.showIcon ? (
|
|
176
|
-
(
|
|
177
|
-
class: l(
|
|
178
|
+
d("div", G, [
|
|
179
|
+
e.showIcon ? (s(), i("div", H, [
|
|
180
|
+
(s(), u(N(j.value), {
|
|
181
|
+
class: l(S.value)
|
|
178
182
|
}, null, 8, ["class"]))
|
|
179
183
|
])) : a("", !0),
|
|
180
|
-
d("div",
|
|
181
|
-
e.title ? (
|
|
184
|
+
d("div", J, [
|
|
185
|
+
e.title ? (s(), i("h4", K, m(e.title), 1)) : a("", !0),
|
|
182
186
|
d("div", {
|
|
183
187
|
class: l(["text-sm", { "mt-0": !e.title, "mt-1": e.title }])
|
|
184
188
|
}, [
|
|
185
189
|
x(t.$slots, "default", {}, () => [
|
|
186
|
-
|
|
190
|
+
C(m(e.message), 1)
|
|
187
191
|
])
|
|
188
192
|
], 2),
|
|
189
|
-
t.$slots.actions || e.actions.length > 0 ? (
|
|
193
|
+
t.$slots.actions || e.actions.length > 0 ? (s(), i("div", P, [
|
|
190
194
|
x(t.$slots, "actions", {}, () => [
|
|
191
|
-
(
|
|
192
|
-
key:
|
|
193
|
-
variant:
|
|
194
|
-
size:
|
|
195
|
-
onClick: (
|
|
195
|
+
(s(!0), i(D, null, E(e.actions, (o) => (s(), u(U, {
|
|
196
|
+
key: o.label,
|
|
197
|
+
variant: o.variant || "outline",
|
|
198
|
+
size: o.size || "sm",
|
|
199
|
+
onClick: (W) => B(o)
|
|
196
200
|
}, {
|
|
197
|
-
default:
|
|
198
|
-
|
|
201
|
+
default: p(() => [
|
|
202
|
+
C(m(o.label), 1)
|
|
199
203
|
]),
|
|
200
204
|
_: 2
|
|
201
205
|
}, 1032, ["variant", "size", "onClick"]))), 128))
|
|
202
206
|
])
|
|
203
207
|
])) : a("", !0)
|
|
204
208
|
]),
|
|
205
|
-
e.dismissible ? (
|
|
209
|
+
e.dismissible ? (s(), i("button", {
|
|
206
210
|
key: 1,
|
|
207
|
-
|
|
211
|
+
type: "button",
|
|
212
|
+
class: l(T.value),
|
|
208
213
|
"aria-label": e.dismissLabel,
|
|
209
|
-
onClick:
|
|
214
|
+
onClick: g
|
|
210
215
|
}, [
|
|
211
|
-
|
|
212
|
-
], 10,
|
|
216
|
+
X(I, { class: "w-4 h-4" })
|
|
217
|
+
], 10, Q)) : a("", !0)
|
|
213
218
|
])
|
|
214
|
-
],
|
|
219
|
+
], 10, q)) : a("", !0)
|
|
215
220
|
]),
|
|
216
221
|
_: 3
|
|
217
222
|
}));
|
|
218
223
|
}
|
|
219
224
|
});
|
|
220
225
|
export {
|
|
221
|
-
|
|
226
|
+
te as default
|
|
222
227
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs");exports.default=e._sfc_main;
|
|
@@ -1,190 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cva as S } from "class-variance-authority";
|
|
3
|
-
import { cn as O } from "../utils/cn.js";
|
|
4
|
-
import A from "./Icon.js";
|
|
5
|
-
import { AUTH_RESOLVER_KEY as C } from "../lib/auth.js";
|
|
6
|
-
const E = ["disabled", "aria-disabled", "aria-busy"], M = { key: 2 }, D = /* @__PURE__ */ Object.assign({
|
|
7
|
-
inheritAttrs: !1
|
|
8
|
-
}, {
|
|
9
|
-
__name: "Button",
|
|
10
|
-
props: {
|
|
11
|
-
variant: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: "default",
|
|
14
|
-
validator: (r) => [
|
|
15
|
-
"primary",
|
|
16
|
-
"default",
|
|
17
|
-
"danger",
|
|
18
|
-
"outline",
|
|
19
|
-
"secondary",
|
|
20
|
-
"ghost",
|
|
21
|
-
"link",
|
|
22
|
-
"success",
|
|
23
|
-
"warning",
|
|
24
|
-
"info",
|
|
25
|
-
"subtle",
|
|
26
|
-
"dark",
|
|
27
|
-
"light",
|
|
28
|
-
"primaryOutline",
|
|
29
|
-
"dangerOutline",
|
|
30
|
-
"successOutline",
|
|
31
|
-
"gradient"
|
|
32
|
-
].includes(r)
|
|
33
|
-
},
|
|
34
|
-
size: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: "default",
|
|
37
|
-
validator: (r) => ["2xs", "xs", "sm", "default", "md", "lg", "xl", "2xl", "icon-sm", "icon", "icon-lg"].includes(r)
|
|
38
|
-
},
|
|
39
|
-
disabled: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: !1
|
|
42
|
-
},
|
|
43
|
-
loading: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: !1
|
|
46
|
-
},
|
|
47
|
-
loadingText: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: null
|
|
50
|
-
},
|
|
51
|
-
icon: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: null
|
|
54
|
-
},
|
|
55
|
-
permission: {
|
|
56
|
-
type: [String, Array, Boolean, Function],
|
|
57
|
-
default: null
|
|
58
|
-
},
|
|
59
|
-
role: {
|
|
60
|
-
type: [String, Array, Boolean, Function],
|
|
61
|
-
default: null
|
|
62
|
-
},
|
|
63
|
-
requireAll: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default: !1
|
|
66
|
-
},
|
|
67
|
-
unauthorized: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: "show",
|
|
70
|
-
validator: (r) => ["show", "hide", "disable"].includes(r)
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
setup(r) {
|
|
74
|
-
const o = r, d = x(C, null), u = (e) => e == null ? null : typeof e == "boolean" ? e : typeof e == "function" ? !!e() : e, l = i(() => {
|
|
75
|
-
const e = u(o.permission), t = u(o.role);
|
|
76
|
-
return e === null && t === null ? !0 : (e === null || typeof e == "boolean") && (t === null || typeof t == "boolean") ? (e ?? !0) && (t ?? !0) : typeof d == "function" ? !!d({
|
|
77
|
-
permission: e,
|
|
78
|
-
role: t,
|
|
79
|
-
requireAll: o.requireAll
|
|
80
|
-
}) : !0;
|
|
81
|
-
}), b = i(() => o.unauthorized === "hide" && !l.value), f = i(() => o.unauthorized === "disable" && !l.value), c = i(() => o.disabled || o.loading || f.value), p = S(
|
|
82
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium transition-[color,background-color,border-color,box-shadow,transform] duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-primary) focus-visible:ring-offset-2 active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50",
|
|
83
|
-
{
|
|
84
|
-
variants: {
|
|
85
|
-
variant: {
|
|
86
|
-
primary: "ui-primary-bg shadow-sm hover:bg-(--ui-primary-strong) hover:shadow-md",
|
|
87
|
-
default: "ui-primary-bg shadow-sm hover:bg-(--ui-primary-strong) hover:shadow-md",
|
|
88
|
-
danger: "ui-danger-bg shadow-sm hover:bg-(--ui-danger-strong) hover:shadow-md",
|
|
89
|
-
outline: "border ui-border-strong ui-surface ui-text hover:bg-(--ui-surface-soft) hover:border-(--ui-primary) hover:text-(--ui-primary)",
|
|
90
|
-
secondary: "border ui-border ui-surface-muted ui-text hover:bg-(--ui-surface-soft) hover:shadow-sm",
|
|
91
|
-
ghost: "bg-transparent ui-text-muted hover:bg-[color:color-mix(in oklab, var(--ui-accent-soft), transparent 40%)] hover:text-(--ui-text)",
|
|
92
|
-
link: "ui-primary underline-offset-4 hover:underline hover:text-(--ui-primary-strong)",
|
|
93
|
-
success: "ui-success-bg shadow-sm hover:bg-(--ui-success-strong) hover:shadow-md",
|
|
94
|
-
warning: "ui-warning-bg shadow-sm hover:bg-(--ui-warning-strong) hover:shadow-md",
|
|
95
|
-
info: "border border-blue-600 bg-blue-600 text-white shadow-sm hover:bg-blue-700 hover:shadow-md dark:border-blue-500 dark:bg-blue-500 dark:text-white dark:hover:bg-blue-400",
|
|
96
|
-
subtle: "border ui-border ui-surface ui-text-muted hover:text-(--ui-text) hover:bg-(--ui-surface-soft)",
|
|
97
|
-
dark: "border border-zinc-900 bg-zinc-900 text-white shadow-sm hover:bg-black hover:shadow-md dark:border-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-white",
|
|
98
|
-
light: "border border-zinc-200 bg-white text-zinc-900 shadow-sm hover:bg-zinc-50 hover:shadow-md dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",
|
|
99
|
-
primaryOutline: "border border-(--ui-primary) ui-primary bg-transparent hover:bg-(--ui-primary-soft) hover:border-(--ui-primary-strong) hover:text-(--ui-primary-strong)",
|
|
100
|
-
dangerOutline: "border border-(--ui-danger) ui-danger bg-transparent hover:bg-(--ui-danger-soft) hover:border-(--ui-danger-strong) hover:text-(--ui-danger-strong)",
|
|
101
|
-
successOutline: "border border-(--ui-success) ui-success bg-transparent hover:bg-(--ui-success-soft) hover:border-(--ui-success-strong) hover:text-(--ui-success-strong)",
|
|
102
|
-
gradient: "bg-linear-to-r from-(--ui-primary) to-(--ui-accent) ui-text-inverse shadow-sm hover:from-(--ui-primary-strong) hover:to-(--ui-accent-strong) hover:shadow-md"
|
|
103
|
-
},
|
|
104
|
-
size: {
|
|
105
|
-
"2xs": "h-4 px-1 py-3 text-md rounded",
|
|
106
|
-
xs: "h-7 px-2.5 py-1 text-xs rounded-md",
|
|
107
|
-
sm: "h-8 px-3 py-1.5 text-sm rounded-md",
|
|
108
|
-
default: "h-9 px-4 py-2 text-sm rounded-md",
|
|
109
|
-
md: "h-10 px-4 py-2 text-sm rounded-md",
|
|
110
|
-
lg: "h-11 px-6 py-2.5 text-base rounded-md",
|
|
111
|
-
xl: "h-12 px-8 py-3 text-base rounded-lg",
|
|
112
|
-
"2xl": "h-14 px-10 py-3.5 text-lg rounded-lg",
|
|
113
|
-
"icon-sm": "h-8 w-8 p-0",
|
|
114
|
-
icon: "h-10 w-10 p-0",
|
|
115
|
-
"icon-lg": "h-12 w-12 p-0"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
defaultVariants: {
|
|
119
|
-
variant: "default",
|
|
120
|
-
size: "default"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
), v = i(() => ({
|
|
124
|
-
"2xs": "h-3 w-3",
|
|
125
|
-
xs: "h-3.5 w-3.5",
|
|
126
|
-
sm: "h-4 w-4",
|
|
127
|
-
default: "h-4 w-4",
|
|
128
|
-
md: "h-4 w-4",
|
|
129
|
-
lg: "h-5 w-5",
|
|
130
|
-
xl: "h-5 w-5",
|
|
131
|
-
"2xl": "h-6 w-6",
|
|
132
|
-
"icon-sm": "h-4 w-4",
|
|
133
|
-
icon: "h-5 w-5",
|
|
134
|
-
"icon-lg": "h-6 w-6"
|
|
135
|
-
})[o.size] || "h-4 w-4"), w = i(() => ({
|
|
136
|
-
"2xs": "h-3 w-3",
|
|
137
|
-
xs: "h-3.5 w-3.5",
|
|
138
|
-
sm: "h-4 w-4",
|
|
139
|
-
default: "h-4 w-4",
|
|
140
|
-
md: "h-4 w-4",
|
|
141
|
-
lg: "h-5 w-5",
|
|
142
|
-
xl: "h-5 w-5",
|
|
143
|
-
"2xl": "h-6 w-6",
|
|
144
|
-
"icon-sm": "h-4 w-4",
|
|
145
|
-
icon: "h-5 w-5",
|
|
146
|
-
"icon-lg": "h-6 w-6"
|
|
147
|
-
})[o.size] || "h-4 w-4");
|
|
148
|
-
return (e, t) => b.value ? a("", !0) : (n(), s("button", y({
|
|
149
|
-
key: 0,
|
|
150
|
-
class: h(O)(h(p)({ variant: r.variant, size: r.size }), e.$attrs.class),
|
|
151
|
-
disabled: c.value,
|
|
152
|
-
"aria-disabled": c.value,
|
|
153
|
-
"aria-busy": r.loading
|
|
154
|
-
}, e.$attrs), [
|
|
155
|
-
r.loading ? (n(), s("svg", {
|
|
156
|
-
key: 0,
|
|
157
|
-
class: g([w.value, "animate-spin mr-2 text-current"]),
|
|
158
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
159
|
-
fill: "none",
|
|
160
|
-
viewBox: "0 0 24 24"
|
|
161
|
-
}, [...t[0] || (t[0] = [
|
|
162
|
-
m("circle", {
|
|
163
|
-
class: "opacity-25",
|
|
164
|
-
cx: "12",
|
|
165
|
-
cy: "12",
|
|
166
|
-
r: "10",
|
|
167
|
-
stroke: "currentColor",
|
|
168
|
-
"stroke-width": "4"
|
|
169
|
-
}, null, -1),
|
|
170
|
-
m("path", {
|
|
171
|
-
class: "opacity-75",
|
|
172
|
-
fill: "none",
|
|
173
|
-
stroke: "currentColor",
|
|
174
|
-
"stroke-linecap": "round",
|
|
175
|
-
"stroke-width": "4",
|
|
176
|
-
d: "M4 12a8 8 0 018-8"
|
|
177
|
-
}, null, -1)
|
|
178
|
-
])], 2)) : a("", !0),
|
|
179
|
-
r.icon && !r.loading ? (n(), z(A, {
|
|
180
|
-
key: 1,
|
|
181
|
-
icon: r.icon,
|
|
182
|
-
class: g(v.value)
|
|
183
|
-
}, null, 8, ["icon", "class"])) : a("", !0),
|
|
184
|
-
r.loading && r.loadingText ? (n(), s("span", M, B(r.loadingText), 1)) : k(e.$slots, "default", { key: 3 })
|
|
185
|
-
], 16, E));
|
|
186
|
-
}
|
|
187
|
-
});
|
|
1
|
+
import { _ as f } from "../Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js";
|
|
188
2
|
export {
|
|
189
|
-
|
|
3
|
+
f as default
|
|
190
4
|
};
|