@sveltia/ui 0.46.0 → 0.48.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.
@@ -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);
@@ -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;
214
- --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;
191
+ --sui-font-family-default: "Source Sans 3", system-ui, sans-serif;
192
+ --sui-font-size-xxx-large: 25px;
193
+ --sui-font-size-xx-large: 21px;
194
+ --sui-font-size-x-large: 19px;
195
+ --sui-font-size-large: 17px;
196
+ --sui-font-size-default: 15px;
197
+ --sui-font-size-small: 13px;
198
+ --sui-font-size-x-small: 11px;
199
+ --sui-font-weight-normal: 400;
200
+ --sui-font-weight-bold: 700;
201
+ --sui-font-family-monospace: "Noto Sans Mono", ui-monospace, monospace;
202
+ --sui-font-size-monospace: 0.9em;
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);
@@ -464,6 +452,7 @@
464
452
  border-width: 0;
465
453
  border-style: solid;
466
454
  vertical-align: top;
455
+ font-size-adjust: inherit;
467
456
  }
468
457
  @media (prefers-reduced-motion) {
469
458
  :global(*),
@@ -489,42 +478,42 @@
489
478
  }
490
479
  :global(h1) {
491
480
  margin: var(--sui-h1-margin, var(--sui-heading-margin));
492
- font-size: var(--sui-h1-font-size, 32px);
481
+ font-size: var(--sui-h1-font-size, 34px);
493
482
  font-family: var(--sui-h1-font-family, var(--sui-heading-font-family));
494
483
  font-weight: var(--sui-h1-font-weight, var(--sui-heading-font-weight));
495
484
  line-height: var(--sui-h1-line-height, var(--sui-heading-line-height));
496
485
  }
497
486
  :global(h2) {
498
487
  margin: var(--sui-h2-margin, var(--sui-heading-margin));
499
- font-size: var(--sui-h2-font-size, 28px);
488
+ font-size: var(--sui-h2-font-size, 30px);
500
489
  font-family: var(--sui-h2-font-family, var(--sui-heading-font-family));
501
490
  font-weight: var(--sui-h2-font-weight, var(--sui-heading-font-weight));
502
491
  line-height: var(--sui-h2-line-height, var(--sui-heading-line-height));
503
492
  }
504
493
  :global(h3) {
505
494
  margin: var(--sui-h3-margin, var(--sui-heading-margin));
506
- font-size: var(--sui-h3-font-size, 24px);
495
+ font-size: var(--sui-h3-font-size, 26px);
507
496
  font-family: var(--sui-h3-font-family, var(--sui-heading-font-family));
508
497
  font-weight: var(--sui-h3-font-weight, var(--sui-heading-font-weight));
509
498
  line-height: var(--sui-h3-line-height, var(--sui-heading-line-height));
510
499
  }
511
500
  :global(h4) {
512
501
  margin: var(--sui-h4-margin, var(--sui-heading-margin));
513
- font-size: var(--sui-h4-font-size, 20px);
502
+ font-size: var(--sui-h4-font-size, 22px);
514
503
  font-family: var(--sui-h4-font-family, var(--sui-heading-font-family));
515
504
  font-weight: var(--sui-h4-font-weight, var(--sui-heading-font-weight));
516
505
  line-height: var(--sui-h4-line-height, var(--sui-heading-line-height));
517
506
  }
518
507
  :global(h5) {
519
508
  margin: var(--sui-h5-margin, var(--sui-heading-margin));
520
- font-size: var(--sui-h5-font-size, 16px);
509
+ font-size: var(--sui-h5-font-size, 18px);
521
510
  font-family: var(--sui-h5-font-family, var(--sui-heading-font-family));
522
511
  font-weight: var(--sui-h5-font-weight, var(--sui-heading-font-weight));
523
512
  line-height: var(--sui-h5-line-height, var(--sui-heading-line-height));
524
513
  }
525
514
  :global(h6) {
526
515
  margin: var(--sui-h6-margin, var(--sui-heading-margin));
527
- font-size: var(--sui-h6-font-size, 12px);
516
+ font-size: var(--sui-h6-font-size, 14px);
528
517
  font-family: var(--sui-h6-font-family, var(--sui-heading-font-family));
529
518
  font-weight: var(--sui-h6-font-weight, var(--sui-heading-font-weight));
530
519
  line-height: var(--sui-h6-line-height, var(--sui-heading-line-height));
@@ -613,6 +602,8 @@
613
602
  font-size: var(--sui-font-size-default);
614
603
  font-weight: var(--sui-font-weight-normal, normal);
615
604
  word-spacing: var(--sui-word-spacing-normal);
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,57 @@
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
+ size-adjust: 110%;
16
+ }
17
+
18
+ /* https://fontsource.org/fonts/noto-mono/cdn */
19
+ @font-face {
20
+ font-family: 'Noto Mono';
21
+ font-style: normal;
22
+ font-display: swap;
23
+ font-weight: 400;
24
+ src: url(https://cdn.jsdelivr.net/fontsource/fonts/noto-mono@5.3.0/latin-400-normal.woff2)
25
+ format('woff2');
26
+ }
27
+
28
+ /* https://fontsource.org/fonts/material-symbols-outlined/cdn */
29
+ @font-face {
30
+ font-family: 'Material Symbols Outlined';
31
+ font-style: normal;
32
+ font-display: block;
33
+ font-weight: 400;
34
+ src: url(https://cdn.jsdelivr.net/fontsource/fonts/material-symbols-outlined:vf@5.3.1/latin-wght-normal.woff2)
35
+ format('woff2-variations');
36
+ unicode-range:
37
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
38
+ U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
39
+ }
40
+
41
+ :global(.material-symbols-outlined) {
42
+ /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
43
+ font-family: 'Material Symbols Outlined';
44
+ font-weight: normal;
45
+ font-style: normal;
46
+ font-size: 24px;
47
+ line-height: 1;
48
+ letter-spacing: normal;
49
+ text-transform: none;
50
+ display: inline-block;
51
+ white-space: nowrap;
52
+ overflow-wrap: normal;
53
+ direction: ltr;
54
+ -moz-font-feature-settings: 'liga';
55
+ font-feature-settings: 'liga';
56
+ }
57
+ </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: OK
3
+ cancel: Cancelar
4
+ close: Fechar
5
+
6
+ # Button to clear content, e.g. search input or calendar date
7
+ clear: Limpar
8
+
9
+ # Text editor dialog buttons for link/image insertion
10
+ insert: Inserir
11
+ update: Atualizar
12
+ remove: Remover
13
+
14
+ # Combobox dropdown toggle button aria-labels
15
+ collapse: Recolher
16
+ expand: Expandir
17
+
18
+ # Infobar/toast dismiss button label
19
+ dismiss: Dispensar
20
+
21
+ # Calendar component
22
+ calendar:
23
+ # View switcher group aria-labels and navigation button aria-labels
24
+ year: Ano
25
+ previous_decade: Década anterior
26
+ next_decade: Próxima década
27
+ month: Mês
28
+ previous_month: Mês anterior
29
+ next_month: Próximo mês
30
+ # “Today” button label in footer
31
+ today: Hoje
32
+
33
+ # Split button component
34
+ split_button:
35
+ # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
+ x_options: 'Opções de {$name}'
37
+ # Dropdown toggle aria-label
38
+ more_options: Mais opções
39
+
40
+ # Combobox component
41
+ combobox:
42
+ # Placeholder when no option is selected
43
+ select_an_option: Selecione uma opção…
44
+ # Filter input aria-label
45
+ filter_options: Filtrar opções
46
+ # Empty state message when filter has no matches
47
+ no_matching_options: Nenhuma opção correspondente encontrada
48
+
49
+ # Number input component
50
+ number_input:
51
+ # Spin button aria-labels for incrementing/decrementing the number value
52
+ increase: Aumentar
53
+ decrease: Diminuir
54
+
55
+ # Password input component
56
+ password_input:
57
+ # Visibility toggle button aria-labels
58
+ show_password: Mostrar senha
59
+ hide_password: Ocultar senha
60
+
61
+ # Secret input component (API keys, tokens, etc.)
62
+ secret_input:
63
+ # Visibility toggle button aria-labels
64
+ show_secret: Mostrar segredo
65
+ hide_secret: Ocultar segredo
66
+
67
+ # Select tags component (multi-select)
68
+ select_tags:
69
+ # Listbox aria-label
70
+ selected_options: Opções selecionadas
71
+ # Remove button aria-label, e.g. “Remove Option 1”
72
+ remove_x: 'Remover {$name}'
73
+
74
+ # Text editor component
75
+ text_editor:
76
+ # Toolbar aria-labels
77
+ text_editor: Editor de texto
78
+ code_editor: Editor de código
79
+ # Block style menu button and menu aria-labels
80
+ text_style_options: Opções de estilo de texto
81
+ show_text_style_options: Mostrar opções de estilo de texto
82
+ # Block style menu items
83
+ paragraph: Parágrafo
84
+ heading_1: Título 1
85
+ heading_2: Título 2
86
+ heading_3: Título 3
87
+ heading_4: Título 4
88
+ heading_5: Título 5
89
+ heading_6: Título 6
90
+ bulleted_list: Lista com marcadores
91
+ numbered_list: Lista numerada
92
+ blockquote: Citação
93
+ code_block: Bloco de código
94
+ # Inline style button aria-labels
95
+ bold: Negrito
96
+ italic: Itálico
97
+ strikethrough: Tachado
98
+ code: Código
99
+ link: Link
100
+ # Link dialog title
101
+ insert_link: Inserir link
102
+ update_link: Atualizar link
103
+ # Link dialog input field labels
104
+ text: Texto
105
+ url: URL
106
+ # Markdown mode toggle button aria-label
107
+ edit_in_markdown: Editar em Markdown
108
+ # Error message when rich text conversion fails
109
+ converter_error: Não foi possível ativar o modo de texto formatado. Use o editor de texto simples.
110
+ # Language selector aria-label
111
+ language: Idioma
112
+ # Plain text mode option in language selector
113
+ plain_text: Texto simples
@@ -22,6 +22,7 @@
22
22
  border-width: 0;
23
23
  border-style: solid;
24
24
  vertical-align: top;
25
+ font-size-adjust: inherit;
25
26
 
26
27
  @media (prefers-reduced-motion) {
27
28
  scroll-behavior: auto;
@@ -50,7 +51,7 @@
50
51
 
51
52
  h1 {
52
53
  margin: var(--sui-h1-margin, var(--sui-heading-margin));
53
- font-size: var(--sui-h1-font-size, 32px);
54
+ font-size: var(--sui-h1-font-size, 34px);
54
55
  font-family: var(--sui-h1-font-family, var(--sui-heading-font-family));
55
56
  font-weight: var(--sui-h1-font-weight, var(--sui-heading-font-weight));
56
57
  line-height: var(--sui-h1-line-height, var(--sui-heading-line-height));
@@ -58,7 +59,7 @@
58
59
 
59
60
  h2 {
60
61
  margin: var(--sui-h2-margin, var(--sui-heading-margin));
61
- font-size: var(--sui-h2-font-size, 28px);
62
+ font-size: var(--sui-h2-font-size, 30px);
62
63
  font-family: var(--sui-h2-font-family, var(--sui-heading-font-family));
63
64
  font-weight: var(--sui-h2-font-weight, var(--sui-heading-font-weight));
64
65
  line-height: var(--sui-h2-line-height, var(--sui-heading-line-height));
@@ -66,7 +67,7 @@
66
67
 
67
68
  h3 {
68
69
  margin: var(--sui-h3-margin, var(--sui-heading-margin));
69
- font-size: var(--sui-h3-font-size, 24px);
70
+ font-size: var(--sui-h3-font-size, 26px);
70
71
  font-family: var(--sui-h3-font-family, var(--sui-heading-font-family));
71
72
  font-weight: var(--sui-h3-font-weight, var(--sui-heading-font-weight));
72
73
  line-height: var(--sui-h3-line-height, var(--sui-heading-line-height));
@@ -74,7 +75,7 @@
74
75
 
75
76
  h4 {
76
77
  margin: var(--sui-h4-margin, var(--sui-heading-margin));
77
- font-size: var(--sui-h4-font-size, 20px);
78
+ font-size: var(--sui-h4-font-size, 22px);
78
79
  font-family: var(--sui-h4-font-family, var(--sui-heading-font-family));
79
80
  font-weight: var(--sui-h4-font-weight, var(--sui-heading-font-weight));
80
81
  line-height: var(--sui-h4-line-height, var(--sui-heading-line-height));
@@ -82,7 +83,7 @@
82
83
 
83
84
  h5 {
84
85
  margin: var(--sui-h5-margin, var(--sui-heading-margin));
85
- font-size: var(--sui-h5-font-size, 16px);
86
+ font-size: var(--sui-h5-font-size, 18px);
86
87
  font-family: var(--sui-h5-font-family, var(--sui-heading-font-family));
87
88
  font-weight: var(--sui-h5-font-weight, var(--sui-heading-font-weight));
88
89
  line-height: var(--sui-h5-line-height, var(--sui-heading-line-height));
@@ -90,7 +91,7 @@
90
91
 
91
92
  h6 {
92
93
  margin: var(--sui-h6-margin, var(--sui-heading-margin));
93
- font-size: var(--sui-h6-font-size, 12px);
94
+ font-size: var(--sui-h6-font-size, 14px);
94
95
  font-family: var(--sui-h6-font-family, var(--sui-heading-font-family));
95
96
  font-weight: var(--sui-h6-font-weight, var(--sui-heading-font-weight));
96
97
  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;
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;
157
+ --sui-font-family-default: "Source Sans 3", system-ui, sans-serif;
158
+ --sui-font-size-xxx-large: 25px;
159
+ --sui-font-size-xx-large: 21px;
160
+ --sui-font-size-x-large: 19px;
161
+ --sui-font-size-large: 17px;
162
+ --sui-font-size-default: 15px;
163
+ --sui-font-size-small: 13px;
164
+ --sui-font-size-x-small: 11px;
165
+ --sui-font-weight-normal: 400;
166
+ --sui-font-weight-bold: 700;
167
+ --sui-font-family-monospace: "Noto Sans Mono", ui-monospace, monospace;
168
+ --sui-font-size-monospace: 0.9em;
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.46.0",
3
+ "version": "0.48.0",
4
4
  "description": "A collection of Svelte components and utilities for building user interfaces.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,12 +62,12 @@
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.3.0",
65
+ "eslint-plugin-jsdoc": "^63.3.1",
66
66
  "eslint-plugin-package-json": "^1.6.2",
67
67
  "eslint-plugin-svelte": "^3.22.0",
68
- "globals": "^17.7.0",
68
+ "globals": "^17.8.0",
69
69
  "happy-dom": "^20.11.1",
70
- "oxlint": "^1.75.0",
70
+ "oxlint": "^1.76.0",
71
71
  "postcss": "^8.5.23",
72
72
  "postcss-html": "^1.8.1",
73
73
  "prettier": "^3.9.6",
@@ -77,7 +77,7 @@
77
77
  "stylelint-config-recommended-scss": "^17.0.1",
78
78
  "stylelint-scss": "^7.2.0",
79
79
  "svelte": "^5.56.8",
80
- "svelte-check": "^4.7.3",
80
+ "svelte-check": "^4.7.4",
81
81
  "svelte-preprocess": "^6.0.5",
82
82
  "tslib": "^2.8.1",
83
83
  "vite": "^8.1.5",