@sk-web-gui/core 0.1.9 → 0.1.12

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sk-web-gui/core",
3
- "version": "0.1.9",
3
+ "version": "0.1.12",
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": "cc78666be80b991b22524f2abdaddd24bc00d418"
34
+ "gitHead": "5fe44be8bf968a1a252dfbec38ee2e164339b50b"
35
35
  }
@@ -0,0 +1,70 @@
1
+ module.exports = Pagination = () => ({
2
+ ".pagination": {
3
+ "@apply select-none": {},
4
+
5
+ "&-sm": {
6
+ "@apply text-xs": {},
7
+ },
8
+
9
+ "&-md": {
10
+ "@apply text-lg": {},
11
+ },
12
+
13
+ "&-lg": {
14
+ "@apply text-xl": {},
15
+ },
16
+
17
+ "&-list": {
18
+ "@apply flex items-baseline": {},
19
+ },
20
+
21
+ "&-pageLabel": {
22
+ "@apply cursor-pointer m-sm": {},
23
+ width: "1.5em",
24
+ height: "1.75em",
25
+
26
+ "&[aria-disabled='true']": {
27
+ "@apply border-primary border-b cursor-default text-primary": {},
28
+ },
29
+ },
30
+
31
+ "&-prevNextButton": {
32
+ "@apply ml-4 inline-flex items-center sm:w-auto inline-flex flex-row leading-none":
33
+ {},
34
+
35
+ "&[data-reverse=true]": {
36
+ "@apply mr-4 ml-0 flex-row-reverse": {},
37
+
38
+ ".pagination-prevNextButton-label": {
39
+ "@apply mr-sm ml-0": {},
40
+ },
41
+ },
42
+
43
+ "&[disabled]": {
44
+ "@apply opacity-50 cursor-default": {},
45
+ },
46
+
47
+ "&[disabled='false']": {
48
+ "&-label, &-icon": {
49
+ "@apply cursor-pointer": {},
50
+ },
51
+ },
52
+
53
+ "&-label": {
54
+ "@apply hidden sm:inline ml-sm leading-none": {},
55
+ },
56
+
57
+ "&-icon": {
58
+ "@apply m-1 align-text-bottom leading-none flex items-center": {},
59
+
60
+ ".material-icons-outlined": {
61
+ fontSize: ".675em",
62
+ },
63
+ },
64
+ },
65
+
66
+ "&-ellipsis": {
67
+ "@apply inline-block w-16 text-center": {},
68
+ },
69
+ },
70
+ });
@@ -10,4 +10,4 @@ module.exports = Table = () => ({
10
10
  }
11
11
  }
12
12
  },
13
- });
13
+ });
@@ -53,7 +53,7 @@ module.exports = Tag = (colors) => ({
53
53
  borderRadius: "3.2rem",
54
54
 
55
55
  "&-text": {
56
- padding: "0.4285em 0"
56
+ padding: "0.5em 0"
57
57
  },
58
58
 
59
59
  "&-sm": {
@@ -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");
@@ -30,6 +31,7 @@ const Divider = require("./components/divider");
30
31
  const UserMenu = require("./components/user-menu");
31
32
 
32
33
  const Tag = require("./components/tag");
34
+ const Pagination = require("./components/pagination");
33
35
 
34
36
  const components = [
35
37
  Alert,
@@ -48,6 +50,7 @@ const components = [
48
50
  Switch,
49
51
 
50
52
  Table,
53
+ ZebraTable,
51
54
  CookieConsent,
52
55
  Modal,
53
56
 
@@ -58,6 +61,7 @@ const components = [
58
61
  UserMenu,
59
62
 
60
63
  Tag,
64
+ Pagination,
61
65
  ];
62
66
 
63
67
  const defaultColors = ["primary", "secondary"];
@@ -148,6 +152,7 @@ module.exports = plugin.withOptions(
148
152
  base: "var(--vc-cursor)",
149
153
  },
150
154
  spacing: {
155
+ xs: "4px",
151
156
  sm: "8px",
152
157
  md: "16px",
153
158
  lg: "24px",