@raxium/vue 0.2.4 → 0.2.6
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.
|
@@ -10,7 +10,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
10
|
__name: "Button",
|
|
11
11
|
props: {
|
|
12
12
|
variant: {
|
|
13
|
-
default: "
|
|
13
|
+
default: "solid"
|
|
14
14
|
},
|
|
15
15
|
color: {
|
|
16
16
|
default: "primary"
|
|
@@ -65,6 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
65
|
ref: unref(forwardRef),
|
|
66
66
|
class: normalizeClass(crafts.value.root({
|
|
67
67
|
variant: __props.variant,
|
|
68
|
+
color: __props.color,
|
|
68
69
|
loading: __props.loading,
|
|
69
70
|
class: unref(clsx)(__props.ui?.root?.class, __props.class),
|
|
70
71
|
...unref(theme)
|
|
@@ -2,8 +2,8 @@ import type { ButtonVariants } from '@raxium/themes/default';
|
|
|
2
2
|
import type { ThemeCrafts } from '../../providers';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
export interface ButtonProps extends ThemeCrafts<'tvButton'> {
|
|
5
|
-
variant?: ButtonVariants['variant']
|
|
6
|
-
color?: ButtonVariants['color']
|
|
5
|
+
variant?: ButtonVariants['variant'];
|
|
6
|
+
color?: ButtonVariants['color'];
|
|
7
7
|
class?: HTMLAttributes['class'];
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
tooltip?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createBlock, createPropsRestProxy, createVNode, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
2
2
|
import { DatePicker, useDatePicker, useForwardExpose, useForwardProps } from "@ark-ui/vue";
|
|
3
|
+
import { useConfig } from "../../composables/useConfig.js";
|
|
3
4
|
import { useTheme } from "../../composables/useTheme.js";
|
|
4
5
|
import { ThemeProvider } from "../../providers/theme/index.js";
|
|
5
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -98,17 +99,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
99
|
],
|
|
99
100
|
setup (__props, { expose: __expose, emit: __emit }) {
|
|
100
101
|
const props = createPropsRestProxy(__props, [
|
|
101
|
-
"theme"
|
|
102
|
+
"theme",
|
|
103
|
+
"lazyMount",
|
|
104
|
+
"unmountOnExit"
|
|
102
105
|
]);
|
|
103
106
|
const emit = __emit;
|
|
104
|
-
const
|
|
107
|
+
const forwarded = useForwardProps(props);
|
|
108
|
+
const datePicker = useDatePicker(forwarded, emit);
|
|
109
|
+
const datePickerOptions = useConfig("date-picker", ()=>({
|
|
110
|
+
unmountOnExit: __props.unmountOnExit,
|
|
111
|
+
lazyMount: __props.lazyMount
|
|
112
|
+
}));
|
|
105
113
|
const theme = useTheme(()=>__props.theme);
|
|
106
114
|
__expose({
|
|
107
115
|
$api: datePicker
|
|
108
116
|
});
|
|
109
117
|
useForwardExpose();
|
|
110
118
|
return (_ctx, _cache)=>(openBlock(), createBlock(unref(DatePicker).RootProvider, {
|
|
111
|
-
value: unref(datePicker)
|
|
119
|
+
value: unref(datePicker),
|
|
120
|
+
"lazy-mount": unref(datePickerOptions)?.lazyMount,
|
|
121
|
+
"unmount-on-exit": unref(datePickerOptions)?.unmountOnExit
|
|
112
122
|
}, {
|
|
113
123
|
default: withCtx(()=>[
|
|
114
124
|
createVNode(unref(ThemeProvider), {
|
|
@@ -124,7 +134,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
124
134
|
]),
|
|
125
135
|
_: 3
|
|
126
136
|
}, 8, [
|
|
127
|
-
"value"
|
|
137
|
+
"value",
|
|
138
|
+
"lazy-mount",
|
|
139
|
+
"unmount-on-exit"
|
|
128
140
|
]));
|
|
129
141
|
}
|
|
130
142
|
});
|
|
@@ -46,7 +46,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
46
|
}, {
|
|
47
47
|
default: withCtx(()=>[
|
|
48
48
|
createVNode(unref(Button), mergeProps({
|
|
49
|
-
variant: "text"
|
|
49
|
+
variant: "text",
|
|
50
|
+
color: "default"
|
|
50
51
|
}, __props.widget?.cancel, {
|
|
51
52
|
class: unref(clsx)(__props.ui?.cancel),
|
|
52
53
|
theme: unref(theme),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raxium/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.6",
|
|
5
5
|
"description": "Vue core components for Raxium, based on Ark UI",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Hwacc",
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"tsc-alias": "^1.8.16",
|
|
89
89
|
"vitest": "^4.1.1",
|
|
90
90
|
"vue-tsc": "^3.2.4",
|
|
91
|
-
"@raxium/
|
|
92
|
-
"@raxium/
|
|
91
|
+
"@raxium/shared": "0.1.1",
|
|
92
|
+
"@raxium/themes": "0.1.7"
|
|
93
93
|
},
|
|
94
94
|
"publishConfig": {
|
|
95
95
|
"access": "public"
|