@sveltia/ui 0.45.0 → 0.47.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.
@@ -39,18 +39,25 @@ import {
39
39
  registerRichText,
40
40
  } from '@lexical/rich-text';
41
41
  import { TableCellNode, TableNode, TableRowNode } from '@lexical/table';
42
- import { $getNearestNodeOfType as getNearestNodeOfType } from '@lexical/utils';
42
+ import { $getNearestNodeOfType as getNearestNodeOfType, objectKlassEquals } from '@lexical/utils';
43
43
  import { sleep } from '@sveltia/utils/misc';
44
+ import { isURL } from '@sveltia/utils/string';
44
45
  import {
46
+ COMMAND_PRIORITY_LOW,
45
47
  COMMAND_PRIORITY_NORMAL,
46
48
  createEditor,
49
+ $createTextNode as createTextNode,
47
50
  ElementNode,
48
51
  $getRoot as getRoot,
49
52
  $getSelection as getSelection,
50
53
  INDENT_CONTENT_COMMAND,
51
54
  INSERT_PARAGRAPH_COMMAND,
55
+ $insertNodes as insertNodes,
56
+ $isElementNode as isElementNode,
52
57
  $isRangeSelection as isRangeSelection,
58
+ $isTextNode as isTextNode,
53
59
  OUTDENT_CONTENT_COMMAND,
60
+ PASTE_COMMAND,
54
61
  } from 'lexical';
55
62
  import prismComponents from 'prismjs/components';
56
63
  import {
@@ -269,6 +276,7 @@ export const initEditor = ({
269
276
  );
270
277
  }
271
278
 
279
+ // https://github.com/facebook/lexical/blob/main/packages/lexical-link/src/LexicalLinkExtension.ts
272
280
  if (enabledButtons.includes('link')) {
273
281
  addUnregister(
274
282
  editor.registerCommand(
@@ -281,6 +289,47 @@ export const initEditor = ({
281
289
  COMMAND_PRIORITY_NORMAL,
282
290
  ),
283
291
  );
292
+
293
+ addUnregister(
294
+ editor.registerCommand(
295
+ PASTE_COMMAND,
296
+ (event) => {
297
+ const selection = getSelection();
298
+
299
+ if (
300
+ !isRangeSelection(selection) ||
301
+ !objectKlassEquals(event, ClipboardEvent) ||
302
+ !event.clipboardData ||
303
+ /** @type {HTMLElement} */ (event.target).matches('input, textarea')
304
+ ) {
305
+ return false;
306
+ }
307
+
308
+ const clipboardText = event.clipboardData.getData('text').trim();
309
+
310
+ if (!isURL(clipboardText)) {
311
+ return false;
312
+ }
313
+
314
+ if (selection.isCollapsed()) {
315
+ insertNodes([createTextNode(clipboardText)]);
316
+ }
317
+
318
+ if (
319
+ !selection
320
+ .getNodes()
321
+ .some((node) => isElementNode(node) || (isTextNode(node) && !node.isSimpleText()))
322
+ ) {
323
+ editor.dispatchCommand(TOGGLE_LINK_COMMAND, clipboardText);
324
+ event.preventDefault();
325
+ return true;
326
+ }
327
+
328
+ return false;
329
+ },
330
+ COMMAND_PRIORITY_LOW,
331
+ ),
332
+ );
284
333
  }
285
334
 
286
335
  if (enabledButtons.includes('bulleted-list')) {
@@ -136,7 +136,7 @@
136
136
  border: 1px solid var(--sui-textbox-border-color);
137
137
  border-radius: var(--sui-textbox-border-radius) !important;
138
138
  padding: var(--sui-textbox-multiline-padding);
139
- min-height: 8em;
139
+ min-height: 120px;
140
140
  color: var(--sui-textbox-foreground-color);
141
141
  background-color: var(--sui-textbox-background-color);
142
142
  font-family: var(--sui-textbox-font-family);
@@ -138,14 +138,7 @@
138
138
  if (!hasAnchor) {
139
139
  anchorText = anchorText.trim();
140
140
  anchorText ||= anchorURL;
141
-
142
- const { anchor, focus } = /** @type {RangeSelection} */ (_selection);
143
- const node = createTextNode(anchorText);
144
- const key = node.getKey();
145
-
146
- insertNodes([node]);
147
- anchor.set(key, anchorText.length, 'text');
148
- focus.set(key, 0, 'text');
141
+ insertNodes([createTextNode(anchorText)]);
149
142
  }
150
143
 
151
144
  setSelection(_selection);
@@ -6,6 +6,7 @@
6
6
  -->
7
7
  <script>
8
8
  import { onMount } from 'svelte';
9
+ import FontLinks from './font-links.svelte';
9
10
 
10
11
  /**
11
12
  * @import { Snippet } from 'svelte';
@@ -28,14 +29,6 @@
28
29
  /* eslint-enable prefer-const */
29
30
  } = $props();
30
31
 
31
- const stylesheets = [
32
- // https://fonts.google.com/share?selection.family=Merriweather+Sans:ital,wght@0,300..800;1,300..800|Noto+Sans+Mono:wght@100..900
33
- 'https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Noto+Sans+Mono:wght@100..900&display=swap',
34
- // https://fonts.google.com/icons?icon.set=Material+Symbols
35
- // Use `font-display: block;` @see https://stackoverflow.com/q/41710834
36
- 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block',
37
- ];
38
-
39
32
  let fontLoaded = $state(false);
40
33
 
41
34
  onMount(() => {
@@ -80,12 +73,7 @@
80
73
  ].join(', ')}
81
74
  />
82
75
  <meta name="google" content="notranslate" />
83
- <link rel="preconnect" href="https://fonts.googleapis.com" />
84
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous" />
85
- {#each stylesheets as href (href)}
86
- <link rel="preload" {href} as="style" />
87
- <link rel="stylesheet" {href} />
88
- {/each}
76
+ <FontLinks />
89
77
  </svelte:head>
90
78
 
91
79
  {#if !fontLoaded}
@@ -200,21 +188,21 @@
200
188
  );
201
189
  --sui-popup-shadow-color: hsl(var(--sui-shadow-color) / 40%);
202
190
  --sui-popup-backdrop-color: hsl(var(--sui-shadow-color) / 40%);
203
- --sui-font-family-default: "Merriweather Sans", sans-serif;
204
- --sui-font-size-xxx-large: 24px;
205
- --sui-font-size-xx-large: 20px;
206
- --sui-font-size-x-large: 18px;
207
- --sui-font-size-large: 16px;
208
- --sui-font-size-default: 14px;
209
- --sui-font-size-small: 12px;
210
- --sui-font-size-x-small: 10px;
211
- --sui-font-weight-normal: 300;
212
- --sui-font-weight-bold: 600;
213
- --sui-font-family-monospace: "Noto Sans Mono", monospace;
191
+ --sui-font-family-default: "Source Sans 3", system-ui, sans-serif;
192
+ --sui-font-size-xxx-large: 26px;
193
+ --sui-font-size-xx-large: 22px;
194
+ --sui-font-size-x-large: 20px;
195
+ --sui-font-size-large: 18px;
196
+ --sui-font-size-default: 16px;
197
+ --sui-font-size-small: 14px;
198
+ --sui-font-size-x-small: 12px;
199
+ --sui-font-weight-normal: 400;
200
+ --sui-font-weight-bold: 700;
201
+ --sui-font-family-monospace: "Noto Sans Mono", ui-monospace, monospace;
214
202
  --sui-font-size-monospace: 0.95em;
215
- --sui-line-height-default: 1.25;
216
- --sui-line-height-compact: 1.5;
217
- --sui-line-height-comfortable: 1.75;
203
+ --sui-line-height-default: 1.2;
204
+ --sui-line-height-compact: 1.4;
205
+ --sui-line-height-comfortable: 1.6;
218
206
  --sui-word-spacing-normal: 1px;
219
207
  --sui-heading-margin: 0;
220
208
  --sui-heading-font-family: var(--sui-font-family-default);
@@ -489,42 +477,42 @@
489
477
  }
490
478
  :global(h1) {
491
479
  margin: var(--sui-h1-margin, var(--sui-heading-margin));
492
- font-size: var(--sui-h1-font-size, 32px);
480
+ font-size: var(--sui-h1-font-size, 34px);
493
481
  font-family: var(--sui-h1-font-family, var(--sui-heading-font-family));
494
482
  font-weight: var(--sui-h1-font-weight, var(--sui-heading-font-weight));
495
483
  line-height: var(--sui-h1-line-height, var(--sui-heading-line-height));
496
484
  }
497
485
  :global(h2) {
498
486
  margin: var(--sui-h2-margin, var(--sui-heading-margin));
499
- font-size: var(--sui-h2-font-size, 28px);
487
+ font-size: var(--sui-h2-font-size, 30px);
500
488
  font-family: var(--sui-h2-font-family, var(--sui-heading-font-family));
501
489
  font-weight: var(--sui-h2-font-weight, var(--sui-heading-font-weight));
502
490
  line-height: var(--sui-h2-line-height, var(--sui-heading-line-height));
503
491
  }
504
492
  :global(h3) {
505
493
  margin: var(--sui-h3-margin, var(--sui-heading-margin));
506
- font-size: var(--sui-h3-font-size, 24px);
494
+ font-size: var(--sui-h3-font-size, 26px);
507
495
  font-family: var(--sui-h3-font-family, var(--sui-heading-font-family));
508
496
  font-weight: var(--sui-h3-font-weight, var(--sui-heading-font-weight));
509
497
  line-height: var(--sui-h3-line-height, var(--sui-heading-line-height));
510
498
  }
511
499
  :global(h4) {
512
500
  margin: var(--sui-h4-margin, var(--sui-heading-margin));
513
- font-size: var(--sui-h4-font-size, 20px);
501
+ font-size: var(--sui-h4-font-size, 22px);
514
502
  font-family: var(--sui-h4-font-family, var(--sui-heading-font-family));
515
503
  font-weight: var(--sui-h4-font-weight, var(--sui-heading-font-weight));
516
504
  line-height: var(--sui-h4-line-height, var(--sui-heading-line-height));
517
505
  }
518
506
  :global(h5) {
519
507
  margin: var(--sui-h5-margin, var(--sui-heading-margin));
520
- font-size: var(--sui-h5-font-size, 16px);
508
+ font-size: var(--sui-h5-font-size, 18px);
521
509
  font-family: var(--sui-h5-font-family, var(--sui-heading-font-family));
522
510
  font-weight: var(--sui-h5-font-weight, var(--sui-heading-font-weight));
523
511
  line-height: var(--sui-h5-line-height, var(--sui-heading-line-height));
524
512
  }
525
513
  :global(h6) {
526
514
  margin: var(--sui-h6-margin, var(--sui-heading-margin));
527
- font-size: var(--sui-h6-font-size, 12px);
515
+ font-size: var(--sui-h6-font-size, 14px);
528
516
  font-family: var(--sui-h6-font-family, var(--sui-heading-font-family));
529
517
  font-weight: var(--sui-h6-font-weight, var(--sui-heading-font-weight));
530
518
  line-height: var(--sui-h6-line-height, var(--sui-heading-line-height));
@@ -613,6 +601,9 @@
613
601
  font-size: var(--sui-font-size-default);
614
602
  font-weight: var(--sui-font-weight-normal, normal);
615
603
  word-spacing: var(--sui-word-spacing-normal);
604
+ font-size-adjust: 0.5;
605
+ -webkit-font-smoothing: antialiased;
606
+ -moz-osx-font-smoothing: grayscale;
616
607
  -webkit-user-select: none;
617
608
  user-select: none;
618
609
  touch-action: none;
@@ -0,0 +1,56 @@
1
+ <link rel="preconnect" href="https://cdn.jsdelivr.net/" />
2
+
3
+ <style>
4
+ /* https://fontsource.org/fonts/source-sans-3/cdn */
5
+ @font-face {
6
+ font-family: 'Source Sans 3';
7
+ font-style: normal;
8
+ font-display: swap;
9
+ font-weight: 200 900;
10
+ src: url(https://cdn.jsdelivr.net/fontsource/fonts/source-sans-3:vf@5.3.0/latin-wght-normal.woff2)
11
+ format('woff2-variations');
12
+ unicode-range:
13
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
14
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
15
+ }
16
+
17
+ /* https://fontsource.org/fonts/noto-mono/cdn */
18
+ @font-face {
19
+ font-family: 'Noto Mono';
20
+ font-style: normal;
21
+ font-display: swap;
22
+ font-weight: 400;
23
+ src: url(https://cdn.jsdelivr.net/fontsource/fonts/noto-mono@5.3.0/latin-400-normal.woff2)
24
+ format('woff2');
25
+ }
26
+
27
+ /* https://fontsource.org/fonts/material-symbols-outlined/cdn */
28
+ @font-face {
29
+ font-family: 'Material Symbols Outlined';
30
+ font-style: normal;
31
+ font-display: block;
32
+ font-weight: 400;
33
+ src: url(https://cdn.jsdelivr.net/fontsource/fonts/material-symbols-outlined:vf@5.3.1/latin-wght-normal.woff2)
34
+ format('woff2-variations');
35
+ unicode-range:
36
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
37
+ U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
38
+ }
39
+
40
+ :global(.material-symbols-outlined) {
41
+ /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
42
+ font-family: 'Material Symbols Outlined';
43
+ font-weight: normal;
44
+ font-style: normal;
45
+ font-size: 24px;
46
+ line-height: 1;
47
+ letter-spacing: normal;
48
+ text-transform: none;
49
+ display: inline-block;
50
+ white-space: nowrap;
51
+ overflow-wrap: normal;
52
+ direction: ltr;
53
+ -moz-font-feature-settings: 'liga';
54
+ font-feature-settings: 'liga';
55
+ }
56
+ </style>
@@ -0,0 +1,26 @@
1
+ export default FontLinks;
2
+ type FontLinks = SvelteComponent<{
3
+ [x: string]: never;
4
+ }, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const FontLinks: $$__sveltets_2_IsomorphicComponent<{
10
+ [x: string]: never;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}, {}, string>;
14
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
15
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
16
+ $$bindings?: Bindings;
17
+ } & Exports;
18
+ (internal: unknown, props: {
19
+ $$events?: Events;
20
+ $$slots?: Slots;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
25
+ z_$$bindings?: Bindings;
26
+ }
@@ -0,0 +1,113 @@
1
+ # Dialog action button labels
2
+ ok: ΟΚ
3
+ cancel: Άκυρο
4
+ close: Κλείσιμο
5
+
6
+ # Button to clear content, e.g. search input or calendar date
7
+ clear: Έκκαθάριση
8
+
9
+ # Text editor dialog buttons for link/image insertion
10
+ insert: Εισαγωγή
11
+ update: Ενημέρωση
12
+ remove: Κατάργηση
13
+
14
+ # Combobox dropdown toggle button aria-labels
15
+ collapse: Σύμπτυξη
16
+ expand: Ανάπτυξη
17
+
18
+ # Infobar/toast dismiss button label
19
+ dismiss: Παράβλεψη
20
+
21
+ # Calendar component
22
+ calendar:
23
+ # View switcher group aria-labels and navigation button aria-labels
24
+ year: Έτος
25
+ previous_decade: Προηγούμενη δεκαετία
26
+ next_decade: Επόμενη δεκαετία
27
+ month: Μήνας
28
+ previous_month: Προηγούμενος μήνας
29
+ next_month: Επόμενος μήνας
30
+ # “Today” button label in footer
31
+ today: Σήμερα
32
+
33
+ # Split button component
34
+ split_button:
35
+ # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
+ x_options: 'Επιλογές για {$name}'
37
+ # Dropdown toggle aria-label
38
+ more_options: Περισσότερες επιλογές
39
+
40
+ # Combobox component
41
+ combobox:
42
+ # Placeholder when no option is selected
43
+ select_an_option: Επιλέξτε μία επιλογή…
44
+ # Filter input aria-label
45
+ filter_options: Φιλτράρισμα επιλογών
46
+ # Empty state message when filter has no matches
47
+ no_matching_options: Δεν βρέθηκαν επιλογές που να ταιριάζουν
48
+
49
+ # Number input component
50
+ number_input:
51
+ # Spin button aria-labels for incrementing/decrementing the number value
52
+ increase: Αύξηση
53
+ decrease: Μείωση
54
+
55
+ # Password input component
56
+ password_input:
57
+ # Visibility toggle button aria-labels
58
+ show_password: Εμφάνιση κωδικού πρόσβασης
59
+ hide_password: Απόκρυψη κωδικού πρόσβασης
60
+
61
+ # Secret input component (API keys, tokens, etc.)
62
+ secret_input:
63
+ # Visibility toggle button aria-labels
64
+ show_secret: Εμφάνιση μυστικού
65
+ hide_secret: Απόκρυψη μυστικού
66
+
67
+ # Select tags component (multi-select)
68
+ select_tags:
69
+ # Listbox aria-label
70
+ selected_options: Επιλεγμένες επιλογές
71
+ # Remove button aria-label, e.g. “Remove Option 1”
72
+ remove_x: 'Κατάργηση {$name}'
73
+
74
+ # Text editor component
75
+ text_editor:
76
+ # Toolbar aria-labels
77
+ text_editor: Επεξεργαστής κειμένου
78
+ code_editor: Επεξεργαστής κώδικα
79
+ # Block style menu button and menu aria-labels
80
+ text_style_options: Επιλογές μορφοποίησης κειμένου
81
+ show_text_style_options: Εμφάνιση επιλογών μορφοποίησης κειμένου
82
+ # Block style menu items
83
+ paragraph: Παράγραφος
84
+ heading_1: Επικεφαλίδα 1
85
+ heading_2: Επικεφαλίδα 2
86
+ heading_3: Επικεφαλίδα 3
87
+ heading_4: Επικεφαλίδα 4
88
+ heading_5: Επικεφαλίδα 5
89
+ heading_6: Επικεφαλίδα 6
90
+ bulleted_list: Λίστα με κουκίδες
91
+ numbered_list: Αριθμημένη λίστα
92
+ blockquote: Παράθεση
93
+ code_block: Μπλόκ κώδικα
94
+ # Inline style button aria-labels
95
+ bold: Έντονα
96
+ italic: Πλάγια
97
+ strikethrough: Διακριτή διαγραφή
98
+ code: Κώδικας
99
+ link: Σύνδεσμος
100
+ # Link dialog title
101
+ insert_link: Εισαγωγή συνδέσμου
102
+ update_link: Ενημέρωση συνδέσμου
103
+ # Link dialog input field labels
104
+ text: Κείμενο
105
+ url: URL
106
+ # Markdown mode toggle button aria-label
107
+ edit_in_markdown: Επεξεργασία σε Markdown
108
+ # Error message when rich text conversion fails
109
+ converter_error: Δεν ήταν δυνατή η ενεργοποίηση της λειτουργίας εμπλουτισμένου κειμένου. Παρακαλούμε χρησιμοποιήστε τον επεξεργαστή απλού κειμένου.
110
+ # Language selector aria-label
111
+ language: Γλώσσα
112
+ # Plain text mode option in language selector
113
+ plain_text: Απλό κείμενο
@@ -33,7 +33,7 @@ calendar:
33
33
  # Split button component
34
34
  split_button:
35
35
  # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
- x_options: "{$name} Options"
36
+ x_options: '{$name} Options'
37
37
  # Dropdown toggle aria-label
38
38
  more_options: More Options
39
39
 
@@ -69,7 +69,7 @@ select_tags:
69
69
  # Listbox aria-label
70
70
  selected_options: Selected Options
71
71
  # Remove button aria-label, e.g. “Remove Option 1”
72
- remove_x: "Remove {$name}"
72
+ remove_x: 'Remove {$name}'
73
73
 
74
74
  # Text editor component
75
75
  text_editor:
@@ -33,7 +33,7 @@ calendar:
33
33
  # Split button component
34
34
  split_button:
35
35
  # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
- x_options: "{$name} Options"
36
+ x_options: '{$name} Options'
37
37
  # Dropdown toggle aria-label
38
38
  more_options: More Options
39
39
 
@@ -69,7 +69,7 @@ select_tags:
69
69
  # Listbox aria-label
70
70
  selected_options: Selected Options
71
71
  # Remove button aria-label, e.g. “Remove Option 1”
72
- remove_x: "Remove {$name}"
72
+ remove_x: 'Remove {$name}'
73
73
 
74
74
  # Text editor component
75
75
  text_editor:
@@ -33,7 +33,7 @@ calendar:
33
33
  # Split button component
34
34
  split_button:
35
35
  # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
- x_options: "{$name} Options"
36
+ x_options: '{$name} Options'
37
37
  # Dropdown toggle aria-label
38
38
  more_options: More Options
39
39
 
@@ -69,7 +69,7 @@ select_tags:
69
69
  # Listbox aria-label
70
70
  selected_options: Selected Options
71
71
  # Remove button aria-label, e.g. “Remove Option 1”
72
- remove_x: "Remove {$name}"
72
+ remove_x: 'Remove {$name}'
73
73
 
74
74
  # Text editor component
75
75
  text_editor:
@@ -33,7 +33,7 @@ calendar:
33
33
  # Split button component
34
34
  split_button:
35
35
  # Wrapper aria-label, e.g. "Save Options" when primary button is "Save"
36
- x_options: "{$name} オプション"
36
+ x_options: '{$name} オプション'
37
37
  # Dropdown toggle aria-label
38
38
  more_options: その他のオプション
39
39
 
@@ -69,7 +69,7 @@ select_tags:
69
69
  # Listbox aria-label
70
70
  selected_options: 選択済みのオプション
71
71
  # Remove button aria-label, e.g. "Remove Option 1"
72
- remove_x: "{$name} を削除"
72
+ remove_x: '{$name} を削除'
73
73
 
74
74
  # Text editor component
75
75
  text_editor:
@@ -0,0 +1,113 @@
1
+ # Dialog action button labels
2
+ ok: OK
3
+ cancel: Отмена
4
+ close: Закрыть
5
+
6
+ # Button to clear content, e.g. search input or calendar date
7
+ clear: Очистить
8
+
9
+ # Text editor dialog buttons for link/image insertion
10
+ insert: Вставить
11
+ update: Обновить
12
+ remove: Удалить
13
+
14
+ # Combobox dropdown toggle button aria-labels
15
+ collapse: Свернуть
16
+ expand: Развернуть
17
+
18
+ # Infobar/toast dismiss button label
19
+ dismiss: Отклонить
20
+
21
+ # Calendar component
22
+ calendar:
23
+ # View switcher group aria-labels and navigation button aria-labels
24
+ year: Год
25
+ previous_decade: Предыдущее десятилетие
26
+ next_decade: Следующее десятилетие
27
+ month: Месяц
28
+ previous_month: Предыдущий месяц
29
+ next_month: Следующий месяц
30
+ # “Today” button label in footer
31
+ today: Сегодня
32
+
33
+ # Split button component
34
+ split_button:
35
+ # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
+ x_options: Параметры «{$name}»
37
+ # Dropdown toggle aria-label
38
+ more_options: Другие параметры
39
+
40
+ # Combobox component
41
+ combobox:
42
+ # Placeholder when no option is selected
43
+ select_an_option: Выберите вариант…
44
+ # Filter input aria-label
45
+ filter_options: Фильтровать варианты
46
+ # Empty state message when filter has no matches
47
+ no_matching_options: Подходящих вариантов не найдено
48
+
49
+ # Number input component
50
+ number_input:
51
+ # Spin button aria-labels for incrementing/decrementing the number value
52
+ increase: Увеличить
53
+ decrease: Уменьшить
54
+
55
+ # Password input component
56
+ password_input:
57
+ # Visibility toggle button aria-labels
58
+ show_password: Показать пароль
59
+ hide_password: Скрыть пароль
60
+
61
+ # Secret input component (API keys, tokens, etc.)
62
+ secret_input:
63
+ # Visibility toggle button aria-labels
64
+ show_secret: Показать секрет
65
+ hide_secret: Скрыть секрет
66
+
67
+ # Select tags component (multi-select)
68
+ select_tags:
69
+ # Listbox aria-label
70
+ selected_options: Выбранные варианты
71
+ # Remove button aria-label, e.g. “Remove Option 1”
72
+ remove_x: Удалить «{$name}»
73
+
74
+ # Text editor component
75
+ text_editor:
76
+ # Toolbar aria-labels
77
+ text_editor: Текстовый редактор
78
+ code_editor: Редактор кода
79
+ # Block style menu button and menu aria-labels
80
+ text_style_options: Параметры стиля текста
81
+ show_text_style_options: Показать параметры стиля текста
82
+ # Block style menu items
83
+ paragraph: Абзац
84
+ heading_1: Заголовок 1
85
+ heading_2: Заголовок 2
86
+ heading_3: Заголовок 3
87
+ heading_4: Заголовок 4
88
+ heading_5: Заголовок 5
89
+ heading_6: Заголовок 6
90
+ bulleted_list: Маркированный список
91
+ numbered_list: Нумерованный список
92
+ blockquote: Цитата
93
+ code_block: Блок кода
94
+ # Inline style button aria-labels
95
+ bold: Полужирный
96
+ italic: Курсив
97
+ strikethrough: Зачёркнутый
98
+ code: Код
99
+ link: Ссылка
100
+ # Link dialog title
101
+ insert_link: Вставить ссылку
102
+ update_link: Обновить ссылку
103
+ # Link dialog input field labels
104
+ text: Текст
105
+ url: URL
106
+ # Markdown mode toggle button aria-label
107
+ edit_in_markdown: Редактировать в Markdown
108
+ # Error message when rich text conversion fails
109
+ converter_error: Не удалось включить режим форматированного текста. Вместо этого используйте редактор обычного текста.
110
+ # Language selector aria-label
111
+ language: Язык
112
+ # Plain text mode option in language selector
113
+ plain_text: Обычный текст
@@ -0,0 +1,113 @@
1
+ # Dialog action button labels
2
+ ok: OK
3
+ cancel: Скасувати
4
+ close: Закрити
5
+
6
+ # Button to clear content, e.g. search input or calendar date
7
+ clear: Очистити
8
+
9
+ # Text editor dialog buttons for link/image insertion
10
+ insert: Вставити
11
+ update: Оновити
12
+ remove: Видалити
13
+
14
+ # Combobox dropdown toggle button aria-labels
15
+ collapse: Згорнути
16
+ expand: Розгорнути
17
+
18
+ # Infobar/toast dismiss button label
19
+ dismiss: Відхилити
20
+
21
+ # Calendar component
22
+ calendar:
23
+ # View switcher group aria-labels and navigation button aria-labels
24
+ year: Рік
25
+ previous_decade: Попереднє десятиліття
26
+ next_decade: Наступне десятиліття
27
+ month: Місяць
28
+ previous_month: Попередній місяць
29
+ next_month: Наступний місяць
30
+ # “Today” button label in footer
31
+ today: Сьогодні
32
+
33
+ # Split button component
34
+ split_button:
35
+ # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
+ x_options: Параметри «{$name}»
37
+ # Dropdown toggle aria-label
38
+ more_options: Інші параметри
39
+
40
+ # Combobox component
41
+ combobox:
42
+ # Placeholder when no option is selected
43
+ select_an_option: Виберіть варіант…
44
+ # Filter input aria-label
45
+ filter_options: Фільтрувати варіанти
46
+ # Empty state message when filter has no matches
47
+ no_matching_options: Відповідних варіантів не знайдено
48
+
49
+ # Number input component
50
+ number_input:
51
+ # Spin button aria-labels for incrementing/decrementing the number value
52
+ increase: Збільшити
53
+ decrease: Зменшити
54
+
55
+ # Password input component
56
+ password_input:
57
+ # Visibility toggle button aria-labels
58
+ show_password: Показати пароль
59
+ hide_password: Сховати пароль
60
+
61
+ # Secret input component (API keys, tokens, etc.)
62
+ secret_input:
63
+ # Visibility toggle button aria-labels
64
+ show_secret: Показати секрет
65
+ hide_secret: Сховати секрет
66
+
67
+ # Select tags component (multi-select)
68
+ select_tags:
69
+ # Listbox aria-label
70
+ selected_options: Вибрані варіанти
71
+ # Remove button aria-label, e.g. “Remove Option 1”
72
+ remove_x: Видалити «{$name}»
73
+
74
+ # Text editor component
75
+ text_editor:
76
+ # Toolbar aria-labels
77
+ text_editor: Текстовий редактор
78
+ code_editor: Редактор коду
79
+ # Block style menu button and menu aria-labels
80
+ text_style_options: Параметри стилю тексту
81
+ show_text_style_options: Показати параметри стилю тексту
82
+ # Block style menu items
83
+ paragraph: Абзац
84
+ heading_1: Заголовок 1
85
+ heading_2: Заголовок 2
86
+ heading_3: Заголовок 3
87
+ heading_4: Заголовок 4
88
+ heading_5: Заголовок 5
89
+ heading_6: Заголовок 6
90
+ bulleted_list: Маркований список
91
+ numbered_list: Нумерований список
92
+ blockquote: Цитата
93
+ code_block: Блок коду
94
+ # Inline style button aria-labels
95
+ bold: Жирний
96
+ italic: Курсив
97
+ strikethrough: Закреслений
98
+ code: Код
99
+ link: Посилання
100
+ # Link dialog title
101
+ insert_link: Вставити посилання
102
+ update_link: Оновити посилання
103
+ # Link dialog input field labels
104
+ text: Текст
105
+ url: URL
106
+ # Markdown mode toggle button aria-label
107
+ edit_in_markdown: Редагувати в Markdown
108
+ # Error message when rich text conversion fails
109
+ converter_error: Не вдалося ввімкнути режим форматованого тексту. Натомість скористайтеся редактором звичайного тексту.
110
+ # Language selector aria-label
111
+ language: Мова
112
+ # Plain text mode option in language selector
113
+ plain_text: Звичайний текст
@@ -50,7 +50,7 @@
50
50
 
51
51
  h1 {
52
52
  margin: var(--sui-h1-margin, var(--sui-heading-margin));
53
- font-size: var(--sui-h1-font-size, 32px);
53
+ font-size: var(--sui-h1-font-size, 34px);
54
54
  font-family: var(--sui-h1-font-family, var(--sui-heading-font-family));
55
55
  font-weight: var(--sui-h1-font-weight, var(--sui-heading-font-weight));
56
56
  line-height: var(--sui-h1-line-height, var(--sui-heading-line-height));
@@ -58,7 +58,7 @@
58
58
 
59
59
  h2 {
60
60
  margin: var(--sui-h2-margin, var(--sui-heading-margin));
61
- font-size: var(--sui-h2-font-size, 28px);
61
+ font-size: var(--sui-h2-font-size, 30px);
62
62
  font-family: var(--sui-h2-font-family, var(--sui-heading-font-family));
63
63
  font-weight: var(--sui-h2-font-weight, var(--sui-heading-font-weight));
64
64
  line-height: var(--sui-h2-line-height, var(--sui-heading-line-height));
@@ -66,7 +66,7 @@
66
66
 
67
67
  h3 {
68
68
  margin: var(--sui-h3-margin, var(--sui-heading-margin));
69
- font-size: var(--sui-h3-font-size, 24px);
69
+ font-size: var(--sui-h3-font-size, 26px);
70
70
  font-family: var(--sui-h3-font-family, var(--sui-heading-font-family));
71
71
  font-weight: var(--sui-h3-font-weight, var(--sui-heading-font-weight));
72
72
  line-height: var(--sui-h3-line-height, var(--sui-heading-line-height));
@@ -74,7 +74,7 @@
74
74
 
75
75
  h4 {
76
76
  margin: var(--sui-h4-margin, var(--sui-heading-margin));
77
- font-size: var(--sui-h4-font-size, 20px);
77
+ font-size: var(--sui-h4-font-size, 22px);
78
78
  font-family: var(--sui-h4-font-family, var(--sui-heading-font-family));
79
79
  font-weight: var(--sui-h4-font-weight, var(--sui-heading-font-weight));
80
80
  line-height: var(--sui-h4-line-height, var(--sui-heading-line-height));
@@ -82,7 +82,7 @@
82
82
 
83
83
  h5 {
84
84
  margin: var(--sui-h5-margin, var(--sui-heading-margin));
85
- font-size: var(--sui-h5-font-size, 16px);
85
+ font-size: var(--sui-h5-font-size, 18px);
86
86
  font-family: var(--sui-h5-font-family, var(--sui-heading-font-family));
87
87
  font-weight: var(--sui-h5-font-weight, var(--sui-heading-font-weight));
88
88
  line-height: var(--sui-h5-line-height, var(--sui-heading-line-height));
@@ -90,7 +90,7 @@
90
90
 
91
91
  h6 {
92
92
  margin: var(--sui-h6-margin, var(--sui-heading-margin));
93
- font-size: var(--sui-h6-font-size, 12px);
93
+ font-size: var(--sui-h6-font-size, 14px);
94
94
  font-family: var(--sui-h6-font-family, var(--sui-heading-font-family));
95
95
  font-weight: var(--sui-h6-font-weight, var(--sui-heading-font-weight));
96
96
  line-height: var(--sui-h6-line-height, var(--sui-heading-line-height));
@@ -154,21 +154,21 @@
154
154
  --sui-popup-shadow-color: hsl(var(--sui-shadow-color) / 40%);
155
155
  --sui-popup-backdrop-color: hsl(var(--sui-shadow-color) / 40%);
156
156
  // Text
157
- --sui-font-family-default: "Merriweather Sans", sans-serif;
158
- --sui-font-size-xxx-large: 24px;
159
- --sui-font-size-xx-large: 20px;
160
- --sui-font-size-x-large: 18px;
161
- --sui-font-size-large: 16px;
162
- --sui-font-size-default: 14px;
163
- --sui-font-size-small: 12px;
164
- --sui-font-size-x-small: 10px;
165
- --sui-font-weight-normal: 300; // Merriweather Sans is a little bit bold, so we need to adjust the weight
166
- --sui-font-weight-bold: 600; // ditto
167
- --sui-font-family-monospace: "Noto Sans Mono", monospace;
157
+ --sui-font-family-default: "Source Sans 3", system-ui, sans-serif;
158
+ --sui-font-size-xxx-large: 26px;
159
+ --sui-font-size-xx-large: 22px;
160
+ --sui-font-size-x-large: 20px;
161
+ --sui-font-size-large: 18px;
162
+ --sui-font-size-default: 16px;
163
+ --sui-font-size-small: 14px;
164
+ --sui-font-size-x-small: 12px;
165
+ --sui-font-weight-normal: 400;
166
+ --sui-font-weight-bold: 700;
167
+ --sui-font-family-monospace: "Noto Sans Mono", ui-monospace, monospace;
168
168
  --sui-font-size-monospace: 0.95em;
169
- --sui-line-height-default: 1.25;
170
- --sui-line-height-compact: 1.5;
171
- --sui-line-height-comfortable: 1.75;
169
+ --sui-line-height-default: 1.2;
170
+ --sui-line-height-compact: 1.4;
171
+ --sui-line-height-comfortable: 1.6;
172
172
  --sui-word-spacing-normal: 1px;
173
173
  --sui-heading-margin: 0;
174
174
  --sui-heading-font-family: var(--sui-font-family-default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/ui",
3
- "version": "0.45.0",
3
+ "version": "0.47.0",
4
4
  "description": "A collection of Svelte components and utilities for building user interfaces.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,7 +46,7 @@
46
46
  "@lexical/table": "^0.48.0",
47
47
  "@lexical/utils": "^0.48.0",
48
48
  "@sveltia/i18n": "^1.1.3",
49
- "@sveltia/utils": "^0.10.7",
49
+ "@sveltia/utils": "^0.11.0",
50
50
  "lexical": "^0.48.0",
51
51
  "prismjs": "^1.30.0"
52
52
  },
@@ -62,21 +62,21 @@
62
62
  "eslint-config-airbnb-extended": "^3.1.1",
63
63
  "eslint-config-prettier": "^10.1.8",
64
64
  "eslint-plugin-import": "^2.32.0",
65
- "eslint-plugin-jsdoc": "^63.2.0",
66
- "eslint-plugin-package-json": "^1.6.0",
65
+ "eslint-plugin-jsdoc": "^63.3.0",
66
+ "eslint-plugin-package-json": "^1.6.2",
67
67
  "eslint-plugin-svelte": "^3.22.0",
68
68
  "globals": "^17.7.0",
69
69
  "happy-dom": "^20.11.1",
70
70
  "oxlint": "^1.75.0",
71
- "postcss": "^8.5.22",
71
+ "postcss": "^8.5.23",
72
72
  "postcss-html": "^1.8.1",
73
73
  "prettier": "^3.9.6",
74
74
  "prettier-plugin-svelte": "^4.1.1",
75
- "sass": "^1.101.6",
75
+ "sass": "^1.102.0",
76
76
  "stylelint": "^17.14.1",
77
77
  "stylelint-config-recommended-scss": "^17.0.1",
78
78
  "stylelint-scss": "^7.2.0",
79
- "svelte": "^5.56.7",
79
+ "svelte": "^5.56.8",
80
80
  "svelte-check": "^4.7.3",
81
81
  "svelte-preprocess": "^6.0.5",
82
82
  "tslib": "^2.8.1",