@docsplain-kit/core 0.0.1
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/LICENSE +21 -0
- package/MIGRATION_GUIDE.md +198 -0
- package/README.md +28 -0
- package/button/button.d.ts +4 -0
- package/button/button.js +39 -0
- package/button/button.js.map +1 -0
- package/button/button.props.d.ts +34 -0
- package/button/button.props.js +3 -0
- package/button/button.props.js.map +1 -0
- package/button/button.style.d.ts +153 -0
- package/button/button.style.js +167 -0
- package/button/button.style.js.map +1 -0
- package/button/index.d.ts +2 -0
- package/button/index.js +6 -0
- package/button/index.js.map +1 -0
- package/config/colors/control.d.ts +13 -0
- package/config/colors/control.js +18 -0
- package/config/colors/control.js.map +1 -0
- package/config/colors/danger.d.ts +13 -0
- package/config/colors/danger.js +18 -0
- package/config/colors/danger.js.map +1 -0
- package/config/colors/info.d.ts +13 -0
- package/config/colors/info.js +18 -0
- package/config/colors/info.js.map +1 -0
- package/config/colors/primary.d.ts +13 -0
- package/config/colors/primary.js +18 -0
- package/config/colors/primary.js.map +1 -0
- package/config/colors/secondary.d.ts +13 -0
- package/config/colors/secondary.js +18 -0
- package/config/colors/secondary.js.map +1 -0
- package/config/colors/success.d.ts +13 -0
- package/config/colors/success.js +18 -0
- package/config/colors/success.js.map +1 -0
- package/config/colors/tertiary.d.ts +13 -0
- package/config/colors/tertiary.js +18 -0
- package/config/colors/tertiary.js.map +1 -0
- package/config/colors/warning.d.ts +13 -0
- package/config/colors/warning.js +18 -0
- package/config/colors/warning.js.map +1 -0
- package/config/typography/font-family.d.ts +6 -0
- package/config/typography/font-family.js +11 -0
- package/config/typography/font-family.js.map +1 -0
- package/config/typography/font-sizes.d.ts +32 -0
- package/config/typography/font-sizes.js +37 -0
- package/config/typography/font-sizes.js.map +1 -0
- package/config/typography/line-heights.d.ts +32 -0
- package/config/typography/line-heights.js +37 -0
- package/config/typography/line-heights.js.map +1 -0
- package/config/width-height.d.ts +35 -0
- package/config/width-height.js +40 -0
- package/config/width-height.js.map +1 -0
- package/div/div.d.ts +4 -0
- package/div/div.js +13 -0
- package/div/div.js.map +1 -0
- package/div/div.props.d.ts +18 -0
- package/div/div.props.js +3 -0
- package/div/div.props.js.map +1 -0
- package/div/index.d.ts +2 -0
- package/div/index.js +6 -0
- package/div/index.js.map +1 -0
- package/index.d.ts +6 -0
- package/index.js +15 -0
- package/index.js.map +1 -0
- package/loading-indicator/index.d.ts +2 -0
- package/loading-indicator/index.js +6 -0
- package/loading-indicator/index.js.map +1 -0
- package/loading-indicator/loading-indicator.d.ts +4 -0
- package/loading-indicator/loading-indicator.js +19 -0
- package/loading-indicator/loading-indicator.js.map +1 -0
- package/loading-indicator/loading-indicator.props.d.ts +6 -0
- package/loading-indicator/loading-indicator.props.js +3 -0
- package/loading-indicator/loading-indicator.props.js.map +1 -0
- package/loading-indicator/loading-indicator.style.d.ts +39 -0
- package/loading-indicator/loading-indicator.style.js +43 -0
- package/loading-indicator/loading-indicator.style.js.map +1 -0
- package/package.json +59 -0
- package/setupTests.d.ts +1 -0
- package/setupTests.js +8 -0
- package/setupTests.js.map +1 -0
- package/tailwind-merge-config.d.ts +2 -0
- package/tailwind-merge-config.js +24 -0
- package/tailwind-merge-config.js.map +1 -0
- package/text/index.d.ts +2 -0
- package/text/index.js +6 -0
- package/text/index.js.map +1 -0
- package/text/text.d.ts +4 -0
- package/text/text.js +14 -0
- package/text/text.js.map +1 -0
- package/text/text.props.d.ts +36 -0
- package/text/text.props.js +18 -0
- package/text/text.props.js.map +1 -0
- package/text/text.style.d.ts +71 -0
- package/text/text.style.js +75 -0
- package/text/text.style.js.map +1 -0
- package/types/index.d.ts +12 -0
- package/types/index.js +3 -0
- package/types/index.js.map +1 -0
- package/ui-kit.css +1144 -0
- package/withUiKit.js +130 -0
- package/withUiKitV4.js +19 -0
package/withUiKit.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
const { info } = require('./config/colors/info');
|
|
2
|
+
const { primary } = require('./config/colors/primary');
|
|
3
|
+
const { danger } = require('./config/colors/danger');
|
|
4
|
+
const { tertiary } = require('./config/colors/tertiary');
|
|
5
|
+
const { success } = require('./config/colors/success');
|
|
6
|
+
const { warning } = require('./config/colors/warning');
|
|
7
|
+
const { control } = require('./config/colors/control');
|
|
8
|
+
const { secondary } = require('./config/colors/secondary');
|
|
9
|
+
const { fontSizes } = require('./config/typography/font-sizes');
|
|
10
|
+
const { lineHeights } = require('./config/typography/line-heights');
|
|
11
|
+
const { fontFamily } = require('./config/typography/font-family');
|
|
12
|
+
const { widthHeight } = require('./config/width-height');
|
|
13
|
+
|
|
14
|
+
const withUiKit = (tailwindConfig) => {
|
|
15
|
+
return {
|
|
16
|
+
darkMode: 'selector',
|
|
17
|
+
content: [
|
|
18
|
+
'./node_modules/@doc-splain/core/**/*',
|
|
19
|
+
...tailwindConfig.content,
|
|
20
|
+
],
|
|
21
|
+
theme: {
|
|
22
|
+
...tailwindConfig.theme,
|
|
23
|
+
screens: {
|
|
24
|
+
'sm': '640px',
|
|
25
|
+
'md': '1024px',
|
|
26
|
+
'lg': '1200px',
|
|
27
|
+
'at-xs': { 'max': '639px' },
|
|
28
|
+
'at-sm': { 'min': '640px', 'max': '1023px' },
|
|
29
|
+
'at-md': { 'min': '1024px', 'max': '1199px' },
|
|
30
|
+
'at-lg': { 'min': '1200px' },
|
|
31
|
+
'lt-sm': { 'max': '639px' },
|
|
32
|
+
'lt-md': { 'max': '1023px' },
|
|
33
|
+
'lt-lg': { 'max': '1199px' },
|
|
34
|
+
'bw-xs-lg': { 'min': '640px', 'max': '1199px' },
|
|
35
|
+
'gt-xs': { 'min': '640px' },
|
|
36
|
+
'gt-sm': { 'min': '1024px' },
|
|
37
|
+
'gt-md': { 'min': '1200px' },
|
|
38
|
+
...tailwindConfig.theme.screens,
|
|
39
|
+
},
|
|
40
|
+
fontSize: {
|
|
41
|
+
...fontSizes,
|
|
42
|
+
...tailwindConfig.theme.fontSize,
|
|
43
|
+
},
|
|
44
|
+
fontFamily: {
|
|
45
|
+
...fontFamily,
|
|
46
|
+
...tailwindConfig.theme.fontFamily,
|
|
47
|
+
},
|
|
48
|
+
lineHeight: {
|
|
49
|
+
...lineHeights,
|
|
50
|
+
...tailwindConfig.theme.lineHeight,
|
|
51
|
+
},
|
|
52
|
+
minWidth: {
|
|
53
|
+
...widthHeight,
|
|
54
|
+
...tailwindConfig.theme.minWidth,
|
|
55
|
+
},
|
|
56
|
+
minHeight: {
|
|
57
|
+
...widthHeight,
|
|
58
|
+
...tailwindConfig.theme.minHeight,
|
|
59
|
+
},
|
|
60
|
+
extend: {
|
|
61
|
+
...tailwindConfig.theme.extend,
|
|
62
|
+
colors: Object.assign({}, {
|
|
63
|
+
'transparent': 'transparent',
|
|
64
|
+
'white': '#FFFFFF',
|
|
65
|
+
'black': control['800'],
|
|
66
|
+
'grey': control,
|
|
67
|
+
'primary': {
|
|
68
|
+
...primary,
|
|
69
|
+
light: primary['300'],
|
|
70
|
+
DEFAULT: primary['500'],
|
|
71
|
+
dark: primary['700'],
|
|
72
|
+
},
|
|
73
|
+
'secondary': {
|
|
74
|
+
...secondary,
|
|
75
|
+
light: secondary['300'],
|
|
76
|
+
DEFAULT: secondary['500'],
|
|
77
|
+
dark: secondary['700'],
|
|
78
|
+
},
|
|
79
|
+
'tertiary': {
|
|
80
|
+
...tertiary,
|
|
81
|
+
light: tertiary['300'],
|
|
82
|
+
DEFAULT: tertiary['500'],
|
|
83
|
+
dark: tertiary['700'],
|
|
84
|
+
},
|
|
85
|
+
'info': {
|
|
86
|
+
...info,
|
|
87
|
+
light: info['300'],
|
|
88
|
+
DEFAULT: info['500'],
|
|
89
|
+
dark: info['700'],
|
|
90
|
+
},
|
|
91
|
+
'success': {
|
|
92
|
+
...success,
|
|
93
|
+
light: success['300'],
|
|
94
|
+
DEFAULT: success['500'],
|
|
95
|
+
dark: success['700'],
|
|
96
|
+
},
|
|
97
|
+
'warning': {
|
|
98
|
+
...warning,
|
|
99
|
+
light: warning['300'],
|
|
100
|
+
DEFAULT: warning['500'],
|
|
101
|
+
dark: warning['700'],
|
|
102
|
+
},
|
|
103
|
+
'danger': {
|
|
104
|
+
...danger,
|
|
105
|
+
light: danger['300'],
|
|
106
|
+
DEFAULT: danger['500'],
|
|
107
|
+
dark: danger['700'],
|
|
108
|
+
},
|
|
109
|
+
'control': {
|
|
110
|
+
...control,
|
|
111
|
+
light: control['300'],
|
|
112
|
+
DEFAULT: control['500'],
|
|
113
|
+
dark: control['700'],
|
|
114
|
+
},
|
|
115
|
+
}, tailwindConfig.theme.extend.colors),
|
|
116
|
+
height: {
|
|
117
|
+
'dvh': '100dvh',
|
|
118
|
+
},
|
|
119
|
+
direction: {
|
|
120
|
+
'inherit': 'inherit',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
plugins: [
|
|
125
|
+
...tailwindConfig.plugins,
|
|
126
|
+
],
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
module.exports = withUiKit;
|
package/withUiKitV4.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const withUiKitV4 = (tailwindConfig = {}) => {
|
|
2
|
+
return {
|
|
3
|
+
content: [
|
|
4
|
+
'./node_modules/@doc-splain/core/**/*',
|
|
5
|
+
...(tailwindConfig.content || []),
|
|
6
|
+
],
|
|
7
|
+
theme: {
|
|
8
|
+
...tailwindConfig.theme,
|
|
9
|
+
extend: {
|
|
10
|
+
...tailwindConfig.theme?.extend,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
plugins: [
|
|
14
|
+
...(tailwindConfig.plugins || []),
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
module.exports = withUiKitV4;
|