@cgboiler/biz-basic 1.0.67 → 1.0.68
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/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/rich-text-editor/RichTextEditor.js +3 -0
- package/es/rich-text-editor/index.css +1 -1
- package/es/rich-text-editor/index.less +437 -436
- package/es/rich-text-editor/lib/utils.d.ts +123 -0
- package/es/rich-text-editor/lib/utils.js +244 -0
- package/es/rich-text-editor/menu-system/components/_atomic.css +2 -0
- package/es/rich-text-editor/menu-system/components/table-dropdown-menu.d.ts +25 -0
- package/es/rich-text-editor/menu-system/components/table-dropdown-menu.js +167 -0
- package/es/rich-text-editor/menu-system/icons/index.d.ts +13 -0
- package/es/rich-text-editor/menu-system/icons/index.js +26 -0
- package/es/rich-text-editor/menu-system/styles/animations.less +91 -91
- package/es/rich-text-editor/menu-system/styles/button-colors.less +142 -142
- package/es/rich-text-editor/menu-system/styles/button-group.less +23 -23
- package/es/rich-text-editor/menu-system/styles/button.less +322 -322
- package/es/rich-text-editor/menu-system/styles/card.less +78 -78
- package/es/rich-text-editor/menu-system/styles/color-highlight-button.less +57 -57
- package/es/rich-text-editor/menu-system/styles/color-highlight-popover.less +51 -51
- package/es/rich-text-editor/menu-system/styles/dropdown-menu.less +40 -40
- package/es/rich-text-editor/menu-system/styles/image-upload-node.less +240 -240
- package/es/rich-text-editor/menu-system/styles/input.less +53 -53
- package/es/rich-text-editor/menu-system/styles/link-popover.less +32 -32
- package/es/rich-text-editor/menu-system/styles/separator.less +26 -26
- package/es/rich-text-editor/menu-system/styles/simple-editor.less +39 -39
- package/es/rich-text-editor/menu-system/styles/toolbar.less +87 -87
- package/es/rich-text-editor/menu-system/styles/variables.less +294 -294
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +24 -24
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/rich-text-editor/RichTextEditor.js +3 -0
- package/lib/rich-text-editor/index.css +1 -1
- package/lib/rich-text-editor/index.less +437 -436
- package/lib/rich-text-editor/lib/utils.d.ts +123 -0
- package/lib/rich-text-editor/lib/utils.js +263 -0
- package/lib/rich-text-editor/menu-system/components/_atomic.css +2 -0
- package/lib/rich-text-editor/menu-system/components/table-dropdown-menu.d.ts +25 -0
- package/lib/rich-text-editor/menu-system/components/table-dropdown-menu.js +186 -0
- package/lib/rich-text-editor/menu-system/icons/index.d.ts +13 -0
- package/lib/rich-text-editor/menu-system/icons/index.js +26 -0
- package/lib/rich-text-editor/menu-system/styles/animations.less +91 -91
- package/lib/rich-text-editor/menu-system/styles/button-colors.less +142 -142
- package/lib/rich-text-editor/menu-system/styles/button-group.less +23 -23
- package/lib/rich-text-editor/menu-system/styles/button.less +322 -322
- package/lib/rich-text-editor/menu-system/styles/card.less +78 -78
- package/lib/rich-text-editor/menu-system/styles/color-highlight-button.less +57 -57
- package/lib/rich-text-editor/menu-system/styles/color-highlight-popover.less +51 -51
- package/lib/rich-text-editor/menu-system/styles/dropdown-menu.less +40 -40
- package/lib/rich-text-editor/menu-system/styles/image-upload-node.less +240 -240
- package/lib/rich-text-editor/menu-system/styles/input.less +53 -53
- package/lib/rich-text-editor/menu-system/styles/link-popover.less +32 -32
- package/lib/rich-text-editor/menu-system/styles/separator.less +26 -26
- package/lib/rich-text-editor/menu-system/styles/simple-editor.less +39 -39
- package/lib/rich-text-editor/menu-system/styles/toolbar.less +87 -87
- package/lib/rich-text-editor/menu-system/styles/variables.less +294 -294
- package/lib/vue-sfc-shim.d.ts +6 -6
- package/lib/vue-tsx-shim.d.ts +24 -24
- package/package.json +1 -1
|
@@ -1,322 +1,322 @@
|
|
|
1
|
-
@import './variables.less';
|
|
2
|
-
@import './button-colors.less';
|
|
3
|
-
|
|
4
|
-
.tiptap-button {
|
|
5
|
-
font-size: 0.875rem;
|
|
6
|
-
font-weight: 500;
|
|
7
|
-
font-feature-settings:
|
|
8
|
-
"salt" on,
|
|
9
|
-
"cv01" on;
|
|
10
|
-
line-height: 1.15;
|
|
11
|
-
height: 2rem;
|
|
12
|
-
min-width: 2rem;
|
|
13
|
-
border: none;
|
|
14
|
-
padding: 0.5rem;
|
|
15
|
-
gap: 0.25rem;
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
border-radius: var(--tt-radius-lg, 0.75rem);
|
|
20
|
-
transition-property: background, color, opacity;
|
|
21
|
-
transition-duration: var(--tt-transition-duration-default);
|
|
22
|
-
transition-timing-function: var(--tt-transition-easing-default);
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
|
|
25
|
-
// focus-visible
|
|
26
|
-
&:focus-visible {
|
|
27
|
-
outline: none;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&[data-highlighted="true"],
|
|
31
|
-
&[data-focus-visible="true"] {
|
|
32
|
-
background-color: var(--tt-button-hover-bg-color);
|
|
33
|
-
color: var(--tt-button-hover-text-color);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&[data-weight="small"] {
|
|
37
|
-
width: 1.5rem;
|
|
38
|
-
min-width: 1.5rem;
|
|
39
|
-
padding-right: 0;
|
|
40
|
-
padding-left: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/* button size large */
|
|
44
|
-
&[data-size="large"] {
|
|
45
|
-
font-size: 0.9375rem;
|
|
46
|
-
height: 2.375rem;
|
|
47
|
-
min-width: 2.375rem;
|
|
48
|
-
padding: 0.625rem;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* button size small */
|
|
52
|
-
&[data-size="small"] {
|
|
53
|
-
font-size: 0.75rem;
|
|
54
|
-
line-height: 1.2;
|
|
55
|
-
height: 1.5rem;
|
|
56
|
-
min-width: 1.5rem;
|
|
57
|
-
padding: 0.3125rem;
|
|
58
|
-
border-radius: var(--tt-radius-md, 0.5rem);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* trim / expand text of the button */
|
|
62
|
-
.tiptap-button-text {
|
|
63
|
-
padding: 0 0.125rem;
|
|
64
|
-
flex-grow: 1;
|
|
65
|
-
text-align: left;
|
|
66
|
-
line-height: 1.5rem;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&[data-text-trim="on"] {
|
|
70
|
-
.tiptap-button-text {
|
|
71
|
-
text-overflow: ellipsis;
|
|
72
|
-
overflow: hidden;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* global icon settings */
|
|
77
|
-
.tiptap-button-icon,
|
|
78
|
-
.tiptap-button-icon-sub,
|
|
79
|
-
.tiptap-button-dropdown-arrows,
|
|
80
|
-
.tiptap-button-dropdown-small {
|
|
81
|
-
flex-shrink: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* standard icon, what is used */
|
|
85
|
-
.tiptap-button-icon {
|
|
86
|
-
width: 1rem;
|
|
87
|
-
height: 1rem;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&[data-size="large"] .tiptap-button-icon {
|
|
91
|
-
width: 1.125rem;
|
|
92
|
-
height: 1.125rem;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&[data-size="small"] .tiptap-button-icon {
|
|
96
|
-
width: 0.875rem;
|
|
97
|
-
height: 0.875rem;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* if 2 icons are used and this icon should be more subtle */
|
|
101
|
-
.tiptap-button-icon-sub {
|
|
102
|
-
width: 1rem;
|
|
103
|
-
height: 1rem;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&[data-size="large"] .tiptap-button-icon-sub {
|
|
107
|
-
width: 1.125rem;
|
|
108
|
-
height: 1.125rem;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&[data-size="small"] .tiptap-button-icon-sub {
|
|
112
|
-
width: 0.875rem;
|
|
113
|
-
height: 0.875rem;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/* dropdown menus or arrows that are slightly smaller */
|
|
117
|
-
.tiptap-button-dropdown-arrows {
|
|
118
|
-
width: 0.75rem;
|
|
119
|
-
height: 0.75rem;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&[data-size="large"] .tiptap-button-dropdown-arrows {
|
|
123
|
-
width: 0.875rem;
|
|
124
|
-
height: 0.875rem;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&[data-size="small"] .tiptap-button-dropdown-arrows {
|
|
128
|
-
width: 0.625rem;
|
|
129
|
-
height: 0.625rem;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/* dropdown menu for icon buttons only */
|
|
133
|
-
.tiptap-button-dropdown-small {
|
|
134
|
-
width: 0.625rem;
|
|
135
|
-
height: 0.625rem;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&[data-size="large"] .tiptap-button-dropdown-small {
|
|
139
|
-
width: 0.75rem;
|
|
140
|
-
height: 0.75rem;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&[data-size="small"] .tiptap-button-dropdown-small {
|
|
144
|
-
width: 0.5rem;
|
|
145
|
-
height: 0.5rem;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/* button only has icons */
|
|
149
|
-
&:has(> svg):not(:has(> :not(svg))) {
|
|
150
|
-
gap: 0.125rem;
|
|
151
|
-
|
|
152
|
-
&[data-size="large"],
|
|
153
|
-
&[data-size="small"] {
|
|
154
|
-
gap: 0.125rem;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/* button only has 2 icons and one of them is dropdown small */
|
|
159
|
-
&:has(> svg:nth-of-type(2)):has(> .tiptap-button-dropdown-small):not(
|
|
160
|
-
:has(> svg:nth-of-type(3))
|
|
161
|
-
):not(:has(> .tiptap-button-text)) {
|
|
162
|
-
gap: 0;
|
|
163
|
-
padding-right: 0.25rem;
|
|
164
|
-
|
|
165
|
-
&[data-size="large"] {
|
|
166
|
-
padding-right: 0.375rem;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
&[data-size="small"] {
|
|
170
|
-
padding-right: 0.25rem;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/* Emoji is used in a button */
|
|
175
|
-
.tiptap-button-emoji {
|
|
176
|
-
width: 1rem;
|
|
177
|
-
display: flex;
|
|
178
|
-
justify-content: center;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
&[data-size="large"] .tiptap-button-emoji {
|
|
182
|
-
width: 1.125rem;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&[data-size="small"] .tiptap-button-emoji {
|
|
186
|
-
width: 0.875rem;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/* --------------------------------------------
|
|
191
|
-
----------- BUTTON COLOR SETTINGS -------------
|
|
192
|
-
-------------------------------------------- */
|
|
193
|
-
|
|
194
|
-
.tiptap-button {
|
|
195
|
-
background-color: var(--tt-button-default-bg-color);
|
|
196
|
-
color: var(--tt-button-default-text-color);
|
|
197
|
-
|
|
198
|
-
.tiptap-button-icon {
|
|
199
|
-
color: var(--tt-button-default-icon-color);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.tiptap-button-icon-sub {
|
|
203
|
-
color: var(--tt-button-default-icon-sub-color);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.tiptap-button-dropdown-arrows {
|
|
207
|
-
color: var(--tt-button-default-dropdown-arrows-color);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.tiptap-button-dropdown-small {
|
|
211
|
-
color: var(--tt-button-default-dropdown-arrows-color);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/* hover state of a button */
|
|
215
|
-
&:hover:not([data-active-item="true"]),
|
|
216
|
-
&[data-active-item="true"],
|
|
217
|
-
&[data-highlighted]:not([data-highlighted="false"]) {
|
|
218
|
-
&:not(:disabled):not([data-disabled="true"]) {
|
|
219
|
-
background-color: var(--tt-button-hover-bg-color);
|
|
220
|
-
color: var(--tt-button-hover-text-color);
|
|
221
|
-
|
|
222
|
-
.tiptap-button-icon {
|
|
223
|
-
color: var(--tt-button-hover-icon-color);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.tiptap-button-icon-sub {
|
|
227
|
-
color: var(--tt-button-hover-icon-sub-color);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.tiptap-button-dropdown-arrows,
|
|
231
|
-
.tiptap-button-dropdown-small {
|
|
232
|
-
color: var(--tt-button-hover-dropdown-arrows-color);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/* Active state of a button */
|
|
238
|
-
&[data-active-state="on"],
|
|
239
|
-
&[data-state="open"] {
|
|
240
|
-
&:not(:disabled):not([data-disabled="true"]) {
|
|
241
|
-
background-color: var(--tt-button-active-bg-color);
|
|
242
|
-
color: var(--tt-button-active-text-color);
|
|
243
|
-
|
|
244
|
-
.tiptap-button-icon {
|
|
245
|
-
color: var(--tt-button-active-icon-color);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.tiptap-button-icon-sub {
|
|
249
|
-
color: var(--tt-button-active-icon-sub-color);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.tiptap-button-dropdown-arrows,
|
|
253
|
-
.tiptap-button-dropdown-small {
|
|
254
|
-
color: var(--tt-button-active-dropdown-arrows-color);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
&:hover {
|
|
258
|
-
background-color: var(--tt-button-active-hover-bg-color);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/* Emphasized */
|
|
262
|
-
&[data-appearance="emphasized"] {
|
|
263
|
-
background-color: var(--tt-button-active-bg-color-emphasized);
|
|
264
|
-
color: var(--tt-button-active-text-color-emphasized);
|
|
265
|
-
|
|
266
|
-
.tiptap-button-icon {
|
|
267
|
-
color: var(--tt-button-active-icon-color-emphasized);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.tiptap-button-icon-sub {
|
|
271
|
-
color: var(--tt-button-active-icon-sub-color-emphasized);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.tiptap-button-dropdown-arrows,
|
|
275
|
-
.tiptap-button-dropdown-small {
|
|
276
|
-
color: var(--tt-button-active-dropdown-arrows-color-emphasized);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
&:hover {
|
|
280
|
-
background-color: var(--tt-button-active-hover-bg-color-emphasized);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/* Subdued */
|
|
285
|
-
&[data-appearance="subdued"] {
|
|
286
|
-
background-color: var(--tt-button-active-bg-color-subdued);
|
|
287
|
-
color: var(--tt-button-active-text-color-subdued);
|
|
288
|
-
|
|
289
|
-
.tiptap-button-icon {
|
|
290
|
-
color: var(--tt-button-active-icon-color-subdued);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.tiptap-button-icon-sub {
|
|
294
|
-
color: var(--tt-button-active-icon-sub-color-subdued);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.tiptap-button-dropdown-arrows,
|
|
298
|
-
.tiptap-button-dropdown-small {
|
|
299
|
-
color: var(--tt-button-active-dropdown-arrows-color-subdued);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
&:hover {
|
|
303
|
-
background-color: var(--tt-button-active-hover-bg-color-subdued);
|
|
304
|
-
|
|
305
|
-
.tiptap-button-icon {
|
|
306
|
-
color: var(--tt-button-active-icon-color-subdued);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
&:disabled, &[data-disabled="true"] {
|
|
314
|
-
background-color: var(--tt-button-disabled-bg-color);
|
|
315
|
-
color: var(--tt-button-disabled-text-color);
|
|
316
|
-
cursor: default;
|
|
317
|
-
|
|
318
|
-
.tiptap-button-icon {
|
|
319
|
-
color: var(--tt-button-disabled-icon-color);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
@import './button-colors.less';
|
|
3
|
+
|
|
4
|
+
.tiptap-button {
|
|
5
|
+
font-size: 0.875rem;
|
|
6
|
+
font-weight: 500;
|
|
7
|
+
font-feature-settings:
|
|
8
|
+
"salt" on,
|
|
9
|
+
"cv01" on;
|
|
10
|
+
line-height: 1.15;
|
|
11
|
+
height: 2rem;
|
|
12
|
+
min-width: 2rem;
|
|
13
|
+
border: none;
|
|
14
|
+
padding: 0.5rem;
|
|
15
|
+
gap: 0.25rem;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
border-radius: var(--tt-radius-lg, 0.75rem);
|
|
20
|
+
transition-property: background, color, opacity;
|
|
21
|
+
transition-duration: var(--tt-transition-duration-default);
|
|
22
|
+
transition-timing-function: var(--tt-transition-easing-default);
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
|
|
25
|
+
// focus-visible
|
|
26
|
+
&:focus-visible {
|
|
27
|
+
outline: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&[data-highlighted="true"],
|
|
31
|
+
&[data-focus-visible="true"] {
|
|
32
|
+
background-color: var(--tt-button-hover-bg-color);
|
|
33
|
+
color: var(--tt-button-hover-text-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&[data-weight="small"] {
|
|
37
|
+
width: 1.5rem;
|
|
38
|
+
min-width: 1.5rem;
|
|
39
|
+
padding-right: 0;
|
|
40
|
+
padding-left: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* button size large */
|
|
44
|
+
&[data-size="large"] {
|
|
45
|
+
font-size: 0.9375rem;
|
|
46
|
+
height: 2.375rem;
|
|
47
|
+
min-width: 2.375rem;
|
|
48
|
+
padding: 0.625rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* button size small */
|
|
52
|
+
&[data-size="small"] {
|
|
53
|
+
font-size: 0.75rem;
|
|
54
|
+
line-height: 1.2;
|
|
55
|
+
height: 1.5rem;
|
|
56
|
+
min-width: 1.5rem;
|
|
57
|
+
padding: 0.3125rem;
|
|
58
|
+
border-radius: var(--tt-radius-md, 0.5rem);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* trim / expand text of the button */
|
|
62
|
+
.tiptap-button-text {
|
|
63
|
+
padding: 0 0.125rem;
|
|
64
|
+
flex-grow: 1;
|
|
65
|
+
text-align: left;
|
|
66
|
+
line-height: 1.5rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&[data-text-trim="on"] {
|
|
70
|
+
.tiptap-button-text {
|
|
71
|
+
text-overflow: ellipsis;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* global icon settings */
|
|
77
|
+
.tiptap-button-icon,
|
|
78
|
+
.tiptap-button-icon-sub,
|
|
79
|
+
.tiptap-button-dropdown-arrows,
|
|
80
|
+
.tiptap-button-dropdown-small {
|
|
81
|
+
flex-shrink: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* standard icon, what is used */
|
|
85
|
+
.tiptap-button-icon {
|
|
86
|
+
width: 1rem;
|
|
87
|
+
height: 1rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&[data-size="large"] .tiptap-button-icon {
|
|
91
|
+
width: 1.125rem;
|
|
92
|
+
height: 1.125rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&[data-size="small"] .tiptap-button-icon {
|
|
96
|
+
width: 0.875rem;
|
|
97
|
+
height: 0.875rem;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* if 2 icons are used and this icon should be more subtle */
|
|
101
|
+
.tiptap-button-icon-sub {
|
|
102
|
+
width: 1rem;
|
|
103
|
+
height: 1rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&[data-size="large"] .tiptap-button-icon-sub {
|
|
107
|
+
width: 1.125rem;
|
|
108
|
+
height: 1.125rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&[data-size="small"] .tiptap-button-icon-sub {
|
|
112
|
+
width: 0.875rem;
|
|
113
|
+
height: 0.875rem;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* dropdown menus or arrows that are slightly smaller */
|
|
117
|
+
.tiptap-button-dropdown-arrows {
|
|
118
|
+
width: 0.75rem;
|
|
119
|
+
height: 0.75rem;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&[data-size="large"] .tiptap-button-dropdown-arrows {
|
|
123
|
+
width: 0.875rem;
|
|
124
|
+
height: 0.875rem;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&[data-size="small"] .tiptap-button-dropdown-arrows {
|
|
128
|
+
width: 0.625rem;
|
|
129
|
+
height: 0.625rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* dropdown menu for icon buttons only */
|
|
133
|
+
.tiptap-button-dropdown-small {
|
|
134
|
+
width: 0.625rem;
|
|
135
|
+
height: 0.625rem;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-size="large"] .tiptap-button-dropdown-small {
|
|
139
|
+
width: 0.75rem;
|
|
140
|
+
height: 0.75rem;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&[data-size="small"] .tiptap-button-dropdown-small {
|
|
144
|
+
width: 0.5rem;
|
|
145
|
+
height: 0.5rem;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* button only has icons */
|
|
149
|
+
&:has(> svg):not(:has(> :not(svg))) {
|
|
150
|
+
gap: 0.125rem;
|
|
151
|
+
|
|
152
|
+
&[data-size="large"],
|
|
153
|
+
&[data-size="small"] {
|
|
154
|
+
gap: 0.125rem;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* button only has 2 icons and one of them is dropdown small */
|
|
159
|
+
&:has(> svg:nth-of-type(2)):has(> .tiptap-button-dropdown-small):not(
|
|
160
|
+
:has(> svg:nth-of-type(3))
|
|
161
|
+
):not(:has(> .tiptap-button-text)) {
|
|
162
|
+
gap: 0;
|
|
163
|
+
padding-right: 0.25rem;
|
|
164
|
+
|
|
165
|
+
&[data-size="large"] {
|
|
166
|
+
padding-right: 0.375rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&[data-size="small"] {
|
|
170
|
+
padding-right: 0.25rem;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Emoji is used in a button */
|
|
175
|
+
.tiptap-button-emoji {
|
|
176
|
+
width: 1rem;
|
|
177
|
+
display: flex;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&[data-size="large"] .tiptap-button-emoji {
|
|
182
|
+
width: 1.125rem;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&[data-size="small"] .tiptap-button-emoji {
|
|
186
|
+
width: 0.875rem;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* --------------------------------------------
|
|
191
|
+
----------- BUTTON COLOR SETTINGS -------------
|
|
192
|
+
-------------------------------------------- */
|
|
193
|
+
|
|
194
|
+
.tiptap-button {
|
|
195
|
+
background-color: var(--tt-button-default-bg-color);
|
|
196
|
+
color: var(--tt-button-default-text-color);
|
|
197
|
+
|
|
198
|
+
.tiptap-button-icon {
|
|
199
|
+
color: var(--tt-button-default-icon-color);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.tiptap-button-icon-sub {
|
|
203
|
+
color: var(--tt-button-default-icon-sub-color);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.tiptap-button-dropdown-arrows {
|
|
207
|
+
color: var(--tt-button-default-dropdown-arrows-color);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.tiptap-button-dropdown-small {
|
|
211
|
+
color: var(--tt-button-default-dropdown-arrows-color);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* hover state of a button */
|
|
215
|
+
&:hover:not([data-active-item="true"]),
|
|
216
|
+
&[data-active-item="true"],
|
|
217
|
+
&[data-highlighted]:not([data-highlighted="false"]) {
|
|
218
|
+
&:not(:disabled):not([data-disabled="true"]) {
|
|
219
|
+
background-color: var(--tt-button-hover-bg-color);
|
|
220
|
+
color: var(--tt-button-hover-text-color);
|
|
221
|
+
|
|
222
|
+
.tiptap-button-icon {
|
|
223
|
+
color: var(--tt-button-hover-icon-color);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.tiptap-button-icon-sub {
|
|
227
|
+
color: var(--tt-button-hover-icon-sub-color);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.tiptap-button-dropdown-arrows,
|
|
231
|
+
.tiptap-button-dropdown-small {
|
|
232
|
+
color: var(--tt-button-hover-dropdown-arrows-color);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Active state of a button */
|
|
238
|
+
&[data-active-state="on"],
|
|
239
|
+
&[data-state="open"] {
|
|
240
|
+
&:not(:disabled):not([data-disabled="true"]) {
|
|
241
|
+
background-color: var(--tt-button-active-bg-color);
|
|
242
|
+
color: var(--tt-button-active-text-color);
|
|
243
|
+
|
|
244
|
+
.tiptap-button-icon {
|
|
245
|
+
color: var(--tt-button-active-icon-color);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.tiptap-button-icon-sub {
|
|
249
|
+
color: var(--tt-button-active-icon-sub-color);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.tiptap-button-dropdown-arrows,
|
|
253
|
+
.tiptap-button-dropdown-small {
|
|
254
|
+
color: var(--tt-button-active-dropdown-arrows-color);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&:hover {
|
|
258
|
+
background-color: var(--tt-button-active-hover-bg-color);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* Emphasized */
|
|
262
|
+
&[data-appearance="emphasized"] {
|
|
263
|
+
background-color: var(--tt-button-active-bg-color-emphasized);
|
|
264
|
+
color: var(--tt-button-active-text-color-emphasized);
|
|
265
|
+
|
|
266
|
+
.tiptap-button-icon {
|
|
267
|
+
color: var(--tt-button-active-icon-color-emphasized);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.tiptap-button-icon-sub {
|
|
271
|
+
color: var(--tt-button-active-icon-sub-color-emphasized);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.tiptap-button-dropdown-arrows,
|
|
275
|
+
.tiptap-button-dropdown-small {
|
|
276
|
+
color: var(--tt-button-active-dropdown-arrows-color-emphasized);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&:hover {
|
|
280
|
+
background-color: var(--tt-button-active-hover-bg-color-emphasized);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* Subdued */
|
|
285
|
+
&[data-appearance="subdued"] {
|
|
286
|
+
background-color: var(--tt-button-active-bg-color-subdued);
|
|
287
|
+
color: var(--tt-button-active-text-color-subdued);
|
|
288
|
+
|
|
289
|
+
.tiptap-button-icon {
|
|
290
|
+
color: var(--tt-button-active-icon-color-subdued);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.tiptap-button-icon-sub {
|
|
294
|
+
color: var(--tt-button-active-icon-sub-color-subdued);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.tiptap-button-dropdown-arrows,
|
|
298
|
+
.tiptap-button-dropdown-small {
|
|
299
|
+
color: var(--tt-button-active-dropdown-arrows-color-subdued);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
&:hover {
|
|
303
|
+
background-color: var(--tt-button-active-hover-bg-color-subdued);
|
|
304
|
+
|
|
305
|
+
.tiptap-button-icon {
|
|
306
|
+
color: var(--tt-button-active-icon-color-subdued);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&:disabled, &[data-disabled="true"] {
|
|
314
|
+
background-color: var(--tt-button-disabled-bg-color);
|
|
315
|
+
color: var(--tt-button-disabled-text-color);
|
|
316
|
+
cursor: default;
|
|
317
|
+
|
|
318
|
+
.tiptap-button-icon {
|
|
319
|
+
color: var(--tt-button-disabled-icon-color);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|