cx 26.4.3 → 26.5.1
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/build/charts/axis/Axis.d.ts +8 -0
- package/build/charts/axis/Axis.d.ts.map +1 -1
- package/build/charts/axis/Axis.js +18 -1
- package/build/charts/axis/TimeAxis.js +1 -0
- package/build/data/AugmentedViewBase.d.ts.map +1 -1
- package/build/data/AugmentedViewBase.js +5 -4
- package/build/data/View.d.ts +0 -1
- package/build/data/View.d.ts.map +1 -1
- package/build/data/View.js +1 -3
- package/build/ui/Format.d.ts.map +1 -1
- package/build/ui/Format.js +26 -2
- package/build/util/Format.d.ts.map +1 -1
- package/build/util/Format.js +6 -0
- package/build/util/date/dateQuarter.d.ts +7 -0
- package/build/util/date/dateQuarter.d.ts.map +1 -0
- package/build/util/date/dateQuarter.js +8 -0
- package/build/util/date/dayBefore.d.ts +12 -0
- package/build/util/date/dayBefore.d.ts.map +1 -0
- package/build/util/date/dayBefore.js +15 -0
- package/build/util/date/index.d.ts +2 -0
- package/build/util/date/index.d.ts.map +1 -1
- package/build/util/date/index.js +2 -0
- package/build/widgets/form/DateTimePicker.d.ts.map +1 -1
- package/build/widgets/form/DateTimePicker.js +53 -31
- package/build/widgets/form/Field.d.ts.map +1 -1
- package/build/widgets/form/Field.js +2 -1
- package/build/widgets/form/LookupField.js +2 -1
- package/build/widgets/form/Wheel.d.ts +8 -0
- package/build/widgets/form/Wheel.d.ts.map +1 -1
- package/build/widgets/form/Wheel.js +30 -7
- package/build/widgets/grid/Grid.d.ts +1 -1
- package/build/widgets/grid/Grid.d.ts.map +1 -1
- package/dist/charts.css +6 -0
- package/dist/charts.js +18 -1
- package/dist/data.js +5 -4
- package/dist/manifest.js +772 -763
- package/dist/ui.js +33 -1
- package/dist/util.js +32 -0
- package/dist/widgets.css +9 -3
- package/dist/widgets.js +230 -174
- package/package.json +1 -1
- package/src/charts/RangeMarker.scss +3 -0
- package/src/charts/axis/Axis.tsx +31 -1
- package/src/charts/axis/TimeAxis.tsx +1 -0
- package/src/charts/index.scss +1 -0
- package/src/data/AugmentedViewBase.ts +5 -4
- package/src/data/View.ts +16 -61
- package/src/ui/DataProxy.ts +55 -55
- package/src/ui/Format.spec.ts +32 -0
- package/src/ui/Format.ts +27 -2
- package/src/ui/Rescope.ts +50 -50
- package/src/ui/adapter/ArrayAdapter.ts +229 -229
- package/src/ui/exprHelpers.ts +96 -96
- package/src/util/Format.spec.ts +11 -0
- package/src/util/Format.ts +7 -0
- package/src/util/date/dateQuarter.ts +8 -0
- package/src/util/date/dayBefore.ts +15 -0
- package/src/util/date/index.ts +2 -0
- package/src/widgets/Sandbox.ts +104 -104
- package/src/widgets/form/ColorField.scss +112 -112
- package/src/widgets/form/DateTimeField.scss +111 -111
- package/src/widgets/form/DateTimePicker.tsx +453 -392
- package/src/widgets/form/Field.tsx +2 -1
- package/src/widgets/form/LookupField.maps.scss +26 -26
- package/src/widgets/form/LookupField.scss +10 -3
- package/src/widgets/form/LookupField.tsx +4 -1
- package/src/widgets/form/MonthField.scss +113 -113
- package/src/widgets/form/NumberField.scss +72 -72
- package/src/widgets/form/Select.scss +104 -104
- package/src/widgets/form/TextField.scss +66 -66
- package/src/widgets/form/ValidationGroup.spec.tsx +30 -1
- package/src/widgets/form/Wheel.tsx +36 -7
- package/src/widgets/grid/Grid.tsx +1 -1
- package/src/widgets/nav/MenuItem.tsx +525 -525
|
@@ -312,6 +312,7 @@ export class Field<
|
|
|
312
312
|
data._readOnly = data.readOnly;
|
|
313
313
|
data._viewMode = data.mode === "view" || data.viewMode;
|
|
314
314
|
data._tabOnEnterKey = data.tabOnEnterKey;
|
|
315
|
+
data._visited = data.visited;
|
|
315
316
|
data.validationValue = this.getValidationValue(data);
|
|
316
317
|
instance.parentDisabled = context.parentDisabled;
|
|
317
318
|
instance.parentReadOnly = context.parentReadOnly;
|
|
@@ -366,7 +367,7 @@ export class Field<
|
|
|
366
367
|
);
|
|
367
368
|
data.visited = coalesce(
|
|
368
369
|
context.parentStrict ? context.parentVisited : null,
|
|
369
|
-
data.
|
|
370
|
+
data._visited,
|
|
370
371
|
context.parentVisited,
|
|
371
372
|
);
|
|
372
373
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
@use "../variables" as *;
|
|
2
|
-
@use "./Field.maps.scss" as *;
|
|
3
|
-
@use "../../util/scss/deep-merge.scss" as *;
|
|
4
|
-
@use "../../util/scss/calc.scss" as *;
|
|
5
|
-
|
|
6
|
-
$cx-input-tag-state-style-map: (
|
|
7
|
-
default: (
|
|
8
|
-
font-size: $cx-default-input-tag-font-size,
|
|
9
|
-
background-color: $cx-default-input-tag-background-color,
|
|
10
|
-
padding: $cx-default-input-tag-padding,
|
|
11
|
-
padding-right: cx-calc($cx-default-clear-size, 2px),
|
|
12
|
-
border-radius: $cx-default-input-tag-border-radius,
|
|
13
|
-
border-width: $cx-default-input-tag-border-width,
|
|
14
|
-
border-style: solid,
|
|
15
|
-
border-color: $cx-default-input-tag-border-color,
|
|
16
|
-
),
|
|
17
|
-
) !default;
|
|
18
|
-
|
|
19
|
-
$cx-input-tag-clear-state-style-map: cx-deep-map-merge(
|
|
20
|
-
$cx-clear-state-style-map,
|
|
21
|
-
(
|
|
22
|
-
default: (
|
|
23
|
-
right: cx-multiply($cx-default-input-tag-border-radius, 0.125),
|
|
24
|
-
),
|
|
25
|
-
)
|
|
26
|
-
) !default;
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
@use "./Field.maps.scss" as *;
|
|
3
|
+
@use "../../util/scss/deep-merge.scss" as *;
|
|
4
|
+
@use "../../util/scss/calc.scss" as *;
|
|
5
|
+
|
|
6
|
+
$cx-input-tag-state-style-map: (
|
|
7
|
+
default: (
|
|
8
|
+
font-size: $cx-default-input-tag-font-size,
|
|
9
|
+
background-color: $cx-default-input-tag-background-color,
|
|
10
|
+
padding: $cx-default-input-tag-padding,
|
|
11
|
+
padding-right: cx-calc($cx-default-clear-size, 2px),
|
|
12
|
+
border-radius: $cx-default-input-tag-border-radius,
|
|
13
|
+
border-width: $cx-default-input-tag-border-width,
|
|
14
|
+
border-style: solid,
|
|
15
|
+
border-color: $cx-default-input-tag-border-color,
|
|
16
|
+
),
|
|
17
|
+
) !default;
|
|
18
|
+
|
|
19
|
+
$cx-input-tag-clear-state-style-map: cx-deep-map-merge(
|
|
20
|
+
$cx-clear-state-style-map,
|
|
21
|
+
(
|
|
22
|
+
default: (
|
|
23
|
+
right: cx-multiply($cx-default-input-tag-border-radius, 0.125),
|
|
24
|
+
),
|
|
25
|
+
)
|
|
26
|
+
) !default;
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
$overrides: (
|
|
66
66
|
default: (
|
|
67
67
|
width: 100%,
|
|
68
|
+
// inline-flex preserves baseline alignment with sibling fields/buttons; ellipsis is applied on the inner -text span
|
|
68
69
|
display: inline-flex,
|
|
69
70
|
text-overflow: null,
|
|
70
71
|
padding: cx-top($padding)
|
|
@@ -75,9 +76,6 @@
|
|
|
75
76
|
);
|
|
76
77
|
|
|
77
78
|
.#{$state}single > & {
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
text-overflow: ellipsis;
|
|
80
|
-
white-space: nowrap;
|
|
81
79
|
flex-basis: 0%;
|
|
82
80
|
flex-grow: 1;
|
|
83
81
|
}
|
|
@@ -87,6 +85,15 @@
|
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
|
|
88
|
+
.#{$element}#{$name}-text {
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
text-overflow: ellipsis;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
min-width: 0;
|
|
93
|
+
flex-basis: 0%;
|
|
94
|
+
flex-grow: 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
90
97
|
.#{$element}#{$name}-tags {
|
|
91
98
|
display: flex;
|
|
92
99
|
margin: cx-calc($cx-default-input-tag-spacing, cx-multiply(cx-top($padding), -1))
|
|
@@ -1099,9 +1099,12 @@ class LookupComponent extends VDOM.Component<
|
|
|
1099
1099
|
text = this.getPlaceholder(data.placeholder);
|
|
1100
1100
|
}
|
|
1101
1101
|
} else {
|
|
1102
|
-
|
|
1102
|
+
let content = !data.empty
|
|
1103
1103
|
? data.text || this.getPlaceholder()
|
|
1104
1104
|
: this.getPlaceholder(data.placeholder);
|
|
1105
|
+
text = (
|
|
1106
|
+
<span className={CSS.element(baseClass, "text")}>{content}</span>
|
|
1107
|
+
);
|
|
1105
1108
|
}
|
|
1106
1109
|
|
|
1107
1110
|
let states = {
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
@use "sass:math";
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
@use "../variables" as *;
|
|
4
|
-
@use "../maps" as *;
|
|
5
|
-
@use "../../util/scss/add-rules.scss" as *;
|
|
6
|
-
@use "../../util/scss/calc.scss" as *;
|
|
7
|
-
@use "../../util/scss/clockwise.scss" as *;
|
|
8
|
-
@use "../../util/scss/deep-merge.scss" as *;
|
|
9
|
-
@use "../../util/scss/besm.scss" as *;
|
|
10
|
-
@use "../../util/scss/include.scss" as *;
|
|
11
|
-
@use "./Field.scss" as *;
|
|
12
|
-
|
|
13
|
-
@mixin cx-monthfield(
|
|
14
|
-
$name: "monthfield",
|
|
15
|
-
$state-style-map: $cx-std-field-state-style-map,
|
|
16
|
-
$placeholder: $cx-input-placeholder,
|
|
17
|
-
$empty-text: $cx-empty-text,
|
|
18
|
-
$clear-state-style-map: $cx-clear-state-style-map,
|
|
19
|
-
$left-icon-state-style-map: $cx-input-left-icon-state-style-map,
|
|
20
|
-
$right-icon-state-style-map: $cx-input-right-icon-state-style-map,
|
|
21
|
-
$icon-size: $cx-default-input-icon-size,
|
|
22
|
-
$width: $cx-default-input-width,
|
|
23
|
-
$besm: $cx-besm
|
|
24
|
-
) {
|
|
25
|
-
$block: map.get($besm, block);
|
|
26
|
-
$element: map.get($besm, element);
|
|
27
|
-
$state: map.get($besm, state);
|
|
28
|
-
|
|
29
|
-
.#{$block}#{$name} {
|
|
30
|
-
@include cxb-field($besm, $state-style-map, $width: $width);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
$padding: cx-get-state-rule($state-style-map, default, "padding");
|
|
34
|
-
|
|
35
|
-
.#{$element}#{$name}-input {
|
|
36
|
-
@include cxe-field-input(
|
|
37
|
-
$besm,
|
|
38
|
-
$state-style-map,
|
|
39
|
-
$placeholder: $placeholder,
|
|
40
|
-
$overrides: (
|
|
41
|
-
default: (
|
|
42
|
-
padding: cx-top($padding) cx-calc(cx-top($padding), $cx-default-clear-size, $cx-default-clear-spacing)
|
|
43
|
-
cx-bottom($padding)
|
|
44
|
-
cx-calc(cx-top($padding), $cx-default-input-left-tool-size, $cx-default-input-left-tool-spacing),
|
|
45
|
-
)
|
|
46
|
-
)
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.#{$element}#{$name}-clear {
|
|
51
|
-
@include cxe-field-button($besm, $clear-state-style-map);
|
|
52
|
-
|
|
53
|
-
.#{$state}focus > & {
|
|
54
|
-
@include cx-add-state-rules($clear-state-style-map, focus);
|
|
55
|
-
}
|
|
56
|
-
.#{$state}error > & {
|
|
57
|
-
@include cx-add-state-rules($clear-state-style-map, error);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.#{$element}#{$name}-left-icon {
|
|
62
|
-
@include cxe-field-button(
|
|
63
|
-
$besm,
|
|
64
|
-
cx-deep-map-merge(
|
|
65
|
-
$left-icon-state-style-map,
|
|
66
|
-
(
|
|
67
|
-
default: (
|
|
68
|
-
cursor: pointer,
|
|
69
|
-
),
|
|
70
|
-
)
|
|
71
|
-
)
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
.#{$state}disabled > & {
|
|
75
|
-
@include cx-add-state-rules($state-style-map, disabled);
|
|
76
|
-
border-width: 0;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.#{$state}focus > & {
|
|
80
|
-
@include cx-add-state-rules($left-icon-state-style-map, focus);
|
|
81
|
-
}
|
|
82
|
-
.#{$state}error > & {
|
|
83
|
-
@include cx-add-state-rules($left-icon-state-style-map, error);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.#{$element}#{$name}-right-icon {
|
|
88
|
-
@include cxe-field-button($besm, $right-icon-state-style-map);
|
|
89
|
-
|
|
90
|
-
.#{$state}disabled > & {
|
|
91
|
-
@include cx-add-state-rules($state-style-map, disabled);
|
|
92
|
-
border-width: 0;
|
|
93
|
-
}
|
|
94
|
-
.#{$state}focus > & {
|
|
95
|
-
@include cx-add-state-rules($right-icon-state-style-map, focus);
|
|
96
|
-
}
|
|
97
|
-
.#{$state}error > & {
|
|
98
|
-
@include cx-add-state-rules($right-icon-state-style-map, error);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.#{$element}#{$name}-icon {
|
|
103
|
-
@include cxe-field-button-icon($besm, $icon-size);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.#{$element}#{$name}-empty-text {
|
|
107
|
-
@include cxe-field-empty-text($empty-text);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
@if (cx-should-include("cx/widgets/MonthField")) {
|
|
112
|
-
@include cx-monthfield();
|
|
113
|
-
}
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
@use "../variables" as *;
|
|
4
|
+
@use "../maps" as *;
|
|
5
|
+
@use "../../util/scss/add-rules.scss" as *;
|
|
6
|
+
@use "../../util/scss/calc.scss" as *;
|
|
7
|
+
@use "../../util/scss/clockwise.scss" as *;
|
|
8
|
+
@use "../../util/scss/deep-merge.scss" as *;
|
|
9
|
+
@use "../../util/scss/besm.scss" as *;
|
|
10
|
+
@use "../../util/scss/include.scss" as *;
|
|
11
|
+
@use "./Field.scss" as *;
|
|
12
|
+
|
|
13
|
+
@mixin cx-monthfield(
|
|
14
|
+
$name: "monthfield",
|
|
15
|
+
$state-style-map: $cx-std-field-state-style-map,
|
|
16
|
+
$placeholder: $cx-input-placeholder,
|
|
17
|
+
$empty-text: $cx-empty-text,
|
|
18
|
+
$clear-state-style-map: $cx-clear-state-style-map,
|
|
19
|
+
$left-icon-state-style-map: $cx-input-left-icon-state-style-map,
|
|
20
|
+
$right-icon-state-style-map: $cx-input-right-icon-state-style-map,
|
|
21
|
+
$icon-size: $cx-default-input-icon-size,
|
|
22
|
+
$width: $cx-default-input-width,
|
|
23
|
+
$besm: $cx-besm
|
|
24
|
+
) {
|
|
25
|
+
$block: map.get($besm, block);
|
|
26
|
+
$element: map.get($besm, element);
|
|
27
|
+
$state: map.get($besm, state);
|
|
28
|
+
|
|
29
|
+
.#{$block}#{$name} {
|
|
30
|
+
@include cxb-field($besm, $state-style-map, $width: $width);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
$padding: cx-get-state-rule($state-style-map, default, "padding");
|
|
34
|
+
|
|
35
|
+
.#{$element}#{$name}-input {
|
|
36
|
+
@include cxe-field-input(
|
|
37
|
+
$besm,
|
|
38
|
+
$state-style-map,
|
|
39
|
+
$placeholder: $placeholder,
|
|
40
|
+
$overrides: (
|
|
41
|
+
default: (
|
|
42
|
+
padding: cx-top($padding) cx-calc(cx-top($padding), $cx-default-clear-size, $cx-default-clear-spacing)
|
|
43
|
+
cx-bottom($padding)
|
|
44
|
+
cx-calc(cx-top($padding), $cx-default-input-left-tool-size, $cx-default-input-left-tool-spacing),
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.#{$element}#{$name}-clear {
|
|
51
|
+
@include cxe-field-button($besm, $clear-state-style-map);
|
|
52
|
+
|
|
53
|
+
.#{$state}focus > & {
|
|
54
|
+
@include cx-add-state-rules($clear-state-style-map, focus);
|
|
55
|
+
}
|
|
56
|
+
.#{$state}error > & {
|
|
57
|
+
@include cx-add-state-rules($clear-state-style-map, error);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.#{$element}#{$name}-left-icon {
|
|
62
|
+
@include cxe-field-button(
|
|
63
|
+
$besm,
|
|
64
|
+
cx-deep-map-merge(
|
|
65
|
+
$left-icon-state-style-map,
|
|
66
|
+
(
|
|
67
|
+
default: (
|
|
68
|
+
cursor: pointer,
|
|
69
|
+
),
|
|
70
|
+
)
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
.#{$state}disabled > & {
|
|
75
|
+
@include cx-add-state-rules($state-style-map, disabled);
|
|
76
|
+
border-width: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.#{$state}focus > & {
|
|
80
|
+
@include cx-add-state-rules($left-icon-state-style-map, focus);
|
|
81
|
+
}
|
|
82
|
+
.#{$state}error > & {
|
|
83
|
+
@include cx-add-state-rules($left-icon-state-style-map, error);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.#{$element}#{$name}-right-icon {
|
|
88
|
+
@include cxe-field-button($besm, $right-icon-state-style-map);
|
|
89
|
+
|
|
90
|
+
.#{$state}disabled > & {
|
|
91
|
+
@include cx-add-state-rules($state-style-map, disabled);
|
|
92
|
+
border-width: 0;
|
|
93
|
+
}
|
|
94
|
+
.#{$state}focus > & {
|
|
95
|
+
@include cx-add-state-rules($right-icon-state-style-map, focus);
|
|
96
|
+
}
|
|
97
|
+
.#{$state}error > & {
|
|
98
|
+
@include cx-add-state-rules($right-icon-state-style-map, error);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.#{$element}#{$name}-icon {
|
|
103
|
+
@include cxe-field-button-icon($besm, $icon-size);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.#{$element}#{$name}-empty-text {
|
|
107
|
+
@include cxe-field-empty-text($empty-text);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@if (cx-should-include("cx/widgets/MonthField")) {
|
|
112
|
+
@include cx-monthfield();
|
|
113
|
+
}
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
@use "sass:math";
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
@use "../variables" as *;
|
|
4
|
-
@use "../maps" as *;
|
|
5
|
-
@use "../../util/scss/besm.scss" as *;
|
|
6
|
-
@use "../../util/scss/add-rules.scss" as *;
|
|
7
|
-
@use "../../util/scss/calc.scss" as *;
|
|
8
|
-
@use "../../util/scss/clockwise.scss" as *;
|
|
9
|
-
@use "../../util/scss/include.scss" as *;
|
|
10
|
-
@use "./Field.scss" as *;
|
|
11
|
-
|
|
12
|
-
@mixin cx-numberfield(
|
|
13
|
-
$name: "numberfield",
|
|
14
|
-
$state-style-map: $cx-std-field-state-style-map,
|
|
15
|
-
$placeholder: $cx-input-placeholder,
|
|
16
|
-
$empty-text: $cx-empty-text,
|
|
17
|
-
$left-icon-state-style-map: $cx-input-left-icon-state-style-map,
|
|
18
|
-
$clear-state-style-map: $cx-clear-state-style-map,
|
|
19
|
-
$tool-state-style-map: $cx-input-right-icon-state-style-map,
|
|
20
|
-
$icon-size: $cx-default-input-icon-size,
|
|
21
|
-
$width: $cx-default-input-width,
|
|
22
|
-
$besm: $cx-besm
|
|
23
|
-
) {
|
|
24
|
-
$block: map.get($besm, block);
|
|
25
|
-
$element: map.get($besm, element);
|
|
26
|
-
$state: map.get($besm, state);
|
|
27
|
-
$padding: cx-get-state-rule($state-style-map, default, "padding");
|
|
28
|
-
|
|
29
|
-
.#{$block}#{$name} {
|
|
30
|
-
@include cxb-field($besm, $state-style-map, $width: $width, $input: true);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.#{$element}#{$name}-input {
|
|
34
|
-
@include cxe-field-input($besm, $state-style-map, $placeholder: $placeholder);
|
|
35
|
-
|
|
36
|
-
&::-webkit-inner-spin-button,
|
|
37
|
-
&::-webkit-outer-spin-button {
|
|
38
|
-
-webkit-appearance: none;
|
|
39
|
-
margin: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.#{$state}icon > & {
|
|
43
|
-
padding-left: cx-calc(cx-top($padding), $cx-default-input-left-tool-size, $cx-default-input-left-tool-spacing);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.#{$element}#{$name}-tool {
|
|
48
|
-
pointer-events: none;
|
|
49
|
-
@include cxe-field-button($besm, $tool-state-style-map);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.#{$element}#{$name}-icon {
|
|
53
|
-
@include cxe-field-button-icon($besm, $icon-size);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.#{$element}#{$name}-left-icon {
|
|
57
|
-
pointer-events: none;
|
|
58
|
-
@include cxe-field-button($besm, $left-icon-state-style-map);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.#{$element}#{$name}-clear {
|
|
62
|
-
@include cxe-field-button($besm, $clear-state-style-map);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.#{$element}#{$name}-empty-text {
|
|
66
|
-
@include cxe-field-empty-text($empty-text);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@if (cx-should-include("cx/widgets/NumberField")) {
|
|
71
|
-
@include cx-numberfield();
|
|
72
|
-
}
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
@use "../variables" as *;
|
|
4
|
+
@use "../maps" as *;
|
|
5
|
+
@use "../../util/scss/besm.scss" as *;
|
|
6
|
+
@use "../../util/scss/add-rules.scss" as *;
|
|
7
|
+
@use "../../util/scss/calc.scss" as *;
|
|
8
|
+
@use "../../util/scss/clockwise.scss" as *;
|
|
9
|
+
@use "../../util/scss/include.scss" as *;
|
|
10
|
+
@use "./Field.scss" as *;
|
|
11
|
+
|
|
12
|
+
@mixin cx-numberfield(
|
|
13
|
+
$name: "numberfield",
|
|
14
|
+
$state-style-map: $cx-std-field-state-style-map,
|
|
15
|
+
$placeholder: $cx-input-placeholder,
|
|
16
|
+
$empty-text: $cx-empty-text,
|
|
17
|
+
$left-icon-state-style-map: $cx-input-left-icon-state-style-map,
|
|
18
|
+
$clear-state-style-map: $cx-clear-state-style-map,
|
|
19
|
+
$tool-state-style-map: $cx-input-right-icon-state-style-map,
|
|
20
|
+
$icon-size: $cx-default-input-icon-size,
|
|
21
|
+
$width: $cx-default-input-width,
|
|
22
|
+
$besm: $cx-besm
|
|
23
|
+
) {
|
|
24
|
+
$block: map.get($besm, block);
|
|
25
|
+
$element: map.get($besm, element);
|
|
26
|
+
$state: map.get($besm, state);
|
|
27
|
+
$padding: cx-get-state-rule($state-style-map, default, "padding");
|
|
28
|
+
|
|
29
|
+
.#{$block}#{$name} {
|
|
30
|
+
@include cxb-field($besm, $state-style-map, $width: $width, $input: true);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.#{$element}#{$name}-input {
|
|
34
|
+
@include cxe-field-input($besm, $state-style-map, $placeholder: $placeholder);
|
|
35
|
+
|
|
36
|
+
&::-webkit-inner-spin-button,
|
|
37
|
+
&::-webkit-outer-spin-button {
|
|
38
|
+
-webkit-appearance: none;
|
|
39
|
+
margin: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.#{$state}icon > & {
|
|
43
|
+
padding-left: cx-calc(cx-top($padding), $cx-default-input-left-tool-size, $cx-default-input-left-tool-spacing);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.#{$element}#{$name}-tool {
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
@include cxe-field-button($besm, $tool-state-style-map);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.#{$element}#{$name}-icon {
|
|
53
|
+
@include cxe-field-button-icon($besm, $icon-size);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.#{$element}#{$name}-left-icon {
|
|
57
|
+
pointer-events: none;
|
|
58
|
+
@include cxe-field-button($besm, $left-icon-state-style-map);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.#{$element}#{$name}-clear {
|
|
62
|
+
@include cxe-field-button($besm, $clear-state-style-map);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.#{$element}#{$name}-empty-text {
|
|
66
|
+
@include cxe-field-empty-text($empty-text);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@if (cx-should-include("cx/widgets/NumberField")) {
|
|
71
|
+
@include cx-numberfield();
|
|
72
|
+
}
|