cx 24.9.1 → 24.9.2

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.
Files changed (55) hide show
  1. package/dist/charts.js +22 -25
  2. package/dist/data.js +26 -29
  3. package/dist/manifest.js +775 -775
  4. package/dist/svg.js +59 -56
  5. package/dist/ui.js +51 -52
  6. package/dist/widgets.js +46 -49
  7. package/package.json +32 -32
  8. package/src/charts/Legend.js +151 -151
  9. package/src/charts/PieLabel.js +71 -71
  10. package/src/charts/axis/NumericAxis.js +347 -347
  11. package/src/charts/axis/Stack.js +55 -55
  12. package/src/charts/helpers/PointReducer.js +43 -43
  13. package/src/charts/helpers/SnapPointFinder.js +69 -69
  14. package/src/data/Binding.spec.js +69 -69
  15. package/src/data/StringTemplate.spec.js +105 -105
  16. package/src/data/getAccessor.spec.js +11 -11
  17. package/src/index.scss +6 -6
  18. package/src/svg/Text.d.ts +40 -40
  19. package/src/ui/Culture.d.ts +55 -55
  20. package/src/ui/Culture.js +139 -139
  21. package/src/ui/FocusManager.js +171 -171
  22. package/src/ui/Instance.d.ts +72 -72
  23. package/src/ui/VDOM.d.ts +12 -12
  24. package/src/ui/app/startAppLoop.js +58 -58
  25. package/src/ui/index.d.ts +42 -42
  26. package/src/ui/layout/LabelsTopLayout.js +134 -134
  27. package/src/util/Console.d.ts +4 -4
  28. package/src/util/scss/add-rules.scss +38 -38
  29. package/src/widgets/CxCredit.scss +37 -37
  30. package/src/widgets/List.scss +91 -91
  31. package/src/widgets/drag-drop/DropZone.js +214 -214
  32. package/src/widgets/form/Calendar.scss +196 -196
  33. package/src/widgets/form/ColorField.js +397 -397
  34. package/src/widgets/form/ColorPicker.scss +283 -283
  35. package/src/widgets/form/DateTimeField.js +573 -573
  36. package/src/widgets/form/MonthField.js +516 -516
  37. package/src/widgets/form/MonthPicker.scss +118 -118
  38. package/src/widgets/form/NumberField.js +459 -459
  39. package/src/widgets/form/NumberField.scss +61 -61
  40. package/src/widgets/form/Select.scss +99 -99
  41. package/src/widgets/form/Slider.scss +118 -118
  42. package/src/widgets/form/Switch.scss +140 -140
  43. package/src/widgets/form/TextArea.scss +43 -43
  44. package/src/widgets/form/TextField.js +290 -289
  45. package/src/widgets/form/TextField.scss +55 -55
  46. package/src/widgets/form/UploadButton.d.ts +34 -34
  47. package/src/widgets/grid/TreeNode.scss +88 -88
  48. package/src/widgets/grid/variables.scss +88 -88
  49. package/src/widgets/nav/Menu.scss +74 -74
  50. package/src/widgets/overlay/Dropdown.js +612 -612
  51. package/src/widgets/overlay/FlyweightTooltipTracker.js +39 -39
  52. package/src/widgets/overlay/Tooltip.js +300 -300
  53. package/src/widgets/overlay/Window.js +196 -196
  54. package/src/widgets/overlay/captureMouse.js +124 -124
  55. package/src/widgets/overlay/variables.scss +83 -83
@@ -1,38 +1,38 @@
1
- @mixin cx-add-rules($styles) {
2
- @each $rule, $value in $styles {
3
- #{$rule}: $value;
4
- }
5
- }
6
-
7
- @mixin cx-add-state-rules($state-style-map, $key) {
8
- @include cx-add-rules(map-get($state-style-map, $key));
9
- }
10
-
11
- @function cx-merge-state-style-maps($state-style-map, $override-style-map) {
12
- $result: $state-style-map;
13
-
14
- @if ($override-style-map != null) {
15
- @each $key, $new-value in $override-style-map {
16
- $old-value: map-get($state-style-map, $key);
17
- @if ($old-value != null) {
18
- $new-value: map-merge($old-value, $new-value);
19
- }
20
- $result: map-merge(
21
- $result,
22
- (
23
- $key: $new-value,
24
- )
25
- );
26
- }
27
- }
28
-
29
- @return $result;
30
- }
31
-
32
- @function cx-get-state-rule($state-style-map, $key, $rule, $default: null) {
33
- $result: map-get(map-get($state-style-map, $key), $rule);
34
- @if ($result != null) {
35
- @return $result;
36
- }
37
- @return $default;
38
- }
1
+ @mixin cx-add-rules($styles) {
2
+ @each $rule, $value in $styles {
3
+ #{$rule}: $value;
4
+ }
5
+ }
6
+
7
+ @mixin cx-add-state-rules($state-style-map, $key) {
8
+ @include cx-add-rules(map-get($state-style-map, $key));
9
+ }
10
+
11
+ @function cx-merge-state-style-maps($state-style-map, $override-style-map) {
12
+ $result: $state-style-map;
13
+
14
+ @if ($override-style-map != null) {
15
+ @each $key, $new-value in $override-style-map {
16
+ $old-value: map-get($state-style-map, $key);
17
+ @if ($old-value != null) {
18
+ $new-value: map-merge($old-value, $new-value);
19
+ }
20
+ $result: map-merge(
21
+ $result,
22
+ (
23
+ $key: $new-value,
24
+ )
25
+ );
26
+ }
27
+ }
28
+
29
+ @return $result;
30
+ }
31
+
32
+ @function cx-get-state-rule($state-style-map, $key, $rule, $default: null) {
33
+ $result: map-get(map-get($state-style-map, $key), $rule);
34
+ @if ($result != null) {
35
+ @return $result;
36
+ }
37
+ @return $default;
38
+ }
@@ -1,37 +1,37 @@
1
- @mixin cx-cxcredit($name: "cxcredit", $besm: $cx-besm) {
2
- $block: map-get($besm, block);
3
- $element: map-get($besm, element);
4
- $state: map-get($besm, state);
5
- $mod: map-get($besm, mod);
6
-
7
- .#{$block}#{$name} {
8
- width: 50px;
9
- height: 50px;
10
- opacity: 0.5;
11
- transition: opacity 0.3s ease-in-out;
12
- background: rgba(255, 255, 255, 0.1);
13
- cursor: pointer;
14
- position: fixed;
15
- bottom: 20px;
16
- right: 20px;
17
-
18
- &:hover {
19
- opacity: 1;
20
- }
21
-
22
- &.#{$mod}inline {
23
- position: relative;
24
- bottom: auto;
25
- right: auto;
26
- }
27
- }
28
-
29
- .#{$element}#{$name}-icon {
30
- width: 100%;
31
- height: 100%;
32
- }
33
- }
34
-
35
- @if (cx-should-include("cx/widgets/CxCredit")) {
36
- @include cx-cxcredit();
37
- }
1
+ @mixin cx-cxcredit($name: "cxcredit", $besm: $cx-besm) {
2
+ $block: map-get($besm, block);
3
+ $element: map-get($besm, element);
4
+ $state: map-get($besm, state);
5
+ $mod: map-get($besm, mod);
6
+
7
+ .#{$block}#{$name} {
8
+ width: 50px;
9
+ height: 50px;
10
+ opacity: 0.5;
11
+ transition: opacity 0.3s ease-in-out;
12
+ background: rgba(255, 255, 255, 0.1);
13
+ cursor: pointer;
14
+ position: fixed;
15
+ bottom: 20px;
16
+ right: 20px;
17
+
18
+ &:hover {
19
+ opacity: 1;
20
+ }
21
+
22
+ &.#{$mod}inline {
23
+ position: relative;
24
+ bottom: auto;
25
+ right: auto;
26
+ }
27
+ }
28
+
29
+ .#{$element}#{$name}-icon {
30
+ width: 100%;
31
+ height: 100%;
32
+ }
33
+ }
34
+
35
+ @if (cx-should-include("cx/widgets/CxCredit")) {
36
+ @include cx-cxcredit();
37
+ }
@@ -1,91 +1,91 @@
1
- @mixin cx-list($name: "list", $besm: $cx-besm) {
2
- $block: map-get($besm, block);
3
- $element: map-get($besm, element);
4
- $state: map-get($besm, state);
5
- $mod: map-get($besm, mod);
6
-
7
- .#{$block}#{$name} {
8
- list-style: none;
9
- margin: 0;
10
- padding: 0;
11
- overflow: auto;
12
- border: 0 solid $cx-default-border-color;
13
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
14
-
15
- @include cx-add-state-rules($cx-list, default);
16
-
17
- &:hover {
18
- @include cx-add-state-rules($cx-list, hover);
19
- }
20
-
21
- &.#{$state}focused {
22
- @include cx-add-state-rules($cx-list, focus);
23
- }
24
-
25
- &.#{$mod}bordered {
26
- border-width: 1px;
27
-
28
- & > .#{$element}#{$name}-item:not(:first-child) {
29
- border-top-width: 1px;
30
- }
31
- }
32
- }
33
-
34
- .#{$element}#{$name}-item {
35
- margin: 0;
36
- border: 0 solid $cx-default-border-color;
37
-
38
- @include cx-add-state-rules($cx-list-item, default);
39
-
40
- &.#{$state}pad {
41
- padding: $cx-default-list-item-padding;
42
- }
43
-
44
- .#{$state}selectable > & {
45
- cursor: pointer;
46
- }
47
-
48
- &:hover {
49
- @include cx-add-state-rules($cx-list-item, hover);
50
- }
51
-
52
- &.#{$state}cursor {
53
- @include cx-add-state-rules($cx-list-item, hover);
54
-
55
- .#{$block}#{$name}.#{$state}focused > &,
56
- .#{$block}#{$name}:focus > & {
57
- @include cx-add-state-rules($cx-list-item, cursor);
58
-
59
- &:active {
60
- @include cx-add-state-rules($cx-list-item, active);
61
- }
62
- }
63
- }
64
-
65
- &.#{$state}selected {
66
- @include cx-add-state-rules($cx-list-item, selected);
67
-
68
- &.#{$state}cursor {
69
- @include cx-add-state-rules($cx-list-item, selected-hover);
70
-
71
- .#{$block}#{$name}.#{$state}focused > &,
72
- .#{$block}#{$name}:focus > & {
73
- @include cx-add-state-rules($cx-list-item, selected-cursor);
74
- }
75
- }
76
- }
77
-
78
- &.#{$state}disabled {
79
- @include cx-add-state-rules($cx-list-item, disabled);
80
- }
81
- }
82
-
83
- .#{$element}#{$name}-empty-text {
84
- padding: $cx-default-list-item-padding;
85
- color: $cx-default-empty-text-color;
86
- }
87
- }
88
-
89
- @if (cx-should-include("cx/widgets/List")) {
90
- @include cx-list();
91
- }
1
+ @mixin cx-list($name: "list", $besm: $cx-besm) {
2
+ $block: map-get($besm, block);
3
+ $element: map-get($besm, element);
4
+ $state: map-get($besm, state);
5
+ $mod: map-get($besm, mod);
6
+
7
+ .#{$block}#{$name} {
8
+ list-style: none;
9
+ margin: 0;
10
+ padding: 0;
11
+ overflow: auto;
12
+ border: 0 solid $cx-default-border-color;
13
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
14
+
15
+ @include cx-add-state-rules($cx-list, default);
16
+
17
+ &:hover {
18
+ @include cx-add-state-rules($cx-list, hover);
19
+ }
20
+
21
+ &.#{$state}focused {
22
+ @include cx-add-state-rules($cx-list, focus);
23
+ }
24
+
25
+ &.#{$mod}bordered {
26
+ border-width: 1px;
27
+
28
+ & > .#{$element}#{$name}-item:not(:first-child) {
29
+ border-top-width: 1px;
30
+ }
31
+ }
32
+ }
33
+
34
+ .#{$element}#{$name}-item {
35
+ margin: 0;
36
+ border: 0 solid $cx-default-border-color;
37
+
38
+ @include cx-add-state-rules($cx-list-item, default);
39
+
40
+ &.#{$state}pad {
41
+ padding: $cx-default-list-item-padding;
42
+ }
43
+
44
+ .#{$state}selectable > & {
45
+ cursor: pointer;
46
+ }
47
+
48
+ &:hover {
49
+ @include cx-add-state-rules($cx-list-item, hover);
50
+ }
51
+
52
+ &.#{$state}cursor {
53
+ @include cx-add-state-rules($cx-list-item, hover);
54
+
55
+ .#{$block}#{$name}.#{$state}focused > &,
56
+ .#{$block}#{$name}:focus > & {
57
+ @include cx-add-state-rules($cx-list-item, cursor);
58
+
59
+ &:active {
60
+ @include cx-add-state-rules($cx-list-item, active);
61
+ }
62
+ }
63
+ }
64
+
65
+ &.#{$state}selected {
66
+ @include cx-add-state-rules($cx-list-item, selected);
67
+
68
+ &.#{$state}cursor {
69
+ @include cx-add-state-rules($cx-list-item, selected-hover);
70
+
71
+ .#{$block}#{$name}.#{$state}focused > &,
72
+ .#{$block}#{$name}:focus > & {
73
+ @include cx-add-state-rules($cx-list-item, selected-cursor);
74
+ }
75
+ }
76
+ }
77
+
78
+ &.#{$state}disabled {
79
+ @include cx-add-state-rules($cx-list-item, disabled);
80
+ }
81
+ }
82
+
83
+ .#{$element}#{$name}-empty-text {
84
+ padding: $cx-default-list-item-padding;
85
+ color: $cx-default-empty-text-color;
86
+ }
87
+ }
88
+
89
+ @if (cx-should-include("cx/widgets/List")) {
90
+ @include cx-list();
91
+ }