-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2450 from skeletonlabs/dev
Merge for release - Jan 30, 2024
- Loading branch information
Showing
13 changed files
with
156 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@skeletonlabs/skeleton": patch | ||
--- | ||
|
||
bugfix: Removed recursive-tree-view's unused props for `disabled` and `open` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@skeletonlabs/skeleton": minor | ||
--- | ||
|
||
feat: InputChips now allow you to add/remove chips programatically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@skeletonlabs/skeleton": patch | ||
--- | ||
|
||
bugfix: CodeBlock copy button type is now `button` instead of default (`submit`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@skeletonlabs/skeleton": patch | ||
--- | ||
|
||
bugfix: added `label` prop to InputChips to provide aria-label for a11y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@skeletonlabs/skeleton": patch | ||
--- | ||
|
||
chore: Applied `@html` interpretation to Autocomplete empty state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ | |
let emails = ['[email protected]', '[email protected]', '[email protected]']; | ||
let musicalGenres = ['rock', 'r&b', 'pop']; | ||
let musicalGenresWhitelist = ['rock', 'pop', 'hip-hop', 'metal', 'techno', 'r&b']; | ||
let manualList: string[] = []; | ||
let manualInputChip: InputChip; | ||
const toastStore = getToastStore(); | ||
function isValidEmail(value: string): boolean { | ||
|
@@ -161,6 +163,50 @@ function onInvalidHandler(event: any): void { | |
</svelte:fragment> | ||
</DocsPreview> | ||
</section> | ||
<!-- Add/Remove Chips Programatically --> | ||
<section class="space-y-4"> | ||
<h2 class="h2">Add / Remove Chips</h2> | ||
<p> | ||
To add or remove chips programatically, use the exported functions <code class="code">addChip</code> and | ||
<code class="code">removeChip</code> after binding the ChipInput. | ||
</p> | ||
<DocsPreview background="neutral"> | ||
<svelte:fragment slot="preview"> | ||
<InputChip | ||
bind:this={manualInputChip} | ||
bind:value={manualList} | ||
name="chips-example-programatic" | ||
placeholder="Enter number..." | ||
chips="variant-filled-tertiary" | ||
/> | ||
</svelte:fragment> | ||
<svelte:fragment slot="footer"> | ||
<div class="text-center"> | ||
<button type="button" class="btn variant-filled" on:click={() => manualInputChip.removeChip(manualList[-1])} | ||
>Remove LastChip</button | ||
> | ||
<button | ||
type="button" | ||
class="btn variant-filled" | ||
on:click={() => manualInputChip.addChip((Math.floor(Math.random() * 10000) + 1).toString())}>Add Random Number</button | ||
> | ||
</div> | ||
</svelte:fragment> | ||
<svelte:fragment slot="source"> | ||
<CodeBlock | ||
language="ts" | ||
code={` | ||
let inputChip: InputChip; | ||
// add chip manually | ||
inputChip.addChip('chipValue'); | ||
// remove chip manually | ||
inputChip.removeChip('chipValue'); | ||
`} | ||
/> | ||
<CodeBlock language="html" code={`<InputChip ... bind:this={inputChip} />`} /> | ||
</svelte:fragment> | ||
</DocsPreview> | ||
</section> | ||
<!-- Additional Settings --> | ||
<section class="space-y-4"> | ||
<h2 class="h2">Additional Settings</h2> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters