@configura/web-ui 2.0.0-alpha.0 → 2.0.0-alpha.11

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 (99) hide show
  1. package/.postcssrc.json +8 -8
  2. package/LICENSE +201 -201
  3. package/README.md +1 -1
  4. package/dist/components/CanvasWrapper.d.ts +9 -9
  5. package/dist/components/CanvasWrapper.js +8 -8
  6. package/dist/components/CfgPriceView.d.ts +6 -6
  7. package/dist/components/CfgPriceView.js +13 -13
  8. package/dist/components/ConfigurationActionsButtonRow.d.ts +14 -14
  9. package/dist/components/ConfigurationActionsButtonRow.js +16 -16
  10. package/dist/components/Configurator.d.ts +12 -12
  11. package/dist/components/Configurator.js +15 -15
  12. package/dist/components/ConfiguratorWrapper.d.ts +8 -8
  13. package/dist/components/ConfiguratorWrapper.js +5 -5
  14. package/dist/components/CurrencyPrice.d.ts +9 -9
  15. package/dist/components/CurrencyPrice.js +7 -7
  16. package/dist/components/ErrorContext.d.ts +2 -2
  17. package/dist/components/ErrorContext.js +2 -2
  18. package/dist/components/ExpandableHeadingRow.d.ts +15 -15
  19. package/dist/components/ExpandableHeadingRow.js +21 -21
  20. package/dist/components/Loading.d.ts +13 -13
  21. package/dist/components/Loading.js +20 -20
  22. package/dist/components/ProductInformation.d.ts +13 -13
  23. package/dist/components/ProductInformation.js +14 -14
  24. package/dist/components/TaskListView.d.ts +8 -8
  25. package/dist/components/TaskListView.js +69 -69
  26. package/dist/components/TaskStartView.d.ts +12 -12
  27. package/dist/components/TaskStartView.js +29 -29
  28. package/dist/components/icons/Checkmark.d.ts +6 -6
  29. package/dist/components/icons/Checkmark.js +12 -12
  30. package/dist/components/icons/Chevron.d.ts +7 -7
  31. package/dist/components/icons/Chevron.js +18 -18
  32. package/dist/components/icons/CircleXmarkIcon.d.ts +3 -3
  33. package/dist/components/icons/CircleXmarkIcon.js +8 -8
  34. package/dist/components/icons/DownloadIcon.d.ts +3 -3
  35. package/dist/components/icons/DownloadIcon.js +8 -8
  36. package/dist/components/icons/ErrorIcon.d.ts +3 -3
  37. package/dist/components/icons/ErrorIcon.js +8 -8
  38. package/dist/components/productConfiguration/CfgAdditionalProductView.d.ts +3 -3
  39. package/dist/components/productConfiguration/CfgAdditionalProductView.js +42 -42
  40. package/dist/components/productConfiguration/CfgCheckboxView.d.ts +7 -9
  41. package/dist/components/productConfiguration/CfgCheckboxView.js +29 -29
  42. package/dist/components/productConfiguration/CfgCheckboxesView.d.ts +7 -9
  43. package/dist/components/productConfiguration/CfgCheckboxesView.js +18 -18
  44. package/dist/components/productConfiguration/CfgDropdownOptionView.d.ts +7 -9
  45. package/dist/components/productConfiguration/CfgDropdownOptionView.js +44 -44
  46. package/dist/components/productConfiguration/CfgDropdownView.d.ts +7 -9
  47. package/dist/components/productConfiguration/CfgDropdownView.js +20 -20
  48. package/dist/components/productConfiguration/CfgFeatureView.d.ts +31 -35
  49. package/dist/components/productConfiguration/CfgFeatureView.js +60 -64
  50. package/dist/components/productConfiguration/CfgGroupView.d.ts +4 -4
  51. package/dist/components/productConfiguration/CfgGroupView.js +7 -7
  52. package/dist/components/productConfiguration/CfgOptionFeaturesView.d.ts +3 -3
  53. package/dist/components/productConfiguration/CfgOptionFeaturesView.js +13 -13
  54. package/dist/components/productConfiguration/CfgOptionNumericView.d.ts +29 -29
  55. package/dist/components/productConfiguration/CfgOptionNumericView.js +132 -132
  56. package/dist/components/productConfiguration/CfgOptionPriceView.d.ts +9 -9
  57. package/dist/components/productConfiguration/CfgOptionPriceView.js +29 -29
  58. package/dist/components/productConfiguration/CfgProductConfigurationView.d.ts +22 -17
  59. package/dist/components/productConfiguration/CfgProductConfigurationView.js +47 -47
  60. package/dist/css/web-ui.css.map +1 -1
  61. package/dist/index.d.ts +24 -23
  62. package/dist/index.js +24 -23
  63. package/dist/scss/_button.scss +52 -52
  64. package/dist/scss/_configurator.scss +88 -88
  65. package/dist/scss/_expandable.scss +37 -37
  66. package/dist/scss/_feature-item.scss +137 -137
  67. package/dist/scss/_forms.scss +42 -42
  68. package/dist/scss/_hr.scss +16 -16
  69. package/dist/scss/_loading.scss +98 -98
  70. package/dist/scss/_mixins.scss +56 -56
  71. package/dist/scss/_option-tree.scss +29 -29
  72. package/dist/scss/_product-information.scss +49 -49
  73. package/dist/scss/_range-view.scss +39 -39
  74. package/dist/scss/_slider.scss +70 -70
  75. package/dist/scss/_tasks.scss +72 -72
  76. package/dist/scss/_themed.scss +149 -149
  77. package/dist/scss/_utilities.scss +21 -21
  78. package/dist/scss/_variables.scss +6 -6
  79. package/dist/scss/icons/_checkmark.scss +46 -46
  80. package/dist/scss/icons/_chevron.scss +62 -62
  81. package/dist/scss/icons/_circle-xmark-icon.scss +24 -24
  82. package/dist/scss/icons/_download-icon.scss +24 -24
  83. package/dist/scss/icons/_error-icon.scss +24 -24
  84. package/dist/scss/web-ui.scss +11 -11
  85. package/dist/useCatParams.d.ts +18 -0
  86. package/dist/useCatParams.js +29 -0
  87. package/dist/useObservable.d.ts +4 -4
  88. package/dist/useObservable.js +18 -18
  89. package/dist/useRerender.d.ts +1 -1
  90. package/dist/useRerender.js +5 -5
  91. package/dist/useResize.d.ts +6 -6
  92. package/dist/useResize.js +47 -47
  93. package/dist/useSelected.d.ts +2 -2
  94. package/dist/useSelected.js +13 -13
  95. package/dist/useUniqueId.d.ts +1 -1
  96. package/dist/useUniqueId.js +7 -7
  97. package/dist/utilities.d.ts +5 -5
  98. package/dist/utilities.js +1 -1
  99. package/package.json +3 -3
@@ -1,72 +1,72 @@
1
- @use "mixins";
2
-
3
- @mixin classes($borderColor, $linkColor) {
4
- $preview-size: 4.8em;
5
- $line-width: 0.1em;
6
- $icon-size: 2em;
7
-
8
- .cfgTaskList {
9
- ul {
10
- list-style-type: none;
11
- padding: 0;
12
- margin: 1em 0 0 0;
13
- border-bottom: 0.1em solid $borderColor;
14
- }
15
-
16
- &__item {
17
- padding: 0 1.5em 0 1.7em;
18
- margin-bottom: 1em;
19
- display: flex;
20
- align-items: center;
21
- }
22
-
23
- &__preview {
24
- border: 0.1em solid $borderColor;
25
- border-radius: 10%;
26
- width: $preview-size;
27
- height: $preview-size;
28
- flex-shrink: 0;
29
-
30
- img {
31
- object-fit: cover;
32
- position: relative;
33
- left: 0.1 * $preview-size - $line-width;
34
- top: 0.1 * $preview-size - $line-width;
35
- width: 0.8 * $preview-size;
36
- height: 0.8 * $preview-size;
37
- }
38
- }
39
-
40
- &__icon {
41
- flex-shrink: 0;
42
- width: $icon-size + 2em;
43
- height: $icon-size;
44
- padding-left: 1em;
45
- padding-right: 1em;
46
-
47
- .cfgLoadingSizer {
48
- font-size: 0.75em;
49
- }
50
- }
51
-
52
- &__status {
53
- flex-grow: 1;
54
- font-size: 1.5em;
55
- }
56
-
57
- &__abort {
58
- @include mixins.noButtonLook;
59
- cursor: pointer;
60
- width: $icon-size;
61
- height: $icon-size;
62
- flex-shrink: 0;
63
- }
64
-
65
- &__restart {
66
- @include mixins.noButtonLook;
67
- cursor: pointer;
68
- text-decoration: underline;
69
- color: $linkColor;
70
- }
71
- }
72
- }
1
+ @use "mixins";
2
+
3
+ @mixin classes($borderColor, $linkColor) {
4
+ $preview-size: 4.8em;
5
+ $line-width: 0.1em;
6
+ $icon-size: 2em;
7
+
8
+ .cfgTaskList {
9
+ ul {
10
+ list-style-type: none;
11
+ padding: 0;
12
+ margin: 1em 0 0 0;
13
+ border-bottom: 0.1em solid $borderColor;
14
+ }
15
+
16
+ &__item {
17
+ padding: 0 1.5em 0 1.7em;
18
+ margin-bottom: 1em;
19
+ display: flex;
20
+ align-items: center;
21
+ }
22
+
23
+ &__preview {
24
+ border: 0.1em solid $borderColor;
25
+ border-radius: 10%;
26
+ width: $preview-size;
27
+ height: $preview-size;
28
+ flex-shrink: 0;
29
+
30
+ img {
31
+ object-fit: cover;
32
+ position: relative;
33
+ left: 0.1 * $preview-size - $line-width;
34
+ top: 0.1 * $preview-size - $line-width;
35
+ width: 0.8 * $preview-size;
36
+ height: 0.8 * $preview-size;
37
+ }
38
+ }
39
+
40
+ &__icon {
41
+ flex-shrink: 0;
42
+ width: $icon-size + 2em;
43
+ height: $icon-size;
44
+ padding-left: 1em;
45
+ padding-right: 1em;
46
+
47
+ .cfgLoadingSizer {
48
+ font-size: 0.75em;
49
+ }
50
+ }
51
+
52
+ &__status {
53
+ flex-grow: 1;
54
+ font-size: 1.5em;
55
+ }
56
+
57
+ &__abort {
58
+ @include mixins.noButtonLook;
59
+ cursor: pointer;
60
+ width: $icon-size;
61
+ height: $icon-size;
62
+ flex-shrink: 0;
63
+ }
64
+
65
+ &__restart {
66
+ @include mixins.noButtonLook;
67
+ cursor: pointer;
68
+ text-decoration: underline;
69
+ color: $linkColor;
70
+ }
71
+ }
72
+ }
@@ -1,149 +1,149 @@
1
- @use "sass:map";
2
- @use "sass:color";
3
-
4
- @use "variables" as v;
5
-
6
- // Components
7
- @use "button";
8
- @use "forms";
9
-
10
- @use "configurator";
11
- @use "expandable";
12
- @use "feature-item";
13
- @use "hr";
14
- @use "loading";
15
- @use "option-tree";
16
- @use "product-information";
17
- @use "range-view";
18
- @use "slider";
19
- @use "tasks";
20
-
21
- // Icons
22
- @use "icons/checkmark";
23
- @use "icons/chevron";
24
- @use "icons/circle-xmark-icon";
25
- @use "icons/download-icon";
26
- @use "icons/error-icon";
27
-
28
- // Utilities
29
- @use "utilities";
30
-
31
- /* Colors */
32
-
33
- $black: hsl(0, 0%, 0%) !default;
34
- $white: hsl(0, 0%, 100%) !default;
35
- $darkGrey: hsl(0, 0%, 15%) !default;
36
-
37
- /* Specific colors */
38
-
39
- $border: hsl(252, 5%, 79%) !default;
40
- $borderDark: hsl(0, 0%, 73%) !default;
41
- $icon: hsl(252, 5%, 50%) !default;
42
- $focusOutlineOuter: hsl(0, 0%, 13%) !default;
43
- $sliderTrack: #666 !default;
44
- $spinner2: hsla(0, 0%, 0%, 0.15);
45
- $grayText: hsl(0, 0%, 50%) !default;
46
- $text: hsl(0, 0%, 20%) !default;
47
- $link: hsl(209, 100%, 35%) !default;
48
- $error: hsl(10, 72%, 41%) !default;
49
-
50
- /* As convention we assume the default theme when naming colors,
51
- as attempts at generic naming often leads to confusion */
52
- $lightTheme: (
53
- "black": $black,
54
- "border": $border,
55
- "borderDark": $borderDark,
56
- "checkButtonChecked": $black,
57
- "checkButtonUnchecked": $border,
58
- "chevronActive": $black,
59
- "chevronPassive": $borderDark,
60
- "divider": $border,
61
- "dividerDark": $borderDark,
62
- "error": $error,
63
- "focusOutlineInner": $white,
64
- "focusOutlineOuter": $text,
65
- "grayText": $grayText,
66
- "icon": $icon,
67
- "link": $link,
68
- "overlayBackground": $white,
69
- "sliderThumb": $white,
70
- "sliderThumbShadow": $sliderTrack,
71
- "sliderTrack": $sliderTrack,
72
- "spinner1": $black,
73
- "spinner2": $spinner2,
74
- "text": $text,
75
- "white": $white,
76
- ) !default;
77
-
78
- @function invertLightness($color) {
79
- @return color.change(
80
- $color,
81
- $lightness: 100 - color.lightness($color) * 0.8
82
- ); // We scale with 80% to have a bit more contrast
83
- }
84
-
85
- @function invertLightnessList($list) {
86
- @each $key, $color in $list {
87
- $list: map.set($list, $key, invertLightness($color));
88
- }
89
- @return $list;
90
- }
91
-
92
- $darkTheme: invertLightnessList($lightTheme);
93
-
94
- $themes: (
95
- "light": $lightTheme,
96
- "dark": $darkTheme,
97
- );
98
-
99
- @mixin themed($ct, $baseFontSize: v.$baseFontSize, $overlayingZIndex: v.$overlayingZIndex) {
100
- a {
101
- color: map.get($ct, "link");
102
- }
103
-
104
- @include button.classes(
105
- map.get($ct, "text"),
106
- map.get($ct, "borderDark"),
107
- map.get($ct, "focusOutlineInner"),
108
- map.get($ct, "focusOutlineOuter"),
109
- map.get($ct, "grayText"),
110
- map.get($ct, "border")
111
- );
112
- @include checkmark.classes(
113
- map.get($ct, "checkButtonChecked"),
114
- map.get($ct, "checkButtonUnchecked")
115
- );
116
- @include chevron.classes(map.get($ct, "chevronActive"), map.get($ct, "chevronPassive"));
117
- @include circle-xmark-icon.classes(map.get($ct, "icon"));
118
- @include configurator.classes($baseFontSize, map.get($ct, "text"), map.get($ct, "divider"));
119
- @include download-icon.classes(map.get($ct, "link"));
120
- @include expandable.classes;
121
- @include error-icon.classes(map.get($ct, "error"));
122
- @include feature-item.classes(
123
- map.get($ct, "text"),
124
- map.get($ct, "grayText"),
125
- map.get($ct, "checkButtonUnchecked"),
126
- map.get($ct, "checkButtonChecked"),
127
- map.get($ct, "focusOutlineInner"),
128
- map.get($ct, "focusOutlineOuter"),
129
- map.get($ct, "dividerDark")
130
- );
131
- @include forms.classes(map.get($ct, "borderDark"));
132
- @include hr.classes(map.get($ct, "divider"));
133
- @include loading.classes(
134
- map.get($ct, "black"),
135
- map.get($ct, "spinner1"),
136
- map.get($ct, "spinner2"),
137
- map.get($ct, "overlayBackground"),
138
- $overlayingZIndex
139
- );
140
- @include option-tree.classes;
141
- @include product-information.classes(map.get($ct, "text"));
142
- @include range-view.classes(map.get($ct, "error"));
143
- @include slider.classes(
144
- map.get($ct, "sliderTrack"),
145
- map.get($ct, "sliderThumb"),
146
- map.get($ct, "sliderThumbShadow")
147
- );
148
- @include tasks.classes(map.get($ct, "border"), map.get($ct, "link"));
149
- }
1
+ @use "sass:map";
2
+ @use "sass:color";
3
+
4
+ @use "variables" as v;
5
+
6
+ // Components
7
+ @use "button";
8
+ @use "forms";
9
+
10
+ @use "configurator";
11
+ @use "expandable";
12
+ @use "feature-item";
13
+ @use "hr";
14
+ @use "loading";
15
+ @use "option-tree";
16
+ @use "product-information";
17
+ @use "range-view";
18
+ @use "slider";
19
+ @use "tasks";
20
+
21
+ // Icons
22
+ @use "icons/checkmark";
23
+ @use "icons/chevron";
24
+ @use "icons/circle-xmark-icon";
25
+ @use "icons/download-icon";
26
+ @use "icons/error-icon";
27
+
28
+ // Utilities
29
+ @use "utilities";
30
+
31
+ /* Colors */
32
+
33
+ $black: hsl(0, 0%, 0%) !default;
34
+ $white: hsl(0, 0%, 100%) !default;
35
+ $darkGrey: hsl(0, 0%, 15%) !default;
36
+
37
+ /* Specific colors */
38
+
39
+ $border: hsl(252, 5%, 79%) !default;
40
+ $borderDark: hsl(0, 0%, 73%) !default;
41
+ $icon: hsl(252, 5%, 50%) !default;
42
+ $focusOutlineOuter: hsl(0, 0%, 13%) !default;
43
+ $sliderTrack: #666 !default;
44
+ $spinner2: hsla(0, 0%, 0%, 0.15);
45
+ $grayText: hsl(0, 0%, 50%) !default;
46
+ $text: hsl(0, 0%, 20%) !default;
47
+ $link: hsl(209, 100%, 35%) !default;
48
+ $error: hsl(10, 72%, 41%) !default;
49
+
50
+ /* As convention we assume the default theme when naming colors,
51
+ as attempts at generic naming often leads to confusion */
52
+ $lightTheme: (
53
+ "black": $black,
54
+ "border": $border,
55
+ "borderDark": $borderDark,
56
+ "checkButtonChecked": $black,
57
+ "checkButtonUnchecked": $border,
58
+ "chevronActive": $black,
59
+ "chevronPassive": $borderDark,
60
+ "divider": $border,
61
+ "dividerDark": $borderDark,
62
+ "error": $error,
63
+ "focusOutlineInner": $white,
64
+ "focusOutlineOuter": $text,
65
+ "grayText": $grayText,
66
+ "icon": $icon,
67
+ "link": $link,
68
+ "overlayBackground": $white,
69
+ "sliderThumb": $white,
70
+ "sliderThumbShadow": $sliderTrack,
71
+ "sliderTrack": $sliderTrack,
72
+ "spinner1": $black,
73
+ "spinner2": $spinner2,
74
+ "text": $text,
75
+ "white": $white,
76
+ ) !default;
77
+
78
+ @function invertLightness($color) {
79
+ @return color.change(
80
+ $color,
81
+ $lightness: 100 - color.lightness($color) * 0.8
82
+ ); // We scale with 80% to have a bit more contrast
83
+ }
84
+
85
+ @function invertLightnessList($list) {
86
+ @each $key, $color in $list {
87
+ $list: map.set($list, $key, invertLightness($color));
88
+ }
89
+ @return $list;
90
+ }
91
+
92
+ $darkTheme: invertLightnessList($lightTheme);
93
+
94
+ $themes: (
95
+ "light": $lightTheme,
96
+ "dark": $darkTheme,
97
+ );
98
+
99
+ @mixin themed($ct, $baseFontSize: v.$baseFontSize, $overlayingZIndex: v.$overlayingZIndex) {
100
+ a {
101
+ color: map.get($ct, "link");
102
+ }
103
+
104
+ @include button.classes(
105
+ map.get($ct, "text"),
106
+ map.get($ct, "borderDark"),
107
+ map.get($ct, "focusOutlineInner"),
108
+ map.get($ct, "focusOutlineOuter"),
109
+ map.get($ct, "grayText"),
110
+ map.get($ct, "border")
111
+ );
112
+ @include checkmark.classes(
113
+ map.get($ct, "checkButtonChecked"),
114
+ map.get($ct, "checkButtonUnchecked")
115
+ );
116
+ @include chevron.classes(map.get($ct, "chevronActive"), map.get($ct, "chevronPassive"));
117
+ @include circle-xmark-icon.classes(map.get($ct, "icon"));
118
+ @include configurator.classes($baseFontSize, map.get($ct, "text"), map.get($ct, "divider"));
119
+ @include download-icon.classes(map.get($ct, "link"));
120
+ @include expandable.classes;
121
+ @include error-icon.classes(map.get($ct, "error"));
122
+ @include feature-item.classes(
123
+ map.get($ct, "text"),
124
+ map.get($ct, "grayText"),
125
+ map.get($ct, "checkButtonUnchecked"),
126
+ map.get($ct, "checkButtonChecked"),
127
+ map.get($ct, "focusOutlineInner"),
128
+ map.get($ct, "focusOutlineOuter"),
129
+ map.get($ct, "dividerDark")
130
+ );
131
+ @include forms.classes(map.get($ct, "borderDark"));
132
+ @include hr.classes(map.get($ct, "divider"));
133
+ @include loading.classes(
134
+ map.get($ct, "black"),
135
+ map.get($ct, "spinner1"),
136
+ map.get($ct, "spinner2"),
137
+ map.get($ct, "overlayBackground"),
138
+ $overlayingZIndex
139
+ );
140
+ @include option-tree.classes;
141
+ @include product-information.classes(map.get($ct, "text"));
142
+ @include range-view.classes(map.get($ct, "error"));
143
+ @include slider.classes(
144
+ map.get($ct, "sliderTrack"),
145
+ map.get($ct, "sliderThumb"),
146
+ map.get($ct, "sliderThumbShadow")
147
+ );
148
+ @include tasks.classes(map.get($ct, "border"), map.get($ct, "link"));
149
+ }
@@ -1,21 +1,21 @@
1
- /**
2
- * Web UI Utilities
3
- */
4
-
5
- .cfgMl1 {
6
- margin-left: 1em;
7
- }
8
-
9
- .cfgMt1 {
10
- margin-top: 1em;
11
- }
12
-
13
- .cfgMb1 {
14
- margin-bottom: 1em;
15
- }
16
-
17
- .cfgTextOverflow {
18
- overflow: hidden;
19
- text-overflow: ellipsis;
20
- white-space: nowrap;
21
- }
1
+ /**
2
+ * Web UI Utilities
3
+ */
4
+
5
+ .cfgMl1 {
6
+ margin-left: 1em;
7
+ }
8
+
9
+ .cfgMt1 {
10
+ margin-top: 1em;
11
+ }
12
+
13
+ .cfgMb1 {
14
+ margin-bottom: 1em;
15
+ }
16
+
17
+ .cfgTextOverflow {
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ white-space: nowrap;
21
+ }
@@ -1,6 +1,6 @@
1
- /**
2
- * Web UI Variables
3
- */
4
-
5
- $baseFontSize: 10px !default; // We use 10px for easy em conversion
6
- $overlayingZIndex: 1000 !default;
1
+ /**
2
+ * Web UI Variables
3
+ */
4
+
5
+ $baseFontSize: 10px !default; // We use 10px for easy em conversion
6
+ $overlayingZIndex: 1000 !default;
@@ -1,46 +1,46 @@
1
- @use "../mixins";
2
-
3
- @mixin classes($colorActive, $colorPassive) {
4
- .cfgCheckmark {
5
- /* The distance-units inside the checkmark are px even though everything
6
- else is relative units. The SVG has its own coordinate space. */
7
-
8
- @include mixins.cfgRootStyles;
9
-
10
- display: inline-block;
11
- width: 100%;
12
- height: 100%;
13
-
14
- &__container {
15
- transition: transform 0.4s;
16
- transform: translateY(17px);
17
- }
18
-
19
- &__line {
20
- stroke: $colorActive;
21
- stroke-linecap: round;
22
- stroke-width: 12;
23
- transform-origin: 50px 50px;
24
- transition: transform 0.4s, stroke 0.4s;
25
- }
26
-
27
- &__lineLeft {
28
- stroke: $colorActive;
29
- transform: rotate(40deg) translateY(24px) translateX(18px);
30
- }
31
-
32
- &__lineRight {
33
- stroke: $colorActive;
34
- transform: rotate(-50deg) translateY(-2px) translateX(-3px);
35
- }
36
-
37
- @content;
38
-
39
- &__border {
40
- @include mixins.cfgCheckbox($colorPassive);
41
- &--active {
42
- @include mixins.cfgCheckbox($colorActive);
43
- }
44
- }
45
- }
46
- }
1
+ @use "../mixins";
2
+
3
+ @mixin classes($colorActive, $colorPassive) {
4
+ .cfgCheckmark {
5
+ /* The distance-units inside the checkmark are px even though everything
6
+ else is relative units. The SVG has its own coordinate space. */
7
+
8
+ @include mixins.cfgRootStyles;
9
+
10
+ display: inline-block;
11
+ width: 100%;
12
+ height: 100%;
13
+
14
+ &__container {
15
+ transition: transform 0.4s;
16
+ transform: translateY(17px);
17
+ }
18
+
19
+ &__line {
20
+ stroke: $colorActive;
21
+ stroke-linecap: round;
22
+ stroke-width: 12;
23
+ transform-origin: 50px 50px;
24
+ transition: transform 0.4s, stroke 0.4s;
25
+ }
26
+
27
+ &__lineLeft {
28
+ stroke: $colorActive;
29
+ transform: rotate(40deg) translateY(24px) translateX(18px);
30
+ }
31
+
32
+ &__lineRight {
33
+ stroke: $colorActive;
34
+ transform: rotate(-50deg) translateY(-2px) translateX(-3px);
35
+ }
36
+
37
+ @content;
38
+
39
+ &__border {
40
+ @include mixins.cfgCheckbox($colorPassive);
41
+ &--active {
42
+ @include mixins.cfgCheckbox($colorActive);
43
+ }
44
+ }
45
+ }
46
+ }