@nexdom/uimed-vue 1.0.0-alpha.1 → 1.0.0-beta.2

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 CHANGED
@@ -4,7 +4,7 @@
4
4
  [![CD](https://github.com/nexdom-healthtech/uimed-vue/actions/workflows/cd.yml/badge.svg)](https://github.com/nexdom-healthtech/uimed-vue/actions/workflows/cd.yml)
5
5
  [![Dependabot](https://github.com/nexdom-healthtech/uimed-vue/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/nexdom-healthtech/uimed-vue/actions/workflows/dependabot/dependabot-updates)
6
6
 
7
- A ui framework for NEXDOM applications, based on [Vuetify](https://vuetifyjs.com/).
7
+ A ui framework for NEXDOM applications, based on [Material Design](https://m3.material.io/).
8
8
 
9
9
  For more examples and information, check the [docs page](https://nexdom-healthtech.github.io/uimed-vue/).
10
10
 
@@ -2,8 +2,74 @@
2
2
  /**
3
3
  * Root component to be placed at the top of the component tree.
4
4
  */
5
+ declare const _default$1: typeof __VLS_export$1;
6
+ declare const __VLS_export$1: __VLS_WithSlots$1<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<{}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, true, {}, any>, {
7
+ default?: (props: {}) => any;
8
+ }>;
9
+ type __VLS_WithSlots$1<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
14
+ //#endregion
15
+ //#region src/components/btn/types.d.ts
16
+ /**
17
+ * Style variation for the {@link Btn} component.
18
+ * {@link btnVariantToVuetifyVariant} for the mapping applied when rendering.
19
+ */
20
+ type BtnVariant = "primary" | "secondary" | "ghost";
21
+ /**
22
+ * Color palette for the {@link Btn} component.
23
+ * {@link btnColorToVuetifyColor} for the mapping applied when rendering.
24
+ */
25
+ type BtnColor = "primary" | "secondary" | "positive" | "informative" | "caution" | "danger";
26
+ /**
27
+ * Props exposed by the {@link Btn} component.
28
+ */
29
+ type BtnProps = {
30
+ /**
31
+ * Applies a distinct style variation to the button.
32
+ * One of `primary`, `secondary`, or `ghost`.
33
+ * @default "primary"
34
+ */
35
+ variant?: BtnVariant;
36
+ /**
37
+ * Applies a color to the button.
38
+ * One of `primary`, `secondary`, `positive`, `informative`, `caution`, or `danger`.
39
+ * @default "primary"
40
+ */
41
+ color?: BtnColor;
42
+ /**
43
+ * Removes the ability to click or target the button.
44
+ * @default false
45
+ */
46
+ disabled?: boolean;
47
+ /**
48
+ * Displays a loading indicator on the button, disabling interaction.
49
+ * @default false
50
+ */
51
+ loading?: boolean;
52
+ };
53
+ //#endregion
54
+ //#region src/components/btn/btn.vue.d.ts
55
+ /**
56
+ * Button component to be used throughout the application.
57
+ *
58
+ * @example
59
+ * ```vue
60
+ * <btn variant="primary" color="danger" @click="onClick">
61
+ * Confirmar
62
+ * </btn>
63
+ * ```
64
+ *
65
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/btn | Guia do Btn}
66
+ */
5
67
  declare const _default: typeof __VLS_export;
6
- declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<{}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, true, {}, any>, {
68
+ declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<BtnProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
69
+ click: () => any;
70
+ }, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<BtnProps> & Readonly<{
71
+ onClick?: (() => any) | undefined;
72
+ }>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
7
73
  default?: (props: {}) => any;
8
74
  }>;
9
75
  type __VLS_WithSlots<T, S> = T & {
@@ -12,4 +78,4 @@ type __VLS_WithSlots<T, S> = T & {
12
78
  };
13
79
  };
14
80
  //#endregion
15
- export { _default as Root };
81
+ export { _default as Btn, _default$1 as Root };
@@ -1,5 +1,5 @@
1
- import { createBlock, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
2
- import { VApp } from "vuetify/components";
1
+ import { computed, createBlock, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
2
+ import { VApp, VBtn } from "vuetify/components";
3
3
  //#endregion
4
4
  //#region src/components/root.vue
5
5
  var root_default = /* @__PURE__ */ defineComponent({
@@ -15,4 +15,80 @@ var root_default = /* @__PURE__ */ defineComponent({
15
15
  }
16
16
  });
17
17
  //#endregion
18
- export { root_default as Root };
18
+ //#region src/components/btn/consts.ts
19
+ /**
20
+ * Maps {@link BtnVariant} to the underlying Vuetify `VBtn` `variant` value.
21
+ * Each value is checked against Vuetify's prop type, so a variant renamed or
22
+ * removed by Vuetify fails to type-check here.
23
+ */
24
+ const btnVariantToVuetifyVariant = {
25
+ primary: "elevated",
26
+ secondary: "flat",
27
+ ghost: "outlined"
28
+ };
29
+ /**
30
+ * Maps {@link BtnColor} to the underlying Vuetify `VBtn` `color` value.
31
+ * Vuetify types `color` as a bare `string` (it accepts any theme color or
32
+ * CSS color), so this only guarantees every {@link BtnColor} has a mapped
33
+ * value — not that the value is itself a valid Vuetify theme color.
34
+ */
35
+ const btnColorToVuetifyColor = {
36
+ primary: "primary",
37
+ secondary: "secondary",
38
+ positive: "success",
39
+ informative: "info",
40
+ caution: "warning",
41
+ danger: "error"
42
+ };
43
+ //#endregion
44
+ //#region src/components/btn/btn.vue
45
+ var btn_default = /* @__PURE__ */ defineComponent({
46
+ inheritAttrs: false,
47
+ __name: "btn",
48
+ props: {
49
+ variant: {
50
+ type: String,
51
+ required: false,
52
+ default: "primary"
53
+ },
54
+ color: {
55
+ type: String,
56
+ required: false,
57
+ default: "primary"
58
+ },
59
+ disabled: {
60
+ type: Boolean,
61
+ required: false,
62
+ default: false
63
+ },
64
+ loading: {
65
+ type: Boolean,
66
+ required: false,
67
+ default: false
68
+ }
69
+ },
70
+ emits: ["click"],
71
+ setup(__props, { emit: __emit }) {
72
+ const vuetifyVariant = computed(() => btnVariantToVuetifyVariant[__props.variant]);
73
+ const vuetifyColor = computed(() => btnColorToVuetifyColor[__props.color]);
74
+ return (_ctx, _cache) => {
75
+ return openBlock(), createBlock(unref(VBtn), {
76
+ variant: vuetifyVariant.value,
77
+ color: vuetifyColor.value,
78
+ disabled: __props.disabled,
79
+ loading: __props.loading,
80
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
81
+ }, {
82
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
83
+ _: 3
84
+ }, 8, [
85
+ "variant",
86
+ "color",
87
+ "disabled",
88
+ "loading"
89
+ ]);
90
+ };
91
+ }
92
+ });
93
+ //#endregion
94
+ export { btn_default as Btn, root_default as Root };
package/dist/plugins.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import vitePluginVuetify from "vite-plugin-vuetify";
2
2
  //#region src/plugins.d.ts
3
+ /**
4
+ * Vite plugin for Uimed.
5
+ */
3
6
  declare function vitePluginUimed(): ReturnType<typeof vitePluginVuetify>;
4
7
  //#endregion
5
8
  export { vitePluginUimed };
package/dist/plugins.js CHANGED
@@ -1,5 +1,8 @@
1
1
  import vitePluginVuetify from "vite-plugin-vuetify";
2
2
  //#region src/plugins.ts
3
+ /**
4
+ * Vite plugin for Uimed.
5
+ */
3
6
  function vitePluginUimed() {
4
7
  return vitePluginVuetify({ autoImport: false });
5
8
  }
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@nexdom/uimed-vue",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-beta.2",
4
4
  "description": "A ui framework for NEXDOM applications.",
5
5
  "keywords": [
6
6
  "lib",
7
7
  "nexdom",
8
8
  "typescript",
9
- "utils"
9
+ "utils",
10
+ "vue"
10
11
  ],
11
12
  "homepage": "https://nexdom-healthtech.github.io/uimed-vue/",
12
13
  "bugs": {
@@ -42,25 +43,27 @@
42
43
  "depcruise": "depcruise src --output-type err-long",
43
44
  "depcruise:graph": "depcruise src --output-type dot| dot -T svg > dependencygraph.svg",
44
45
  "depcruise:graph:no-tests": "depcruise src --exclude \"__tests__\" --output-type dot | dot -T svg > dependencygraph.no-tests.svg",
45
- "docs:dev": "vitepress dev docs --host",
46
- "docs:preview": "vitepress preview docs"
46
+ "docs:dev": "vitepress dev docs --host --port 5173 --strictPort"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@commitlint/cli": "^21.2.1",
50
50
  "@commitlint/config-conventional": "^21.2.0",
51
51
  "@fontsource/roboto": "^5.3.0",
52
52
  "@mdi/font": "^7.4.47",
53
+ "@playwright/test": "^1.62.1",
53
54
  "@types/node": "^26.1.2",
54
55
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
55
56
  "@vitejs/plugin-vue": "^6.0.8",
56
57
  "@vitest/coverage-v8": "4.1.10",
57
58
  "@vue/test-utils": "^2.4.11",
58
59
  "bumpp": "^12.1.1",
60
+ "conventional-changelog-conventionalcommits": "^9.3.1",
59
61
  "dependency-cruiser": "^18.1.1",
60
62
  "jsdom": "^30.0.1",
61
63
  "oxc-minify": "^0.143.0",
62
64
  "postcss": "^8.5.25",
63
65
  "resize-observer-polyfill": "^1.5.1",
66
+ "type-fest": "^5.8.0",
64
67
  "typescript": "^6.0.3",
65
68
  "vite-plugin-vuetify": "^2.1.3",
66
69
  "vite-plus": "^0.2.7",
@@ -82,5 +85,23 @@
82
85
  "@commitlint/config-conventional"
83
86
  ]
84
87
  },
88
+ "release": {
89
+ "plugins": [
90
+ [
91
+ "@semantic-release/commit-analyzer",
92
+ {
93
+ "preset": "conventionalcommits"
94
+ }
95
+ ],
96
+ [
97
+ "@semantic-release/release-notes-generator",
98
+ {
99
+ "preset": "conventionalcommits"
100
+ }
101
+ ],
102
+ "@semantic-release/npm",
103
+ "@semantic-release/github"
104
+ ]
105
+ },
85
106
  "packageManager": "pnpm@10.32.0"
86
107
  }