mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix: CopyButton
text prop and Dropdown
selectedId prop should be required (#1311)
* chore(deps-dev): upgrade sveld to v0.17.0 * fix(copy-button): text prop is required * fix(dropdown): selectedId prop is required * Run "yarn build:docs" * docs: display "Required" tag for required props
This commit is contained in:
parent
e70f925902
commit
04d758f869
9 changed files with 2147 additions and 1215 deletions
2410
COMPONENT_INDEX.md
2410
COMPONENT_INDEX.md
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -68,13 +68,18 @@
|
||||||
<InlineSnippet code="{prop.name}" />
|
<InlineSnippet code="{prop.name}" />
|
||||||
{#if prop.reactive}
|
{#if prop.reactive}
|
||||||
<div
|
<div
|
||||||
style="white-space: nowrap; margin-top: var(--cds-spacing-03); margin-bottom: var(--cds-spacing-03)"
|
style="white-space: nowrap; margin-top: var(--cds-spacing-03); margin-bottom: var(--cds-spacing-{prop.isRequired
|
||||||
|
? '01'
|
||||||
|
: '03'})"
|
||||||
>
|
>
|
||||||
<Tag style="margin-left: 0" size="sm" type="cyan">
|
<Tag style="margin-left: 0" size="sm" type="cyan">
|
||||||
Reactive
|
Reactive
|
||||||
</Tag>
|
</Tag>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if prop.isRequired}
|
||||||
|
<Tag size="sm" type="magenta">Required</Tag>
|
||||||
|
{/if}
|
||||||
</StructuredListCell>
|
</StructuredListCell>
|
||||||
<StructuredListCell>
|
<StructuredListCell>
|
||||||
{#each (prop.type || "").split(" | ") as type, i (type)}
|
{#each (prop.type || "").split(" | ") as type, i (type)}
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"rollup-plugin-svelte": "^7.1.0",
|
"rollup-plugin-svelte": "^7.1.0",
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"sass": "^1.49.11",
|
"sass": "^1.49.11",
|
||||||
"sveld": "^0.15.3",
|
"sveld": "^0.17.0",
|
||||||
"svelte": "^3.46.6",
|
"svelte": "^3.46.6",
|
||||||
"svelte-check": "^2.4.6",
|
"svelte-check": "^2.4.6",
|
||||||
"typescript": "^4.6.3"
|
"typescript": "^4.6.3"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
* Specify the text to copy
|
* Specify the text to copy
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
export let text = undefined;
|
export let text;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default copy behavior of using the navigator.clipboard.writeText API to copy text
|
* Override the default copy behavior of using the navigator.clipboard.writeText API to copy text
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
* Specify the selected item id
|
* Specify the selected item id
|
||||||
* @type {DropdownItemId}
|
* @type {DropdownItemId}
|
||||||
*/
|
*/
|
||||||
export let selectedId = undefined;
|
export let selectedId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the type of dropdown
|
* Specify the type of dropdown
|
||||||
|
|
2
types/CopyButton/CopyButton.svelte.d.ts
vendored
2
types/CopyButton/CopyButton.svelte.d.ts
vendored
|
@ -25,7 +25,7 @@ export interface CopyButtonProps
|
||||||
* Specify the text to copy
|
* Specify the text to copy
|
||||||
* @default undefined
|
* @default undefined
|
||||||
*/
|
*/
|
||||||
text?: string;
|
text: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default copy behavior of using the navigator.clipboard.writeText API to copy text
|
* Override the default copy behavior of using the navigator.clipboard.writeText API to copy text
|
||||||
|
|
2
types/Dropdown/Dropdown.svelte.d.ts
vendored
2
types/Dropdown/Dropdown.svelte.d.ts
vendored
|
@ -28,7 +28,7 @@ export interface DropdownProps
|
||||||
* Specify the selected item id
|
* Specify the selected item id
|
||||||
* @default undefined
|
* @default undefined
|
||||||
*/
|
*/
|
||||||
selectedId?: DropdownItemId;
|
selectedId: DropdownItemId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the type of dropdown
|
* Specify the type of dropdown
|
||||||
|
|
|
@ -1330,10 +1330,10 @@ supports-color@^9.2.1:
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.2.2.tgz#502acaf82f2b7ee78eb7c83dcac0f89694e5a7bb"
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.2.2.tgz#502acaf82f2b7ee78eb7c83dcac0f89694e5a7bb"
|
||||||
integrity sha512-XC6g/Kgux+rJXmwokjm9ECpD6k/smUoS5LKlUCcsYr4IY3rW0XyAympon2RmxGrlnZURMpg5T18gWDP9CsHXFA==
|
integrity sha512-XC6g/Kgux+rJXmwokjm9ECpD6k/smUoS5LKlUCcsYr4IY3rW0XyAympon2RmxGrlnZURMpg5T18gWDP9CsHXFA==
|
||||||
|
|
||||||
sveld@^0.15.3:
|
sveld@^0.17.0:
|
||||||
version "0.15.3"
|
version "0.17.0"
|
||||||
resolved "https://registry.yarnpkg.com/sveld/-/sveld-0.15.3.tgz#75fe72f472b9cfbe863f6f0b074612d4132dc960"
|
resolved "https://registry.yarnpkg.com/sveld/-/sveld-0.17.0.tgz#af1f3d24a507d7bc84a356bf7f5c4b599ea444c2"
|
||||||
integrity sha512-3TYhrLpm8z8elnZ6ffQeq1SeoxzC2zsFY/9QeNHu1UcQxAZ6LqfyUufnOkNkelYJMq9uBn4bGUAYJpbpTMjnOA==
|
integrity sha512-OB15S0KyT033fXsZL9hnyuQDaSvpuRQs4CwIRVVnwbLy6IbBQyvNl9LG7Cu7z982qoYY3AMkZ0GzjpTtiMI4OQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@rollup/plugin-node-resolve" "^13.2.1"
|
"@rollup/plugin-node-resolve" "^13.2.1"
|
||||||
acorn "^8.7.0"
|
acorn "^8.7.0"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue