@sveltia/ui 0.26.11 → 0.27.1
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.
|
@@ -31,8 +31,10 @@
|
|
|
31
31
|
showOk = true,
|
|
32
32
|
showCancel = true,
|
|
33
33
|
okLabel = '',
|
|
34
|
+
okShortcuts = undefined,
|
|
34
35
|
okDisabled = false,
|
|
35
36
|
cancelLabel = '',
|
|
37
|
+
cancelShortcuts = undefined,
|
|
36
38
|
cancelDisabled = false,
|
|
37
39
|
focusInput = true,
|
|
38
40
|
children,
|
|
@@ -138,6 +140,7 @@
|
|
|
138
140
|
<Button
|
|
139
141
|
variant="primary"
|
|
140
142
|
label={okLabel || $_('_sui.ok')}
|
|
143
|
+
keyShortcuts={okShortcuts}
|
|
141
144
|
disabled={okDisabled}
|
|
142
145
|
onclick={() => {
|
|
143
146
|
modal?.close('ok');
|
|
@@ -148,6 +151,7 @@
|
|
|
148
151
|
<Button
|
|
149
152
|
variant="secondary"
|
|
150
153
|
label={cancelLabel || $_('_sui.cancel')}
|
|
154
|
+
keyShortcuts={cancelShortcuts}
|
|
151
155
|
disabled={cancelDisabled}
|
|
152
156
|
onclick={() => {
|
|
153
157
|
modal?.close('cancel');
|
|
@@ -219,7 +219,9 @@ const onEditorUpdate = (editor) => {
|
|
|
219
219
|
value: convertToMarkdownString(
|
|
220
220
|
// Use underscores for italic text in Markdown instead of asterisks
|
|
221
221
|
allTransformers.filter((/** @type {any} */ { tag }) => tag !== '*'),
|
|
222
|
-
)
|
|
222
|
+
) // Remove unnecessary backslashes for underscores
|
|
223
|
+
// @see https://github.com/sveltia/sveltia-cms/issues/430
|
|
224
|
+
.replace(/\\_/g, '_'),
|
|
223
225
|
selection: getSelectionTypes(),
|
|
224
226
|
},
|
|
225
227
|
}),
|
package/dist/typedefs.d.ts
CHANGED
|
@@ -226,6 +226,12 @@ export type DialogProps = {
|
|
|
226
226
|
* Text label displayed on the OK button.
|
|
227
227
|
*/
|
|
228
228
|
okLabel?: string | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* Keyboard shortcuts for the OK button. An alias of the
|
|
231
|
+
* `aria-keyshortcuts` attribute. Accepts the special `Accel` key, which will be replaced with
|
|
232
|
+
* `Control` or `Meta` depending on the user’s operating system.
|
|
233
|
+
*/
|
|
234
|
+
okShortcuts?: string | undefined;
|
|
229
235
|
/**
|
|
230
236
|
* Whether to disable the OK button.
|
|
231
237
|
*/
|
|
@@ -234,6 +240,12 @@ export type DialogProps = {
|
|
|
234
240
|
* Text label displayed on the Cancel button.
|
|
235
241
|
*/
|
|
236
242
|
cancelLabel?: string | undefined;
|
|
243
|
+
/**
|
|
244
|
+
* Keyboard shortcuts for the Cancel button. An alias of the
|
|
245
|
+
* `aria-keyshortcuts` attribute. Accepts the special `Accel` key, which will be replaced with
|
|
246
|
+
* `Control` or `Meta` depending on the user’s operating system.
|
|
247
|
+
*/
|
|
248
|
+
cancelShortcuts?: string | undefined;
|
|
237
249
|
/**
|
|
238
250
|
* Whether to disable the Cancel button.
|
|
239
251
|
*/
|
package/dist/typedefs.js
CHANGED
|
@@ -78,8 +78,14 @@
|
|
|
78
78
|
* @property {boolean} [showOk] Whether to show the OK button on the footer.
|
|
79
79
|
* @property {boolean} [showCancel] Whether to show the Cancel button on the footer.
|
|
80
80
|
* @property {string} [okLabel] Text label displayed on the OK button.
|
|
81
|
+
* @property {string} [okShortcuts] Keyboard shortcuts for the OK button. An alias of the
|
|
82
|
+
* `aria-keyshortcuts` attribute. Accepts the special `Accel` key, which will be replaced with
|
|
83
|
+
* `Control` or `Meta` depending on the user’s operating system.
|
|
81
84
|
* @property {boolean} [okDisabled] Whether to disable the OK button.
|
|
82
85
|
* @property {string} [cancelLabel] Text label displayed on the Cancel button.
|
|
86
|
+
* @property {string} [cancelShortcuts] Keyboard shortcuts for the Cancel button. An alias of the
|
|
87
|
+
* `aria-keyshortcuts` attribute. Accepts the special `Accel` key, which will be replaced with
|
|
88
|
+
* `Control` or `Meta` depending on the user’s operating system.
|
|
83
89
|
* @property {boolean} [cancelDisabled] Whether to disable the Cancel button.
|
|
84
90
|
* @property {boolean} [focusInput] Whether to automatically focus the first input field or primary
|
|
85
91
|
* action button. Default: `true`. If `false`, the `<dialog>` gets focused.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"svelte": "^5.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@playwright/test": "^1.53.
|
|
49
|
+
"@playwright/test": "^1.53.1",
|
|
50
50
|
"@sveltejs/adapter-auto": "^6.0.1",
|
|
51
51
|
"@sveltejs/kit": "^2.21.5",
|
|
52
52
|
"@sveltejs/package": "^2.3.11",
|
|
@@ -56,23 +56,23 @@
|
|
|
56
56
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
57
57
|
"eslint-config-prettier": "^10.1.5",
|
|
58
58
|
"eslint-plugin-import": "^2.31.0",
|
|
59
|
-
"eslint-plugin-jsdoc": "^51.0.
|
|
59
|
+
"eslint-plugin-jsdoc": "^51.0.3",
|
|
60
60
|
"eslint-plugin-svelte": "^2.46.1",
|
|
61
|
-
"postcss": "^8.5.
|
|
61
|
+
"postcss": "^8.5.6",
|
|
62
62
|
"postcss-html": "^1.8.0",
|
|
63
63
|
"prettier": "^3.5.3",
|
|
64
64
|
"prettier-plugin-svelte": "^3.4.0",
|
|
65
65
|
"sass": "^1.89.2",
|
|
66
|
-
"stylelint": "^16.
|
|
66
|
+
"stylelint": "^16.21.0",
|
|
67
67
|
"stylelint-config-recommended-scss": "^15.0.1",
|
|
68
68
|
"stylelint-scss": "^6.12.1",
|
|
69
|
-
"svelte": "5.34.
|
|
70
|
-
"svelte-check": "^4.2.
|
|
69
|
+
"svelte": "5.34.7",
|
|
70
|
+
"svelte-check": "^4.2.2",
|
|
71
71
|
"svelte-i18n": "^4.0.1",
|
|
72
72
|
"svelte-preprocess": "^6.0.3",
|
|
73
73
|
"tslib": "^2.8.1",
|
|
74
74
|
"vite": "^6.3.5",
|
|
75
|
-
"vitest": "^3.2.
|
|
75
|
+
"vitest": "^3.2.4"
|
|
76
76
|
},
|
|
77
77
|
"exports": {
|
|
78
78
|
".": {
|