cx 26.1.13 → 26.2.1
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/Marker.d.ts +1 -1
- package/build/charts/Marker.d.ts.map +1 -1
- package/build/charts/Marker.js +16 -6
- package/build/charts/MouseTracker.d.ts +2 -0
- package/build/charts/MouseTracker.d.ts.map +1 -1
- package/build/charts/helpers/PointReducer.d.ts +2 -2
- package/build/charts/helpers/PointReducer.d.ts.map +1 -1
- package/build/data/View.d.ts +5 -3
- package/build/data/View.d.ts.map +1 -1
- package/build/data/View.js +3 -1
- package/build/data/ops/findTreeNode.d.ts +20 -1
- package/build/data/ops/findTreeNode.d.ts.map +1 -1
- package/build/data/ops/findTreeNode.js +19 -0
- package/build/data/ops/findTreePath.d.ts +1 -1
- package/build/data/ops/findTreePath.d.ts.map +1 -1
- package/build/data/ops/findTreePath.js +1 -1
- package/build/data/ops/removeTreeNodes.d.ts +14 -1
- package/build/data/ops/removeTreeNodes.d.ts.map +1 -1
- package/build/data/ops/removeTreeNodes.js +13 -0
- package/build/data/ops/updateArray.d.ts +1 -1
- package/build/data/ops/updateArray.d.ts.map +1 -1
- package/build/data/ops/updateArray.js +1 -1
- package/build/data/ops/updateTree.d.ts +20 -1
- package/build/data/ops/updateTree.d.ts.map +1 -1
- package/build/data/ops/updateTree.js +19 -0
- package/build/jsx-runtime.d.ts +1 -0
- package/build/jsx-runtime.d.ts.map +1 -1
- package/build/jsx-runtime.js +3 -1
- package/build/svg/Rectangle.d.ts +6 -4
- package/build/svg/Rectangle.d.ts.map +1 -1
- package/build/svg/Rectangle.js +9 -7
- package/build/ui/Instance.d.ts +1 -1
- package/build/ui/Instance.d.ts.map +1 -1
- package/build/ui/Instance.js +18 -8
- package/build/ui/IsolatedScope.d.ts +2 -1
- package/build/ui/IsolatedScope.d.ts.map +1 -1
- package/build/ui/Prop.d.ts +1 -1
- package/build/ui/Prop.d.ts.map +1 -1
- package/build/ui/Widget.d.ts +2 -0
- package/build/ui/Widget.d.ts.map +1 -1
- package/build/ui/Widget.js +4 -0
- package/build/ui/adapter/GroupAdapter.d.ts +4 -4
- package/build/ui/adapter/GroupAdapter.d.ts.map +1 -1
- package/build/ui/adapter/GroupAdapter.js +4 -4
- package/build/ui/adapter/TreeAdapter.d.ts +5 -3
- package/build/ui/adapter/TreeAdapter.d.ts.map +1 -1
- package/build/ui/adapter/TreeAdapter.js +12 -5
- package/build/ui/app/startAppLoop.d.ts +2 -2
- package/build/ui/app/startAppLoop.d.ts.map +1 -1
- package/build/ui/app/startHotAppLoop.d.ts +4 -4
- package/build/ui/app/startHotAppLoop.d.ts.map +1 -1
- package/build/ui/app/startHotAppLoop.js +1 -1
- package/build/ui/batchUpdates.d.ts.map +1 -1
- package/build/ui/batchUpdates.js +3 -4
- package/build/widgets/Button.d.ts +0 -7
- package/build/widgets/Button.d.ts.map +1 -1
- package/build/widgets/HtmlElement.d.ts +2 -2
- package/build/widgets/HtmlElement.d.ts.map +1 -1
- package/build/widgets/form/Checkbox.d.ts +3 -3
- package/build/widgets/form/Checkbox.d.ts.map +1 -1
- package/build/widgets/form/Checkbox.js +11 -6
- package/build/widgets/form/DateTimeField.d.ts +4 -0
- package/build/widgets/form/DateTimeField.d.ts.map +1 -1
- package/build/widgets/form/LookupField.d.ts +14 -27
- package/build/widgets/form/LookupField.d.ts.map +1 -1
- package/build/widgets/form/TextField.d.ts +2 -2
- package/build/widgets/form/TextField.d.ts.map +1 -1
- package/build/widgets/grid/Grid.d.ts +20 -16
- package/build/widgets/grid/Grid.d.ts.map +1 -1
- package/build/widgets/grid/Grid.js +200 -86
- package/build/widgets/nav/Menu.d.ts +2 -0
- package/build/widgets/nav/Menu.d.ts.map +1 -1
- package/build/widgets/nav/Route.js +1 -1
- package/build/widgets/overlay/FlyweightTooltipTracker.d.ts +6 -4
- package/build/widgets/overlay/FlyweightTooltipTracker.d.ts.map +1 -1
- package/build/widgets/overlay/FlyweightTooltipTracker.js +3 -0
- package/build/widgets/overlay/Overlay.d.ts +2 -2
- package/build/widgets/overlay/Overlay.d.ts.map +1 -1
- package/dist/data.js +52 -1
- package/dist/jsx-runtime.js +4 -2
- package/dist/manifest.js +879 -873
- package/dist/svg.js +3 -0
- package/dist/ui.js +1548 -1544
- package/dist/widgets.css +1 -1
- package/dist/widgets.js +395 -4
- package/package.json +2 -2
- package/src/charts/Marker.tsx +448 -394
- package/src/charts/MouseTracker.tsx +3 -0
- package/src/charts/helpers/PointReducer.ts +2 -2
- package/src/data/View.ts +76 -19
- package/src/data/ops/findTreeNode.ts +20 -1
- package/src/data/ops/findTreePath.ts +7 -2
- package/src/data/ops/removeTreeNodes.ts +14 -1
- package/src/data/ops/updateArray.ts +4 -4
- package/src/data/ops/updateTree.ts +32 -6
- package/src/index.scss +6 -6
- package/src/jsx-runtime.spec.tsx +40 -0
- package/src/jsx-runtime.ts +87 -84
- package/src/svg/Rectangle.tsx +80 -73
- package/src/ui/DataProxy.ts +55 -55
- package/src/ui/Instance.ts +142 -45
- package/src/ui/IsolatedScope.ts +4 -2
- package/src/ui/Prop.ts +141 -141
- package/src/ui/Rescope.ts +50 -50
- package/src/ui/Widget.tsx +292 -234
- package/src/ui/adapter/ArrayAdapter.ts +229 -229
- package/src/ui/adapter/GroupAdapter.ts +8 -10
- package/src/ui/adapter/TreeAdapter.ts +75 -15
- package/src/ui/app/Url.spec.ts +1 -1
- package/src/ui/app/startAppLoop.tsx +56 -45
- package/src/ui/app/startHotAppLoop.ts +4 -4
- package/src/ui/batchUpdates.ts +16 -21
- package/src/ui/exprHelpers.ts +96 -96
- package/src/widgets/Button.tsx +0 -8
- package/src/widgets/HtmlElement.spec.tsx +100 -72
- package/src/widgets/HtmlElement.tsx +11 -10
- package/src/widgets/Sandbox.ts +104 -104
- package/src/widgets/Section.scss +55 -55
- package/src/widgets/drag-drop/DropZone.scss +74 -74
- package/src/widgets/form/Checkbox.tsx +296 -243
- package/src/widgets/form/DateTimeField.tsx +6 -0
- package/src/widgets/form/LookupField.tsx +70 -73
- package/src/widgets/form/TextField.tsx +2 -2
- package/src/widgets/grid/Grid.scss +43 -10
- package/src/widgets/grid/Grid.tsx +4401 -3848
- package/src/widgets/nav/Menu.tsx +3 -0
- package/src/widgets/nav/Route.ts +1 -1
- package/src/widgets/overlay/FlyweightTooltipTracker.ts +15 -4
- package/src/widgets/overlay/Overlay.tsx +2 -1
- package/src/widgets/overlay/index.d.ts +11 -11
package/src/widgets/Sandbox.ts
CHANGED
|
@@ -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);
|
package/src/widgets/Section.scss
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
@mixin cx-section(
|
|
4
|
-
$name: 'section',
|
|
5
|
-
$mods: $cx-section-mods,
|
|
6
|
-
$besm: $cx-besm
|
|
7
|
-
) {
|
|
8
|
-
|
|
9
|
-
$block: map.get($besm, block);
|
|
10
|
-
$element: map.get($besm, element);
|
|
11
|
-
$state: map.get($besm, state);
|
|
12
|
-
$mod: map.get($besm, mod);
|
|
13
|
-
|
|
14
|
-
.#{$block}#{$name} {
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
display: flex;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
|
|
19
|
-
@include cx-add-rules($cx-section-styles);
|
|
20
|
-
|
|
21
|
-
@each $modname, $config in $mods {
|
|
22
|
-
&.#{$mod}#{$modname} {
|
|
23
|
-
@include cx-add-state-rules($config, default);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.#{$element}#{$name}-header {
|
|
30
|
-
margin: 0 1.5rem;
|
|
31
|
-
padding: 1rem 0;
|
|
32
|
-
box-sizing: border-box;
|
|
33
|
-
border-bottom: 1px solid rgba(128, 128, 128, 0.3);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.#{$element}#{$name}-body {
|
|
37
|
-
flex: 1 1 auto;
|
|
38
|
-
box-sizing: border-box;
|
|
39
|
-
overflow: auto;
|
|
40
|
-
|
|
41
|
-
.#{$state}pad > & {
|
|
42
|
-
padding: 1rem 1.5rem;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.#{$element}#{$name}-footer {
|
|
47
|
-
margin: 0 1.5rem;
|
|
48
|
-
padding: 1rem 0;
|
|
49
|
-
box-sizing: border-box;
|
|
50
|
-
border-top: 1px solid rgba(128, 128, 128, 0.3);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@if (cx-should-include('cx/widgets/Section')) {
|
|
55
|
-
@include cx-section();
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
@mixin cx-section(
|
|
4
|
+
$name: 'section',
|
|
5
|
+
$mods: $cx-section-mods,
|
|
6
|
+
$besm: $cx-besm
|
|
7
|
+
) {
|
|
8
|
+
|
|
9
|
+
$block: map.get($besm, block);
|
|
10
|
+
$element: map.get($besm, element);
|
|
11
|
+
$state: map.get($besm, state);
|
|
12
|
+
$mod: map.get($besm, mod);
|
|
13
|
+
|
|
14
|
+
.#{$block}#{$name} {
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
display: flex;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
|
|
19
|
+
@include cx-add-rules($cx-section-styles);
|
|
20
|
+
|
|
21
|
+
@each $modname, $config in $mods {
|
|
22
|
+
&.#{$mod}#{$modname} {
|
|
23
|
+
@include cx-add-state-rules($config, default);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.#{$element}#{$name}-header {
|
|
30
|
+
margin: 0 1.5rem;
|
|
31
|
+
padding: 1rem 0;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
border-bottom: 1px solid rgba(128, 128, 128, 0.3);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.#{$element}#{$name}-body {
|
|
37
|
+
flex: 1 1 auto;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
overflow: auto;
|
|
40
|
+
|
|
41
|
+
.#{$state}pad > & {
|
|
42
|
+
padding: 1rem 1.5rem;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.#{$element}#{$name}-footer {
|
|
47
|
+
margin: 0 1.5rem;
|
|
48
|
+
padding: 1rem 0;
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
border-top: 1px solid rgba(128, 128, 128, 0.3);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@if (cx-should-include('cx/widgets/Section')) {
|
|
55
|
+
@include cx-section();
|
|
56
56
|
}
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
@mixin cx-dropzone($name: "dropzone", $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
|
-
box-sizing: border-box;
|
|
11
|
-
position: relative;
|
|
12
|
-
|
|
13
|
-
&.#{$mod}hline {
|
|
14
|
-
height: 1px;
|
|
15
|
-
margin-top: -1px;
|
|
16
|
-
align-self: stretch;
|
|
17
|
-
|
|
18
|
-
&.#{$state}over {
|
|
19
|
-
background: black;
|
|
20
|
-
box-shadow: 0 0 2px black;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.#{$mod}vline {
|
|
25
|
-
width: 1px;
|
|
26
|
-
margin-left: -1px;
|
|
27
|
-
min-height: 1em;
|
|
28
|
-
display: inline-block;
|
|
29
|
-
vertical-align: middle;
|
|
30
|
-
align-self: stretch;
|
|
31
|
-
|
|
32
|
-
&.#{$state}over {
|
|
33
|
-
background: black;
|
|
34
|
-
box-shadow: 0 0 2px black;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&.#{$mod}block {
|
|
39
|
-
min-height: 1px;
|
|
40
|
-
margin-top: -1px;
|
|
41
|
-
align-self: stretch;
|
|
42
|
-
|
|
43
|
-
&.#{$state}over {
|
|
44
|
-
height: 25px;
|
|
45
|
-
border: 2px dotted lightgray;
|
|
46
|
-
margin: 5px;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&.#{$mod}inline-block {
|
|
51
|
-
width: 1px;
|
|
52
|
-
margin-left: -1px;
|
|
53
|
-
min-height: 1em;
|
|
54
|
-
position: relative;
|
|
55
|
-
display: inline-block;
|
|
56
|
-
vertical-align: top;
|
|
57
|
-
align-self: stretch;
|
|
58
|
-
|
|
59
|
-
&:after {
|
|
60
|
-
content: " ";
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&.#{$state}over {
|
|
64
|
-
width: 50px;
|
|
65
|
-
border: 2px dotted lightgray;
|
|
66
|
-
margin: 5px;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
@if (cx-should-include("cx/widgets/DropZone")) {
|
|
73
|
-
@include cx-dropzone();
|
|
74
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
@mixin cx-dropzone($name: "dropzone", $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
|
+
box-sizing: border-box;
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
&.#{$mod}hline {
|
|
14
|
+
height: 1px;
|
|
15
|
+
margin-top: -1px;
|
|
16
|
+
align-self: stretch;
|
|
17
|
+
|
|
18
|
+
&.#{$state}over {
|
|
19
|
+
background: black;
|
|
20
|
+
box-shadow: 0 0 2px black;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.#{$mod}vline {
|
|
25
|
+
width: 1px;
|
|
26
|
+
margin-left: -1px;
|
|
27
|
+
min-height: 1em;
|
|
28
|
+
display: inline-block;
|
|
29
|
+
vertical-align: middle;
|
|
30
|
+
align-self: stretch;
|
|
31
|
+
|
|
32
|
+
&.#{$state}over {
|
|
33
|
+
background: black;
|
|
34
|
+
box-shadow: 0 0 2px black;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.#{$mod}block {
|
|
39
|
+
min-height: 1px;
|
|
40
|
+
margin-top: -1px;
|
|
41
|
+
align-self: stretch;
|
|
42
|
+
|
|
43
|
+
&.#{$state}over {
|
|
44
|
+
height: 25px;
|
|
45
|
+
border: 2px dotted lightgray;
|
|
46
|
+
margin: 5px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.#{$mod}inline-block {
|
|
51
|
+
width: 1px;
|
|
52
|
+
margin-left: -1px;
|
|
53
|
+
min-height: 1em;
|
|
54
|
+
position: relative;
|
|
55
|
+
display: inline-block;
|
|
56
|
+
vertical-align: top;
|
|
57
|
+
align-self: stretch;
|
|
58
|
+
|
|
59
|
+
&:after {
|
|
60
|
+
content: " ";
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.#{$state}over {
|
|
64
|
+
width: 50px;
|
|
65
|
+
border: 2px dotted lightgray;
|
|
66
|
+
margin: 5px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@if (cx-should-include("cx/widgets/DropZone")) {
|
|
73
|
+
@include cx-dropzone();
|
|
74
|
+
}
|