@sk-web-gui/core 0.1.11 → 0.1.14
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 -2
- package/src/components/accordion.js +11 -10
- package/src/components/table.js +1 -1
- package/src/components/zebratable.js +59 -0
- package/src/index.js +12 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sk-web-gui/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"postcss-import": "^14.0.2",
|
|
32
32
|
"tailwindcss": "^2.2.4"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "ebb235c3ed87619909da8bd14417e1ccfb2bf594"
|
|
35
35
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
module.exports = Accordion = () => ({
|
|
2
|
-
|
|
3
2
|
".accordion": {
|
|
4
|
-
//"@apply": {},
|
|
5
|
-
//padding: "2.4rem",
|
|
6
|
-
|
|
7
3
|
"@apply border border-gray-stroke": {},
|
|
8
4
|
|
|
9
5
|
"&-header": {
|
|
@@ -19,9 +15,10 @@ module.exports = Accordion = () => ({
|
|
|
19
15
|
},
|
|
20
16
|
|
|
21
17
|
"&-toggle": {
|
|
22
|
-
"@apply flex text-left text-lg
|
|
18
|
+
"@apply flex inline-block text-lg leading-lg text-left text-lg mx-lg my-md": {},
|
|
19
|
+
fontWeight: "bold",
|
|
23
20
|
//"@apply focus-visible:shadow shadow-lg": {},
|
|
24
|
-
"&:focus-visible
|
|
21
|
+
"&:focus-visible": {
|
|
25
22
|
boxShadow: "0 0 0 0.4rem #fff!important",
|
|
26
23
|
outline: "0",
|
|
27
24
|
//"@apply border-4": {},
|
|
@@ -29,13 +26,17 @@ module.exports = Accordion = () => ({
|
|
|
29
26
|
},
|
|
30
27
|
|
|
31
28
|
"&-body": {
|
|
32
|
-
"@apply
|
|
33
|
-
transitionProperty: "height",
|
|
29
|
+
"@apply h-0 overflow-hidden m-lg": {},
|
|
30
|
+
transitionProperty: "height, padding, margin",
|
|
34
31
|
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
35
|
-
transitionDuration: "
|
|
32
|
+
transitionDuration: "180ms",
|
|
33
|
+
|
|
34
|
+
"&[aria-hidden=\"true\"], &[data-hidden=\"true\"]": {
|
|
35
|
+
"@apply my-0": {},
|
|
36
|
+
},
|
|
36
37
|
|
|
37
38
|
"&[aria-hidden=\"false\"], &[data-hidden=\"false\"]": {
|
|
38
|
-
"@apply block h-auto
|
|
39
|
+
"@apply block h-auto": {},
|
|
39
40
|
},
|
|
40
41
|
},
|
|
41
42
|
},
|
package/src/components/table.js
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
module.exports = ZebraTable = () => ({
|
|
2
|
+
".zebratable": {
|
|
3
|
+
"@apply w-full text-left table-auto": {},
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
"&-thead": {
|
|
7
|
+
|
|
8
|
+
"&-tr": {
|
|
9
|
+
"@apply text-sm hidden lg:table-row": {},
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
"&-th": {
|
|
13
|
+
"@apply py-sm first-of-type:pl-lg": {},
|
|
14
|
+
|
|
15
|
+
"&[data-isColumnSortable='true']": {
|
|
16
|
+
"@apply py-sm cursor-pointer": {},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
"&-icon": {
|
|
22
|
+
"&-sort": {
|
|
23
|
+
"@apply ml-2 text-black transform rotate-90": {},
|
|
24
|
+
|
|
25
|
+
"&[data-sortmodeascending='false']": {
|
|
26
|
+
"@apply -rotate-90": {},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"&-more": {
|
|
31
|
+
"@apply pl-sm text-gray-300": {},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
"&-sortbutton": {
|
|
36
|
+
"@apply flex items-center": {},
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
".material-icons-outlined": {
|
|
40
|
+
fontSize: "1.25em",
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
"&-tbody": {
|
|
44
|
+
"@apply lg:bg-white": {},
|
|
45
|
+
|
|
46
|
+
"&-tr": {
|
|
47
|
+
"@apply bg-white lg:even:bg-white lg:odd:bg-gray-100 px-md py-md md:px-lg md:py-lg my-lg first-of-type:mt-0 block shadow-md lg:shadow-none lg:table-row lg:my-0 lg:py-0 lg:px-lg": {},
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
"&-td": {
|
|
51
|
+
"@apply empty:hidden py-4 px-sm lg:px-0 first-of-type:pl-sm lg:first-of-type:pl-lg last-of-type:px-0 lg:last-of-type:pr-lg last-of-type:text-right block lg:table-cell even:bg-white odd:bg-gray-100 last-of-type:bg-transparent lg:even:bg-transparent lg:odd:bg-transparent": {},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
"&-paginationwrapper": {
|
|
56
|
+
"@apply px-lg my-lg w-full text-lg flex justify-center lg:justify-start": {},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
});
|
package/src/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const Button = require("./components/button");
|
|
|
22
22
|
const Accordion = require("./components/accordion");
|
|
23
23
|
const Card = require("./components/card");
|
|
24
24
|
const Table = require("./components/table");
|
|
25
|
+
const ZebraTable = require("./components/zebratable");
|
|
25
26
|
|
|
26
27
|
const Modal = require("./components/modal");
|
|
27
28
|
const CookieConsent = require("./components/cookie-consent");
|
|
@@ -49,6 +50,7 @@ const components = [
|
|
|
49
50
|
Switch,
|
|
50
51
|
|
|
51
52
|
Table,
|
|
53
|
+
ZebraTable,
|
|
52
54
|
CookieConsent,
|
|
53
55
|
Modal,
|
|
54
56
|
|
|
@@ -107,12 +109,15 @@ module.exports = plugin.withOptions(
|
|
|
107
109
|
"h1,h2,h3,h4,h5,h6": {
|
|
108
110
|
"@apply font-bold": {},
|
|
109
111
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
small: {
|
|
113
|
+
fontSize: "1.4rem",
|
|
114
|
+
},
|
|
115
|
+
h1: { "@apply text-3xl leading-3xl": {} },
|
|
116
|
+
h2: { "@apply text-2xl leading-2xl": {} },
|
|
117
|
+
h3: { "@apply text-xl leading-xl": {} },
|
|
118
|
+
h4: { "@apply text-lg leading-lg": {} },
|
|
119
|
+
h5: { "@apply text-base leading-base": {} },
|
|
120
|
+
h6: { "@apply text-sm leading-sm": {} },
|
|
116
121
|
p: { "@apply my-4": {} },
|
|
117
122
|
});
|
|
118
123
|
}
|
|
@@ -139,6 +144,7 @@ module.exports = plugin.withOptions(
|
|
|
139
144
|
gray: {
|
|
140
145
|
DEFAULT: "#4b4b4b",
|
|
141
146
|
stroke: "#939393",
|
|
147
|
+
middle: "#ECECEC",
|
|
142
148
|
light: "#F4F4F4",
|
|
143
149
|
lighter: "#F9F9F9",
|
|
144
150
|
},
|