vueless 1.2.8-beta.15 → 1.2.8-beta.16
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "1.2.8-beta.
|
|
3
|
+
"version": "1.2.8-beta.16",
|
|
4
4
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -103,11 +103,7 @@ const selectedValue = computed({
|
|
|
103
103
|
|
|
104
104
|
return props.modelValue;
|
|
105
105
|
},
|
|
106
|
-
set: (value) =>
|
|
107
|
-
if (searchModel.value) searchModel.value = "";
|
|
108
|
-
|
|
109
|
-
emit("update:modelValue", value);
|
|
110
|
-
},
|
|
106
|
+
set: (value) => emit("update:modelValue", value),
|
|
111
107
|
});
|
|
112
108
|
|
|
113
109
|
const addOptionKeyCombination = computed(() => {
|
package/utils/theme.ts
CHANGED
|
@@ -51,18 +51,6 @@ import type {
|
|
|
51
51
|
} from "../types";
|
|
52
52
|
import { ColorMode } from "../types";
|
|
53
53
|
|
|
54
|
-
declare interface RootCSSVariableOptions {
|
|
55
|
-
primary: PrimaryColors | string;
|
|
56
|
-
neutral: NeutralColors | string;
|
|
57
|
-
text: ThemeConfigText;
|
|
58
|
-
rounding: ThemeConfigRounding;
|
|
59
|
-
outline: ThemeConfigOutline;
|
|
60
|
-
letterSpacing: number;
|
|
61
|
-
disabledOpacity: number;
|
|
62
|
-
lightTheme: Partial<VuelessCssVariables>;
|
|
63
|
-
darkTheme: Partial<VuelessCssVariables>;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
54
|
declare interface SetColorMode {
|
|
67
55
|
colorMode: `${ColorMode}`;
|
|
68
56
|
isColorModeAuto: boolean;
|
|
@@ -696,20 +684,20 @@ function getDarkTheme(darkTheme?: Partial<VuelessCssVariables>) {
|
|
|
696
684
|
* Generate and apply Vueless CSS variables.
|
|
697
685
|
* @return string - Vueless CSS variables string.
|
|
698
686
|
*/
|
|
699
|
-
export function setRootCSSVariables(vars:
|
|
687
|
+
export function setRootCSSVariables(vars: MergedThemeConfig) {
|
|
700
688
|
let darkVariables: Partial<VuelessCssVariables> = {};
|
|
701
689
|
|
|
702
690
|
let variables: Partial<VuelessCssVariables> = {
|
|
703
|
-
"--vl-text-xs": `${vars.text
|
|
704
|
-
"--vl-text-sm": `${vars.text
|
|
705
|
-
"--vl-text-md": `${vars.text
|
|
706
|
-
"--vl-text-lg": `${vars.text
|
|
691
|
+
"--vl-text-xs": `${Number(vars.text?.xs ?? 0) / PX_IN_REM}rem`,
|
|
692
|
+
"--vl-text-sm": `${Number(vars.text?.sm ?? 0) / PX_IN_REM}rem`,
|
|
693
|
+
"--vl-text-md": `${Number(vars.text?.md ?? 0) / PX_IN_REM}rem`,
|
|
694
|
+
"--vl-text-lg": `${Number(vars.text?.lg ?? 0) / PX_IN_REM}rem`,
|
|
707
695
|
"--vl-outline-sm": `${vars.outline.sm}px`,
|
|
708
696
|
"--vl-outline-md": `${vars.outline.md}px`,
|
|
709
697
|
"--vl-outline-lg": `${vars.outline.lg}px`,
|
|
710
|
-
"--vl-rounding-sm": `${vars.rounding.sm / PX_IN_REM}rem`,
|
|
711
|
-
"--vl-rounding-md": `${vars.rounding.md / PX_IN_REM}rem`,
|
|
712
|
-
"--vl-rounding-lg": `${vars.rounding.lg / PX_IN_REM}rem`,
|
|
698
|
+
"--vl-rounding-sm": `${Number(vars.rounding.sm ?? 0) / PX_IN_REM}rem`,
|
|
699
|
+
"--vl-rounding-md": `${Number(vars.rounding.md ?? 0) / PX_IN_REM}rem`,
|
|
700
|
+
"--vl-rounding-lg": `${Number(vars.rounding.lg ?? 0) / PX_IN_REM}rem`,
|
|
713
701
|
"--vl-letter-spacing": `${vars.letterSpacing}em`,
|
|
714
702
|
"--vl-disabled-opacity": `${vars.disabledOpacity}%`,
|
|
715
703
|
};
|
|
@@ -724,7 +712,7 @@ export function setRootCSSVariables(vars: RootCSSVariableOptions) {
|
|
|
724
712
|
`var(--color-${vars.neutral}-${shade})`;
|
|
725
713
|
}
|
|
726
714
|
|
|
727
|
-
const [light, dark] = generateCSSColorVariables(vars.lightTheme, vars.darkTheme);
|
|
715
|
+
const [light, dark] = generateCSSColorVariables(vars.lightTheme ?? {}, vars.darkTheme ?? {});
|
|
728
716
|
|
|
729
717
|
variables = { ...variables, ...light };
|
|
730
718
|
darkVariables = { ...darkVariables, ...dark };
|