adnbn-ui 0.2.0 → 0.2.2
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 +2 -5
- package/src/components/Avatar/avatar.module.scss +1 -0
- package/src/components/Button/button.module.scss +1 -1
- package/src/components/Highlight/highlight.module.scss +1 -0
- package/src/components/ListItem/list-item.module.scss +1 -0
- package/src/components/Tag/tag.module.scss +1 -1
- package/src/components/TextArea/text-area.module.scss +1 -1
- package/src/components/TextField/text-field.module.scss +1 -1
- package/src/components/Tooltip/tooltip.module.scss +1 -0
- package/src/plugin/builder/StyleBuilder.ts +1 -0
- package/src/plugin/builder/virtual.config.ts +0 -2
- package/src/providers/index.ts +1 -1
- package/src/providers/theme/ThemeProvider.tsx +0 -3
- package/src/providers/{UIProvider.tsx → ui/UIProvider.tsx} +6 -2
- package/src/providers/ui/index.ts +1 -0
- package/src/providers/{theme → ui}/styles/default.scss +1 -1
- package/src/providers/ui/styles/reset.scss +128 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adnbn-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "A comprehensive React UI component library designed exclusively for the AddonBone browser extension framework with customizable theming and consistent design patterns",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -32,9 +32,6 @@
|
|
|
32
32
|
],
|
|
33
33
|
"plugin": [
|
|
34
34
|
"./src/plugin/index.ts"
|
|
35
|
-
],
|
|
36
|
-
"theme": [
|
|
37
|
-
"./src/styles/mixins.scss"
|
|
38
35
|
]
|
|
39
36
|
}
|
|
40
37
|
},
|
|
@@ -58,7 +55,7 @@
|
|
|
58
55
|
"format": "prettier --write ."
|
|
59
56
|
},
|
|
60
57
|
"dependencies": {
|
|
61
|
-
"adnbn": "^0.
|
|
58
|
+
"adnbn": "^0.1.3",
|
|
62
59
|
"autosize": "^6.0.1",
|
|
63
60
|
"classnames": "^2.5.1",
|
|
64
61
|
"odometer": "^0.4.8",
|
|
@@ -69,6 +69,7 @@ $root: avatar;
|
|
|
69
69
|
align-items: center;
|
|
70
70
|
justify-content: center;
|
|
71
71
|
color: var(--avatar-fallback-color);
|
|
72
|
+
line-height: var(--fallback-line-height, var(--line-height, 1 rem));
|
|
72
73
|
background-color: var(--avatar-fallback-bg-color, var(--avatar-bg-color));
|
|
73
74
|
border-width: var(--avatar-fallback-border-width, var(--avatar-border-width));
|
|
74
75
|
border-color: var(--avatar-fallback-border-color, var(--avatar-border-color));
|
|
@@ -5,7 +5,7 @@ $root: button;
|
|
|
5
5
|
font-weight: var(--button-font-weight, 500);
|
|
6
6
|
font-size: var(--button-font-size, var(--font-size, 14px));
|
|
7
7
|
letter-spacing: var(--button-letter-spacing, 0.5px);
|
|
8
|
-
line-height: var(--button-line-height, var(--line-height,
|
|
8
|
+
line-height: var(--button-line-height, var(--line-height, 1 rem));
|
|
9
9
|
height: var(--button-height, 34px);
|
|
10
10
|
border-radius: var(--button-border-radius, 10px);
|
|
11
11
|
padding: var(--button-padding, 0 16px);
|
|
@@ -4,6 +4,7 @@ $root: highlight;
|
|
|
4
4
|
font-size: var(--highlight-font-size, inherit);
|
|
5
5
|
font-weight: var(--highlight-font-weight, inherit);
|
|
6
6
|
font-family: var(--highlight-font-family, inherit), sans-serif;
|
|
7
|
+
line-height: var(--highlight-line-height, var(--line-height, 1 rem));
|
|
7
8
|
color: var(--highlight-color, #fff);
|
|
8
9
|
background-color: var(--highlight-bg-color, #ffd60a);
|
|
9
10
|
padding: var(--highlight-y-padding, 2px) var(--highlight-x-padding, 3px);
|
|
@@ -7,7 +7,7 @@ $root: tag;
|
|
|
7
7
|
justify-content: center;
|
|
8
8
|
font-size: var(--tag-font-size, 13px);
|
|
9
9
|
font-weight: var(--tag-font-weight, 500);
|
|
10
|
-
line-height: var(--tag-line-height,
|
|
10
|
+
line-height: var(--tag-line-height, var(--line-height, 1 rem));
|
|
11
11
|
letter-spacing: var(--tag-letter-spacing, 0.5px);
|
|
12
12
|
padding: var(--tag-padding, 4px 8px);
|
|
13
13
|
border-radius: var(--tag-border-radius, 999px);
|
|
@@ -7,7 +7,7 @@ $root: text-area;
|
|
|
7
7
|
font-weight: var(--text-area-font-weight, 400);
|
|
8
8
|
font-size: var(--text-area-font-size, 14px);
|
|
9
9
|
letter-spacing: var(--text-area-letter-spacing, 0.5px);
|
|
10
|
-
line-height: var(--text-area-line-height,
|
|
10
|
+
line-height: var(--text-area-line-height, var(--line-height, 1 rem));
|
|
11
11
|
padding: var(--text-area-padding, 8px 12px);
|
|
12
12
|
border-radius: var(--text-area-border-radius, 8px);
|
|
13
13
|
min-width: var(--text-area-min-width, 200px);
|
|
@@ -8,7 +8,7 @@ $root: text-field;
|
|
|
8
8
|
font-weight: var(--text-field-font-weight, 400);
|
|
9
9
|
font-size: var(--text-field-font-size, 14px);
|
|
10
10
|
letter-spacing: var(--text-field-letter-spacing, 0.5px);
|
|
11
|
-
line-height: var(--text-field-line-height,
|
|
11
|
+
line-height: var(--text-field-line-height, var(--line-height, 1 rem));
|
|
12
12
|
padding: var(--text-field-padding, 8px 12px);
|
|
13
13
|
border-radius: var(--text-field-border-radius, 8px);
|
|
14
14
|
transition:
|
|
@@ -6,6 +6,7 @@ $root: tooltip;
|
|
|
6
6
|
font-family: var(--tooltip-font-family, var(--font-family)), sans-serif;
|
|
7
7
|
font-weight: var(--tooltip-font-weight, 500);
|
|
8
8
|
font-size: var(--tooltip-font-size, var(--font-size, 14px));
|
|
9
|
+
line-height: var(--tooltip-line-height, var(--line-height, 1 rem));
|
|
9
10
|
color: var(--tooltip-color, var(--text-secondary-color));
|
|
10
11
|
background-color: var(--tooltip-bg-color, var(--bg-secondary-color));
|
|
11
12
|
border-radius: var(--tooltip-border-radius, 5px);
|
package/src/providers/index.ts
CHANGED
|
@@ -5,9 +5,6 @@ import {ThemeContext} from "./context";
|
|
|
5
5
|
import {Theme} from "../../types/theme";
|
|
6
6
|
import {Config} from "../../types/config";
|
|
7
7
|
|
|
8
|
-
import "./styles/reset.scss";
|
|
9
|
-
import "./styles/default.scss";
|
|
10
|
-
|
|
11
8
|
const isDarkMedia = () => window?.matchMedia("(prefers-color-scheme: dark)")?.matches;
|
|
12
9
|
|
|
13
10
|
const ThemeProvider: FC<PropsWithChildren<Pick<Config, "components">>> = ({children, components}) => {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import React, {FC, PropsWithChildren} from "react";
|
|
2
2
|
import {merge} from "ts-deepmerge";
|
|
3
3
|
|
|
4
|
-
import {ExtraProvider, IconsProvider, ThemeProvider} from "
|
|
4
|
+
import {ExtraProvider, IconsProvider, ThemeProvider} from "../index";
|
|
5
5
|
|
|
6
|
-
import {ComponentsProps, Config, ExtraProps, Icons} from "
|
|
6
|
+
import {ComponentsProps, Config, ExtraProps, Icons} from "../../types/config";
|
|
7
|
+
|
|
8
|
+
import "./styles/default.scss";
|
|
9
|
+
import "./styles/reset.scss";
|
|
10
|
+
import "adnbn-ui-style.scss";
|
|
7
11
|
|
|
8
12
|
import config from "adnbn-ui-config";
|
|
9
13
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {default as UIProvider, type UIProviderProps} from "./UIProvider";
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
a,
|
|
2
|
+
abbr,
|
|
3
|
+
acronym,
|
|
4
|
+
address,
|
|
5
|
+
applet,
|
|
6
|
+
article,
|
|
7
|
+
aside,
|
|
8
|
+
audio,
|
|
9
|
+
b,
|
|
10
|
+
big,
|
|
11
|
+
blockquote,
|
|
12
|
+
body,
|
|
13
|
+
canvas,
|
|
14
|
+
caption,
|
|
15
|
+
center,
|
|
16
|
+
cite,
|
|
17
|
+
code,
|
|
18
|
+
dd,
|
|
19
|
+
del,
|
|
20
|
+
details,
|
|
21
|
+
dfn,
|
|
22
|
+
div,
|
|
23
|
+
dl,
|
|
24
|
+
dt,
|
|
25
|
+
em,
|
|
26
|
+
embed,
|
|
27
|
+
fieldset,
|
|
28
|
+
figcaption,
|
|
29
|
+
figure,
|
|
30
|
+
footer,
|
|
31
|
+
form,
|
|
32
|
+
h1,
|
|
33
|
+
h2,
|
|
34
|
+
h3,
|
|
35
|
+
h4,
|
|
36
|
+
h5,
|
|
37
|
+
h6,
|
|
38
|
+
header,
|
|
39
|
+
hgroup,
|
|
40
|
+
html,
|
|
41
|
+
i,
|
|
42
|
+
iframe,
|
|
43
|
+
img,
|
|
44
|
+
ins,
|
|
45
|
+
kbd,
|
|
46
|
+
label,
|
|
47
|
+
legend,
|
|
48
|
+
li,
|
|
49
|
+
main,
|
|
50
|
+
mark,
|
|
51
|
+
menu,
|
|
52
|
+
nav,
|
|
53
|
+
object,
|
|
54
|
+
ol,
|
|
55
|
+
output,
|
|
56
|
+
p,
|
|
57
|
+
pre,
|
|
58
|
+
q,
|
|
59
|
+
ruby,
|
|
60
|
+
s,
|
|
61
|
+
samp,
|
|
62
|
+
section,
|
|
63
|
+
small,
|
|
64
|
+
span,
|
|
65
|
+
strike,
|
|
66
|
+
strong,
|
|
67
|
+
sub,
|
|
68
|
+
summary,
|
|
69
|
+
sup,
|
|
70
|
+
table,
|
|
71
|
+
tbody,
|
|
72
|
+
td,
|
|
73
|
+
tfoot,
|
|
74
|
+
th,
|
|
75
|
+
thead,
|
|
76
|
+
time,
|
|
77
|
+
tr,
|
|
78
|
+
tt,
|
|
79
|
+
u,
|
|
80
|
+
ul,
|
|
81
|
+
var,
|
|
82
|
+
video {
|
|
83
|
+
margin: 0;
|
|
84
|
+
padding: 0;
|
|
85
|
+
border: 0;
|
|
86
|
+
vertical-align: baseline;
|
|
87
|
+
outline: none !important;
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
article,
|
|
92
|
+
aside,
|
|
93
|
+
details,
|
|
94
|
+
figcaption,
|
|
95
|
+
figure,
|
|
96
|
+
footer,
|
|
97
|
+
header,
|
|
98
|
+
hgroup,
|
|
99
|
+
main,
|
|
100
|
+
menu,
|
|
101
|
+
nav,
|
|
102
|
+
section {
|
|
103
|
+
display: block;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
input:focus,
|
|
107
|
+
select:focus,
|
|
108
|
+
textarea:focus,
|
|
109
|
+
button:focus {
|
|
110
|
+
outline: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
body {
|
|
114
|
+
background-color: var(--bg-primary-color);
|
|
115
|
+
color: var(--text-primary-color);
|
|
116
|
+
font-family: var(--font-family), "sans-serif";
|
|
117
|
+
font-size: var(--font-size);
|
|
118
|
+
font-weight: var(--font-weight);
|
|
119
|
+
line-height: var(--line-height);
|
|
120
|
+
letter-spacing: var(--letter-spacing);
|
|
121
|
+
-webkit-font-smoothing: antialiased;
|
|
122
|
+
-moz-osx-font-smoothing: grayscale;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
will-change: background-color, color;
|
|
125
|
+
transition:
|
|
126
|
+
background-color var(--transition-speed-md),
|
|
127
|
+
color var(--transition-speed-md);
|
|
128
|
+
}
|