@sveltia/ui 0.37.4 → 0.39.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/dialog/prompt-dialog.svelte +1 -0
- package/dist/components/select/combobox.svelte +1 -0
- package/dist/components/text-editor/text-editor.svelte +3 -0
- package/dist/components/text-editor/text-editor.svelte.d.ts +8 -0
- package/dist/components/text-editor/toolbar/insert-link-button.svelte +2 -0
- package/dist/components/text-field/number-input.svelte +1 -0
- package/dist/components/text-field/password-input.svelte +1 -0
- package/dist/components/text-field/search-bar.svelte +1 -0
- package/dist/components/text-field/secret-input.svelte +1 -0
- package/dist/components/text-field/text-area.svelte +4 -2
- package/dist/components/text-field/text-area.svelte.d.ts +8 -0
- package/dist/components/text-field/text-input.svelte +3 -2
- package/dist/components/util/app-shell.svelte +3 -3
- package/dist/styles/variables.scss +3 -3
- package/dist/typedefs.d.ts +4 -0
- package/dist/typedefs.js +1 -0
- package/package.json +9 -9
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
* @typedef {object} Props
|
|
28
28
|
* @property {string} [value] Input value.
|
|
29
29
|
* @property {boolean} [flex] Make the text input container flexible.
|
|
30
|
+
* @property {'ltr' | 'rtl' | 'auto'} [dir] The `dir` attribute on the `<textarea>` element.
|
|
30
31
|
* @property {TextEditorMode[]} [modes] Enabled modes.
|
|
31
32
|
* @property {(TextEditorBlockType | TextEditorInlineType)[]} [buttons] Enabled buttons.
|
|
32
33
|
* @property {TextEditorComponent[]} [components] Editor components.
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
/* eslint-disable prefer-const */
|
|
51
52
|
value = $bindable(''),
|
|
52
53
|
flex = false,
|
|
54
|
+
dir = undefined,
|
|
53
55
|
modes = ['rich-text', 'plain-text'],
|
|
54
56
|
buttons = [...INLINE_BUTTON_TYPES, ...BLOCK_BUTTON_TYPES],
|
|
55
57
|
components = [],
|
|
@@ -110,6 +112,7 @@
|
|
|
110
112
|
autoResize={true}
|
|
111
113
|
bind:value={editorStore.inputValue}
|
|
112
114
|
{flex}
|
|
115
|
+
{dir}
|
|
113
116
|
hidden={editorStore.useRichText || hidden}
|
|
114
117
|
{disabled}
|
|
115
118
|
{readonly}
|
|
@@ -13,6 +13,10 @@ declare const TextEditor: import("svelte").Component<{
|
|
|
13
13
|
* Make the text input container flexible.
|
|
14
14
|
*/
|
|
15
15
|
flex?: boolean | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The `dir` attribute on the `<textarea>` element.
|
|
18
|
+
*/
|
|
19
|
+
dir?: "ltr" | "rtl" | "auto" | undefined;
|
|
16
20
|
/**
|
|
17
21
|
* Enabled modes.
|
|
18
22
|
*/
|
|
@@ -67,6 +71,10 @@ type Props = {
|
|
|
67
71
|
* Make the text input container flexible.
|
|
68
72
|
*/
|
|
69
73
|
flex?: boolean | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* The `dir` attribute on the `<textarea>` element.
|
|
76
|
+
*/
|
|
77
|
+
dir?: "ltr" | "rtl" | "auto" | undefined;
|
|
70
78
|
/**
|
|
71
79
|
* Enabled modes.
|
|
72
80
|
*/
|
|
@@ -216,6 +216,7 @@
|
|
|
216
216
|
<div role="none">
|
|
217
217
|
<label for="{id}-url">{_('_sui.text_editor.url')}</label>
|
|
218
218
|
<TextInput
|
|
219
|
+
dir="ltr"
|
|
219
220
|
id="{id}-url"
|
|
220
221
|
bind:value={anchorURL}
|
|
221
222
|
flex
|
|
@@ -229,6 +230,7 @@
|
|
|
229
230
|
<div role="none">
|
|
230
231
|
<label for="{id}-text">{_('_sui.text_editor.text')}</label>
|
|
231
232
|
<TextInput
|
|
233
|
+
dir="auto"
|
|
232
234
|
id="{id}-text"
|
|
233
235
|
bind:value={anchorText}
|
|
234
236
|
flex
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* @typedef {object} Props
|
|
16
16
|
* @property {string} [value] Input value.
|
|
17
17
|
* @property {boolean} [flex] Make the text input container flexible.
|
|
18
|
+
* @property {'ltr' | 'rtl' | 'auto'} [dir] The `dir` attribute on the `<textarea>` element.
|
|
18
19
|
* @property {string} [name] The `name` attribute on the `<textarea>` element.
|
|
19
20
|
* @property {boolean} [autoResize] Whether to automatically resize the `<textarea>` based on the
|
|
20
21
|
* content.
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
/* eslint-disable prefer-const */
|
|
39
40
|
value = $bindable(''),
|
|
40
41
|
flex = false,
|
|
42
|
+
dir = undefined,
|
|
41
43
|
name = undefined,
|
|
42
44
|
autoResize = false,
|
|
43
45
|
class: className,
|
|
@@ -62,9 +64,9 @@
|
|
|
62
64
|
>
|
|
63
65
|
<textarea
|
|
64
66
|
{...restProps}
|
|
67
|
+
{dir}
|
|
65
68
|
{name}
|
|
66
69
|
bind:value
|
|
67
|
-
dir="auto"
|
|
68
70
|
disabled={disabled || undefined}
|
|
69
71
|
readonly={readonly || undefined}
|
|
70
72
|
aria-hidden={hidden}
|
|
@@ -75,7 +77,7 @@
|
|
|
75
77
|
class:auto-resize={autoResize}
|
|
76
78
|
></textarea>
|
|
77
79
|
{#if autoResize}
|
|
78
|
-
<div class="clone" aria-hidden="true">{value}</div>
|
|
80
|
+
<div class="clone" aria-hidden="true" {dir}>{value}</div>
|
|
79
81
|
{/if}
|
|
80
82
|
</div>
|
|
81
83
|
|
|
@@ -18,6 +18,10 @@ declare const TextArea: import("svelte").Component<import("../../typedefs").Keyb
|
|
|
18
18
|
* Make the text input container flexible.
|
|
19
19
|
*/
|
|
20
20
|
flex?: boolean | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The `dir` attribute on the `<textarea>` element.
|
|
23
|
+
*/
|
|
24
|
+
dir?: "ltr" | "rtl" | "auto" | undefined;
|
|
21
25
|
/**
|
|
22
26
|
* The `name` attribute on the `<textarea>` element.
|
|
23
27
|
*/
|
|
@@ -69,6 +73,10 @@ type Props = {
|
|
|
69
73
|
* Make the text input container flexible.
|
|
70
74
|
*/
|
|
71
75
|
flex?: boolean | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* The `dir` attribute on the `<textarea>` element.
|
|
78
|
+
*/
|
|
79
|
+
dir?: "ltr" | "rtl" | "auto" | undefined;
|
|
72
80
|
/**
|
|
73
81
|
* The `name` attribute on the `<textarea>` element.
|
|
74
82
|
*/
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
element = $bindable(),
|
|
27
27
|
role = 'textbox',
|
|
28
28
|
keyShortcuts = undefined,
|
|
29
|
+
dir = undefined,
|
|
29
30
|
name = undefined,
|
|
30
31
|
showInlineLabel = false,
|
|
31
32
|
inputmode = 'text',
|
|
@@ -102,8 +103,8 @@
|
|
|
102
103
|
{value}
|
|
103
104
|
type="text"
|
|
104
105
|
{role}
|
|
105
|
-
dir
|
|
106
|
-
|
|
106
|
+
{dir}
|
|
107
|
+
{name}
|
|
107
108
|
tabindex={disabled ? -1 : 0}
|
|
108
109
|
disabled={disabled || undefined}
|
|
109
110
|
readonly={readonly || undefined}
|
|
@@ -207,14 +207,14 @@
|
|
|
207
207
|
--sui-font-size-default: 14px;
|
|
208
208
|
--sui-font-size-small: 12px;
|
|
209
209
|
--sui-font-size-x-small: 10px;
|
|
210
|
-
--sui-font-weight-normal:
|
|
211
|
-
--sui-font-weight-bold:
|
|
210
|
+
--sui-font-weight-normal: 300;
|
|
211
|
+
--sui-font-weight-bold: 600;
|
|
212
212
|
--sui-font-family-monospace: "Noto Sans Mono", monospace;
|
|
213
213
|
--sui-font-size-monospace: 0.95em;
|
|
214
214
|
--sui-line-height-default: 1.25;
|
|
215
215
|
--sui-line-height-compact: 1.5;
|
|
216
216
|
--sui-line-height-comfortable: 1.75;
|
|
217
|
-
--sui-word-spacing-normal:
|
|
217
|
+
--sui-word-spacing-normal: 1px;
|
|
218
218
|
--sui-heading-margin: 0;
|
|
219
219
|
--sui-heading-font-family: var(--sui-font-family-default);
|
|
220
220
|
--sui-heading-font-weight: var(--sui-font-weight-bold);
|
|
@@ -159,14 +159,14 @@
|
|
|
159
159
|
--sui-font-size-default: 14px;
|
|
160
160
|
--sui-font-size-small: 12px;
|
|
161
161
|
--sui-font-size-x-small: 10px;
|
|
162
|
-
--sui-font-weight-normal:
|
|
163
|
-
--sui-font-weight-bold:
|
|
162
|
+
--sui-font-weight-normal: 300; // Merriweather Sans is a little bit bold, so we need to adjust the weight
|
|
163
|
+
--sui-font-weight-bold: 600; // ditto
|
|
164
164
|
--sui-font-family-monospace: "Noto Sans Mono", monospace;
|
|
165
165
|
--sui-font-size-monospace: 0.95em;
|
|
166
166
|
--sui-line-height-default: 1.25;
|
|
167
167
|
--sui-line-height-compact: 1.5;
|
|
168
168
|
--sui-line-height-comfortable: 1.75;
|
|
169
|
-
--sui-word-spacing-normal:
|
|
169
|
+
--sui-word-spacing-normal: 1px;
|
|
170
170
|
--sui-heading-margin: 0;
|
|
171
171
|
--sui-heading-font-family: var(--sui-font-family-default);
|
|
172
172
|
--sui-heading-font-weight: var(--sui-font-weight-bold);
|
package/dist/typedefs.d.ts
CHANGED
|
@@ -426,6 +426,10 @@ export type TextInputProps = {
|
|
|
426
426
|
* depending on the user’s operating system.
|
|
427
427
|
*/
|
|
428
428
|
keyShortcuts?: string | undefined;
|
|
429
|
+
/**
|
|
430
|
+
* The `dir` attribute on the `<input>` element.
|
|
431
|
+
*/
|
|
432
|
+
dir?: "ltr" | "rtl" | "auto" | undefined;
|
|
429
433
|
/**
|
|
430
434
|
* The `name` attribute on the `<input>` element.
|
|
431
435
|
*/
|
package/dist/typedefs.js
CHANGED
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
* @property {string} [keyShortcuts] Keyboard shortcuts. An alias of the `aria-keyshortcuts`
|
|
153
153
|
* attribute. Accepts the special `Accel` key, which will be replaced with `Control` or `Meta`
|
|
154
154
|
* depending on the user’s operating system.
|
|
155
|
+
* @property {'ltr' | 'rtl' | 'auto'} [dir] The `dir` attribute on the `<input>` element.
|
|
155
156
|
* @property {string} [name] The `name` attribute on the `<input>` element.
|
|
156
157
|
* @property {boolean} [showInlineLabel] Whether to display `aria-label` over the `<input>` element
|
|
157
158
|
* if it’s empty, just like how the HTML `placeholder` attribute works.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "A collection of Svelte components and utilities for building user interfaces.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@lexical/selection": "^0.44.0",
|
|
46
46
|
"@lexical/table": "^0.44.0",
|
|
47
47
|
"@lexical/utils": "^0.44.0",
|
|
48
|
-
"@sveltia/i18n": "^1.0
|
|
48
|
+
"@sveltia/i18n": "^1.1.0",
|
|
49
49
|
"@sveltia/utils": "^0.10.6",
|
|
50
50
|
"lexical": "^0.44.0",
|
|
51
51
|
"prismjs": "^1.30.0",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@sveltejs/adapter-auto": "^7.0.1",
|
|
56
|
-
"@sveltejs/kit": "^2.59.
|
|
56
|
+
"@sveltejs/kit": "^2.59.1",
|
|
57
57
|
"@sveltejs/package": "^2.5.7",
|
|
58
|
-
"@sveltejs/vite-plugin-svelte": "^7.
|
|
58
|
+
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
|
59
59
|
"@vitest/coverage-v8": "^4.1.5",
|
|
60
60
|
"cspell": "^10.0.0",
|
|
61
61
|
"eslint": "^9.39.4",
|
|
@@ -67,20 +67,20 @@
|
|
|
67
67
|
"eslint-plugin-svelte": "^3.17.1",
|
|
68
68
|
"globals": "^17.6.0",
|
|
69
69
|
"happy-dom": "^20.9.0",
|
|
70
|
-
"oxlint": "^1.
|
|
71
|
-
"postcss": "^8.5.
|
|
70
|
+
"oxlint": "^1.63.0",
|
|
71
|
+
"postcss": "^8.5.14",
|
|
72
72
|
"postcss-html": "^1.8.1",
|
|
73
73
|
"prettier": "^3.8.3",
|
|
74
74
|
"prettier-plugin-svelte": "^3.5.1",
|
|
75
75
|
"sass": "^1.99.0",
|
|
76
|
-
"stylelint": "^17.
|
|
76
|
+
"stylelint": "^17.11.0",
|
|
77
77
|
"stylelint-config-recommended-scss": "^17.0.1",
|
|
78
78
|
"stylelint-scss": "^7.0.0",
|
|
79
79
|
"svelte": "^5.55.5",
|
|
80
|
-
"svelte-check": "^4.4.
|
|
80
|
+
"svelte-check": "^4.4.8",
|
|
81
81
|
"svelte-preprocess": "^6.0.3",
|
|
82
82
|
"tslib": "^2.8.1",
|
|
83
|
-
"vite": "^8.0.
|
|
83
|
+
"vite": "^8.0.11",
|
|
84
84
|
"vitest": "^4.1.5"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|