@nqmcreative/ui 0.3.0 → 0.4.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.
- package/README.md +220 -28
- package/cli/index.mjs +247 -70
- package/dist/core/calendar.d.ts +1 -1
- package/dist/core/calendar.js +1 -1
- package/dist/core/color.d.ts +24 -0
- package/dist/core/color.js +39 -0
- package/dist/core/date.d.ts +3 -3
- package/dist/core/date.js +1 -1
- package/dist/core/files.d.ts +2 -3
- package/dist/core/files.js +2 -3
- package/dist/core/index.d.ts +9 -4
- package/dist/core/index.js +6 -4
- package/dist/core/number.d.ts +22 -0
- package/dist/core/number.js +33 -0
- package/dist/core/password.d.ts +1 -1
- package/dist/core/password.js +1 -1
- package/dist/core/pin.d.ts +23 -0
- package/dist/core/pin.js +38 -0
- package/dist/core/tags.d.ts +37 -0
- package/dist/core/tags.js +51 -0
- package/dist/core/time.d.ts +30 -0
- package/dist/core/time.js +78 -0
- package/dist/styles/matte/Alert.svelte +1 -3
- package/dist/styles/matte/Breadcrumb.svelte +1 -4
- package/dist/styles/matte/Calendar.svelte +6 -9
- package/dist/styles/matte/ColorInput.svelte +107 -0
- package/dist/styles/matte/ColorInput.svelte.d.ts +16 -0
- package/dist/styles/matte/Combobox.svelte +3 -6
- package/dist/styles/matte/CommandPalette.svelte +3 -6
- package/dist/styles/matte/ConfirmDialog.svelte +2 -5
- package/dist/styles/matte/ContextMenu.svelte +1 -4
- package/dist/styles/matte/CurrencyInput.svelte +108 -0
- package/dist/styles/matte/CurrencyInput.svelte.d.ts +26 -0
- package/dist/styles/matte/DatePicker.svelte +9 -9
- package/dist/styles/matte/DatePicker.svelte.d.ts +3 -0
- package/dist/styles/matte/Drawer.svelte +1 -3
- package/dist/styles/matte/Dropdown.svelte +2 -5
- package/dist/styles/matte/Dropdown.svelte.d.ts +1 -1
- package/dist/styles/matte/Dropzone.svelte +9 -12
- package/dist/styles/matte/Dropzone.svelte.d.ts +1 -1
- package/dist/styles/matte/FileInput.svelte +191 -0
- package/dist/styles/matte/FileInput.svelte.d.ts +32 -0
- package/dist/styles/matte/Footer.svelte +1 -1
- package/dist/styles/matte/Footer.svelte.d.ts +1 -1
- package/dist/styles/matte/InputAddon.svelte +36 -0
- package/dist/styles/matte/InputAddon.svelte.d.ts +13 -0
- package/dist/styles/matte/Modal.svelte +1 -3
- package/dist/styles/matte/MultiSelect.svelte +5 -8
- package/dist/styles/matte/Navbar.svelte +3 -9
- package/dist/styles/matte/Pagination.svelte +3 -6
- package/dist/styles/matte/PinInput.svelte +134 -0
- package/dist/styles/matte/PinInput.svelte.d.ts +25 -0
- package/dist/styles/matte/SearchInput.svelte +84 -0
- package/dist/styles/matte/SearchInput.svelte.d.ts +24 -0
- package/dist/styles/matte/Sidebar.svelte +3 -6
- package/dist/styles/matte/Spinner.svelte +2 -5
- package/dist/styles/matte/Spinner.svelte.d.ts +1 -1
- package/dist/styles/matte/Table.svelte +5 -8
- package/dist/styles/matte/TagsInput.svelte +170 -0
- package/dist/styles/matte/TagsInput.svelte.d.ts +29 -0
- package/dist/styles/matte/ThemeToggle.svelte +5 -8
- package/dist/styles/matte/TimeInput.svelte +126 -0
- package/dist/styles/matte/TimeInput.svelte.d.ts +21 -0
- package/dist/styles/matte/Toaster.svelte +2 -5
- package/dist/styles/matte/index.d.ts +10 -3
- package/dist/styles/matte/index.js +9 -3
- package/dist/styles/paper/Alert.svelte +1 -3
- package/dist/styles/paper/Breadcrumb.svelte +1 -4
- package/dist/styles/paper/Calendar.svelte +6 -9
- package/dist/styles/paper/ColorInput.svelte +109 -0
- package/dist/styles/paper/ColorInput.svelte.d.ts +16 -0
- package/dist/styles/paper/Combobox.svelte +3 -6
- package/dist/styles/paper/CommandPalette.svelte +3 -6
- package/dist/styles/paper/ConfirmDialog.svelte +2 -5
- package/dist/styles/paper/ContextMenu.svelte +1 -4
- package/dist/styles/paper/CurrencyInput.svelte +108 -0
- package/dist/styles/paper/CurrencyInput.svelte.d.ts +26 -0
- package/dist/styles/paper/DatePicker.svelte +9 -9
- package/dist/styles/paper/DatePicker.svelte.d.ts +3 -0
- package/dist/styles/paper/Drawer.svelte +1 -3
- package/dist/styles/paper/Dropdown.svelte +2 -5
- package/dist/styles/paper/Dropdown.svelte.d.ts +1 -1
- package/dist/styles/paper/Dropzone.svelte +9 -12
- package/dist/styles/paper/Dropzone.svelte.d.ts +1 -1
- package/dist/styles/paper/FileInput.svelte +201 -0
- package/dist/styles/paper/FileInput.svelte.d.ts +32 -0
- package/dist/styles/paper/Footer.svelte +1 -1
- package/dist/styles/paper/Footer.svelte.d.ts +1 -1
- package/dist/styles/paper/InputAddon.svelte +36 -0
- package/dist/styles/paper/InputAddon.svelte.d.ts +13 -0
- package/dist/styles/paper/Modal.svelte +1 -3
- package/dist/styles/paper/MultiSelect.svelte +5 -8
- package/dist/styles/paper/Navbar.svelte +3 -9
- package/dist/styles/paper/Pagination.svelte +3 -6
- package/dist/styles/paper/PinInput.svelte +134 -0
- package/dist/styles/paper/PinInput.svelte.d.ts +25 -0
- package/dist/styles/paper/SearchInput.svelte +89 -0
- package/dist/styles/paper/SearchInput.svelte.d.ts +24 -0
- package/dist/styles/paper/Sidebar.svelte +3 -6
- package/dist/styles/paper/Spinner.svelte +2 -5
- package/dist/styles/paper/Spinner.svelte.d.ts +1 -1
- package/dist/styles/paper/Table.svelte +5 -8
- package/dist/styles/paper/TagsInput.svelte +175 -0
- package/dist/styles/paper/TagsInput.svelte.d.ts +29 -0
- package/dist/styles/paper/ThemeToggle.svelte +5 -8
- package/dist/styles/paper/TimeInput.svelte +152 -0
- package/dist/styles/paper/TimeInput.svelte.d.ts +21 -0
- package/dist/styles/paper/Toaster.svelte +3 -6
- package/dist/styles/paper/index.d.ts +10 -3
- package/dist/styles/paper/index.js +9 -3
- package/dist/styles/sprout/Alert.svelte +1 -3
- package/dist/styles/sprout/Breadcrumb.svelte +1 -4
- package/dist/styles/sprout/Calendar.svelte +6 -9
- package/dist/styles/sprout/ColorInput.svelte +109 -0
- package/dist/styles/sprout/ColorInput.svelte.d.ts +16 -0
- package/dist/styles/sprout/Combobox.svelte +3 -6
- package/dist/styles/sprout/CommandPalette.svelte +3 -6
- package/dist/styles/sprout/ConfirmDialog.svelte +2 -5
- package/dist/styles/sprout/ContextMenu.svelte +1 -4
- package/dist/styles/sprout/CurrencyInput.svelte +108 -0
- package/dist/styles/sprout/CurrencyInput.svelte.d.ts +26 -0
- package/dist/styles/sprout/DatePicker.svelte +9 -9
- package/dist/styles/sprout/DatePicker.svelte.d.ts +3 -0
- package/dist/styles/sprout/Drawer.svelte +1 -3
- package/dist/styles/sprout/Dropdown.svelte +2 -5
- package/dist/styles/sprout/Dropdown.svelte.d.ts +1 -1
- package/dist/styles/sprout/Dropzone.svelte +9 -12
- package/dist/styles/sprout/Dropzone.svelte.d.ts +1 -1
- package/dist/styles/sprout/FileInput.svelte +202 -0
- package/dist/styles/sprout/FileInput.svelte.d.ts +32 -0
- package/dist/styles/sprout/Footer.svelte +1 -1
- package/dist/styles/sprout/Footer.svelte.d.ts +1 -1
- package/dist/styles/sprout/InputAddon.svelte +37 -0
- package/dist/styles/sprout/InputAddon.svelte.d.ts +13 -0
- package/dist/styles/sprout/Modal.svelte +1 -3
- package/dist/styles/sprout/MultiSelect.svelte +5 -8
- package/dist/styles/sprout/Navbar.svelte +3 -9
- package/dist/styles/sprout/Pagination.svelte +3 -6
- package/dist/styles/sprout/PinInput.svelte +135 -0
- package/dist/styles/sprout/PinInput.svelte.d.ts +25 -0
- package/dist/styles/sprout/SearchInput.svelte +89 -0
- package/dist/styles/sprout/SearchInput.svelte.d.ts +24 -0
- package/dist/styles/sprout/Sidebar.svelte +3 -6
- package/dist/styles/sprout/Spinner.svelte +2 -5
- package/dist/styles/sprout/Spinner.svelte.d.ts +1 -1
- package/dist/styles/sprout/Table.svelte +5 -8
- package/dist/styles/sprout/TagsInput.svelte +176 -0
- package/dist/styles/sprout/TagsInput.svelte.d.ts +29 -0
- package/dist/styles/sprout/ThemeToggle.svelte +5 -8
- package/dist/styles/sprout/TimeInput.svelte +152 -0
- package/dist/styles/sprout/TimeInput.svelte.d.ts +21 -0
- package/dist/styles/sprout/Toaster.svelte +3 -6
- package/dist/styles/sprout/index.d.ts +10 -3
- package/dist/styles/sprout/index.js +9 -3
- package/package.json +98 -19
- package/registry.json +139 -38
- package/dist/core/locale.svelte.d.ts +0 -93
- package/dist/core/locale.svelte.js +0 -153
- package/dist/styles/matte/LocaleProvider.svelte +0 -24
- package/dist/styles/matte/LocaleProvider.svelte.d.ts +0 -10
- package/dist/styles/paper/LocaleProvider.svelte +0 -24
- package/dist/styles/paper/LocaleProvider.svelte.d.ts +0 -10
- package/dist/styles/sprout/LocaleProvider.svelte +0 -24
- package/dist/styles/sprout/LocaleProvider.svelte.d.ts +0 -10
package/registry.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nqmcreative/ui",
|
|
3
3
|
"homepage": "https://github.com/mukhsamr/nqmcreative-ui",
|
|
4
|
-
"count":
|
|
4
|
+
"count": 70,
|
|
5
5
|
"demoStyle": "matte",
|
|
6
6
|
"styles": [
|
|
7
7
|
{
|
|
@@ -27,21 +27,6 @@
|
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
29
|
"components": [
|
|
30
|
-
{
|
|
31
|
-
"name": "LocaleProvider",
|
|
32
|
-
"slug": "locale-provider",
|
|
33
|
-
"category": "locale",
|
|
34
|
-
"description": "Scopes a locale to a subtree — the SSR-safe way to translate.",
|
|
35
|
-
"subpaths": {
|
|
36
|
-
"matte": "@nqmcreative/ui/matte/locale-provider",
|
|
37
|
-
"paper": "@nqmcreative/ui/paper/locale-provider",
|
|
38
|
-
"sprout": "@nqmcreative/ui/sprout/locale-provider"
|
|
39
|
-
},
|
|
40
|
-
"uses": [],
|
|
41
|
-
"modules": [
|
|
42
|
-
"locale"
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
30
|
{
|
|
46
31
|
"name": "Button",
|
|
47
32
|
"slug": "button",
|
|
@@ -268,6 +253,142 @@
|
|
|
268
253
|
"uses": [],
|
|
269
254
|
"modules": []
|
|
270
255
|
},
|
|
256
|
+
{
|
|
257
|
+
"name": "InputAddon",
|
|
258
|
+
"slug": "input-addon",
|
|
259
|
+
"category": "forms",
|
|
260
|
+
"description": "Fixed label joined to an input inside an InputGroup.",
|
|
261
|
+
"subpaths": {
|
|
262
|
+
"matte": "@nqmcreative/ui/matte/input-addon",
|
|
263
|
+
"paper": "@nqmcreative/ui/paper/input-addon",
|
|
264
|
+
"sprout": "@nqmcreative/ui/sprout/input-addon"
|
|
265
|
+
},
|
|
266
|
+
"uses": [
|
|
267
|
+
"Input"
|
|
268
|
+
],
|
|
269
|
+
"modules": []
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "SearchInput",
|
|
273
|
+
"slug": "search-input",
|
|
274
|
+
"category": "forms",
|
|
275
|
+
"description": "Search field with a clear button and a debounced callback.",
|
|
276
|
+
"subpaths": {
|
|
277
|
+
"matte": "@nqmcreative/ui/matte/search-input",
|
|
278
|
+
"paper": "@nqmcreative/ui/paper/search-input",
|
|
279
|
+
"sprout": "@nqmcreative/ui/sprout/search-input"
|
|
280
|
+
},
|
|
281
|
+
"uses": [
|
|
282
|
+
"Input"
|
|
283
|
+
],
|
|
284
|
+
"modules": [
|
|
285
|
+
"tones"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "PinInput",
|
|
290
|
+
"slug": "pin-input",
|
|
291
|
+
"category": "forms",
|
|
292
|
+
"description": "One box per character, with paste spreading and arrow keys.",
|
|
293
|
+
"subpaths": {
|
|
294
|
+
"matte": "@nqmcreative/ui/matte/pin-input",
|
|
295
|
+
"paper": "@nqmcreative/ui/paper/pin-input",
|
|
296
|
+
"sprout": "@nqmcreative/ui/sprout/pin-input"
|
|
297
|
+
},
|
|
298
|
+
"uses": [],
|
|
299
|
+
"modules": [
|
|
300
|
+
"pin",
|
|
301
|
+
"tones"
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"name": "TagsInput",
|
|
306
|
+
"slug": "tags-input",
|
|
307
|
+
"category": "forms",
|
|
308
|
+
"description": "Free-text tokens committed on Enter, deduplicated and capped.",
|
|
309
|
+
"subpaths": {
|
|
310
|
+
"matte": "@nqmcreative/ui/matte/tags-input",
|
|
311
|
+
"paper": "@nqmcreative/ui/paper/tags-input",
|
|
312
|
+
"sprout": "@nqmcreative/ui/sprout/tags-input"
|
|
313
|
+
},
|
|
314
|
+
"uses": [],
|
|
315
|
+
"modules": [
|
|
316
|
+
"tags",
|
|
317
|
+
"tones"
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"name": "CurrencyInput",
|
|
322
|
+
"slug": "currency-input",
|
|
323
|
+
"category": "forms",
|
|
324
|
+
"description": "Amount field that groups on blur and binds a number.",
|
|
325
|
+
"subpaths": {
|
|
326
|
+
"matte": "@nqmcreative/ui/matte/currency-input",
|
|
327
|
+
"paper": "@nqmcreative/ui/paper/currency-input",
|
|
328
|
+
"sprout": "@nqmcreative/ui/sprout/currency-input"
|
|
329
|
+
},
|
|
330
|
+
"uses": [
|
|
331
|
+
"Input"
|
|
332
|
+
],
|
|
333
|
+
"modules": [
|
|
334
|
+
"number",
|
|
335
|
+
"tones"
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"name": "TimeInput",
|
|
340
|
+
"slug": "time-input",
|
|
341
|
+
"category": "forms",
|
|
342
|
+
"description": "HH:MM field with steppers, bounds and a minute step.",
|
|
343
|
+
"subpaths": {
|
|
344
|
+
"matte": "@nqmcreative/ui/matte/time-input",
|
|
345
|
+
"paper": "@nqmcreative/ui/paper/time-input",
|
|
346
|
+
"sprout": "@nqmcreative/ui/sprout/time-input"
|
|
347
|
+
},
|
|
348
|
+
"uses": [
|
|
349
|
+
"Input"
|
|
350
|
+
],
|
|
351
|
+
"modules": [
|
|
352
|
+
"time",
|
|
353
|
+
"tones"
|
|
354
|
+
]
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"name": "ColorInput",
|
|
358
|
+
"slug": "color-input",
|
|
359
|
+
"category": "forms",
|
|
360
|
+
"description": "Hex field paired with the native swatch and fixed choices.",
|
|
361
|
+
"subpaths": {
|
|
362
|
+
"matte": "@nqmcreative/ui/matte/color-input",
|
|
363
|
+
"paper": "@nqmcreative/ui/paper/color-input",
|
|
364
|
+
"sprout": "@nqmcreative/ui/sprout/color-input"
|
|
365
|
+
},
|
|
366
|
+
"uses": [
|
|
367
|
+
"Input"
|
|
368
|
+
],
|
|
369
|
+
"modules": [
|
|
370
|
+
"color",
|
|
371
|
+
"tones"
|
|
372
|
+
]
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "FileInput",
|
|
376
|
+
"slug": "file-input",
|
|
377
|
+
"category": "forms",
|
|
378
|
+
"description": "One-line file picker with type, size and count validation.",
|
|
379
|
+
"subpaths": {
|
|
380
|
+
"matte": "@nqmcreative/ui/matte/file-input",
|
|
381
|
+
"paper": "@nqmcreative/ui/paper/file-input",
|
|
382
|
+
"sprout": "@nqmcreative/ui/sprout/file-input"
|
|
383
|
+
},
|
|
384
|
+
"uses": [
|
|
385
|
+
"Input"
|
|
386
|
+
],
|
|
387
|
+
"modules": [
|
|
388
|
+
"files",
|
|
389
|
+
"tones"
|
|
390
|
+
]
|
|
391
|
+
},
|
|
271
392
|
{
|
|
272
393
|
"name": "Combobox",
|
|
273
394
|
"slug": "combobox",
|
|
@@ -283,7 +404,6 @@
|
|
|
283
404
|
"actions/anchor",
|
|
284
405
|
"actions/dismissable",
|
|
285
406
|
"list",
|
|
286
|
-
"locale",
|
|
287
407
|
"tones"
|
|
288
408
|
]
|
|
289
409
|
},
|
|
@@ -302,7 +422,6 @@
|
|
|
302
422
|
"actions/anchor",
|
|
303
423
|
"actions/dismissable",
|
|
304
424
|
"list",
|
|
305
|
-
"locale",
|
|
306
425
|
"tones"
|
|
307
426
|
]
|
|
308
427
|
},
|
|
@@ -324,7 +443,6 @@
|
|
|
324
443
|
"actions/dismissable",
|
|
325
444
|
"calendar",
|
|
326
445
|
"date",
|
|
327
|
-
"locale",
|
|
328
446
|
"tones"
|
|
329
447
|
]
|
|
330
448
|
},
|
|
@@ -342,7 +460,6 @@
|
|
|
342
460
|
"modules": [
|
|
343
461
|
"calendar",
|
|
344
462
|
"date",
|
|
345
|
-
"locale",
|
|
346
463
|
"tones"
|
|
347
464
|
]
|
|
348
465
|
},
|
|
@@ -359,7 +476,6 @@
|
|
|
359
476
|
"uses": [],
|
|
360
477
|
"modules": [
|
|
361
478
|
"files",
|
|
362
|
-
"locale",
|
|
363
479
|
"tones"
|
|
364
480
|
]
|
|
365
481
|
},
|
|
@@ -450,7 +566,6 @@
|
|
|
450
566
|
"Checkbox"
|
|
451
567
|
],
|
|
452
568
|
"modules": [
|
|
453
|
-
"locale",
|
|
454
569
|
"table",
|
|
455
570
|
"tones"
|
|
456
571
|
]
|
|
@@ -480,7 +595,6 @@
|
|
|
480
595
|
},
|
|
481
596
|
"uses": [],
|
|
482
597
|
"modules": [
|
|
483
|
-
"locale",
|
|
484
598
|
"tones"
|
|
485
599
|
]
|
|
486
600
|
},
|
|
@@ -512,7 +626,6 @@
|
|
|
512
626
|
},
|
|
513
627
|
"uses": [],
|
|
514
628
|
"modules": [
|
|
515
|
-
"locale",
|
|
516
629
|
"tones"
|
|
517
630
|
]
|
|
518
631
|
},
|
|
@@ -559,7 +672,6 @@
|
|
|
559
672
|
],
|
|
560
673
|
"modules": [
|
|
561
674
|
"actions/dismissable",
|
|
562
|
-
"locale",
|
|
563
675
|
"toast",
|
|
564
676
|
"tones"
|
|
565
677
|
]
|
|
@@ -632,7 +744,6 @@
|
|
|
632
744
|
},
|
|
633
745
|
"uses": [],
|
|
634
746
|
"modules": [
|
|
635
|
-
"locale",
|
|
636
747
|
"tones"
|
|
637
748
|
]
|
|
638
749
|
},
|
|
@@ -648,7 +759,6 @@
|
|
|
648
759
|
},
|
|
649
760
|
"uses": [],
|
|
650
761
|
"modules": [
|
|
651
|
-
"locale",
|
|
652
762
|
"pagination",
|
|
653
763
|
"tones"
|
|
654
764
|
]
|
|
@@ -684,7 +794,6 @@
|
|
|
684
794
|
"MenuItem"
|
|
685
795
|
],
|
|
686
796
|
"modules": [
|
|
687
|
-
"locale",
|
|
688
797
|
"tones"
|
|
689
798
|
]
|
|
690
799
|
},
|
|
@@ -700,7 +809,6 @@
|
|
|
700
809
|
},
|
|
701
810
|
"uses": [],
|
|
702
811
|
"modules": [
|
|
703
|
-
"locale",
|
|
704
812
|
"tones"
|
|
705
813
|
]
|
|
706
814
|
},
|
|
@@ -851,8 +959,7 @@
|
|
|
851
959
|
},
|
|
852
960
|
"uses": [],
|
|
853
961
|
"modules": [
|
|
854
|
-
"dialog"
|
|
855
|
-
"locale"
|
|
962
|
+
"dialog"
|
|
856
963
|
]
|
|
857
964
|
},
|
|
858
965
|
{
|
|
@@ -867,8 +974,7 @@
|
|
|
867
974
|
},
|
|
868
975
|
"uses": [],
|
|
869
976
|
"modules": [
|
|
870
|
-
"dialog"
|
|
871
|
-
"locale"
|
|
977
|
+
"dialog"
|
|
872
978
|
]
|
|
873
979
|
},
|
|
874
980
|
{
|
|
@@ -886,7 +992,6 @@
|
|
|
886
992
|
"Modal"
|
|
887
993
|
],
|
|
888
994
|
"modules": [
|
|
889
|
-
"locale",
|
|
890
995
|
"tones"
|
|
891
996
|
]
|
|
892
997
|
},
|
|
@@ -907,7 +1012,6 @@
|
|
|
907
1012
|
"actions/dismissable",
|
|
908
1013
|
"dialog",
|
|
909
1014
|
"list",
|
|
910
|
-
"locale",
|
|
911
1015
|
"tones",
|
|
912
1016
|
"trigger"
|
|
913
1017
|
]
|
|
@@ -926,7 +1030,6 @@
|
|
|
926
1030
|
"modules": [
|
|
927
1031
|
"actions/anchor",
|
|
928
1032
|
"actions/dismissable",
|
|
929
|
-
"locale",
|
|
930
1033
|
"trigger"
|
|
931
1034
|
]
|
|
932
1035
|
},
|
|
@@ -944,7 +1047,6 @@
|
|
|
944
1047
|
"modules": [
|
|
945
1048
|
"actions/anchor",
|
|
946
1049
|
"actions/dismissable",
|
|
947
|
-
"locale",
|
|
948
1050
|
"trigger"
|
|
949
1051
|
]
|
|
950
1052
|
},
|
|
@@ -1005,7 +1107,6 @@
|
|
|
1005
1107
|
},
|
|
1006
1108
|
"uses": [],
|
|
1007
1109
|
"modules": [
|
|
1008
|
-
"locale",
|
|
1009
1110
|
"theme",
|
|
1010
1111
|
"tones"
|
|
1011
1112
|
]
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Every string a component renders on its own — labels, ARIA names, the words
|
|
3
|
-
* inside a rejected-file message. Override them once instead of passing a prop
|
|
4
|
-
* to every instance.
|
|
5
|
-
*
|
|
6
|
-
* Two ways in:
|
|
7
|
-
*
|
|
8
|
-
* 1. `setLocale(idID)` at app start — one global locale, the common case.
|
|
9
|
-
* 2. `<LocaleProvider locale={idID}>` — scoped to a subtree, and the right
|
|
10
|
-
* choice under SSR, where module state is shared between requests.
|
|
11
|
-
*
|
|
12
|
-
* Per-instance props still win over both: `<Table empty="…" />`.
|
|
13
|
-
*/
|
|
14
|
-
export interface Locale {
|
|
15
|
-
close: string;
|
|
16
|
-
dismiss: string;
|
|
17
|
-
loading: string;
|
|
18
|
-
cancel: string;
|
|
19
|
-
confirm: string;
|
|
20
|
-
clear: string;
|
|
21
|
-
search: string;
|
|
22
|
-
menu: string;
|
|
23
|
-
navigation: string;
|
|
24
|
-
openMenu: string;
|
|
25
|
-
closeMenu: string;
|
|
26
|
-
collapseSidebar: string;
|
|
27
|
-
expandSidebar: string;
|
|
28
|
-
notifications: string;
|
|
29
|
-
commandPlaceholder: string;
|
|
30
|
-
noResults: string;
|
|
31
|
-
noData: string;
|
|
32
|
-
selectAllRows: string;
|
|
33
|
-
selectRow: string;
|
|
34
|
-
pagination: string;
|
|
35
|
-
previousPage: string;
|
|
36
|
-
nextPage: string;
|
|
37
|
-
breadcrumb: string;
|
|
38
|
-
comboboxPlaceholder: string;
|
|
39
|
-
noMatches: string;
|
|
40
|
-
dropFiles: string;
|
|
41
|
-
or: string;
|
|
42
|
-
browse: string;
|
|
43
|
-
remove: string;
|
|
44
|
-
rejectedType: string;
|
|
45
|
-
rejectedSize: string;
|
|
46
|
-
rejectedCount: string;
|
|
47
|
-
/** Byte-size units, smallest first. */
|
|
48
|
-
byteUnits: [string, string, string, string];
|
|
49
|
-
showPassword: string;
|
|
50
|
-
hidePassword: string;
|
|
51
|
-
/** Five buckets, from empty to strongest. */
|
|
52
|
-
passwordStrength: [string, string, string, string, string];
|
|
53
|
-
decrease: string;
|
|
54
|
-
increase: string;
|
|
55
|
-
/** BCP 47 tag handed to `Intl` for month and weekday names. */
|
|
56
|
-
dateLocale: string;
|
|
57
|
-
/** Order of the date parts the input accepts and prints. */
|
|
58
|
-
dateFormat: 'dmy' | 'mdy' | 'ymd';
|
|
59
|
-
today: string;
|
|
60
|
-
previousMonth: string;
|
|
61
|
-
nextMonth: string;
|
|
62
|
-
selectDate: string;
|
|
63
|
-
selected: string;
|
|
64
|
-
removeItem: string;
|
|
65
|
-
toggleTheme: string;
|
|
66
|
-
lightMode: string;
|
|
67
|
-
darkMode: string;
|
|
68
|
-
}
|
|
69
|
-
export declare const enUS: Locale;
|
|
70
|
-
/** Bahasa Indonesia. Pass to `setLocale` or `<LocaleProvider>`. */
|
|
71
|
-
export declare const idID: Locale;
|
|
72
|
-
export declare class LocaleStore {
|
|
73
|
-
current: Locale;
|
|
74
|
-
/** Merges on top of what is already there. */
|
|
75
|
-
set(next: Partial<Locale>): void;
|
|
76
|
-
/**
|
|
77
|
-
* Replaces everything with `enUS` plus `next`. Unlike `set` this never reads
|
|
78
|
-
* `current`, so it is safe to call from an effect without the write feeding
|
|
79
|
-
* back into the effect's own dependencies.
|
|
80
|
-
*/
|
|
81
|
-
replace(next: Partial<Locale>): void;
|
|
82
|
-
}
|
|
83
|
-
/** The global locale, used by any component with no provider above it. */
|
|
84
|
-
export declare const locale: LocaleStore;
|
|
85
|
-
/** Replaces some or all of the global strings. Call once, at app start. */
|
|
86
|
-
export declare function setLocale(next: Partial<Locale>): void;
|
|
87
|
-
/**
|
|
88
|
-
* Scopes a locale to the current component subtree. Call during init — the
|
|
89
|
-
* `LocaleProvider` component does exactly this.
|
|
90
|
-
*/
|
|
91
|
-
export declare function provideLocale(next: Partial<Locale>): LocaleStore;
|
|
92
|
-
/** The nearest provided locale, falling back to the global one. */
|
|
93
|
-
export declare function useLocale(): LocaleStore;
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Every string a component renders on its own — labels, ARIA names, the words
|
|
3
|
-
* inside a rejected-file message. Override them once instead of passing a prop
|
|
4
|
-
* to every instance.
|
|
5
|
-
*
|
|
6
|
-
* Two ways in:
|
|
7
|
-
*
|
|
8
|
-
* 1. `setLocale(idID)` at app start — one global locale, the common case.
|
|
9
|
-
* 2. `<LocaleProvider locale={idID}>` — scoped to a subtree, and the right
|
|
10
|
-
* choice under SSR, where module state is shared between requests.
|
|
11
|
-
*
|
|
12
|
-
* Per-instance props still win over both: `<Table empty="…" />`.
|
|
13
|
-
*/
|
|
14
|
-
import { getContext, setContext } from 'svelte';
|
|
15
|
-
export const enUS = {
|
|
16
|
-
close: 'Close',
|
|
17
|
-
dismiss: 'Dismiss',
|
|
18
|
-
loading: 'Loading',
|
|
19
|
-
cancel: 'Cancel',
|
|
20
|
-
confirm: 'Confirm',
|
|
21
|
-
clear: 'Clear selection',
|
|
22
|
-
search: 'Search',
|
|
23
|
-
menu: 'Menu',
|
|
24
|
-
navigation: 'Navigation',
|
|
25
|
-
openMenu: 'Open menu',
|
|
26
|
-
closeMenu: 'Close menu',
|
|
27
|
-
collapseSidebar: 'Collapse sidebar',
|
|
28
|
-
expandSidebar: 'Expand sidebar',
|
|
29
|
-
notifications: 'Notifications',
|
|
30
|
-
commandPlaceholder: 'Type a command or search…',
|
|
31
|
-
noResults: 'No results',
|
|
32
|
-
noData: 'No data',
|
|
33
|
-
selectAllRows: 'Select all rows',
|
|
34
|
-
selectRow: 'Select row',
|
|
35
|
-
pagination: 'Pagination',
|
|
36
|
-
previousPage: 'Previous page',
|
|
37
|
-
nextPage: 'Next page',
|
|
38
|
-
breadcrumb: 'Breadcrumb',
|
|
39
|
-
comboboxPlaceholder: 'Search…',
|
|
40
|
-
noMatches: 'No matches',
|
|
41
|
-
dropFiles: 'Drop files here',
|
|
42
|
-
or: 'or',
|
|
43
|
-
browse: 'browse',
|
|
44
|
-
remove: 'Remove',
|
|
45
|
-
rejectedType: 'wrong file type',
|
|
46
|
-
rejectedSize: 'too large',
|
|
47
|
-
rejectedCount: 'over the file limit',
|
|
48
|
-
byteUnits: ['B', 'KB', 'MB', 'GB'],
|
|
49
|
-
showPassword: 'Show password',
|
|
50
|
-
hidePassword: 'Hide password',
|
|
51
|
-
passwordStrength: ['Too short', 'Weak', 'Fair', 'Good', 'Strong'],
|
|
52
|
-
decrease: 'Decrease',
|
|
53
|
-
increase: 'Increase',
|
|
54
|
-
dateLocale: 'en-US',
|
|
55
|
-
dateFormat: 'mdy',
|
|
56
|
-
today: 'Today',
|
|
57
|
-
previousMonth: 'Previous month',
|
|
58
|
-
nextMonth: 'Next month',
|
|
59
|
-
selectDate: 'Select a date',
|
|
60
|
-
selected: 'selected',
|
|
61
|
-
removeItem: 'Remove',
|
|
62
|
-
toggleTheme: 'Toggle theme',
|
|
63
|
-
lightMode: 'Light',
|
|
64
|
-
darkMode: 'Dark'
|
|
65
|
-
};
|
|
66
|
-
/** Bahasa Indonesia. Pass to `setLocale` or `<LocaleProvider>`. */
|
|
67
|
-
export const idID = {
|
|
68
|
-
close: 'Tutup',
|
|
69
|
-
dismiss: 'Tutup',
|
|
70
|
-
loading: 'Memuat',
|
|
71
|
-
cancel: 'Batal',
|
|
72
|
-
confirm: 'Konfirmasi',
|
|
73
|
-
clear: 'Hapus pilihan',
|
|
74
|
-
search: 'Cari',
|
|
75
|
-
menu: 'Menu',
|
|
76
|
-
navigation: 'Navigasi',
|
|
77
|
-
openMenu: 'Buka menu',
|
|
78
|
-
closeMenu: 'Tutup menu',
|
|
79
|
-
collapseSidebar: 'Ciutkan bilah sisi',
|
|
80
|
-
expandSidebar: 'Bentangkan bilah sisi',
|
|
81
|
-
notifications: 'Notifikasi',
|
|
82
|
-
commandPlaceholder: 'Ketik perintah atau cari…',
|
|
83
|
-
noResults: 'Tidak ada hasil',
|
|
84
|
-
noData: 'Tidak ada data',
|
|
85
|
-
selectAllRows: 'Pilih semua baris',
|
|
86
|
-
selectRow: 'Pilih baris',
|
|
87
|
-
pagination: 'Paginasi',
|
|
88
|
-
previousPage: 'Halaman sebelumnya',
|
|
89
|
-
nextPage: 'Halaman berikutnya',
|
|
90
|
-
breadcrumb: 'Remah roti',
|
|
91
|
-
comboboxPlaceholder: 'Cari…',
|
|
92
|
-
noMatches: 'Tidak ditemukan',
|
|
93
|
-
dropFiles: 'Letakkan berkas di sini',
|
|
94
|
-
or: 'atau',
|
|
95
|
-
browse: 'jelajahi',
|
|
96
|
-
remove: 'Hapus',
|
|
97
|
-
rejectedType: 'tipe berkas tidak sesuai',
|
|
98
|
-
rejectedSize: 'ukuran terlalu besar',
|
|
99
|
-
rejectedCount: 'melebihi batas jumlah berkas',
|
|
100
|
-
byteUnits: ['B', 'KB', 'MB', 'GB'],
|
|
101
|
-
showPassword: 'Tampilkan kata sandi',
|
|
102
|
-
hidePassword: 'Sembunyikan kata sandi',
|
|
103
|
-
passwordStrength: ['Terlalu pendek', 'Lemah', 'Cukup', 'Baik', 'Kuat'],
|
|
104
|
-
decrease: 'Kurangi',
|
|
105
|
-
increase: 'Tambah',
|
|
106
|
-
dateLocale: 'id-ID',
|
|
107
|
-
dateFormat: 'dmy',
|
|
108
|
-
today: 'Hari ini',
|
|
109
|
-
previousMonth: 'Bulan sebelumnya',
|
|
110
|
-
nextMonth: 'Bulan berikutnya',
|
|
111
|
-
selectDate: 'Pilih tanggal',
|
|
112
|
-
selected: 'dipilih',
|
|
113
|
-
removeItem: 'Hapus',
|
|
114
|
-
toggleTheme: 'Ganti tema',
|
|
115
|
-
lightMode: 'Terang',
|
|
116
|
-
darkMode: 'Gelap'
|
|
117
|
-
};
|
|
118
|
-
export class LocaleStore {
|
|
119
|
-
current = $state({ ...enUS });
|
|
120
|
-
/** Merges on top of what is already there. */
|
|
121
|
-
set(next) {
|
|
122
|
-
this.current = { ...this.current, ...next };
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Replaces everything with `enUS` plus `next`. Unlike `set` this never reads
|
|
126
|
-
* `current`, so it is safe to call from an effect without the write feeding
|
|
127
|
-
* back into the effect's own dependencies.
|
|
128
|
-
*/
|
|
129
|
-
replace(next) {
|
|
130
|
-
this.current = { ...enUS, ...next };
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
const KEY = Symbol.for('@nqmcreative/ui:locale');
|
|
134
|
-
/** The global locale, used by any component with no provider above it. */
|
|
135
|
-
export const locale = new LocaleStore();
|
|
136
|
-
/** Replaces some or all of the global strings. Call once, at app start. */
|
|
137
|
-
export function setLocale(next) {
|
|
138
|
-
locale.set(next);
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Scopes a locale to the current component subtree. Call during init — the
|
|
142
|
-
* `LocaleProvider` component does exactly this.
|
|
143
|
-
*/
|
|
144
|
-
export function provideLocale(next) {
|
|
145
|
-
const store = new LocaleStore();
|
|
146
|
-
store.replace(next);
|
|
147
|
-
setContext(KEY, store);
|
|
148
|
-
return store;
|
|
149
|
-
}
|
|
150
|
-
/** The nearest provided locale, falling back to the global one. */
|
|
151
|
-
export function useLocale() {
|
|
152
|
-
return getContext(KEY) ?? locale;
|
|
153
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import { provideLocale, type Locale } from '../../core/locale.svelte.js';
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
/** Full locale or just the keys you want to change. */
|
|
7
|
-
locale: Partial<Locale>;
|
|
8
|
-
children: Snippet;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let { locale, children }: Props = $props();
|
|
12
|
-
|
|
13
|
-
// Seeded during init so the first render already has the right strings —
|
|
14
|
-
// an effect would leave one frame (and the SSR output) in the default
|
|
15
|
-
// language. The effect below only handles later changes, e.g. a switcher.
|
|
16
|
-
// svelte-ignore state_referenced_locally
|
|
17
|
-
const store = provideLocale(locale);
|
|
18
|
-
|
|
19
|
-
$effect(() => {
|
|
20
|
-
store.replace(locale);
|
|
21
|
-
});
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
{@render children()}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
import { type Locale } from '../../core/locale.svelte.js';
|
|
3
|
-
interface Props {
|
|
4
|
-
/** Full locale or just the keys you want to change. */
|
|
5
|
-
locale: Partial<Locale>;
|
|
6
|
-
children: Snippet;
|
|
7
|
-
}
|
|
8
|
-
declare const LocaleProvider: import("svelte").Component<Props, {}, "">;
|
|
9
|
-
type LocaleProvider = ReturnType<typeof LocaleProvider>;
|
|
10
|
-
export default LocaleProvider;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import { provideLocale, type Locale } from '../../core/locale.svelte.js';
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
/** Full locale or just the keys you want to change. */
|
|
7
|
-
locale: Partial<Locale>;
|
|
8
|
-
children: Snippet;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let { locale, children }: Props = $props();
|
|
12
|
-
|
|
13
|
-
// Seeded during init so the first render already has the right strings —
|
|
14
|
-
// an effect would leave one frame (and the SSR output) in the default
|
|
15
|
-
// language. The effect below only handles later changes, e.g. a switcher.
|
|
16
|
-
// svelte-ignore state_referenced_locally
|
|
17
|
-
const store = provideLocale(locale);
|
|
18
|
-
|
|
19
|
-
$effect(() => {
|
|
20
|
-
store.replace(locale);
|
|
21
|
-
});
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
{@render children()}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
import { type Locale } from '../../core/locale.svelte.js';
|
|
3
|
-
interface Props {
|
|
4
|
-
/** Full locale or just the keys you want to change. */
|
|
5
|
-
locale: Partial<Locale>;
|
|
6
|
-
children: Snippet;
|
|
7
|
-
}
|
|
8
|
-
declare const LocaleProvider: import("svelte").Component<Props, {}, "">;
|
|
9
|
-
type LocaleProvider = ReturnType<typeof LocaleProvider>;
|
|
10
|
-
export default LocaleProvider;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import { provideLocale, type Locale } from '../../core/locale.svelte.js';
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
/** Full locale or just the keys you want to change. */
|
|
7
|
-
locale: Partial<Locale>;
|
|
8
|
-
children: Snippet;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let { locale, children }: Props = $props();
|
|
12
|
-
|
|
13
|
-
// Seeded during init so the first render already has the right strings —
|
|
14
|
-
// an effect would leave one frame (and the SSR output) in the default
|
|
15
|
-
// language. The effect below only handles later changes, e.g. a switcher.
|
|
16
|
-
// svelte-ignore state_referenced_locally
|
|
17
|
-
const store = provideLocale(locale);
|
|
18
|
-
|
|
19
|
-
$effect(() => {
|
|
20
|
-
store.replace(locale);
|
|
21
|
-
});
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
{@render children()}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
import { type Locale } from '../../core/locale.svelte.js';
|
|
3
|
-
interface Props {
|
|
4
|
-
/** Full locale or just the keys you want to change. */
|
|
5
|
-
locale: Partial<Locale>;
|
|
6
|
-
children: Snippet;
|
|
7
|
-
}
|
|
8
|
-
declare const LocaleProvider: import("svelte").Component<Props, {}, "">;
|
|
9
|
-
type LocaleProvider = ReturnType<typeof LocaleProvider>;
|
|
10
|
-
export default LocaleProvider;
|