cx 26.0.9 → 26.0.10
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/ui/Controller.d.ts +2 -2
- package/build/ui/index.d.ts +2 -1
- package/build/ui/index.js +2 -1
- package/build.js +133 -133
- package/dist/manifest.js +818 -921
- package/dist/ui.js +1 -1
- package/package.json +2 -2
- package/src/ui/Controller.ts +2 -2
- package/src/ui/index.ts +2 -1
- package/src/widgets/HtmlElement.spec.tsx +8 -6
- package/build/charts/Bar.scss +0 -29
- package/build/charts/BarGraph.scss +0 -29
- package/build/charts/BubbleGraph.scss +0 -32
- package/build/charts/Column.scss +0 -29
- package/build/charts/ColumnGraph.scss +0 -30
- package/build/charts/Gridlines.scss +0 -25
- package/build/charts/Legend.scss +0 -50
- package/build/charts/LegendEntry.scss +0 -29
- package/build/charts/LineGraph.scss +0 -25
- package/build/charts/Marker.scss +0 -44
- package/build/charts/MarkerLine.scss +0 -20
- package/build/charts/PieChart.scss +0 -29
- package/build/charts/Range.scss +0 -20
- package/build/charts/RangeMarker.scss +0 -17
- package/build/charts/ScatterGraph.scss +0 -24
- package/build/charts/Swimlane.scss +0 -16
- package/build/charts/Swimlanes.scss +0 -16
- package/build/charts/axis/Axis.scss +0 -23
- package/build/charts/axis/CategoryAxis.scss +0 -35
- package/build/charts/axis/NumericAxis.scss +0 -35
- package/build/charts/axis/TimeAxis.scss +0 -34
- package/build/charts/axis/index.scss +0 -5
- package/build/charts/axis/variables.scss +0 -3
- package/build/charts/index.scss +0 -22
- package/build/charts/palette.scss +0 -97
- package/build/charts/variables.scss +0 -22
- package/build/data/ArrayElementView.spec.d.ts +0 -1
- package/build/data/ArrayElementView.spec.js +0 -81
- package/build/data/Binding.spec.d.ts +0 -1
- package/build/data/Binding.spec.js +0 -61
- package/build/data/Expression.spec.d.ts +0 -1
- package/build/data/Expression.spec.js +0 -196
- package/build/data/Grouper.spec.d.ts +0 -1
- package/build/data/Grouper.spec.js +0 -48
- package/build/data/Ref.spec.d.ts +0 -1
- package/build/data/Ref.spec.js +0 -72
- package/build/data/Store.spec.d.ts +0 -1
- package/build/data/Store.spec.js +0 -19
- package/build/data/StoreRef.spec.d.ts +0 -1
- package/build/data/StoreRef.spec.js +0 -22
- package/build/data/StringTemplate.spec.d.ts +0 -1
- package/build/data/StringTemplate.spec.js +0 -112
- package/build/data/StructuredSelector.spec.d.ts +0 -1
- package/build/data/StructuredSelector.spec.js +0 -102
- package/build/data/View.spec.d.ts +0 -1
- package/build/data/View.spec.js +0 -44
- package/build/data/ZoomIntoPropertyView.spec.d.ts +0 -1
- package/build/data/ZoomIntoPropertyView.spec.js +0 -54
- package/build/data/comparer.spec.d.ts +0 -1
- package/build/data/comparer.spec.js +0 -50
- package/build/data/computable.spec.d.ts +0 -1
- package/build/data/computable.spec.js +0 -56
- package/build/data/createAccessorModelProxy.spec.d.ts +0 -1
- package/build/data/createAccessorModelProxy.spec.js +0 -30
- package/build/data/createStructuredSelector.spec.d.ts +0 -1
- package/build/data/createStructuredSelector.spec.js +0 -42
- package/build/data/diff/diffs.spec.d.ts +0 -1
- package/build/data/diff/diffs.spec.js +0 -45
- package/build/data/getAccessor.spec.d.ts +0 -1
- package/build/data/getAccessor.spec.js +0 -10
- package/build/data/getSelector.spec.d.ts +0 -1
- package/build/data/getSelector.spec.js +0 -36
- package/build/data/ops/append.spec.d.ts +0 -1
- package/build/data/ops/append.spec.js +0 -24
- package/build/data/ops/filter.spec.d.ts +0 -1
- package/build/data/ops/filter.spec.js +0 -25
- package/build/data/ops/findTreeNode.spec.d.ts +0 -1
- package/build/data/ops/findTreeNode.spec.js +0 -20
- package/build/data/ops/merge.spec.d.ts +0 -1
- package/build/data/ops/merge.spec.js +0 -23
- package/build/data/ops/removeTreeNodes.spec.d.ts +0 -1
- package/build/data/ops/removeTreeNodes.spec.js +0 -35
- package/build/data/ops/updateArray.spec.d.ts +0 -1
- package/build/data/ops/updateArray.spec.js +0 -33
- package/build/data/ops/updateTree.spec.d.ts +0 -1
- package/build/data/ops/updateTree.spec.js +0 -44
- package/build/global.scss +0 -14
- package/build/hooks/invokeCallback.spec.d.ts +0 -1
- package/build/hooks/invokeCallback.spec.js +0 -44
- package/build/hooks/resolveCallback.spec.d.ts +0 -1
- package/build/hooks/resolveCallback.spec.js +0 -35
- package/build/hooks/store.spec.d.ts +0 -1
- package/build/hooks/store.spec.js +0 -48
- package/build/hooks/useTrigger.spec.d.ts +0 -1
- package/build/hooks/useTrigger.spec.js +0 -59
- package/build/index.scss +0 -6
- package/build/svg/Svg.scss +0 -28
- package/build/svg/index.scss +0 -9
- package/build/ui/Controller.spec.d.ts +0 -1
- package/build/ui/Controller.spec.js +0 -251
- package/build/ui/Cx.spec.d.ts +0 -1
- package/build/ui/Cx.spec.js +0 -153
- package/build/ui/DataProxy.spec.d.ts +0 -1
- package/build/ui/DataProxy.spec.js +0 -208
- package/build/ui/IsolatedScope.spec.d.ts +0 -1
- package/build/ui/IsolatedScope.spec.js +0 -42
- package/build/ui/Repeater.spec.d.ts +0 -1
- package/build/ui/Repeater.spec.js +0 -109
- package/build/ui/Rescope.spec.d.ts +0 -1
- package/build/ui/Rescope.spec.js +0 -134
- package/build/ui/Restate.spec.d.ts +0 -1
- package/build/ui/Restate.spec.js +0 -257
- package/build/ui/adapter/ArrayAdapter.spec.d.ts +0 -1
- package/build/ui/adapter/ArrayAdapter.spec.js +0 -44
- package/build/ui/adapter/TreeAdapter.spec.d.ts +0 -1
- package/build/ui/adapter/TreeAdapter.spec.js +0 -71
- package/build/ui/app/Url.spec.d.ts +0 -1
- package/build/ui/app/Url.spec.js +0 -43
- package/build/ui/createFunctionalComponent.spec.d.ts +0 -1
- package/build/ui/createFunctionalComponent.spec.js +0 -272
- package/build/ui/index.scss +0 -2
- package/build/ui/layout/ContentPlaceholder.spec.d.ts +0 -1
- package/build/ui/layout/ContentPlaceholder.spec.js +0 -333
- package/build/ui/layout/FirstVisibleChildLayout.spec.d.ts +0 -1
- package/build/ui/layout/FirstVisibleChildLayout.spec.js +0 -101
- package/build/ui/layout/LabelsLeftLayout.scss +0 -47
- package/build/ui/layout/LabelsTopLayout.scss +0 -65
- package/build/ui/layout/index.scss +0 -3
- package/build/ui/layout/variables.scss +0 -2
- package/build/ui/variables.scss +0 -2
- package/build/util/Format.spec.d.ts +0 -1
- package/build/util/Format.spec.js +0 -58
- package/build/util/TraversalStack.spec.d.ts +0 -1
- package/build/util/TraversalStack.spec.js +0 -43
- package/build/util/call-once.scss +0 -7
- package/build/util/date/upperBoundCheck.spec.d.ts +0 -1
- package/build/util/date/upperBoundCheck.spec.js +0 -22
- package/build/util/getSearchQueryPredicate.spec.d.ts +0 -1
- package/build/util/getSearchQueryPredicate.spec.js +0 -33
- package/build/util/index.scss +0 -11
- package/build/util/isValidIdentifierName.spec.d.ts +0 -1
- package/build/util/isValidIdentifierName.spec.js +0 -28
- package/build/util/routeAppend.spec.d.ts +0 -1
- package/build/util/routeAppend.spec.js +0 -14
- package/build/util/scss/add-rules.scss +0 -40
- package/build/util/scss/calc.scss +0 -45
- package/build/util/scss/call-once.scss +0 -13
- package/build/util/scss/clockwise.scss +0 -49
- package/build/util/scss/colors.scss +0 -10
- package/build/util/scss/deep-get.scss +0 -12
- package/build/util/scss/deep-merge.scss +0 -21
- package/build/util/scss/divide.scss +0 -3
- package/build/util/scss/include.scss +0 -48
- package/build/util/scss/index.scss +0 -9
- package/build/variables.scss +0 -217
- package/build/widgets/AccessorBindings.spec.d.ts +0 -1
- package/build/widgets/AccessorBindings.spec.js +0 -40
- package/build/widgets/Button.scss +0 -119
- package/build/widgets/Button.variables.scss +0 -117
- package/build/widgets/CxCredit.scss +0 -39
- package/build/widgets/FlexBox.scss +0 -148
- package/build/widgets/Heading.scss +0 -40
- package/build/widgets/HighlightedSearchText.scss +0 -20
- package/build/widgets/HtmlElement.spec.d.ts +0 -1
- package/build/widgets/HtmlElement.spec.js +0 -38
- package/build/widgets/Icon.scss +0 -22
- package/build/widgets/List.scss +0 -93
- package/build/widgets/ProgressBar.scss +0 -51
- package/build/widgets/Resizer.scss +0 -44
- package/build/widgets/Section.scss +0 -56
- package/build/widgets/animations.scss +0 -11
- package/build/widgets/drag-drop/DragClone.scss +0 -36
- package/build/widgets/drag-drop/DragHandle.scss +0 -19
- package/build/widgets/drag-drop/DragSource.scss +0 -27
- package/build/widgets/drag-drop/DropZone.scss +0 -77
- package/build/widgets/drag-drop/index.scss +0 -4
- package/build/widgets/drag-drop/variables.scss +0 -15
- package/build/widgets/form/Calendar.scss +0 -199
- package/build/widgets/form/Calendar.variables.scss +0 -64
- package/build/widgets/form/Checkbox.scss +0 -129
- package/build/widgets/form/Checkbox.variables.scss +0 -40
- package/build/widgets/form/ColorField.scss +0 -98
- package/build/widgets/form/ColorPicker.scss +0 -285
- package/build/widgets/form/ColorPicker.variables.scss +0 -22
- package/build/widgets/form/DateTimeField.scss +0 -92
- package/build/widgets/form/DateTimePicker.scss +0 -47
- package/build/widgets/form/Field.scss +0 -164
- package/build/widgets/form/HelpText.scss +0 -24
- package/build/widgets/form/Label.scss +0 -38
- package/build/widgets/form/LookupField.scss +0 -221
- package/build/widgets/form/MonthField.scss +0 -100
- package/build/widgets/form/MonthPicker.scss +0 -125
- package/build/widgets/form/NumberField.scss +0 -63
- package/build/widgets/form/Radio.scss +0 -123
- package/build/widgets/form/Radio.variables.scss +0 -46
- package/build/widgets/form/Select.scss +0 -101
- package/build/widgets/form/Slider.scss +0 -121
- package/build/widgets/form/Switch.scss +0 -142
- package/build/widgets/form/TextArea.scss +0 -45
- package/build/widgets/form/TextField.scss +0 -57
- package/build/widgets/form/UploadButton.scss +0 -49
- package/build/widgets/form/ValidationError.scss +0 -23
- package/build/widgets/form/ValidationGroup.spec.d.ts +0 -1
- package/build/widgets/form/ValidationGroup.spec.js +0 -62
- package/build/widgets/form/Wheel.scss +0 -152
- package/build/widgets/form/index.scss +0 -24
- package/build/widgets/form/variables.scss +0 -355
- package/build/widgets/grid/Grid.scss +0 -640
- package/build/widgets/grid/Pagination.scss +0 -115
- package/build/widgets/grid/TreeNode.scss +0 -90
- package/build/widgets/grid/index.scss +0 -4
- package/build/widgets/grid/variables.scss +0 -137
- package/build/widgets/index.scss +0 -16
- package/build/widgets/nav/Link.scss +0 -20
- package/build/widgets/nav/Menu.scss +0 -76
- package/build/widgets/nav/Menu.variables.scss +0 -25
- package/build/widgets/nav/MenuItem.scss +0 -130
- package/build/widgets/nav/Route.spec.d.ts +0 -1
- package/build/widgets/nav/Route.spec.js +0 -15
- package/build/widgets/nav/Scroller.scss +0 -148
- package/build/widgets/nav/Tab.scss +0 -82
- package/build/widgets/nav/Tab.variables.scss +0 -84
- package/build/widgets/nav/cover.scss +0 -22
- package/build/widgets/nav/index.scss +0 -6
- package/build/widgets/nav/variables.scss +0 -27
- package/build/widgets/overlay/Dropdown.scss +0 -186
- package/build/widgets/overlay/Overlay.scss +0 -68
- package/build/widgets/overlay/Toast.scss +0 -164
- package/build/widgets/overlay/Tooltip.scss +0 -177
- package/build/widgets/overlay/Window.scss +0 -129
- package/build/widgets/overlay/Window.variables.scss +0 -62
- package/build/widgets/overlay/captureMouse.scss +0 -13
- package/build/widgets/overlay/index.scss +0 -15
- package/build/widgets/overlay/variables.scss +0 -85
- package/build/widgets/variables.scss +0 -146
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
@import "call-once";
|
|
3
|
-
@import "colors";
|
|
4
|
-
|
|
5
|
-
$cx-include-all: true !default;
|
|
6
|
-
|
|
7
|
-
$cx-excluded: () !default;
|
|
8
|
-
$cx-used: null !default;
|
|
9
|
-
|
|
10
|
-
$cx-dependencies: () !default;
|
|
11
|
-
|
|
12
|
-
@function cx-should-include($name, $once: true) {
|
|
13
|
-
@return (
|
|
14
|
-
(map.get($cx-excluded, $name) != true) and
|
|
15
|
-
($cx-include-all or
|
|
16
|
-
($cx-used != null and map.get($cx-used, $name) == true))
|
|
17
|
-
)
|
|
18
|
-
and ($once != true or cx-call-once($name));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@function cx-included($name) {
|
|
22
|
-
@return cx-called-once($name);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@function cx-widget($name) {
|
|
26
|
-
@if (map.get($cx-excluded, $name)) {
|
|
27
|
-
@return 0;
|
|
28
|
-
}
|
|
29
|
-
$cx-used: map.merge($cx-used, ($name: true)) !global;
|
|
30
|
-
$dummy: 1;
|
|
31
|
-
$deps: map.get($cx-dependencies, $name);
|
|
32
|
-
@if ($deps == null) {
|
|
33
|
-
@return 0;
|
|
34
|
-
}
|
|
35
|
-
@each $dep in $deps {
|
|
36
|
-
$dummy: cx-widget($dep);
|
|
37
|
-
}
|
|
38
|
-
@return $dummy;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@mixin cx-widgets($names...) {
|
|
42
|
-
$dummy: 1;
|
|
43
|
-
$cx-used: () !default !global;
|
|
44
|
-
|
|
45
|
-
@each $name in $names {
|
|
46
|
-
$dummy: cx-widget($name)
|
|
47
|
-
}
|
|
48
|
-
}
|
package/build/variables.scss
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
// FUNCTIONS
|
|
2
|
-
@import "util/scss/index";
|
|
3
|
-
|
|
4
|
-
// SCREEN SIZE
|
|
5
|
-
$cx-screen-size-small: 400px !default;
|
|
6
|
-
$cx-screen-size-medium: 800px !default;
|
|
7
|
-
$cx-screen-size-large: 1300px !default;
|
|
8
|
-
$cx-screen-size-extra-large: 1800px !default;
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
// BESM
|
|
12
|
-
//
|
|
13
|
-
// B - block - top level HTML element
|
|
14
|
-
// E - element - part of the component (block)
|
|
15
|
-
// S - state - indicator of the component state which affects the appearance
|
|
16
|
-
// M - mod - user supplied instruction which overrides default appearance
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
$cx-besm: (
|
|
20
|
-
block: "cxb-",
|
|
21
|
-
element: "cxe-",
|
|
22
|
-
state: "cxs-",
|
|
23
|
-
mod: "cxm-"
|
|
24
|
-
) !default;
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
// Boxes
|
|
28
|
-
// -----
|
|
29
|
-
//
|
|
30
|
-
// Boxes are inline-block elements which are likely to appear in the same row, such as buttons and form elements.
|
|
31
|
-
// These elements should have the same height in order to avoid problems when put together in a toolbar
|
|
32
|
-
// or a complex form.
|
|
33
|
-
//
|
|
34
|
-
// To ensure the height consistency, all box models should use the same line-height, top/bottom padding and border-width;
|
|
35
|
-
//
|
|
36
|
-
// For elements which do not have a natural border, such as checkboxes, radios and buttons,
|
|
37
|
-
// border-color should be set to transparent.
|
|
38
|
-
//
|
|
39
|
-
// box height = line-height + padding-top + padding-bottom + border-width-top + border-width-bottom
|
|
40
|
-
//
|
|
41
|
-
// Some browsers do not respect the line-height being set and therefore explicit height value is
|
|
42
|
-
// calculated and set on all box elements.
|
|
43
|
-
//
|
|
44
|
-
// Hint: Use em units to make the box height grow with the font-size, but note that the elements
|
|
45
|
-
// will not be aligned in case of pixel boundaries and icons may appear blurry in some desktop browsers.
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
$cx-default-box-font-size: 13px !default;
|
|
49
|
-
$cx-default-box-font-family: inherit !default;
|
|
50
|
-
$cx-default-box-line-height: 16px !default;
|
|
51
|
-
$cx-default-box-padding: 5px !default; //should not be a list
|
|
52
|
-
$cx-default-box-border-width: 1px !default;
|
|
53
|
-
|
|
54
|
-
// Borders
|
|
55
|
-
// -------
|
|
56
|
-
|
|
57
|
-
$cx-default-border-color: #bfbfbf !default;
|
|
58
|
-
$cx-default-border-radius: 0 !default;
|
|
59
|
-
$cx-default-border-width: 1px !default;
|
|
60
|
-
|
|
61
|
-
// Padding
|
|
62
|
-
// -------
|
|
63
|
-
|
|
64
|
-
$cx-default-container-padding: 5px !default;
|
|
65
|
-
|
|
66
|
-
// Empty Texts
|
|
67
|
-
// ------------
|
|
68
|
-
//
|
|
69
|
-
// Displayed instead of whitespace
|
|
70
|
-
|
|
71
|
-
$cx-default-empty-text-color: rgba(128, 128, 128, 0.7) !default;
|
|
72
|
-
|
|
73
|
-
$cx-empty-text: (
|
|
74
|
-
color: $cx-default-empty-text-color
|
|
75
|
-
) !default;
|
|
76
|
-
|
|
77
|
-
//Icons
|
|
78
|
-
$cx-default-icon-size: 16px !default;
|
|
79
|
-
|
|
80
|
-
//Selection
|
|
81
|
-
$cx-selection-background-color: rgba(135, 206, 250, 0.6);
|
|
82
|
-
|
|
83
|
-
//List
|
|
84
|
-
$cx-default-list-item-padding: 5px 10px !default;
|
|
85
|
-
|
|
86
|
-
//Lists
|
|
87
|
-
$cx-list: (
|
|
88
|
-
default: (
|
|
89
|
-
-webkit-overflow-scrolling: touch
|
|
90
|
-
),
|
|
91
|
-
hover: (),
|
|
92
|
-
focus: (
|
|
93
|
-
outline: none
|
|
94
|
-
)
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
$cx-list-item: (
|
|
98
|
-
default: (),
|
|
99
|
-
hover: (
|
|
100
|
-
background-color: rgba(128, 128, 128, 0.1),
|
|
101
|
-
outline: none,
|
|
102
|
-
cursor: pointer
|
|
103
|
-
),
|
|
104
|
-
cursor: (
|
|
105
|
-
background-color: rgba(123, 190, 255, 0.15),
|
|
106
|
-
outline: none
|
|
107
|
-
),
|
|
108
|
-
selected: (
|
|
109
|
-
background-color: rgba(123, 190, 255, 0.4)
|
|
110
|
-
),
|
|
111
|
-
selected-hover: (
|
|
112
|
-
background-color: rgba(123, 190, 255, 0.2)
|
|
113
|
-
),
|
|
114
|
-
selected-cursor: (
|
|
115
|
-
background-color: rgba(123, 190, 255, 0.3),
|
|
116
|
-
outline: none
|
|
117
|
-
),
|
|
118
|
-
disabled: (
|
|
119
|
-
cursor: default,
|
|
120
|
-
opacity: 0.5,
|
|
121
|
-
pointer-events: none
|
|
122
|
-
),
|
|
123
|
-
active: (
|
|
124
|
-
//causes flickering
|
|
125
|
-
//background: rgba(123,190,255, 0.7)
|
|
126
|
-
)
|
|
127
|
-
) !default;
|
|
128
|
-
|
|
129
|
-
$cx-default-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
|
130
|
-
"Helvetica Neue", Arial, sans-serif !default;
|
|
131
|
-
|
|
132
|
-
$cx-default-font-size: 14px !default;
|
|
133
|
-
$cx-default-color: #373a3c !default;
|
|
134
|
-
|
|
135
|
-
$cx-element-style-map: (
|
|
136
|
-
html: (
|
|
137
|
-
font-family: $cx-default-font-family,
|
|
138
|
-
font-size: $cx-default-font-size,
|
|
139
|
-
height: 100%,
|
|
140
|
-
background-color: #eee
|
|
141
|
-
),
|
|
142
|
-
body: (
|
|
143
|
-
margin: 0,
|
|
144
|
-
padding: 0,
|
|
145
|
-
height: 100%,
|
|
146
|
-
color: $cx-default-color
|
|
147
|
-
),
|
|
148
|
-
h1: (
|
|
149
|
-
font-size: 2rem,
|
|
150
|
-
line-height: 1.1,
|
|
151
|
-
margin: 0 0 0.75rem 0,
|
|
152
|
-
font-weight: 500
|
|
153
|
-
),
|
|
154
|
-
h2: (
|
|
155
|
-
font-size: 1.75rem,
|
|
156
|
-
line-height: 1.1,
|
|
157
|
-
margin: 0 0 0.5rem 0,
|
|
158
|
-
font-weight: 500
|
|
159
|
-
),
|
|
160
|
-
h3: (
|
|
161
|
-
font-size: 1.5rem,
|
|
162
|
-
line-height: 1.1,
|
|
163
|
-
margin: 0 0 0.5rem 0,
|
|
164
|
-
font-weight: 500
|
|
165
|
-
),
|
|
166
|
-
h4: (
|
|
167
|
-
font-size: 1.3rem,
|
|
168
|
-
line-height: 1.1,
|
|
169
|
-
margin: 0 0 0.5rem 0,
|
|
170
|
-
font-weight: 500
|
|
171
|
-
),
|
|
172
|
-
h5: (
|
|
173
|
-
font-size: 1.15rem,
|
|
174
|
-
line-height: 1.1,
|
|
175
|
-
margin: 0 0 0.5rem 0,
|
|
176
|
-
font-weight: 500
|
|
177
|
-
),
|
|
178
|
-
h6: (
|
|
179
|
-
font-size: 1rem,
|
|
180
|
-
line-height: 1.1,
|
|
181
|
-
margin: 0 0 0.5rem 0,
|
|
182
|
-
font-weight: 500
|
|
183
|
-
),
|
|
184
|
-
p: (
|
|
185
|
-
margin: 0 0 1rem 0
|
|
186
|
-
),
|
|
187
|
-
a: (
|
|
188
|
-
text-decoration: none,
|
|
189
|
-
color: #0275d8
|
|
190
|
-
),
|
|
191
|
-
"a:hover": (
|
|
192
|
-
text-decoration: underline
|
|
193
|
-
),
|
|
194
|
-
ul: (
|
|
195
|
-
margin: 0 0 1rem 0
|
|
196
|
-
),
|
|
197
|
-
ol: (
|
|
198
|
-
margin: 0 0 1rem 0
|
|
199
|
-
),
|
|
200
|
-
th: (
|
|
201
|
-
font-weight: 500
|
|
202
|
-
),
|
|
203
|
-
text: (
|
|
204
|
-
fill: currentColor,
|
|
205
|
-
stroke: none
|
|
206
|
-
),
|
|
207
|
-
table: (
|
|
208
|
-
font-size: inherit
|
|
209
|
-
)
|
|
210
|
-
) !default;
|
|
211
|
-
|
|
212
|
-
$cx-default-cover-border-color: $cx-default-border-color !default;
|
|
213
|
-
$cx-default-cover-background-color: white !default;
|
|
214
|
-
|
|
215
|
-
@import "charts/variables";
|
|
216
|
-
@import "ui/variables";
|
|
217
|
-
@import "widgets/variables";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "cx/jsx-runtime";
|
|
2
|
-
import assert from "assert";
|
|
3
|
-
import { createAccessorModelProxy } from "../data/createAccessorModelProxy";
|
|
4
|
-
import { Store } from "../data/Store";
|
|
5
|
-
import { expr } from "../ui";
|
|
6
|
-
import { createTestRenderer } from "../util/test/createTestRenderer";
|
|
7
|
-
let { $page } = createAccessorModelProxy();
|
|
8
|
-
describe("Accessors", () => {
|
|
9
|
-
it("work as regular bindings", () => {
|
|
10
|
-
let widget = (_jsx("cx", { children: _jsx("div", { text: $page.text }) }));
|
|
11
|
-
let store = new Store({
|
|
12
|
-
data: {
|
|
13
|
-
$page: {
|
|
14
|
-
text: "Test",
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
const component = createTestRenderer(store, widget);
|
|
19
|
-
let tree = component.toJSON();
|
|
20
|
-
assert(tree && !Array.isArray(tree));
|
|
21
|
-
assert(tree.type === "div");
|
|
22
|
-
assert.deepStrictEqual(tree.children, ["Test"]);
|
|
23
|
-
});
|
|
24
|
-
it("support expressions", () => {
|
|
25
|
-
let widget = (_jsx("cx", { children: _jsx("div", { text: expr($page.a, $page.b, (a, b) => a + b) }) }));
|
|
26
|
-
let store = new Store({
|
|
27
|
-
data: {
|
|
28
|
-
$page: {
|
|
29
|
-
a: 1,
|
|
30
|
-
b: 3,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
const component = createTestRenderer(store, widget);
|
|
35
|
-
let tree = component.toJSON();
|
|
36
|
-
assert(tree && !Array.isArray(tree));
|
|
37
|
-
assert(tree.type === "div");
|
|
38
|
-
assert.deepStrictEqual(tree.children, ["4"]);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
@mixin cx-button(
|
|
4
|
-
$name: "button",
|
|
5
|
-
$state-style-map: $cx-button-state-style-map,
|
|
6
|
-
$mods: $cx-button-mods,
|
|
7
|
-
$icon-size: $cx-default-icon-size,
|
|
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
|
-
position: relative;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
display: inline-block;
|
|
19
|
-
|
|
20
|
-
$line-height: cx-get-state-rule($state-style-map, default, "line-height", 1.2em);
|
|
21
|
-
$padding: cx-get-state-rule($state-style-map, default, "padding", 0);
|
|
22
|
-
$border-width: cx-get-state-rule($state-style-map, default, "border-width", 1px);
|
|
23
|
-
|
|
24
|
-
height: cx-calc(
|
|
25
|
-
$line-height,
|
|
26
|
-
cx-top($padding),
|
|
27
|
-
cx-bottom($padding),
|
|
28
|
-
cx-top($border-width),
|
|
29
|
-
cx-bottom($border-width)
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
@include cx-add-state-rules($state-style-map, "default");
|
|
33
|
-
|
|
34
|
-
&::-moz-focus-inner {
|
|
35
|
-
border: 0;
|
|
36
|
-
padding: 0;
|
|
37
|
-
margin: -1px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
@include cx-add-state-rules($state-style-map, "hover");
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:focus {
|
|
45
|
-
@include cx-add-state-rules($state-style-map, "focus");
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&:hover:focus {
|
|
49
|
-
@include cx-add-state-rules($state-style-map, "hover-focus");
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&:active,
|
|
53
|
-
&.#{$state}pressed {
|
|
54
|
-
@include cx-add-state-rules($state-style-map, "active");
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&[disabled],
|
|
58
|
-
&.#{$state}disabled {
|
|
59
|
-
@include cx-add-state-rules($state-style-map, "disabled");
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@each $modname, $config in $mods {
|
|
63
|
-
&.#{$mod}#{$modname} {
|
|
64
|
-
@include cx-add-state-rules($config, default);
|
|
65
|
-
|
|
66
|
-
&[disabled],
|
|
67
|
-
&.#{$state}disabled {
|
|
68
|
-
@include cx-add-state-rules($config, disabled);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&:hover {
|
|
72
|
-
@include cx-add-state-rules($config, hover);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&:focus {
|
|
76
|
-
@include cx-add-state-rules($config, focus);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&:active,
|
|
80
|
-
&.#{$state}pressed {
|
|
81
|
-
@include cx-add-state-rules($config, active);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
$padding: cx-get-state-rule($state-style-map, default, padding);
|
|
88
|
-
|
|
89
|
-
.#{$element}#{$name}-icon {
|
|
90
|
-
display: inline-block;
|
|
91
|
-
position: absolute;
|
|
92
|
-
top: 50%;
|
|
93
|
-
left: cx-left($padding) * 0.5;
|
|
94
|
-
margin-top: -$icon-size * 0.5;
|
|
95
|
-
height: $icon-size;
|
|
96
|
-
width: $icon-size;
|
|
97
|
-
line-height: $icon-size;
|
|
98
|
-
text-align: center;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.#{$element}#{$name}-baseline {
|
|
102
|
-
display: inline-block;
|
|
103
|
-
width: 1px;
|
|
104
|
-
margin-left: -1px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.#{$block}#{$name}.#{$state}icon {
|
|
108
|
-
padding: cx-top($padding) cx-right($padding) cx-bottom($padding) cx-calc(cx-left($padding), $icon-size);
|
|
109
|
-
|
|
110
|
-
&.#{$state}empty {
|
|
111
|
-
padding: cx-top($padding) cx-right($padding) * 0.5 cx-bottom($padding)
|
|
112
|
-
cx-calc(cx-left($padding) * 0.5, $icon-size);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@if (cx-should-include("cx/widgets/Button")) {
|
|
118
|
-
@include cx-button;
|
|
119
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
|
|
4
|
-
$cx-default-button-font-family: $cx-default-box-font-family !default;
|
|
5
|
-
$cx-default-button-font-size: $cx-default-box-font-size !default;
|
|
6
|
-
$cx-default-button-font-weight: normal !default;
|
|
7
|
-
$cx-default-button-padding: cx-top($cx-default-box-padding) 2 * cx-right($cx-default-box-padding)
|
|
8
|
-
cx-bottom($cx-default-box-padding) 2 * cx-left($cx-default-box-padding) !default;
|
|
9
|
-
$cx-default-button-border-width: $cx-default-box-border-width !default;
|
|
10
|
-
$cx-default-button-line-height: $cx-default-box-line-height !default;
|
|
11
|
-
$cx-default-button-background-color: #eee !default;
|
|
12
|
-
$cx-default-button-border-color: #ccc !default;
|
|
13
|
-
$cx-default-button-border-radius: $cx-default-border-radius !default;
|
|
14
|
-
$cx-default-button-color: null !default;
|
|
15
|
-
$cx-default-button-box-shadow: inset 0 -2px rgba(128, 128, 128, 0.1) !default;
|
|
16
|
-
|
|
17
|
-
$cx-button-state-style-map: (
|
|
18
|
-
default: (
|
|
19
|
-
background-color: $cx-default-button-background-color,
|
|
20
|
-
box-shadow: $cx-default-button-box-shadow,
|
|
21
|
-
border-color: $cx-default-button-border-color,
|
|
22
|
-
border-width: $cx-default-button-border-width,
|
|
23
|
-
border-radius: $cx-default-button-border-radius,
|
|
24
|
-
border-style: solid,
|
|
25
|
-
user-select: none,
|
|
26
|
-
color: $cx-default-button-color,
|
|
27
|
-
font-family: $cx-default-button-font-family,
|
|
28
|
-
font-size: $cx-default-button-font-size,
|
|
29
|
-
font-weight: $cx-default-button-font-weight,
|
|
30
|
-
line-height: $cx-default-button-line-height,
|
|
31
|
-
padding: $cx-default-button-padding,
|
|
32
|
-
cursor: pointer,
|
|
33
|
-
-webkit-appearance: none,
|
|
34
|
-
-moz-appearance: none,
|
|
35
|
-
appearance: none,
|
|
36
|
-
white-space: nowrap,
|
|
37
|
-
text-decoration: none,
|
|
38
|
-
),
|
|
39
|
-
hover: (
|
|
40
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3),
|
|
41
|
-
text-decoration: none,
|
|
42
|
-
),
|
|
43
|
-
focus: (
|
|
44
|
-
outline: none,
|
|
45
|
-
box-shadow: 0 0 1px 1px rgba(77, 144, 254, 0.8),
|
|
46
|
-
),
|
|
47
|
-
hover-focus: (),
|
|
48
|
-
disabled: (
|
|
49
|
-
color: gray,
|
|
50
|
-
box-shadow: none,
|
|
51
|
-
pointer-events: none,
|
|
52
|
-
),
|
|
53
|
-
active: (
|
|
54
|
-
top: 1px,
|
|
55
|
-
box-shadow: none,
|
|
56
|
-
),
|
|
57
|
-
) !default;
|
|
58
|
-
|
|
59
|
-
$cx-button-mods: (
|
|
60
|
-
primary: (
|
|
61
|
-
default: (
|
|
62
|
-
background-color: #1f99f8,
|
|
63
|
-
border-color: #1e88e5,
|
|
64
|
-
color: white,
|
|
65
|
-
),
|
|
66
|
-
disabled: (
|
|
67
|
-
background-color: color.adjust(#1f99f8, $alpha: -0.5),
|
|
68
|
-
border-color: color.adjust(#1e88e5, $alpha: -0.9),
|
|
69
|
-
color: color.adjust(white, $alpha: -0.4),
|
|
70
|
-
),
|
|
71
|
-
hover: (
|
|
72
|
-
background-color: #1f99f8,
|
|
73
|
-
),
|
|
74
|
-
),
|
|
75
|
-
danger: (
|
|
76
|
-
default: (
|
|
77
|
-
background-color: #d32f2f,
|
|
78
|
-
border-color: #c62828,
|
|
79
|
-
color: white,
|
|
80
|
-
),
|
|
81
|
-
disabled: (
|
|
82
|
-
background-color: color.adjust(#d32f2f, $alpha: -0.4),
|
|
83
|
-
border-color: color.adjust(#c62828, $alpha: -0.9),
|
|
84
|
-
color: color.adjust(white, $alpha: -0.5),
|
|
85
|
-
),
|
|
86
|
-
hover: (
|
|
87
|
-
background-color: #d32f2f,
|
|
88
|
-
),
|
|
89
|
-
),
|
|
90
|
-
hollow: (
|
|
91
|
-
default: (
|
|
92
|
-
background-color: transparent,
|
|
93
|
-
border-color: transparent,
|
|
94
|
-
color: inherit,
|
|
95
|
-
box-shadow: none,
|
|
96
|
-
),
|
|
97
|
-
hover:
|
|
98
|
-
map.merge(
|
|
99
|
-
map.get($cx-list-item, hover),
|
|
100
|
-
(
|
|
101
|
-
box-shadow: none,
|
|
102
|
-
border-color: transparent,
|
|
103
|
-
)
|
|
104
|
-
),
|
|
105
|
-
focus:
|
|
106
|
-
map.merge(
|
|
107
|
-
map.get($cx-list-item, selected-cursor),
|
|
108
|
-
(
|
|
109
|
-
box-shadow: none,
|
|
110
|
-
border-color: transparent,
|
|
111
|
-
)
|
|
112
|
-
),
|
|
113
|
-
disabled: (
|
|
114
|
-
color: rgba(128, 128, 128, 0.5),
|
|
115
|
-
),
|
|
116
|
-
),
|
|
117
|
-
) !default;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
@mixin cx-cxcredit($name: "cxcredit", $besm: $cx-besm) {
|
|
4
|
-
$block: map.get($besm, block);
|
|
5
|
-
$element: map.get($besm, element);
|
|
6
|
-
$state: map.get($besm, state);
|
|
7
|
-
$mod: map.get($besm, mod);
|
|
8
|
-
|
|
9
|
-
.#{$block}#{$name} {
|
|
10
|
-
width: 50px;
|
|
11
|
-
height: 50px;
|
|
12
|
-
opacity: 0.5;
|
|
13
|
-
transition: opacity 0.3s ease-in-out;
|
|
14
|
-
background: rgba(255, 255, 255, 0.1);
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
position: fixed;
|
|
17
|
-
bottom: 20px;
|
|
18
|
-
right: 20px;
|
|
19
|
-
|
|
20
|
-
&:hover {
|
|
21
|
-
opacity: 1;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.#{$mod}inline {
|
|
25
|
-
position: relative;
|
|
26
|
-
bottom: auto;
|
|
27
|
-
right: auto;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.#{$element}#{$name}-icon {
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: 100%;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@if (cx-should-include("cx/widgets/CxCredit")) {
|
|
38
|
-
@include cx-cxcredit();
|
|
39
|
-
}
|