testio-tailwind 0.5.0 → 0.6.0

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": "testio-tailwind",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Tailwind based design system for Test IO",
5
5
  "scripts": {
6
6
  "clean": "del dist",
@@ -60,6 +60,7 @@
60
60
  @import "components/select2";
61
61
  @import "components/select";
62
62
  @import "components/test_header";
63
+ @import "components/ratingscale";
63
64
 
64
65
  @import "components/customer/customer_header";
65
66
  @import "components/customer/customer_sidebar";
@@ -45,11 +45,15 @@
45
45
  @apply relative flex flex-col bg-card rounded;
46
46
  }
47
47
 
48
+ .card-title {
49
+ @apply block overflow-ellipsis text-heading-5 leading-5;
50
+ }
51
+
48
52
  .card.card-sm {
49
53
  @apply w-full sm:w-card-sm;
50
54
 
51
55
  .card-title {
52
- @apply block overflow-ellipsis text-heading-5 text-center;
56
+ @apply block overflow-ellipsis text-heading-5 leading-5 text-center;
53
57
  }
54
58
  }
55
59
 
@@ -62,7 +66,7 @@
62
66
  }
63
67
 
64
68
  .card-header {
65
- @apply relative px-md pt-md;
69
+ @apply relative px-md py-md;
66
70
  }
67
71
 
68
72
  .card-header .popover_info_icon {
@@ -93,6 +97,10 @@
93
97
  flex: 1 1 1;
94
98
  }
95
99
 
100
+ .card-header ~ .card-body {
101
+ @apply pt-0;
102
+ }
103
+
96
104
  .card.highlight {
97
105
  @apply text-white bg-info border-0;
98
106
 
@@ -146,4 +154,61 @@
146
154
  .card .card-info-popover {
147
155
  @apply absolute right-xxs top-xxs;
148
156
  z-index: 1;
157
+ }
158
+
159
+ /*/// Card badges ///*/
160
+
161
+ .card .card-badge {
162
+ @apply absolute top-0 right-0 overflow-hidden;
163
+ width: 65px;
164
+ height: 65px;
165
+ }
166
+
167
+ .card .card-badge::before {
168
+ @apply absolute block bg-gray-darker;
169
+ content: "";
170
+ transform: rotate(45deg);
171
+ width: 100px;
172
+ height: 25px;
173
+ right: -25px;
174
+ top: 10px;
175
+ }
176
+
177
+ .card .card-badge::after {
178
+ @apply absolute inline-block w-icon-xs h-icon-xs bg-white;
179
+ content: "";
180
+ right: 14px;
181
+ top: 17px;
182
+ mask-image: url("/assets/images/exclamation-circle-filled.svg");
183
+ mask-repeat: no-repeat;
184
+ }
185
+
186
+ .card .card-badge.success {
187
+ &::before {
188
+ @apply bg-success;
189
+ }
190
+ &::after {
191
+ mask-image: url("/assets/images/check-thick.svg");
192
+ right: 16px;
193
+ }
194
+ }
195
+
196
+ .card .card-badge.danger,
197
+ .card .card-badge.high-priority {
198
+ &::before {
199
+ @apply bg-danger;
200
+ }
201
+ &::after {
202
+ mask-image: url("/assets/images/exclamation-circle-filled.svg");
203
+ }
204
+ }
205
+
206
+ .card .card-badge.info,
207
+ .card .card-badge.opportunity {
208
+ &::before {
209
+ @apply bg-info;
210
+ }
211
+ &::after {
212
+ mask-image: url("/assets/images/exclamation-circle-filled.svg");
213
+ }
149
214
  }
@@ -16,7 +16,7 @@
16
16
  }
17
17
 
18
18
  .product-card .card-header {
19
- @apply flex flex-row pl-0 pt-0 bg-card border-0;
19
+ @apply flex flex-row pl-0 py-0 bg-card border-0;
20
20
  }
21
21
 
22
22
  .product-card .card-icon {
@@ -8,29 +8,13 @@
8
8
  }
9
9
 
10
10
  .modal-wrapper[open] .modal-trigger::before {
11
+ @apply fixed w-screen h-screen top-0 left-0 z-10;
11
12
  content: "";
12
- position: fixed;
13
- width: 100vw;
14
- height: 100vh;
15
- top: 0;
16
- left: 0;
17
- z-index: 1;
18
13
  background-color: rgba(0,0,0,.75);
19
14
  }
20
15
 
21
16
  .modal-wrapper[open] .modal-container {
22
- @apply p-lg;
23
- position: fixed;
24
- display: flex;
25
- justify-content: center;
26
- align-items: start;
27
- top: 0;
28
- left: 0;
29
- width: 100vw;
30
- height: 100vh;
31
- overflow-y: scroll;
32
- z-index: 1;
33
- pointer-events: none;
17
+ @apply fixed flex justify-center items-start top-0 left-0 w-screen h-screen p-lg z-20 overflow-y-scroll pointer-events-none;
34
18
  }
35
19
 
36
20
  .modal-wrapper[open] .modal {
@@ -103,3 +87,10 @@
103
87
  background-image: url("/assets/images/btn-disabled-petrol.png");
104
88
  background-repeat: repeat;
105
89
  }
90
+
91
+
92
+ /* prevent autoclosing when clicking on fade bg */
93
+
94
+ .modal-wrapper[open].fade-close-disabled .modal-trigger::before {
95
+ @apply pointer-events-none;
96
+ }
@@ -0,0 +1,24 @@
1
+
2
+ .rating-wrapper {
3
+ @apply flex flex-col min-w-0;
4
+ }
5
+
6
+ .rating-scale {
7
+ @apply grid grid-flow-col gap-xxs md:gap-xs;
8
+ }
9
+
10
+ .rating-scale .selectable-token {
11
+ @apply w-full;
12
+ }
13
+
14
+ .rating-scale .selectable-token label {
15
+ @apply justify-center w-full px-xxs;
16
+ }
17
+
18
+ .rating-labels {
19
+ @apply flex justify-between mt-xxs text-label text-label-color leading-tight;
20
+ }
21
+
22
+ .rating-labels .label-max {
23
+ @apply text-right;
24
+ }
@@ -195,29 +195,3 @@
195
195
  @apply block text-icon-xl h-icon-xl my-xs;
196
196
  }
197
197
  }
198
-
199
- /*/ Rating scale /*/
200
-
201
- .rating-wrapper {
202
- @apply flex flex-col min-w-0;
203
- }
204
-
205
- .rating-scale {
206
- @apply grid grid-flow-col gap-xs;
207
- }
208
-
209
- .rating-scale .selectable-token {
210
- @apply w-full;
211
- }
212
-
213
- .rating-scale .selectable-token label {
214
- @apply justify-center w-full;
215
- }
216
-
217
- .rating-labels {
218
- @apply flex justify-between mt-xxs text-label text-label-color leading-tight;
219
- }
220
-
221
- .rating-labels .label-max {
222
- @apply text-right;
223
- }
@@ -37,47 +37,6 @@
37
37
  @apply inline-block w-xxl h-xxl rounded overflow-hidden shadow;
38
38
  }
39
39
 
40
- .tester-card .card-badge {
41
- @apply absolute top-0 right-0;
42
- }
43
-
44
- .tester-card .card-badge::before {
45
- @apply absolute block bg-gray-darker;
46
- content: "";
47
- transform: rotate(45deg);
48
- width: 100px;
49
- height: 25px;
50
- right: -25px;
51
- top: 10px;
52
- }
53
-
54
- .tester-card .card-badge::after {
55
- @apply absolute inline-block w-icon-xs h-icon-xs bg-white;
56
- content: "";
57
- right: 14px;
58
- top: 17px;
59
- mask-image: url("/assets/images/exclamation-circle-filled.svg");
60
- mask-repeat: no-repeat;
61
- }
62
-
63
- .tester-card .card-badge.high-priority {
64
- &::before {
65
- @apply bg-danger;
66
- }
67
- &::after {
68
- mask-image: url("/assets/images/exclamation-circle-filled.svg");
69
- }
70
- }
71
-
72
- .tester-card .card-badge.opportunity {
73
- &::before {
74
- @apply bg-info;
75
- }
76
- &::after {
77
- mask-image: url("/assets/images/verify-exclamation.svg");
78
- }
79
- }
80
-
81
40
  .tester-card .card-label {
82
41
  @apply text-xs;
83
42
  }
@@ -0,0 +1,30 @@
1
+ ---
2
+ tags: components
3
+ title: Card badges
4
+ ---
5
+
6
+ .grid-cards
7
+ .card
8
+ .card-header
9
+ .card-badge
10
+ %h3.card-title Card with badge
11
+ .card-body
12
+ %p Card-body with some example content Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
13
+ .card
14
+ .card-header
15
+ .card-badge.success
16
+ %h3.card-title Card with success badge
17
+ .card-body
18
+ %p Card-body with some example content Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
19
+ .card
20
+ .card-header
21
+ .card-badge.danger
22
+ %h3.card-title Card with danger badge
23
+ .card-body
24
+ %p Card-body with some example content Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
25
+ .card
26
+ .card-header
27
+ .card-badge.info
28
+ %h3.card-title Card with info badge
29
+ .card-body
30
+ %p Card-body with some example content Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
@@ -3,7 +3,10 @@ tags: components
3
3
  title: Modal - based on details tag
4
4
  ---
5
5
 
6
- %p.mb-heading Add the class .modal-close-btn to an element to make it close it's parent modal.
6
+ %p.mb-heading
7
+ Add the class
8
+ %code.bg-gray-lighter.rounded.mx-xxs .modal-close-btn
9
+ to an element to make it close it's parent modal.
7
10
 
8
11
  %details.modal-wrapper.mb-md
9
12
  %summary.modal-trigger
@@ -64,5 +67,28 @@ title: Modal - based on details tag
64
67
  %a.btn.btn-success{href:''} Success
65
68
  %a.btn.btn-danger{href:''} Danger
66
69
  %a.btn.btn-secondary.close-btn{href:''} Close
67
-
68
-
70
+ %p.mb-heading.mt-md
71
+ If you want a modal that doesn't close automatically when clicking on the fade background, then add the class
72
+ %code.bg-gray-lighter.rounded.mx-xxs .fade-close-disabled
73
+ to the
74
+ %code.bg-gray-lighter.rounded.mx-xxs .modal-wrapper
75
+ . This might be the case when you want to force the user to click a button to close the modal.
76
+ %details.modal-wrapper.fade-close-disabled
77
+ %summary.modal-trigger
78
+ .btn.btn-primary Open modal with auto closing disabled.
79
+ .modal-container
80
+ .modal
81
+ .modal-header
82
+ %h2.modal-title Modal
83
+ .btn.btn-square.close-btn
84
+ .icon.icon-cross
85
+ .modal-content
86
+ %p.mb-xs Some cool modal content going on here: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
87
+ .form-grid
88
+ .form-group
89
+ %label.form-label Input
90
+ %input.form-control{type:'text', placeholder:''}
91
+ .modal-footer
92
+ %a.btn.btn-primary{href:''} Primary
93
+ %a.btn.btn-secondary{href:''} Secondary
94
+ %a.btn.btn-secondary.close-btn{href:''} Close
@@ -25,7 +25,7 @@ title: Form card
25
25
  %textarea.form-control{rows:'1', placeholder:"Enter some long form content"}
26
26
  .form-group.form-select
27
27
  %label.form-label Select
28
- %select{placeholder: "Please select"}
28
+ %select.tom-select{placeholder: "Please select"}
29
29
  %option{value: ""}
30
30
  %option{value:"Option 1"} Option 1
31
31
  %option{value:"Option 2"} Option 2