cx 26.0.6 → 26.0.8
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/Bar.scss +29 -0
- package/build/charts/BarGraph.scss +29 -0
- package/build/charts/BubbleGraph.scss +32 -0
- package/build/charts/Column.scss +29 -0
- package/build/charts/ColumnGraph.scss +30 -0
- package/build/charts/Gridlines.scss +25 -0
- package/build/charts/Legend.scss +50 -0
- package/build/charts/LegendEntry.scss +29 -0
- package/build/charts/LineGraph.d.ts +11 -0
- package/build/charts/LineGraph.js +1 -0
- package/build/charts/LineGraph.scss +25 -0
- package/build/charts/Marker.scss +44 -0
- package/build/charts/MarkerLine.scss +20 -0
- package/build/charts/PieChart.scss +29 -0
- package/build/charts/Range.scss +20 -0
- package/build/charts/RangeMarker.scss +17 -0
- package/build/charts/ScatterGraph.scss +24 -0
- package/build/charts/Swimlane.scss +16 -0
- package/build/charts/Swimlanes.scss +16 -0
- package/build/charts/axis/Axis.scss +23 -0
- package/build/charts/axis/CategoryAxis.scss +35 -0
- package/build/charts/axis/NumericAxis.scss +35 -0
- package/build/charts/axis/TimeAxis.scss +34 -0
- package/build/charts/axis/index.scss +5 -0
- package/build/charts/axis/variables.scss +3 -0
- package/build/charts/index.scss +22 -0
- package/build/charts/palette.scss +97 -0
- package/build/charts/variables.scss +22 -0
- package/build/global.scss +14 -0
- package/build/index.scss +6 -0
- package/build/jsx-runtime.d.ts +3 -2
- package/build/svg/Svg.scss +28 -0
- package/build/svg/index.scss +9 -0
- package/build/ui/index.scss +2 -0
- package/build/ui/layout/LabelsLeftLayout.scss +47 -0
- package/build/ui/layout/LabelsTopLayout.scss +65 -0
- package/build/ui/layout/index.scss +3 -0
- package/build/ui/layout/variables.scss +2 -0
- package/build/ui/variables.scss +2 -0
- package/build/util/addEventListenerWithOptions.d.ts +2 -2
- package/build/util/call-once.scss +7 -0
- package/build/util/index.scss +11 -0
- package/build/util/scss/add-rules.scss +40 -0
- package/build/util/scss/calc.scss +45 -0
- package/build/util/scss/call-once.scss +13 -0
- package/build/util/scss/clockwise.scss +49 -0
- package/build/util/scss/colors.scss +10 -0
- package/build/util/scss/deep-get.scss +12 -0
- package/build/util/scss/deep-merge.scss +21 -0
- package/build/util/scss/divide.scss +3 -0
- package/build/util/scss/include.scss +48 -0
- package/build/util/scss/index.scss +9 -0
- package/build/variables.scss +217 -0
- package/build/widgets/Button.scss +119 -0
- package/build/widgets/Button.variables.scss +117 -0
- package/build/widgets/CxCredit.scss +39 -0
- package/build/widgets/FlexBox.scss +148 -0
- package/build/widgets/Heading.scss +40 -0
- package/build/widgets/HighlightedSearchText.scss +20 -0
- package/build/widgets/Icon.scss +22 -0
- package/build/widgets/List.scss +93 -0
- package/build/widgets/ProgressBar.scss +51 -0
- package/build/widgets/Resizer.scss +44 -0
- package/build/widgets/Section.scss +56 -0
- package/build/widgets/animations.scss +11 -0
- package/build/widgets/drag-drop/DragClone.scss +36 -0
- package/build/widgets/drag-drop/DragHandle.scss +19 -0
- package/build/widgets/drag-drop/DragSource.scss +27 -0
- package/build/widgets/drag-drop/DropZone.scss +77 -0
- package/build/widgets/drag-drop/index.scss +4 -0
- package/build/widgets/drag-drop/variables.scss +15 -0
- package/build/widgets/form/Calendar.scss +199 -0
- package/build/widgets/form/Calendar.variables.scss +64 -0
- package/build/widgets/form/Checkbox.scss +129 -0
- package/build/widgets/form/Checkbox.variables.scss +40 -0
- package/build/widgets/form/ColorField.scss +98 -0
- package/build/widgets/form/ColorPicker.scss +285 -0
- package/build/widgets/form/ColorPicker.variables.scss +22 -0
- package/build/widgets/form/DateTimeField.scss +92 -0
- package/build/widgets/form/DateTimePicker.scss +47 -0
- package/build/widgets/form/Field.scss +164 -0
- package/build/widgets/form/HelpText.scss +24 -0
- package/build/widgets/form/Label.scss +38 -0
- package/build/widgets/form/LookupField.scss +221 -0
- package/build/widgets/form/MonthField.scss +100 -0
- package/build/widgets/form/MonthPicker.scss +125 -0
- package/build/widgets/form/NumberField.scss +63 -0
- package/build/widgets/form/Radio.scss +123 -0
- package/build/widgets/form/Radio.variables.scss +46 -0
- package/build/widgets/form/Select.scss +101 -0
- package/build/widgets/form/Slider.scss +121 -0
- package/build/widgets/form/Switch.scss +142 -0
- package/build/widgets/form/TextArea.scss +45 -0
- package/build/widgets/form/TextField.scss +57 -0
- package/build/widgets/form/UploadButton.scss +49 -0
- package/build/widgets/form/ValidationError.scss +23 -0
- package/build/widgets/form/Wheel.scss +152 -0
- package/build/widgets/form/index.scss +24 -0
- package/build/widgets/form/variables.scss +355 -0
- package/build/widgets/grid/Grid.scss +640 -0
- package/build/widgets/grid/Pagination.scss +115 -0
- package/build/widgets/grid/TreeNode.scss +90 -0
- package/build/widgets/grid/index.scss +4 -0
- package/build/widgets/grid/variables.scss +137 -0
- package/build/widgets/index.scss +16 -0
- package/build/widgets/nav/Link.scss +20 -0
- package/build/widgets/nav/Menu.scss +76 -0
- package/build/widgets/nav/Menu.variables.scss +25 -0
- package/build/widgets/nav/MenuItem.d.ts +1 -0
- package/build/widgets/nav/MenuItem.scss +130 -0
- package/build/widgets/nav/Scroller.scss +148 -0
- package/build/widgets/nav/Tab.scss +82 -0
- package/build/widgets/nav/Tab.variables.scss +84 -0
- package/build/widgets/nav/cover.scss +22 -0
- package/build/widgets/nav/index.scss +6 -0
- package/build/widgets/nav/variables.scss +27 -0
- package/build/widgets/overlay/Dropdown.scss +186 -0
- package/build/widgets/overlay/Overlay.scss +68 -0
- package/build/widgets/overlay/Toast.scss +164 -0
- package/build/widgets/overlay/Tooltip.scss +177 -0
- package/build/widgets/overlay/Window.scss +129 -0
- package/build/widgets/overlay/Window.variables.scss +62 -0
- package/build/widgets/overlay/captureMouse.scss +13 -0
- package/build/widgets/overlay/index.scss +15 -0
- package/build/widgets/overlay/variables.scss +85 -0
- package/build/widgets/variables.scss +146 -0
- package/build.js +4 -0
- package/dist/charts.js +1 -0
- package/dist/manifest.js +876 -770
- package/package.json +3 -1
- package/src/charts/LineGraph.tsx +14 -0
- package/src/jsx-runtime.ts +8 -5
- package/src/util/addEventListenerWithOptions.ts +41 -41
- package/src/widgets/nav/MenuItem.tsx +1 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
@mixin cx-scroller(
|
|
4
|
+
$name: "scroller",
|
|
5
|
+
$icon-size: $cx-default-icon-size,
|
|
6
|
+
$button-size: $cx-default-scroller-button-size,
|
|
7
|
+
$besm: $cx-besm
|
|
8
|
+
) {
|
|
9
|
+
$block: map.get($besm, block);
|
|
10
|
+
$element: map.get($besm, element);
|
|
11
|
+
$state: map.get($besm, state);
|
|
12
|
+
|
|
13
|
+
.#{$block}#{$name} {
|
|
14
|
+
position: relative;
|
|
15
|
+
user-select: none;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: stretch;
|
|
18
|
+
justify-content: stretch;
|
|
19
|
+
|
|
20
|
+
&.#{$state}horizontal {
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
|
|
23
|
+
&.#{$state}horizontal.#{$state}scrollable {
|
|
24
|
+
padding-left: $button-size;
|
|
25
|
+
padding-right: $button-size;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.#{$state}vertical {
|
|
30
|
+
&.#{$state}scrollable {
|
|
31
|
+
padding-top: $button-size;
|
|
32
|
+
padding-bottom: $button-size;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.#{$element}#{$name}-clip {
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: stretch;
|
|
42
|
+
justify-content: stretch;
|
|
43
|
+
flex: 1 1 0%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.#{$element}#{$name}-scroller {
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
|
|
49
|
+
.#{$block}#{$name}.#{$state}horizontal > .#{$element}#{$name}-clip > & {
|
|
50
|
+
overflow-x: auto;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.#{$block}#{$name}.#{$state}vertical > .#{$element}#{$name}-clip > & {
|
|
54
|
+
overflow-y: auto;
|
|
55
|
+
flex: 1 1 0%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&::-webkit-scrollbar {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.#{$element}#{$name}-left-arrow {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 0;
|
|
66
|
+
bottom: 0;
|
|
67
|
+
left: 0;
|
|
68
|
+
width: $button-size;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
display: none;
|
|
71
|
+
|
|
72
|
+
& > .#{$element}#{$name}-icon {
|
|
73
|
+
transform: rotate(90deg);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.#{$state}scrollable > & {
|
|
77
|
+
display: block;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.#{$element}#{$name}-right-arrow {
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 0;
|
|
84
|
+
bottom: 0;
|
|
85
|
+
right: 0;
|
|
86
|
+
width: $button-size;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
display: none;
|
|
89
|
+
|
|
90
|
+
& > .#{$element}#{$name}-icon {
|
|
91
|
+
transform: rotate(-90deg);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.#{$state}scrollable > & {
|
|
95
|
+
display: block;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.#{$element}#{$name}-top-arrow {
|
|
100
|
+
position: absolute;
|
|
101
|
+
top: 0;
|
|
102
|
+
left: 0;
|
|
103
|
+
right: 0;
|
|
104
|
+
height: $button-size;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
display: none;
|
|
107
|
+
|
|
108
|
+
& > .#{$element}#{$name}-icon {
|
|
109
|
+
transform: rotate(180deg);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.#{$state}scrollable > & {
|
|
113
|
+
display: block;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.#{$element}#{$name}-bottom-arrow {
|
|
118
|
+
position: absolute;
|
|
119
|
+
left: 0;
|
|
120
|
+
bottom: 0;
|
|
121
|
+
right: 0;
|
|
122
|
+
height: $button-size;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
display: none;
|
|
125
|
+
|
|
126
|
+
& > .#{$element}#{$name}-icon {
|
|
127
|
+
//transform: rotate(-90deg);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.#{$state}scrollable > & {
|
|
131
|
+
display: block;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.#{$element}#{$name}-icon {
|
|
136
|
+
height: $icon-size;
|
|
137
|
+
width: $icon-size;
|
|
138
|
+
top: 50%;
|
|
139
|
+
left: 50%;
|
|
140
|
+
position: absolute;
|
|
141
|
+
margin-left: -$icon-size * 0.5;
|
|
142
|
+
margin-top: -$icon-size * 0.5;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@if (cx-should-include("cx/widgets/Scroller")) {
|
|
147
|
+
@include cx-scroller();
|
|
148
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
@import "cover";
|
|
4
|
+
|
|
5
|
+
@mixin cx-tab(
|
|
6
|
+
$name: 'tab',
|
|
7
|
+
$state-style-map: $cx-tab-state-style-map,
|
|
8
|
+
$besm: $cx-besm
|
|
9
|
+
) {
|
|
10
|
+
$block: map.get($besm, block);
|
|
11
|
+
$element: map.get($besm, element);
|
|
12
|
+
$state: map.get($besm, state);
|
|
13
|
+
$mod: map.get($besm, mod);
|
|
14
|
+
|
|
15
|
+
.#{$block}#{$name} {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
|
|
19
|
+
@include cx-add-state-rules($state-style-map, default);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
@include cx-add-state-rules($state-style-map, hover);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:focus {
|
|
27
|
+
@include cx-add-state-rules($state-style-map, cursor);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.#{$state}active {
|
|
31
|
+
@include cx-add-state-rules($state-style-map, selected);
|
|
32
|
+
|
|
33
|
+
&:focus {
|
|
34
|
+
@include cx-add-state-rules($state-style-map, selected-cursor);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.#{$state}disabled {
|
|
39
|
+
@include cx-add-state-rules($state-style-map, disabled);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@each $name, $config in $cx-tab-mods {
|
|
43
|
+
&.#{$mod}#{$name} {
|
|
44
|
+
@include cx-add-state-rules($config, default);
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
@include cx-add-state-rules($config, hover);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:focus {
|
|
51
|
+
@include cx-add-state-rules($config, cursor);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.#{$state}active {
|
|
55
|
+
@include cx-add-state-rules($config, selected);
|
|
56
|
+
|
|
57
|
+
&:focus {
|
|
58
|
+
@include cx-add-state-rules($config, selected-cursor);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.#{$state}disabled {
|
|
63
|
+
@include cx-add-state-rules($config, disabled);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.#{$mod}classic.#{$state}active:after {
|
|
69
|
+
content: ' ';
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 100%;
|
|
72
|
+
left: 0;
|
|
73
|
+
right: 0;
|
|
74
|
+
height: 2px;
|
|
75
|
+
background: inherit;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@if (cx-should-include('cx/widgets/Tab')) {
|
|
81
|
+
@include cx-tab();
|
|
82
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
$cx-default-tab-color: inherit !default;
|
|
2
|
+
$cx-default-tab-font-size: null !default;
|
|
3
|
+
$cx-default-tab-font-weight: inherit !default;
|
|
4
|
+
$cx-default-tab-background-color: transparent !default;
|
|
5
|
+
$cx-default-tab-border-width: $cx-default-box-border-width !default;
|
|
6
|
+
$cx-default-tab-border-color: transparent !default;
|
|
7
|
+
$cx-default-tab-border-radius: $cx-default-border-radius !default;
|
|
8
|
+
$cx-default-tab-padding: cx-top($cx-default-box-padding) 2 * cx-right($cx-default-box-padding)
|
|
9
|
+
cx-bottom($cx-default-box-padding) 2 * cx-left($cx-default-box-padding) !default;
|
|
10
|
+
$cx-default-tab-box-shadow: none !default;
|
|
11
|
+
|
|
12
|
+
$cx-tab-state-style-map: cx-deep-map-merge(
|
|
13
|
+
$cx-list-item,
|
|
14
|
+
(
|
|
15
|
+
default: (
|
|
16
|
+
color: $cx-default-tab-color,
|
|
17
|
+
font-size: $cx-default-tab-font-size,
|
|
18
|
+
line-height: $cx-default-box-line-height,
|
|
19
|
+
font-weight: $cx-default-tab-font-weight,
|
|
20
|
+
text-decoration: none,
|
|
21
|
+
cursor: pointer,
|
|
22
|
+
text-align: center,
|
|
23
|
+
background-color: $cx-default-tab-background-color,
|
|
24
|
+
border-radius: $cx-default-tab-border-radius,
|
|
25
|
+
padding: $cx-default-tab-padding,
|
|
26
|
+
border-width: $cx-default-tab-border-width,
|
|
27
|
+
border-color: $cx-default-tab-border-color,
|
|
28
|
+
border-style: solid,
|
|
29
|
+
box-shadow: $cx-default-tab-box-shadow,
|
|
30
|
+
),
|
|
31
|
+
hover: (
|
|
32
|
+
text-decoration: none,
|
|
33
|
+
),
|
|
34
|
+
disabled: (
|
|
35
|
+
background-color: transparent,
|
|
36
|
+
pointer-events: none,
|
|
37
|
+
),
|
|
38
|
+
)
|
|
39
|
+
) !default;
|
|
40
|
+
|
|
41
|
+
$cx-tab-mods: (
|
|
42
|
+
classic: (
|
|
43
|
+
default: (
|
|
44
|
+
position: relative,
|
|
45
|
+
border-width: 1px,
|
|
46
|
+
border-bottom-left-radius: 0,
|
|
47
|
+
border-bottom-right-radius: 0,
|
|
48
|
+
),
|
|
49
|
+
selected: (
|
|
50
|
+
border-color: $cx-default-border-color,
|
|
51
|
+
background-color: $cx-default-cover-background-color,
|
|
52
|
+
),
|
|
53
|
+
),
|
|
54
|
+
line: (
|
|
55
|
+
default: (
|
|
56
|
+
background-color: transparent !important,
|
|
57
|
+
border-left-color: transparent !important,
|
|
58
|
+
border-right-color: transparent !important,
|
|
59
|
+
border-top-color: transparent !important,
|
|
60
|
+
border-left-width: 0,
|
|
61
|
+
border-right-width: 0,
|
|
62
|
+
border-bottom-width: 2px,
|
|
63
|
+
border-top-width: 0,
|
|
64
|
+
border-bottom-left-radius: 0,
|
|
65
|
+
border-bottom-right-radius: 0,
|
|
66
|
+
),
|
|
67
|
+
hover: (
|
|
68
|
+
border-color: rgba(128, 128, 128, 0.2),
|
|
69
|
+
),
|
|
70
|
+
cursor: (
|
|
71
|
+
border-color: rgba(123, 190, 255, 0.3),
|
|
72
|
+
),
|
|
73
|
+
selected: (
|
|
74
|
+
border-color: rgba(128, 128, 128, 0.4),
|
|
75
|
+
),
|
|
76
|
+
selected-cursor: (
|
|
77
|
+
border-color: rgba(123, 190, 255, 0.7),
|
|
78
|
+
),
|
|
79
|
+
active: (),
|
|
80
|
+
disabled: (
|
|
81
|
+
border-color: transparent,
|
|
82
|
+
),
|
|
83
|
+
),
|
|
84
|
+
) !default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
@mixin cx-cover(
|
|
4
|
+
$besm: $cx-besm
|
|
5
|
+
) {
|
|
6
|
+
$block: map.get($besm, block);
|
|
7
|
+
$element: map.get($besm, element);
|
|
8
|
+
$state: map.get($besm, state);
|
|
9
|
+
$mod: map.get($besm, mod);
|
|
10
|
+
|
|
11
|
+
.#{$mod}cover {
|
|
12
|
+
background-color: $cx-default-cover-background-color;
|
|
13
|
+
border-color: $cx-default-cover-border-color;
|
|
14
|
+
border-style: solid;
|
|
15
|
+
fill: $cx-default-cover-background-color;
|
|
16
|
+
stroke: $cx-default-cover-border-color;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@if (cx-should-include('cx/widgets/cover')) { // check path
|
|
21
|
+
@include cx-cover();
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// COVER
|
|
4
|
+
$cx-default-cover-border-color: $cx-default-border-color !default;
|
|
5
|
+
$cx-default-cover-background-color: white !default;
|
|
6
|
+
|
|
7
|
+
$cx-default-scroller-button-size: 20px !default;
|
|
8
|
+
|
|
9
|
+
$cx-link-state-style-map: (
|
|
10
|
+
active: (
|
|
11
|
+
font-weight: bold,
|
|
12
|
+
),
|
|
13
|
+
) !default;
|
|
14
|
+
|
|
15
|
+
//MENU
|
|
16
|
+
@import "Menu.variables";
|
|
17
|
+
|
|
18
|
+
// TAB
|
|
19
|
+
@import "Tab.variables";
|
|
20
|
+
|
|
21
|
+
$cx-dependencies: map.merge(
|
|
22
|
+
$cx-dependencies,
|
|
23
|
+
(
|
|
24
|
+
"cx/widgets/HScroller": "cx/widgets/Scroller",
|
|
25
|
+
"cx/widgets/VScroller": "cx/widgets/Scroller",
|
|
26
|
+
)
|
|
27
|
+
);
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
@mixin cx-dropdown-arrows(
|
|
4
|
+
$name: "dropdown",
|
|
5
|
+
$styles: $cx-dropdown-styles,
|
|
6
|
+
$arrow-size: $cx-default-dropdown-arrow-size,
|
|
7
|
+
$besm: $cx-besm
|
|
8
|
+
) {
|
|
9
|
+
$block: map.get($besm, block);
|
|
10
|
+
$element: map.get($besm, element);
|
|
11
|
+
$state: map.get($besm, state);
|
|
12
|
+
|
|
13
|
+
$border-width: map.get($styles, border-width);
|
|
14
|
+
|
|
15
|
+
.#{$element}#{$name}-arrow-border,
|
|
16
|
+
.#{$element}#{$name}-arrow-fill {
|
|
17
|
+
border-style: solid;
|
|
18
|
+
border-color: transparent;
|
|
19
|
+
content: " ";
|
|
20
|
+
height: 0;
|
|
21
|
+
width: 0;
|
|
22
|
+
position: absolute;
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.#{$element}#{$name}-arrow-border {
|
|
27
|
+
color: map.get($styles, border-color);
|
|
28
|
+
border-width: $border-width + $arrow-size;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.#{$element}#{$name}-arrow-fill {
|
|
32
|
+
color: map.get($styles, background-color);
|
|
33
|
+
border-width: $arrow-size;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.#{$state}place-right,
|
|
37
|
+
.#{$state}place-right-up,
|
|
38
|
+
.#{$state}place-right-down {
|
|
39
|
+
& > .#{$element}#{$name}-arrow-fill {
|
|
40
|
+
right: 100%;
|
|
41
|
+
top: 50%;
|
|
42
|
+
border-right-color: currentColor;
|
|
43
|
+
margin-top: -$arrow-size;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& > .#{$element}#{$name}-arrow-border {
|
|
47
|
+
right: 100%;
|
|
48
|
+
top: 50%;
|
|
49
|
+
border-right-color: currentColor;
|
|
50
|
+
margin-top: cx-calc(-$border-width, -$arrow-size);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.#{$state}place-left,
|
|
55
|
+
.#{$state}place-left-down,
|
|
56
|
+
.#{$state}place-left-up {
|
|
57
|
+
& > .#{$element}#{$name}-arrow-fill {
|
|
58
|
+
left: 100%;
|
|
59
|
+
top: 50%;
|
|
60
|
+
border-left-color: currentColor;
|
|
61
|
+
margin-top: -$arrow-size;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
& > .#{$element}#{$name}-arrow-border {
|
|
65
|
+
left: 100%;
|
|
66
|
+
top: 50%;
|
|
67
|
+
border-left-color: currentColor;
|
|
68
|
+
margin-top: cx-calc(-$border-width, -$arrow-size);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.#{$state}place-right-down,
|
|
73
|
+
.#{$state}place-left-down {
|
|
74
|
+
& > .#{$element}#{$name}-arrow-fill {
|
|
75
|
+
top: $cx-default-dropdown-arrow-offset;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
& > .#{$element}#{$name}-arrow-border {
|
|
79
|
+
top: $cx-default-dropdown-arrow-offset;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.#{$state}place-right-up,
|
|
84
|
+
.#{$state}place-left-up {
|
|
85
|
+
& > .#{$element}#{$name}-arrow-fill,
|
|
86
|
+
& > .#{$element}#{$name}-arrow-border {
|
|
87
|
+
top: cx-calc(100%, -$cx-default-dropdown-arrow-offset);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.#{$state}place-up,
|
|
92
|
+
.#{$state}place-up-left,
|
|
93
|
+
.#{$state}place-up-right {
|
|
94
|
+
& > .#{$element}#{$name}-arrow-fill {
|
|
95
|
+
left: 50%;
|
|
96
|
+
top: 100%;
|
|
97
|
+
border-top-color: currentColor;
|
|
98
|
+
margin-left: -$arrow-size;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
& > .#{$element}#{$name}-arrow-border {
|
|
102
|
+
left: 50%;
|
|
103
|
+
top: 100%;
|
|
104
|
+
border-top-color: currentColor;
|
|
105
|
+
margin-left: cx-calc(-$border-width, -$arrow-size);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.#{$state}place-down,
|
|
110
|
+
.#{$state}place-down-left,
|
|
111
|
+
.#{$state}place-down-right {
|
|
112
|
+
& > .#{$element}#{$name}-arrow-fill {
|
|
113
|
+
left: 50%;
|
|
114
|
+
bottom: 100%;
|
|
115
|
+
border-bottom-color: currentColor;
|
|
116
|
+
margin-left: -$arrow-size;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
& > .#{$element}#{$name}-arrow-border {
|
|
120
|
+
left: 50%;
|
|
121
|
+
bottom: 100%;
|
|
122
|
+
border-bottom-color: currentColor;
|
|
123
|
+
margin-left: cx-calc(-$border-width, -$arrow-size);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.#{$state}place-down-right,
|
|
128
|
+
.#{$state}place-up-right {
|
|
129
|
+
& > .#{$element}#{$name}-arrow-fill,
|
|
130
|
+
& > .#{$element}#{$name}-arrow-border {
|
|
131
|
+
left: $cx-default-dropdown-arrow-offset;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.#{$state}place-down-left,
|
|
136
|
+
.#{$state}place-up-left {
|
|
137
|
+
& > .#{$element}#{$name}-arrow-fill {
|
|
138
|
+
left: cx-calc(100%, -$cx-default-dropdown-arrow-offset);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
& > .#{$element}#{$name}-arrow-border {
|
|
142
|
+
left: cx-calc(100%, -$cx-default-dropdown-arrow-offset);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@mixin cx-dropdown(
|
|
148
|
+
$name: "dropdown",
|
|
149
|
+
$styles: $cx-dropdown-styles,
|
|
150
|
+
$arrow-size: $cx-default-dropdown-arrow-size,
|
|
151
|
+
$besm: $cx-besm
|
|
152
|
+
) {
|
|
153
|
+
$block: map.get($besm, block);
|
|
154
|
+
$element: map.get($besm, element);
|
|
155
|
+
$state: map.get($besm, state);
|
|
156
|
+
|
|
157
|
+
.#{$block}#{$name} {
|
|
158
|
+
@extend %cxb-overlay;
|
|
159
|
+
display: block;
|
|
160
|
+
left: -10000px;
|
|
161
|
+
top: -10000px;
|
|
162
|
+
|
|
163
|
+
@include cx-add-rules($styles);
|
|
164
|
+
|
|
165
|
+
&.#{$state}place-screen-center {
|
|
166
|
+
box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.29), 0 0 1000px 1000px rgba(128, 128, 128, 0.3);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&.#{$state}pad {
|
|
170
|
+
padding: $cx-default-container-padding;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.#{$element}#{$name}-beacon {
|
|
175
|
+
position: absolute;
|
|
176
|
+
width: 1px;
|
|
177
|
+
height: 1px;
|
|
178
|
+
visibility: hidden;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@include cx-dropdown-arrows($name, $styles, $arrow-size, $besm);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@if (cx-should-include("cx/widgets/Dropdown")) {
|
|
185
|
+
@include cx-dropdown();
|
|
186
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
@mixin cx-overlay($name: "overlay", $besm: $cx-besm) {
|
|
4
|
+
$block: map.get($besm, block);
|
|
5
|
+
$element: map.get($besm, element);
|
|
6
|
+
$state: map.get($besm, state);
|
|
7
|
+
|
|
8
|
+
%cxb-overlay {
|
|
9
|
+
left: calc(50% - 250px); //guess
|
|
10
|
+
top: calc(50% - 100px); //guess
|
|
11
|
+
min-width: 10px;
|
|
12
|
+
min-height: 10px;
|
|
13
|
+
position: fixed;
|
|
14
|
+
overflow: visible;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
|
|
17
|
+
&.#{$state}draggable {
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
touch-action: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.#{$state}shadow {
|
|
23
|
+
position: absolute;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:focus {
|
|
27
|
+
outline: none;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
%cxe-overlay-modal-backdrop {
|
|
32
|
+
position: fixed;
|
|
33
|
+
left: 0;
|
|
34
|
+
top: 0;
|
|
35
|
+
width: 100vw;
|
|
36
|
+
height: 100vh;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
%cxe-overlay-shadow {
|
|
40
|
+
position: fixed;
|
|
41
|
+
left: 0;
|
|
42
|
+
top: 0;
|
|
43
|
+
width: 100vw;
|
|
44
|
+
height: 100vh;
|
|
45
|
+
background: rgba(128, 128, 128, 0.3);
|
|
46
|
+
overflow: auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.#{$block}#{$name} {
|
|
50
|
+
@extend %cxb-overlay;
|
|
51
|
+
|
|
52
|
+
&.#{$state}pad {
|
|
53
|
+
padding: $cx-default-container-padding;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.#{$element}#{$name}-modal-backdrop {
|
|
58
|
+
@extend %cxe-overlay-modal-backdrop;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.#{$element}#{$name}-shadow {
|
|
62
|
+
@extend %cxe-overlay-shadow;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@if (cx-should-include("cx/widgets/Overlay")) {
|
|
67
|
+
@include cx-overlay();
|
|
68
|
+
}
|