dendelion-ui 0.0.8 → 0.0.10
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/dist/dendelion-ui.cjs.js +2 -2
- package/dist/dendelion-ui.es.js +491 -331
- package/dist/dendelion-ui.umd.js +2 -2
- package/dist/types/components/button/Button.vue.d.ts +3 -3
- package/dist/types/components/button/interface.d.ts +2 -2
- package/dist/types/components/card/Card.vue.d.ts +3 -3
- package/dist/types/components/card/interface.d.ts +3 -3
- package/dist/types/components/modal/Modal.vue.d.ts +5 -0
- package/dist/types/components/modal/interface.d.ts +2 -0
- package/dist/types/components/table/interface.d.ts +2 -2
- package/dist/types/types/backgroundColor.d.ts +25 -0
- package/dist/types/types/buttonColor.d.ts +25 -0
- package/dist/types/types/buttonSize.d.ts +12 -0
- package/dist/types/types/index.d.ts +6 -2
- package/dist/types/types/roundedSize.d.ts +12 -0
- package/dist/types/types/tableSize.d.ts +12 -0
- package/dist/types/types/{color.d.ts → textColor.d.ts} +3 -3
- package/package.json +1 -1
- package/src/components/button/Button.vue +3 -3
- package/src/components/button/interface.ts +2 -2
- package/src/components/card/Card.vue +4 -4
- package/src/components/card/interface.ts +3 -3
- package/src/components/modal/Modal.vue +12 -4
- package/src/components/modal/interface.ts +2 -0
- package/src/components/table/Table.vue +3 -3
- package/src/components/table/interface.ts +2 -2
- package/src/shims-vue.d.ts +0 -1
- package/src/types/backgroundColor.ts +71 -0
- package/src/types/buttonColor.ts +73 -0
- package/src/types/buttonSize.ts +32 -0
- package/src/types/index.ts +6 -2
- package/src/types/roundedSize.ts +32 -0
- package/src/types/tableSize.ts +32 -0
- package/src/types/textColor.ts +71 -0
- package/dist/types/types/size.d.ts +0 -12
- package/src/types/color.ts +0 -72
- package/src/types/size.ts +0 -32
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export enum ButtonColor {
|
|
2
|
+
Primary,
|
|
3
|
+
PrimaryContent,
|
|
4
|
+
Secondary,
|
|
5
|
+
SecondaryContent,
|
|
6
|
+
Accent,
|
|
7
|
+
AccentContent,
|
|
8
|
+
Neutral,
|
|
9
|
+
NeutralContent,
|
|
10
|
+
Base100,
|
|
11
|
+
Base200,
|
|
12
|
+
Base300,
|
|
13
|
+
BaseContent,
|
|
14
|
+
Info,
|
|
15
|
+
InfoContent,
|
|
16
|
+
Success,
|
|
17
|
+
SuccessContent,
|
|
18
|
+
Warning,
|
|
19
|
+
WarningContent,
|
|
20
|
+
Error,
|
|
21
|
+
ErrorContent,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class ButtonColorUtils {
|
|
25
|
+
public static toClassName(color: ButtonColor): string {
|
|
26
|
+
switch (color) {
|
|
27
|
+
case ButtonColor.Primary:
|
|
28
|
+
return "btn-primary";
|
|
29
|
+
case ButtonColor.PrimaryContent:
|
|
30
|
+
return "btn-primary-content";
|
|
31
|
+
case ButtonColor.Secondary:
|
|
32
|
+
return "btn-secondary";
|
|
33
|
+
case ButtonColor.SecondaryContent:
|
|
34
|
+
return "btn-secondary-content";
|
|
35
|
+
case ButtonColor.Accent:
|
|
36
|
+
return "btn-accent";
|
|
37
|
+
case ButtonColor.AccentContent:
|
|
38
|
+
return "btn-accent-content";
|
|
39
|
+
case ButtonColor.Neutral:
|
|
40
|
+
return "btn-neutral";
|
|
41
|
+
case ButtonColor.NeutralContent:
|
|
42
|
+
return "btn-neutral-content";
|
|
43
|
+
case ButtonColor.Base100:
|
|
44
|
+
return "base-100";
|
|
45
|
+
case ButtonColor.Base200:
|
|
46
|
+
return "btn-base-200";
|
|
47
|
+
case ButtonColor.Base300:
|
|
48
|
+
return "btn-base-300";
|
|
49
|
+
case ButtonColor.BaseContent:
|
|
50
|
+
return "btn-base-content";
|
|
51
|
+
case ButtonColor.Info:
|
|
52
|
+
return "btn-info";
|
|
53
|
+
case ButtonColor.InfoContent:
|
|
54
|
+
return "btn-info-content";
|
|
55
|
+
case ButtonColor.Success:
|
|
56
|
+
return "btn-success";
|
|
57
|
+
case ButtonColor.SuccessContent:
|
|
58
|
+
return "btn-success-content";
|
|
59
|
+
case ButtonColor.Warning:
|
|
60
|
+
return "btn-warning";
|
|
61
|
+
case ButtonColor.WarningContent:
|
|
62
|
+
return "btn-warning-content";
|
|
63
|
+
case ButtonColor.Error:
|
|
64
|
+
return "btn-error";
|
|
65
|
+
case ButtonColor.ErrorContent:
|
|
66
|
+
return "btn-error-content";
|
|
67
|
+
default:
|
|
68
|
+
return "btn-base-content";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export enum ButtonSize {
|
|
2
|
+
XS,
|
|
3
|
+
SM,
|
|
4
|
+
MD,
|
|
5
|
+
LG,
|
|
6
|
+
XL,
|
|
7
|
+
TWOXL,
|
|
8
|
+
THREEXL
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class ButtonSizeUtils {
|
|
12
|
+
public static toClassName(size: ButtonSize): string {
|
|
13
|
+
switch (size) {
|
|
14
|
+
case ButtonSize.XS:
|
|
15
|
+
return 'btn-xs'
|
|
16
|
+
case ButtonSize.SM:
|
|
17
|
+
return 'btn-sm'
|
|
18
|
+
case ButtonSize.MD:
|
|
19
|
+
return 'btn-md'
|
|
20
|
+
case ButtonSize.LG:
|
|
21
|
+
return 'btn-lg'
|
|
22
|
+
case ButtonSize.XL:
|
|
23
|
+
return 'btn-xl'
|
|
24
|
+
case ButtonSize.TWOXL:
|
|
25
|
+
return 'btn-2xl'
|
|
26
|
+
case ButtonSize.THREEXL:
|
|
27
|
+
return 'btn-3xl'
|
|
28
|
+
default:
|
|
29
|
+
return 'btn-md'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export enum RoundedSize {
|
|
2
|
+
XS,
|
|
3
|
+
SM,
|
|
4
|
+
MD,
|
|
5
|
+
LG,
|
|
6
|
+
XL,
|
|
7
|
+
TWOXL,
|
|
8
|
+
THREEXL
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class RoundedSizeUtils {
|
|
12
|
+
public static toClassName(size: RoundedSize): string {
|
|
13
|
+
switch (size) {
|
|
14
|
+
case RoundedSize.XS:
|
|
15
|
+
return 'rounded-xs'
|
|
16
|
+
case RoundedSize.SM:
|
|
17
|
+
return 'rounded-sm'
|
|
18
|
+
case RoundedSize.MD:
|
|
19
|
+
return 'rounded-md'
|
|
20
|
+
case RoundedSize.LG:
|
|
21
|
+
return 'rounded-lg'
|
|
22
|
+
case RoundedSize.XL:
|
|
23
|
+
return 'rounded-xl'
|
|
24
|
+
case RoundedSize.TWOXL:
|
|
25
|
+
return 'rounded-2xl'
|
|
26
|
+
case RoundedSize.THREEXL:
|
|
27
|
+
return 'rounded-3xl'
|
|
28
|
+
default:
|
|
29
|
+
return 'rounded-md'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export enum TableSize {
|
|
2
|
+
XS,
|
|
3
|
+
SM,
|
|
4
|
+
MD,
|
|
5
|
+
LG,
|
|
6
|
+
XL,
|
|
7
|
+
TWOXL,
|
|
8
|
+
THREEXL
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class TableSizeUtils {
|
|
12
|
+
public static toClassName(size: TableSize): string {
|
|
13
|
+
switch (size) {
|
|
14
|
+
case TableSize.XS:
|
|
15
|
+
return 'table-xs'
|
|
16
|
+
case TableSize.SM:
|
|
17
|
+
return 'table-sm'
|
|
18
|
+
case TableSize.MD:
|
|
19
|
+
return 'table-md'
|
|
20
|
+
case TableSize.LG:
|
|
21
|
+
return 'table-lg'
|
|
22
|
+
case TableSize.XL:
|
|
23
|
+
return 'table-xl'
|
|
24
|
+
case TableSize.TWOXL:
|
|
25
|
+
return 'table-2xl'
|
|
26
|
+
case TableSize.THREEXL:
|
|
27
|
+
return 'table-3xl'
|
|
28
|
+
default:
|
|
29
|
+
return 'table-md'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export enum TextColor {
|
|
2
|
+
Primary,
|
|
3
|
+
PrimaryContent,
|
|
4
|
+
Secondary,
|
|
5
|
+
SecondaryContent,
|
|
6
|
+
Accent,
|
|
7
|
+
AccentContent,
|
|
8
|
+
Neutral,
|
|
9
|
+
NeutralContent,
|
|
10
|
+
Base100,
|
|
11
|
+
Base200,
|
|
12
|
+
Base300,
|
|
13
|
+
BaseContent,
|
|
14
|
+
Info,
|
|
15
|
+
InfoContent,
|
|
16
|
+
Success,
|
|
17
|
+
SuccessContent,
|
|
18
|
+
Warning,
|
|
19
|
+
WarningContent,
|
|
20
|
+
Error,
|
|
21
|
+
ErrorContent,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class TextColorUtils {
|
|
25
|
+
public static toClassName(color: TextColor): string {
|
|
26
|
+
switch (color) {
|
|
27
|
+
case TextColor.Primary:
|
|
28
|
+
return "text-primary";
|
|
29
|
+
case TextColor.PrimaryContent:
|
|
30
|
+
return "text-primary-content";
|
|
31
|
+
case TextColor.Secondary:
|
|
32
|
+
return "text-secondary";
|
|
33
|
+
case TextColor.SecondaryContent:
|
|
34
|
+
return "text-secondary-content";
|
|
35
|
+
case TextColor.Accent:
|
|
36
|
+
return "text-accent";
|
|
37
|
+
case TextColor.AccentContent:
|
|
38
|
+
return "text-accent-content";
|
|
39
|
+
case TextColor.Neutral:
|
|
40
|
+
return "text-neutral";
|
|
41
|
+
case TextColor.NeutralContent:
|
|
42
|
+
return "text-neutral-content";
|
|
43
|
+
case TextColor.Base100:
|
|
44
|
+
return "base-100";
|
|
45
|
+
case TextColor.Base200:
|
|
46
|
+
return "text-base-200";
|
|
47
|
+
case TextColor.Base300:
|
|
48
|
+
return "text-base-300";
|
|
49
|
+
case TextColor.BaseContent:
|
|
50
|
+
return "text-base-content";
|
|
51
|
+
case TextColor.Info:
|
|
52
|
+
return "text-info";
|
|
53
|
+
case TextColor.InfoContent:
|
|
54
|
+
return "text-info-content";
|
|
55
|
+
case TextColor.Success:
|
|
56
|
+
return "text-success";
|
|
57
|
+
case TextColor.SuccessContent:
|
|
58
|
+
return "text-success-content";
|
|
59
|
+
case TextColor.Warning:
|
|
60
|
+
return "text-warning";
|
|
61
|
+
case TextColor.WarningContent:
|
|
62
|
+
return "text-warning-content";
|
|
63
|
+
case TextColor.Error:
|
|
64
|
+
return "text-error";
|
|
65
|
+
case TextColor.ErrorContent:
|
|
66
|
+
return "text-error-content";
|
|
67
|
+
default:
|
|
68
|
+
return "text-base-content";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
package/src/types/color.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
export enum Color {
|
|
2
|
-
Primary,
|
|
3
|
-
PrimaryContent,
|
|
4
|
-
Secondary,
|
|
5
|
-
SecondaryContent,
|
|
6
|
-
Accent,
|
|
7
|
-
AccentContent,
|
|
8
|
-
Neutral,
|
|
9
|
-
NeutralContent,
|
|
10
|
-
Base100,
|
|
11
|
-
Base200,
|
|
12
|
-
Base300,
|
|
13
|
-
BaseContent,
|
|
14
|
-
Info,
|
|
15
|
-
InfoContent,
|
|
16
|
-
Success,
|
|
17
|
-
SuccessContent,
|
|
18
|
-
Warning,
|
|
19
|
-
WarningContent,
|
|
20
|
-
Error,
|
|
21
|
-
ErrorContent,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class ColorUtils {
|
|
25
|
-
public static toClassName(color: Color): string {
|
|
26
|
-
switch (color) {
|
|
27
|
-
case Color.Primary:
|
|
28
|
-
return 'primary'
|
|
29
|
-
case Color.PrimaryContent:
|
|
30
|
-
return 'primary-content'
|
|
31
|
-
case Color.Secondary:
|
|
32
|
-
return 'secondary'
|
|
33
|
-
case Color.SecondaryContent:
|
|
34
|
-
return 'secondary-content'
|
|
35
|
-
case Color.Accent:
|
|
36
|
-
return 'accent'
|
|
37
|
-
case Color.AccentContent:
|
|
38
|
-
return 'accent-content'
|
|
39
|
-
case Color.Neutral:
|
|
40
|
-
return 'neutral'
|
|
41
|
-
case Color.NeutralContent:
|
|
42
|
-
return 'neutral-content'
|
|
43
|
-
case Color.Base100:
|
|
44
|
-
return 'base-100'
|
|
45
|
-
case Color.Base200:
|
|
46
|
-
return 'base-200'
|
|
47
|
-
case Color.Base300:
|
|
48
|
-
return 'base-300'
|
|
49
|
-
case Color.BaseContent:
|
|
50
|
-
return 'base-content'
|
|
51
|
-
case Color.Info:
|
|
52
|
-
return 'info'
|
|
53
|
-
case Color.InfoContent:
|
|
54
|
-
return 'info-content'
|
|
55
|
-
case Color.Success:
|
|
56
|
-
return 'success'
|
|
57
|
-
case Color.SuccessContent:
|
|
58
|
-
return 'success-content'
|
|
59
|
-
case Color.Warning:
|
|
60
|
-
return 'warning'
|
|
61
|
-
case Color.WarningContent:
|
|
62
|
-
return 'warning-content'
|
|
63
|
-
case Color.Error:
|
|
64
|
-
return 'error'
|
|
65
|
-
case Color.ErrorContent:
|
|
66
|
-
return 'error-content'
|
|
67
|
-
default:
|
|
68
|
-
return 'primary'
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
package/src/types/size.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export enum Size {
|
|
2
|
-
XS,
|
|
3
|
-
SM,
|
|
4
|
-
MD,
|
|
5
|
-
LG,
|
|
6
|
-
XL,
|
|
7
|
-
TWOXL,
|
|
8
|
-
THREEXL
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export class SizeUtils {
|
|
12
|
-
public static toClassName(size: Size): string {
|
|
13
|
-
switch (size) {
|
|
14
|
-
case Size.XS:
|
|
15
|
-
return 'xs'
|
|
16
|
-
case Size.SM:
|
|
17
|
-
return 'sm'
|
|
18
|
-
case Size.MD:
|
|
19
|
-
return 'md'
|
|
20
|
-
case Size.LG:
|
|
21
|
-
return 'lg'
|
|
22
|
-
case Size.XL:
|
|
23
|
-
return 'xl'
|
|
24
|
-
case Size.TWOXL:
|
|
25
|
-
return '2xl'
|
|
26
|
-
case Size.THREEXL:
|
|
27
|
-
return '3xl'
|
|
28
|
-
default:
|
|
29
|
-
return 'md'
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|