@geoffcox/sterling-svelte 0.0.4 → 0.0.5
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/buttons/Button.svelte +1 -1
- package/buttons/Button.svelte.d.ts +1 -1
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/inputs/Checkbox.svelte +13 -2
- package/inputs/Checkbox.svelte.d.ts +2 -0
- package/inputs/Input.svelte +4 -0
- package/inputs/Input.svelte.d.ts +1 -0
- package/inputs/Radio.svelte +4 -0
- package/inputs/Radio.svelte.d.ts +1 -0
- package/package.json +1 -1
package/buttons/Button.svelte
CHANGED
|
@@ -42,7 +42,7 @@ declare const __propDef: {
|
|
|
42
42
|
export type ButtonProps = typeof __propDef.props;
|
|
43
43
|
export type ButtonEvents = typeof __propDef.events;
|
|
44
44
|
export type ButtonSlots = typeof __propDef.slots;
|
|
45
|
-
/**
|
|
45
|
+
/** A styled HTML button element. */
|
|
46
46
|
export default class Button extends SvelteComponentTyped<ButtonProps, ButtonEvents, ButtonSlots> {
|
|
47
47
|
}
|
|
48
48
|
export {};
|
package/index.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ export { toggleDarkTheme } from './theme/toggleDarkTheme';
|
|
|
9
9
|
export { type ButtonVariant, type ButtonShape } from './buttons/types';
|
|
10
10
|
import Button from './buttons/Button.svelte';
|
|
11
11
|
import Input from './inputs/Input.svelte';
|
|
12
|
-
|
|
12
|
+
import Checkbox from './inputs/Checkbox.svelte';
|
|
13
|
+
export { Button, Checkbox, Input };
|
package/index.js
CHANGED
|
@@ -9,4 +9,5 @@ export { toggleDarkTheme } from './theme/toggleDarkTheme';
|
|
|
9
9
|
export {} from './buttons/types';
|
|
10
10
|
import Button from './buttons/Button.svelte';
|
|
11
11
|
import Input from './inputs/Input.svelte';
|
|
12
|
-
|
|
12
|
+
import Checkbox from './inputs/Checkbox.svelte';
|
|
13
|
+
export { Button, Checkbox, Input };
|
package/inputs/Checkbox.svelte
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<script>export let checked = false;
|
|
2
|
+
export let disabled = false;
|
|
2
3
|
</script>
|
|
3
4
|
|
|
5
|
+
<!--
|
|
6
|
+
@component
|
|
7
|
+
A styled HTML input type=checkbox element.
|
|
8
|
+
-->
|
|
4
9
|
<!-- svelte-ignore a11y-label-has-associated-control -->
|
|
5
10
|
<label class="sterling-checkbox">
|
|
6
11
|
<div class="container">
|
|
@@ -28,10 +33,11 @@
|
|
|
28
33
|
on:wheel
|
|
29
34
|
bind:checked
|
|
30
35
|
{...$$restProps}
|
|
36
|
+
{disabled}
|
|
31
37
|
/>
|
|
32
38
|
<div class="indicator" />
|
|
33
39
|
</div>
|
|
34
|
-
<div class="label-content">
|
|
40
|
+
<div class="label-content" class:disabled>
|
|
35
41
|
<slot />
|
|
36
42
|
</div>
|
|
37
43
|
</label>
|
|
@@ -133,8 +139,13 @@
|
|
|
133
139
|
}
|
|
134
140
|
|
|
135
141
|
.label-content {
|
|
136
|
-
color: var(--
|
|
142
|
+
color: var(--Input__color);
|
|
137
143
|
user-select: none;
|
|
138
144
|
margin-top: 0.25em;
|
|
145
|
+
transition: background-color 250ms, color 250ms, border-color 250ms;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.label-content.disabled {
|
|
149
|
+
color: var(--Input__color--disabled);
|
|
139
150
|
}
|
|
140
151
|
</style>
|
|
@@ -3,6 +3,7 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
checked?: boolean | undefined;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
6
7
|
};
|
|
7
8
|
events: {
|
|
8
9
|
blur: FocusEvent;
|
|
@@ -35,6 +36,7 @@ declare const __propDef: {
|
|
|
35
36
|
export type CheckboxProps = typeof __propDef.props;
|
|
36
37
|
export type CheckboxEvents = typeof __propDef.events;
|
|
37
38
|
export type CheckboxSlots = typeof __propDef.slots;
|
|
39
|
+
/** A styled HTML input type=checkbox element. */
|
|
38
40
|
export default class Checkbox extends SvelteComponentTyped<CheckboxProps, CheckboxEvents, CheckboxSlots> {
|
|
39
41
|
}
|
|
40
42
|
export {};
|
package/inputs/Input.svelte
CHANGED
package/inputs/Input.svelte.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ declare const __propDef: {
|
|
|
41
41
|
export type InputProps = typeof __propDef.props;
|
|
42
42
|
export type InputEvents = typeof __propDef.events;
|
|
43
43
|
export type InputSlots = typeof __propDef.slots;
|
|
44
|
+
/** A styled HTML input element with optional label. */
|
|
44
45
|
export default class Input extends SvelteComponentTyped<InputProps, InputEvents, InputSlots> {
|
|
45
46
|
}
|
|
46
47
|
export {};
|
package/inputs/Radio.svelte
CHANGED
package/inputs/Radio.svelte.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ declare const __propDef: {
|
|
|
36
36
|
export type RadioProps = typeof __propDef.props;
|
|
37
37
|
export type RadioEvents = typeof __propDef.events;
|
|
38
38
|
export type RadioSlots = typeof __propDef.slots;
|
|
39
|
+
/** A styled HTML input type=radio element with optional label. */
|
|
39
40
|
export default class Radio extends SvelteComponentTyped<RadioProps, RadioEvents, RadioSlots> {
|
|
40
41
|
}
|
|
41
42
|
export {};
|