cx 26.7.3 → 26.7.5

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,96 +1,96 @@
1
- import { computable } from "../data/computable";
2
- import { AccessorChain } from "../data/createAccessorModelProxy";
3
- import { Selector } from "../data/Selector";
4
- import { Format } from "../util/Format";
5
- import { expr } from "./expr";
6
-
7
- /** Returns a selector that converts the value to boolean using !! */
8
- export function truthy<V>(arg: AccessorChain<V>): Selector<boolean> {
9
- return expr(arg, (x) => !!x);
10
- }
11
-
12
- /** Returns a selector that checks if the value is falsy using ! */
13
- export function falsy<V>(arg: AccessorChain<V>): Selector<boolean> {
14
- return expr(arg, (x) => !x);
15
- }
16
-
17
- /** Returns a selector that checks if the value is strictly true (=== true) */
18
- export function isTrue(arg: AccessorChain<any>): Selector<boolean> {
19
- return expr(arg, (x) => x === true);
20
- }
21
-
22
- /** Returns a selector that checks if the value is strictly false (=== false) */
23
- export function isFalse(arg: AccessorChain<any>): Selector<boolean> {
24
- return expr(arg, (x) => x === false);
25
- }
26
-
27
- /** Returns a selector that checks if the value is not null or undefined (x != null) */
28
- export function hasValue<V>(arg: AccessorChain<V>): Selector<boolean> {
29
- return expr(arg, (x) => x != null);
30
- }
31
-
32
- /** Returns a selector that checks if a string or array is empty (null, undefined, or length === 0) */
33
- export function isEmpty(arg: AccessorChain<string | any[] | null | undefined>): Selector<boolean> {
34
- return expr(arg, (x) => x == null || x.length === 0);
35
- }
36
-
37
- /** Returns a selector that checks if a string or array is non-empty (not null/undefined and length > 0) */
38
- export function isNonEmpty(arg: AccessorChain<string | any[] | null | undefined>): Selector<boolean> {
39
- return expr(arg, (x) => x != null && x.length > 0);
40
- }
41
-
42
- /** Returns a selector that checks if the value is less than the given value */
43
- export function lessThan<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
44
- return expr(arg, (x) => x < value);
45
- }
46
-
47
- /** Returns a selector that checks if the value is less than or equal to the given value */
48
- export function lessThanOrEqual<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
49
- return expr(arg, (x) => x <= value);
50
- }
51
-
52
- /** Returns a selector that checks if the value is greater than the given value */
53
- export function greaterThan<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
54
- return expr(arg, (x) => x > value);
55
- }
56
-
57
- /** Returns a selector that checks if the value is greater than or equal to the given value */
58
- export function greaterThanOrEqual<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
59
- return expr(arg, (x) => x >= value);
60
- }
61
-
62
- /** Returns a selector that checks if the value equals the given value using == */
63
- export function equal<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
64
- return expr(arg, (x) => x == value);
65
- }
66
-
67
- /** Returns a selector that checks if the value does not equal the given value using != */
68
- export function notEqual<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
69
- return expr(arg, (x) => x != value);
70
- }
71
-
72
- /** Returns a selector that checks if the value strictly equals the given value using === */
73
- export function strictEqual<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
74
- return expr(arg, (x) => x === value);
75
- }
76
-
77
- /** Returns a selector that checks if the value strictly does not equal the given value using !== */
78
- export function strictNotEqual<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
79
- return expr(arg, (x) => x !== value);
80
- }
81
-
82
- /** Returns a selector that formats the value using the specified format string.
83
- * Format strings use semicolon-separated syntax: "formatType;param1;param2"
84
- * @param arg - The accessor chain to the value
85
- * @param fmt - The format string
86
- * @param nullText - Optional text to display for null/undefined values
87
- * @example
88
- * format(m.price, "n;2") // formats as number with 2 decimal places
89
- * format(m.date, "d") // formats as date
90
- * format(m.value, "p;0;2") // formats as percentage with 0-2 decimal places
91
- * format(m.value, "n;2", "N/A") // shows "N/A" for null values
92
- */
93
- export function format<V>(arg: AccessorChain<V>, fmt: string, nullText?: string): Selector<string> {
94
- let f = nullText != null ? `${fmt}|${nullText}` : fmt;
95
- return computable(arg, (x) => Format.value(x, f));
96
- }
1
+ import { computable } from "../data/computable";
2
+ import { AccessorChain } from "../data/createAccessorModelProxy";
3
+ import { Selector } from "../data/Selector";
4
+ import { Format } from "../util/Format";
5
+ import { expr } from "./expr";
6
+
7
+ /** Returns a selector that converts the value to boolean using !! */
8
+ export function truthy<V>(arg: AccessorChain<V>): Selector<boolean> {
9
+ return expr(arg, (x) => !!x);
10
+ }
11
+
12
+ /** Returns a selector that checks if the value is falsy using ! */
13
+ export function falsy<V>(arg: AccessorChain<V>): Selector<boolean> {
14
+ return expr(arg, (x) => !x);
15
+ }
16
+
17
+ /** Returns a selector that checks if the value is strictly true (=== true) */
18
+ export function isTrue(arg: AccessorChain<any>): Selector<boolean> {
19
+ return expr(arg, (x) => x === true);
20
+ }
21
+
22
+ /** Returns a selector that checks if the value is strictly false (=== false) */
23
+ export function isFalse(arg: AccessorChain<any>): Selector<boolean> {
24
+ return expr(arg, (x) => x === false);
25
+ }
26
+
27
+ /** Returns a selector that checks if the value is not null or undefined (x != null) */
28
+ export function hasValue<V>(arg: AccessorChain<V>): Selector<boolean> {
29
+ return expr(arg, (x) => x != null);
30
+ }
31
+
32
+ /** Returns a selector that checks if a string or array is empty (null, undefined, or length === 0) */
33
+ export function isEmpty(arg: AccessorChain<string | any[] | null | undefined>): Selector<boolean> {
34
+ return expr(arg, (x) => x == null || x.length === 0);
35
+ }
36
+
37
+ /** Returns a selector that checks if a string or array is non-empty (not null/undefined and length > 0) */
38
+ export function isNonEmpty(arg: AccessorChain<string | any[] | null | undefined>): Selector<boolean> {
39
+ return expr(arg, (x) => x != null && x.length > 0);
40
+ }
41
+
42
+ /** Returns a selector that checks if the value is less than the given value */
43
+ export function lessThan<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
44
+ return expr(arg, (x) => x < value);
45
+ }
46
+
47
+ /** Returns a selector that checks if the value is less than or equal to the given value */
48
+ export function lessThanOrEqual<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
49
+ return expr(arg, (x) => x <= value);
50
+ }
51
+
52
+ /** Returns a selector that checks if the value is greater than the given value */
53
+ export function greaterThan<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
54
+ return expr(arg, (x) => x > value);
55
+ }
56
+
57
+ /** Returns a selector that checks if the value is greater than or equal to the given value */
58
+ export function greaterThanOrEqual<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
59
+ return expr(arg, (x) => x >= value);
60
+ }
61
+
62
+ /** Returns a selector that checks if the value equals the given value using == */
63
+ export function equal<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
64
+ return expr(arg, (x) => x == value);
65
+ }
66
+
67
+ /** Returns a selector that checks if the value does not equal the given value using != */
68
+ export function notEqual<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
69
+ return expr(arg, (x) => x != value);
70
+ }
71
+
72
+ /** Returns a selector that checks if the value strictly equals the given value using === */
73
+ export function strictEqual<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
74
+ return expr(arg, (x) => x === value);
75
+ }
76
+
77
+ /** Returns a selector that checks if the value strictly does not equal the given value using !== */
78
+ export function strictNotEqual<V>(arg: AccessorChain<V>, value: V): Selector<boolean> {
79
+ return expr(arg, (x) => x !== value);
80
+ }
81
+
82
+ /** Returns a selector that formats the value using the specified format string.
83
+ * Format strings use semicolon-separated syntax: "formatType;param1;param2"
84
+ * @param arg - The accessor chain to the value
85
+ * @param fmt - The format string
86
+ * @param nullText - Optional text to display for null/undefined values
87
+ * @example
88
+ * format(m.price, "n;2") // formats as number with 2 decimal places
89
+ * format(m.date, "d") // formats as date
90
+ * format(m.value, "p;0;2") // formats as percentage with 0-2 decimal places
91
+ * format(m.value, "n;2", "N/A") // shows "N/A" for null values
92
+ */
93
+ export function format<V>(arg: AccessorChain<V>, fmt: string, nullText?: string): Selector<string> {
94
+ let f = nullText != null ? `${fmt}|${nullText}` : fmt;
95
+ return computable(arg, (x) => Format.value(x, f));
96
+ }
@@ -1,104 +1,104 @@
1
- import { Widget } from "../ui/Widget";
2
- import { PureContainerBase, PureContainerConfig } from "../ui/PureContainer";
3
- import { Binding, BindingInput } from "../data/Binding";
4
- import { ExposedValueView, ExposedValueViewConfig } from "../data/ExposedValueView";
5
- import { RenderingContext } from "../ui/RenderingContext";
6
- import { Instance } from "../ui/Instance";
7
- import { StringProp, WritableProp } from "../ui/Prop";
8
- import { AccessorChain } from "../data/createAccessorModelProxy";
9
-
10
- export interface SandboxConfig extends PureContainerConfig {
11
- /** Binding to the object that holds sandbox data. */
12
- storage: WritableProp<Record<string, any>>;
13
-
14
- /** Key used to identify the sandbox instance within the storage. */
15
- key?: StringProp;
16
-
17
- /** Alias for `key`. */
18
- accessKey?: StringProp;
19
-
20
- /** Alias used to expose sandbox data. Default is `$page`. */
21
- recordName?: string | AccessorChain<any>;
22
-
23
- /** Alias for `recordName`. */
24
- recordAlias?: string | AccessorChain<any>;
25
-
26
- /** Indicate that parent store data should not be mutated. */
27
- immutable?: boolean;
28
-
29
- /** Indicate that sandbox store data should not be mutated. */
30
- sealed?: boolean;
31
- }
32
-
33
- export interface SandboxInstance extends Instance {
34
- store: ExposedValueView;
35
- }
36
-
37
- export class Sandbox extends PureContainerBase<SandboxConfig, SandboxInstance> {
38
- declare storage: WritableProp<Record<string, any>>;
39
- declare key?: StringProp;
40
- declare recordName?: string;
41
- declare recordAlias?: string;
42
- declare accessKey?: StringProp;
43
- declare immutable?: boolean;
44
- declare sealed?: boolean;
45
- declare storageBinding: Binding;
46
- init(): void {
47
- if (this.recordAlias) this.recordName = this.recordAlias;
48
-
49
- if (this.accessKey) this.key = this.accessKey;
50
-
51
- this.storageBinding = Binding.get(this.storage);
52
-
53
- super.init();
54
- }
55
-
56
- initInstance(context: RenderingContext, instance: SandboxInstance): void {
57
- instance.store = new ExposedValueView({
58
- store: instance.parentStore,
59
- containerBinding: this.storageBinding,
60
- key: null,
61
- recordName: this.recordName,
62
- immutable: this.immutable,
63
- });
64
- super.initInstance(context, instance);
65
- }
66
-
67
- applyParentStore(instance: SandboxInstance): void {
68
- instance.store.setStore(instance.parentStore);
69
- }
70
-
71
- declareData(...args: Record<string, unknown>[]): void {
72
- super.declareData(
73
- {
74
- storage: undefined,
75
- key: undefined,
76
- },
77
- ...args,
78
- );
79
- }
80
-
81
- prepareData(context: RenderingContext, instance: SandboxInstance): void {
82
- var { store, data } = instance;
83
- if (store.getKey() !== data.key) {
84
- //when navigating to a page using the same widget tree as the previous page
85
- //everything needs to be reinstantiated, e.g. user/1 => user/2
86
- instance.store = new ExposedValueView({
87
- store: store,
88
- containerBinding: this.storageBinding,
89
- key: data.key,
90
- recordName: this.recordName,
91
- immutable: this.immutable,
92
- sealed: this.sealed,
93
- });
94
- instance.clearChildrenCache();
95
- }
96
- super.prepareData(context, instance);
97
- }
98
- }
99
-
100
- Sandbox.prototype.recordName = "$page";
101
- Sandbox.prototype.immutable = false;
102
- Sandbox.prototype.sealed = false;
103
-
104
- Widget.alias("sandbox", Sandbox);
1
+ import { Widget } from "../ui/Widget";
2
+ import { PureContainerBase, PureContainerConfig } from "../ui/PureContainer";
3
+ import { Binding, BindingInput } from "../data/Binding";
4
+ import { ExposedValueView, ExposedValueViewConfig } from "../data/ExposedValueView";
5
+ import { RenderingContext } from "../ui/RenderingContext";
6
+ import { Instance } from "../ui/Instance";
7
+ import { StringProp, WritableProp } from "../ui/Prop";
8
+ import { AccessorChain } from "../data/createAccessorModelProxy";
9
+
10
+ export interface SandboxConfig extends PureContainerConfig {
11
+ /** Binding to the object that holds sandbox data. */
12
+ storage: WritableProp<Record<string, any>>;
13
+
14
+ /** Key used to identify the sandbox instance within the storage. */
15
+ key?: StringProp;
16
+
17
+ /** Alias for `key`. */
18
+ accessKey?: StringProp;
19
+
20
+ /** Alias used to expose sandbox data. Default is `$page`. */
21
+ recordName?: string | AccessorChain<any>;
22
+
23
+ /** Alias for `recordName`. */
24
+ recordAlias?: string | AccessorChain<any>;
25
+
26
+ /** Indicate that parent store data should not be mutated. */
27
+ immutable?: boolean;
28
+
29
+ /** Indicate that sandbox store data should not be mutated. */
30
+ sealed?: boolean;
31
+ }
32
+
33
+ export interface SandboxInstance extends Instance {
34
+ store: ExposedValueView;
35
+ }
36
+
37
+ export class Sandbox extends PureContainerBase<SandboxConfig, SandboxInstance> {
38
+ declare storage: WritableProp<Record<string, any>>;
39
+ declare key?: StringProp;
40
+ declare recordName?: string;
41
+ declare recordAlias?: string;
42
+ declare accessKey?: StringProp;
43
+ declare immutable?: boolean;
44
+ declare sealed?: boolean;
45
+ declare storageBinding: Binding;
46
+ init(): void {
47
+ if (this.recordAlias) this.recordName = this.recordAlias;
48
+
49
+ if (this.accessKey) this.key = this.accessKey;
50
+
51
+ this.storageBinding = Binding.get(this.storage);
52
+
53
+ super.init();
54
+ }
55
+
56
+ initInstance(context: RenderingContext, instance: SandboxInstance): void {
57
+ instance.store = new ExposedValueView({
58
+ store: instance.parentStore,
59
+ containerBinding: this.storageBinding,
60
+ key: null,
61
+ recordName: this.recordName,
62
+ immutable: this.immutable,
63
+ });
64
+ super.initInstance(context, instance);
65
+ }
66
+
67
+ applyParentStore(instance: SandboxInstance): void {
68
+ instance.store.setStore(instance.parentStore);
69
+ }
70
+
71
+ declareData(...args: Record<string, unknown>[]): void {
72
+ super.declareData(
73
+ {
74
+ storage: undefined,
75
+ key: undefined,
76
+ },
77
+ ...args,
78
+ );
79
+ }
80
+
81
+ prepareData(context: RenderingContext, instance: SandboxInstance): void {
82
+ var { store, data } = instance;
83
+ if (store.getKey() !== data.key) {
84
+ //when navigating to a page using the same widget tree as the previous page
85
+ //everything needs to be reinstantiated, e.g. user/1 => user/2
86
+ instance.store = new ExposedValueView({
87
+ store: store,
88
+ containerBinding: this.storageBinding,
89
+ key: data.key,
90
+ recordName: this.recordName,
91
+ immutable: this.immutable,
92
+ sealed: this.sealed,
93
+ });
94
+ instance.clearChildrenCache();
95
+ }
96
+ super.prepareData(context, instance);
97
+ }
98
+ }
99
+
100
+ Sandbox.prototype.recordName = "$page";
101
+ Sandbox.prototype.immutable = false;
102
+ Sandbox.prototype.sealed = false;
103
+
104
+ Widget.alias("sandbox", Sandbox);
@@ -1,112 +1,112 @@
1
- @use "sass:math";
2
- @use "sass:map";
3
- @use "../variables" as *;
4
- @use "../maps" as *;
5
- @use "../../util/call-once.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/deep-merge.scss" as *;
10
- @use "../../util/scss/besm.scss" as *;
11
- @use "../../util/scss/include.scss" as *;
12
- @use "./Field.scss" as *;
13
- @use "./ColorPicker.scss" as *;
14
-
15
- @mixin cx-colorfield(
16
- $name: "colorfield",
17
- $state-style-map: $cx-std-field-state-style-map,
18
- $placeholder: $cx-input-placeholder,
19
- $empty-text: $cx-empty-text,
20
- $clear-state-style-map: $cx-clear-state-style-map,
21
- $left-icon-state-style-map: $cx-input-left-icon-state-style-map,
22
- $right-icon-state-style-map: $cx-input-right-icon-state-style-map,
23
- $width: $cx-default-input-width,
24
- $icon-size: $cx-default-icon-size,
25
- $besm: $cx-besm
26
- ) {
27
- $block: map.get($besm, block);
28
- $element: map.get($besm, element);
29
- $state: map.get($besm, state);
30
-
31
- .#{$block}#{$name} {
32
- @include cxb-field($besm, $state-style-map, $width: $width, $input: true);
33
- }
34
-
35
- $padding: cx-get-state-rule($state-style-map, default, "padding");
36
-
37
- .#{$element}#{$name}-input {
38
- @include cxe-field-input(
39
- $besm,
40
- $state-style-map,
41
- $placeholder: $placeholder,
42
- $overrides: (
43
- default: (
44
- font-family: $cx-default-colorfield-font-family,
45
- font-size: 11px,
46
- padding: cx-top($padding) cx-calc(cx-top($padding), $cx-default-clear-size, $cx-default-clear-spacing)
47
- cx-bottom($padding)
48
- cx-calc(cx-top($padding), $cx-default-input-left-tool-size, $cx-default-input-left-tool-spacing),
49
- )
50
- )
51
- );
52
- }
53
-
54
- .#{$element}#{$name}-clear {
55
- @include cxe-field-button($besm, $clear-state-style-map);
56
-
57
- .#{$state}focus > & {
58
- @include cx-add-state-rules($clear-state-style-map, focus);
59
- }
60
- .#{$state}error > & {
61
- @include cx-add-state-rules($clear-state-style-map, error);
62
- }
63
- }
64
-
65
- .#{$element}#{$name}-right-icon {
66
- @include cxe-field-button($besm, $right-icon-state-style-map);
67
-
68
- .#{$state}focus > & {
69
- @include cx-add-state-rules($right-icon-state-style-map, focus);
70
- }
71
- .#{$state}error > & {
72
- @include cx-add-state-rules($right-icon-state-style-map, error);
73
- }
74
- }
75
-
76
- .#{$element}#{$name}-left-icon {
77
- box-sizing: border-box;
78
-
79
- @include cx-checker-background();
80
-
81
- @include cxe-field-button(
82
- $besm,
83
- cx-deep-map-merge(
84
- $left-icon-state-style-map,
85
- (
86
- default: (
87
- opacity: 1,
88
- cursor: pointer,
89
- ),
90
- )
91
- )
92
- );
93
-
94
- div {
95
- width: 100%;
96
- height: 100%;
97
- border-radius: inherit;
98
- }
99
- }
100
-
101
- .#{$element}#{$name}-icon {
102
- @include cxe-field-button-icon($besm, $icon-size);
103
- }
104
-
105
- .#{$element}#{$name}-empty-text {
106
- @include cxe-field-empty-text($empty-text);
107
- }
108
- }
109
-
110
- @if (cx-should-include("cx/widgets/ColorField")) {
111
- @include cx-colorfield();
112
- }
1
+ @use "sass:math";
2
+ @use "sass:map";
3
+ @use "../variables" as *;
4
+ @use "../maps" as *;
5
+ @use "../../util/call-once.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/deep-merge.scss" as *;
10
+ @use "../../util/scss/besm.scss" as *;
11
+ @use "../../util/scss/include.scss" as *;
12
+ @use "./Field.scss" as *;
13
+ @use "./ColorPicker.scss" as *;
14
+
15
+ @mixin cx-colorfield(
16
+ $name: "colorfield",
17
+ $state-style-map: $cx-std-field-state-style-map,
18
+ $placeholder: $cx-input-placeholder,
19
+ $empty-text: $cx-empty-text,
20
+ $clear-state-style-map: $cx-clear-state-style-map,
21
+ $left-icon-state-style-map: $cx-input-left-icon-state-style-map,
22
+ $right-icon-state-style-map: $cx-input-right-icon-state-style-map,
23
+ $width: $cx-default-input-width,
24
+ $icon-size: $cx-default-icon-size,
25
+ $besm: $cx-besm
26
+ ) {
27
+ $block: map.get($besm, block);
28
+ $element: map.get($besm, element);
29
+ $state: map.get($besm, state);
30
+
31
+ .#{$block}#{$name} {
32
+ @include cxb-field($besm, $state-style-map, $width: $width, $input: true);
33
+ }
34
+
35
+ $padding: cx-get-state-rule($state-style-map, default, "padding");
36
+
37
+ .#{$element}#{$name}-input {
38
+ @include cxe-field-input(
39
+ $besm,
40
+ $state-style-map,
41
+ $placeholder: $placeholder,
42
+ $overrides: (
43
+ default: (
44
+ font-family: $cx-default-colorfield-font-family,
45
+ font-size: 11px,
46
+ padding: cx-top($padding) cx-calc(cx-top($padding), $cx-default-clear-size, $cx-default-clear-spacing)
47
+ cx-bottom($padding)
48
+ cx-calc(cx-top($padding), $cx-default-input-left-tool-size, $cx-default-input-left-tool-spacing),
49
+ )
50
+ )
51
+ );
52
+ }
53
+
54
+ .#{$element}#{$name}-clear {
55
+ @include cxe-field-button($besm, $clear-state-style-map);
56
+
57
+ .#{$state}focus > & {
58
+ @include cx-add-state-rules($clear-state-style-map, focus);
59
+ }
60
+ .#{$state}error > & {
61
+ @include cx-add-state-rules($clear-state-style-map, error);
62
+ }
63
+ }
64
+
65
+ .#{$element}#{$name}-right-icon {
66
+ @include cxe-field-button($besm, $right-icon-state-style-map);
67
+
68
+ .#{$state}focus > & {
69
+ @include cx-add-state-rules($right-icon-state-style-map, focus);
70
+ }
71
+ .#{$state}error > & {
72
+ @include cx-add-state-rules($right-icon-state-style-map, error);
73
+ }
74
+ }
75
+
76
+ .#{$element}#{$name}-left-icon {
77
+ box-sizing: border-box;
78
+
79
+ @include cx-checker-background();
80
+
81
+ @include cxe-field-button(
82
+ $besm,
83
+ cx-deep-map-merge(
84
+ $left-icon-state-style-map,
85
+ (
86
+ default: (
87
+ opacity: 1,
88
+ cursor: pointer,
89
+ ),
90
+ )
91
+ )
92
+ );
93
+
94
+ div {
95
+ width: 100%;
96
+ height: 100%;
97
+ border-radius: inherit;
98
+ }
99
+ }
100
+
101
+ .#{$element}#{$name}-icon {
102
+ @include cxe-field-button-icon($besm, $icon-size);
103
+ }
104
+
105
+ .#{$element}#{$name}-empty-text {
106
+ @include cxe-field-empty-text($empty-text);
107
+ }
108
+ }
109
+
110
+ @if (cx-should-include("cx/widgets/ColorField")) {
111
+ @include cx-colorfield();
112
+ }