@sveltia/ui 0.41.3 → 0.42.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/dist/components/alert/alert.svelte +39 -31
- package/dist/components/alert/alert.svelte.d.ts +8 -0
- package/dist/components/alert/infobar.svelte +58 -46
- package/dist/components/alert/infobar.svelte.d.ts +8 -0
- package/dist/components/bottom-navigation/bottom-navigation.svelte +21 -15
- package/dist/components/button/button-group.svelte +10 -6
- package/dist/components/button/button-group.svelte.d.ts +8 -0
- package/dist/components/button/button.svelte +274 -175
- package/dist/components/button/floating-action-button-wrapper.svelte +23 -18
- package/dist/components/button/select-button-group.svelte +60 -41
- package/dist/components/button/select-button-group.svelte.d.ts +8 -0
- package/dist/components/button/split-button.svelte +25 -18
- package/dist/components/calendar/calendar.svelte +103 -80
- package/dist/components/checkbox/checkbox-group.svelte +25 -19
- package/dist/components/checkbox/checkbox-group.svelte.d.ts +8 -0
- package/dist/components/checkbox/checkbox.svelte +93 -65
- package/dist/components/checkbox/checkbox.svelte.d.ts +2 -2
- package/dist/components/dialog/dialog.svelte +105 -87
- package/dist/components/dialog/prompt-dialog.svelte +5 -3
- package/dist/components/disclosure/disclosure.svelte +34 -21
- package/dist/components/divider/divider.svelte +21 -14
- package/dist/components/divider/divider.svelte.d.ts +8 -0
- package/dist/components/divider/spacer.svelte +13 -8
- package/dist/components/drawer/drawer.svelte +343 -190
- package/dist/components/grid/grid-body.svelte +16 -14
- package/dist/components/grid/grid-cell.svelte +5 -3
- package/dist/components/grid/grid-col-header.svelte +5 -3
- package/dist/components/grid/grid-foot.svelte +5 -3
- package/dist/components/grid/grid-head.svelte +5 -3
- package/dist/components/grid/grid-row-header.svelte +6 -4
- package/dist/components/grid/grid-row.svelte +6 -4
- package/dist/components/grid/grid.svelte +21 -12
- package/dist/components/grid/grid.svelte.d.ts +8 -0
- package/dist/components/icon/icon.svelte +7 -5
- package/dist/components/listbox/listbox.svelte +81 -61
- package/dist/components/listbox/listbox.svelte.d.ts +8 -0
- package/dist/components/listbox/option-group.svelte +15 -11
- package/dist/components/listbox/option.svelte +54 -39
- package/dist/components/menu/menu-item-group.svelte +5 -3
- package/dist/components/menu/menu-item.svelte +67 -51
- package/dist/components/menu/menu.svelte +24 -17
- package/dist/components/menu/menu.svelte.d.ts +8 -0
- package/dist/components/progressbar/progressbar.svelte +27 -15
- package/dist/components/progressbar/progressbar.svelte.d.ts +8 -0
- package/dist/components/radio/radio-group.svelte +43 -31
- package/dist/components/radio/radio-group.svelte.d.ts +8 -0
- package/dist/components/radio/radio.svelte +81 -63
- package/dist/components/resizable-pane/resizable-handle.svelte +63 -48
- package/dist/components/resizable-pane/resizable-handle.svelte.d.ts +8 -0
- package/dist/components/resizable-pane/resizable-pane-group.svelte +18 -14
- package/dist/components/select/combobox.svelte +139 -113
- package/dist/components/select/select-tags.svelte +73 -57
- package/dist/components/slider/slider.svelte +94 -74
- package/dist/components/switch/switch.svelte +118 -81
- package/dist/components/switch/switch.svelte.d.ts +8 -0
- package/dist/components/table/table-body.svelte +16 -14
- package/dist/components/table/table-cell.svelte +5 -3
- package/dist/components/table/table-col-header.svelte +5 -3
- package/dist/components/table/table-foot.svelte +5 -3
- package/dist/components/table/table-head.svelte +5 -3
- package/dist/components/table/table-row-header.svelte +6 -4
- package/dist/components/table/table-row.svelte +6 -4
- package/dist/components/table/table.svelte +21 -13
- package/dist/components/table/table.svelte.d.ts +8 -0
- package/dist/components/tabs/tab-box.svelte +9 -6
- package/dist/components/tabs/tab-list.svelte +94 -73
- package/dist/components/tabs/tab-list.svelte.d.ts +8 -0
- package/dist/components/tabs/tab-panel.svelte +11 -7
- package/dist/components/tabs/tab-panels.svelte +19 -14
- package/dist/components/text-editor/code-editor.svelte +10 -7
- package/dist/components/text-editor/core.js +3 -0
- package/dist/components/text-editor/lexical-root.svelte +221 -160
- package/dist/components/text-editor/text-editor.svelte +25 -18
- package/dist/components/text-editor/toolbar/insert-link-button.svelte +2 -1
- package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte +44 -37
- package/dist/components/text-field/number-input.svelte +87 -68
- package/dist/components/text-field/password-input.svelte +52 -42
- package/dist/components/text-field/search-bar.svelte +64 -53
- package/dist/components/text-field/secret-input.svelte +61 -46
- package/dist/components/text-field/text-area.svelte +80 -68
- package/dist/components/text-field/text-input.svelte +139 -107
- package/dist/components/toast/toast.svelte +104 -89
- package/dist/components/toolbar/toolbar.svelte +73 -54
- package/dist/components/toolbar/toolbar.svelte.d.ts +8 -0
- package/dist/components/typography/truncated-text.svelte +9 -7
- package/dist/components/util/app-shell.svelte +40 -493
- package/dist/components/util/empty-state.svelte +13 -11
- package/dist/components/util/group.svelte +8 -3
- package/dist/components/util/group.svelte.d.ts +8 -0
- package/dist/components/util/modal.svelte +59 -48
- package/dist/components/util/popup.svelte +87 -67
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -4
- package/dist/locales/en.yaml +50 -3
- package/dist/locales/ja.yaml +49 -2
- package/dist/services/i18n.d.ts +6 -0
- package/dist/services/i18n.js +19 -14
- package/dist/typedefs.d.ts +5 -1
- package/dist/typedefs.js +2 -1
- package/package.json +23 -23
|
@@ -31,6 +31,10 @@ declare const TabList: import("svelte").Component<{
|
|
|
31
31
|
* The `data-name` attribute on the wrapper element.
|
|
32
32
|
*/
|
|
33
33
|
name?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The `aria-label` attribute on the wrapper element.
|
|
36
|
+
*/
|
|
37
|
+
ariaLabel?: string | undefined;
|
|
34
38
|
/**
|
|
35
39
|
* Primary slot content.
|
|
36
40
|
*/
|
|
@@ -63,6 +67,10 @@ type Props = {
|
|
|
63
67
|
* The `data-name` attribute on the wrapper element.
|
|
64
68
|
*/
|
|
65
69
|
name?: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The `aria-label` attribute on the wrapper element.
|
|
72
|
+
*/
|
|
73
|
+
ariaLabel?: string | undefined;
|
|
66
74
|
/**
|
|
67
75
|
* Primary slot content.
|
|
68
76
|
*/
|
|
@@ -31,10 +31,14 @@
|
|
|
31
31
|
{@render children?.()}
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
|
-
<style
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
<style lang="scss">
|
|
35
|
+
.tab-panel {
|
|
36
|
+
flex: auto;
|
|
37
|
+
transition: all 200ms;
|
|
38
|
+
|
|
39
|
+
&[aria-hidden='true'],
|
|
40
|
+
&:not([aria-hidden]) {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -30,17 +30,22 @@
|
|
|
30
30
|
{@render children?.()}
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
|
-
<style
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
<style lang="scss">
|
|
34
|
+
.tab-panels {
|
|
35
|
+
flex: auto;
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: var(--sui-tab-panels-gap, 16px);
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
scroll-snap-type: x mandatory;
|
|
40
|
+
|
|
41
|
+
:global {
|
|
42
|
+
& > .tab-panel {
|
|
43
|
+
flex: none;
|
|
44
|
+
display: block !important;
|
|
45
|
+
width: 100%;
|
|
46
|
+
overflow: auto;
|
|
47
|
+
scroll-snap-align: center;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
@@ -117,10 +117,13 @@
|
|
|
117
117
|
</Toast>
|
|
118
118
|
{/if}
|
|
119
119
|
|
|
120
|
-
<style
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
<style lang="scss">
|
|
121
|
+
.code-editor {
|
|
122
|
+
margin: var(--sui-focus-ring-width);
|
|
123
|
+
width: calc(100% - var(--sui-focus-ring-width) * 2);
|
|
124
|
+
|
|
125
|
+
&.flex:not([hidden]) {
|
|
126
|
+
display: block; // Avoid Tailwind .flex class collisions
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
</style>
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import 'prismjs';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
+
CodeHighlightNode,
|
|
7
|
+
CodeNode,
|
|
6
8
|
$createCodeNode as createCodeNode,
|
|
7
9
|
$isCodeHighlightNode as isCodeHighlightNode,
|
|
8
10
|
$isCodeNode as isCodeNode,
|
|
@@ -208,6 +210,7 @@ export const initEditor = ({
|
|
|
208
210
|
.filter(([button]) => enabledButtons.includes(/** @type {TextEditorNodeType} */ (button)))
|
|
209
211
|
.flatMap(([, nodes]) => nodes),
|
|
210
212
|
),
|
|
213
|
+
...(isCodeEditor ? [CodeNode, CodeHighlightNode] : []),
|
|
211
214
|
HorizontalRuleNode,
|
|
212
215
|
TableNode,
|
|
213
216
|
TableCellNode,
|
|
@@ -131,163 +131,224 @@
|
|
|
131
131
|
{hidden}
|
|
132
132
|
></div>
|
|
133
133
|
|
|
134
|
-
<style
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
:
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
:
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
:
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
:
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
134
|
+
<style lang="scss">
|
|
135
|
+
.lexical-root {
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
border: 1px solid var(--sui-textbox-border-color);
|
|
138
|
+
border-radius: var(--sui-textbox-border-radius) !important;
|
|
139
|
+
padding: var(--sui-textbox-multiline-padding);
|
|
140
|
+
min-height: 8em;
|
|
141
|
+
color: var(--sui-textbox-foreground-color);
|
|
142
|
+
background-color: var(--sui-textbox-background-color);
|
|
143
|
+
font-family: var(--sui-textbox-font-family);
|
|
144
|
+
font-size: var(--sui-textbox-font-size);
|
|
145
|
+
line-height: var(--sui-textbox-multiline-line-height);
|
|
146
|
+
|
|
147
|
+
&:not(:first-child) {
|
|
148
|
+
border-start-start-radius: 0 !important;
|
|
149
|
+
border-start-end-radius: 0 !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&.code {
|
|
153
|
+
padding: 0;
|
|
154
|
+
|
|
155
|
+
:global {
|
|
156
|
+
.code-block {
|
|
157
|
+
border-radius: 0 !important;
|
|
158
|
+
min-height: 120px;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&:focus-visible {
|
|
164
|
+
outline: 0;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&[aria-invalid='true'] {
|
|
168
|
+
border-color: var(--sui-error-border-color);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
:global {
|
|
172
|
+
// Remove the default margin on the first and last child elements of block nodes, including
|
|
173
|
+
// paragraphs, headings, lists, and code blocks, but keep the default margin on other items,
|
|
174
|
+
// including UI widgets like radio buttons, checkboxes, and select menus
|
|
175
|
+
[dir] {
|
|
176
|
+
&:first-child {
|
|
177
|
+
margin-top: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&:last-child {
|
|
181
|
+
margin-bottom: 0;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
strong.italic {
|
|
186
|
+
font-style: italic;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.strikethrough {
|
|
190
|
+
text-decoration: line-through;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
li.nested {
|
|
194
|
+
list-style-type: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.code-block {
|
|
198
|
+
position: relative;
|
|
199
|
+
display: block;
|
|
200
|
+
padding-block: 8px;
|
|
201
|
+
padding-inline-start: 56px;
|
|
202
|
+
padding-inline-end: 8px;
|
|
203
|
+
background-color: var(--sui-code-background-color);
|
|
204
|
+
overflow-x: auto;
|
|
205
|
+
white-space: pre;
|
|
206
|
+
|
|
207
|
+
&:not(:first-child) {
|
|
208
|
+
margin-top: 1em;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&:not(:last-child) {
|
|
212
|
+
margin-bottom: 1em;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&::before {
|
|
216
|
+
position: absolute;
|
|
217
|
+
inset-block: 0;
|
|
218
|
+
inset-inline-start: 0;
|
|
219
|
+
inset-inline-end: auto;
|
|
220
|
+
content: attr(data-gutter);
|
|
221
|
+
padding: 8px;
|
|
222
|
+
min-width: 40px;
|
|
223
|
+
color: var(--sui-tertiary-foreground-color);
|
|
224
|
+
background-color: var(--sui-tertiary-background-color);
|
|
225
|
+
text-align: end;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
[data-lexical-text='true'] {
|
|
230
|
+
cursor: text;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
:is(th, td) > p {
|
|
234
|
+
margin: 0;
|
|
235
|
+
white-space: normal;
|
|
236
|
+
word-break: normal;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
hr {
|
|
240
|
+
margin: var(--sui-paragraph-margin) 0;
|
|
241
|
+
border: none;
|
|
242
|
+
padding: 0;
|
|
243
|
+
|
|
244
|
+
&::after {
|
|
245
|
+
display: block;
|
|
246
|
+
height: 2px;
|
|
247
|
+
background-color: var(--sui-control-border-color);
|
|
248
|
+
line-height: 2px;
|
|
249
|
+
content: '';
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Part of the Default Prism theme
|
|
256
|
+
:root[data-theme='light'] .lexical-root {
|
|
257
|
+
:global {
|
|
258
|
+
.token:is(.comment, .prolog, .doctype, .cdata) {
|
|
259
|
+
color: slategray;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.token.punctuation {
|
|
263
|
+
color: #999;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.token.namespace {
|
|
267
|
+
opacity: 0.7;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.token:is(.property, .tag, .boolean, .number, .constant, .symbol, .deleted) {
|
|
271
|
+
color: #905;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.token:is(.selector, .attr-name, .string, .char, .builtin, .inserted) {
|
|
275
|
+
color: #690;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.token:is(.operator, .entity, .url),
|
|
279
|
+
.language-css .token.string,
|
|
280
|
+
.style .token.string {
|
|
281
|
+
color: #9a6e3a;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.token:is(.atrule, .attr-value, .keyword) {
|
|
285
|
+
color: #07a;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.token:is(.function, .class-name) {
|
|
289
|
+
color: #dd4a68;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.token:is(.regex, .important, .variable) {
|
|
293
|
+
color: #e90;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// Part of the Tomorrow Night Prism theme
|
|
299
|
+
:root[data-theme='dark'] .lexical-root {
|
|
300
|
+
:global {
|
|
301
|
+
.token:is(.comment, .block-comment, .prolog, .doctype, .cdata) {
|
|
302
|
+
color: #999;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.token.punctuation {
|
|
306
|
+
color: #ccc;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.token:is(.tag, .attr-name, .namespace, .deleted) {
|
|
310
|
+
color: #e2777a;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.token.function-name {
|
|
314
|
+
color: #6196cc;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.token:is(.boolean, .number, .function) {
|
|
318
|
+
color: #f08d49;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.token:is(.property, .class-name, .constant, .symbol) {
|
|
322
|
+
color: #f8c555;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.token:is(.selector, .important, .atrule, .keyword, .builtin) {
|
|
326
|
+
color: #cc99cd;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.token:is(.string, .char, .attr-value, .regex, .variable) {
|
|
330
|
+
color: #7ec699;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.token:is(.operator, .entity, .url) {
|
|
334
|
+
color: #67cdcc;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.token:is(.important, .bold) {
|
|
338
|
+
font-weight: bold;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.token.italic {
|
|
342
|
+
font-style: italic;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.token.entity {
|
|
346
|
+
cursor: help;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.token.inserted {
|
|
350
|
+
color: green;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
</style>
|
|
@@ -131,21 +131,28 @@
|
|
|
131
131
|
</Toast>
|
|
132
132
|
{/if}
|
|
133
133
|
|
|
134
|
-
<style
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
134
|
+
<style lang="scss">
|
|
135
|
+
.text-editor {
|
|
136
|
+
margin: var(--sui-focus-ring-width);
|
|
137
|
+
width: calc(100% - var(--sui-focus-ring-width) * 2);
|
|
138
|
+
|
|
139
|
+
&.flex:not([hidden]) {
|
|
140
|
+
display: block; // Avoid Tailwind .flex class collisions
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:global {
|
|
144
|
+
.sui.text-area {
|
|
145
|
+
margin: 0 !important;
|
|
146
|
+
width: 100% !important;
|
|
147
|
+
min-width: auto;
|
|
148
|
+
|
|
149
|
+
textarea {
|
|
150
|
+
border-start-start-radius: 0 !important;
|
|
151
|
+
border-start-end-radius: 0 !important;
|
|
152
|
+
border-end-start-radius: var(--sui-textbox-border-radius) !important;
|
|
153
|
+
border-end-end-radius: var(--sui-textbox-border-radius) !important;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
</style>
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
id="{id}-url"
|
|
221
221
|
bind:value={anchorURL}
|
|
222
222
|
flex
|
|
223
|
-
aria-label=
|
|
223
|
+
aria-label={_('_sui.text_editor.url')}
|
|
224
224
|
onkeydown={(event) => {
|
|
225
225
|
onInputKeyDown(event);
|
|
226
226
|
}}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
id="{id}-text"
|
|
235
235
|
bind:value={anchorText}
|
|
236
236
|
flex
|
|
237
|
+
aria-label={_('_sui.text_editor.text')}
|
|
237
238
|
onkeydown={(event) => {
|
|
238
239
|
onInputKeyDown(event);
|
|
239
240
|
}}
|
|
@@ -34,41 +34,48 @@
|
|
|
34
34
|
</Toolbar>
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
|
-
<style
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
37
|
+
<style lang="scss">
|
|
38
|
+
.wrapper {
|
|
39
|
+
display: contents;
|
|
40
|
+
|
|
41
|
+
:global {
|
|
42
|
+
[role='toolbar'] {
|
|
43
|
+
position: sticky;
|
|
44
|
+
top: 0;
|
|
45
|
+
z-index: 100;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-wrap: wrap;
|
|
48
|
+
gap: 4px;
|
|
49
|
+
border-width: 1px 1px 0;
|
|
50
|
+
border-style: solid;
|
|
51
|
+
border-color: var(--sui-textbox-border-color);
|
|
52
|
+
border-start-start-radius: var(--sui-textbox-border-radius);
|
|
53
|
+
border-start-end-radius: var(--sui-textbox-border-radius);
|
|
54
|
+
border-end-start-radius: 0;
|
|
55
|
+
border-end-end-radius: 0;
|
|
56
|
+
padding: 0 4px;
|
|
57
|
+
height: auto;
|
|
58
|
+
min-height: 40px;
|
|
59
|
+
background-color: var(--sui-tertiary-background-color);
|
|
60
|
+
|
|
61
|
+
@media (width < 768px) {
|
|
62
|
+
flex-wrap: wrap;
|
|
63
|
+
height: auto;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.sui.menu-button {
|
|
68
|
+
padding: 0 4px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.sui.button {
|
|
72
|
+
flex: none;
|
|
73
|
+
margin: 0 !important;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.sui.button-group {
|
|
77
|
+
gap: 4px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
63
80
|
}
|
|
64
|
-
|
|
65
|
-
.wrapper :global(.sui.menu-button) {
|
|
66
|
-
padding: 0 4px;
|
|
67
|
-
}
|
|
68
|
-
.wrapper :global(.sui.button) {
|
|
69
|
-
flex: none;
|
|
70
|
-
margin: 0 !important;
|
|
71
|
-
}
|
|
72
|
-
.wrapper :global(.sui.button-group) {
|
|
73
|
-
gap: 4px;
|
|
74
|
-
}</style>
|
|
81
|
+
</style>
|