@progressio_resources/gravity-design-system 1.0.6 → 1.0.7
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/esm2020/lib/components/gravity-button/gravity-button.component.mjs +22 -0
- package/esm2020/lib/components/gravity-calendar/gravity-calendar.component.mjs +90 -0
- package/esm2020/lib/components/gravity-checkbox/gravity-checkbox.component.mjs +23 -0
- package/esm2020/lib/components/gravity-dropdown-list/gravity-dropdown-list.component.mjs +43 -0
- package/esm2020/lib/components/gravity-radio-button/gravity-radio-button.component.mjs +30 -0
- package/esm2020/lib/components/gravity-switch/gravity-switch.component.mjs +17 -0
- package/esm2020/lib/components/gravity-text-field/gravity-text-field.component.mjs +62 -0
- package/esm2020/lib/gravity-design-system.module.mjs +76 -6
- package/esm2020/lib/vendor/gravity-tooltip/gravity-tooltip.component.mjs +205 -0
- package/esm2020/lib/vendor/gravity-tooltip/gravity-tooltip.directive.mjs +480 -0
- package/esm2020/lib/vendor/gravity-tooltip/gravity-tooltip.module.mjs +41 -0
- package/esm2020/lib/vendor/gravity-tooltip/index.mjs +4 -0
- package/esm2020/lib/vendor/gravity-tooltip/options.interface.mjs +2 -0
- package/esm2020/lib/vendor/gravity-tooltip/options.mjs +38 -0
- package/esm2020/lib/vendor/gravity-tooltip/options.service.mjs +7 -0
- package/esm2020/public-api.mjs +11 -3
- package/fesm2015/progressio_resources-gravity-design-system.mjs +1085 -28
- package/fesm2015/progressio_resources-gravity-design-system.mjs.map +1 -1
- package/fesm2020/progressio_resources-gravity-design-system.mjs +1083 -28
- package/fesm2020/progressio_resources-gravity-design-system.mjs.map +1 -1
- package/lib/components/gravity-button/gravity-button.component.d.ts +17 -0
- package/lib/components/gravity-calendar/gravity-calendar.component.d.ts +40 -0
- package/lib/components/gravity-checkbox/gravity-checkbox.component.d.ts +8 -0
- package/lib/components/gravity-dropdown-list/gravity-dropdown-list.component.d.ts +36 -0
- package/lib/components/gravity-radio-button/gravity-radio-button.component.d.ts +13 -0
- package/lib/components/gravity-switch/gravity-switch.component.d.ts +6 -0
- package/lib/components/gravity-text-field/gravity-text-field.component.d.ts +35 -0
- package/lib/gravity-design-system.module.d.ts +16 -2
- package/lib/vendor/gravity-tooltip/gravity-tooltip.component.d.ts +42 -0
- package/lib/vendor/gravity-tooltip/gravity-tooltip.directive.d.ts +112 -0
- package/lib/vendor/gravity-tooltip/gravity-tooltip.module.d.ts +12 -0
- package/lib/vendor/gravity-tooltip/index.d.ts +3 -0
- package/lib/vendor/gravity-tooltip/options.d.ts +24 -0
- package/lib/vendor/gravity-tooltip/options.interface.d.ts +40 -0
- package/lib/vendor/gravity-tooltip/options.service.d.ts +7 -0
- package/package.json +9 -2
- package/public-api.d.ts +8 -2
- package/src/lib/assets/icons/calendar.svg +14 -0
- package/src/lib/assets/icons/check.svg +3 -0
- package/src/lib/assets/icons/copy.svg +8 -0
- package/src/lib/assets/icons/download.svg +7 -0
- package/src/lib/assets/icons/edit.svg +8 -0
- package/src/lib/assets/icons/eye_closed.svg +8 -0
- package/src/lib/assets/icons/eye_open.svg +6 -0
- package/src/lib/assets/icons/forgot_password.svg +7 -0
- package/src/lib/assets/icons/lock.svg +6 -0
- package/src/lib/assets/icons/logout.svg +9 -0
- package/src/lib/assets/icons/mail.svg +6 -0
- package/src/lib/assets/icons/radio-off.svg +3 -0
- package/src/lib/assets/icons/radio-on.svg +3 -0
- package/src/lib/assets/icons/search.svg +8 -0
- package/src/lib/assets/icons/settings.svg +12 -0
- package/src/lib/assets/icons/show_less.svg +6 -0
- package/src/lib/assets/icons/show_more.svg +6 -0
- package/src/lib/assets/icons/uncheck.svg +3 -0
- package/src/lib/assets/icons/user.svg +6 -0
- package/src/lib/assets/icons/x.svg +6 -0
- package/src/lib/assets/json/icons.json +91 -0
- package/src/lib/styles/_card_highlight.scss +40 -0
- package/src/lib/styles/_datepicker.scss +101 -0
- package/src/lib/styles/_icons.scss +11 -0
- package/src/lib/styles/_link.scss +25 -0
- package/src/lib/styles/_shared.scss +19 -0
- package/src/lib/styles/fundamentals/colors/themes/_hero.theme.scss +13 -10
- package/src/lib/styles/fundamentals/colors/tokens/_hero.tokens.scss +15 -13
- package/src/lib/styles/fundamentals/typography/_hero.typography.scss +0 -1
- package/src/lib/styles/gravity-design-system.scss +7 -0
- package/src/lib/styles/overwrite/pretty-checkbox/_core.scss +120 -0
- package/src/lib/styles/overwrite/pretty-checkbox/_variables.scss +39 -0
- package/src/lib/styles/overwrite/pretty-checkbox/elements/default/_outline.scss +41 -0
- package/src/lib/styles/overwrite/pretty-checkbox/elements/switch/_fill.scss +7 -0
- package/src/lib/styles/overwrite/pretty-checkbox/elements/switch/_general.scss +47 -0
- package/src/lib/styles/overwrite/pretty-checkbox/elements/switch/_mixin.scss +15 -0
- package/src/lib/styles/overwrite/pretty-checkbox/pretty-checkbox.scss +29 -0
- package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.html +9 -0
- package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.sass +134 -0
- package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.ts +215 -0
- package/src/lib/vendor/gravity-tooltip/gravity-tooltip.directive.ts +506 -0
- package/src/lib/vendor/gravity-tooltip/gravity-tooltip.module.ts +33 -0
- package/src/lib/vendor/gravity-tooltip/index.ts +3 -0
- package/src/lib/vendor/gravity-tooltip/options.interface.ts +37 -0
- package/src/lib/vendor/gravity-tooltip/options.service.ts +8 -0
- package/src/lib/vendor/gravity-tooltip/options.ts +38 -0
- package/esm2020/lib/gravity-design-system.component.mjs +0 -19
- package/esm2020/lib/gravity-design-system.service.mjs +0 -11
- package/lib/gravity-design-system.component.d.ts +0 -5
- package/lib/gravity-design-system.service.d.ts +0 -5
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.gravity-link {
|
|
2
|
+
color: var(--link-color);
|
|
3
|
+
text-decoration: underline;
|
|
4
|
+
text-decoration-color: var(--link-underline-color);
|
|
5
|
+
|
|
6
|
+
&:not([disabled]) {
|
|
7
|
+
--link-color: var(--link-active-primary);
|
|
8
|
+
--link-underline-color: var(--link-active-primary);
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
background-color: var(--bg-link-hover-primary);
|
|
12
|
+
--link-color: var(--link-hover-primary);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:active {
|
|
16
|
+
--link-color: var(--link-pressed-primary);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&[disabled] {
|
|
21
|
+
--link-color: var(--link-disabled-primary);
|
|
22
|
+
--link-underline-color: var(--link-disabled-primary);
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
$border-radius-system: 0.625rem;
|
|
2
|
+
|
|
3
|
+
.text-negative {
|
|
4
|
+
color: var(--negative-primary);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.text-neutro {
|
|
8
|
+
color: var(--text-primary);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.text-positive {
|
|
12
|
+
color: var(--positive-primary);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.support-text {
|
|
16
|
+
margin-left: 0;
|
|
17
|
+
margin-top: 0.3125rem;
|
|
18
|
+
padding-inline: 1rem;
|
|
19
|
+
}
|
|
@@ -22,15 +22,15 @@ $bg-dialog-primary-light: $n900;
|
|
|
22
22
|
$label-text-full-read-only-primary-dark: $n800;
|
|
23
23
|
$input-text-full-read-only-primary-dark: $n800;
|
|
24
24
|
$input-text-full-disabled-primary-dark: $n300;
|
|
25
|
-
$placeholder-
|
|
25
|
+
$placeholder-full-enabled-pressed-primary-dark: $n800;
|
|
26
26
|
$label-text-full-read-only-primary-light: $n400;
|
|
27
27
|
$bg-field-full-read-only-primary-light: $n800;
|
|
28
28
|
$label-text-full-disabled-primary-light: $n700;
|
|
29
29
|
$bg-field-full-disabled-primary-light: $n800;
|
|
30
|
-
$label-text-
|
|
31
|
-
$placeholder-
|
|
32
|
-
$outline-field-
|
|
33
|
-
$bg-field-
|
|
30
|
+
$label-text-full-enabled-pressed-primary-light: $n400;
|
|
31
|
+
$placeholder-full-enabled-pressed-primary-light: $n400;
|
|
32
|
+
$outline-field-full-enabled-pressed-primary-light: $b400;
|
|
33
|
+
$bg-field-full-enabled-pressed-primary-light: $n900;
|
|
34
34
|
$label-text-empty-disabled-primary-light: $n700;
|
|
35
35
|
$placeholder-empty-disabled-primary-light: $n700;
|
|
36
36
|
$bg-field-empty-disabled-primary-light: $n800;
|
|
@@ -56,15 +56,15 @@ $input-text-full-enabled-primary-light: $n400;
|
|
|
56
56
|
$bg-field-empty-enabled-hover-primary-light: $n800;
|
|
57
57
|
$outline-field-empty-enabled-primary-dark: $n800;
|
|
58
58
|
$bg-field-full-read-only-primary-dark: $n300;
|
|
59
|
-
$bg-field-
|
|
59
|
+
$bg-field-full-enabled-pressed-primary-dark: $n100;
|
|
60
60
|
$label-text-empty-disabled-primary-dark: $n300;
|
|
61
61
|
$bg-field-full-disabled-primary-dark: $n200;
|
|
62
62
|
$input-text-full-read-only-primary-light: $n400;
|
|
63
63
|
$input-text-full-disabled-primary-light: $n700;
|
|
64
64
|
$placeholder-empty-disabled-primary-dark: $n300;
|
|
65
65
|
$label-text-full-disabled-primary-dark: $n300;
|
|
66
|
-
$label-text-
|
|
67
|
-
$outline-field-
|
|
66
|
+
$label-text-full-enabled-pressed-primary-dark: $n800;
|
|
67
|
+
$outline-field-full-enabled-pressed-primary-dark: $b700;
|
|
68
68
|
|
|
69
69
|
// system
|
|
70
70
|
$alternative-primary-light: $o300;
|
|
@@ -127,7 +127,7 @@ $bg-link-hover-primary-dark: $n300;
|
|
|
127
127
|
$link-pressed-primary-dark: $b600;
|
|
128
128
|
|
|
129
129
|
// notification
|
|
130
|
-
$notification-
|
|
130
|
+
$notification-success-highlight-primary-light: $g300;
|
|
131
131
|
$bg-icon-notification-success-primary-light: $g500;
|
|
132
132
|
$notification-error-highlight-primary-light: $r400;
|
|
133
133
|
$notification-warning-highlight-primary-dark: $o400;
|
|
@@ -138,7 +138,7 @@ $on-bg-icon-notification-warning-primary-dark: $o200;
|
|
|
138
138
|
$on-bg-icon-notification-error-primary-light: $r200;
|
|
139
139
|
$bg-icon-notification-error-primary-dark: $r600;
|
|
140
140
|
$on-bg-icon-notification-success-primary-light: $g100;
|
|
141
|
-
$notification-
|
|
141
|
+
$notification-success-highlight-primary-dark: $g500;
|
|
142
142
|
$bg-icon-notification-success-primary-dark: $g500;
|
|
143
143
|
$notification-warning-highlight-primary-light: $o300;
|
|
144
144
|
$notification-error-highlight-primary-dark: $r600;
|
|
@@ -389,3 +389,6 @@ $logo-primary-dark: $b700;
|
|
|
389
389
|
// text
|
|
390
390
|
$text-primary-dark: $n800;
|
|
391
391
|
$text-primary-light: $n400;
|
|
392
|
+
|
|
393
|
+
$hero-light-theme: (radio-button-on-primary: $radio-button-on-primary-light);
|
|
394
|
+
$hero-dark-theme: (radio-button-on-primary: $radio-button-on-primary-dark);
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
--input-text-full-read-only-primary: #{$input-text-full-read-only-primary-light};
|
|
7
7
|
--label-text-full-disabled-primary: #{$label-text-full-disabled-primary-light};
|
|
8
8
|
--input-text-full-disabled-primary: #{$input-text-full-disabled-primary-light};
|
|
9
|
-
--label-text-
|
|
10
|
-
--placeholder-
|
|
11
|
-
--bg-field-
|
|
9
|
+
--label-text-full-enabled-pressed-primary: #{$label-text-full-enabled-pressed-primary-light};
|
|
10
|
+
--placeholder-full-enabled-pressed-primary: #{$placeholder-full-enabled-pressed-primary-light};
|
|
11
|
+
--bg-field-full-enabled-pressed-primary: #{$bg-field-full-enabled-pressed-primary-light};
|
|
12
12
|
--bg-field-empty-disabled-primary: #{$bg-field-empty-disabled-primary-light};
|
|
13
13
|
--label-text-full-enabled-primary: #{$label-text-full-enabled-primary-light};
|
|
14
14
|
--input-text-full-enabled-primary: #{$input-text-full-enabled-primary-light};
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
--bg-field-empty-enabled-primary: #{$bg-field-empty-enabled-primary-light};
|
|
22
22
|
--bg-field-full-disabled-primary: #{$bg-field-full-disabled-primary-light};
|
|
23
23
|
--bg-field-full-enabled-hover-primary: #{$bg-field-full-enabled-hover-primary-light};
|
|
24
|
-
--outline-field-
|
|
24
|
+
--outline-field-full-enabled-pressed-primary: #{$outline-field-full-enabled-pressed-primary-light};
|
|
25
25
|
--placeholder-empty-disabled-primary: #{$placeholder-empty-disabled-primary-light};
|
|
26
26
|
--bg-field-full-read-only-primary: #{$bg-field-full-read-only-primary-light};
|
|
27
27
|
--label-text-empty-disabled-primary: #{$label-text-empty-disabled-primary-light};
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
--on-bg-icon-notification-success-primary: #{$on-bg-icon-notification-success-primary-light};
|
|
108
108
|
--bg-icon-notification-warning-primary: #{$bg-icon-notification-warning-primary-light};
|
|
109
109
|
--notification-warning-highlight-primary: #{$notification-warning-highlight-primary-light};
|
|
110
|
-
--notification-
|
|
110
|
+
--notification-success-highlight-primary: #{$notification-success-highlight-primary-light};
|
|
111
111
|
--on-bg-icon-notification-warning-primary: #{$on-bg-icon-notification-warning-primary-light};
|
|
112
112
|
--on-bg-notification-primary: #{$on-bg-notification-primary-light};
|
|
113
113
|
--bg-icon-notification-error-primary: #{$bg-icon-notification-error-primary-light};
|
|
@@ -226,18 +226,15 @@
|
|
|
226
226
|
--text-primary: #{$text-primary-light};
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
|
|
230
|
-
|
|
231
229
|
.hero-dark-theme {
|
|
232
|
-
|
|
233
230
|
// text-field
|
|
234
231
|
--label-text-full-read-only-primary: #{$label-text-full-read-only-primary-dark};
|
|
235
232
|
--input-text-full-read-only-primary: #{$input-text-full-read-only-primary-dark};
|
|
236
233
|
--label-text-full-disabled-primary: #{$label-text-full-disabled-primary-dark};
|
|
237
234
|
--input-text-full-disabled-primary: #{$input-text-full-disabled-primary-dark};
|
|
238
|
-
--label-text-
|
|
239
|
-
--placeholder-
|
|
240
|
-
--bg-field-
|
|
235
|
+
--label-text-full-enabled-pressed-primary: #{$label-text-full-enabled-pressed-primary-dark};
|
|
236
|
+
--placeholder-full-enabled-pressed-primary: #{$placeholder-full-enabled-pressed-primary-dark};
|
|
237
|
+
--bg-field-full-enabled-pressed-primary: #{$bg-field-full-enabled-pressed-primary-dark};
|
|
241
238
|
--bg-field-empty-disabled-primary: #{$bg-field-empty-disabled-primary-dark};
|
|
242
239
|
--label-text-full-enabled-primary: #{$label-text-full-enabled-primary-dark};
|
|
243
240
|
--input-text-full-enabled-primary: #{$input-text-full-enabled-primary-dark};
|
|
@@ -250,7 +247,7 @@
|
|
|
250
247
|
--bg-field-empty-enabled-primary: #{$bg-field-empty-enabled-primary-dark};
|
|
251
248
|
--bg-field-full-disabled-primary: #{$bg-field-full-disabled-primary-dark};
|
|
252
249
|
--bg-field-full-enabled-hover-primary: #{$bg-field-full-enabled-hover-primary-dark};
|
|
253
|
-
--outline-field-
|
|
250
|
+
--outline-field-full-enabled-pressed-primary: #{$outline-field-full-enabled-pressed-primary-dark};
|
|
254
251
|
--placeholder-empty-disabled-primary: #{$placeholder-empty-disabled-primary-dark};
|
|
255
252
|
--bg-field-full-read-only-primary: #{$bg-field-full-read-only-primary-dark};
|
|
256
253
|
--label-text-empty-disabled-primary: #{$label-text-empty-disabled-primary-dark};
|
|
@@ -336,7 +333,7 @@
|
|
|
336
333
|
--on-bg-icon-notification-success-primary: #{$on-bg-icon-notification-success-primary-dark};
|
|
337
334
|
--bg-icon-notification-warning-primary: #{$bg-icon-notification-warning-primary-dark};
|
|
338
335
|
--notification-warning-highlight-primary: #{$notification-warning-highlight-primary-dark};
|
|
339
|
-
--notification-
|
|
336
|
+
--notification-success-highlight-primary: #{$notification-success-highlight-primary-dark};
|
|
340
337
|
--on-bg-icon-notification-warning-primary: #{$on-bg-icon-notification-warning-primary-dark};
|
|
341
338
|
--on-bg-notification-primary: #{$on-bg-notification-primary-dark};
|
|
342
339
|
--bg-icon-notification-error-primary: #{$bg-icon-notification-error-primary-dark};
|
|
@@ -453,4 +450,9 @@
|
|
|
453
450
|
|
|
454
451
|
// text
|
|
455
452
|
--text-primary: #{$text-primary-dark};
|
|
453
|
+
|
|
454
|
+
//
|
|
455
|
+
//@each $name, $value in $hero-dark-theme {
|
|
456
|
+
// --#{$name}: #{$value};
|
|
457
|
+
//}
|
|
456
458
|
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
@charset "utf-8";
|
|
2
|
+
|
|
3
|
+
.#{$pretty--class-name} * {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
//Throw error on invalid input types.
|
|
8
|
+
.#{$pretty--class-name} input:not([type='checkbox']):not([type='radio']) {
|
|
9
|
+
display: none;
|
|
10
|
+
|
|
11
|
+
@if $pretty--debug {
|
|
12
|
+
+ *:after {
|
|
13
|
+
content: $pretty--err-message;
|
|
14
|
+
border: 1px solid #dedede;
|
|
15
|
+
border-left: 3px solid #d9534f;
|
|
16
|
+
padding: 9px;
|
|
17
|
+
font-size: 1em;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
color: #d9534f;
|
|
20
|
+
position: absolute;
|
|
21
|
+
z-index: 3;
|
|
22
|
+
background: #fbfbfb;
|
|
23
|
+
top: 0;
|
|
24
|
+
left: 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.#{$pretty--class-name} {
|
|
30
|
+
position: relative;
|
|
31
|
+
display: inline-block;
|
|
32
|
+
margin-right: 1em;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
line-height: 1;
|
|
35
|
+
|
|
36
|
+
&:not(.p-switch){
|
|
37
|
+
input[type="checkbox"] {
|
|
38
|
+
&:not(:checked) ~ .state label:before {
|
|
39
|
+
border-color: var(--outline-checkbox-off-primary);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:checked ~ .state {
|
|
43
|
+
label:after {
|
|
44
|
+
background-color: var(--bg-checkbox-on-primary);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
svg-icon svg path {
|
|
48
|
+
fill: var(--on-bg-checkbox-on-primary);
|
|
49
|
+
stroke: var(--on-bg-checkbox-on-primary);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
&:disabled ~ .state {
|
|
53
|
+
label:before {
|
|
54
|
+
border-color: var(--bg-button-disabled);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
&:disabled:checked ~ .state {
|
|
58
|
+
label:after {
|
|
59
|
+
background-color: var(--bg-button-disabled);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
svg-icon svg path {
|
|
63
|
+
fill: var(--on-bg-disabled);
|
|
64
|
+
stroke: var(--on-bg-disabled);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
input {
|
|
72
|
+
position: absolute;
|
|
73
|
+
left: 0;
|
|
74
|
+
top: 0;
|
|
75
|
+
min-width: 1em;
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
z-index: $pretty--z-index-front;
|
|
79
|
+
opacity: 0;
|
|
80
|
+
margin: 0;
|
|
81
|
+
padding: 0;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.state {
|
|
86
|
+
label {
|
|
87
|
+
position: initial;
|
|
88
|
+
display: inline-block;
|
|
89
|
+
font-weight: normal;
|
|
90
|
+
margin: 0;
|
|
91
|
+
text-indent: $pretty--label-text-offset;
|
|
92
|
+
min-width: $pretty--box-size;
|
|
93
|
+
|
|
94
|
+
&:before,
|
|
95
|
+
&:after {
|
|
96
|
+
content: '';
|
|
97
|
+
width: $pretty--box-size;
|
|
98
|
+
height: $pretty--box-size;
|
|
99
|
+
display: block;
|
|
100
|
+
box-sizing: border-box;
|
|
101
|
+
border-radius: 0;
|
|
102
|
+
border: 1px solid transparent;
|
|
103
|
+
z-index: $pretty--z-index-back;
|
|
104
|
+
position: absolute;
|
|
105
|
+
left: 0;
|
|
106
|
+
top: $pretty-top-offset;
|
|
107
|
+
background-color: transparent;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:before {
|
|
111
|
+
border-color: $pretty--color-default;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&.p-is-hover,
|
|
116
|
+
&.p-is-indeterminate {
|
|
117
|
+
display: none;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
$pretty--class-name: pretty !default;
|
|
2
|
+
|
|
3
|
+
// colors
|
|
4
|
+
$pretty--color-default: #bdc3c7 !default;
|
|
5
|
+
$pretty--color-primary: #428bca !default;
|
|
6
|
+
$pretty--color-info: #5bc0de !default;
|
|
7
|
+
$pretty--color-success: #5cb85c !default;
|
|
8
|
+
$pretty--color-warning: #f0ad4e !default;
|
|
9
|
+
$pretty--color-danger: #d9534f !default;
|
|
10
|
+
$pretty--color-dark: #5a656b !default;
|
|
11
|
+
|
|
12
|
+
// z-index
|
|
13
|
+
$pretty--z-index-back: 0 !default;
|
|
14
|
+
$pretty--z-index-between: 1 !default;
|
|
15
|
+
$pretty--z-index-front: 2 !default;
|
|
16
|
+
|
|
17
|
+
// box
|
|
18
|
+
$pretty--curve-radius: 20% !default;
|
|
19
|
+
$pretty--box-size: calc(1em + 2px) !default;
|
|
20
|
+
|
|
21
|
+
// text
|
|
22
|
+
$pretty--label-text-offset: 1.5em !default;
|
|
23
|
+
$pretty--label-text-offset-switch: 2.5em !default;
|
|
24
|
+
|
|
25
|
+
// scale
|
|
26
|
+
$pretty--2x: 1.2em !default;
|
|
27
|
+
|
|
28
|
+
// color set
|
|
29
|
+
$pretty--colors: (primary, $pretty--color-primary), (info, $pretty--color-info), (success, $pretty--color-success), (warning, $pretty--color-warning), (danger, $pretty--color-danger) !default;
|
|
30
|
+
|
|
31
|
+
// position
|
|
32
|
+
$pretty-top: 7;
|
|
33
|
+
$pretty-top-switch: ($pretty-top * 2) * 1%;
|
|
34
|
+
$pretty-top-offset: calc((0% - (100% - 1em)) - #{$pretty-top * 1%});
|
|
35
|
+
$pretty-top-offset-switch: calc((0% - (100% - 1em)) - #{$pretty-top-switch});
|
|
36
|
+
|
|
37
|
+
// dev
|
|
38
|
+
$pretty--debug: false !default;
|
|
39
|
+
$pretty--err-message: 'Error: Invalid input type!' !default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.#{$pretty--class-name}.p-default {
|
|
2
|
+
.state label {
|
|
3
|
+
&:after {
|
|
4
|
+
transform: scale(0.6);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
input:checked ~ .state label {
|
|
9
|
+
&:after {
|
|
10
|
+
background-color: $pretty--color-default !important;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
input[type='radio'] {
|
|
15
|
+
&:not(:checked) ~ .state label:before {
|
|
16
|
+
border-color: var(--radio-button-off-primary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:checked ~ .state label {
|
|
20
|
+
&:before {
|
|
21
|
+
border-color: var(--radio-button-on-primary);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:after {
|
|
25
|
+
background-color: var(--radio-button-on-primary) !important;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:disabled ~ .state {
|
|
30
|
+
label:before {
|
|
31
|
+
border-color: var(--outline-disabled);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
&:disabled:checked ~ .state {
|
|
35
|
+
label:after {
|
|
36
|
+
background-color: var(--outline-disabled);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@use 'mixin';
|
|
2
|
+
|
|
3
|
+
.#{$pretty--class-name}.p-switch {
|
|
4
|
+
input{
|
|
5
|
+
min-width:2em;
|
|
6
|
+
&:checked ~ .state, &:disabled ~ .state {
|
|
7
|
+
@include mixin.switchColor(bg-switch-disabled-primary);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.state {
|
|
12
|
+
position: relative;
|
|
13
|
+
|
|
14
|
+
&:before {
|
|
15
|
+
content: '';
|
|
16
|
+
border: 1px solid var(--bg-switch-off-primary);
|
|
17
|
+
background-color: var(--bg-switch-off-primary);
|
|
18
|
+
border-radius: 60px;
|
|
19
|
+
width: 2em;
|
|
20
|
+
box-sizing: unset;
|
|
21
|
+
height: $pretty--box-size;
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 0;
|
|
24
|
+
top: $pretty-top-offset-switch;
|
|
25
|
+
z-index: $pretty--z-index-back;
|
|
26
|
+
transition: all 0.5s ease;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
label {
|
|
30
|
+
text-indent: $pretty--label-text-offset-switch;
|
|
31
|
+
|
|
32
|
+
&:before,
|
|
33
|
+
&:after {
|
|
34
|
+
transition: all 0.5s ease;
|
|
35
|
+
border-radius: 100%;
|
|
36
|
+
left: 0;
|
|
37
|
+
border-color: transparent;
|
|
38
|
+
transform: scale(0.8);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:before{
|
|
42
|
+
border: 1px solid var(--on-bg-switch-off-primary);
|
|
43
|
+
background-color: var(--on-bg-switch-off-primary);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@mixin switchColor($varColorName) {
|
|
2
|
+
&:before {
|
|
3
|
+
border-color: var(--#{$varColorName});
|
|
4
|
+
background-color: var(--#{$varColorName});
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
label:before {
|
|
8
|
+
opacity: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
label:after {
|
|
12
|
+
background-color: var(--on-#{$varColorName}) !important;
|
|
13
|
+
left: 1em;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@import './variables';
|
|
2
|
+
@import './core';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@import 'node_modules/pretty-checkbox/src/scss/essentials/keyframes';
|
|
6
|
+
@import 'node_modules/pretty-checkbox/src/scss/essentials/functions';
|
|
7
|
+
@import 'node_modules/pretty-checkbox/src/scss/essentials/mixins';
|
|
8
|
+
@import 'node_modules/pretty-checkbox/src/scss/elements/default/fill';
|
|
9
|
+
@import './elements/default/outline';
|
|
10
|
+
@import 'node_modules/pretty-checkbox/src/scss/elements/default/thick';
|
|
11
|
+
@import 'node_modules/pretty-checkbox/src/scss/elements/font-icon/general';
|
|
12
|
+
@import 'node_modules/pretty-checkbox/src/scss/elements/svg/general';
|
|
13
|
+
@import 'node_modules/pretty-checkbox/src/scss/elements/image/general';
|
|
14
|
+
@import './elements/switch/general';
|
|
15
|
+
@import './elements/switch/fill';
|
|
16
|
+
@import 'node_modules/pretty-checkbox/src/scss/elements/switch/slim';
|
|
17
|
+
@import 'node_modules/pretty-checkbox/src/scss/states/hover';
|
|
18
|
+
@import 'node_modules/pretty-checkbox/src/scss/states/focus';
|
|
19
|
+
@import 'node_modules/pretty-checkbox/src/scss/states/indeterminate';
|
|
20
|
+
@import 'node_modules/pretty-checkbox/src/scss/extras/toggle';
|
|
21
|
+
@import 'node_modules/pretty-checkbox/src/scss/extras/plain';
|
|
22
|
+
@import 'node_modules/pretty-checkbox/src/scss/extras/round';
|
|
23
|
+
@import 'node_modules/pretty-checkbox/src/scss/extras/curve';
|
|
24
|
+
@import 'node_modules/pretty-checkbox/src/scss/extras/animation';
|
|
25
|
+
@import 'node_modules/pretty-checkbox/src/scss/extras/disabled';
|
|
26
|
+
@import 'node_modules/pretty-checkbox/src/scss/extras/locked';
|
|
27
|
+
@import 'node_modules/pretty-checkbox/src/scss/extras/colors';
|
|
28
|
+
@import 'node_modules/pretty-checkbox/src/scss/extras/bigger';
|
|
29
|
+
@import 'node_modules/pretty-checkbox/src/scss/extras/print';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<div *ngIf="isThemeLight" class="tooltip-arrow"></div>
|
|
2
|
+
|
|
3
|
+
<div *ngIf="options['contentType'] === 'template' else htmlOrStringTemplate">
|
|
4
|
+
<ng-container *ngTemplateOutlet="value"></ng-container>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<ng-template #htmlOrStringTemplate>
|
|
8
|
+
<div [innerHTML]="value"></div>
|
|
9
|
+
</ng-template>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
\:host
|
|
2
|
+
max-width: 200px
|
|
3
|
+
background-color: var(--bg-tooltip-primary)
|
|
4
|
+
color: var(--on-bg-tooltip-primary)
|
|
5
|
+
text-align: center
|
|
6
|
+
border-radius: 6px
|
|
7
|
+
padding: 5px 8px
|
|
8
|
+
position: absolute
|
|
9
|
+
pointer-events: none
|
|
10
|
+
z-index: 1000
|
|
11
|
+
display: block
|
|
12
|
+
opacity: 0
|
|
13
|
+
-webkit-transition: opacity 300ms
|
|
14
|
+
-moz-transition: opacity 300ms
|
|
15
|
+
-o-transition: opacity 300ms
|
|
16
|
+
transition: opacity 300ms
|
|
17
|
+
top: 0
|
|
18
|
+
left: 0
|
|
19
|
+
|
|
20
|
+
\:host.tooltip-show
|
|
21
|
+
opacity: 1
|
|
22
|
+
|
|
23
|
+
\:host.tooltip-shadow
|
|
24
|
+
box-shadow: 0 7px 15px -5px rgba(0, 0, 0, 0.4)
|
|
25
|
+
|
|
26
|
+
\:host.tooltip-light.tooltip-shadow
|
|
27
|
+
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.4)
|
|
28
|
+
|
|
29
|
+
\:host.tooltip::after
|
|
30
|
+
content: ""
|
|
31
|
+
position: absolute
|
|
32
|
+
border-style: solid
|
|
33
|
+
|
|
34
|
+
\:host.tooltip-top::after
|
|
35
|
+
top: 100%
|
|
36
|
+
left: 50%
|
|
37
|
+
margin-left: -5px
|
|
38
|
+
border-width: 5px
|
|
39
|
+
border-color: var(--bg-tooltip-primary) transparent transparent transparent
|
|
40
|
+
|
|
41
|
+
\:host.tooltip-bottom::after
|
|
42
|
+
bottom: 100%
|
|
43
|
+
left: 50%
|
|
44
|
+
margin-left: -5px
|
|
45
|
+
border-width: 5px
|
|
46
|
+
border-color: transparent transparent var(--bg-tooltip-primary) transparent
|
|
47
|
+
|
|
48
|
+
\:host.tooltip-left::after
|
|
49
|
+
top: 50%
|
|
50
|
+
left: 100%
|
|
51
|
+
margin-top: -5px
|
|
52
|
+
border-width: 5px
|
|
53
|
+
border-color: transparent transparent transparent var(--bg-tooltip-primary)
|
|
54
|
+
|
|
55
|
+
\:host.tooltip-right::after
|
|
56
|
+
top: 50%
|
|
57
|
+
right: 100%
|
|
58
|
+
margin-top: -5px
|
|
59
|
+
border-width: 5px
|
|
60
|
+
border-color: transparent var(--bg-tooltip-primary) transparent transparent
|
|
61
|
+
|
|
62
|
+
// Light
|
|
63
|
+
\:host.tooltip-light::after
|
|
64
|
+
display: none
|
|
65
|
+
|
|
66
|
+
\:host.tooltip-light
|
|
67
|
+
border: 1px solid rgba(0, 0, 0, .06)
|
|
68
|
+
background-color: #fff
|
|
69
|
+
color: black
|
|
70
|
+
|
|
71
|
+
.tooltip-arrow
|
|
72
|
+
position: absolute
|
|
73
|
+
width: 10px
|
|
74
|
+
height: 10px
|
|
75
|
+
transform: rotate(135deg)
|
|
76
|
+
background-color: rgba(0, 0, 0, .07)
|
|
77
|
+
|
|
78
|
+
.tooltip-arrow::after
|
|
79
|
+
background-color: #fff
|
|
80
|
+
content: ''
|
|
81
|
+
display: block
|
|
82
|
+
position: absolute
|
|
83
|
+
width: 10px
|
|
84
|
+
height: 10px
|
|
85
|
+
|
|
86
|
+
\:host.tooltip-top.tooltip-light
|
|
87
|
+
margin-top: -2px
|
|
88
|
+
|
|
89
|
+
.tooltip-arrow
|
|
90
|
+
top: 100%
|
|
91
|
+
left: 50%
|
|
92
|
+
margin-top: -4px
|
|
93
|
+
margin-left: -5px
|
|
94
|
+
background: linear-gradient(to bottom left, rgba(0, 0, 0, .07) 50%, transparent 50%)
|
|
95
|
+
|
|
96
|
+
.tooltip-arrow::after
|
|
97
|
+
top: 1px
|
|
98
|
+
right: 1px
|
|
99
|
+
|
|
100
|
+
\:host.tooltip-bottom.tooltip-light
|
|
101
|
+
.tooltip-arrow
|
|
102
|
+
bottom: 100%
|
|
103
|
+
left: 50%
|
|
104
|
+
margin-bottom: -4px
|
|
105
|
+
margin-left: -5px
|
|
106
|
+
background: linear-gradient(to top right, rgba(0, 0, 0, .1) 50%, transparent 50%)
|
|
107
|
+
|
|
108
|
+
.tooltip-arrow::after
|
|
109
|
+
top: -1px
|
|
110
|
+
right: -1px
|
|
111
|
+
|
|
112
|
+
\:host.tooltip-left.tooltip-light
|
|
113
|
+
.tooltip-arrow
|
|
114
|
+
top: 50%
|
|
115
|
+
left: 100%
|
|
116
|
+
margin-top: -5px
|
|
117
|
+
margin-left: -4px
|
|
118
|
+
background: linear-gradient(to bottom right, rgba(0, 0, 0, .07) 50%, transparent 50%)
|
|
119
|
+
|
|
120
|
+
.tooltip-arrow::after
|
|
121
|
+
top: 1px
|
|
122
|
+
right: -1px
|
|
123
|
+
|
|
124
|
+
\:host.tooltip-right.tooltip-light
|
|
125
|
+
.tooltip-arrow
|
|
126
|
+
top: 50%
|
|
127
|
+
right: 100%
|
|
128
|
+
margin-top: -5px
|
|
129
|
+
margin-right: -4px
|
|
130
|
+
background: linear-gradient(to top left, rgba(0, 0, 0, .07) 50%, transparent 50%)
|
|
131
|
+
|
|
132
|
+
.tooltip-arrow::after
|
|
133
|
+
top: -1px
|
|
134
|
+
right: 1px
|