vueless 0.0.727 → 0.0.728
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/composables/useUI.ts +2 -1
- package/constants.js +3 -0
- package/package.json +1 -1
- package/types.ts +5 -0
- package/ui.container-accordion/config.ts +1 -1
- package/ui.data-list/config.ts +1 -1
- package/ui.data-table/config.ts +1 -1
- package/ui.dropdown-list/config.ts +1 -1
- package/ui.form-input/config.ts +1 -1
- package/ui.form-label/config.ts +1 -1
- package/ui.form-select/config.ts +2 -2
- package/ui.form-textarea/config.ts +1 -1
- package/ui.navigation-progress/config.ts +1 -1
package/composables/useUI.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
STRATEGY_TYPE,
|
|
7
7
|
CVA_CONFIG_KEY,
|
|
8
8
|
SYSTEM_CONFIG_KEY,
|
|
9
|
+
DEFAULT_BASE_CLASSES,
|
|
9
10
|
EXTENDS_PATTERN_REG_EXP,
|
|
10
11
|
NESTED_COMPONENT_PATTERN_REG_EXP,
|
|
11
12
|
} from "../constants.js";
|
|
@@ -90,7 +91,7 @@ export default function useUI<T>(
|
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
if (key === (topLevelClassKey || firstClassKey)) {
|
|
93
|
-
classes = cx([classes, attrs.class]);
|
|
94
|
+
classes = cx([DEFAULT_BASE_CLASSES, vuelessConfig.baseClasses, classes, attrs.class]);
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
classes = classes.replaceAll(EXTENDS_PATTERN_REG_EXP, "");
|
package/constants.js
CHANGED
|
@@ -23,6 +23,9 @@ export const OUTLINE_INCREMENT = 1; /* pixels */
|
|
|
23
23
|
export const DEFAULT_ROUNDING = 8; /* pixels */
|
|
24
24
|
export const ROUNDING_DECREMENT = 4; /* pixels */
|
|
25
25
|
export const ROUNDING_INCREMENT = 6; /* pixels */
|
|
26
|
+
export const DEFAULT_BASE_CLASSES = `
|
|
27
|
+
text-gray-900 dark:text-gray-100
|
|
28
|
+
`;
|
|
26
29
|
|
|
27
30
|
/* Vueless supported colors and shades */
|
|
28
31
|
export const COLOR_SHADES = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -124,6 +124,11 @@ export interface Config extends ThemeConfig {
|
|
|
124
124
|
*/
|
|
125
125
|
strategy?: Strategies;
|
|
126
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Classes which will be applied to the root element of all vueless components.
|
|
129
|
+
*/
|
|
130
|
+
baseClasses?: string;
|
|
131
|
+
|
|
127
132
|
/**
|
|
128
133
|
* Component configs.
|
|
129
134
|
*/
|
package/ui.data-list/config.ts
CHANGED
package/ui.data-table/config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: "relative w-full overflow-auto",
|
|
3
|
-
headerCounterBase: "mr-1.5 pr-1.5 font-medium text-sm
|
|
3
|
+
headerCounterBase: "mr-1.5 pr-1.5 font-medium text-sm",
|
|
4
4
|
stickyHeader: {
|
|
5
5
|
base: "fixed top-0 flex items-center z-30 overflow-hidden border rounded-none",
|
|
6
6
|
variants: {
|
|
@@ -10,7 +10,7 @@ export default /*tw*/ {
|
|
|
10
10
|
option: {
|
|
11
11
|
base: `
|
|
12
12
|
rounded-dynamic-sm px-2 py-2.5 flex items-center align-middle whitespace-nowrap cursor-pointer
|
|
13
|
-
font-normal !leading-none
|
|
13
|
+
font-normal !leading-none
|
|
14
14
|
hover:bg-{color}-600/5 active:bg-{color}-600/10
|
|
15
15
|
overflow-hidden text-ellipsis
|
|
16
16
|
`,
|
package/ui.form-input/config.ts
CHANGED
|
@@ -33,7 +33,7 @@ export default /*tw*/ {
|
|
|
33
33
|
rightSlot: "pr-2.5 flex items-center",
|
|
34
34
|
input: {
|
|
35
35
|
base: `
|
|
36
|
-
block w-full py-2 px-3 font-normal !leading-none
|
|
36
|
+
block w-full py-2 px-3 font-normal !leading-none bg-transparent
|
|
37
37
|
border-none rounded-inherit transition focus:ring-0
|
|
38
38
|
placeholder:font-normal placeholder-gray-400
|
|
39
39
|
disabled:text-gray-700 disabled:cursor-not-allowed
|
package/ui.form-label/config.ts
CHANGED
package/ui.form-select/config.ts
CHANGED
|
@@ -42,7 +42,7 @@ export default /*tw*/ {
|
|
|
42
42
|
selectedLabels: "flex flex-col col-span-2",
|
|
43
43
|
selectedLabel: {
|
|
44
44
|
base: `
|
|
45
|
-
font-normal !leading-none
|
|
45
|
+
font-normal !leading-none relative truncate
|
|
46
46
|
inline-flex items-center whitespace-nowrap mb-0 w-full
|
|
47
47
|
`,
|
|
48
48
|
variants: {
|
|
@@ -116,7 +116,7 @@ export default /*tw*/ {
|
|
|
116
116
|
},
|
|
117
117
|
searchInput: {
|
|
118
118
|
base: `
|
|
119
|
-
p-0 font-normal !leading-none
|
|
119
|
+
p-0 font-normal !leading-none relative w-full border-none bg-transparent
|
|
120
120
|
focus:shadow-none focus:outline-none focus:ring-0
|
|
121
121
|
placeholder:text-gray-400 placeholder:font-normal
|
|
122
122
|
`,
|
|
@@ -20,7 +20,7 @@ export default /*tw*/ {
|
|
|
20
20
|
},
|
|
21
21
|
textarea: {
|
|
22
22
|
base: `
|
|
23
|
-
px-3 pt-2 pb-1.5 block w-full bg-transparent border-none font-normal
|
|
23
|
+
px-3 pt-2 pb-1.5 block w-full bg-transparent border-none font-normal
|
|
24
24
|
placeholder:text-gray-400 placeholder:font-normal placeholder:leading-none
|
|
25
25
|
focus:ring-0 disabled:cursor-not-allowed
|
|
26
26
|
`,
|
|
@@ -32,7 +32,7 @@ export default /*tw*/ {
|
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
-
stepperCount: "text-md font-bold
|
|
35
|
+
stepperCount: "text-md font-bold translate-y-2 transform",
|
|
36
36
|
indicator: {
|
|
37
37
|
base: "text-{color}-600 flex justify-end w-full min-w-fit font-medium transition",
|
|
38
38
|
variants: {
|