@sveltia/ui 0.38.0 → 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.
@@ -55,6 +55,7 @@
55
55
  {@render input()}
56
56
  {:else}
57
57
  <TextInput
58
+ dir="auto"
58
59
  bind:value
59
60
  flex
60
61
  autofocus
@@ -144,6 +144,7 @@
144
144
  {:else}
145
145
  <TextInput
146
146
  {...restProps}
147
+ dir="auto"
147
148
  bind:element={inputElement}
148
149
  role="combobox"
149
150
  {id}
@@ -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
@@ -156,6 +156,7 @@
156
156
  </Button>
157
157
  </div>
158
158
  <TextInput
159
+ dir="ltr"
159
160
  {...restProps}
160
161
  role="spinbutton"
161
162
  {id}
@@ -65,6 +65,7 @@
65
65
  {hidden}
66
66
  >
67
67
  <TextInput
68
+ dir="ltr"
68
69
  bind:element={inputElement}
69
70
  {...restProps}
70
71
  {id}
@@ -79,6 +79,7 @@
79
79
  {/if}
80
80
  </span>
81
81
  <TextInput
82
+ dir="auto"
82
83
  bind:element={inputElement}
83
84
  {...restProps}
84
85
  role="searchbox"
@@ -62,6 +62,7 @@
62
62
  {hidden}
63
63
  >
64
64
  <TextInput
65
+ dir="ltr"
65
66
  bind:element={inputElement}
66
67
  {...restProps}
67
68
  {id}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/ui",
3
- "version": "0.38.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.5",
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",