@topvisor/ui 0.0.15 → 0.0.17
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/.chunks/core-0b2c7817.es.js +152 -0
- package/.chunks/core-0b2c7817.es.js.map +1 -0
- package/.chunks/core-51f7b679.amd.js +151 -0
- package/.chunks/core-51f7b679.amd.js.map +1 -0
- package/.chunks/{forms-5e17154c.es.js → forms-245e3bc0.es.js} +175 -32
- package/.chunks/forms-245e3bc0.es.js.map +1 -0
- package/.chunks/forms-f7b7b259.amd.js +568 -0
- package/.chunks/forms-f7b7b259.amd.js.map +1 -0
- package/.chunks/popup-8f650530.amd.js +728 -0
- package/.chunks/popup-8f650530.amd.js.map +1 -0
- package/.chunks/popup-d240ed19.es.js +731 -0
- package/.chunks/popup-d240ed19.es.js.map +1 -0
- package/README.md +62 -62
- package/common/common.amd.js +1 -1
- package/core/core.amd.js +5 -0
- package/core/core.amd.js.map +1 -0
- package/core/core.js +7 -0
- package/core/core.js.map +1 -0
- package/core.css +647 -658
- package/dark.css +135 -135
- package/editArea/editArea.amd.js +126 -0
- package/editArea/editArea.amd.js.map +1 -0
- package/editArea/editArea.js +123 -0
- package/editArea/editArea.js.map +1 -0
- package/editArea.css +61 -0
- package/forms/forms.amd.js +5 -3
- package/forms/forms.amd.js.map +1 -1
- package/forms/forms.js +6 -4
- package/{helpers → forms}/helpers.amd.js +2 -2
- package/{helpers → forms}/helpers.js +1 -1
- package/forms.css +344 -254
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +2945 -2931
- package/icomoon/fonts/Topvisor-2.svg +232 -231
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +647 -644
- package/light.css +135 -135
- package/package.json +19 -19
- package/popup/popup.amd.js +198 -0
- package/popup/popup.amd.js.map +1 -0
- package/popup/popup.js +198 -0
- package/popup/popup.js.map +1 -0
- package/popup/worker.amd.js +234 -0
- package/popup/worker.amd.js.map +1 -0
- package/popup/worker.js +237 -0
- package/popup/worker.js.map +1 -0
- package/popup.css +19 -0
- package/tabs/tabs.amd.js +123 -0
- package/tabs/tabs.amd.js.map +1 -0
- package/tabs/tabs.js +120 -0
- package/tabs/tabs.js.map +1 -0
- package/tabs.css +60 -0
- package/utils/device.amd.js +42 -0
- package/utils/device.amd.js.map +1 -0
- package/utils/device.js +41 -0
- package/utils/device.js.map +1 -0
- package/utils/dom.amd.js +95 -0
- package/utils/dom.amd.js.map +1 -0
- package/utils/dom.js +94 -0
- package/utils/dom.js.map +1 -0
- package/.chunks/forms-2abb7eaa.amd.js +0 -425
- package/.chunks/forms-2abb7eaa.amd.js.map +0 -1
- package/.chunks/forms-5e17154c.es.js.map +0 -1
- package/icomoon/demo-files/Read Me.txt +0 -7
- /package/{helpers → forms}/helpers.amd.js.map +0 -0
- /package/{helpers → forms}/helpers.js.map +0 -0
package/dark.css
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
/* Main */
|
|
3
|
-
--color-primary: var(--color-blue-450);
|
|
4
|
-
--color-primary-light: var(--color-blue-800);
|
|
5
|
-
--color-primary-light-opacity: rgba(1, 40, 100, 0.75);
|
|
6
|
-
--color-primary-2: var(--color-blue-500);
|
|
7
|
-
--color-primary-2-light: var(--color-blue-750);
|
|
8
|
-
--color-primary-2-light-opacity: rgba(0, 59, 146, 0.64);
|
|
9
|
-
|
|
10
|
-
--color-secondary-opacity: rgba(193, 203, 215, 0.16);
|
|
11
|
-
--color-secondary-2-opacity: rgba(193, 203, 215, 0.32);
|
|
12
|
-
--color-secondary-3-opacity: rgba(193, 203, 215, 0.38);
|
|
13
|
-
|
|
14
|
-
--color-positive: var(--color-green-450);
|
|
15
|
-
--color-positive-opacity: rgba(0, 102, 44, 0.75);
|
|
16
|
-
--color-positive-light: var(--color-green-800);
|
|
17
|
-
--color-positive-light-opacity: rgba(0, 89, 38, 0.47);
|
|
18
|
-
--color-positive-2: var(--color-green-500);
|
|
19
|
-
--color-positive-2-light: var(--color-green-750);
|
|
20
|
-
--color-positive-2-light-opacity: rgba(0, 102, 44, 0.75);
|
|
21
|
-
|
|
22
|
-
--color-warning: var(--color-orange-450);
|
|
23
|
-
--color-warning-opacity: rgba(255, 170, 51, 0.3);
|
|
24
|
-
--color-warning-light: var(--color-orange-800);
|
|
25
|
-
--color-warning-light-opacity: rgba(109, 64, 1, 0.61);
|
|
26
|
-
--color-warning-2: var(--color-orange-500);
|
|
27
|
-
--color-warning-2-light: var(--color-orange-750);
|
|
28
|
-
--color-warning-2-light-opacity: rgba(161, 97, 0, 0.58);
|
|
29
|
-
|
|
30
|
-
--color-negative: var(--color-red-450);
|
|
31
|
-
--color-negative-opacity: rgba(234, 65, 50, 0.3);
|
|
32
|
-
--color-negative-light: var(--color-red-800);
|
|
33
|
-
--color-negative-light-opacity: rgba(117, 10, 0, 0.50);
|
|
34
|
-
--color-negative-2: var(--color-red-500);
|
|
35
|
-
--color-negative-2-light: var(--color-red-750);
|
|
36
|
-
--color-negative-2-light-opacity: rgba(136, 23, 0, 0.66);
|
|
37
|
-
|
|
38
|
-
/* Text */
|
|
39
|
-
--color-text-1: var(--color-theme-975);
|
|
40
|
-
--color-text-2: var(--color-theme-750);
|
|
41
|
-
--color-text-3: var(--color-theme-550);
|
|
42
|
-
--color-text-4: var(--color-theme-450);
|
|
43
|
-
--color-text: var(--color-text-1);
|
|
44
|
-
|
|
45
|
-
--color-text-secondary: var(--color-gray-750);
|
|
46
|
-
--color-text-secondary-2: var(--color-gray-650);
|
|
47
|
-
|
|
48
|
-
--color-text-link: var(--color-blue-500);
|
|
49
|
-
--color-text-link-hover: var(--color-blue-450);
|
|
50
|
-
|
|
51
|
-
--color-overlay: rgba(0, 0, 0, 0.3);
|
|
52
|
-
|
|
53
|
-
--color-placeholder: var(--color-gray-350);
|
|
54
|
-
--color-placeholder-active: var(--color-gray-450);
|
|
55
|
-
|
|
56
|
-
/* Background colors */
|
|
57
|
-
--color-bg-1: rgba(21, 23, 25, 1);
|
|
58
|
-
--color-bg-2: rgba(26, 28, 31, 1);
|
|
59
|
-
--color-bg-3: rgba(38, 41, 46, 1);
|
|
60
|
-
|
|
61
|
-
/* Line colors */
|
|
62
|
-
--color-line-1-opacity: rgba(193, 203, 215, 0.1);
|
|
63
|
-
--color-line-2-opacity: rgba(68, 74, 87, 0.67);
|
|
64
|
-
--color-line-3-opacity: rgba(104, 110, 126, 0.67);
|
|
65
|
-
|
|
66
|
-
/* Scroll */
|
|
67
|
-
--scroll-thumb-color: var(--color-gray-750);
|
|
68
|
-
--scroll-thumb-color-hover: var(--color-gray-700);
|
|
69
|
-
--scroll-thumb-color-active: var(--color-gray-650);
|
|
70
|
-
|
|
71
|
-
/* Page */
|
|
72
|
-
--body-background-color: var(--content-background-color);
|
|
73
|
-
--content-background-color: var(--color-bg-3);
|
|
74
|
-
|
|
75
|
-
/* Theme */
|
|
76
|
-
--color-theme-0: var(--color-bg-3);
|
|
77
|
-
--color-theme-25: rgba(40, 43, 48, 1);
|
|
78
|
-
--color-theme-50: rgba(41, 45, 51, 1);
|
|
79
|
-
--color-theme-75: rgba(44, 49, 56, 1);
|
|
80
|
-
--color-theme-100: rgba(48, 52, 59, 1);
|
|
81
|
-
--color-theme-125: rgba(52, 56, 64, 1);
|
|
82
|
-
--color-theme-150: rgba(54, 59, 69, 1);
|
|
83
|
-
--color-theme-200: rgba(58, 63, 74, 1);
|
|
84
|
-
--color-theme-250: rgba(61, 66, 77, 1);
|
|
85
|
-
--color-theme-300: rgba(64, 70, 82, 1);
|
|
86
|
-
--color-theme-350: rgba(68, 74, 87, 1);
|
|
87
|
-
--color-theme-400: rgba(75, 81, 94, 1);
|
|
88
|
-
--color-theme-450: rgba(82, 87, 99, 1);
|
|
89
|
-
--color-theme-500: rgba(90, 95, 107, 1);
|
|
90
|
-
--color-theme-525: rgba(98, 103, 115, 1);
|
|
91
|
-
--color-theme-550: rgba(108, 112, 122, 1);
|
|
92
|
-
--color-theme-600: rgba(116, 120, 130, 1);
|
|
93
|
-
--color-theme-650: rgba(128, 131, 140, 1);
|
|
94
|
-
--color-theme-700: rgba(142, 145, 153, 1);
|
|
95
|
-
--color-theme-750: rgba(157, 160, 166, 1);
|
|
96
|
-
--color-theme-800: rgba(174, 177, 184, 1);
|
|
97
|
-
--color-theme-850: rgba(193, 196, 201, 1);
|
|
98
|
-
--color-theme-875: rgba(211, 214, 219, 1);
|
|
99
|
-
--color-theme-900: rgba(235, 237, 240, 1);
|
|
100
|
-
--color-theme-925: rgba(240, 242, 245, 1);
|
|
101
|
-
--color-theme-950: rgba(245, 246, 247, 1);
|
|
102
|
-
--color-theme-975: rgba(250, 251, 252, 1);
|
|
103
|
-
--color-theme-1000: rgba(255, 255, 255, 1);
|
|
104
|
-
|
|
105
|
-
/* top-shadow */
|
|
106
|
-
--top-shadow-s:
|
|
107
|
-
0px 0px 3px rgba(0, 0, 0, 0.11),
|
|
108
|
-
0px 5px 25px rgba(0, 0, 0, 0.17);
|
|
109
|
-
--top-shadow:
|
|
110
|
-
0px 0px 4px rgba(0, 0, 0, 0.14),
|
|
111
|
-
0px 4px 32px rgba(0, 0, 0, 0.2);
|
|
112
|
-
--top-shadow-b:
|
|
113
|
-
0px 0px 4px rgba(0, 0, 0, 0.15),
|
|
114
|
-
0px 18px 32px rgba(0, 0, 0, 0.34);
|
|
115
|
-
|
|
116
|
-
--top-shadow-darken: inset 1000px 1000px 1000px 1000px rgba(0, 0, 0, 0.03);
|
|
117
|
-
--top-shadow-darken-2: inset 1000px 1000px 1000px 1000px rgba(0, 0, 0, 0.07);
|
|
118
|
-
--top-shadow-darken-3: inset 1000px 1000px 1000px 1000px rgba(0, 0, 0, 0.14);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/* forms */
|
|
122
|
-
:root {
|
|
123
|
-
/* for text */
|
|
124
|
-
--top-forms-color: var(--color-text-1);
|
|
125
|
-
--top-forms-color-disabled: var(--color-text-3);
|
|
126
|
-
/* for border */
|
|
127
|
-
--top-forms-border-color: var(--color-line-
|
|
128
|
-
--top-forms-border-color-hover: var(--color-primary);
|
|
129
|
-
--top-forms-border-color-disabled: var(--color-line-1-opacity);
|
|
130
|
-
/* for placeholder */
|
|
131
|
-
--top-forms-placeholder-color: var(--color-text-3);
|
|
132
|
-
--top-forms-placeholder-color-disabled: var(--color-text-4);
|
|
133
|
-
/* for background */
|
|
134
|
-
--top-forms-background-color: var(--color-bg-3);
|
|
135
|
-
--top-forms-background-color-hover: var(--color-bg-3);
|
|
1
|
+
:root {
|
|
2
|
+
/* Main */
|
|
3
|
+
--color-primary: var(--color-blue-450);
|
|
4
|
+
--color-primary-light: var(--color-blue-800);
|
|
5
|
+
--color-primary-light-opacity: rgba(1, 40, 100, 0.75);
|
|
6
|
+
--color-primary-2: var(--color-blue-500);
|
|
7
|
+
--color-primary-2-light: var(--color-blue-750);
|
|
8
|
+
--color-primary-2-light-opacity: rgba(0, 59, 146, 0.64);
|
|
9
|
+
|
|
10
|
+
--color-secondary-opacity: rgba(193, 203, 215, 0.16);
|
|
11
|
+
--color-secondary-2-opacity: rgba(193, 203, 215, 0.32);
|
|
12
|
+
--color-secondary-3-opacity: rgba(193, 203, 215, 0.38);
|
|
13
|
+
|
|
14
|
+
--color-positive: var(--color-green-450);
|
|
15
|
+
--color-positive-opacity: rgba(0, 102, 44, 0.75);
|
|
16
|
+
--color-positive-light: var(--color-green-800);
|
|
17
|
+
--color-positive-light-opacity: rgba(0, 89, 38, 0.47);
|
|
18
|
+
--color-positive-2: var(--color-green-500);
|
|
19
|
+
--color-positive-2-light: var(--color-green-750);
|
|
20
|
+
--color-positive-2-light-opacity: rgba(0, 102, 44, 0.75);
|
|
21
|
+
|
|
22
|
+
--color-warning: var(--color-orange-450);
|
|
23
|
+
--color-warning-opacity: rgba(255, 170, 51, 0.3);
|
|
24
|
+
--color-warning-light: var(--color-orange-800);
|
|
25
|
+
--color-warning-light-opacity: rgba(109, 64, 1, 0.61);
|
|
26
|
+
--color-warning-2: var(--color-orange-500);
|
|
27
|
+
--color-warning-2-light: var(--color-orange-750);
|
|
28
|
+
--color-warning-2-light-opacity: rgba(161, 97, 0, 0.58);
|
|
29
|
+
|
|
30
|
+
--color-negative: var(--color-red-450);
|
|
31
|
+
--color-negative-opacity: rgba(234, 65, 50, 0.3);
|
|
32
|
+
--color-negative-light: var(--color-red-800);
|
|
33
|
+
--color-negative-light-opacity: rgba(117, 10, 0, 0.50);
|
|
34
|
+
--color-negative-2: var(--color-red-500);
|
|
35
|
+
--color-negative-2-light: var(--color-red-750);
|
|
36
|
+
--color-negative-2-light-opacity: rgba(136, 23, 0, 0.66);
|
|
37
|
+
|
|
38
|
+
/* Text */
|
|
39
|
+
--color-text-1: var(--color-theme-975);
|
|
40
|
+
--color-text-2: var(--color-theme-750);
|
|
41
|
+
--color-text-3: var(--color-theme-550);
|
|
42
|
+
--color-text-4: var(--color-theme-450);
|
|
43
|
+
--color-text: var(--color-text-1);
|
|
44
|
+
|
|
45
|
+
--color-text-secondary: var(--color-gray-750);
|
|
46
|
+
--color-text-secondary-2: var(--color-gray-650);
|
|
47
|
+
|
|
48
|
+
--color-text-link: var(--color-blue-500);
|
|
49
|
+
--color-text-link-hover: var(--color-blue-450);
|
|
50
|
+
|
|
51
|
+
--color-overlay: rgba(0, 0, 0, 0.3);
|
|
52
|
+
|
|
53
|
+
--color-placeholder: var(--color-gray-350);
|
|
54
|
+
--color-placeholder-active: var(--color-gray-450);
|
|
55
|
+
|
|
56
|
+
/* Background colors */
|
|
57
|
+
--color-bg-1: rgba(21, 23, 25, 1);
|
|
58
|
+
--color-bg-2: rgba(26, 28, 31, 1);
|
|
59
|
+
--color-bg-3: rgba(38, 41, 46, 1);
|
|
60
|
+
|
|
61
|
+
/* Line colors */
|
|
62
|
+
--color-line-1-opacity: rgba(193, 203, 215, 0.1);
|
|
63
|
+
--color-line-2-opacity: rgba(68, 74, 87, 0.67);
|
|
64
|
+
--color-line-3-opacity: rgba(104, 110, 126, 0.67);
|
|
65
|
+
|
|
66
|
+
/* Scroll */
|
|
67
|
+
--scroll-thumb-color: var(--color-gray-750);
|
|
68
|
+
--scroll-thumb-color-hover: var(--color-gray-700);
|
|
69
|
+
--scroll-thumb-color-active: var(--color-gray-650);
|
|
70
|
+
|
|
71
|
+
/* Page */
|
|
72
|
+
--body-background-color: var(--content-background-color);
|
|
73
|
+
--content-background-color: var(--color-bg-3);
|
|
74
|
+
|
|
75
|
+
/* Theme */
|
|
76
|
+
--color-theme-0: var(--color-bg-3);
|
|
77
|
+
--color-theme-25: rgba(40, 43, 48, 1);
|
|
78
|
+
--color-theme-50: rgba(41, 45, 51, 1);
|
|
79
|
+
--color-theme-75: rgba(44, 49, 56, 1);
|
|
80
|
+
--color-theme-100: rgba(48, 52, 59, 1);
|
|
81
|
+
--color-theme-125: rgba(52, 56, 64, 1);
|
|
82
|
+
--color-theme-150: rgba(54, 59, 69, 1);
|
|
83
|
+
--color-theme-200: rgba(58, 63, 74, 1);
|
|
84
|
+
--color-theme-250: rgba(61, 66, 77, 1);
|
|
85
|
+
--color-theme-300: rgba(64, 70, 82, 1);
|
|
86
|
+
--color-theme-350: rgba(68, 74, 87, 1);
|
|
87
|
+
--color-theme-400: rgba(75, 81, 94, 1);
|
|
88
|
+
--color-theme-450: rgba(82, 87, 99, 1);
|
|
89
|
+
--color-theme-500: rgba(90, 95, 107, 1);
|
|
90
|
+
--color-theme-525: rgba(98, 103, 115, 1);
|
|
91
|
+
--color-theme-550: rgba(108, 112, 122, 1);
|
|
92
|
+
--color-theme-600: rgba(116, 120, 130, 1);
|
|
93
|
+
--color-theme-650: rgba(128, 131, 140, 1);
|
|
94
|
+
--color-theme-700: rgba(142, 145, 153, 1);
|
|
95
|
+
--color-theme-750: rgba(157, 160, 166, 1);
|
|
96
|
+
--color-theme-800: rgba(174, 177, 184, 1);
|
|
97
|
+
--color-theme-850: rgba(193, 196, 201, 1);
|
|
98
|
+
--color-theme-875: rgba(211, 214, 219, 1);
|
|
99
|
+
--color-theme-900: rgba(235, 237, 240, 1);
|
|
100
|
+
--color-theme-925: rgba(240, 242, 245, 1);
|
|
101
|
+
--color-theme-950: rgba(245, 246, 247, 1);
|
|
102
|
+
--color-theme-975: rgba(250, 251, 252, 1);
|
|
103
|
+
--color-theme-1000: rgba(255, 255, 255, 1);
|
|
104
|
+
|
|
105
|
+
/* top-shadow */
|
|
106
|
+
--top-shadow-s:
|
|
107
|
+
0px 0px 3px rgba(0, 0, 0, 0.11),
|
|
108
|
+
0px 5px 25px rgba(0, 0, 0, 0.17);
|
|
109
|
+
--top-shadow:
|
|
110
|
+
0px 0px 4px rgba(0, 0, 0, 0.14),
|
|
111
|
+
0px 4px 32px rgba(0, 0, 0, 0.2);
|
|
112
|
+
--top-shadow-b:
|
|
113
|
+
0px 0px 4px rgba(0, 0, 0, 0.15),
|
|
114
|
+
0px 18px 32px rgba(0, 0, 0, 0.34);
|
|
115
|
+
|
|
116
|
+
--top-shadow-darken: inset 1000px 1000px 1000px 1000px rgba(0, 0, 0, 0.03);
|
|
117
|
+
--top-shadow-darken-2: inset 1000px 1000px 1000px 1000px rgba(0, 0, 0, 0.07);
|
|
118
|
+
--top-shadow-darken-3: inset 1000px 1000px 1000px 1000px rgba(0, 0, 0, 0.14);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* forms */
|
|
122
|
+
:root {
|
|
123
|
+
/* for text */
|
|
124
|
+
--top-forms-color: var(--color-text-1);
|
|
125
|
+
--top-forms-color-disabled: var(--color-text-3);
|
|
126
|
+
/* for border */
|
|
127
|
+
--top-forms-border-color: var(--color-line-2-opacity);
|
|
128
|
+
--top-forms-border-color-hover: var(--color-primary);
|
|
129
|
+
--top-forms-border-color-disabled: var(--color-line-1-opacity);
|
|
130
|
+
/* for placeholder */
|
|
131
|
+
--top-forms-placeholder-color: var(--color-text-3);
|
|
132
|
+
--top-forms-placeholder-color-disabled: var(--color-text-4);
|
|
133
|
+
/* for background */
|
|
134
|
+
--top-forms-background-color: var(--color-bg-3);
|
|
135
|
+
--top-forms-background-color-hover: var(--color-bg-3);
|
|
136
136
|
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
define(["exports", "vue", "../.chunks/forms-f7b7b259.amd"], function(exports, vue, forms) {
|
|
2
|
+
"use strict"; if(typeof vue === "undefined") var vue = window.Vue;
|
|
3
|
+
var __vite_style__ = document.createElement("style");
|
|
4
|
+
__vite_style__.textContent = "\n.top-editArea {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.top-editArea_title {\n font-size: 12px;\n}\n.top-editArea_form {\n background: var(--top-forms-background-color);\n outline-color: var(--color-theme-75);\n outline-offset: 0;\n display: flex;\n flex-direction: column;\n}\n.top-editArea_form:hover {\n background: var(--top-forms-background-color-hover);\n}\n\n/* textarea в EditArea */\n.top-editArea_element.top-textarea {\n width: 100%;\n}\n.top-editArea_element.top-textarea_textarea {\n border: none;\n outline: none;\n animation: none;\n}\n\n/* footer */\n.top-editArea_footer {\n padding: var(--top-forms-padding);\n display: flex;\n justify-content: flex-end;\n gap: var(--top-forms-padding);\n}\n\n/* attachedToKeyboard */\n.top-editArea-attachedToKeyboard {\n background: var(--top-forms-background-color);\n margin-bottom: env(keyboard-inset-height, 0);\n position: fixed;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n gap: 0;\n}\n.top-editArea-attachedToKeyboard .top-editArea_form {\n border-radius: 0;\n border: none;\n border-top: 1px solid var(--top-forms-border-color);\n}\n.top-editArea-attachedToKeyboard .top-editArea_title {\n border-top: 1px solid var(--color-line-2-opacity);\n padding: var(--top-forms-padding);\n}\n.top-editArea-attachedToKeyboard .top-editArea_footer > [data-top-icon] {\n border-radius: 100%;\n}\n";
|
|
5
|
+
document.head.appendChild(__vite_style__);
|
|
6
|
+
const _hoisted_1 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "top-editArea_title"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_2 = { class: "top-editArea_footer" };
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
12
|
+
__name: "editArea",
|
|
13
|
+
props: {
|
|
14
|
+
modelValue: {},
|
|
15
|
+
title: {},
|
|
16
|
+
cancelText: { default: "Отмена" },
|
|
17
|
+
submitText: { default: "Отправить" },
|
|
18
|
+
attachToKeyboard: { type: Boolean },
|
|
19
|
+
name: {},
|
|
20
|
+
placeholder: {},
|
|
21
|
+
rows: {},
|
|
22
|
+
minHeight: {},
|
|
23
|
+
expandable: { type: Boolean, default: true },
|
|
24
|
+
disabled: { type: Boolean },
|
|
25
|
+
readonly: { type: Boolean },
|
|
26
|
+
isError: { type: Boolean },
|
|
27
|
+
hint: {}
|
|
28
|
+
},
|
|
29
|
+
emits: ["update:modelValue", "cancel"],
|
|
30
|
+
setup(__props, { emit }) {
|
|
31
|
+
const props = __props;
|
|
32
|
+
const state = vue.ref("");
|
|
33
|
+
const localValue = vue.ref(props.modelValue);
|
|
34
|
+
vue.watch(vue.toRef(props, "modelValue"), () => {
|
|
35
|
+
localValue.value = props.modelValue;
|
|
36
|
+
});
|
|
37
|
+
const isChanged = vue.computed(() => localValue.value !== props.modelValue);
|
|
38
|
+
const submit = (value) => {
|
|
39
|
+
emit("update:modelValue", value);
|
|
40
|
+
};
|
|
41
|
+
const cancel = () => {
|
|
42
|
+
emit("cancel");
|
|
43
|
+
localValue.value = props.modelValue;
|
|
44
|
+
};
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
47
|
+
class: vue.normalizeClass({
|
|
48
|
+
"top-editArea": true,
|
|
49
|
+
"top-editArea-attachedToKeyboard": _ctx.attachToKeyboard
|
|
50
|
+
})
|
|
51
|
+
}, [
|
|
52
|
+
_ctx.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
|
|
53
|
+
vue.createElementVNode("div", {
|
|
54
|
+
class: vue.normalizeClass({
|
|
55
|
+
"top-editArea_form": true,
|
|
56
|
+
"top-error": _ctx.isError,
|
|
57
|
+
"top-focus": state.value == "focus"
|
|
58
|
+
})
|
|
59
|
+
}, [
|
|
60
|
+
vue.createVNode(forms.Textarea, {
|
|
61
|
+
modelValue: localValue.value,
|
|
62
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localValue.value = $event),
|
|
63
|
+
name: _ctx.name,
|
|
64
|
+
placeholder: _ctx.placeholder,
|
|
65
|
+
rows: _ctx.rows,
|
|
66
|
+
minHeight: _ctx.minHeight,
|
|
67
|
+
expandable: _ctx.expandable,
|
|
68
|
+
disabled: _ctx.disabled,
|
|
69
|
+
readonly: _ctx.readonly,
|
|
70
|
+
isError: _ctx.isError,
|
|
71
|
+
hint: _ctx.hint,
|
|
72
|
+
class: "top-editArea_element",
|
|
73
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => state.value = "focus"),
|
|
74
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => state.value = ""),
|
|
75
|
+
onKeyup: [
|
|
76
|
+
vue.withKeys(cancel, ["esc"]),
|
|
77
|
+
_cache[3] || (_cache[3] = vue.withKeys(vue.withModifiers(($event) => submit(localValue.value), ["ctrl"]), ["enter"]))
|
|
78
|
+
]
|
|
79
|
+
}, null, 8, ["modelValue", "name", "placeholder", "rows", "minHeight", "expandable", "disabled", "readonly", "isError", "hint", "onKeyup"]),
|
|
80
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
81
|
+
isChanged.value && (!_ctx.attachToKeyboard || _ctx.modelValue) ? (vue.openBlock(), vue.createBlock(forms.Button, {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: "top-editArea_button",
|
|
84
|
+
color: vue.unref(forms.COLOR).Theme,
|
|
85
|
+
icon: _ctx.attachToKeyboard ? "" : "",
|
|
86
|
+
onClick: cancel
|
|
87
|
+
}, {
|
|
88
|
+
default: vue.withCtx(() => [
|
|
89
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.attachToKeyboard ? "" : _ctx.cancelText), 1)
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
}, 8, ["color", "icon"])) : vue.createCommentVNode("", true),
|
|
93
|
+
vue.createVNode(forms.Button, {
|
|
94
|
+
class: "top-editArea_button",
|
|
95
|
+
icon: _ctx.attachToKeyboard ? "" : "",
|
|
96
|
+
onClick: _cache[4] || (_cache[4] = ($event) => submit(localValue.value))
|
|
97
|
+
}, {
|
|
98
|
+
default: vue.withCtx(() => [
|
|
99
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.attachToKeyboard ? "" : _ctx.submitText), 1)
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}, 8, ["icon"])
|
|
103
|
+
])
|
|
104
|
+
], 2)
|
|
105
|
+
], 2);
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
const style0 = {
|
|
110
|
+
"top-editArea": "top-editArea",
|
|
111
|
+
"top-editArea_title": "top-editArea_title",
|
|
112
|
+
"top-editArea_form": "top-editArea_form",
|
|
113
|
+
"top-editArea_element": "top-editArea_element",
|
|
114
|
+
"top-textarea": "top-textarea",
|
|
115
|
+
"top-textarea_textarea": "top-textarea_textarea",
|
|
116
|
+
"top-editArea_footer": "top-editArea_footer",
|
|
117
|
+
"top-editArea-attachedToKeyboard": "top-editArea-attachedToKeyboard"
|
|
118
|
+
};
|
|
119
|
+
const cssModules = {
|
|
120
|
+
"$style": style0
|
|
121
|
+
};
|
|
122
|
+
const editArea = /* @__PURE__ */ forms._export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
123
|
+
exports.EditArea = editArea;
|
|
124
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
125
|
+
});
|
|
126
|
+
//# sourceMappingURL=editArea.amd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editArea.amd.js","sources":["../../src/components/editArea/editArea/editArea.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, toRef, watch, computed } from 'vue';\nimport { COLOR as BUTTON_COLOR } from '@/components/forms/button/button';\nimport Button from '@/components/forms/button/button.vue';\nimport type { Props, Emits } from './editArea';\nimport Textarea from '@/components/forms/textarea/textarea.vue';\n\n// TODO: добавить переменную top-forms-fixed-height и использовать ее при добавлении отступов у страницы\n\nconst props = withDefaults(defineProps<Props>(), {\n\tcancelText: 'Отмена',\n\tsubmitText: 'Отправить',\n\texpandable: true,\n});\n\nconst emit = defineEmits<Emits>();\n\nconst state = ref('');\n\n/**\n * Локальное значение modelValue, будет проброшено вверх только в случае отправки формы\n */\nconst localValue = ref(props.modelValue);\n\nwatch(toRef(props, 'modelValue'), () => {\n\tlocalValue.value = props.modelValue;\n});\n\nconst isChanged = computed(() => localValue.value !== props.modelValue);\n\nconst submit = (value: string) => {\n\temit('update:modelValue', value);\n};\n\nconst cancel = () => {\n\temit('cancel');\n\n\t// сброс введенного значения\n\tlocalValue.value = props.modelValue;\n};\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-editArea': true,\n\t\t\t'top-editArea-attachedToKeyboard': attachToKeyboard,\n\t\t}\"\n\t>\n\t\t<div\n\t\t\tv-if=\"title\"\n\t\t\tclass=\"top-editArea_title\"\n\t\t>\n\t\t\t{{ title }}\n\t\t</div>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-editArea_form': true,\n\t\t\t\t'top-error': isError,\n\t\t\t\t'top-focus': state == 'focus',\n\t\t\t}\"\n\t\t>\n\t\t\t<Textarea\n\t\t\t\tv-model=\"localValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:rows=\"rows\"\n\t\t\t\t:minHeight=\"minHeight\"\n\t\t\t\t:expandable=\"expandable\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:isError=\"isError\"\n\t\t\t\t:hint=\"hint\"\n\t\t\t\tclass=\"top-editArea_element\"\n\t\t\t\t@focus=\"state = 'focus'\"\n\t\t\t\t@blur=\"state = ''\"\n\t\t\t\t@keyup.esc=\"cancel\"\n\t\t\t\t@keyup.ctrl.enter=\"submit(localValue)\"\n\t\t\t/>\n\n\t\t\t<div class=\"top-editArea_footer\">\n\t\t\t\t<Button\n\t\t\t\t\tv-if=\"isChanged && (!attachToKeyboard || modelValue)\"\n\t\t\t\t\tclass=\"top-editArea_button\"\n\t\t\t\t\t:color=\"BUTTON_COLOR.Theme\"\n\t\t\t\t\t:icon=\"attachToKeyboard ? '': ''\"\n\t\t\t\t\t@click=\"cancel\"\n\t\t\t\t>\n\t\t\t\t\t{{ attachToKeyboard ? '' : cancelText }}\n\t\t\t\t</Button>\n\n\t\t\t\t<Button\n\t\t\t\t\tclass=\"top-editArea_button\"\n\t\t\t\t\t:icon=\"attachToKeyboard ? '': ''\"\n\t\t\t\t\t@click=\"submit(localValue)\"\n\t\t\t\t>\n\t\t\t\t\t{{ attachToKeyboard ? '' : submitText }}\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<style module>\n.top-editArea {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.top-editArea_title {\n\tfont-size: 12px;\n}\n\n.top-editArea_form {\n\tbackground: var(--top-forms-background-color);\n\toutline-color: var(--color-theme-75);\n\toutline-offset: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.top-editArea_form:hover {\n\tbackground: var(--top-forms-background-color-hover);\n}\n\n/* textarea в EditArea */\n.top-editArea_element.top-textarea {\n\twidth: 100%;\n}\n\n.top-editArea_element.top-textarea_textarea {\n\tborder: none;\n\toutline: none;\n\tanimation: none;\n}\n\n/* footer */\n.top-editArea_footer {\n\tpadding: var(--top-forms-padding);\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: var(--top-forms-padding);\n}\n\n/* attachedToKeyboard */\n.top-editArea-attachedToKeyboard {\n\tbackground: var(--top-forms-background-color);\n\tmargin-bottom: env(keyboard-inset-height, 0);\n\tposition: fixed;\n\tbottom: 0;\n\tright: 0;\n\tleft: 0;\n\tz-index: 2;\n\tgap: 0;\n}\n\n.top-editArea-attachedToKeyboard .top-editArea_form {\n\tborder-radius: 0;\n\tborder: none;\n\tborder-top: 1px solid var(--top-forms-border-color);\n}\n\n.top-editArea-attachedToKeyboard .top-editArea_title {\n\tborder-top: 1px solid var(--color-line-2-opacity);\n\tpadding: var(--top-forms-padding);\n}\n\n.top-editArea-attachedToKeyboard .top-editArea_footer > [data-top-icon] {\n\tborder-radius: 100%;\n}\n</style>"],"names":["ref","watch","toRef","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBM,YAAA,QAAQA,QAAI,EAAE;AAKd,YAAA,aAAaA,IAAAA,IAAI,MAAM,UAAU;AAEvCC,UAAAA,MAAMC,IAAM,MAAA,OAAO,YAAY,GAAG,MAAM;AACvC,mBAAW,QAAQ,MAAM;AAAA,MAAA,CACzB;AAED,YAAM,YAAYC,IAAAA,SAAS,MAAM,WAAW,UAAU,MAAM,UAAU;AAEhE,YAAA,SAAS,CAAC,UAAkB;AACjC,aAAK,qBAAqB,KAAK;AAAA,MAAA;AAGhC,YAAM,SAAS,MAAM;AACpB,aAAK,QAAQ;AAGb,mBAAW,QAAQ,MAAM;AAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { defineComponent, ref, watch, toRef, computed, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, createVNode, withKeys, withModifiers, createBlock, unref, withCtx, createTextVNode } from "vue";
|
|
2
|
+
import { T as Textarea, B as Button, C as COLOR, _ as _export_sfc } from "../.chunks/forms-245e3bc0.es.js";
|
|
3
|
+
const _hoisted_1 = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "top-editArea_title"
|
|
6
|
+
};
|
|
7
|
+
const _hoisted_2 = { class: "top-editArea_footer" };
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "editArea",
|
|
10
|
+
props: {
|
|
11
|
+
modelValue: {},
|
|
12
|
+
title: {},
|
|
13
|
+
cancelText: { default: "Отмена" },
|
|
14
|
+
submitText: { default: "Отправить" },
|
|
15
|
+
attachToKeyboard: { type: Boolean },
|
|
16
|
+
name: {},
|
|
17
|
+
placeholder: {},
|
|
18
|
+
rows: {},
|
|
19
|
+
minHeight: {},
|
|
20
|
+
expandable: { type: Boolean, default: true },
|
|
21
|
+
disabled: { type: Boolean },
|
|
22
|
+
readonly: { type: Boolean },
|
|
23
|
+
isError: { type: Boolean },
|
|
24
|
+
hint: {}
|
|
25
|
+
},
|
|
26
|
+
emits: ["update:modelValue", "cancel"],
|
|
27
|
+
setup(__props, { emit }) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const state = ref("");
|
|
30
|
+
const localValue = ref(props.modelValue);
|
|
31
|
+
watch(toRef(props, "modelValue"), () => {
|
|
32
|
+
localValue.value = props.modelValue;
|
|
33
|
+
});
|
|
34
|
+
const isChanged = computed(() => localValue.value !== props.modelValue);
|
|
35
|
+
const submit = (value) => {
|
|
36
|
+
emit("update:modelValue", value);
|
|
37
|
+
};
|
|
38
|
+
const cancel = () => {
|
|
39
|
+
emit("cancel");
|
|
40
|
+
localValue.value = props.modelValue;
|
|
41
|
+
};
|
|
42
|
+
return (_ctx, _cache) => {
|
|
43
|
+
return openBlock(), createElementBlock("div", {
|
|
44
|
+
class: normalizeClass({
|
|
45
|
+
"top-editArea": true,
|
|
46
|
+
"top-editArea-attachedToKeyboard": _ctx.attachToKeyboard
|
|
47
|
+
})
|
|
48
|
+
}, [
|
|
49
|
+
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
50
|
+
createElementVNode("div", {
|
|
51
|
+
class: normalizeClass({
|
|
52
|
+
"top-editArea_form": true,
|
|
53
|
+
"top-error": _ctx.isError,
|
|
54
|
+
"top-focus": state.value == "focus"
|
|
55
|
+
})
|
|
56
|
+
}, [
|
|
57
|
+
createVNode(Textarea, {
|
|
58
|
+
modelValue: localValue.value,
|
|
59
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localValue.value = $event),
|
|
60
|
+
name: _ctx.name,
|
|
61
|
+
placeholder: _ctx.placeholder,
|
|
62
|
+
rows: _ctx.rows,
|
|
63
|
+
minHeight: _ctx.minHeight,
|
|
64
|
+
expandable: _ctx.expandable,
|
|
65
|
+
disabled: _ctx.disabled,
|
|
66
|
+
readonly: _ctx.readonly,
|
|
67
|
+
isError: _ctx.isError,
|
|
68
|
+
hint: _ctx.hint,
|
|
69
|
+
class: "top-editArea_element",
|
|
70
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => state.value = "focus"),
|
|
71
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => state.value = ""),
|
|
72
|
+
onKeyup: [
|
|
73
|
+
withKeys(cancel, ["esc"]),
|
|
74
|
+
_cache[3] || (_cache[3] = withKeys(withModifiers(($event) => submit(localValue.value), ["ctrl"]), ["enter"]))
|
|
75
|
+
]
|
|
76
|
+
}, null, 8, ["modelValue", "name", "placeholder", "rows", "minHeight", "expandable", "disabled", "readonly", "isError", "hint", "onKeyup"]),
|
|
77
|
+
createElementVNode("div", _hoisted_2, [
|
|
78
|
+
isChanged.value && (!_ctx.attachToKeyboard || _ctx.modelValue) ? (openBlock(), createBlock(Button, {
|
|
79
|
+
key: 0,
|
|
80
|
+
class: "top-editArea_button",
|
|
81
|
+
color: unref(COLOR).Theme,
|
|
82
|
+
icon: _ctx.attachToKeyboard ? "" : "",
|
|
83
|
+
onClick: cancel
|
|
84
|
+
}, {
|
|
85
|
+
default: withCtx(() => [
|
|
86
|
+
createTextVNode(toDisplayString(_ctx.attachToKeyboard ? "" : _ctx.cancelText), 1)
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
}, 8, ["color", "icon"])) : createCommentVNode("", true),
|
|
90
|
+
createVNode(Button, {
|
|
91
|
+
class: "top-editArea_button",
|
|
92
|
+
icon: _ctx.attachToKeyboard ? "" : "",
|
|
93
|
+
onClick: _cache[4] || (_cache[4] = ($event) => submit(localValue.value))
|
|
94
|
+
}, {
|
|
95
|
+
default: withCtx(() => [
|
|
96
|
+
createTextVNode(toDisplayString(_ctx.attachToKeyboard ? "" : _ctx.submitText), 1)
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["icon"])
|
|
100
|
+
])
|
|
101
|
+
], 2)
|
|
102
|
+
], 2);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
const style0 = {
|
|
107
|
+
"top-editArea": "top-editArea",
|
|
108
|
+
"top-editArea_title": "top-editArea_title",
|
|
109
|
+
"top-editArea_form": "top-editArea_form",
|
|
110
|
+
"top-editArea_element": "top-editArea_element",
|
|
111
|
+
"top-textarea": "top-textarea",
|
|
112
|
+
"top-textarea_textarea": "top-textarea_textarea",
|
|
113
|
+
"top-editArea_footer": "top-editArea_footer",
|
|
114
|
+
"top-editArea-attachedToKeyboard": "top-editArea-attachedToKeyboard"
|
|
115
|
+
};
|
|
116
|
+
const cssModules = {
|
|
117
|
+
"$style": style0
|
|
118
|
+
};
|
|
119
|
+
const editArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
120
|
+
export {
|
|
121
|
+
editArea as EditArea
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=editArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editArea.js","sources":["../../src/components/editArea/editArea/editArea.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, toRef, watch, computed } from 'vue';\nimport { COLOR as BUTTON_COLOR } from '@/components/forms/button/button';\nimport Button from '@/components/forms/button/button.vue';\nimport type { Props, Emits } from './editArea';\nimport Textarea from '@/components/forms/textarea/textarea.vue';\n\n// TODO: добавить переменную top-forms-fixed-height и использовать ее при добавлении отступов у страницы\n\nconst props = withDefaults(defineProps<Props>(), {\n\tcancelText: 'Отмена',\n\tsubmitText: 'Отправить',\n\texpandable: true,\n});\n\nconst emit = defineEmits<Emits>();\n\nconst state = ref('');\n\n/**\n * Локальное значение modelValue, будет проброшено вверх только в случае отправки формы\n */\nconst localValue = ref(props.modelValue);\n\nwatch(toRef(props, 'modelValue'), () => {\n\tlocalValue.value = props.modelValue;\n});\n\nconst isChanged = computed(() => localValue.value !== props.modelValue);\n\nconst submit = (value: string) => {\n\temit('update:modelValue', value);\n};\n\nconst cancel = () => {\n\temit('cancel');\n\n\t// сброс введенного значения\n\tlocalValue.value = props.modelValue;\n};\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-editArea': true,\n\t\t\t'top-editArea-attachedToKeyboard': attachToKeyboard,\n\t\t}\"\n\t>\n\t\t<div\n\t\t\tv-if=\"title\"\n\t\t\tclass=\"top-editArea_title\"\n\t\t>\n\t\t\t{{ title }}\n\t\t</div>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-editArea_form': true,\n\t\t\t\t'top-error': isError,\n\t\t\t\t'top-focus': state == 'focus',\n\t\t\t}\"\n\t\t>\n\t\t\t<Textarea\n\t\t\t\tv-model=\"localValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:rows=\"rows\"\n\t\t\t\t:minHeight=\"minHeight\"\n\t\t\t\t:expandable=\"expandable\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:isError=\"isError\"\n\t\t\t\t:hint=\"hint\"\n\t\t\t\tclass=\"top-editArea_element\"\n\t\t\t\t@focus=\"state = 'focus'\"\n\t\t\t\t@blur=\"state = ''\"\n\t\t\t\t@keyup.esc=\"cancel\"\n\t\t\t\t@keyup.ctrl.enter=\"submit(localValue)\"\n\t\t\t/>\n\n\t\t\t<div class=\"top-editArea_footer\">\n\t\t\t\t<Button\n\t\t\t\t\tv-if=\"isChanged && (!attachToKeyboard || modelValue)\"\n\t\t\t\t\tclass=\"top-editArea_button\"\n\t\t\t\t\t:color=\"BUTTON_COLOR.Theme\"\n\t\t\t\t\t:icon=\"attachToKeyboard ? '': ''\"\n\t\t\t\t\t@click=\"cancel\"\n\t\t\t\t>\n\t\t\t\t\t{{ attachToKeyboard ? '' : cancelText }}\n\t\t\t\t</Button>\n\n\t\t\t\t<Button\n\t\t\t\t\tclass=\"top-editArea_button\"\n\t\t\t\t\t:icon=\"attachToKeyboard ? '': ''\"\n\t\t\t\t\t@click=\"submit(localValue)\"\n\t\t\t\t>\n\t\t\t\t\t{{ attachToKeyboard ? '' : submitText }}\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<style module>\n.top-editArea {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.top-editArea_title {\n\tfont-size: 12px;\n}\n\n.top-editArea_form {\n\tbackground: var(--top-forms-background-color);\n\toutline-color: var(--color-theme-75);\n\toutline-offset: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.top-editArea_form:hover {\n\tbackground: var(--top-forms-background-color-hover);\n}\n\n/* textarea в EditArea */\n.top-editArea_element.top-textarea {\n\twidth: 100%;\n}\n\n.top-editArea_element.top-textarea_textarea {\n\tborder: none;\n\toutline: none;\n\tanimation: none;\n}\n\n/* footer */\n.top-editArea_footer {\n\tpadding: var(--top-forms-padding);\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: var(--top-forms-padding);\n}\n\n/* attachedToKeyboard */\n.top-editArea-attachedToKeyboard {\n\tbackground: var(--top-forms-background-color);\n\tmargin-bottom: env(keyboard-inset-height, 0);\n\tposition: fixed;\n\tbottom: 0;\n\tright: 0;\n\tleft: 0;\n\tz-index: 2;\n\tgap: 0;\n}\n\n.top-editArea-attachedToKeyboard .top-editArea_form {\n\tborder-radius: 0;\n\tborder: none;\n\tborder-top: 1px solid var(--top-forms-border-color);\n}\n\n.top-editArea-attachedToKeyboard .top-editArea_title {\n\tborder-top: 1px solid var(--color-line-2-opacity);\n\tpadding: var(--top-forms-padding);\n}\n\n.top-editArea-attachedToKeyboard .top-editArea_footer > [data-top-icon] {\n\tborder-radius: 100%;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBM,UAAA,QAAQ,IAAI,EAAE;AAKd,UAAA,aAAa,IAAI,MAAM,UAAU;AAEvC,UAAM,MAAM,OAAO,YAAY,GAAG,MAAM;AACvC,iBAAW,QAAQ,MAAM;AAAA,IAAA,CACzB;AAED,UAAM,YAAY,SAAS,MAAM,WAAW,UAAU,MAAM,UAAU;AAEhE,UAAA,SAAS,CAAC,UAAkB;AACjC,WAAK,qBAAqB,KAAK;AAAA,IAAA;AAGhC,UAAM,SAAS,MAAM;AACpB,WAAK,QAAQ;AAGb,iBAAW,QAAQ,MAAM;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/editArea.css
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
|
|
2
|
+
.top-editArea {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 6px;
|
|
6
|
+
}
|
|
7
|
+
.top-editArea_title {
|
|
8
|
+
font-size: 12px;
|
|
9
|
+
}
|
|
10
|
+
.top-editArea_form {
|
|
11
|
+
background: var(--top-forms-background-color);
|
|
12
|
+
outline-color: var(--color-theme-75);
|
|
13
|
+
outline-offset: 0;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
.top-editArea_form:hover {
|
|
18
|
+
background: var(--top-forms-background-color-hover);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* textarea в EditArea */
|
|
22
|
+
.top-editArea_element.top-textarea {
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
.top-editArea_element.top-textarea_textarea {
|
|
26
|
+
border: none;
|
|
27
|
+
outline: none;
|
|
28
|
+
animation: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* footer */
|
|
32
|
+
.top-editArea_footer {
|
|
33
|
+
padding: var(--top-forms-padding);
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: flex-end;
|
|
36
|
+
gap: var(--top-forms-padding);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* attachedToKeyboard */
|
|
40
|
+
.top-editArea-attachedToKeyboard {
|
|
41
|
+
background: var(--top-forms-background-color);
|
|
42
|
+
margin-bottom: env(keyboard-inset-height, 0);
|
|
43
|
+
position: fixed;
|
|
44
|
+
bottom: 0;
|
|
45
|
+
right: 0;
|
|
46
|
+
left: 0;
|
|
47
|
+
z-index: 2;
|
|
48
|
+
gap: 0;
|
|
49
|
+
}
|
|
50
|
+
.top-editArea-attachedToKeyboard .top-editArea_form {
|
|
51
|
+
border-radius: 0;
|
|
52
|
+
border: none;
|
|
53
|
+
border-top: 1px solid var(--top-forms-border-color);
|
|
54
|
+
}
|
|
55
|
+
.top-editArea-attachedToKeyboard .top-editArea_title {
|
|
56
|
+
border-top: 1px solid var(--color-line-2-opacity);
|
|
57
|
+
padding: var(--top-forms-padding);
|
|
58
|
+
}
|
|
59
|
+
.top-editArea-attachedToKeyboard .top-editArea_footer > [data-top-icon] {
|
|
60
|
+
border-radius: 100%;
|
|
61
|
+
}
|
package/forms/forms.amd.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
define(["exports", "../.chunks/forms-
|
|
2
|
-
"use strict"; vue
|
|
3
|
-
exports.Button = forms.
|
|
1
|
+
define(["exports", "../.chunks/forms-f7b7b259.amd", "vue"], function(exports, forms, vue) {
|
|
2
|
+
"use strict"; if(typeof vue === "undefined") var vue = window.Vue;
|
|
3
|
+
exports.Button = forms.Button;
|
|
4
4
|
exports.Checkbox = forms.checkbox;
|
|
5
5
|
exports.ControlLabel = forms.ControlLabel;
|
|
6
|
+
exports.Hint = forms.Hint;
|
|
6
7
|
exports.Input = forms.input;
|
|
7
8
|
exports.Radio = forms.radio;
|
|
8
9
|
exports.Switcher = forms.switcher;
|
|
10
|
+
exports.Textarea = forms.Textarea;
|
|
9
11
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
10
12
|
});
|
|
11
13
|
//# sourceMappingURL=forms.amd.js.map
|
package/forms/forms.amd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.amd.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"forms.amd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
package/forms/forms.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B, c, a, H, i, r, s, T } from "../.chunks/forms-245e3bc0.es.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
B as Button,
|
|
5
5
|
c as Checkbox,
|
|
6
|
-
|
|
6
|
+
a as ControlLabel,
|
|
7
|
+
H as Hint,
|
|
7
8
|
i as Input,
|
|
8
9
|
r as Radio,
|
|
9
|
-
s as Switcher
|
|
10
|
+
s as Switcher,
|
|
11
|
+
T as Textarea
|
|
10
12
|
};
|
|
11
13
|
//# sourceMappingURL=forms.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
define(["exports", "../.chunks/forms-
|
|
2
|
-
"use strict"; vue
|
|
1
|
+
define(["exports", "../.chunks/forms-f7b7b259.amd", "vue"], function(exports, forms, vue) {
|
|
2
|
+
"use strict"; if(typeof vue === "undefined") var vue = window.Vue;
|
|
3
3
|
exports.SIZE = forms.SIZE;
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5
5
|
});
|