noph-ui 0.7.7 → 0.7.8
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/README.md
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
indeterminate = $bindable(),
|
|
7
7
|
checked = $bindable(),
|
|
8
8
|
element = $bindable(),
|
|
9
|
+
style,
|
|
9
10
|
...attributes
|
|
10
11
|
}: CheckboxProps = $props()
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
|
-
<div class={['np-host', attributes.class]} bind:this={element}>
|
|
14
|
+
<div {style} class={['np-host', attributes.class]} bind:this={element}>
|
|
14
15
|
<div class="np-container">
|
|
15
16
|
<label class="np-input-wrapper">
|
|
16
17
|
<input
|
package/dist/radio/Radio.svelte
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import Ripple from '../ripple/Ripple.svelte'
|
|
3
3
|
import type { RadioProps } from './types.ts'
|
|
4
4
|
|
|
5
|
-
let { ...attributes }: RadioProps = $props()
|
|
5
|
+
let { element = $bindable(), style, ...attributes }: RadioProps = $props()
|
|
6
6
|
|
|
7
7
|
let touchEl: HTMLSpanElement | undefined = $state()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
|
-
<label class=
|
|
10
|
+
<label {style} class={['np-host', attributes.class]} bind:this={element}>
|
|
11
11
|
<input {...attributes} type="radio" class="np-input" />
|
|
12
12
|
<div class="np-container" aria-hidden="true">
|
|
13
13
|
{#if !attributes.disabled}
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
position: relative;
|
|
44
44
|
display: inline-flex;
|
|
45
45
|
vertical-align: top;
|
|
46
|
-
width: 20px;
|
|
47
|
-
height: 20px;
|
|
46
|
+
width: var(--np-radio-icon-size, 20px);
|
|
47
|
+
height: var(--np-radio-icon-size, 20px);
|
|
48
48
|
cursor: pointer;
|
|
49
49
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
50
50
|
outline: none;
|
package/dist/radio/types.d.ts
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
: !label?.length
|
|
66
66
|
? '--top-space:1rem;--bottom-space:1rem;'
|
|
67
67
|
: '') + style}
|
|
68
|
-
class=
|
|
68
|
+
class={['text-field', attributes.class]}
|
|
69
69
|
bind:this={element}
|
|
70
70
|
>
|
|
71
71
|
<div
|
|
@@ -112,11 +112,11 @@
|
|
|
112
112
|
<div class="content">
|
|
113
113
|
{#if attributes.type === 'textarea'}
|
|
114
114
|
<textarea
|
|
115
|
+
aria-label={label}
|
|
115
116
|
{...attributes}
|
|
116
117
|
bind:value
|
|
117
118
|
bind:this={textElement}
|
|
118
119
|
class="input"
|
|
119
|
-
aria-label={label}
|
|
120
120
|
{placeholder}
|
|
121
121
|
rows={attributes.rows || 2}
|
|
122
122
|
></textarea>
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
</span>
|
|
129
129
|
{/if}
|
|
130
130
|
<input
|
|
131
|
+
aria-label={label}
|
|
131
132
|
{...attributes}
|
|
132
133
|
bind:value
|
|
133
134
|
bind:this={textElement}
|
|
134
135
|
class="input"
|
|
135
136
|
{placeholder}
|
|
136
|
-
aria-label={label}
|
|
137
137
|
aria-invalid={error}
|
|
138
138
|
/>
|
|
139
139
|
{#if suffixText}
|
|
@@ -13,10 +13,10 @@ interface FieldProps {
|
|
|
13
13
|
noAsterisk?: boolean;
|
|
14
14
|
element?: HTMLSpanElement;
|
|
15
15
|
}
|
|
16
|
-
export interface InputFieldProps extends
|
|
16
|
+
export interface InputFieldProps extends HTMLInputAttributes, FieldProps {
|
|
17
17
|
type?: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url';
|
|
18
18
|
}
|
|
19
|
-
export interface TextAreaFieldProps extends
|
|
19
|
+
export interface TextAreaFieldProps extends HTMLTextareaAttributes, FieldProps {
|
|
20
20
|
type: 'textarea';
|
|
21
21
|
}
|
|
22
22
|
export type TextFieldProps = InputFieldProps | TextAreaFieldProps;
|