cx 24.8.6 → 24.9.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.
@@ -1,66 +1,61 @@
1
-
2
- @mixin cx-numberfield(
3
- $name: 'numberfield',
4
- $state-style-map: $cx-std-field-state-style-map,
5
- $placeholder: $cx-input-placeholder,
6
- $empty-text: $cx-empty-text,
7
- $left-icon-state-style-map: $cx-input-left-icon-state-style-map,
8
- $clear-state-style-map: $cx-clear-state-style-map,
9
- $tool-state-style-map: $cx-input-right-icon-state-style-map,
10
- $icon-size: $cx-default-input-icon-size,
11
- $width: $cx-default-input-width,
12
- $besm: $cx-besm
13
- ) {
14
- $block: map-get($besm, block);
15
- $element: map-get($besm, element);
16
- $state: map-get($besm, state);
17
- $padding: cx-get-state-rule($state-style-map, default, 'padding');
18
-
19
- .#{$block}#{$name} {
20
- @include cxb-field($besm, $state-style-map, $width: $width, $input: true);
21
- }
22
-
23
- .#{$element}#{$name}-input {
24
- @include cxe-field-input(
25
- $besm,
26
- $state-style-map,
27
- $placeholder: $placeholder
28
- );
29
-
30
- &::-webkit-inner-spin-button,
31
- &::-webkit-outer-spin-button {
32
- -webkit-appearance: none;
33
- margin: 0;
34
- }
35
-
36
- .#{$state}icon > & {
37
- padding-left: cx-calc(2 * cx-left($padding), $icon-size);
38
- }
39
- }
40
-
41
- .#{$element}#{$name}-tool {
42
- @include cxe-field-button($besm, $tool-state-style-map);
43
- pointer-events: none;
44
- }
45
-
46
- .#{$element}#{$name}-icon {
47
- @include cxe-field-button-icon($besm, $icon-size);
48
- }
49
-
50
- .#{$element}#{$name}-left-icon {
51
- @include cxe-field-button($besm, $left-icon-state-style-map);
52
- pointer-events: none;
53
- }
54
-
55
- .#{$element}#{$name}-clear {
56
- @include cxe-field-button($besm, $clear-state-style-map);
57
- }
58
-
59
- .#{$element}#{$name}-empty-text {
60
- @include cxe-field-empty-text($empty-text);
61
- }
62
- }
63
-
64
- @if (cx-should-include('cx/widgets/NumberField')) {
65
- @include cx-numberfield();
66
- }
1
+ @mixin cx-numberfield(
2
+ $name: "numberfield",
3
+ $state-style-map: $cx-std-field-state-style-map,
4
+ $placeholder: $cx-input-placeholder,
5
+ $empty-text: $cx-empty-text,
6
+ $left-icon-state-style-map: $cx-input-left-icon-state-style-map,
7
+ $clear-state-style-map: $cx-clear-state-style-map,
8
+ $tool-state-style-map: $cx-input-right-icon-state-style-map,
9
+ $icon-size: $cx-default-input-icon-size,
10
+ $width: $cx-default-input-width,
11
+ $besm: $cx-besm
12
+ ) {
13
+ $block: map-get($besm, block);
14
+ $element: map-get($besm, element);
15
+ $state: map-get($besm, state);
16
+ $padding: cx-get-state-rule($state-style-map, default, "padding");
17
+
18
+ .#{$block}#{$name} {
19
+ @include cxb-field($besm, $state-style-map, $width: $width, $input: true);
20
+ }
21
+
22
+ .#{$element}#{$name}-input {
23
+ @include cxe-field-input($besm, $state-style-map, $placeholder: $placeholder);
24
+
25
+ &::-webkit-inner-spin-button,
26
+ &::-webkit-outer-spin-button {
27
+ -webkit-appearance: none;
28
+ margin: 0;
29
+ }
30
+
31
+ .#{$state}icon > & {
32
+ padding-left: cx-calc(2 * cx-left($padding), $icon-size);
33
+ }
34
+ }
35
+
36
+ .#{$element}#{$name}-tool {
37
+ pointer-events: none;
38
+ @include cxe-field-button($besm, $tool-state-style-map);
39
+ }
40
+
41
+ .#{$element}#{$name}-icon {
42
+ @include cxe-field-button-icon($besm, $icon-size);
43
+ }
44
+
45
+ .#{$element}#{$name}-left-icon {
46
+ pointer-events: none;
47
+ @include cxe-field-button($besm, $left-icon-state-style-map);
48
+ }
49
+
50
+ .#{$element}#{$name}-clear {
51
+ @include cxe-field-button($besm, $clear-state-style-map);
52
+ }
53
+
54
+ .#{$element}#{$name}-empty-text {
55
+ @include cxe-field-empty-text($empty-text);
56
+ }
57
+ }
58
+
59
+ @if (cx-should-include("cx/widgets/NumberField")) {
60
+ @include cx-numberfield();
61
+ }
@@ -1,122 +1,122 @@
1
- @mixin cx-radio(
2
- $name: "radio",
3
- $state-style-map: $cx-radio-state-style-map,
4
- $size: $cx-default-radio-size,
5
- $besm: $cx-besm
6
- ) {
7
- $block: map-get($besm, block);
8
- $element: map-get($besm, element);
9
- $state: map-get($besm, state);
10
-
11
- $padding: cx-get-state-rule($state-style-map, default, padding);
12
- $border-width: cx-get-state-rule($state-style-map, default, border-width);
13
-
14
- $outer-styles: cx-deep-map-merge(
15
- $state-style-map,
16
- (
17
- default: (
18
- border-width: cx-top($border-width) 0 cx-bottom($border-width) 0,
19
- ),
20
- )
21
- );
22
-
23
- .#{$block}#{$name} {
24
- @include cxb-field($besm, $outer-styles, $input: false, $box: true);
25
- min-width: $size;
26
- }
27
-
28
- .#{$element}#{$name}-radio {
29
- padding: 0;
30
- margin: 0 !important;
31
- width: $size;
32
- height: $size;
33
- top: calc(50% - #{$size * 0.5});
34
- left: 0;
35
- display: inline-block;
36
- position: absolute;
37
- -webkit-backface-visibility: hidden;
38
- outline: none;
39
-
40
- &::-moz-focus-outer {
41
- border: 0;
42
- }
43
-
44
- &:focus {
45
- box-shadow: 0 0 2px 2px rgba(77, 144, 254, 0.8);
46
- background: transparent;
47
- border-radius: 50%;
48
- outline: none;
49
- }
50
- }
51
-
52
- .#{$element}#{$name}-text {
53
- display: inline-block;
54
- margin-left: $size;
55
- user-select: none;
56
-
57
- .#{$state}disabled > & {
58
- opacity: 0.5;
59
- }
60
- }
61
-
62
- //non-native implementation
63
- .#{$element}#{$name}-input {
64
- @include cxe-field-input(
65
- $besm,
66
- $state-style-map,
67
- $input: false,
68
- $overrides: (
69
- default: (
70
- padding: 0,
71
- margin: 0 !important,
72
- )
73
- )
74
- );
75
-
76
- width: $size;
77
- height: $size;
78
-
79
- top: calc(50% - #{$size * 0.5});
80
- left: 0;
81
- display: inline-block;
82
- position: absolute;
83
- border-radius: 50%;
84
- //overflow: hidden;
85
- opacity: 1;
86
-
87
- &.#{$state}checked {
88
- @include cx-add-state-rules($state-style-map, checked);
89
-
90
- &:focus {
91
- @include cx-add-state-rules($state-style-map, checked-focus);
92
- }
93
- &:hover {
94
- @include cx-add-state-rules($state-style-map, checked-hover);
95
- }
96
-
97
- .#{$state}disabled > & {
98
- @include cx-add-state-rules($state-style-map, disabled-checked);
99
- }
100
- }
101
-
102
- &:before {
103
- content: " ";
104
- width: calc(100% - 6px);
105
- height: calc(100% - 6px);
106
- visibility: hidden;
107
- position: absolute;
108
- margin: 3px;
109
- box-sizing: border-box;
110
- background-color: currentColor;
111
- border-radius: 50%;
112
- }
113
-
114
- &.#{$state}checked:before {
115
- visibility: visible;
116
- }
117
- }
118
- }
119
-
120
- @if (cx-should-include("cx/widgets/Radio")) {
121
- @include cx-radio();
122
- }
1
+ @mixin cx-radio(
2
+ $name: "radio",
3
+ $state-style-map: $cx-radio-state-style-map,
4
+ $size: $cx-default-radio-size,
5
+ $besm: $cx-besm
6
+ ) {
7
+ $block: map-get($besm, block);
8
+ $element: map-get($besm, element);
9
+ $state: map-get($besm, state);
10
+
11
+ $padding: cx-get-state-rule($state-style-map, default, padding);
12
+ $border-width: cx-get-state-rule($state-style-map, default, border-width);
13
+
14
+ $outer-styles: cx-deep-map-merge(
15
+ $state-style-map,
16
+ (
17
+ default: (
18
+ border-width: cx-top($border-width) 0 cx-bottom($border-width) 0,
19
+ ),
20
+ )
21
+ );
22
+
23
+ .#{$block}#{$name} {
24
+ min-width: $size;
25
+ @include cxb-field($besm, $outer-styles, $input: false, $box: true);
26
+ }
27
+
28
+ .#{$element}#{$name}-radio {
29
+ padding: 0;
30
+ margin: 0 !important;
31
+ width: $size;
32
+ height: $size;
33
+ top: calc(50% - #{$size * 0.5});
34
+ left: 0;
35
+ display: inline-block;
36
+ position: absolute;
37
+ -webkit-backface-visibility: hidden;
38
+ outline: none;
39
+
40
+ &::-moz-focus-outer {
41
+ border: 0;
42
+ }
43
+
44
+ &:focus {
45
+ box-shadow: 0 0 2px 2px rgba(77, 144, 254, 0.8);
46
+ background: transparent;
47
+ border-radius: 50%;
48
+ outline: none;
49
+ }
50
+ }
51
+
52
+ .#{$element}#{$name}-text {
53
+ display: inline-block;
54
+ margin-left: $size;
55
+ user-select: none;
56
+
57
+ .#{$state}disabled > & {
58
+ opacity: 0.5;
59
+ }
60
+ }
61
+
62
+ //non-native implementation
63
+ .#{$element}#{$name}-input {
64
+ width: $size;
65
+ height: $size;
66
+
67
+ top: calc(50% - #{$size * 0.5});
68
+ left: 0;
69
+ display: inline-block;
70
+ position: absolute;
71
+ border-radius: 50%;
72
+ //overflow: hidden;
73
+ opacity: 1;
74
+
75
+ @include cxe-field-input(
76
+ $besm,
77
+ $state-style-map,
78
+ $input: false,
79
+ $overrides: (
80
+ default: (
81
+ padding: 0,
82
+ margin: 0 !important,
83
+ )
84
+ )
85
+ );
86
+
87
+ &.#{$state}checked {
88
+ @include cx-add-state-rules($state-style-map, checked);
89
+
90
+ &:focus {
91
+ @include cx-add-state-rules($state-style-map, checked-focus);
92
+ }
93
+ &:hover {
94
+ @include cx-add-state-rules($state-style-map, checked-hover);
95
+ }
96
+
97
+ .#{$state}disabled > & {
98
+ @include cx-add-state-rules($state-style-map, disabled-checked);
99
+ }
100
+ }
101
+
102
+ &:before {
103
+ content: " ";
104
+ width: calc(100% - 6px);
105
+ height: calc(100% - 6px);
106
+ visibility: hidden;
107
+ position: absolute;
108
+ margin: 3px;
109
+ box-sizing: border-box;
110
+ background-color: currentColor;
111
+ border-radius: 50%;
112
+ }
113
+
114
+ &.#{$state}checked:before {
115
+ visibility: visible;
116
+ }
117
+ }
118
+ }
119
+
120
+ @if (cx-should-include("cx/widgets/Radio")) {
121
+ @include cx-radio();
122
+ }
@@ -1,99 +1,99 @@
1
-
2
- @import "../overlay/Dropdown";
3
-
4
- @mixin cx-select(
5
- $name: 'select',
6
- $state-style-map: $cx-std-field-state-style-map,
7
- $placeholder: $cx-input-placeholder,
8
- $empty-text: $cx-empty-text,
9
- $width: $cx-default-input-width,
10
- $left-icon-state-style-map: $cx-input-left-icon-state-style-map,
11
- $clear-state-style-map: $cx-clear-state-style-map,
12
- $tool-state-style-map: $cx-input-right-icon-state-style-map,
13
- $icon-size: $cx-default-input-icon-size,
14
- $besm: $cx-besm
15
- ) {
16
- $block: map-get($besm, block);
17
- $element: map-get($besm, element);
18
- $state: map-get($besm, state);
19
- $mod: map-get($besm, mod);
20
-
21
- .#{$block}#{$name} {
22
- @include cxb-field(
23
- $besm,
24
- $state-style-map: $state-style-map,
25
- $width: $width,
26
- $input: true
27
- );
28
-
29
- .#{$element}#{$name}-left-icon {
30
- @include cxe-field-button($besm, $left-icon-state-style-map);
31
- pointer-events: none;
32
- }
33
- }
34
-
35
- $padding: cx-get-state-rule($state-style-map, default, 'padding');
36
-
37
- .#{$element}#{$name}-select {
38
- @include cxe-field-input(
39
- $besm,
40
- $state-style-map,
41
- $placeholder: $placeholder,
42
- $overrides: (
43
- padding: cx-top($cx-default-input-padding) calc(#{cx-right($cx-default-input-padding)} + #{$cx-default-clear-size} - #{cx-right($cx-default-input-padding)}) cx-bottom($cx-default-input-padding) cx-left($cx-default-input-padding),
44
- -webkit-appearance: none,
45
- -moz-appearance: none,
46
- -ms-appearance: none,
47
- appearance: none
48
- )
49
- );
50
-
51
- .#{$state}icon > & {
52
- padding-left: cx-calc(2 * cx-left($padding), $icon-size);
53
- }
54
-
55
- .#{$state}empty > & {
56
- @include cx-add-rules($placeholder);
57
- }
58
-
59
- &::-ms-expand {
60
- display: none;
61
- margin: 0;
62
- padding: 0;
63
- }
64
-
65
- option {
66
- background-color: $cx-default-dropdown-background-color;
67
- color: cx-get-state-rule($state-style-map, default, color);
68
- }
69
- }
70
-
71
- .#{$element}#{$name}-clear {
72
- @include cxe-field-button($besm, $clear-state-style-map);
73
- }
74
-
75
- .#{$element}#{$name}-placeholder {
76
- @include cx-add-rules($placeholder);
77
- }
78
-
79
- .#{$element}#{$name}-tool {
80
- @include cxe-field-button($besm, $tool-state-style-map);
81
- pointer-events: none; //cannot call open-dropdown on native element
82
-
83
- .#{$state}disabled > & {
84
- @include cx-add-state-rules($state-style-map, disabled);
85
- border-width: 0;
86
- }
87
- .#{$state}focus > & {
88
- @include cx-add-state-rules($tool-state-style-map, focus);
89
- }
90
- }
91
-
92
- .#{$element}#{$name}-icon {
93
- @include cxe-field-button-icon($besm, $icon-size);
94
- }
95
- }
96
-
97
- @if (cx-should-include('cx/widgets/Select')) {
98
- @include cx-select;
99
- }
1
+ @import "../overlay/Dropdown";
2
+
3
+ @mixin cx-select(
4
+ $name: "select",
5
+ $state-style-map: $cx-std-field-state-style-map,
6
+ $placeholder: $cx-input-placeholder,
7
+ $empty-text: $cx-empty-text,
8
+ $width: $cx-default-input-width,
9
+ $left-icon-state-style-map: $cx-input-left-icon-state-style-map,
10
+ $clear-state-style-map: $cx-clear-state-style-map,
11
+ $tool-state-style-map: $cx-input-right-icon-state-style-map,
12
+ $icon-size: $cx-default-input-icon-size,
13
+ $besm: $cx-besm
14
+ ) {
15
+ $block: map-get($besm, block);
16
+ $element: map-get($besm, element);
17
+ $state: map-get($besm, state);
18
+ $mod: map-get($besm, mod);
19
+
20
+ .#{$block}#{$name} {
21
+ @include cxb-field($besm, $state-style-map: $state-style-map, $width: $width, $input: true);
22
+
23
+ .#{$element}#{$name}-left-icon {
24
+ pointer-events: none;
25
+ @include cxe-field-button($besm, $left-icon-state-style-map);
26
+ }
27
+ }
28
+
29
+ $padding: cx-get-state-rule($state-style-map, default, "padding");
30
+
31
+ .#{$element}#{$name}-select {
32
+ @include cxe-field-input(
33
+ $besm,
34
+ $state-style-map,
35
+ $placeholder: $placeholder,
36
+ $overrides: (
37
+ padding: cx-top($cx-default-input-padding)
38
+ calc(
39
+ #{cx-right($cx-default-input-padding)} + #{$cx-default-clear-size} - #{cx-right(
40
+ $cx-default-input-padding
41
+ )}
42
+ )
43
+ cx-bottom($cx-default-input-padding) cx-left($cx-default-input-padding),
44
+ -webkit-appearance: none,
45
+ -moz-appearance: none,
46
+ -ms-appearance: none,
47
+ appearance: none
48
+ )
49
+ );
50
+
51
+ .#{$state}icon > & {
52
+ padding-left: cx-calc(2 * cx-left($padding), $icon-size);
53
+ }
54
+
55
+ .#{$state}empty > & {
56
+ @include cx-add-rules($placeholder);
57
+ }
58
+
59
+ &::-ms-expand {
60
+ display: none;
61
+ margin: 0;
62
+ padding: 0;
63
+ }
64
+
65
+ option {
66
+ background-color: $cx-default-dropdown-background-color;
67
+ color: cx-get-state-rule($state-style-map, default, color);
68
+ }
69
+ }
70
+
71
+ .#{$element}#{$name}-clear {
72
+ @include cxe-field-button($besm, $clear-state-style-map);
73
+ }
74
+
75
+ .#{$element}#{$name}-placeholder {
76
+ @include cx-add-rules($placeholder);
77
+ }
78
+
79
+ .#{$element}#{$name}-tool {
80
+ pointer-events: none; //cannot call open-dropdown on native element
81
+ @include cxe-field-button($besm, $tool-state-style-map);
82
+
83
+ .#{$state}disabled > & {
84
+ border-width: 0;
85
+ @include cx-add-state-rules($state-style-map, disabled);
86
+ }
87
+ .#{$state}focus > & {
88
+ @include cx-add-state-rules($tool-state-style-map, focus);
89
+ }
90
+ }
91
+
92
+ .#{$element}#{$name}-icon {
93
+ @include cxe-field-button-icon($besm, $icon-size);
94
+ }
95
+ }
96
+
97
+ @if (cx-should-include("cx/widgets/Select")) {
98
+ @include cx-select;
99
+ }