@casinogate/ui 2.0.0 → 2.0.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/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.js +1 -0
- package/dist/primitives/input-password/components/index.d.ts +1 -0
- package/dist/primitives/input-password/components/index.js +1 -0
- package/dist/primitives/input-password/components/input-password.svelte +34 -0
- package/dist/primitives/input-password/components/input-password.svelte.d.ts +4 -0
- package/dist/primitives/input-password/index.d.ts +2 -0
- package/dist/primitives/input-password/index.js +1 -0
- package/dist/primitives/input-password/types.d.ts +4 -0
- package/dist/primitives/input-password/types.js +1 -0
- package/package.json +6 -1
|
@@ -14,6 +14,7 @@ export * from './dropdown/index.js';
|
|
|
14
14
|
export * from './field/index.js';
|
|
15
15
|
export * from './file-upload/index.js';
|
|
16
16
|
export * from './input/index.js';
|
|
17
|
+
export * from './input-password/index.js';
|
|
17
18
|
export * from './kbd/index.js';
|
|
18
19
|
export * from './navigation/index.js';
|
|
19
20
|
export * from './number-input/index.js';
|
package/dist/primitives/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export * from './dropdown/index.js';
|
|
|
14
14
|
export * from './field/index.js';
|
|
15
15
|
export * from './file-upload/index.js';
|
|
16
16
|
export * from './input/index.js';
|
|
17
|
+
export * from './input-password/index.js';
|
|
17
18
|
export * from './kbd/index.js';
|
|
18
19
|
export * from './navigation/index.js';
|
|
19
20
|
export * from './number-input/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as InputPassword } from './input-password.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as InputPassword } from './input-password.svelte';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Icon } from '../../../atomic/icons/index.js';
|
|
3
|
+
import { cn } from '../../../internal/utils/tailwindcss.js';
|
|
4
|
+
import { Input } from '../../input/index.js';
|
|
5
|
+
import type { InputPasswordProps } from '../types.js';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
showPassword = $bindable(false),
|
|
10
|
+
value = $bindable(''),
|
|
11
|
+
...restProps
|
|
12
|
+
}: InputPasswordProps = $props();
|
|
13
|
+
|
|
14
|
+
const type = $derived(showPassword ? 'text' : 'password');
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Input bind:ref bind:value {type} {...restProps}>
|
|
18
|
+
{#snippet endChevron()}
|
|
19
|
+
<button
|
|
20
|
+
type="button"
|
|
21
|
+
onclick={() => (showPassword = !showPassword)}
|
|
22
|
+
class={cn(
|
|
23
|
+
'cgui:cursor-pointer cgui:p-0 cgui:flex cgui:items-center cgui:justify-center cgui:bg-transparent cgui:border-none',
|
|
24
|
+
'cgui:focus-visible:ring-stroke-focus cgui:focus-visible:border-stroke-focus cgui:outline-stroke-focus'
|
|
25
|
+
)}
|
|
26
|
+
>
|
|
27
|
+
{#if showPassword}
|
|
28
|
+
<Icon.Eye width={20} height={20} />
|
|
29
|
+
{:else}
|
|
30
|
+
<Icon.EyeCrossed width={20} height={20} />
|
|
31
|
+
{/if}
|
|
32
|
+
</button>
|
|
33
|
+
{/snippet}
|
|
34
|
+
</Input>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casinogate/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"svelte": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -261,6 +261,11 @@
|
|
|
261
261
|
"svelte": "./dist/primitives/input/index.js",
|
|
262
262
|
"default": "./dist/primitives/input/index.js"
|
|
263
263
|
},
|
|
264
|
+
"./primitives/input-password": {
|
|
265
|
+
"types": "./dist/primitives/input-password/index.d.ts",
|
|
266
|
+
"svelte": "./dist/primitives/input-password/index.js",
|
|
267
|
+
"default": "./dist/primitives/input-password/index.js"
|
|
268
|
+
},
|
|
264
269
|
"./primitives/kbd": {
|
|
265
270
|
"types": "./dist/primitives/kbd/index.d.ts",
|
|
266
271
|
"svelte": "./dist/primitives/kbd/index.js",
|