cx 26.4.2 → 26.4.3
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/jsx-dev-runtime.d.ts +1 -0
- package/build/jsx-dev-runtime.d.ts.map +1 -1
- package/build/jsx-dev-runtime.js +1 -0
- package/dist/manifest.js +889 -889
- package/package.json +1 -1
- package/src/charts/BarGraph.scss +31 -31
- package/src/charts/Legend.scss +57 -57
- package/src/charts/LegendEntry.scss +35 -35
- package/src/charts/LineGraph.scss +28 -28
- package/src/charts/helpers/SnapPointFinder.ts +136 -136
- package/src/charts/helpers/ValueAtFinder.ts +72 -72
- package/src/data/createAccessorModelProxy.ts +66 -66
- package/src/jsx-dev-runtime.ts +1 -0
- package/src/ui/DataProxy.ts +55 -55
- package/src/ui/Repeater.spec.tsx +181 -181
- 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/scss/include.scss +69 -69
- package/src/widgets/Button.maps.scss +103 -103
- package/src/widgets/Sandbox.ts +104 -104
- package/src/widgets/form/Calendar.tsx +772 -772
- package/src/widgets/form/ColorField.scss +112 -112
- package/src/widgets/form/DateTimeField.scss +111 -111
- package/src/widgets/form/LookupField.maps.scss +26 -26
- package/src/widgets/form/LookupField.scss +227 -227
- 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/grid/Grid.scss +657 -657
- package/src/widgets/grid/variables.scss +47 -47
- package/src/widgets/index.ts +63 -63
- package/src/widgets/nav/MenuItem.scss +150 -150
- package/src/widgets/nav/MenuItem.tsx +525 -525
- package/src/widgets/nav/Tab.ts +122 -122
- package/src/widgets/overlay/Overlay.tsx +1029 -1029
- package/src/widgets/variables.scss +61 -61
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
@use "../box" as *;
|
|
3
|
-
@use "../../util/scss/defaults" as *;
|
|
4
|
-
@use "../../util/scss/include" as *;
|
|
5
|
-
@use "../../util/scss/clockwise.scss" as *;
|
|
6
|
-
@use "../../util/scss/calc.scss" as *;
|
|
7
|
-
|
|
8
|
-
// GRID
|
|
9
|
-
$cx-default-grid-font-size: $cx-default-box-font-size !default;
|
|
10
|
-
$cx-default-grid-border-color: $cx-default-border-color !default;
|
|
11
|
-
$cx-default-grid-background: null !default;
|
|
12
|
-
$cx-default-grid-border-radius: null !default;
|
|
13
|
-
$cx-default-grid-box-shadow: null !default;
|
|
14
|
-
|
|
15
|
-
// header
|
|
16
|
-
$cx-default-grid-header-font-size: $cx-default-box-font-size !default;
|
|
17
|
-
$cx-default-grid-header-font-weight: normal !default;
|
|
18
|
-
$cx-default-grid-header-line-height: null !default;
|
|
19
|
-
$cx-default-grid-header-color: $cx-default-color !default;
|
|
20
|
-
$cx-default-grid-header-background-color: #eee !default;
|
|
21
|
-
$cx-default-grid-header-border-color: $cx-default-border-color !default;
|
|
22
|
-
$cx-default-grid-header-box-shadow: null !default;
|
|
23
|
-
$cx-default-grid-header-padding: null !default;
|
|
24
|
-
|
|
25
|
-
// data
|
|
26
|
-
$cx-default-grid-data-font-size: null !default;
|
|
27
|
-
$cx-default-grid-data-font-weight: null !default;
|
|
28
|
-
$cx-default-grid-data-line-height: null !default;
|
|
29
|
-
$cx-default-grid-data-background-color: transparent !default;
|
|
30
|
-
$cx-default-grid-data-alternate-background-color: null !default;
|
|
31
|
-
$cx-default-grid-data-border-color: $cx-default-grid-border-color !default;
|
|
32
|
-
$cx-default-grid-data-padding: 5px !default;
|
|
33
|
-
$cx-default-grid-scroll-wrapper-padding-top: 0 !default;
|
|
34
|
-
$cx-default-grid-caption-gap: 15px !default;
|
|
35
|
-
|
|
36
|
-
// pagination
|
|
37
|
-
$cx-grid-pagination-default-border-width: $cx-default-border-width !default;
|
|
38
|
-
$cx-grid-pagination-default-border-color: $cx-default-border-color !default;
|
|
39
|
-
$cx-grid-pagination-default-border-radius: null !default;
|
|
40
|
-
$cx-grid-pagination-default-outer-border-radius: $cx-default-border-radius !default;
|
|
41
|
-
$cx-grid-pagination-default-padding: $cx-default-box-padding-top cx-multiply(2, $cx-default-box-padding-top) !default;
|
|
42
|
-
|
|
43
|
-
@include cx-register-dependencies(
|
|
44
|
-
(
|
|
45
|
-
"cx/widgets/Grid": "cx/widgets/DragClone",
|
|
46
|
-
)
|
|
47
|
-
);
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../box" as *;
|
|
3
|
+
@use "../../util/scss/defaults" as *;
|
|
4
|
+
@use "../../util/scss/include" as *;
|
|
5
|
+
@use "../../util/scss/clockwise.scss" as *;
|
|
6
|
+
@use "../../util/scss/calc.scss" as *;
|
|
7
|
+
|
|
8
|
+
// GRID
|
|
9
|
+
$cx-default-grid-font-size: $cx-default-box-font-size !default;
|
|
10
|
+
$cx-default-grid-border-color: $cx-default-border-color !default;
|
|
11
|
+
$cx-default-grid-background: null !default;
|
|
12
|
+
$cx-default-grid-border-radius: null !default;
|
|
13
|
+
$cx-default-grid-box-shadow: null !default;
|
|
14
|
+
|
|
15
|
+
// header
|
|
16
|
+
$cx-default-grid-header-font-size: $cx-default-box-font-size !default;
|
|
17
|
+
$cx-default-grid-header-font-weight: normal !default;
|
|
18
|
+
$cx-default-grid-header-line-height: null !default;
|
|
19
|
+
$cx-default-grid-header-color: $cx-default-color !default;
|
|
20
|
+
$cx-default-grid-header-background-color: #eee !default;
|
|
21
|
+
$cx-default-grid-header-border-color: $cx-default-border-color !default;
|
|
22
|
+
$cx-default-grid-header-box-shadow: null !default;
|
|
23
|
+
$cx-default-grid-header-padding: null !default;
|
|
24
|
+
|
|
25
|
+
// data
|
|
26
|
+
$cx-default-grid-data-font-size: null !default;
|
|
27
|
+
$cx-default-grid-data-font-weight: null !default;
|
|
28
|
+
$cx-default-grid-data-line-height: null !default;
|
|
29
|
+
$cx-default-grid-data-background-color: transparent !default;
|
|
30
|
+
$cx-default-grid-data-alternate-background-color: null !default;
|
|
31
|
+
$cx-default-grid-data-border-color: $cx-default-grid-border-color !default;
|
|
32
|
+
$cx-default-grid-data-padding: 5px !default;
|
|
33
|
+
$cx-default-grid-scroll-wrapper-padding-top: 0 !default;
|
|
34
|
+
$cx-default-grid-caption-gap: 15px !default;
|
|
35
|
+
|
|
36
|
+
// pagination
|
|
37
|
+
$cx-grid-pagination-default-border-width: $cx-default-border-width !default;
|
|
38
|
+
$cx-grid-pagination-default-border-color: $cx-default-border-color !default;
|
|
39
|
+
$cx-grid-pagination-default-border-radius: null !default;
|
|
40
|
+
$cx-grid-pagination-default-outer-border-radius: $cx-default-border-radius !default;
|
|
41
|
+
$cx-grid-pagination-default-padding: $cx-default-box-padding-top cx-multiply(2, $cx-default-box-padding-top) !default;
|
|
42
|
+
|
|
43
|
+
@include cx-register-dependencies(
|
|
44
|
+
(
|
|
45
|
+
"cx/widgets/Grid": "cx/widgets/DragClone",
|
|
46
|
+
)
|
|
47
|
+
);
|
package/src/widgets/index.ts
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { Widget } from "../ui/Widget";
|
|
2
|
-
import { Text } from "../ui/Text";
|
|
3
|
-
import { StaticText } from "../ui/StaticText";
|
|
4
|
-
import { PureContainer } from "../ui/PureContainer";
|
|
5
|
-
import { IsolatedScope } from "../ui/IsolatedScope";
|
|
6
|
-
import { DetachedScope } from "../ui/DetachedScope";
|
|
7
|
-
import { Restate, PrivateStore } from "../ui/Restate";
|
|
8
|
-
import { DataProxy } from "../ui/DataProxy";
|
|
9
|
-
import { Content } from "../ui/layout/Content";
|
|
10
|
-
import { ContentPlaceholder, ContentPlaceholderScope } from "../ui/layout/ContentPlaceholder";
|
|
11
|
-
import { LabelsTopLayout, LabelsTopLayoutCell } from "../ui/layout/LabelsTopLayout";
|
|
12
|
-
import { LabelsLeftLayout } from "../ui/layout/LabelsLeftLayout";
|
|
13
|
-
import { ContentResolver } from "../ui/ContentResolver";
|
|
14
|
-
import { Rescope } from "../ui/Rescope";
|
|
15
|
-
import { Repeater } from "../ui/Repeater";
|
|
16
|
-
|
|
17
|
-
//re-export widgets defined in ui namespace
|
|
18
|
-
export {
|
|
19
|
-
Widget,
|
|
20
|
-
StaticText,
|
|
21
|
-
Text,
|
|
22
|
-
PureContainer,
|
|
23
|
-
Content,
|
|
24
|
-
ContentPlaceholder,
|
|
25
|
-
ContentPlaceholderScope,
|
|
26
|
-
ContentResolver,
|
|
27
|
-
Rescope,
|
|
28
|
-
Repeater,
|
|
29
|
-
IsolatedScope,
|
|
30
|
-
DetachedScope,
|
|
31
|
-
Restate,
|
|
32
|
-
PrivateStore,
|
|
33
|
-
DataProxy,
|
|
34
|
-
LabelsTopLayout,
|
|
35
|
-
LabelsTopLayoutCell,
|
|
36
|
-
LabelsLeftLayout,
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export * from "./cx";
|
|
40
|
-
export * from "./HtmlElement";
|
|
41
|
-
export * from "./Button";
|
|
42
|
-
export * from "./DocumentTitle";
|
|
43
|
-
export * from "./List";
|
|
44
|
-
export * from "./Sandbox";
|
|
45
|
-
export * from "./CxCredit";
|
|
46
|
-
export * from "./Heading";
|
|
47
|
-
export * from "./Section";
|
|
48
|
-
export * from "./FlexBox";
|
|
49
|
-
export * from "./Icon";
|
|
50
|
-
export * from "./ProgressBar";
|
|
51
|
-
export * from "./Resizer";
|
|
52
|
-
export * from "./HighlightedSearchText";
|
|
53
|
-
export * from "./autoFocus";
|
|
54
|
-
export * from "./ReactElementWrapper";
|
|
55
|
-
|
|
56
|
-
export * from "./icons/index";
|
|
57
|
-
export * from "./overlay/index";
|
|
58
|
-
export * from "./nav/index";
|
|
59
|
-
export * from "./form/index";
|
|
60
|
-
export * from "./grid/index";
|
|
61
|
-
export * from "./drag-drop/index";
|
|
62
|
-
|
|
63
|
-
export * from "./enableAllInternalDependencies";
|
|
1
|
+
import { Widget } from "../ui/Widget";
|
|
2
|
+
import { Text } from "../ui/Text";
|
|
3
|
+
import { StaticText } from "../ui/StaticText";
|
|
4
|
+
import { PureContainer } from "../ui/PureContainer";
|
|
5
|
+
import { IsolatedScope } from "../ui/IsolatedScope";
|
|
6
|
+
import { DetachedScope } from "../ui/DetachedScope";
|
|
7
|
+
import { Restate, PrivateStore } from "../ui/Restate";
|
|
8
|
+
import { DataProxy } from "../ui/DataProxy";
|
|
9
|
+
import { Content } from "../ui/layout/Content";
|
|
10
|
+
import { ContentPlaceholder, ContentPlaceholderScope } from "../ui/layout/ContentPlaceholder";
|
|
11
|
+
import { LabelsTopLayout, LabelsTopLayoutCell } from "../ui/layout/LabelsTopLayout";
|
|
12
|
+
import { LabelsLeftLayout } from "../ui/layout/LabelsLeftLayout";
|
|
13
|
+
import { ContentResolver } from "../ui/ContentResolver";
|
|
14
|
+
import { Rescope } from "../ui/Rescope";
|
|
15
|
+
import { Repeater } from "../ui/Repeater";
|
|
16
|
+
|
|
17
|
+
//re-export widgets defined in ui namespace
|
|
18
|
+
export {
|
|
19
|
+
Widget,
|
|
20
|
+
StaticText,
|
|
21
|
+
Text,
|
|
22
|
+
PureContainer,
|
|
23
|
+
Content,
|
|
24
|
+
ContentPlaceholder,
|
|
25
|
+
ContentPlaceholderScope,
|
|
26
|
+
ContentResolver,
|
|
27
|
+
Rescope,
|
|
28
|
+
Repeater,
|
|
29
|
+
IsolatedScope,
|
|
30
|
+
DetachedScope,
|
|
31
|
+
Restate,
|
|
32
|
+
PrivateStore,
|
|
33
|
+
DataProxy,
|
|
34
|
+
LabelsTopLayout,
|
|
35
|
+
LabelsTopLayoutCell,
|
|
36
|
+
LabelsLeftLayout,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export * from "./cx";
|
|
40
|
+
export * from "./HtmlElement";
|
|
41
|
+
export * from "./Button";
|
|
42
|
+
export * from "./DocumentTitle";
|
|
43
|
+
export * from "./List";
|
|
44
|
+
export * from "./Sandbox";
|
|
45
|
+
export * from "./CxCredit";
|
|
46
|
+
export * from "./Heading";
|
|
47
|
+
export * from "./Section";
|
|
48
|
+
export * from "./FlexBox";
|
|
49
|
+
export * from "./Icon";
|
|
50
|
+
export * from "./ProgressBar";
|
|
51
|
+
export * from "./Resizer";
|
|
52
|
+
export * from "./HighlightedSearchText";
|
|
53
|
+
export * from "./autoFocus";
|
|
54
|
+
export * from "./ReactElementWrapper";
|
|
55
|
+
|
|
56
|
+
export * from "./icons/index";
|
|
57
|
+
export * from "./overlay/index";
|
|
58
|
+
export * from "./nav/index";
|
|
59
|
+
export * from "./form/index";
|
|
60
|
+
export * from "./grid/index";
|
|
61
|
+
export * from "./drag-drop/index";
|
|
62
|
+
|
|
63
|
+
export * from "./enableAllInternalDependencies";
|
|
@@ -1,150 +1,150 @@
|
|
|
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/clockwise.scss" as *;
|
|
7
|
-
@use "../../util/scss/deep-merge.scss" as *;
|
|
8
|
-
@use "../../util/scss/calc.scss" as *;
|
|
9
|
-
@use "../../util/scss/besm.scss" as *;
|
|
10
|
-
@use "../../util/scss/include.scss" as *;
|
|
11
|
-
|
|
12
|
-
@mixin cx-menuitem(
|
|
13
|
-
$name: "menuitem",
|
|
14
|
-
$state-style-map: $cx-menu-list-item,
|
|
15
|
-
$icon-size: $cx-default-icon-size,
|
|
16
|
-
$besm: $cx-besm
|
|
17
|
-
) {
|
|
18
|
-
$block: map.get($besm, block);
|
|
19
|
-
$element: map.get($besm, element);
|
|
20
|
-
$state: map.get($besm, state);
|
|
21
|
-
$mod: map.get($besm, mod);
|
|
22
|
-
|
|
23
|
-
.#{$block}#{$name} {
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
position: relative;
|
|
27
|
-
border-radius: $cx-default-border-radius;
|
|
28
|
-
|
|
29
|
-
&:focus {
|
|
30
|
-
outline: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
& > a:hover {
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.#{$state}focusable > &.#{$state}cursor {
|
|
38
|
-
@include cx-add-state-rules($state-style-map, default);
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
@include cx-add-state-rules($state-style-map, hover);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.#{$state}focusable.#{$state}cursor > &.#{$state}cursor {
|
|
46
|
-
@include cx-add-state-rules($state-style-map, selected-cursor);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&.#{$state}disabled {
|
|
50
|
-
@include cx-add-state-rules($state-style-map, disabled);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
& > a {
|
|
54
|
-
text-decoration: none;
|
|
55
|
-
color: inherit;
|
|
56
|
-
|
|
57
|
-
&:focus {
|
|
58
|
-
outline: none;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
& > hr {
|
|
63
|
-
border: none;
|
|
64
|
-
border-top: 1px solid $cx-default-menu-separator-color;
|
|
65
|
-
margin: map.get($cx-menu-padding-options, medium);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@each $size, $value in $cx-menu-padding-options {
|
|
69
|
-
&.#{$state}#{$size}-padding {
|
|
70
|
-
& > a,
|
|
71
|
-
& > span {
|
|
72
|
-
padding: $value;
|
|
73
|
-
line-height: $cx-default-box-line-height;
|
|
74
|
-
border: $cx-default-box-border-width solid transparent;
|
|
75
|
-
display: block;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&.#{$state}arrow {
|
|
79
|
-
padding-right: cx-calc($icon-size);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&.#{$state}icon {
|
|
83
|
-
padding-left: cx-calc(
|
|
84
|
-
max(1lh, $icon-size),
|
|
85
|
-
cx-top($value),
|
|
86
|
-
cx-top($value),
|
|
87
|
-
cx-multiply(cx-left($value), -1)
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&.#{$state}empty {
|
|
92
|
-
padding-right: cx-multiply($icon-size, 0.5);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
& > .#{$element}#{$name}-arrow {
|
|
96
|
-
right: cx-multiply(cx-right($value), 0.5);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
& > .#{$element}#{$name}-button {
|
|
100
|
-
width: cx-calc(cx-top($value), max($icon-size, 1lh), cx-top($value));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.#{$element}#{$name}-arrow {
|
|
107
|
-
position: absolute;
|
|
108
|
-
width: $icon-size;
|
|
109
|
-
height: $icon-size;
|
|
110
|
-
top: 50%;
|
|
111
|
-
margin-top: cx-multiply($icon-size, -0.5);
|
|
112
|
-
|
|
113
|
-
.#{$state}vertical > & {
|
|
114
|
-
transform: rotate(-90deg);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.#{$element}#{$name}-button {
|
|
119
|
-
position: absolute;
|
|
120
|
-
top: 0;
|
|
121
|
-
bottom: 0;
|
|
122
|
-
left: 0;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.#{$element}#{$name}-baseline {
|
|
126
|
-
display: inline-block;
|
|
127
|
-
width: 1px;
|
|
128
|
-
margin-left: -1px;
|
|
129
|
-
visibility: hidden;
|
|
130
|
-
padding-left: 0 !important;
|
|
131
|
-
padding-right: 0 !important;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.#{$element}#{$name}-icon {
|
|
135
|
-
position: absolute;
|
|
136
|
-
width: $icon-size;
|
|
137
|
-
height: $icon-size;
|
|
138
|
-
top: 50%;
|
|
139
|
-
left: 50%;
|
|
140
|
-
margin-top: cx-multiply($icon-size, -0.5);
|
|
141
|
-
margin-left: cx-multiply($icon-size, -0.5);
|
|
142
|
-
text-align: center;
|
|
143
|
-
line-height: 1;
|
|
144
|
-
font-size: $icon-size;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
@if (cx-should-include("cx/widgets/MenuItem")) {
|
|
149
|
-
@include cx-menuitem();
|
|
150
|
-
}
|
|
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/clockwise.scss" as *;
|
|
7
|
+
@use "../../util/scss/deep-merge.scss" as *;
|
|
8
|
+
@use "../../util/scss/calc.scss" as *;
|
|
9
|
+
@use "../../util/scss/besm.scss" as *;
|
|
10
|
+
@use "../../util/scss/include.scss" as *;
|
|
11
|
+
|
|
12
|
+
@mixin cx-menuitem(
|
|
13
|
+
$name: "menuitem",
|
|
14
|
+
$state-style-map: $cx-menu-list-item,
|
|
15
|
+
$icon-size: $cx-default-icon-size,
|
|
16
|
+
$besm: $cx-besm
|
|
17
|
+
) {
|
|
18
|
+
$block: map.get($besm, block);
|
|
19
|
+
$element: map.get($besm, element);
|
|
20
|
+
$state: map.get($besm, state);
|
|
21
|
+
$mod: map.get($besm, mod);
|
|
22
|
+
|
|
23
|
+
.#{$block}#{$name} {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
position: relative;
|
|
27
|
+
border-radius: $cx-default-border-radius;
|
|
28
|
+
|
|
29
|
+
&:focus {
|
|
30
|
+
outline: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
& > a:hover {
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.#{$state}focusable > &.#{$state}cursor {
|
|
38
|
+
@include cx-add-state-rules($state-style-map, default);
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
@include cx-add-state-rules($state-style-map, hover);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.#{$state}focusable.#{$state}cursor > &.#{$state}cursor {
|
|
46
|
+
@include cx-add-state-rules($state-style-map, selected-cursor);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.#{$state}disabled {
|
|
50
|
+
@include cx-add-state-rules($state-style-map, disabled);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& > a {
|
|
54
|
+
text-decoration: none;
|
|
55
|
+
color: inherit;
|
|
56
|
+
|
|
57
|
+
&:focus {
|
|
58
|
+
outline: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
& > hr {
|
|
63
|
+
border: none;
|
|
64
|
+
border-top: 1px solid $cx-default-menu-separator-color;
|
|
65
|
+
margin: map.get($cx-menu-padding-options, medium);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@each $size, $value in $cx-menu-padding-options {
|
|
69
|
+
&.#{$state}#{$size}-padding {
|
|
70
|
+
& > a,
|
|
71
|
+
& > span {
|
|
72
|
+
padding: $value;
|
|
73
|
+
line-height: $cx-default-box-line-height;
|
|
74
|
+
border: $cx-default-box-border-width solid transparent;
|
|
75
|
+
display: block;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.#{$state}arrow {
|
|
79
|
+
padding-right: cx-calc($icon-size);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.#{$state}icon {
|
|
83
|
+
padding-left: cx-calc(
|
|
84
|
+
max(1lh, $icon-size),
|
|
85
|
+
cx-top($value),
|
|
86
|
+
cx-top($value),
|
|
87
|
+
cx-multiply(cx-left($value), -1)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.#{$state}empty {
|
|
92
|
+
padding-right: cx-multiply($icon-size, 0.5);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
& > .#{$element}#{$name}-arrow {
|
|
96
|
+
right: cx-multiply(cx-right($value), 0.5);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
& > .#{$element}#{$name}-button {
|
|
100
|
+
width: cx-calc(cx-top($value), max($icon-size, 1lh), cx-top($value));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.#{$element}#{$name}-arrow {
|
|
107
|
+
position: absolute;
|
|
108
|
+
width: $icon-size;
|
|
109
|
+
height: $icon-size;
|
|
110
|
+
top: 50%;
|
|
111
|
+
margin-top: cx-multiply($icon-size, -0.5);
|
|
112
|
+
|
|
113
|
+
.#{$state}vertical > & {
|
|
114
|
+
transform: rotate(-90deg);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.#{$element}#{$name}-button {
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: 0;
|
|
121
|
+
bottom: 0;
|
|
122
|
+
left: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.#{$element}#{$name}-baseline {
|
|
126
|
+
display: inline-block;
|
|
127
|
+
width: 1px;
|
|
128
|
+
margin-left: -1px;
|
|
129
|
+
visibility: hidden;
|
|
130
|
+
padding-left: 0 !important;
|
|
131
|
+
padding-right: 0 !important;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.#{$element}#{$name}-icon {
|
|
135
|
+
position: absolute;
|
|
136
|
+
width: $icon-size;
|
|
137
|
+
height: $icon-size;
|
|
138
|
+
top: 50%;
|
|
139
|
+
left: 50%;
|
|
140
|
+
margin-top: cx-multiply($icon-size, -0.5);
|
|
141
|
+
margin-left: cx-multiply($icon-size, -0.5);
|
|
142
|
+
text-align: center;
|
|
143
|
+
line-height: 1;
|
|
144
|
+
font-size: $icon-size;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@if (cx-should-include("cx/widgets/MenuItem")) {
|
|
149
|
+
@include cx-menuitem();
|
|
150
|
+
}
|