-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
80 additions
and
3 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
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,12 @@ | ||
import type { SvelteComponentTyped } from 'svelte' | ||
|
||
declare module 'svelte-tags-input' { | ||
// https://github.com/agustinl/svelte-tags-input/blob/master/README.md | ||
export default class extends SvelteComponentTyped<{ | ||
tags: string[] | ||
allowPaste?: boolean | ||
allowDrop?: boolean | ||
splitWith?: string | ||
addKeys?: number[] | ||
}> {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script lang="ts"> | ||
import Tags from 'svelte-tags-input' | ||
export let tags: string[] = [] | ||
export let allowPaste: boolean = true | ||
export let allowDrop: boolean = true | ||
export let splitWith: string = ' ' | ||
export let addKeys: number[] = [13, 32] | ||
</script> | ||
|
||
<span> | ||
<Tags bind:tags {allowPaste} {allowDrop} {splitWith} {addKeys} /> | ||
</span> | ||
|
||
<style scoped lang="scss"> | ||
.hs-form-field { | ||
& :global(.svelte-tags-input-tag), | ||
& :global(.svelte-tags-input) { | ||
@apply text-xl; | ||
@apply items-center; | ||
} | ||
& :global(.svelte-tags-input-layout), | ||
& :global(.svelte-tags-input-layout):hover { | ||
border-radius: var(--hs-form-field-radius, var(--hs-theme-radius-small)); | ||
padding: var( | ||
--hs-form-field-padding, | ||
var(--hs-theme-padding-lg) var(--hs-theme-padding-xl) | ||
); | ||
padding-top: calc(var(--hs-theme-padding-lg) - 5px); | ||
border-width: var(--hs-form-field-border-width, var(--hs-theme-stroke)); | ||
border-style: var(--hs-form-field-border-style, solid); | ||
outline: none; | ||
background-color: var(--hs-form-field-fill, var(--hs-theme-primary-300)); | ||
color: var(--hs-form-field-ink, var(--hs-theme-surface-ink)); | ||
border-color: var(--hs-form-field-border, var(--hs-theme-surface-200)); | ||
} | ||
& :global(.svelte-tags-input-layout):hover { | ||
--hs-form-field-border: var(--hs-theme-accent-400); | ||
} | ||
} | ||
</style> |
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 |
---|---|---|
|
@@ -305,4 +305,8 @@ export const Strings = { | |
en: `Post`, | ||
ja: `投稿`, | ||
}, | ||
Tags: { | ||
en: `Tags`, | ||
ja: `タグ`, | ||
}, | ||
} satisfies ClubsI18nParts |
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