@groupteknology/vuno 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +12 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +59 -13
- package/dist/runtime/app/assets/css/dialog.css +1 -0
- package/dist/runtime/app/assets/css/main.css +1 -0
- package/dist/runtime/app/assets/css/theme.css +1 -0
- package/dist/runtime/app/assets/css/tokens.css +1 -0
- package/dist/runtime/app/components/actions/Avatar.d.vue.ts +23 -0
- package/dist/runtime/app/components/actions/Avatar.vue +49 -0
- package/dist/runtime/app/components/actions/Avatar.vue.d.ts +23 -0
- package/dist/runtime/app/components/actions/Badge.d.vue.ts +36 -0
- package/dist/runtime/app/components/actions/Badge.vue +25 -0
- package/dist/runtime/app/components/actions/Badge.vue.d.ts +36 -0
- package/dist/runtime/app/components/actions/Button.d.vue.ts +45 -0
- package/dist/runtime/app/components/actions/Button.vue +71 -0
- package/dist/runtime/app/components/actions/Button.vue.d.ts +45 -0
- package/dist/runtime/app/components/actions/Icon.d.vue.ts +6 -0
- package/dist/runtime/app/components/actions/Icon.vue +32 -0
- package/dist/runtime/app/components/actions/Icon.vue.d.ts +6 -0
- package/dist/runtime/app/components/actions/Menu.d.vue.ts +34 -0
- package/dist/runtime/app/components/actions/Menu.vue +189 -0
- package/dist/runtime/app/components/actions/Menu.vue.d.ts +34 -0
- package/dist/runtime/app/components/actions/Tooltip.d.vue.ts +40 -0
- package/dist/runtime/app/components/actions/Tooltip.vue +152 -0
- package/dist/runtime/app/components/actions/Tooltip.vue.d.ts +40 -0
- package/dist/runtime/app/components/forms/Checkbox.d.vue.ts +35 -0
- package/dist/runtime/app/components/forms/Checkbox.vue +37 -0
- package/dist/runtime/app/components/forms/Checkbox.vue.d.ts +35 -0
- package/dist/runtime/app/components/forms/ControlShell.d.vue.ts +37 -0
- package/dist/runtime/app/components/forms/ControlShell.vue +19 -0
- package/dist/runtime/app/components/forms/ControlShell.vue.d.ts +37 -0
- package/dist/runtime/app/components/forms/FileUpload.d.vue.ts +61 -0
- package/dist/runtime/app/components/forms/FileUpload.vue +186 -0
- package/dist/runtime/app/components/forms/FileUpload.vue.d.ts +61 -0
- package/dist/runtime/app/components/forms/Form.d.vue.ts +53 -0
- package/dist/runtime/app/components/forms/Form.vue +128 -0
- package/dist/runtime/app/components/forms/Form.vue.d.ts +53 -0
- package/dist/runtime/app/components/forms/FormField.d.vue.ts +32 -0
- package/dist/runtime/app/components/forms/FormField.vue +105 -0
- package/dist/runtime/app/components/forms/FormField.vue.d.ts +32 -0
- package/dist/runtime/app/components/forms/FormFieldRenderer.d.vue.ts +7 -0
- package/dist/runtime/app/components/forms/FormFieldRenderer.vue +88 -0
- package/dist/runtime/app/components/forms/FormFieldRenderer.vue.d.ts +7 -0
- package/dist/runtime/app/components/forms/FormModal.d.vue.ts +61 -0
- package/dist/runtime/app/components/forms/FormModal.vue +92 -0
- package/dist/runtime/app/components/forms/FormModal.vue.d.ts +61 -0
- package/dist/runtime/app/components/forms/FormSection.d.vue.ts +12 -0
- package/dist/runtime/app/components/forms/FormSection.vue +43 -0
- package/dist/runtime/app/components/forms/FormSection.vue.d.ts +12 -0
- package/dist/runtime/app/components/forms/Input.d.vue.ts +47 -0
- package/dist/runtime/app/components/forms/Input.vue +64 -0
- package/dist/runtime/app/components/forms/Input.vue.d.ts +47 -0
- package/dist/runtime/app/components/forms/NumberInput.d.vue.ts +30 -0
- package/dist/runtime/app/components/forms/NumberInput.vue +160 -0
- package/dist/runtime/app/components/forms/NumberInput.vue.d.ts +30 -0
- package/dist/runtime/app/components/forms/RadioGroup.d.vue.ts +30 -0
- package/dist/runtime/app/components/forms/RadioGroup.vue +77 -0
- package/dist/runtime/app/components/forms/RadioGroup.vue.d.ts +30 -0
- package/dist/runtime/app/components/forms/Select.d.vue.ts +61 -0
- package/dist/runtime/app/components/forms/Select.vue +336 -0
- package/dist/runtime/app/components/forms/Select.vue.d.ts +61 -0
- package/dist/runtime/app/components/forms/Switch.d.vue.ts +21 -0
- package/dist/runtime/app/components/forms/Switch.vue +44 -0
- package/dist/runtime/app/components/forms/Switch.vue.d.ts +21 -0
- package/dist/runtime/app/components/forms/Textarea.d.vue.ts +29 -0
- package/dist/runtime/app/components/forms/Textarea.vue +41 -0
- package/dist/runtime/app/components/forms/Textarea.vue.d.ts +29 -0
- package/dist/runtime/app/components/forms/fields/FieldArray.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldArray.vue +129 -0
- package/dist/runtime/app/components/forms/fields/FieldArray.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldCheckbox.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldCheckbox.vue +31 -0
- package/dist/runtime/app/components/forms/fields/FieldCheckbox.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldColor.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldColor.vue +81 -0
- package/dist/runtime/app/components/forms/fields/FieldColor.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldEmail.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldEmail.vue +38 -0
- package/dist/runtime/app/components/forms/fields/FieldEmail.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldFile.d.vue.ts +18 -0
- package/dist/runtime/app/components/forms/fields/FieldFile.vue +91 -0
- package/dist/runtime/app/components/forms/fields/FieldFile.vue.d.ts +18 -0
- package/dist/runtime/app/components/forms/fields/FieldNumber.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldNumber.vue +39 -0
- package/dist/runtime/app/components/forms/fields/FieldNumber.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldPassword.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldPassword.vue +36 -0
- package/dist/runtime/app/components/forms/fields/FieldPassword.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldRadio.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldRadio.vue +33 -0
- package/dist/runtime/app/components/forms/fields/FieldRadio.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldSelect.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldSelect.vue +37 -0
- package/dist/runtime/app/components/forms/fields/FieldSelect.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldSlug.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldSlug.vue +102 -0
- package/dist/runtime/app/components/forms/fields/FieldSlug.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldSwitch.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldSwitch.vue +29 -0
- package/dist/runtime/app/components/forms/fields/FieldSwitch.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldText.d.vue.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldText.vue +39 -0
- package/dist/runtime/app/components/forms/fields/FieldText.vue.d.ts +5 -0
- package/dist/runtime/app/components/forms/fields/FieldTextarea.d.vue.ts +18 -0
- package/dist/runtime/app/components/forms/fields/FieldTextarea.vue +37 -0
- package/dist/runtime/app/components/forms/fields/FieldTextarea.vue.d.ts +18 -0
- package/dist/runtime/app/components/layouts/dashboard/DashboardAside.d.vue.ts +56 -0
- package/dist/runtime/app/components/layouts/dashboard/DashboardAside.vue +96 -0
- package/dist/runtime/app/components/layouts/dashboard/DashboardAside.vue.d.ts +56 -0
- package/dist/runtime/app/components/layouts/dashboard/DashboardLayout.d.vue.ts +57 -0
- package/dist/runtime/app/components/layouts/dashboard/DashboardLayout.vue +164 -0
- package/dist/runtime/app/components/layouts/dashboard/DashboardLayout.vue.d.ts +57 -0
- package/dist/runtime/app/components/layouts/dashboard/DashboardPage.d.vue.ts +49 -0
- package/dist/runtime/app/components/layouts/dashboard/DashboardPage.vue +45 -0
- package/dist/runtime/app/components/layouts/dashboard/DashboardPage.vue.d.ts +49 -0
- package/dist/runtime/app/components/layouts/public/PublicLayout.d.vue.ts +50 -0
- package/dist/runtime/app/components/layouts/public/PublicLayout.vue +56 -0
- package/dist/runtime/app/components/layouts/public/PublicLayout.vue.d.ts +50 -0
- package/dist/runtime/app/components/overlays/App.d.vue.ts +53 -0
- package/dist/runtime/app/components/overlays/App.vue +154 -0
- package/dist/runtime/app/components/overlays/App.vue.d.ts +53 -0
- package/dist/runtime/app/components/overlays/Confirm.d.vue.ts +35 -0
- package/dist/runtime/app/components/overlays/Confirm.vue +78 -0
- package/dist/runtime/app/components/overlays/Confirm.vue.d.ts +35 -0
- package/dist/runtime/app/components/overlays/Context.d.vue.ts +3 -0
- package/dist/runtime/app/components/overlays/Context.vue +7 -0
- package/dist/runtime/app/components/overlays/Context.vue.d.ts +3 -0
- package/dist/runtime/app/components/overlays/Modal.d.vue.ts +51 -0
- package/dist/runtime/app/components/overlays/Modal.vue +158 -0
- package/dist/runtime/app/components/overlays/Modal.vue.d.ts +51 -0
- package/dist/runtime/app/components/overlays/Overlay.d.vue.ts +7 -0
- package/dist/runtime/app/components/overlays/Overlay.vue +40 -0
- package/dist/runtime/app/components/overlays/Overlay.vue.d.ts +7 -0
- package/dist/runtime/app/components/overlays/Toast.d.vue.ts +11 -0
- package/dist/runtime/app/components/overlays/Toast.vue +63 -0
- package/dist/runtime/app/components/overlays/Toast.vue.d.ts +11 -0
- package/dist/runtime/app/components/overlays/Toaster.d.vue.ts +11 -0
- package/dist/runtime/app/components/overlays/Toaster.vue +99 -0
- package/dist/runtime/app/components/overlays/Toaster.vue.d.ts +11 -0
- package/dist/runtime/app/components/structure/Card.d.vue.ts +90 -0
- package/dist/runtime/app/components/structure/Card.vue +43 -0
- package/dist/runtime/app/components/structure/Card.vue.d.ts +90 -0
- package/dist/runtime/app/components/structure/Container.d.vue.ts +42 -0
- package/dist/runtime/app/components/structure/Container.vue +19 -0
- package/dist/runtime/app/components/structure/Container.vue.d.ts +42 -0
- package/dist/runtime/app/components/structure/Navbar.d.vue.ts +49 -0
- package/dist/runtime/app/components/structure/Navbar.vue +46 -0
- package/dist/runtime/app/components/structure/Navbar.vue.d.ts +49 -0
- package/dist/runtime/app/components/structure/Navigation.d.vue.ts +14 -0
- package/dist/runtime/app/components/structure/Navigation.vue +147 -0
- package/dist/runtime/app/components/structure/Navigation.vue.d.ts +14 -0
- package/dist/runtime/app/components/structure/Page.d.vue.ts +39 -0
- package/dist/runtime/app/components/structure/Page.vue +124 -0
- package/dist/runtime/app/components/structure/Page.vue.d.ts +39 -0
- package/dist/runtime/app/components/structure/Pagination.d.vue.ts +32 -0
- package/dist/runtime/app/components/structure/Pagination.vue +127 -0
- package/dist/runtime/app/components/structure/Pagination.vue.d.ts +32 -0
- package/dist/runtime/app/components/structure/State.d.vue.ts +14 -0
- package/dist/runtime/app/components/structure/State.vue +61 -0
- package/dist/runtime/app/components/structure/State.vue.d.ts +14 -0
- package/dist/runtime/app/components/structure/Table.d.vue.ts +77 -0
- package/dist/runtime/app/components/structure/Table.vue +493 -0
- package/dist/runtime/app/components/structure/Table.vue.d.ts +77 -0
- package/dist/runtime/app/components/structure/TableCell.d.vue.ts +22 -0
- package/dist/runtime/app/components/structure/TableCell.vue +47 -0
- package/dist/runtime/app/components/structure/TableCell.vue.d.ts +22 -0
- package/dist/runtime/app/components/structure/Tabs.d.vue.ts +48 -0
- package/dist/runtime/app/components/structure/Tabs.vue +114 -0
- package/dist/runtime/app/components/structure/Tabs.vue.d.ts +48 -0
- package/dist/runtime/app/components/structure/cells/CellBadge.d.vue.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellBadge.vue +25 -0
- package/dist/runtime/app/components/structure/cells/CellBadge.vue.d.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellBoolean.d.vue.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellBoolean.vue +26 -0
- package/dist/runtime/app/components/structure/cells/CellBoolean.vue.d.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellCurrency.d.vue.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellCurrency.vue +15 -0
- package/dist/runtime/app/components/structure/cells/CellCurrency.vue.d.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellDate.d.vue.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellDate.vue +20 -0
- package/dist/runtime/app/components/structure/cells/CellDate.vue.d.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellImage.d.vue.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellImage.vue +23 -0
- package/dist/runtime/app/components/structure/cells/CellImage.vue.d.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellNumber.d.vue.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellNumber.vue +16 -0
- package/dist/runtime/app/components/structure/cells/CellNumber.vue.d.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellText.d.vue.ts +5 -0
- package/dist/runtime/app/components/structure/cells/CellText.vue +15 -0
- package/dist/runtime/app/components/structure/cells/CellText.vue.d.ts +5 -0
- package/dist/runtime/app/composables/useConfirm.d.ts +15 -0
- package/dist/runtime/app/composables/useConfirm.js +5 -0
- package/dist/runtime/app/composables/useContext.d.ts +11 -0
- package/dist/runtime/app/composables/useContext.js +9 -0
- package/dist/runtime/app/composables/useCrud.d.ts +23 -0
- package/dist/runtime/app/composables/useCrud.js +152 -0
- package/dist/runtime/app/composables/useDashboard.d.ts +14 -0
- package/dist/runtime/app/composables/useDashboard.js +9 -0
- package/dist/runtime/app/composables/useField.d.ts +10 -0
- package/dist/runtime/app/composables/useField.js +34 -0
- package/dist/runtime/app/composables/useForm.d.ts +2 -0
- package/dist/runtime/app/composables/useForm.js +9 -0
- package/dist/runtime/app/composables/useModal.d.ts +21 -0
- package/dist/runtime/app/composables/useModal.js +26 -0
- package/dist/runtime/app/composables/useOverlay.d.ts +22 -0
- package/dist/runtime/app/composables/useOverlay.js +10 -0
- package/dist/runtime/app/composables/useTableQuery.d.ts +10 -0
- package/dist/runtime/app/composables/useTableQuery.js +110 -0
- package/dist/runtime/app/composables/useTheme.d.ts +30 -0
- package/dist/runtime/app/composables/useTheme.js +27 -0
- package/dist/runtime/app/composables/useToast.d.ts +28 -0
- package/dist/runtime/app/composables/useToast.js +13 -0
- package/dist/runtime/app/internal/keys.d.ts +37 -0
- package/dist/runtime/app/internal/keys.js +5 -0
- package/dist/runtime/app/internal/slots.d.ts +19 -0
- package/dist/runtime/app/internal/slots.js +12 -0
- package/dist/runtime/app/internal/useVunoAnchor.d.ts +43 -0
- package/dist/runtime/app/internal/useVunoAnchor.js +34 -0
- package/dist/runtime/app/internal/useVunoDashboard.d.ts +15 -0
- package/dist/runtime/app/internal/useVunoDashboard.js +5 -0
- package/dist/runtime/app/internal/useVunoFormState.d.ts +41 -0
- package/dist/runtime/app/internal/useVunoFormState.js +80 -0
- package/dist/runtime/app/internal/useVunoPortal.d.ts +23 -0
- package/dist/runtime/app/internal/useVunoPortal.js +8 -0
- package/dist/runtime/app/internal/useVunoTable.d.ts +92 -0
- package/dist/runtime/app/internal/useVunoTable.js +153 -0
- package/dist/runtime/app/theme/actions.d.ts +2 -0
- package/dist/runtime/app/theme/actions.js +123 -0
- package/dist/runtime/app/theme/forms.d.ts +2 -0
- package/dist/runtime/app/theme/forms.js +442 -0
- package/dist/runtime/app/theme/icons.d.ts +2 -0
- package/dist/runtime/app/theme/icons.js +40 -0
- package/dist/runtime/app/theme/index.d.ts +14 -0
- package/dist/runtime/app/theme/index.js +14 -0
- package/dist/runtime/app/theme/layouts.d.ts +2 -0
- package/dist/runtime/app/theme/layouts.js +76 -0
- package/dist/runtime/app/theme/messages.d.ts +2 -0
- package/dist/runtime/app/theme/messages.js +63 -0
- package/dist/runtime/app/theme/overlays.d.ts +2 -0
- package/dist/runtime/app/theme/overlays.js +90 -0
- package/dist/runtime/app/theme/shared.d.ts +26 -0
- package/dist/runtime/app/theme/shared.js +10 -0
- package/dist/runtime/app/theme/structure.d.ts +2 -0
- package/dist/runtime/app/theme/structure.js +351 -0
- package/dist/runtime/app/types/app-config.d.ts +8 -0
- package/dist/runtime/app/types/app-config.js +1 -0
- package/dist/runtime/app/types/app.d.ts +83 -0
- package/dist/runtime/app/types/app.js +0 -0
- package/dist/runtime/app/types/base.d.ts +60 -0
- package/dist/runtime/app/types/base.js +0 -0
- package/dist/runtime/app/types/confirm.d.ts +19 -0
- package/dist/runtime/app/types/confirm.js +0 -0
- package/dist/runtime/app/types/crud.d.ts +108 -0
- package/dist/runtime/app/types/crud.js +0 -0
- package/dist/runtime/app/types/dashboard.d.ts +7 -0
- package/dist/runtime/app/types/dashboard.js +0 -0
- package/dist/runtime/app/types/field.d.ts +127 -0
- package/dist/runtime/app/types/field.js +0 -0
- package/dist/runtime/app/types/form.d.ts +41 -0
- package/dist/runtime/app/types/form.js +0 -0
- package/dist/runtime/app/types/index.d.ts +13 -0
- package/dist/runtime/app/types/index.js +1 -0
- package/dist/runtime/app/types/page.d.ts +53 -0
- package/dist/runtime/app/types/page.js +0 -0
- package/dist/runtime/app/types/responsive.d.ts +8 -0
- package/dist/runtime/app/types/responsive.js +0 -0
- package/dist/runtime/app/types/state.d.ts +35 -0
- package/dist/runtime/app/types/state.js +0 -0
- package/dist/runtime/app/types/table.d.ts +286 -0
- package/dist/runtime/app/types/table.js +0 -0
- package/dist/runtime/app/types/theme.d.ts +213 -0
- package/dist/runtime/app/types/theme.js +0 -0
- package/dist/runtime/app/utils/column.d.ts +9 -0
- package/dist/runtime/app/utils/column.js +5 -0
- package/dist/runtime/app/utils/format.d.ts +18 -0
- package/dist/runtime/app/utils/format.js +36 -0
- package/dist/runtime/app/utils/grid.d.ts +9 -0
- package/dist/runtime/app/utils/grid.js +91 -0
- package/dist/runtime/app/utils/number.d.ts +35 -0
- package/dist/runtime/app/utils/number.js +30 -0
- package/dist/runtime/app/utils/option.d.ts +26 -0
- package/dist/runtime/app/utils/option.js +6 -0
- package/dist/runtime/app/utils/pagination.d.ts +41 -0
- package/dist/runtime/app/utils/pagination.js +32 -0
- package/dist/runtime/app/utils/path.d.ts +16 -0
- package/dist/runtime/app/utils/path.js +74 -0
- package/dist/runtime/app/utils/query-key.d.ts +20 -0
- package/dist/runtime/app/utils/query-key.js +7 -0
- package/dist/runtime/app/utils/query.d.ts +18 -0
- package/dist/runtime/app/utils/query.js +8 -0
- package/dist/runtime/app/utils/selection.d.ts +29 -0
- package/dist/runtime/app/utils/selection.js +10 -0
- package/dist/runtime/app/utils/standard-schema.d.ts +62 -0
- package/dist/runtime/app/utils/standard-schema.js +15 -0
- package/dist/runtime/app/utils/theme.d.ts +26 -0
- package/dist/runtime/app/utils/theme.js +25 -0
- package/dist/types.d.mts +3 -11
- package/package.json +1 -1
- package/dist/module.d.cts +0 -2
package/dist/module.d.mts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import { NuxtModule } from '@nuxt/schema';
|
|
2
|
+
export * from '../dist/runtime/app/types/index.js';
|
|
3
|
+
|
|
4
|
+
interface ModuleOptions {
|
|
5
|
+
prefix?: string;
|
|
6
|
+
/** Registrar el compilador de Tailwind. Ponlo en `false` si ya lo monta el proyecto. */
|
|
7
|
+
tailwind?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const module$1: NuxtModule<ModuleOptions>;
|
|
10
|
+
|
|
11
|
+
export { module$1 as default };
|
|
12
|
+
export type { ModuleOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,18 +1,64 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addTemplate, addVitePlugin } from '@nuxt/kit';
|
|
2
|
+
import { sep } from 'node:path';
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
2
4
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const module$1 = defineNuxtModule({
|
|
6
|
+
defaults: {
|
|
7
|
+
prefix: "V",
|
|
8
|
+
tailwind: true
|
|
7
9
|
},
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
10
|
+
meta: {
|
|
11
|
+
name: "vuno",
|
|
12
|
+
configKey: "vuno"
|
|
13
|
+
},
|
|
14
|
+
moduleDependencies: {
|
|
15
|
+
/*
|
|
16
|
+
* Los iconos del módulo se pintan con el componente global `Icon`, que
|
|
17
|
+
* trae `@nuxt/icon`. Hoy llega de rebote porque lo instala Nuxt UI, y
|
|
18
|
+
* eso no basta: `Base/Icon.vue` cae en un `<span>` vacío cuando el
|
|
19
|
+
* global no está registrado —que es lo correcto— y por tanto quedarse
|
|
20
|
+
* sin él no rompe nada, solo deja la interfaz sin iconos.
|
|
21
|
+
*/
|
|
22
|
+
"@nuxt/icon": {
|
|
23
|
+
defaults: {
|
|
24
|
+
clientBundle: {
|
|
25
|
+
scan: true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
11
28
|
}
|
|
29
|
+
},
|
|
30
|
+
setup(options, nuxt) {
|
|
31
|
+
const resolver = createResolver(import.meta.url);
|
|
32
|
+
nuxt.options.alias["#vuno"] = resolver.resolve("./runtime/app");
|
|
33
|
+
addComponentsDir({
|
|
34
|
+
global: true,
|
|
35
|
+
ignore: ["forms/fields/**", "structure/cells/**", "overlays/Context.vue", "overlays/Overlay.vue", "overlays/Toast.vue", "overlays/Toaster.vue", "forms/ControlShell.vue", "forms/FormFieldRenderer.vue", "structure/TableCell.vue", "layouts/dashboard/DashboardAside.vue"],
|
|
36
|
+
path: resolver.resolve("./runtime/app/components"),
|
|
37
|
+
pathPrefix: false,
|
|
38
|
+
prefix: options.prefix
|
|
39
|
+
});
|
|
40
|
+
nuxt.hook("components:extend", (components) => {
|
|
41
|
+
for (const component of components) {
|
|
42
|
+
const path = component.filePath.split("\\").join("/");
|
|
43
|
+
if (path.includes("/components/modal/")) component.global = true;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
addImportsDir(resolver.resolve("./runtime/app/composables"));
|
|
47
|
+
addTemplate({
|
|
48
|
+
filename: "vuno.css",
|
|
49
|
+
write: true,
|
|
50
|
+
// `sep` en vez de un literal: en Windows `srcDir` llega con barras
|
|
51
|
+
// invertidas y Tailwind no las interpreta como separador; fuera de
|
|
52
|
+
// Windows la sustitución no hace nada.
|
|
53
|
+
getContents: () => `@source '${nuxt.options.srcDir.replaceAll(sep, "/")}/**/*';`
|
|
54
|
+
});
|
|
55
|
+
if (options.tailwind && !hasTailwindPlugin(nuxt.options.vite.plugins)) addVitePlugin(tailwindcss());
|
|
56
|
+
nuxt.options.css.push(resolver.resolve("./runtime/app/assets/css/main.css"));
|
|
12
57
|
}
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
58
|
+
});
|
|
59
|
+
function hasTailwindPlugin(plugins) {
|
|
60
|
+
const flat = Array.isArray(plugins) ? plugins.flat(Infinity) : [];
|
|
61
|
+
return flat.some((plugin) => typeof plugin?.name === "string" && plugin.name.startsWith("@tailwindcss/vite"));
|
|
62
|
+
}
|
|
17
63
|
|
|
18
|
-
export
|
|
64
|
+
export { module$1 as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--vuno-modal-duration:180ms;--vuno-modal-ease:cubic-bezier(0.32,0.72,0,1);--vuno-backdrop:rgba(0,0,0,.5)}dialog{opacity:0;transform:scale(.97) translateY(.5rem);transition:opacity var(--vuno-modal-duration) var(--vuno-modal-ease),transform var(--vuno-modal-duration) var(--vuno-modal-ease),display var(--vuno-modal-duration) allow-discrete,overlay var(--vuno-modal-duration) allow-discrete}dialog[open]{opacity:1;transform:scale(1) translateY(0)}@starting-style{dialog[open]{opacity:0;transform:scale(.97) translateY(.5rem)}}dialog::backdrop{background-color:transparent;transition:background-color var(--vuno-modal-duration) var(--vuno-modal-ease),display var(--vuno-modal-duration) allow-discrete,overlay var(--vuno-modal-duration) allow-discrete}dialog[open]::backdrop{background-color:var(--vuno-backdrop)}@starting-style{dialog[open]::backdrop{background-color:transparent}}dialog[data-position=end],dialog[data-position=start]{transform:translateX(var(--vuno-panel-from))}dialog[data-position=end]{--vuno-panel-from:100%}[dir=rtl] dialog[data-position=end],dialog[data-position=start]{--vuno-panel-from:-100%}[dir=rtl] dialog[data-position=start]{--vuno-panel-from:100%}dialog[data-position=end][open],dialog[data-position=start][open]{transform:translateX(0)}@starting-style{dialog[data-position=end][open],dialog[data-position=start][open]{transform:translateX(var(--vuno-panel-from))}}dialog.vuno-overlay-behind::backdrop,dialog.vuno-overlay-behind[open]::backdrop{background-color:transparent}@media (prefers-reduced-motion:reduce){dialog,dialog::backdrop{transition-duration:1ms}dialog,dialog[data-position=end],dialog[data-position=end][open],dialog[data-position=start],dialog[data-position=start][open]{transform:none}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "tailwindcss";@import "#build/vuno.css";@import "./tokens.css";@import "./theme.css";@import "./dialog.css";@source "../../**/*";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@theme inline{--color-vuno-primary:var(--vuno-primary);--color-vuno-primary-contrast:var(--vuno-primary-contrast);--color-vuno-secondary:var(--vuno-secondary);--color-vuno-secondary-contrast:var(--vuno-secondary-contrast);--color-vuno-neutral:var(--vuno-neutral);--color-vuno-neutral-contrast:var(--vuno-neutral-contrast);--color-vuno-surface:var(--vuno-surface);--color-vuno-surface-1:var(--vuno-surface-1);--color-vuno-surface-2:var(--vuno-surface-2);--color-vuno-surface-inverse:var(--vuno-surface-inverse);--color-vuno-strong:var(--vuno-text-strong);--color-vuno-body:var(--vuno-text-body);--color-vuno-muted:var(--vuno-text-muted);--color-vuno-subtle:var(--vuno-text-subtle);--color-vuno-inverse:var(--vuno-text-inverse);--font-sans:var(--vuno-font-sans);--font-mono:var(--vuno-font-mono);--color-vuno-border:var(--vuno-border);--color-vuno-border-strong:var(--vuno-border-strong);--color-vuno-success:var(--vuno-success);--color-vuno-success-contrast:var(--vuno-success-contrast);--color-vuno-info:var(--vuno-info);--color-vuno-info-contrast:var(--vuno-info-contrast);--color-vuno-warning:var(--vuno-warning);--color-vuno-warning-contrast:var(--vuno-warning-contrast);--color-vuno-error:var(--vuno-error);--color-vuno-error-contrast:var(--vuno-error-contrast);--radius-vuno:var(--vuno-radius);--radius-vuno-control:var(--vuno-radius-control)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer base{:root{color-scheme:light;--vuno-color-white:oklch(100% 0 0);--vuno-color-slate-50:oklch(98.4% 0.003 247.858);--vuno-color-slate-100:oklch(96.8% 0.007 247.896);--vuno-color-slate-200:oklch(92.9% 0.013 255.508);--vuno-color-slate-300:oklch(86.9% 0.022 252.894);--vuno-color-slate-400:oklch(70.4% 0.04 256.788);--vuno-color-slate-500:oklch(55.4% 0.046 257.417);--vuno-color-slate-600:oklch(44.6% 0.043 257.281);--vuno-color-slate-700:oklch(37.2% 0.044 257.287);--vuno-color-slate-800:oklch(27.9% 0.041 260.031);--vuno-color-slate-900:oklch(20.8% 0.042 265.755);--vuno-color-slate-950:oklch(12.9% 0.042 264.695);--vuno-color-black:oklch(0% 0 0);--vuno-color-blue-400:oklch(70.7% 0.165 254.624);--vuno-color-blue-600:oklch(54.6% 0.245 262.881);--vuno-color-violet-400:oklch(70.2% 0.183 293.541);--vuno-color-violet-600:oklch(54.1% 0.281 293.009);--vuno-color-emerald-400:oklch(76.5% 0.177 163.223);--vuno-color-emerald-700:oklch(50.8% 0.118 165.612);--vuno-color-cyan-400:oklch(78.9% 0.154 211.53);--vuno-color-cyan-700:oklch(52% 0.105 223.128);--vuno-color-red-400:oklch(70.4% 0.191 22.216);--vuno-color-red-700:oklch(50.5% 0.213 27.518);--vuno-color-amber-300:oklch(87.9% 0.169 91.605);--vuno-color-amber-400:oklch(82.8% 0.189 84.429);--dashboard-navbar-height:64px;--dashboard-aside-width:384px;--vuno-radius:0.25rem;--vuno-radius-control:0.25rem;--vuno-font-sans:"Google Sans","Google Sans Text",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;--vuno-font-mono:"Google Sans Code",ui-monospace,"Cascadia Code","Source Code Pro",Menlo,monospace;--vuno-primary:var(--vuno-color-blue-600);--vuno-primary-contrast:var(--vuno-color-white);--vuno-secondary:var(--vuno-color-violet-600);--vuno-secondary-contrast:var(--vuno-color-white);--vuno-neutral:var(--vuno-color-slate-600);--vuno-neutral-contrast:var(--vuno-color-white);--vuno-surface:var(--vuno-color-white);--vuno-surface-1:var(--vuno-color-slate-100);--vuno-surface-2:var(--vuno-color-slate-200);--vuno-surface-inverse:var(--vuno-color-slate-900);--vuno-text-strong:var(--vuno-color-slate-900);--vuno-text-body:var(--vuno-color-slate-700);--vuno-text-muted:var(--vuno-color-slate-600);--vuno-text-subtle:var(--vuno-color-slate-400);--vuno-text-inverse:var(--vuno-color-slate-50);--vuno-border:var(--vuno-color-slate-300);--vuno-border-strong:var(--vuno-color-slate-500);--vuno-success:var(--vuno-color-emerald-700);--vuno-success-contrast:var(--vuno-color-white);--vuno-info:var(--vuno-color-cyan-700);--vuno-info-contrast:var(--vuno-color-white);--vuno-warning:var(--vuno-color-amber-400);--vuno-warning-contrast:var(--vuno-color-slate-900);--vuno-error:var(--vuno-color-red-700);--vuno-error-contrast:var(--vuno-color-white)}.dark{color-scheme:dark;--vuno-primary:var(--vuno-color-blue-400);--vuno-primary-contrast:var(--vuno-color-slate-950);--vuno-secondary:var(--vuno-color-violet-400);--vuno-secondary-contrast:var(--vuno-color-slate-950);--vuno-neutral:var(--vuno-color-slate-400);--vuno-neutral-contrast:var(--vuno-color-slate-950);--vuno-surface:var(--vuno-color-black);--vuno-surface-1:var(--vuno-color-slate-900);--vuno-surface-2:var(--vuno-color-slate-800);--vuno-surface-inverse:var(--vuno-color-slate-50);--vuno-text-strong:var(--vuno-color-white);--vuno-text-body:var(--vuno-color-slate-200);--vuno-text-muted:var(--vuno-color-slate-400);--vuno-text-subtle:var(--vuno-color-slate-500);--vuno-text-inverse:var(--vuno-color-slate-900);--vuno-border:var(--vuno-color-slate-700);--vuno-border-strong:var(--vuno-color-slate-500);--vuno-success:var(--vuno-color-emerald-400);--vuno-success-contrast:var(--vuno-color-slate-950);--vuno-info:var(--vuno-color-cyan-400);--vuno-info-contrast:var(--vuno-color-slate-950);--vuno-warning:var(--vuno-color-amber-300);--vuno-warning-contrast:var(--vuno-color-slate-950);--vuno-error:var(--vuno-color-red-400);--vuno-error-contrast:var(--vuno-color-slate-950)}body{background-color:var(--vuno-surface);color:var(--vuno-text-body);font-family:var(--vuno-font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { VunoSize, VunoSlots } from '#vuno/types/base';
|
|
2
|
+
/**
|
|
3
|
+
* La imagen redonda de una fila: una foto de producto, un logotipo, una
|
|
4
|
+
* persona.
|
|
5
|
+
*
|
|
6
|
+
* El `alt` no es decoración: en un listado, la alternativa útil es el nombre
|
|
7
|
+
* de la fila, y de ahí salen también las iniciales cuando no hay imagen que
|
|
8
|
+
* enseñar.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
alt?: string;
|
|
12
|
+
size?: VunoSize;
|
|
13
|
+
src?: string;
|
|
14
|
+
ui?: VunoSlots;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
size: VunoSize;
|
|
18
|
+
alt: string;
|
|
19
|
+
src: string;
|
|
20
|
+
ui: VunoSlots;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, watch } from "vue";
|
|
3
|
+
import { useTheme } from "#vuno/composables/useTheme";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
alt: { type: String, required: false, default: "" },
|
|
6
|
+
size: { type: String, required: false, default: "md" },
|
|
7
|
+
src: { type: String, required: false, default: void 0 },
|
|
8
|
+
ui: { type: Object, required: false, default: void 0 }
|
|
9
|
+
});
|
|
10
|
+
const ui = useTheme(
|
|
11
|
+
"avatar",
|
|
12
|
+
() => props.ui,
|
|
13
|
+
() => ({ size: props.size })
|
|
14
|
+
);
|
|
15
|
+
const failed = ref(false);
|
|
16
|
+
watch(
|
|
17
|
+
() => props.src,
|
|
18
|
+
() => {
|
|
19
|
+
failed.value = false;
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
const showImage = computed(() => Boolean(props.src) && !failed.value);
|
|
23
|
+
const initials = computed(
|
|
24
|
+
() => props.alt.split(/\s+/).filter(Boolean).slice(0, 2).map((word) => [...word][0]?.toLocaleUpperCase() ?? "").join("")
|
|
25
|
+
);
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<span :class="ui.root">
|
|
30
|
+
<img
|
|
31
|
+
v-if="showImage"
|
|
32
|
+
:alt="props.alt"
|
|
33
|
+
:class="ui.image"
|
|
34
|
+
:src="props.src"
|
|
35
|
+
@error="failed = true"
|
|
36
|
+
/>
|
|
37
|
+
|
|
38
|
+
<!--
|
|
39
|
+
Sin imagen, las iniciales son decoración: el nombre de la fila ya
|
|
40
|
+
está escrito en la columna de al lado, y anunciarlo aquí otra vez
|
|
41
|
+
—peor, deletreado— solo alarga la lectura de cada fila.
|
|
42
|
+
-->
|
|
43
|
+
<span
|
|
44
|
+
v-else
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
>{{ initials }}</span
|
|
47
|
+
>
|
|
48
|
+
</span>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { VunoSize, VunoSlots } from '#vuno/types/base';
|
|
2
|
+
/**
|
|
3
|
+
* La imagen redonda de una fila: una foto de producto, un logotipo, una
|
|
4
|
+
* persona.
|
|
5
|
+
*
|
|
6
|
+
* El `alt` no es decoración: en un listado, la alternativa útil es el nombre
|
|
7
|
+
* de la fila, y de ahí salen también las iniciales cuando no hay imagen que
|
|
8
|
+
* enseñar.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
alt?: string;
|
|
12
|
+
size?: VunoSize;
|
|
13
|
+
src?: string;
|
|
14
|
+
ui?: VunoSlots;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
size: VunoSize;
|
|
18
|
+
alt: string;
|
|
19
|
+
src: string;
|
|
20
|
+
ui: VunoSlots;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { VunoColor, VunoSize, VunoSlots } from '#vuno/types/base';
|
|
2
|
+
/**
|
|
3
|
+
* Una etiqueta de estado: el estado de una fila, el contador de filtros
|
|
4
|
+
* activos, el resumen de un filtro puesto.
|
|
5
|
+
*
|
|
6
|
+
* No es un botón ni lleva acción propia. Cuando algo dentro sí la lleva
|
|
7
|
+
* —la cruz que quita un filtro— va en el slot, para que el elemento que se
|
|
8
|
+
* pulsa sea ese y no la etiqueta entera.
|
|
9
|
+
*/
|
|
10
|
+
type VunoBadgeVariant = 'outline' | 'soft' | 'solid' | 'subtle';
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
color?: VunoColor;
|
|
13
|
+
label?: string;
|
|
14
|
+
size?: VunoSize;
|
|
15
|
+
ui?: VunoSlots;
|
|
16
|
+
variant?: VunoBadgeVariant;
|
|
17
|
+
};
|
|
18
|
+
declare var __VLS_1: {};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
default?: (props: typeof __VLS_1) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
23
|
+
color: VunoColor;
|
|
24
|
+
size: VunoSize;
|
|
25
|
+
variant: VunoBadgeVariant;
|
|
26
|
+
label: string;
|
|
27
|
+
ui: VunoSlots;
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useTheme } from "#vuno/composables/useTheme";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
color: { type: String, required: false, default: "primary" },
|
|
5
|
+
label: { type: String, required: false, default: void 0 },
|
|
6
|
+
size: { type: String, required: false, default: "md" },
|
|
7
|
+
ui: { type: Object, required: false, default: void 0 },
|
|
8
|
+
variant: { type: String, required: false, default: "solid" }
|
|
9
|
+
});
|
|
10
|
+
const ui = useTheme(
|
|
11
|
+
"badge",
|
|
12
|
+
() => props.ui,
|
|
13
|
+
() => ({
|
|
14
|
+
color: props.color,
|
|
15
|
+
size: props.size,
|
|
16
|
+
variant: props.variant
|
|
17
|
+
})
|
|
18
|
+
);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<span :class="ui.base">
|
|
23
|
+
<slot>{{ props.label }}</slot>
|
|
24
|
+
</span>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { VunoColor, VunoSize, VunoSlots } from '#vuno/types/base';
|
|
2
|
+
/**
|
|
3
|
+
* Una etiqueta de estado: el estado de una fila, el contador de filtros
|
|
4
|
+
* activos, el resumen de un filtro puesto.
|
|
5
|
+
*
|
|
6
|
+
* No es un botón ni lleva acción propia. Cuando algo dentro sí la lleva
|
|
7
|
+
* —la cruz que quita un filtro— va en el slot, para que el elemento que se
|
|
8
|
+
* pulsa sea ese y no la etiqueta entera.
|
|
9
|
+
*/
|
|
10
|
+
type VunoBadgeVariant = 'outline' | 'soft' | 'solid' | 'subtle';
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
color?: VunoColor;
|
|
13
|
+
label?: string;
|
|
14
|
+
size?: VunoSize;
|
|
15
|
+
ui?: VunoSlots;
|
|
16
|
+
variant?: VunoBadgeVariant;
|
|
17
|
+
};
|
|
18
|
+
declare var __VLS_1: {};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
default?: (props: typeof __VLS_1) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
23
|
+
color: VunoColor;
|
|
24
|
+
size: VunoSize;
|
|
25
|
+
variant: VunoBadgeVariant;
|
|
26
|
+
label: string;
|
|
27
|
+
ui: VunoSlots;
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { VunoColor, VunoSize, VunoSlots } from '#vuno/types/base';
|
|
2
|
+
type VunoButtonVariant = 'ghost' | 'link' | 'outline' | 'soft' | 'solid';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
color?: VunoColor;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** Nombre Iconify, como los de `useIcons`. */
|
|
7
|
+
icon?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Bloquea el botón y sustituye el icono por un giro. */
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
size?: VunoSize;
|
|
12
|
+
/** El icono va detrás de la etiqueta en vez de delante. */
|
|
13
|
+
trailing?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* `button` a propósito, y no `submit`: un botón dentro de un
|
|
16
|
+
* formulario que no diga lo que es lo envía al pulsarlo, y eso
|
|
17
|
+
* convierte cualquier acción secundaria en un envío accidental.
|
|
18
|
+
*/
|
|
19
|
+
type?: 'button' | 'reset' | 'submit';
|
|
20
|
+
ui?: VunoSlots;
|
|
21
|
+
variant?: VunoButtonVariant;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_Slots = {
|
|
24
|
+
/** Contenido en lugar de la etiqueta. */
|
|
25
|
+
default?: () => unknown;
|
|
26
|
+
/** Va después de todo lo demás; la tabla mete ahí su contador. */
|
|
27
|
+
trailing?: () => unknown;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
30
|
+
color: VunoColor;
|
|
31
|
+
icon: string;
|
|
32
|
+
type: "button" | "reset" | "submit";
|
|
33
|
+
size: VunoSize;
|
|
34
|
+
variant: VunoButtonVariant;
|
|
35
|
+
label: string;
|
|
36
|
+
ui: VunoSlots;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useTheme } from "#vuno/composables/useTheme";
|
|
4
|
+
import Icon from "#vuno/components/actions/Icon.vue";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
color: { type: String, required: false, default: "primary" },
|
|
7
|
+
disabled: { type: Boolean, required: false },
|
|
8
|
+
icon: { type: String, required: false, default: void 0 },
|
|
9
|
+
label: { type: String, required: false, default: void 0 },
|
|
10
|
+
loading: { type: Boolean, required: false },
|
|
11
|
+
size: { type: String, required: false, default: "md" },
|
|
12
|
+
trailing: { type: Boolean, required: false },
|
|
13
|
+
type: { type: String, required: false, default: "button" },
|
|
14
|
+
ui: { type: Object, required: false, default: void 0 },
|
|
15
|
+
variant: { type: String, required: false, default: "solid" }
|
|
16
|
+
});
|
|
17
|
+
const slots = defineSlots();
|
|
18
|
+
const hasContent = computed(() => Boolean(props.label) || Boolean(slots.default));
|
|
19
|
+
const isDisabled = computed(() => Boolean(props.disabled) || Boolean(props.loading));
|
|
20
|
+
const ui = useTheme(
|
|
21
|
+
"button",
|
|
22
|
+
() => props.ui,
|
|
23
|
+
() => ({
|
|
24
|
+
color: props.color,
|
|
25
|
+
shape: hasContent.value ? void 0 : "square",
|
|
26
|
+
size: props.size,
|
|
27
|
+
variant: props.variant
|
|
28
|
+
})
|
|
29
|
+
);
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<button
|
|
34
|
+
:aria-busy="props.loading ? 'true' : void 0"
|
|
35
|
+
:class="ui.base"
|
|
36
|
+
:disabled="isDisabled"
|
|
37
|
+
:type="props.type"
|
|
38
|
+
>
|
|
39
|
+
<!--
|
|
40
|
+
El giro ocupa el sitio del icono en vez de añadirse: si se sumara, el
|
|
41
|
+
botón cambiaría de ancho al pulsarlo y el puntero acabaría sobre otra
|
|
42
|
+
cosa.
|
|
43
|
+
-->
|
|
44
|
+
<span
|
|
45
|
+
v-if="props.loading"
|
|
46
|
+
aria-hidden="true"
|
|
47
|
+
:class="[ui.icon, ui.spinner]"
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
<Icon
|
|
51
|
+
v-else-if="props.icon && !props.trailing"
|
|
52
|
+
:class="ui.icon"
|
|
53
|
+
:name="props.icon"
|
|
54
|
+
/>
|
|
55
|
+
|
|
56
|
+
<span
|
|
57
|
+
v-if="hasContent"
|
|
58
|
+
:class="ui.label"
|
|
59
|
+
>
|
|
60
|
+
<slot>{{ props.label }}</slot>
|
|
61
|
+
</span>
|
|
62
|
+
|
|
63
|
+
<Icon
|
|
64
|
+
v-if="props.icon && props.trailing && !props.loading"
|
|
65
|
+
:class="ui.icon"
|
|
66
|
+
:name="props.icon"
|
|
67
|
+
/>
|
|
68
|
+
|
|
69
|
+
<slot name="trailing" />
|
|
70
|
+
</button>
|
|
71
|
+
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { VunoColor, VunoSize, VunoSlots } from '#vuno/types/base';
|
|
2
|
+
type VunoButtonVariant = 'ghost' | 'link' | 'outline' | 'soft' | 'solid';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
color?: VunoColor;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** Nombre Iconify, como los de `useIcons`. */
|
|
7
|
+
icon?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Bloquea el botón y sustituye el icono por un giro. */
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
size?: VunoSize;
|
|
12
|
+
/** El icono va detrás de la etiqueta en vez de delante. */
|
|
13
|
+
trailing?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* `button` a propósito, y no `submit`: un botón dentro de un
|
|
16
|
+
* formulario que no diga lo que es lo envía al pulsarlo, y eso
|
|
17
|
+
* convierte cualquier acción secundaria en un envío accidental.
|
|
18
|
+
*/
|
|
19
|
+
type?: 'button' | 'reset' | 'submit';
|
|
20
|
+
ui?: VunoSlots;
|
|
21
|
+
variant?: VunoButtonVariant;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_Slots = {
|
|
24
|
+
/** Contenido en lugar de la etiqueta. */
|
|
25
|
+
default?: () => unknown;
|
|
26
|
+
/** Va después de todo lo demás; la tabla mete ahí su contador. */
|
|
27
|
+
trailing?: () => unknown;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
30
|
+
color: VunoColor;
|
|
31
|
+
icon: string;
|
|
32
|
+
type: "button" | "reset" | "submit";
|
|
33
|
+
size: VunoSize;
|
|
34
|
+
variant: VunoButtonVariant;
|
|
35
|
+
label: string;
|
|
36
|
+
ui: VunoSlots;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
name: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, resolveComponent } from "vue";
|
|
3
|
+
defineOptions({
|
|
4
|
+
/**
|
|
5
|
+
* El nombre importa. Sin él, el componente se llama `Icon` por su
|
|
6
|
+
* fichero, y entonces el `<Icon>` de su propia plantilla **se resuelve a
|
|
7
|
+
* sí mismo**: fuera de Nuxt se monta en bucle hasta agotar la pila, y el
|
|
8
|
+
* error que sale —«Maximum call stack size exceeded»— no menciona el
|
|
9
|
+
* icono por ninguna parte.
|
|
10
|
+
*/
|
|
11
|
+
name: "VunoIcon"
|
|
12
|
+
});
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
name: { type: String, required: true }
|
|
15
|
+
});
|
|
16
|
+
const iconComponent = resolveComponent("Icon");
|
|
17
|
+
const is = computed(() => typeof iconComponent === "string" ? "span" : iconComponent);
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<!--
|
|
22
|
+
Decorativo por defecto: en todos los usos del módulo el icono acompaña a
|
|
23
|
+
un texto o a un `aria-label` del elemento que lo contiene, así que
|
|
24
|
+
anunciarlo repetiría lo que ya se lee. Quien necesite lo contrario lo
|
|
25
|
+
sobreescribe, porque los atributos de quien lo usa ganan al llegar aquí.
|
|
26
|
+
-->
|
|
27
|
+
<component
|
|
28
|
+
:is="is"
|
|
29
|
+
aria-hidden="true"
|
|
30
|
+
:name="props.name"
|
|
31
|
+
/>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
name: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type VunoPortalTarget } from '#vuno/internal/useVunoPortal';
|
|
2
|
+
import type { VunoColor } from '#vuno/types/base';
|
|
3
|
+
/** Una entrada del menú. Es la forma que ya tienen las acciones de fila. */
|
|
4
|
+
type VunoMenuItem = {
|
|
5
|
+
onSelect: () => void;
|
|
6
|
+
color?: VunoColor;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
icon?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
/** Dibuja una línea encima, para separar lo destructivo del resto. */
|
|
11
|
+
separator?: boolean;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Props = {
|
|
14
|
+
items: VunoMenuItem[];
|
|
15
|
+
/** Dónde montar el menú. Por defecto, lo que provea el modal que envuelva. */
|
|
16
|
+
portal?: VunoPortalTarget;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = {
|
|
19
|
+
/** El disparador. Recibe el estado abierto por si quiere pintarlo. */
|
|
20
|
+
default?: (props: {
|
|
21
|
+
open: boolean;
|
|
22
|
+
}) => unknown;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
25
|
+
portal: VunoPortalTarget;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|