@sk-web-gui/core 0.1.10 → 0.1.13

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.10",
3
+ "version": "0.1.13",
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": "da8619c184a97813b2065c8053487ec0156d54d4"
34
+ "gitHead": "23cd898ff3d845c794ff3daa56aea2a24ee83463"
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
+ });
@@ -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"];
@@ -105,12 +109,15 @@ module.exports = plugin.withOptions(
105
109
  "h1,h2,h3,h4,h5,h6": {
106
110
  "@apply font-bold": {},
107
111
  },
108
- h1: { "@apply text-5xl leading-5xl": {} },
109
- h2: { "@apply text-4xl leading-4xl": {} },
110
- h3: { "@apply text-3xl leading-3xl": {} },
111
- h4: { "@apply text-2xl leading-2xl": {} },
112
- h5: { "@apply text-xl leading-xl": {} },
113
- h6: { "@apply text-lg leading-lg": {} },
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": {} },
114
121
  p: { "@apply my-4": {} },
115
122
  });
116
123
  }
@@ -137,6 +144,7 @@ module.exports = plugin.withOptions(
137
144
  gray: {
138
145
  DEFAULT: "#4b4b4b",
139
146
  stroke: "#939393",
147
+ middle: "#ECECEC",
140
148
  light: "#F4F4F4",
141
149
  lighter: "#F9F9F9",
142
150
  },
@@ -148,6 +156,7 @@ module.exports = plugin.withOptions(
148
156
  base: "var(--vc-cursor)",
149
157
  },
150
158
  spacing: {
159
+ xs: "4px",
151
160
  sm: "8px",
152
161
  md: "16px",
153
162
  lg: "24px",