@bobbykim/manguito-theme 0.15.0 → 0.17.0
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/CHANGELOG.md +43 -0
- package/README.md +2 -0
- package/index.d.ts +9 -8
- package/index.js +13 -24
- package/index.ts +21 -30
- package/lib/collapse/Collapse.vue +10 -4
- package/lib/collapse/Collapse.vue.d.ts +9 -7
- package/lib/dropdown/DropdownContainer.vue +10 -5
- package/lib/dropdown/DropdownContainer.vue.d.ts +11 -11
- package/lib/dropdown/DropdownContent.vue +4 -1
- package/lib/dropdown/DropdownContent.vue.d.ts +7 -3
- package/lib/header/HeaderHorizontal.vue +158 -0
- package/lib/header/HeaderHorizontal.vue.d.ts +84 -0
- package/lib/header/HeaderVertical.vue +116 -0
- package/lib/header/HeaderVertical.vue.d.ts +70 -0
- package/lib/header/NavDrawer.vue +121 -0
- package/lib/header/NavDrawer.vue.d.ts +43 -0
- package/lib/header/index.types.d.ts +1 -0
- package/lib/header/index.types.ts +1 -0
- package/lib/modal/Modal.vue +19 -11
- package/lib/modal/Modal.vue.d.ts +27 -14
- package/lib/sidebar/Sidebar.vue +20 -12
- package/lib/sidebar/Sidebar.vue.d.ts +31 -18
- package/lib/theme/generateClass.d.ts +2 -0
- package/lib/theme/generateClass.js +18 -0
- package/lib/theme/generateClass.ts +25 -0
- package/{theme → lib/theme}/index.d.ts +4 -3
- package/{theme → lib/theme}/index.js +9 -0
- package/{theme → lib/theme}/index.ts +13 -4
- package/{theme → lib/theme}/theme.d.ts +2 -1
- package/{theme → lib/theme}/theme.js +20 -0
- package/{theme → lib/theme}/theme.ts +24 -4
- package/lib/tooltip/index.d.ts +1 -1
- package/package.json +3 -3
- package/tsconfig.json +2 -6
- package/tsconfig.ts.json +9 -0
- package/lib/collapse/index.types.d.ts +0 -3
- package/lib/collapse/index.types.ts +0 -3
- /package/lib/{collapse → header}/index.types.js +0 -0
- /package/{theme → lib/theme}/theme.types.d.ts +0 -0
- /package/{theme → lib/theme}/theme.types.js +0 -0
- /package/{theme → lib/theme}/theme.types.ts +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import MCLTheme from './theme.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Alignment, BodyText, ColorPalette, FontWeight, HeadingSize, OpacityRange, Range, SpacingLevel } from './theme.types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @TailwindCSS - Good practice is to let all of used classes to be in full instead of generated dynamically using methods such as string literal.
|
|
5
5
|
* @Interface - ClassType to define the case, and Input type to generate tailwind clssname.
|
|
6
6
|
* @Export GenerateMCLClass - extends MCLTheme class
|
|
7
7
|
*/
|
|
8
|
-
export declare const colorType: readonly ["BGCOLOR", "BEFOREBG", "AFTERBG", "HVBGCOLOR", "FCBGCOLOR", "ACTIVEBG", "TEXTCOLOR", "HVTEXTCOLOR", "DISABLEDTEXTCOLOR", "SVGFILL", "RINGCOLOR", "FOCUSRING", "ACTIVERING", "OFFSETRING", "DUMMYCOLOR", "BTNCOLOR", "LISTCOLOR", "BORDER", "BORDERX", "BORDERY", "BORDERT", "BORDERB", "BORDERL", "BORDERR"];
|
|
8
|
+
export declare const colorType: readonly ["BGCOLOR", "BEFOREBG", "AFTERBG", "HVBGCOLOR", "FCBGCOLOR", "ACTIVEBG", "TEXTCOLOR", "HVTEXTCOLOR", "FCTEXTCOLOR", "DISABLEDTEXTCOLOR", "SVGFILL", "RINGCOLOR", "FOCUSRING", "ACTIVERING", "OFFSETRING", "DUMMYCOLOR", "BTNCOLOR", "LISTCOLOR", "BORDER", "BORDERX", "BORDERY", "BORDERT", "BORDERB", "BORDERL", "BORDERR"];
|
|
9
9
|
export declare const textType: readonly ["H1", "H2", "H3", "H4", "BODYTEXT", "FONTWEIGHT", "TEXTALIGN"];
|
|
10
10
|
export declare const borderWidthType: readonly ["BORDERW", "BORDERXW", "BORDERYW", "BORDERTW", "BORDERBW", "BORDERLW", "BORDERRW"];
|
|
11
11
|
export declare const scaleType: readonly ["BGOPACITY", "OPACITY"];
|
|
12
12
|
export declare const spacingType: readonly ["MARGIN", "MARGINX", "MARGINY", "MARGINT", "MARGINB", "MARGINL", "MARGINR", "PADDING", "PADDINGX", "PADDINGY", "PADDINGT", "PADDINGB", "PADDINGL", "PADDINGR", "GAP"];
|
|
13
|
-
declare const allType: readonly ["BGCOLOR", "BEFOREBG", "AFTERBG", "HVBGCOLOR", "FCBGCOLOR", "ACTIVEBG", "TEXTCOLOR", "HVTEXTCOLOR", "DISABLEDTEXTCOLOR", "SVGFILL", "RINGCOLOR", "FOCUSRING", "ACTIVERING", "OFFSETRING", "DUMMYCOLOR", "BTNCOLOR", "LISTCOLOR", "BORDER", "BORDERX", "BORDERY", "BORDERT", "BORDERB", "BORDERL", "BORDERR", "H1", "H2", "H3", "H4", "BODYTEXT", "FONTWEIGHT", "TEXTALIGN", "BORDERW", "BORDERXW", "BORDERYW", "BORDERTW", "BORDERBW", "BORDERLW", "BORDERRW", "BGOPACITY", "OPACITY", "MARGIN", "MARGINX", "MARGINY", "MARGINT", "MARGINB", "MARGINL", "MARGINR", "PADDING", "PADDINGX", "PADDINGY", "PADDINGT", "PADDINGB", "PADDINGL", "PADDINGR", "GAP"];
|
|
13
|
+
declare const allType: readonly ["BGCOLOR", "BEFOREBG", "AFTERBG", "HVBGCOLOR", "FCBGCOLOR", "ACTIVEBG", "TEXTCOLOR", "HVTEXTCOLOR", "FCTEXTCOLOR", "DISABLEDTEXTCOLOR", "SVGFILL", "RINGCOLOR", "FOCUSRING", "ACTIVERING", "OFFSETRING", "DUMMYCOLOR", "BTNCOLOR", "LISTCOLOR", "BORDER", "BORDERX", "BORDERY", "BORDERT", "BORDERB", "BORDERL", "BORDERR", "H1", "H2", "H3", "H4", "BODYTEXT", "FONTWEIGHT", "TEXTALIGN", "BORDERW", "BORDERXW", "BORDERYW", "BORDERTW", "BORDERBW", "BORDERLW", "BORDERRW", "BGOPACITY", "OPACITY", "MARGIN", "MARGINX", "MARGINY", "MARGINT", "MARGINB", "MARGINL", "MARGINR", "PADDING", "PADDINGX", "PADDINGY", "PADDINGT", "PADDINGB", "PADDINGL", "PADDINGR", "GAP"];
|
|
14
14
|
export type ClassType = (typeof allType)[number];
|
|
15
15
|
export type ColorClassType = (typeof colorType)[number];
|
|
16
16
|
export type TextClassType = (typeof textType)[number];
|
|
@@ -35,6 +35,7 @@ declare class GenerateMCLClass extends MCLTheme {
|
|
|
35
35
|
getActiveBgColorClass(): string;
|
|
36
36
|
getTextColorClass(): string;
|
|
37
37
|
getHoverTextColorClass(): string;
|
|
38
|
+
getFocusTextColorClass(): string;
|
|
38
39
|
getDisabledTextColorClass(): string;
|
|
39
40
|
getSvgFillColorClass(): string;
|
|
40
41
|
getRingColorClass(): string;
|
|
@@ -13,6 +13,7 @@ export const colorType = [
|
|
|
13
13
|
'ACTIVEBG',
|
|
14
14
|
'TEXTCOLOR',
|
|
15
15
|
'HVTEXTCOLOR',
|
|
16
|
+
'FCTEXTCOLOR',
|
|
16
17
|
'DISABLEDTEXTCOLOR',
|
|
17
18
|
'SVGFILL',
|
|
18
19
|
'RINGCOLOR',
|
|
@@ -100,6 +101,8 @@ class GenerateMCLClass extends MCLTheme {
|
|
|
100
101
|
return this.getTextColorClass();
|
|
101
102
|
case 'HVTEXTCOLOR':
|
|
102
103
|
return this.getHoverTextColorClass();
|
|
104
|
+
case 'FCTEXTCOLOR':
|
|
105
|
+
return this.getFocusTextColorClass();
|
|
103
106
|
case 'DISABLEDTEXTCOLOR':
|
|
104
107
|
return this.getDisabledTextColorClass();
|
|
105
108
|
case 'SVGFILL':
|
|
@@ -282,6 +285,12 @@ class GenerateMCLClass extends MCLTheme {
|
|
|
282
285
|
}
|
|
283
286
|
return MCLTheme.hoverTextColor[this.classValue];
|
|
284
287
|
}
|
|
288
|
+
getFocusTextColorClass() {
|
|
289
|
+
if (!this.validateColorType) {
|
|
290
|
+
return ' ';
|
|
291
|
+
}
|
|
292
|
+
return MCLTheme.focusTextColor[this.classValue];
|
|
293
|
+
}
|
|
285
294
|
getDisabledTextColorClass() {
|
|
286
295
|
if (!this.validateColorType) {
|
|
287
296
|
return ' ';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import MCLTheme from './theme.js'
|
|
2
2
|
import type {
|
|
3
|
-
|
|
4
|
-
HeadingSize,
|
|
3
|
+
Alignment,
|
|
5
4
|
BodyText,
|
|
5
|
+
ColorPalette,
|
|
6
6
|
FontWeight,
|
|
7
|
-
|
|
7
|
+
HeadingSize,
|
|
8
8
|
OpacityRange,
|
|
9
|
+
Range,
|
|
9
10
|
SpacingLevel,
|
|
10
|
-
Alignment,
|
|
11
11
|
} from './theme.types.js'
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -25,6 +25,7 @@ export const colorType = [
|
|
|
25
25
|
'ACTIVEBG',
|
|
26
26
|
'TEXTCOLOR',
|
|
27
27
|
'HVTEXTCOLOR',
|
|
28
|
+
'FCTEXTCOLOR',
|
|
28
29
|
'DISABLEDTEXTCOLOR',
|
|
29
30
|
'SVGFILL',
|
|
30
31
|
'RINGCOLOR',
|
|
@@ -132,6 +133,8 @@ class GenerateMCLClass extends MCLTheme {
|
|
|
132
133
|
return this.getTextColorClass()
|
|
133
134
|
case 'HVTEXTCOLOR':
|
|
134
135
|
return this.getHoverTextColorClass()
|
|
136
|
+
case 'FCTEXTCOLOR':
|
|
137
|
+
return this.getFocusTextColorClass()
|
|
135
138
|
case 'DISABLEDTEXTCOLOR':
|
|
136
139
|
return this.getDisabledTextColorClass()
|
|
137
140
|
case 'SVGFILL':
|
|
@@ -314,6 +317,12 @@ class GenerateMCLClass extends MCLTheme {
|
|
|
314
317
|
}
|
|
315
318
|
return MCLTheme.hoverTextColor[this.classValue as ColorPalette]
|
|
316
319
|
}
|
|
320
|
+
getFocusTextColorClass(): string {
|
|
321
|
+
if (!this.validateColorType) {
|
|
322
|
+
return ' '
|
|
323
|
+
}
|
|
324
|
+
return MCLTheme.focusTextColor[this.classValue as ColorPalette]
|
|
325
|
+
}
|
|
317
326
|
getDisabledTextColorClass(): string {
|
|
318
327
|
if (!this.validateColorType) {
|
|
319
328
|
return ' '
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @Interface - Classes for color, header text, body text, border color, border width(top, left).
|
|
4
4
|
* @Export RDSTheme - an abstract class
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { BodyText, ColorPalette, FontWeight, HeadingSize, OpacityRange, Alignment as Position, Range, SpacingLevel } from './theme.types.js';
|
|
7
7
|
export type ColorClass = {
|
|
8
8
|
[key in ColorPalette]: string;
|
|
9
9
|
};
|
|
@@ -37,6 +37,7 @@ declare abstract class MCLTheme {
|
|
|
37
37
|
protected static bgActiveColor: ColorClass;
|
|
38
38
|
protected static textColor: ColorClass;
|
|
39
39
|
protected static hoverTextColor: ColorClass;
|
|
40
|
+
protected static focusTextColor: ColorClass;
|
|
40
41
|
protected static disabledTextColor: ColorClass;
|
|
41
42
|
protected static svgFillColor: ColorClass;
|
|
42
43
|
protected static ringColor: ColorClass;
|
|
@@ -159,6 +159,26 @@ class MCLTheme {
|
|
|
159
159
|
white: 'hover:text-white',
|
|
160
160
|
transparent: 'hover:text-transparent',
|
|
161
161
|
};
|
|
162
|
+
// focus text color class
|
|
163
|
+
static focusTextColor = {
|
|
164
|
+
primary: 'focus:text-primary',
|
|
165
|
+
secondary: 'focus:text-secondary',
|
|
166
|
+
success: 'focus:text-success',
|
|
167
|
+
danger: 'focus:text-danger',
|
|
168
|
+
info: 'focus:text-info',
|
|
169
|
+
warning: 'focus:text-warning',
|
|
170
|
+
'light-1': 'focus:text-light-1',
|
|
171
|
+
'light-2': 'focus:text-light-2',
|
|
172
|
+
'light-3': 'focus:text-light-3',
|
|
173
|
+
'light-4': 'focus:text-light-4',
|
|
174
|
+
'dark-1': 'focus:text-dark-1',
|
|
175
|
+
'dark-2': 'focus:text-dark-2',
|
|
176
|
+
'dark-3': 'focus:text-dark-3',
|
|
177
|
+
'dark-4': 'focus:text-dark-4',
|
|
178
|
+
black: 'focus:text-black',
|
|
179
|
+
white: 'focus:text-white',
|
|
180
|
+
transparent: 'focus:text-transparent',
|
|
181
|
+
};
|
|
162
182
|
// disabled text color class
|
|
163
183
|
static disabledTextColor = {
|
|
164
184
|
primary: 'disabled:text-primary',
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* @Export RDSTheme - an abstract class
|
|
5
5
|
*/
|
|
6
6
|
import type {
|
|
7
|
-
ColorPalette,
|
|
8
|
-
HeadingSize,
|
|
9
7
|
BodyText,
|
|
8
|
+
ColorPalette,
|
|
10
9
|
FontWeight,
|
|
11
|
-
|
|
10
|
+
HeadingSize,
|
|
12
11
|
OpacityRange,
|
|
13
|
-
SpacingLevel,
|
|
14
12
|
Alignment as Position,
|
|
13
|
+
Range,
|
|
14
|
+
SpacingLevel,
|
|
15
15
|
} from './theme.types.js'
|
|
16
16
|
|
|
17
17
|
export type ColorClass = {
|
|
@@ -200,6 +200,26 @@ abstract class MCLTheme {
|
|
|
200
200
|
white: 'hover:text-white',
|
|
201
201
|
transparent: 'hover:text-transparent',
|
|
202
202
|
}
|
|
203
|
+
// focus text color class
|
|
204
|
+
protected static focusTextColor: ColorClass = {
|
|
205
|
+
primary: 'focus:text-primary',
|
|
206
|
+
secondary: 'focus:text-secondary',
|
|
207
|
+
success: 'focus:text-success',
|
|
208
|
+
danger: 'focus:text-danger',
|
|
209
|
+
info: 'focus:text-info',
|
|
210
|
+
warning: 'focus:text-warning',
|
|
211
|
+
'light-1': 'focus:text-light-1',
|
|
212
|
+
'light-2': 'focus:text-light-2',
|
|
213
|
+
'light-3': 'focus:text-light-3',
|
|
214
|
+
'light-4': 'focus:text-light-4',
|
|
215
|
+
'dark-1': 'focus:text-dark-1',
|
|
216
|
+
'dark-2': 'focus:text-dark-2',
|
|
217
|
+
'dark-3': 'focus:text-dark-3',
|
|
218
|
+
'dark-4': 'focus:text-dark-4',
|
|
219
|
+
black: 'focus:text-black',
|
|
220
|
+
white: 'focus:text-white',
|
|
221
|
+
transparent: 'focus:text-transparent',
|
|
222
|
+
}
|
|
203
223
|
// disabled text color class
|
|
204
224
|
protected static disabledTextColor: ColorClass = {
|
|
205
225
|
primary: 'disabled:text-primary',
|
package/lib/tooltip/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
27
|
};
|
|
28
28
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
29
29
|
[key: string]: any;
|
|
30
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
30
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
31
|
direction: {
|
|
32
32
|
type: PropType<Direction>;
|
|
33
33
|
default: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobbykim/manguito-theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "main theme file for manguito components library. Other MCL components will need to import this file to run.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "vue-tsc --project tsconfig.vue.json && tsc"
|
|
11
|
+
"build": "vue-tsc --project tsconfig.vue.json && tsc --project tsconfig.ts.json"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@vueuse/core": "^10.8.0",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"url": "https://github.com/bobbykim89/manguito-component-library.git"
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "f4be01699f747aba1f831a1f796f8e41e6fcd676"
|
|
34
34
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "../../../tsconfig.json",
|
|
3
|
-
"include": ["./**/*.ts"],
|
|
4
|
-
"exclude": ["node_modules", "./**/*.vue.d.ts"
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"declaration": true
|
|
8
|
-
}
|
|
3
|
+
"include": ["./**/*.ts", "./**/*.vue"],
|
|
4
|
+
"exclude": ["node_modules", "./**/*.vue.d.ts"]
|
|
9
5
|
}
|
package/tsconfig.ts.json
ADDED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|