@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.
Files changed (100) hide show
  1. package/LICENSE +21 -0
  2. package/MIGRATION_GUIDE.md +198 -0
  3. package/README.md +28 -0
  4. package/button/button.d.ts +4 -0
  5. package/button/button.js +39 -0
  6. package/button/button.js.map +1 -0
  7. package/button/button.props.d.ts +34 -0
  8. package/button/button.props.js +3 -0
  9. package/button/button.props.js.map +1 -0
  10. package/button/button.style.d.ts +153 -0
  11. package/button/button.style.js +167 -0
  12. package/button/button.style.js.map +1 -0
  13. package/button/index.d.ts +2 -0
  14. package/button/index.js +6 -0
  15. package/button/index.js.map +1 -0
  16. package/config/colors/control.d.ts +13 -0
  17. package/config/colors/control.js +18 -0
  18. package/config/colors/control.js.map +1 -0
  19. package/config/colors/danger.d.ts +13 -0
  20. package/config/colors/danger.js +18 -0
  21. package/config/colors/danger.js.map +1 -0
  22. package/config/colors/info.d.ts +13 -0
  23. package/config/colors/info.js +18 -0
  24. package/config/colors/info.js.map +1 -0
  25. package/config/colors/primary.d.ts +13 -0
  26. package/config/colors/primary.js +18 -0
  27. package/config/colors/primary.js.map +1 -0
  28. package/config/colors/secondary.d.ts +13 -0
  29. package/config/colors/secondary.js +18 -0
  30. package/config/colors/secondary.js.map +1 -0
  31. package/config/colors/success.d.ts +13 -0
  32. package/config/colors/success.js +18 -0
  33. package/config/colors/success.js.map +1 -0
  34. package/config/colors/tertiary.d.ts +13 -0
  35. package/config/colors/tertiary.js +18 -0
  36. package/config/colors/tertiary.js.map +1 -0
  37. package/config/colors/warning.d.ts +13 -0
  38. package/config/colors/warning.js +18 -0
  39. package/config/colors/warning.js.map +1 -0
  40. package/config/typography/font-family.d.ts +6 -0
  41. package/config/typography/font-family.js +11 -0
  42. package/config/typography/font-family.js.map +1 -0
  43. package/config/typography/font-sizes.d.ts +32 -0
  44. package/config/typography/font-sizes.js +37 -0
  45. package/config/typography/font-sizes.js.map +1 -0
  46. package/config/typography/line-heights.d.ts +32 -0
  47. package/config/typography/line-heights.js +37 -0
  48. package/config/typography/line-heights.js.map +1 -0
  49. package/config/width-height.d.ts +35 -0
  50. package/config/width-height.js +40 -0
  51. package/config/width-height.js.map +1 -0
  52. package/div/div.d.ts +4 -0
  53. package/div/div.js +13 -0
  54. package/div/div.js.map +1 -0
  55. package/div/div.props.d.ts +18 -0
  56. package/div/div.props.js +3 -0
  57. package/div/div.props.js.map +1 -0
  58. package/div/index.d.ts +2 -0
  59. package/div/index.js +6 -0
  60. package/div/index.js.map +1 -0
  61. package/index.d.ts +6 -0
  62. package/index.js +15 -0
  63. package/index.js.map +1 -0
  64. package/loading-indicator/index.d.ts +2 -0
  65. package/loading-indicator/index.js +6 -0
  66. package/loading-indicator/index.js.map +1 -0
  67. package/loading-indicator/loading-indicator.d.ts +4 -0
  68. package/loading-indicator/loading-indicator.js +19 -0
  69. package/loading-indicator/loading-indicator.js.map +1 -0
  70. package/loading-indicator/loading-indicator.props.d.ts +6 -0
  71. package/loading-indicator/loading-indicator.props.js +3 -0
  72. package/loading-indicator/loading-indicator.props.js.map +1 -0
  73. package/loading-indicator/loading-indicator.style.d.ts +39 -0
  74. package/loading-indicator/loading-indicator.style.js +43 -0
  75. package/loading-indicator/loading-indicator.style.js.map +1 -0
  76. package/package.json +59 -0
  77. package/setupTests.d.ts +1 -0
  78. package/setupTests.js +8 -0
  79. package/setupTests.js.map +1 -0
  80. package/tailwind-merge-config.d.ts +2 -0
  81. package/tailwind-merge-config.js +24 -0
  82. package/tailwind-merge-config.js.map +1 -0
  83. package/text/index.d.ts +2 -0
  84. package/text/index.js +6 -0
  85. package/text/index.js.map +1 -0
  86. package/text/text.d.ts +4 -0
  87. package/text/text.js +14 -0
  88. package/text/text.js.map +1 -0
  89. package/text/text.props.d.ts +36 -0
  90. package/text/text.props.js +18 -0
  91. package/text/text.props.js.map +1 -0
  92. package/text/text.style.d.ts +71 -0
  93. package/text/text.style.js +75 -0
  94. package/text/text.style.js.map +1 -0
  95. package/types/index.d.ts +12 -0
  96. package/types/index.js +3 -0
  97. package/types/index.js.map +1 -0
  98. package/ui-kit.css +1144 -0
  99. package/withUiKit.js +130 -0
  100. 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;