@web-canvas-ui/react 0.1.1 → 0.2.0
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/README.md +172 -76
- package/index.js +2682 -0
- package/package.json +36 -27
- package/types/canvas-handle.d.ts +22 -0
- package/types/components/Button/button.d.ts +20 -0
- package/types/components/Button/logic.d.ts +3 -0
- package/types/components/CanvasView/canvasView.d.ts +28 -0
- package/types/components/CanvasView/index.d.ts +2 -0
- package/types/components/Carousel/carousel.d.ts +31 -0
- package/types/components/Carousel/logic.d.ts +2 -0
- package/types/components/Checkbox/checkbox.d.ts +8 -0
- package/types/components/ChoiceGroup/choiceGroup.d.ts +33 -0
- package/types/components/ChoiceGroup/logic.d.ts +3 -0
- package/types/components/Circle/circle.d.ts +9 -0
- package/types/components/Collapse/collapse.d.ts +32 -0
- package/types/components/Collapse/logic.d.ts +1 -0
- package/types/components/CustomDraw/customDraw.d.ts +22 -0
- package/types/components/CustomDraw/index.d.ts +2 -0
- package/types/components/DatePicker/datePicker.d.ts +24 -0
- package/types/components/Dialog/dialog.d.ts +20 -0
- package/types/components/Dropdown/dropdown.d.ts +30 -0
- package/types/components/Dropdown/logic.d.ts +5 -0
- package/{components/Grid/grid.ts → types/components/Grid/grid.d.ts} +3 -4
- package/{components/GridItem/gridItem.ts → types/components/GridItem/gridItem.d.ts} +1 -4
- package/{components/Group/group.ts → types/components/Group/group.d.ts} +1 -4
- package/types/components/Icon/icon.d.ts +14 -0
- package/types/components/Image/image.d.ts +12 -0
- package/types/components/Input/input.d.ts +32 -0
- package/types/components/Progress/progress.d.ts +15 -0
- package/types/components/Radio/radio.d.ts +8 -0
- package/types/components/Rect/rect.d.ts +11 -0
- package/types/components/Slider/logic.d.ts +1 -0
- package/types/components/Slider/slider.d.ts +17 -0
- package/types/components/Switch/logic.d.ts +2 -0
- package/types/components/Switch/switch.d.ts +14 -0
- package/types/components/Tabs/logic.d.ts +2 -0
- package/types/components/Tabs/tabs.d.ts +35 -0
- package/types/components/Text/text.d.ts +39 -0
- package/types/components/Textarea/textarea.d.ts +10 -0
- package/types/components/Upload/upload.d.ts +20 -0
- package/types/components/Video/index.d.ts +2 -0
- package/types/components/Video/video.d.ts +20 -0
- package/types/components/draw-utils.d.ts +48 -0
- package/types/components/shared.d.ts +7 -0
- package/types/components/size.d.ts +6 -0
- package/{components/types.ts → types/components/types.d.ts} +3 -12
- package/types/engine/carousel.d.ts +10 -0
- package/types/engine/events.d.ts +14 -0
- package/types/engine/hit-test.d.ts +31 -0
- package/types/engine/images.d.ts +8 -0
- package/types/engine/interaction.d.ts +11 -0
- package/types/engine/layout.d.ts +6 -0
- package/types/engine/nodes.d.ts +18 -0
- package/{engine/state.ts → types/engine/state.d.ts} +27 -22
- package/types/engine/text-controls.d.ts +10 -0
- package/types/engine/transform.d.ts +13 -0
- package/types/engine/videos.d.ts +14 -0
- package/types/engine/vnodes.d.ts +36 -0
- package/types/engine.d.ts +36 -0
- package/types/image-assets.d.ts +2 -0
- package/types/input-bridge.d.ts +40 -0
- package/types/react/Canvas.d.ts +4 -0
- package/types/react/components.d.ts +30 -0
- package/types/react/index.d.ts +4 -0
- package/types/renderer.d.ts +20 -0
- package/types/scene.d.ts +15 -0
- package/{types.ts → types/types.d.ts} +10 -142
- package/types/video-assets.d.ts +11 -0
- package/Canvas.tsx +0 -142
- package/__tests__/pure-logic.test.ts +0 -153
- package/__tests__/scene-and-node.test.ts +0 -131
- package/__tests__/scratch-space.test.ts +0 -30
- package/__tests__/textarea-caret.test.ts +0 -96
- package/__tests__/utils.test.ts +0 -114
- package/canvas-handle.ts +0 -114
- package/components/Button/button.ts +0 -57
- package/components/Button/logic.ts +0 -11
- package/components/CanvasView/canvasView.ts +0 -103
- package/components/CanvasView/index.ts +0 -7
- package/components/Carousel/carousel.ts +0 -107
- package/components/Carousel/logic.ts +0 -36
- package/components/Checkbox/checkbox.ts +0 -14
- package/components/ChoiceGroup/choiceGroup.ts +0 -172
- package/components/ChoiceGroup/logic.ts +0 -14
- package/components/Circle/circle.ts +0 -31
- package/components/Collapse/collapse.ts +0 -69
- package/components/Collapse/logic.ts +0 -14
- package/components/CustomDraw/customDraw.ts +0 -50
- package/components/CustomDraw/index.ts +0 -7
- package/components/DatePicker/datePicker.ts +0 -70
- package/components/Dialog/dialog.ts +0 -102
- package/components/Dropdown/dropdown.ts +0 -125
- package/components/Dropdown/logic.ts +0 -29
- package/components/Icon/icon.ts +0 -669
- package/components/Image/image.ts +0 -69
- package/components/Input/input.ts +0 -139
- package/components/Progress/progress.ts +0 -59
- package/components/Radio/radio.ts +0 -14
- package/components/Rect/rect.ts +0 -35
- package/components/Slider/logic.ts +0 -19
- package/components/Slider/slider.ts +0 -58
- package/components/Switch/logic.ts +0 -8
- package/components/Switch/switch.ts +0 -37
- package/components/Tabs/logic.ts +0 -14
- package/components/Tabs/tabs.ts +0 -78
- package/components/Text/text.ts +0 -95
- package/components/Textarea/textarea.ts +0 -16
- package/components/Upload/upload.ts +0 -66
- package/components/draw-utils.ts +0 -230
- package/components/shared.ts +0 -15
- package/components/size.ts +0 -20
- package/components.ts +0 -98
- package/engine/__tests__/carousel.test.ts +0 -218
- package/engine/__tests__/hit-test.test.ts +0 -282
- package/engine/__tests__/layout.test.ts +0 -474
- package/engine/carousel.ts +0 -150
- package/engine/events.ts +0 -73
- package/engine/hit-test.ts +0 -321
- package/engine/images.ts +0 -41
- package/engine/interaction.ts +0 -442
- package/engine/layout.ts +0 -355
- package/engine/nodes.ts +0 -166
- package/engine/text-controls.ts +0 -122
- package/engine/transform.ts +0 -61
- package/engine/vnodes.ts +0 -204
- package/engine.ts +0 -162
- package/image-assets.ts +0 -37
- package/index.ts +0 -78
- package/input-bridge.ts +0 -285
- package/renderer.ts +0 -303
- package/scene.ts +0 -122
- package/theme.scss +0 -234
- package/web-canvas-ui-react-0.1.1.tgz +0 -0
- /package/{components/Button/index.ts → types/components/Button/index.d.ts} +0 -0
- /package/{components/Carousel/index.ts → types/components/Carousel/index.d.ts} +0 -0
- /package/{components/Checkbox/index.ts → types/components/Checkbox/index.d.ts} +0 -0
- /package/{components/ChoiceGroup/index.ts → types/components/ChoiceGroup/index.d.ts} +0 -0
- /package/{components/Circle/index.ts → types/components/Circle/index.d.ts} +0 -0
- /package/{components/Collapse/index.ts → types/components/Collapse/index.d.ts} +0 -0
- /package/{components/DatePicker/index.ts → types/components/DatePicker/index.d.ts} +0 -0
- /package/{components/Dialog/index.ts → types/components/Dialog/index.d.ts} +0 -0
- /package/{components/Dropdown/index.ts → types/components/Dropdown/index.d.ts} +0 -0
- /package/{components/Grid/index.ts → types/components/Grid/index.d.ts} +0 -0
- /package/{components/GridItem/index.ts → types/components/GridItem/index.d.ts} +0 -0
- /package/{components/Group/index.ts → types/components/Group/index.d.ts} +0 -0
- /package/{components/Icon/index.ts → types/components/Icon/index.d.ts} +0 -0
- /package/{components/Image/index.ts → types/components/Image/index.d.ts} +0 -0
- /package/{components/Input/index.ts → types/components/Input/index.d.ts} +0 -0
- /package/{components/Progress/index.ts → types/components/Progress/index.d.ts} +0 -0
- /package/{components/Radio/index.ts → types/components/Radio/index.d.ts} +0 -0
- /package/{components/Rect/index.ts → types/components/Rect/index.d.ts} +0 -0
- /package/{components/Slider/index.ts → types/components/Slider/index.d.ts} +0 -0
- /package/{components/Switch/index.ts → types/components/Switch/index.d.ts} +0 -0
- /package/{components/Tabs/index.ts → types/components/Tabs/index.d.ts} +0 -0
- /package/{components/Text/index.ts → types/components/Text/index.d.ts} +0 -0
- /package/{components/Textarea/index.ts → types/components/Textarea/index.d.ts} +0 -0
- /package/{components/Upload/index.ts → types/components/Upload/index.d.ts} +0 -0
package/scene.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import type { ComponentKind, VNode } from './types';
|
|
2
|
-
|
|
3
|
-
export class SceneNode {
|
|
4
|
-
readonly children: SceneNode[] = [];
|
|
5
|
-
parent: SceneNode | null = null;
|
|
6
|
-
dirty = true;
|
|
7
|
-
readonly type: ComponentKind | 'root';
|
|
8
|
-
props: Record<string, unknown>;
|
|
9
|
-
|
|
10
|
-
constructor(type: ComponentKind | 'root', props: Record<string, unknown> = {}) {
|
|
11
|
-
this.type = type;
|
|
12
|
-
this.props = props;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
setProps(props: Record<string, unknown>): void {
|
|
16
|
-
this.replaceProps({ ...this.props, ...props });
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
replaceProps(props: Record<string, unknown>): void {
|
|
20
|
-
const keys = new Set([...Object.keys(this.props), ...Object.keys(props)]);
|
|
21
|
-
let changed = false;
|
|
22
|
-
for (const key of keys) {
|
|
23
|
-
if (this.props[key] !== props[key]) {
|
|
24
|
-
changed = true;
|
|
25
|
-
break;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (changed) {
|
|
29
|
-
this.props = props;
|
|
30
|
-
this.markDirty();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
markDirty(): void {
|
|
35
|
-
this.dirty = true;
|
|
36
|
-
this.parent?.markDirty();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
syncChildren(vnodes: VNode[], onRemove: (node: SceneNode) => void): void {
|
|
40
|
-
const oldChildren = [...this.children];
|
|
41
|
-
const used = new Set<SceneNode>();
|
|
42
|
-
const nextChildren = vnodes.map((vnode, index) => {
|
|
43
|
-
const key = vnode.key === null ? null : `${vnode.type}:${vnode.key}`;
|
|
44
|
-
const existing =
|
|
45
|
-
key === null
|
|
46
|
-
? oldChildren[index]?.type === vnode.type && !used.has(oldChildren[index])
|
|
47
|
-
? oldChildren[index]
|
|
48
|
-
: undefined
|
|
49
|
-
: oldChildren.find(
|
|
50
|
-
(child) =>
|
|
51
|
-
child.props._key === key &&
|
|
52
|
-
child.type === vnode.type &&
|
|
53
|
-
!used.has(child),
|
|
54
|
-
);
|
|
55
|
-
const node = existing ?? new SceneNode(vnode.type);
|
|
56
|
-
if (existing) used.add(existing);
|
|
57
|
-
else node.parent = this;
|
|
58
|
-
|
|
59
|
-
const props: Record<string, unknown> = { ...vnode.props, _key: key };
|
|
60
|
-
if (
|
|
61
|
-
vnode.type === 'input' ||
|
|
62
|
-
vnode.type === 'datePicker' ||
|
|
63
|
-
vnode.type === 'textarea' ||
|
|
64
|
-
vnode.type === 'dropdown' ||
|
|
65
|
-
vnode.type === 'slider'
|
|
66
|
-
) {
|
|
67
|
-
if (props.value === undefined) {
|
|
68
|
-
props.value =
|
|
69
|
-
existing?.props.value ??
|
|
70
|
-
props.defaultValue ??
|
|
71
|
-
(vnode.type === 'slider' ? (props.min ?? 0) : '');
|
|
72
|
-
}
|
|
73
|
-
if (
|
|
74
|
-
vnode.type === 'input' ||
|
|
75
|
-
vnode.type === 'datePicker' ||
|
|
76
|
-
vnode.type === 'textarea'
|
|
77
|
-
) {
|
|
78
|
-
props.focused = existing?.props.focused ?? false;
|
|
79
|
-
props.cursorPos = existing?.props.cursorPos ?? String(props.value).length;
|
|
80
|
-
}
|
|
81
|
-
if (vnode.type === 'dropdown') props.open = existing?.props.open ?? false;
|
|
82
|
-
}
|
|
83
|
-
if (vnode.type === 'switch') {
|
|
84
|
-
props.checked =
|
|
85
|
-
props.checked ?? existing?.props.checked ?? props.defaultChecked ?? false;
|
|
86
|
-
}
|
|
87
|
-
if (vnode.type === 'radio' || vnode.type === 'checkbox') {
|
|
88
|
-
props.value =
|
|
89
|
-
props.value ??
|
|
90
|
-
existing?.props.value ??
|
|
91
|
-
props.defaultValue ??
|
|
92
|
-
(vnode.type === 'checkbox' ? [] : '');
|
|
93
|
-
}
|
|
94
|
-
node.replaceProps(props);
|
|
95
|
-
node.syncChildren(vnode.children, onRemove);
|
|
96
|
-
return node;
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
for (const old of oldChildren) {
|
|
100
|
-
if (!used.has(old) && !nextChildren.includes(old)) {
|
|
101
|
-
onRemove(old);
|
|
102
|
-
old.parent = null;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
const orderChanged =
|
|
106
|
-
nextChildren.length !== this.children.length ||
|
|
107
|
-
nextChildren.some((node, index) => this.children[index] !== node);
|
|
108
|
-
if (orderChanged) {
|
|
109
|
-
this.children.splice(0, this.children.length, ...nextChildren);
|
|
110
|
-
this.markDirty();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
traverse(visitor: (node: SceneNode) => void): void {
|
|
115
|
-
visitor(this);
|
|
116
|
-
this.children.forEach((child) => child.traverse(visitor));
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export function descriptorKey(vnode: VNode, index: number, parentPath: string): string {
|
|
121
|
-
return vnode.key === null ? `${parentPath}/i${index}` : `${parentPath}/k${vnode.key}`;
|
|
122
|
-
}
|
package/theme.scss
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
|
|
3
|
-
$primary: #1668dc !default;
|
|
4
|
-
$white: #ffffff;
|
|
5
|
-
$black: #000000;
|
|
6
|
-
|
|
7
|
-
$primary-light: color.mix($white, $primary, 90%);
|
|
8
|
-
$primary-hover: color.scale($primary, $lightness: -18%);
|
|
9
|
-
$primary-dark: color.scale($primary, $lightness: 20%);
|
|
10
|
-
$primary-dark-hover: color.scale($primary-dark, $lightness: -18%);
|
|
11
|
-
$theme-colors: (
|
|
12
|
-
"blue": #1668dc,
|
|
13
|
-
"green": #389e0d,
|
|
14
|
-
"purple": #722ed1,
|
|
15
|
-
"orange": #d46b08,
|
|
16
|
-
"red": #cf1322,
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
@mixin light-primary-theme($base) {
|
|
20
|
-
$light: color.mix($white, $base, 90%);
|
|
21
|
-
$hover: color.scale($base, $lightness: -18%);
|
|
22
|
-
|
|
23
|
-
--canvas-ui-primary: #{$base};
|
|
24
|
-
--canvas-ui-primary-light: #{$light};
|
|
25
|
-
--canvas-ui-primary-hover: #{$hover};
|
|
26
|
-
--canvas-ui-primary-dark: #{color.scale($base, $lightness: 20%)};
|
|
27
|
-
--canvas-ui-button-background: #{$base};
|
|
28
|
-
--canvas-ui-button-border: #{$base};
|
|
29
|
-
--canvas-ui-button-pressed-background: #{$hover};
|
|
30
|
-
--canvas-ui-carousel-active-dot: #{$base};
|
|
31
|
-
--canvas-ui-choice-active: #{$base};
|
|
32
|
-
--canvas-ui-dialog-confirm-background: #{$base};
|
|
33
|
-
--canvas-ui-dropdown-focus-border: #{$base};
|
|
34
|
-
--canvas-ui-input-focus-border: #{$base};
|
|
35
|
-
--canvas-ui-progress-active: #{$base};
|
|
36
|
-
--canvas-ui-slider-active: #{$base};
|
|
37
|
-
--canvas-ui-switch-on: #{$base};
|
|
38
|
-
--canvas-ui-tabs-active-color: #{$base};
|
|
39
|
-
--canvas-ui-tabs-indicator: #{$base};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@mixin dark-primary-theme($base) {
|
|
43
|
-
$highlight: color.scale($base, $lightness: 20%);
|
|
44
|
-
$pressed: color.scale($base, $lightness: -18%);
|
|
45
|
-
|
|
46
|
-
--canvas-ui-primary: #{$base};
|
|
47
|
-
--canvas-ui-primary-light: #{color.mix($white, $base, 90%)};
|
|
48
|
-
--canvas-ui-primary-hover: #{$pressed};
|
|
49
|
-
--canvas-ui-primary-dark: #{$highlight};
|
|
50
|
-
--canvas-ui-button-background: #{$base};
|
|
51
|
-
--canvas-ui-button-border: #{$base};
|
|
52
|
-
--canvas-ui-button-pressed-background: #{$pressed};
|
|
53
|
-
--canvas-ui-carousel-active-dot: #{$highlight};
|
|
54
|
-
--canvas-ui-choice-active: #{$highlight};
|
|
55
|
-
--canvas-ui-dialog-confirm-background: #{$base};
|
|
56
|
-
--canvas-ui-dropdown-focus-border: #{$highlight};
|
|
57
|
-
--canvas-ui-input-focus-border: #{$highlight};
|
|
58
|
-
--canvas-ui-progress-active: #{$highlight};
|
|
59
|
-
--canvas-ui-slider-active: #{$highlight};
|
|
60
|
-
--canvas-ui-switch-on: #{$base};
|
|
61
|
-
--canvas-ui-tabs-active-color: #{$highlight};
|
|
62
|
-
--canvas-ui-tabs-indicator: #{$highlight};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
$gray-50: #fafafa;
|
|
66
|
-
$gray-100: #f5f5f5;
|
|
67
|
-
$gray-150: #f0f0f0;
|
|
68
|
-
$gray-200: #e3e7ed;
|
|
69
|
-
$gray-300: #d9d9d9;
|
|
70
|
-
$gray-400: #bfbfbf;
|
|
71
|
-
$gray-500: #999999;
|
|
72
|
-
$gray-600: #595959;
|
|
73
|
-
$gray-700: #434343;
|
|
74
|
-
$gray-800: #262626;
|
|
75
|
-
$gray-850: #1f1f1f;
|
|
76
|
-
$gray-900: #141414;
|
|
77
|
-
$text-primary: #333333;
|
|
78
|
-
$text-secondary: #666666;
|
|
79
|
-
$text-dark: #e6e6e6;
|
|
80
|
-
$text-placeholder-dark: #8c8c8c;
|
|
81
|
-
|
|
82
|
-
:root {
|
|
83
|
-
--canvas-ui-primary: #{$primary};
|
|
84
|
-
--canvas-ui-primary-light: #{$primary-light};
|
|
85
|
-
--canvas-ui-primary-hover: #{$primary-hover};
|
|
86
|
-
--canvas-ui-primary-dark: #{$primary-dark};
|
|
87
|
-
|
|
88
|
-
--canvas-ui-button-background: #{$primary};
|
|
89
|
-
--canvas-ui-button-color: #{$white};
|
|
90
|
-
--canvas-ui-button-border: #{$primary};
|
|
91
|
-
--canvas-ui-button-pressed-background: #{$primary-hover};
|
|
92
|
-
|
|
93
|
-
--canvas-ui-carousel-arrow: #{$white};
|
|
94
|
-
--canvas-ui-carousel-dot: rgba(255, 255, 255, 0.65);
|
|
95
|
-
--canvas-ui-carousel-active-dot: #{$primary};
|
|
96
|
-
|
|
97
|
-
--canvas-ui-choice-active: #{$primary};
|
|
98
|
-
--canvas-ui-choice-border: #{$gray-300};
|
|
99
|
-
--canvas-ui-choice-color: #{$text-primary};
|
|
100
|
-
--canvas-ui-choice-disabled: #{$gray-400};
|
|
101
|
-
--canvas-ui-choice-disabled-background: #{$gray-100};
|
|
102
|
-
|
|
103
|
-
--canvas-ui-collapse-header-background: #{$gray-50};
|
|
104
|
-
--canvas-ui-collapse-border: #{$gray-300};
|
|
105
|
-
--canvas-ui-collapse-color: #{$gray-800};
|
|
106
|
-
--canvas-ui-collapse-disabled-color: #{$gray-400};
|
|
107
|
-
|
|
108
|
-
--canvas-ui-dialog-mask: rgba(0, 0, 0, 0.45);
|
|
109
|
-
--canvas-ui-dialog-background: #{$white};
|
|
110
|
-
--canvas-ui-dialog-title-color: #{$gray-850};
|
|
111
|
-
--canvas-ui-dialog-border: #{$gray-150};
|
|
112
|
-
--canvas-ui-dialog-confirm-background: #{$primary};
|
|
113
|
-
--canvas-ui-dialog-cancel-background: #{$white};
|
|
114
|
-
--canvas-ui-dialog-confirm-color: #{$white};
|
|
115
|
-
--canvas-ui-dialog-cancel-color: #{$text-primary};
|
|
116
|
-
|
|
117
|
-
--canvas-ui-dropdown-background: #{$white};
|
|
118
|
-
--canvas-ui-dropdown-color: #{$text-primary};
|
|
119
|
-
--canvas-ui-dropdown-placeholder-color: #{$gray-500};
|
|
120
|
-
--canvas-ui-dropdown-border: #{$gray-300};
|
|
121
|
-
--canvas-ui-dropdown-focus-border: #{$primary};
|
|
122
|
-
--canvas-ui-dropdown-option-background: #{$white};
|
|
123
|
-
--canvas-ui-dropdown-option-border: #{$gray-200};
|
|
124
|
-
--canvas-ui-dropdown-disabled-color: #{$gray-500};
|
|
125
|
-
|
|
126
|
-
--canvas-ui-input-background: #{$white};
|
|
127
|
-
--canvas-ui-input-color: #{$text-primary};
|
|
128
|
-
--canvas-ui-input-placeholder-color: #{$gray-500};
|
|
129
|
-
--canvas-ui-input-border: #{$gray-300};
|
|
130
|
-
--canvas-ui-input-focus-border: #{$primary};
|
|
131
|
-
|
|
132
|
-
--canvas-ui-progress-track: #{$gray-150};
|
|
133
|
-
--canvas-ui-progress-active: #{$primary};
|
|
134
|
-
--canvas-ui-progress-text: #{$text-primary};
|
|
135
|
-
|
|
136
|
-
--canvas-ui-rect-background: transparent;
|
|
137
|
-
--canvas-ui-rect-border: #{$black};
|
|
138
|
-
--canvas-ui-circle-background: #e74c3c;
|
|
139
|
-
--canvas-ui-circle-border: #{$black};
|
|
140
|
-
--canvas-ui-text-color: #{$text-primary};
|
|
141
|
-
--canvas-ui-icon-color: #{$text-primary};
|
|
142
|
-
|
|
143
|
-
--canvas-ui-slider-track: #{$gray-150};
|
|
144
|
-
--canvas-ui-slider-active: #{$primary};
|
|
145
|
-
--canvas-ui-slider-thumb: #{$white};
|
|
146
|
-
|
|
147
|
-
--canvas-ui-switch-on: #{$primary};
|
|
148
|
-
--canvas-ui-switch-off: #{$gray-300};
|
|
149
|
-
--canvas-ui-switch-thumb: #{$white};
|
|
150
|
-
|
|
151
|
-
--canvas-ui-tabs-background: #{$white};
|
|
152
|
-
--canvas-ui-tabs-color: #{$gray-600};
|
|
153
|
-
--canvas-ui-tabs-active-color: #{$primary};
|
|
154
|
-
--canvas-ui-tabs-indicator: #{$primary};
|
|
155
|
-
--canvas-ui-tabs-disabled-color: #{$gray-400};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.dark,
|
|
159
|
-
[data-theme="dark"] {
|
|
160
|
-
--canvas-ui-primary-dark: #{$primary-dark};
|
|
161
|
-
|
|
162
|
-
--canvas-ui-button-background: #{$primary};
|
|
163
|
-
--canvas-ui-button-border: #{$primary};
|
|
164
|
-
--canvas-ui-button-pressed-background: #{$primary-dark-hover};
|
|
165
|
-
|
|
166
|
-
--canvas-ui-carousel-active-dot: #{$primary-dark};
|
|
167
|
-
|
|
168
|
-
--canvas-ui-choice-active: #{$primary-dark};
|
|
169
|
-
--canvas-ui-choice-border: #{$gray-700};
|
|
170
|
-
--canvas-ui-choice-color: #{$text-dark};
|
|
171
|
-
--canvas-ui-choice-disabled: #{$gray-600};
|
|
172
|
-
--canvas-ui-choice-disabled-background: #{$gray-800};
|
|
173
|
-
|
|
174
|
-
--canvas-ui-collapse-header-background: #{$gray-850};
|
|
175
|
-
--canvas-ui-collapse-border: #{$gray-700};
|
|
176
|
-
--canvas-ui-collapse-color: #{$text-dark};
|
|
177
|
-
--canvas-ui-collapse-disabled-color: #{$gray-600};
|
|
178
|
-
|
|
179
|
-
--canvas-ui-dialog-background: #{$gray-850};
|
|
180
|
-
--canvas-ui-dialog-title-color: #{$text-dark};
|
|
181
|
-
--canvas-ui-dialog-border: #{$gray-700};
|
|
182
|
-
--canvas-ui-dialog-confirm-background: #{$primary};
|
|
183
|
-
--canvas-ui-dialog-cancel-background: #{$gray-800};
|
|
184
|
-
--canvas-ui-dialog-confirm-color: #{$white};
|
|
185
|
-
--canvas-ui-dialog-cancel-color: #{$text-dark};
|
|
186
|
-
|
|
187
|
-
--canvas-ui-dropdown-background: #{$gray-850};
|
|
188
|
-
--canvas-ui-dropdown-color: #{$text-dark};
|
|
189
|
-
--canvas-ui-dropdown-placeholder-color: #{$text-placeholder-dark};
|
|
190
|
-
--canvas-ui-dropdown-border: #{$gray-700};
|
|
191
|
-
--canvas-ui-dropdown-focus-border: #{$primary-dark};
|
|
192
|
-
--canvas-ui-dropdown-option-background: #{$gray-850};
|
|
193
|
-
--canvas-ui-dropdown-option-border: #{$gray-700};
|
|
194
|
-
--canvas-ui-dropdown-disabled-color: #{$gray-600};
|
|
195
|
-
|
|
196
|
-
--canvas-ui-input-background: #{$gray-900};
|
|
197
|
-
--canvas-ui-input-color: #{$text-dark};
|
|
198
|
-
--canvas-ui-input-placeholder-color: #{$text-placeholder-dark};
|
|
199
|
-
--canvas-ui-input-border: #{$gray-700};
|
|
200
|
-
--canvas-ui-input-focus-border: #{$primary-dark};
|
|
201
|
-
|
|
202
|
-
--canvas-ui-progress-track: #{$gray-700};
|
|
203
|
-
--canvas-ui-progress-active: #{$primary-dark};
|
|
204
|
-
--canvas-ui-progress-text: #{$text-dark};
|
|
205
|
-
|
|
206
|
-
--canvas-ui-rect-border: #{$gray-300};
|
|
207
|
-
--canvas-ui-circle-border: #{$gray-300};
|
|
208
|
-
--canvas-ui-text-color: #{$text-dark};
|
|
209
|
-
--canvas-ui-icon-color: #{$text-dark};
|
|
210
|
-
|
|
211
|
-
--canvas-ui-slider-track: #{$gray-700};
|
|
212
|
-
--canvas-ui-slider-active: #{$primary-dark};
|
|
213
|
-
|
|
214
|
-
--canvas-ui-switch-on: #{$primary};
|
|
215
|
-
--canvas-ui-switch-off: #{$gray-700};
|
|
216
|
-
|
|
217
|
-
--canvas-ui-tabs-background: #{$gray-850};
|
|
218
|
-
--canvas-ui-tabs-color: #{$gray-400};
|
|
219
|
-
--canvas-ui-tabs-active-color: #{$primary-dark};
|
|
220
|
-
--canvas-ui-tabs-indicator: #{$primary-dark};
|
|
221
|
-
--canvas-ui-tabs-disabled-color: #{$gray-600};
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
@each $name, $color in $theme-colors {
|
|
225
|
-
.theme-#{$name} {
|
|
226
|
-
@include light-primary-theme($color);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.dark .theme-#{$name},
|
|
230
|
-
.theme-#{$name}.dark,
|
|
231
|
-
.theme-#{$name}[data-theme="dark"] {
|
|
232
|
-
@include dark-primary-theme($color);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|