@progressio_resources/gravity-design-system 1.0.6 → 1.0.8

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.
Files changed (88) hide show
  1. package/esm2020/lib/components/gravity-button/gravity-button.component.mjs +22 -0
  2. package/esm2020/lib/components/gravity-calendar/gravity-calendar.component.mjs +90 -0
  3. package/esm2020/lib/components/gravity-checkbox/gravity-checkbox.component.mjs +23 -0
  4. package/esm2020/lib/components/gravity-dropdown-list/gravity-dropdown-list.component.mjs +43 -0
  5. package/esm2020/lib/components/gravity-icon/gravity-icon.component.mjs +14 -0
  6. package/esm2020/lib/components/gravity-radio-button/gravity-radio-button.component.mjs +30 -0
  7. package/esm2020/lib/components/gravity-switch/gravity-switch.component.mjs +17 -0
  8. package/esm2020/lib/components/gravity-text-field/gravity-text-field.component.mjs +62 -0
  9. package/esm2020/lib/gravity-design-system.module.mjs +81 -6
  10. package/esm2020/lib/vendor/gravity-tooltip/gravity-tooltip.component.mjs +205 -0
  11. package/esm2020/lib/vendor/gravity-tooltip/gravity-tooltip.directive.mjs +480 -0
  12. package/esm2020/lib/vendor/gravity-tooltip/gravity-tooltip.module.mjs +41 -0
  13. package/esm2020/lib/vendor/gravity-tooltip/index.mjs +4 -0
  14. package/esm2020/lib/vendor/gravity-tooltip/options.interface.mjs +2 -0
  15. package/esm2020/lib/vendor/gravity-tooltip/options.mjs +38 -0
  16. package/esm2020/lib/vendor/gravity-tooltip/options.service.mjs +7 -0
  17. package/esm2020/public-api.mjs +12 -3
  18. package/fesm2015/progressio_resources-gravity-design-system.mjs +1100 -28
  19. package/fesm2015/progressio_resources-gravity-design-system.mjs.map +1 -1
  20. package/fesm2020/progressio_resources-gravity-design-system.mjs +1098 -28
  21. package/fesm2020/progressio_resources-gravity-design-system.mjs.map +1 -1
  22. package/lib/components/gravity-button/gravity-button.component.d.ts +18 -0
  23. package/lib/components/gravity-calendar/gravity-calendar.component.d.ts +40 -0
  24. package/lib/components/gravity-checkbox/gravity-checkbox.component.d.ts +8 -0
  25. package/lib/components/gravity-dropdown-list/gravity-dropdown-list.component.d.ts +36 -0
  26. package/lib/components/gravity-icon/gravity-icon.component.d.ts +6 -0
  27. package/lib/components/gravity-radio-button/gravity-radio-button.component.d.ts +13 -0
  28. package/lib/components/gravity-switch/gravity-switch.component.d.ts +6 -0
  29. package/lib/components/gravity-text-field/gravity-text-field.component.d.ts +35 -0
  30. package/lib/gravity-design-system.module.d.ts +17 -2
  31. package/lib/vendor/gravity-tooltip/gravity-tooltip.component.d.ts +42 -0
  32. package/lib/vendor/gravity-tooltip/gravity-tooltip.directive.d.ts +112 -0
  33. package/lib/vendor/gravity-tooltip/gravity-tooltip.module.d.ts +12 -0
  34. package/lib/vendor/gravity-tooltip/index.d.ts +3 -0
  35. package/lib/vendor/gravity-tooltip/options.d.ts +24 -0
  36. package/lib/vendor/gravity-tooltip/options.interface.d.ts +40 -0
  37. package/lib/vendor/gravity-tooltip/options.service.d.ts +7 -0
  38. package/package.json +9 -2
  39. package/public-api.d.ts +9 -2
  40. package/src/lib/assets/icons/calendar.svg +14 -0
  41. package/src/lib/assets/icons/check.svg +3 -0
  42. package/src/lib/assets/icons/copy.svg +8 -0
  43. package/src/lib/assets/icons/download.svg +7 -0
  44. package/src/lib/assets/icons/edit.svg +8 -0
  45. package/src/lib/assets/icons/eye_closed.svg +8 -0
  46. package/src/lib/assets/icons/eye_open.svg +6 -0
  47. package/src/lib/assets/icons/forgot_password.svg +7 -0
  48. package/src/lib/assets/icons/lock.svg +6 -0
  49. package/src/lib/assets/icons/logout.svg +9 -0
  50. package/src/lib/assets/icons/mail.svg +6 -0
  51. package/src/lib/assets/icons/radio-off.svg +3 -0
  52. package/src/lib/assets/icons/radio-on.svg +3 -0
  53. package/src/lib/assets/icons/search.svg +8 -0
  54. package/src/lib/assets/icons/settings.svg +12 -0
  55. package/src/lib/assets/icons/show_less.svg +6 -0
  56. package/src/lib/assets/icons/show_more.svg +6 -0
  57. package/src/lib/assets/icons/uncheck.svg +3 -0
  58. package/src/lib/assets/icons/user.svg +6 -0
  59. package/src/lib/assets/icons/x.svg +6 -0
  60. package/src/lib/assets/json/icons.json +91 -0
  61. package/src/lib/styles/_card_highlight.scss +40 -0
  62. package/src/lib/styles/_datepicker.scss +101 -0
  63. package/src/lib/styles/_link.scss +25 -0
  64. package/src/lib/styles/_shared.scss +19 -0
  65. package/src/lib/styles/fundamentals/colors/themes/_hero.theme.scss +13 -10
  66. package/src/lib/styles/fundamentals/colors/tokens/_hero.tokens.scss +15 -13
  67. package/src/lib/styles/fundamentals/typography/_hero.typography.scss +0 -1
  68. package/src/lib/styles/gravity-design-system.scss +6 -0
  69. package/src/lib/styles/overwrite/pretty-checkbox/_core.scss +120 -0
  70. package/src/lib/styles/overwrite/pretty-checkbox/_variables.scss +39 -0
  71. package/src/lib/styles/overwrite/pretty-checkbox/elements/default/_outline.scss +41 -0
  72. package/src/lib/styles/overwrite/pretty-checkbox/elements/switch/_fill.scss +7 -0
  73. package/src/lib/styles/overwrite/pretty-checkbox/elements/switch/_general.scss +47 -0
  74. package/src/lib/styles/overwrite/pretty-checkbox/elements/switch/_mixin.scss +15 -0
  75. package/src/lib/styles/overwrite/pretty-checkbox/pretty-checkbox.scss +29 -0
  76. package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.html +9 -0
  77. package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.sass +134 -0
  78. package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.ts +215 -0
  79. package/src/lib/vendor/gravity-tooltip/gravity-tooltip.directive.ts +506 -0
  80. package/src/lib/vendor/gravity-tooltip/gravity-tooltip.module.ts +33 -0
  81. package/src/lib/vendor/gravity-tooltip/index.ts +3 -0
  82. package/src/lib/vendor/gravity-tooltip/options.interface.ts +37 -0
  83. package/src/lib/vendor/gravity-tooltip/options.service.ts +8 -0
  84. package/src/lib/vendor/gravity-tooltip/options.ts +38 -0
  85. package/esm2020/lib/gravity-design-system.component.mjs +0 -19
  86. package/esm2020/lib/gravity-design-system.service.mjs +0 -11
  87. package/lib/gravity-design-system.component.d.ts +0 -5
  88. package/lib/gravity-design-system.service.d.ts +0 -5
@@ -0,0 +1,101 @@
1
+ @import "./fundamentals/typography/hero.typography";
2
+ @import "shared";
3
+
4
+ ngb-datepicker.gravity-datepicker-dialog {
5
+ background-color: var(--bg-calender-primary);
6
+ border-radius: $border-radius-system;
7
+ box-shadow: 0 0 10px #AAA;
8
+ color: var(--on-bg-calender-primary);
9
+
10
+ .ngb-dp-header {
11
+ background-color: var(--bg-calendar-nav-primary);
12
+ border-top-left-radius: $border-radius-system;
13
+ border-top-right-radius: $border-radius-system;
14
+ color: var(--on-bg-calendar-nav-primary);
15
+ height: 30px;
16
+ min-width: 264px;
17
+ padding: 10px;
18
+
19
+ ngb-datepicker-navigation {
20
+ .ngb-dp-arrow button {
21
+ @extend .hr-label, .sm-regular;
22
+
23
+ border-radius: 50%;
24
+ color: var(--arrow-calendar-active-primary);
25
+ cursor: pointer;
26
+ height: 32px;
27
+ margin: 0;
28
+ outline: none;
29
+ padding: 0;
30
+ width: 32px;
31
+
32
+ span {
33
+ border: none;
34
+ display: inline-block;
35
+ font-size: 28px;
36
+ height: 100%;
37
+ line-height: 30px;
38
+ margin: 0;
39
+ position: relative;
40
+ transform: none;
41
+ width: 100%;
42
+ }
43
+
44
+ &:not([disabled]):hover {
45
+ background-color: var(--bg-arrow-calendar-hover-primary);
46
+ color: var(--arrow-calendar-hover-primary);
47
+ }
48
+
49
+ &[disabled] {
50
+ color: var(--arrow-calendar-disabled-primary);
51
+ cursor: not-allowed;
52
+ }
53
+ }
54
+
55
+ .ngb-dp-arrow:not(.right) button span:before {
56
+ content: "‹";
57
+ }
58
+
59
+ .ngb-dp-arrow.right button span:after {
60
+ content: "›";
61
+ }
62
+
63
+ .ngb-dp-month-name {
64
+ @extend .hr-label, .md-regular;
65
+ }
66
+ }
67
+ }
68
+
69
+ .ngb-dp-content {
70
+ @extend .hr-label, .sm-regular;
71
+
72
+ min-height: 212px;
73
+ min-width: 264px;
74
+ padding: 10px;
75
+
76
+ .ngb-dp-day {
77
+ border-radius: 50%;
78
+ color: var(--number-calender-active-primary);
79
+ outline: none;
80
+
81
+ .btn-light {
82
+ border-radius: 50%;
83
+ outline: none;
84
+
85
+ &:not(.text-muted):hover {
86
+ background-color: var(--bg-number-calendar-hover-primary);
87
+ color: var(--number-calendar-hover-primary);
88
+ }
89
+
90
+ &.text-muted {
91
+ color: var(--number-calendar-disabled-primary);
92
+ }
93
+
94
+ &.bg-primary.text-white {
95
+ background-color: var(--bg-number-calendar-pressed-primary);
96
+ color: var(--number-calendar-pressed-primary);
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
@@ -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-empty-enabled-pressed-primary-dark: $n800;
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-empty-enabled-pressed-primary-light: $n400;
31
- $placeholder-empty-enabled-pressed-primary-light: $n400;
32
- $outline-field-empty-enabled-pressed-primary-light: $b400;
33
- $bg-field-empty-enabled-pressed-primary-light: $n900;
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-empty-enabled-pressed-primary-dark: $n100;
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-empty-enabled-pressed-primary-dark: $n800;
67
- $outline-field-empty-enabled-pressed-primary-dark: $b700;
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-sucess-highlight-primary-light: $g300;
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-sucess-highlight-primary-dark: $g500;
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-empty-enabled-pressed-primary: #{$label-text-empty-enabled-pressed-primary-light};
10
- --placeholder-empty-enabled-pressed-primary: #{$placeholder-empty-enabled-pressed-primary-light};
11
- --bg-field-empty-enabled-pressed-primary: #{$bg-field-empty-enabled-pressed-primary-light};
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-empty-enabled-pressed-primary: #{$outline-field-empty-enabled-pressed-primary-light};
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-sucess-highlight-primary: #{$notification-sucess-highlight-primary-light};
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-empty-enabled-pressed-primary: #{$label-text-empty-enabled-pressed-primary-dark};
239
- --placeholder-empty-enabled-pressed-primary: #{$placeholder-empty-enabled-pressed-primary-dark};
240
- --bg-field-empty-enabled-pressed-primary: #{$bg-field-empty-enabled-pressed-primary-dark};
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-empty-enabled-pressed-primary: #{$outline-field-empty-enabled-pressed-primary-dark};
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-sucess-highlight-primary: #{$notification-sucess-highlight-primary-dark};
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
  }
@@ -57,7 +57,6 @@ body {
57
57
  }
58
58
 
59
59
  .hr-title {
60
-
61
60
  &.sm-regular {
62
61
  font-size: $font-size-16px;
63
62
  font-weight: 420;
@@ -0,0 +1,6 @@
1
+ @import "./fundamentals/colors/tokens/hero.tokens";
2
+ @import "./fundamentals/typography/hero.typography";
3
+ @import "./overwrite/pretty-checkbox/pretty-checkbox.scss";
4
+ @import "./card_highlight";
5
+ @import "./datepicker";
6
+ @import "./link";
@@ -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,7 @@
1
+ @use 'mixin';
2
+
3
+ .#{$pretty--class-name}.p-switch.p-fill {
4
+ input:checked:not(:disabled) ~ .state {
5
+ @include mixin.switchColor(bg-switch-on-primary);
6
+ }
7
+ }
@@ -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>