translateWithId added

This commit is contained in:
davideraccagni 2022-04-20 20:29:18 +02:00
commit 4805b8e862
5 changed files with 25 additions and 2495 deletions

View file

@ -19,7 +19,7 @@ cd carbon-components-svelte
Set the original repository as the upstream:
```sh
git remote add upstream git@github.com:IBM/carbon-components-svelte.git
git remote add upstream git@github.com:carbon-design-system/carbon-components-svelte.git
# verify that the upstream is added
git remote -v
```

17
docs/package-lock.json generated
View file

@ -206,7 +206,6 @@
"version": "file:..",
"dev": true,
"requires": {
"carbon-preprocess-svelte": "^0.8.2",
"flatpickr": "4.6.9"
},
"dependencies": {
@ -515,7 +514,6 @@
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/carbon-preprocess-svelte/-/carbon-preprocess-svelte-0.8.2.tgz",
"integrity": "sha512-dOy9pcC4prPCDYfznX8o403At5GQhEHn2nSpFEzLAWOqcw+h1ZAr5fvrkI6y8GrrQRjkti7Xs53/N/piyxo5Yw==",
"dev": true,
"requires": {
"purgecss": "^4.1.3",
"svelte-preprocess": "^4.10.5",
@ -705,8 +703,7 @@
"cssesc": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
"dev": true
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="
},
"debug": {
"version": "4.3.4",
@ -1192,8 +1189,7 @@
"nanoid": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.2.tgz",
"integrity": "sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA==",
"dev": true
"integrity": "sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA=="
},
"node-releases": {
"version": "2.0.2",
@ -1289,7 +1285,6 @@
"version": "8.4.12",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.12.tgz",
"integrity": "sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg==",
"dev": true,
"requires": {
"nanoid": "^3.3.1",
"picocolors": "^1.0.0",
@ -1300,7 +1295,6 @@
"version": "6.0.10",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz",
"integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==",
"dev": true,
"requires": {
"cssesc": "^3.0.0",
"util-deprecate": "^1.0.2"
@ -1325,7 +1319,6 @@
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/purgecss/-/purgecss-4.1.3.tgz",
"integrity": "sha512-99cKy4s+VZoXnPxaoM23e5ABcP851nC2y2GROkkjS8eJaJtlciGavd7iYAw2V84WeBqggZ12l8ef44G99HmTaw==",
"dev": true,
"requires": {
"commander": "^8.0.0",
"glob": "^7.1.7",
@ -1788,14 +1781,12 @@
"typescript": {
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
"dev": true
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw=="
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"warning": {
"version": "3.0.0",

View file

@ -364,6 +364,16 @@
"constant": false,
"reactive": false
},
{
"name": "translateWithId",
"kind": "let",
"description": "Override the default translation ids",
"type": "(id: any) => string",
"isFunction": false,
"isFunctionDeclaration": false,
"constant": false,
"reactive": false
},
{
"name": "invalid",
"kind": "let",

2484
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -84,6 +84,12 @@
/** Set to `true` to visually hide the label text */
export let hideLabel = false;
/**
* Override the default translation ids
* @type {(id: any) => string}
*/
export let translateWithId = undefined;
/** Set an id for the list box component */
export let id = "ccs-" + Math.random().toString(36);
@ -243,6 +249,7 @@
id="{id}"
name="{name}"
placeholder="{placeholder}"
translateWithId="{translateWithId}"
{...$$restProps}
on:change
on:focus