@neumorphism-ui/elements 1.0.0-next.2 → 1.0.0-next.3
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/cdn/neu.min.js +31 -39
- package/custom-elements.json +495 -248
- package/dist/components/avatar/avatar.d.ts +0 -3
- package/dist/components/avatar/avatar.def.d.ts +0 -3
- package/dist/components/avatar/avatar.def.js +4 -18
- package/dist/components/avatar/avatar.docs.d.ts +2 -0
- package/dist/components/avatar/avatar.docs.js +22 -0
- package/dist/components/avatar/avatar.js +7 -1
- package/dist/components/badge/badge.d.ts +0 -2
- package/dist/components/badge/badge.def.d.ts +0 -2
- package/dist/components/badge/badge.def.js +1 -14
- package/dist/components/badge/badge.docs.d.ts +2 -0
- package/dist/components/badge/badge.docs.js +17 -0
- package/dist/components/button/button.def.d.ts +0 -5
- package/dist/components/button/button.def.js +3 -25
- package/dist/components/button/button.docs.d.ts +2 -0
- package/dist/components/button/button.docs.js +29 -0
- package/dist/components/button-group/button-group.d.ts +0 -2
- package/dist/components/button-group/button-group.def.d.ts +0 -2
- package/dist/components/button-group/button-group.def.js +1 -10
- package/dist/components/button-group/button-group.docs.d.ts +2 -0
- package/dist/components/button-group/button-group.docs.js +13 -0
- package/dist/components/checkbox/checkbox.d.ts +1 -5
- package/dist/components/checkbox/checkbox.def.d.ts +1 -5
- package/dist/components/checkbox/checkbox.def.js +6 -22
- package/dist/components/checkbox/checkbox.docs.d.ts +2 -0
- package/dist/components/checkbox/checkbox.docs.js +27 -0
- package/dist/components/divider/divider.d.ts +0 -1
- package/dist/components/divider/divider.def.d.ts +0 -1
- package/dist/components/divider/divider.def.js +0 -9
- package/dist/components/divider/divider.docs.d.ts +2 -0
- package/dist/components/divider/divider.docs.js +12 -0
- package/dist/components/icon/icon.d.ts +0 -3
- package/dist/components/icon/icon.def.d.ts +0 -3
- package/dist/components/icon/icon.def.js +3 -10
- package/dist/components/icon/icon.docs.d.ts +2 -0
- package/dist/components/icon/icon.docs.js +13 -0
- package/dist/components/icon/system-icons.d.ts +1 -1
- package/dist/components/icon/system-icons.js +3 -3
- package/dist/components/icon-button/icon-button.d.ts +0 -5
- package/dist/components/icon-button/icon-button.def.d.ts +0 -5
- package/dist/components/icon-button/icon-button.def.js +3 -17
- package/dist/components/icon-button/icon-button.docs.d.ts +2 -0
- package/dist/components/icon-button/icon-button.docs.js +26 -0
- package/dist/components/number-field/number-field.d.ts +0 -5
- package/dist/components/number-field/number-field.def.d.ts +0 -10
- package/dist/components/number-field/number-field.def.js +5 -27
- package/dist/components/number-field/number-field.docs.d.ts +2 -0
- package/dist/components/number-field/number-field.docs.js +45 -0
- package/dist/components/number-field/number-field.js +2 -2
- package/dist/components/number-field/number-field.styles.d.ts +1 -1
- package/dist/components/option/option.d.ts +0 -2
- package/dist/components/option/option.def.d.ts +0 -2
- package/dist/components/option/option.def.js +2 -9
- package/dist/components/option/option.docs.d.ts +2 -0
- package/dist/components/option/option.docs.js +12 -0
- package/dist/components/radio/radio.d.ts +0 -2
- package/dist/components/radio/radio.def.d.ts +0 -2
- package/dist/components/radio/radio.def.js +2 -15
- package/dist/components/radio/radio.docs.d.ts +2 -0
- package/dist/components/radio/radio.docs.js +18 -0
- package/dist/components/radio-group/radio-group.d.ts +3 -4
- package/dist/components/radio-group/radio-group.def.d.ts +0 -4
- package/dist/components/radio-group/radio-group.def.js +4 -19
- package/dist/components/radio-group/radio-group.docs.d.ts +2 -0
- package/dist/components/radio-group/radio-group.docs.js +37 -0
- package/dist/components/radio-group/radio-group.js +28 -4
- package/dist/components/radio-group/radio-group.styles.d.ts +1 -1
- package/dist/components/radio-group/radio-group.styles.js +3 -5
- package/dist/components/select/select.d.ts +1 -5
- package/dist/components/select/select.def.d.ts +0 -4
- package/dist/components/select/select.def.js +5 -29
- package/dist/components/select/select.docs.d.ts +2 -0
- package/dist/components/select/select.docs.js +65 -0
- package/dist/components/select/select.js +16 -10
- package/dist/components/select/select.styles.d.ts +1 -1
- package/dist/components/select/select.styles.js +1 -5
- package/dist/components/shared/field.styles.d.ts +1 -1
- package/dist/components/shared/field.styles.js +2 -4
- package/dist/components/slider/slider.d.ts +0 -2
- package/dist/components/slider/slider.def.d.ts +0 -2
- package/dist/components/slider/slider.def.js +2 -24
- package/dist/components/slider/slider.docs.d.ts +2 -0
- package/dist/components/slider/slider.docs.js +45 -0
- package/dist/components/spinner/spinner.d.ts +0 -1
- package/dist/components/spinner/spinner.def.d.ts +0 -1
- package/dist/components/spinner/spinner.def.js +1 -13
- package/dist/components/spinner/spinner.docs.d.ts +2 -0
- package/dist/components/spinner/spinner.docs.js +17 -0
- package/dist/components/surface/surface.d.ts +0 -4
- package/dist/components/surface/surface.def.d.ts +0 -4
- package/dist/components/surface/surface.def.js +3 -12
- package/dist/components/surface/surface.docs.d.ts +2 -0
- package/dist/components/surface/surface.docs.js +15 -0
- package/dist/components/switch/switch.d.ts +0 -5
- package/dist/components/switch/switch.def.d.ts +0 -5
- package/dist/components/switch/switch.def.js +5 -21
- package/dist/components/switch/switch.docs.d.ts +2 -0
- package/dist/components/switch/switch.docs.js +26 -0
- package/dist/components/text-field/text-field.d.ts +0 -6
- package/dist/components/text-field/text-field.def.d.ts +0 -12
- package/dist/components/text-field/text-field.def.js +5 -30
- package/dist/components/text-field/text-field.docs.d.ts +2 -0
- package/dist/components/text-field/text-field.docs.js +45 -0
- package/dist/components/text-field/text-field.js +2 -2
- package/dist/components/text-field/text-field.styles.d.ts +1 -1
- package/dist/components/textarea/textarea.d.ts +0 -6
- package/dist/components/textarea/textarea.def.d.ts +0 -12
- package/dist/components/textarea/textarea.def.js +5 -26
- package/dist/components/textarea/textarea.docs.d.ts +2 -0
- package/dist/components/textarea/textarea.docs.js +40 -0
- package/dist/components/textarea/textarea.styles.d.ts +1 -1
- package/dist/components/theme-docs.d.ts +3 -0
- package/dist/components/theme-docs.js +8 -0
- package/dist/core/define.d.ts +4 -1
- package/dist/core/dom.d.ts +4 -0
- package/dist/core/dom.js +7 -0
- package/dist/core/form-control.js +4 -1
- package/dist/core/neu-element.d.ts +2 -2
- package/dist/core/neu-element.js +10 -7
- package/dist/core/props.d.ts +13 -1
- package/dist/core/props.js +13 -3
- package/dist/core/styles.d.ts +0 -2
- package/dist/core/styles.js +0 -7
- package/dist/docs.d.ts +3 -0
- package/dist/docs.js +41 -0
- package/dist/ssr.d.ts +1 -1
- package/dist/ssr.js +1 -1
- package/package.json +5 -1
|
@@ -5,20 +5,13 @@ import { systemIconSvg } from './system-icons.js';
|
|
|
5
5
|
export const iconDef = defineComponent({
|
|
6
6
|
tag: 'neu-icon',
|
|
7
7
|
props: {
|
|
8
|
-
name: { type: 'string'
|
|
9
|
-
library: { type: 'string', default: 'system'
|
|
10
|
-
label: { type: 'string'
|
|
8
|
+
name: { type: 'string' },
|
|
9
|
+
library: { type: 'string', default: 'system' },
|
|
10
|
+
label: { type: 'string' },
|
|
11
11
|
},
|
|
12
12
|
styles: iconStyles,
|
|
13
13
|
template: (p) => {
|
|
14
14
|
const svg = p.library === 'system' ? systemIconSvg(p.name) : undefined;
|
|
15
15
|
return html `<span class="box" data-ref="box">${svg === undefined ? '' : unsafeHTML(svg)}</span>`;
|
|
16
16
|
},
|
|
17
|
-
docs: {
|
|
18
|
-
summary: 'A vector icon from the built-in set or a registered icon library.',
|
|
19
|
-
events: [],
|
|
20
|
-
slots: [],
|
|
21
|
-
parts: [{ name: 'svg', description: 'The rendered SVG element.' }],
|
|
22
|
-
cssProperties: [],
|
|
23
|
-
},
|
|
24
17
|
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const iconDocs = {
|
|
2
|
+
summary: 'A vector icon from the built-in set or a registered icon library.',
|
|
3
|
+
descriptions: {
|
|
4
|
+
name: 'The name of the icon to show.',
|
|
5
|
+
library: 'The icon library to take the icon from; defaults to the built-in system set.',
|
|
6
|
+
label: 'Accessible name that turns the icon into an image; without it the icon is decorative.',
|
|
7
|
+
},
|
|
8
|
+
events: [],
|
|
9
|
+
slots: [],
|
|
10
|
+
parts: [{ name: 'svg', description: 'The rendered SVG element.' }],
|
|
11
|
+
cssProperties: [],
|
|
12
|
+
keyboard: [],
|
|
13
|
+
};
|
|
@@ -7,6 +7,6 @@ export declare const xBody = "<path d=\"M6 6l12 12M18 6L6 18\"/>";
|
|
|
7
7
|
export declare const alertCircleBody = "<circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M12 7.5v5.5M12 16.5h.01\"/>";
|
|
8
8
|
export declare const userBody = "<circle cx=\"12\" cy=\"8\" r=\"4\"/><path d=\"M4 20c0-4 3.6-6 8-6s8 2 8 6\"/>";
|
|
9
9
|
/** The SVG element around an icon body. DOM-free. */
|
|
10
|
-
export declare function svgWrap(body: string): string;
|
|
10
|
+
export declare function svgWrap(body: string, part?: string): string;
|
|
11
11
|
/** The built-in icon as an SVG string, or undefined for an unknown name. DOM-free. */
|
|
12
12
|
export declare function systemIconSvg(name: string): string | undefined;
|
|
@@ -18,11 +18,11 @@ const BODIES = {
|
|
|
18
18
|
user: userBody,
|
|
19
19
|
};
|
|
20
20
|
/** The SVG element around an icon body. DOM-free. */
|
|
21
|
-
export function svgWrap(body) {
|
|
22
|
-
return `<svg part="
|
|
21
|
+
export function svgWrap(body, part) {
|
|
22
|
+
return `<svg${part ? ` part="${part}"` : ''} viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">${body}</svg>`;
|
|
23
23
|
}
|
|
24
24
|
/** The built-in icon as an SVG string, or undefined for an unknown name. DOM-free. */
|
|
25
25
|
export function systemIconSvg(name) {
|
|
26
26
|
const body = Object.hasOwn(BODIES, name) ? BODIES[name] : undefined;
|
|
27
|
-
return body === undefined ? undefined : svgWrap(body);
|
|
27
|
+
return body === undefined ? undefined : svgWrap(body, 'svg');
|
|
28
28
|
}
|
|
@@ -15,29 +15,24 @@ export declare class NeuIconButton extends NeuButton {
|
|
|
15
15
|
readonly type: "string";
|
|
16
16
|
readonly default: "circle";
|
|
17
17
|
readonly values: readonly ["circle", "square"];
|
|
18
|
-
readonly reflect: true;
|
|
19
18
|
};
|
|
20
19
|
readonly variant: {
|
|
21
20
|
readonly type: "string";
|
|
22
21
|
readonly default: "default";
|
|
23
22
|
readonly values: readonly ["default", "primary", "flat"];
|
|
24
|
-
readonly reflect: true;
|
|
25
23
|
};
|
|
26
24
|
readonly size: {
|
|
27
25
|
readonly type: "string";
|
|
28
26
|
readonly default: "md";
|
|
29
27
|
readonly values: readonly ["sm", "md", "lg"];
|
|
30
|
-
readonly reflect: true;
|
|
31
28
|
};
|
|
32
29
|
readonly disabled: {
|
|
33
30
|
readonly type: "boolean";
|
|
34
|
-
readonly reflect: true;
|
|
35
31
|
};
|
|
36
32
|
readonly type: {
|
|
37
33
|
readonly type: "string";
|
|
38
34
|
readonly default: "button";
|
|
39
35
|
readonly values: readonly ["button", "submit", "reset"];
|
|
40
|
-
readonly reflect: true;
|
|
41
36
|
};
|
|
42
37
|
}>;
|
|
43
38
|
icon: string;
|
|
@@ -13,28 +13,23 @@ export declare const iconButtonDef: import("../../core/define.js").ComponentDef<
|
|
|
13
13
|
readonly type: "string";
|
|
14
14
|
readonly default: "circle";
|
|
15
15
|
readonly values: readonly ["circle", "square"];
|
|
16
|
-
readonly reflect: true;
|
|
17
16
|
};
|
|
18
17
|
readonly variant: {
|
|
19
18
|
readonly type: "string";
|
|
20
19
|
readonly default: "default";
|
|
21
20
|
readonly values: readonly ["default", "primary", "flat"];
|
|
22
|
-
readonly reflect: true;
|
|
23
21
|
};
|
|
24
22
|
readonly size: {
|
|
25
23
|
readonly type: "string";
|
|
26
24
|
readonly default: "md";
|
|
27
25
|
readonly values: readonly ["sm", "md", "lg"];
|
|
28
|
-
readonly reflect: true;
|
|
29
26
|
};
|
|
30
27
|
readonly disabled: {
|
|
31
28
|
readonly type: "boolean";
|
|
32
|
-
readonly reflect: true;
|
|
33
29
|
};
|
|
34
30
|
readonly type: {
|
|
35
31
|
readonly type: "string";
|
|
36
32
|
readonly default: "button";
|
|
37
33
|
readonly values: readonly ["button", "submit", "reset"];
|
|
38
|
-
readonly reflect: true;
|
|
39
34
|
};
|
|
40
35
|
}>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent } from '../../core/define.js';
|
|
2
2
|
import { html, unsafeHTML } from '../../core/html.js';
|
|
3
|
-
import { themeCssProperties } from '../../core/styles.js';
|
|
4
3
|
import { systemIconSvg } from '../icon/system-icons.js';
|
|
5
4
|
import { iconButtonStyles } from './icon-button.styles.js';
|
|
6
5
|
export const iconButtonDef = defineComponent({
|
|
@@ -9,20 +8,18 @@ export const iconButtonDef = defineComponent({
|
|
|
9
8
|
icon: { type: 'string' },
|
|
10
9
|
library: { type: 'string', default: 'system' },
|
|
11
10
|
label: { type: 'string' },
|
|
12
|
-
shape: { type: 'string', default: 'circle', values: ['circle', 'square']
|
|
11
|
+
shape: { type: 'string', default: 'circle', values: ['circle', 'square'] },
|
|
13
12
|
variant: {
|
|
14
13
|
type: 'string',
|
|
15
14
|
default: 'default',
|
|
16
15
|
values: ['default', 'primary', 'flat'],
|
|
17
|
-
reflect: true,
|
|
18
16
|
},
|
|
19
|
-
size: { type: 'string', default: 'md', values: ['sm', 'md', 'lg']
|
|
20
|
-
disabled: { type: 'boolean'
|
|
17
|
+
size: { type: 'string', default: 'md', values: ['sm', 'md', 'lg'] },
|
|
18
|
+
disabled: { type: 'boolean' },
|
|
21
19
|
type: {
|
|
22
20
|
type: 'string',
|
|
23
21
|
default: 'button',
|
|
24
22
|
values: ['button', 'submit', 'reset'],
|
|
25
|
-
reflect: true,
|
|
26
23
|
},
|
|
27
24
|
},
|
|
28
25
|
styles: iconButtonStyles,
|
|
@@ -30,15 +27,4 @@ export const iconButtonDef = defineComponent({
|
|
|
30
27
|
const svg = p.library === 'system' ? systemIconSvg(p.icon) : undefined;
|
|
31
28
|
return html `<span part="base" class="base"><span part="icon" class="icon" data-ref="icon">${svg === undefined ? '' : unsafeHTML(svg)}</span></span>`;
|
|
32
29
|
},
|
|
33
|
-
docs: {
|
|
34
|
-
summary: 'A raised button that shows an icon instead of a label. Name it with label.',
|
|
35
|
-
events: [{ name: 'click', description: 'Fired on activation; never while disabled.' }],
|
|
36
|
-
slots: [],
|
|
37
|
-
parts: [
|
|
38
|
-
{ name: 'base', description: 'The raised surface.' },
|
|
39
|
-
{ name: 'icon', description: 'Wrapper around the icon.' },
|
|
40
|
-
{ name: 'svg', description: 'The rendered SVG element.' },
|
|
41
|
-
],
|
|
42
|
-
cssProperties: themeCssProperties,
|
|
43
|
-
},
|
|
44
30
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { themeCssProperties } from '../theme-docs.js';
|
|
2
|
+
export const iconButtonDocs = {
|
|
3
|
+
summary: 'A raised button that shows an icon instead of a label. Name it with label.',
|
|
4
|
+
descriptions: {
|
|
5
|
+
icon: 'The name of the icon to show.',
|
|
6
|
+
library: 'The icon library to take the icon from; defaults to the built-in system set.',
|
|
7
|
+
label: 'Accessible name of the button, since it has no visible text.',
|
|
8
|
+
shape: 'The outline of the button.',
|
|
9
|
+
variant: 'The visual emphasis of the button.',
|
|
10
|
+
size: 'The button size.',
|
|
11
|
+
disabled: 'Prevents interaction and dims the button.',
|
|
12
|
+
type: 'What the button does inside a form; defaults to "button", which does nothing.',
|
|
13
|
+
},
|
|
14
|
+
events: [{ name: 'click', description: 'Fired on activation; never while disabled.' }],
|
|
15
|
+
slots: [],
|
|
16
|
+
parts: [
|
|
17
|
+
{ name: 'base', description: 'The raised surface.' },
|
|
18
|
+
{ name: 'icon', description: 'Wrapper around the icon.' },
|
|
19
|
+
{ name: 'svg', description: 'The rendered SVG element.' },
|
|
20
|
+
],
|
|
21
|
+
cssProperties: themeCssProperties,
|
|
22
|
+
keyboard: [
|
|
23
|
+
{ name: 'Enter', description: 'Activates the button on keydown.' },
|
|
24
|
+
{ name: 'Space', description: 'Activates the button on keyup, like a native button.' },
|
|
25
|
+
],
|
|
26
|
+
};
|
|
@@ -19,7 +19,6 @@ export declare class NeuNumberField extends TextControlElement {
|
|
|
19
19
|
};
|
|
20
20
|
readonly name: {
|
|
21
21
|
readonly type: "string";
|
|
22
|
-
readonly reflect: true;
|
|
23
22
|
};
|
|
24
23
|
readonly label: {
|
|
25
24
|
readonly type: "string";
|
|
@@ -35,22 +34,18 @@ export declare class NeuNumberField extends TextControlElement {
|
|
|
35
34
|
};
|
|
36
35
|
readonly required: {
|
|
37
36
|
readonly type: "boolean";
|
|
38
|
-
readonly reflect: true;
|
|
39
37
|
};
|
|
40
38
|
readonly disabled: {
|
|
41
39
|
readonly type: "boolean";
|
|
42
|
-
readonly reflect: true;
|
|
43
40
|
};
|
|
44
41
|
readonly readOnly: {
|
|
45
42
|
readonly type: "boolean";
|
|
46
|
-
readonly reflect: true;
|
|
47
43
|
readonly attribute: "readonly";
|
|
48
44
|
};
|
|
49
45
|
readonly size: {
|
|
50
46
|
readonly type: "string";
|
|
51
47
|
readonly default: "md";
|
|
52
48
|
readonly values: readonly ["sm", "md", "lg"];
|
|
53
|
-
readonly reflect: true;
|
|
54
49
|
};
|
|
55
50
|
readonly incrementLabel: {
|
|
56
51
|
readonly type: "string";
|
|
@@ -17,7 +17,6 @@ declare const props: {
|
|
|
17
17
|
};
|
|
18
18
|
readonly name: {
|
|
19
19
|
readonly type: "string";
|
|
20
|
-
readonly reflect: true;
|
|
21
20
|
};
|
|
22
21
|
readonly label: {
|
|
23
22
|
readonly type: "string";
|
|
@@ -33,22 +32,18 @@ declare const props: {
|
|
|
33
32
|
};
|
|
34
33
|
readonly required: {
|
|
35
34
|
readonly type: "boolean";
|
|
36
|
-
readonly reflect: true;
|
|
37
35
|
};
|
|
38
36
|
readonly disabled: {
|
|
39
37
|
readonly type: "boolean";
|
|
40
|
-
readonly reflect: true;
|
|
41
38
|
};
|
|
42
39
|
readonly readOnly: {
|
|
43
40
|
readonly type: "boolean";
|
|
44
|
-
readonly reflect: true;
|
|
45
41
|
readonly attribute: "readonly";
|
|
46
42
|
};
|
|
47
43
|
readonly size: {
|
|
48
44
|
readonly type: "string";
|
|
49
45
|
readonly default: "md";
|
|
50
46
|
readonly values: readonly ["sm", "md", "lg"];
|
|
51
|
-
readonly reflect: true;
|
|
52
47
|
};
|
|
53
48
|
readonly incrementLabel: {
|
|
54
49
|
readonly type: "string";
|
|
@@ -80,7 +75,6 @@ export declare const numberFieldDef: import("../../core/define.js").ComponentDef
|
|
|
80
75
|
};
|
|
81
76
|
readonly name: {
|
|
82
77
|
readonly type: "string";
|
|
83
|
-
readonly reflect: true;
|
|
84
78
|
};
|
|
85
79
|
readonly label: {
|
|
86
80
|
readonly type: "string";
|
|
@@ -96,22 +90,18 @@ export declare const numberFieldDef: import("../../core/define.js").ComponentDef
|
|
|
96
90
|
};
|
|
97
91
|
readonly required: {
|
|
98
92
|
readonly type: "boolean";
|
|
99
|
-
readonly reflect: true;
|
|
100
93
|
};
|
|
101
94
|
readonly disabled: {
|
|
102
95
|
readonly type: "boolean";
|
|
103
|
-
readonly reflect: true;
|
|
104
96
|
};
|
|
105
97
|
readonly readOnly: {
|
|
106
98
|
readonly type: "boolean";
|
|
107
|
-
readonly reflect: true;
|
|
108
99
|
readonly attribute: "readonly";
|
|
109
100
|
};
|
|
110
101
|
readonly size: {
|
|
111
102
|
readonly type: "string";
|
|
112
103
|
readonly default: "md";
|
|
113
104
|
readonly values: readonly ["sm", "md", "lg"];
|
|
114
|
-
readonly reflect: true;
|
|
115
105
|
};
|
|
116
106
|
readonly incrementLabel: {
|
|
117
107
|
readonly type: "string";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent } from '../../core/define.js';
|
|
2
2
|
import { html, unsafeHTML } from '../../core/html.js';
|
|
3
|
-
import { themeCssProperties } from '../../core/styles.js';
|
|
4
3
|
import { minusBody, plusBody, svgWrap } from '../icon/system-icons.js';
|
|
5
4
|
import { stepUnit } from '../shared/step.js';
|
|
6
5
|
import { numberFieldStyles } from './number-field.styles.js';
|
|
@@ -9,15 +8,15 @@ const props = {
|
|
|
9
8
|
min: { type: 'number', default: Number.NaN },
|
|
10
9
|
max: { type: 'number', default: Number.NaN },
|
|
11
10
|
step: { type: 'number', default: 1 },
|
|
12
|
-
name: { type: 'string'
|
|
11
|
+
name: { type: 'string' },
|
|
13
12
|
label: { type: 'string' },
|
|
14
13
|
placeholder: { type: 'string' },
|
|
15
14
|
helpText: { type: 'string' },
|
|
16
15
|
errorText: { type: 'string' },
|
|
17
|
-
required: { type: 'boolean'
|
|
18
|
-
disabled: { type: 'boolean'
|
|
19
|
-
readOnly: { type: 'boolean',
|
|
20
|
-
size: { type: 'string', default: 'md', values: ['sm', 'md', 'lg']
|
|
16
|
+
required: { type: 'boolean' },
|
|
17
|
+
disabled: { type: 'boolean' },
|
|
18
|
+
readOnly: { type: 'boolean', attribute: 'readonly' },
|
|
19
|
+
size: { type: 'string', default: 'md', values: ['sm', 'md', 'lg'] },
|
|
21
20
|
incrementLabel: { type: 'string', default: 'Increase' },
|
|
22
21
|
decrementLabel: { type: 'string', default: 'Decrease' },
|
|
23
22
|
};
|
|
@@ -38,25 +37,4 @@ export const numberFieldDef = defineComponent({
|
|
|
38
37
|
const off = p.disabled || p.readOnly ? html ` disabled` : '';
|
|
39
38
|
return html `<div part="base" class="base"><label part="label" class="label" for="input"><slot name="label"><span class="label-text" data-ref="label-text">${p.label}</span></slot></label><div part="control" class="control"><button part="decrement" class="step" type="button" tabindex="-1" aria-label="${p.decrementLabel}" data-ref="decrement"${off}>${icon(minusBody)}</button><input part="input" class="input" id="input" data-ref="input" type="number" value="${p.value}" step="${stepUnit(p.step)}" aria-describedby="help"${inputAttributes(p)}><button part="increment" class="step" type="button" tabindex="-1" aria-label="${p.incrementLabel}" data-ref="increment"${off}>${icon(plusBody)}</button></div><div part="help-text" class="help" id="help"><slot name="help-text"><span class="help-text" data-ref="help-text">${p.helpText}</span></slot><span class="error-text" data-ref="error-text">${p.errorText}</span></div></div>`;
|
|
40
39
|
},
|
|
41
|
-
docs: {
|
|
42
|
-
summary: 'A numeric input with an inset field and stepper buttons. The value attribute is the default value.',
|
|
43
|
-
events: [
|
|
44
|
-
{ name: 'input', description: 'Fired on every edit and every step (composed).' },
|
|
45
|
-
{ name: 'change', description: 'Fired when an edit is committed, or after each step.' },
|
|
46
|
-
],
|
|
47
|
-
slots: [
|
|
48
|
-
{ name: 'label', description: 'Rich label; replaces the label attribute.' },
|
|
49
|
-
{ name: 'help-text', description: 'Rich help text; replaces the help-text attribute.' },
|
|
50
|
-
],
|
|
51
|
-
parts: [
|
|
52
|
-
{ name: 'base', description: 'Outer wrapper.' },
|
|
53
|
-
{ name: 'label', description: 'The <label> element.' },
|
|
54
|
-
{ name: 'control', description: 'The inset field around the input and buttons.' },
|
|
55
|
-
{ name: 'input', description: 'The native <input type="number">.' },
|
|
56
|
-
{ name: 'decrement', description: 'The button that lowers the value.' },
|
|
57
|
-
{ name: 'increment', description: 'The button that raises the value.' },
|
|
58
|
-
{ name: 'help-text', description: 'Help or error text area.' },
|
|
59
|
-
],
|
|
60
|
-
cssProperties: themeCssProperties,
|
|
61
|
-
},
|
|
62
40
|
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { themeCssProperties } from '../theme-docs.js';
|
|
2
|
+
export const numberFieldDocs = {
|
|
3
|
+
summary: 'A numeric input with an inset field and stepper buttons. The value attribute is the default value.',
|
|
4
|
+
descriptions: {
|
|
5
|
+
value: 'The current number as typed or set by script, as a string.',
|
|
6
|
+
min: 'The lowest accepted value, also the target of the Home key.',
|
|
7
|
+
max: 'The highest accepted value, also the target of the End key.',
|
|
8
|
+
step: 'The amount one step changes the value by, and the granularity values must match.',
|
|
9
|
+
name: 'The name under which the value is submitted with a form.',
|
|
10
|
+
label: 'Visible label text; the label slot replaces it.',
|
|
11
|
+
placeholder: 'Hint shown while the field is empty.',
|
|
12
|
+
helpText: 'Guidance shown below the field; the help-text slot replaces it.',
|
|
13
|
+
errorText: "Shown in place of the browser's validation message once the field is invalid after user interaction; does not itself make the field invalid.",
|
|
14
|
+
required: 'Makes the form invalid while the field is empty.',
|
|
15
|
+
disabled: 'Prevents interaction and leaves the field out of form submission.',
|
|
16
|
+
readOnly: 'Keeps the value visible and submitted but not editable.',
|
|
17
|
+
size: 'The field size.',
|
|
18
|
+
incrementLabel: 'Accessible name of the button that raises the value; defaults to "Increase".',
|
|
19
|
+
decrementLabel: 'Accessible name of the button that lowers the value; defaults to "Decrease".',
|
|
20
|
+
defaultValue: 'The value the field starts with, which a form reset restores; set by the value attribute.',
|
|
21
|
+
},
|
|
22
|
+
events: [
|
|
23
|
+
{ name: 'input', description: 'Fired on every edit and every step (composed).' },
|
|
24
|
+
{ name: 'change', description: 'Fired when an edit is committed, or after each step.' },
|
|
25
|
+
],
|
|
26
|
+
slots: [
|
|
27
|
+
{ name: 'label', description: 'Rich label; replaces the label attribute.' },
|
|
28
|
+
{ name: 'help-text', description: 'Rich help text; replaces the help-text attribute.' },
|
|
29
|
+
],
|
|
30
|
+
parts: [
|
|
31
|
+
{ name: 'base', description: 'Outer wrapper.' },
|
|
32
|
+
{ name: 'label', description: 'The <label> element.' },
|
|
33
|
+
{ name: 'control', description: 'The inset field around the input and buttons.' },
|
|
34
|
+
{ name: 'input', description: 'The native <input type="number">.' },
|
|
35
|
+
{ name: 'decrement', description: 'The button that lowers the value.' },
|
|
36
|
+
{ name: 'increment', description: 'The button that raises the value.' },
|
|
37
|
+
{ name: 'help-text', description: 'Help or error text area.' },
|
|
38
|
+
],
|
|
39
|
+
cssProperties: themeCssProperties,
|
|
40
|
+
keyboard: [
|
|
41
|
+
{ name: 'ArrowUp / ArrowDown', description: 'Steps the value up or down by step.' },
|
|
42
|
+
{ name: 'PageUp / PageDown', description: 'Steps the value up or down by ten times step.' },
|
|
43
|
+
{ name: 'Home / End', description: 'Sets the value to min or max, when set.' },
|
|
44
|
+
],
|
|
45
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterDispatch, setOptionalAttribute } from '../../core/dom.js';
|
|
1
|
+
import { afterDispatch, composing, setOptionalAttribute } from '../../core/dom.js';
|
|
2
2
|
import { baseCommitProps, TextControlElement } from '../shared/text-control.js';
|
|
3
3
|
import { BLOCKS_IMPLICIT_SUBMIT, implicitSubmit } from '../text-field/implicit-submit.js';
|
|
4
4
|
import { stepUnit } from '../shared/step.js';
|
|
@@ -69,7 +69,7 @@ export class NeuNumberField extends TextControlElement {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
controlKeyDown(event) {
|
|
72
|
-
if (event
|
|
72
|
+
if (composing(event))
|
|
73
73
|
return;
|
|
74
74
|
if (event.key === 'Enter') {
|
|
75
75
|
// Like a native input: submit once the keydown has finished dispatching, unless cancelled.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const numberFieldStyles = "\n:host {\n --_neu-bg: var(--neu-bg, #e0e5ec);\n --_neu-accent-c: var(--neu-accent, #6d5dfc);\n --_neu-d: var(--neu-distance, 6px);\n --_neu-k: var(--neu-intensity, 1);\n --_neu-r: var(--neu-radius, 12px);\n --_neu-danger: var(--neu-danger, #e5484d);\n --_neu-dur: var(--neu-duration, 150ms);\n --_neu-sd: var(--neu-shadow-dark, color-mix(in oklab, var(--_neu-bg), black min(100%, calc(var(--_neu-shade, 18%) * var(--_neu-k)))));\n --_neu-sl: var(--neu-shadow-light, color-mix(in oklab, var(--_neu-bg), white min(100%, calc(var(--_neu-light, 100%) * var(--_neu-k)))));\n --_neu-fg: var(--neu-fg, color-mix(in oklab, var(--_neu-bg), var(--_neu-ink, black) var(--_neu-fg-mix, 32%)));\n --_neu-fg-muted: var(--neu-fg-muted, color-mix(in oklab, var(--_neu-bg), var(--_neu-ink, black) var(--_neu-fg-muted-mix, 18%)));\n --_neu-accent-soft: color-mix(in oklab, var(--_neu-accent-c) 25%, var(--_neu-bg));\n --_neu-focus: 0 0 0 3px color-mix(in oklab, var(--_neu-accent-c) 45%, transparent);\n --_neu-raised: var(--_neu-d) var(--_neu-d) calc(var(--_neu-d) * 2) var(--_neu-sd), calc(var(--_neu-d) * -1) calc(var(--_neu-d) * -1) calc(var(--_neu-d) * 2) var(--_neu-sl);\n --_neu-raised-sm: calc(var(--_neu-d) * 0.5) calc(var(--_neu-d) * 0.5) var(--_neu-d) var(--_neu-sd), calc(var(--_neu-d) * -0.5) calc(var(--_neu-d) * -0.5) var(--_neu-d) var(--_neu-sl);\n --_neu-inset: inset var(--_neu-d) var(--_neu-d) calc(var(--_neu-d) * 2) var(--_neu-sd), inset calc(var(--_neu-d) * -1) calc(var(--_neu-d) * -1) calc(var(--_neu-d) * 2) var(--_neu-sl);\n --_neu-inset-sm: inset calc(var(--_neu-d) * 0.5) calc(var(--_neu-d) * 0.5) var(--_neu-d) var(--_neu-sd), inset calc(var(--_neu-d) * -0.5) calc(var(--_neu-d) * -0.5) var(--_neu-d) var(--_neu-sl);\n font-family: var(--neu-font);\n color: var(--_neu-fg);\n -webkit-tap-highlight-color: transparent;\n}\n:host(:not(:defined)) { visibility: inherit !important; min-block-size: auto !important; }\n:host([hidden]) { display: none !important; }\n:host(:focus) { outline: none; }\n*, *::before, *::after { box-sizing: border-box; }\n\n:host { display: block; }\n:host(:disabled), :host([disabled]) { cursor: not-allowed; }\n.base { display: flex; flex-direction: column; }\n.label
|
|
1
|
+
export declare const numberFieldStyles = "\n:host {\n --_neu-bg: var(--neu-bg, #e0e5ec);\n --_neu-accent-c: var(--neu-accent, #6d5dfc);\n --_neu-d: var(--neu-distance, 6px);\n --_neu-k: var(--neu-intensity, 1);\n --_neu-r: var(--neu-radius, 12px);\n --_neu-danger: var(--neu-danger, #e5484d);\n --_neu-dur: var(--neu-duration, 150ms);\n --_neu-sd: var(--neu-shadow-dark, color-mix(in oklab, var(--_neu-bg), black min(100%, calc(var(--_neu-shade, 18%) * var(--_neu-k)))));\n --_neu-sl: var(--neu-shadow-light, color-mix(in oklab, var(--_neu-bg), white min(100%, calc(var(--_neu-light, 100%) * var(--_neu-k)))));\n --_neu-fg: var(--neu-fg, color-mix(in oklab, var(--_neu-bg), var(--_neu-ink, black) var(--_neu-fg-mix, 32%)));\n --_neu-fg-muted: var(--neu-fg-muted, color-mix(in oklab, var(--_neu-bg), var(--_neu-ink, black) var(--_neu-fg-muted-mix, 18%)));\n --_neu-accent-soft: color-mix(in oklab, var(--_neu-accent-c) 25%, var(--_neu-bg));\n --_neu-focus: 0 0 0 3px color-mix(in oklab, var(--_neu-accent-c) 45%, transparent);\n --_neu-raised: var(--_neu-d) var(--_neu-d) calc(var(--_neu-d) * 2) var(--_neu-sd), calc(var(--_neu-d) * -1) calc(var(--_neu-d) * -1) calc(var(--_neu-d) * 2) var(--_neu-sl);\n --_neu-raised-sm: calc(var(--_neu-d) * 0.5) calc(var(--_neu-d) * 0.5) var(--_neu-d) var(--_neu-sd), calc(var(--_neu-d) * -0.5) calc(var(--_neu-d) * -0.5) var(--_neu-d) var(--_neu-sl);\n --_neu-inset: inset var(--_neu-d) var(--_neu-d) calc(var(--_neu-d) * 2) var(--_neu-sd), inset calc(var(--_neu-d) * -1) calc(var(--_neu-d) * -1) calc(var(--_neu-d) * 2) var(--_neu-sl);\n --_neu-inset-sm: inset calc(var(--_neu-d) * 0.5) calc(var(--_neu-d) * 0.5) var(--_neu-d) var(--_neu-sd), inset calc(var(--_neu-d) * -0.5) calc(var(--_neu-d) * -0.5) var(--_neu-d) var(--_neu-sl);\n font-family: var(--neu-font);\n color: var(--_neu-fg);\n -webkit-tap-highlight-color: transparent;\n}\n:host(:not(:defined)) { visibility: inherit !important; min-block-size: auto !important; }\n:host([hidden]) { display: none !important; }\n:host(:focus) { outline: none; }\n*, *::before, *::after { box-sizing: border-box; }\n\n:host { display: block; }\n:host(:disabled), :host([disabled]) { cursor: not-allowed; }\n.base { display: flex; flex-direction: column; }\n.label { font-size: 0.8125rem; font-weight: 600; line-height: 1rem; color: var(--_neu-fg-muted); }\n.label-text, ::slotted([slot='label']) { display: block; margin-block-end: 0.375rem; }\n.label-text:empty { display: none; }\n.control {\n display: flex; align-items: center; min-block-size: 2.75rem; padding-inline: 0.875rem;\n border-radius: var(--_neu-r); background: var(--_neu-bg); box-shadow: var(--_neu-inset);\n transition: box-shadow var(--_neu-dur) ease;\n}\n:host([size='sm']) .control { min-block-size: 2.25rem; padding-inline: 0.75rem; box-shadow: var(--_neu-inset-sm); }\n:host([size='lg']) .control { min-block-size: 3.25rem; padding-inline: 1rem; }\n:host(:focus-within) .control { box-shadow: var(--_neu-inset), var(--_neu-focus); }\n:host(:state(user-invalid)) .control {\n box-shadow:\n inset var(--_neu-d) var(--_neu-d) calc(var(--_neu-d) * 2) color-mix(in oklab, var(--_neu-danger) 35%, var(--_neu-sd)),\n inset calc(var(--_neu-d) * -1) calc(var(--_neu-d) * -1) calc(var(--_neu-d) * 2) var(--_neu-sl);\n}\n:host(:disabled) .control, :host([disabled]) .control { box-shadow: var(--_neu-inset-sm); opacity: 0.6; }\n.input {\n flex: 1; min-inline-size: 0; align-self: stretch; padding: 0; border: none; outline: none;\n background: transparent; color: inherit; font: inherit; font-size: 0.9375rem;\n}\n.input::placeholder { color: var(--_neu-fg-muted); opacity: 1; }\n.help { font-size: 0.75rem; color: var(--_neu-fg-muted); }\n.help-text, ::slotted([slot='help-text']) { display: block; margin-block-start: 0.375rem; }\n.help-text:empty { display: none; }\n.error-text { display: none; margin-block-start: 0.375rem; color: var(--_neu-danger); }\n:host(:state(user-invalid)) slot[name='help-text'] { display: none; }\n:host(:state(user-invalid)) .error-text:not(:empty) { display: block; }\n\n.input { appearance: textfield; text-align: center; }\n.input::-webkit-inner-spin-button, .input::-webkit-outer-spin-button { appearance: none; margin: 0; }\n.step {\n display: inline-flex; flex: none; align-items: center; justify-content: center;\n inline-size: 1.75rem; block-size: 1.75rem; padding: 0; border: none; border-radius: 50%;\n background: var(--_neu-bg); color: var(--_neu-fg); box-shadow: var(--_neu-raised-sm);\n font: inherit; cursor: pointer;\n transition: box-shadow var(--_neu-dur) ease;\n}\n.step:active:not(:disabled) { box-shadow: var(--_neu-inset-sm); }\n.step:disabled { box-shadow: none; color: var(--_neu-fg-muted); cursor: not-allowed; }\n.step svg { inline-size: 1rem; block-size: 1rem; }\n";
|
|
@@ -3,11 +3,9 @@ export declare class NeuOption extends NeuElement {
|
|
|
3
3
|
static def: import("../../ssr.js").ComponentDef<{
|
|
4
4
|
readonly value: {
|
|
5
5
|
readonly type: "string";
|
|
6
|
-
readonly reflect: true;
|
|
7
6
|
};
|
|
8
7
|
readonly disabled: {
|
|
9
8
|
readonly type: "boolean";
|
|
10
|
-
readonly reflect: true;
|
|
11
9
|
};
|
|
12
10
|
}>;
|
|
13
11
|
disabled: boolean;
|
|
@@ -4,16 +4,9 @@ import { optionStyles } from './option.styles.js';
|
|
|
4
4
|
export const optionDef = defineComponent({
|
|
5
5
|
tag: 'neu-option',
|
|
6
6
|
props: {
|
|
7
|
-
value: { type: 'string'
|
|
8
|
-
disabled: { type: 'boolean'
|
|
7
|
+
value: { type: 'string' },
|
|
8
|
+
disabled: { type: 'boolean' },
|
|
9
9
|
},
|
|
10
10
|
styles: optionStyles,
|
|
11
11
|
template: () => html `<slot></slot>`,
|
|
12
|
-
docs: {
|
|
13
|
-
summary: 'One choice of a neu-select. It is data only and never rendered: the select reads its value (the value attribute, or the label when there is none), its text as the label, and disabled.',
|
|
14
|
-
events: [],
|
|
15
|
-
slots: [{ name: '', description: 'The label, as plain text.' }],
|
|
16
|
-
parts: [],
|
|
17
|
-
cssProperties: [],
|
|
18
|
-
},
|
|
19
12
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const optionDocs = {
|
|
2
|
+
summary: 'One choice of a neu-select. It is data only and never rendered: the select reads its value (the value attribute, or the label when there is none), its text as the label, and disabled.',
|
|
3
|
+
descriptions: {
|
|
4
|
+
value: 'The value the select takes when this option is chosen; the label is used when it is missing.',
|
|
5
|
+
disabled: 'Keeps the option visible but not selectable.',
|
|
6
|
+
},
|
|
7
|
+
events: [],
|
|
8
|
+
slots: [{ name: '', description: 'The label, as plain text.' }],
|
|
9
|
+
parts: [],
|
|
10
|
+
cssProperties: [],
|
|
11
|
+
keyboard: [],
|
|
12
|
+
};
|
|
@@ -6,11 +6,9 @@ export declare class NeuRadio extends NeuElement {
|
|
|
6
6
|
readonly value: {
|
|
7
7
|
readonly type: "string";
|
|
8
8
|
readonly default: "on";
|
|
9
|
-
readonly reflect: true;
|
|
10
9
|
};
|
|
11
10
|
readonly disabled: {
|
|
12
11
|
readonly type: "boolean";
|
|
13
|
-
readonly reflect: true;
|
|
14
12
|
};
|
|
15
13
|
}>;
|
|
16
14
|
value: string;
|
|
@@ -2,10 +2,8 @@ export declare const radioDef: import("../../core/define.js").ComponentDef<{
|
|
|
2
2
|
readonly value: {
|
|
3
3
|
readonly type: "string";
|
|
4
4
|
readonly default: "on";
|
|
5
|
-
readonly reflect: true;
|
|
6
5
|
};
|
|
7
6
|
readonly disabled: {
|
|
8
7
|
readonly type: "boolean";
|
|
9
|
-
readonly reflect: true;
|
|
10
8
|
};
|
|
11
9
|
}>;
|
|
@@ -1,25 +1,12 @@
|
|
|
1
1
|
import { defineComponent } from '../../core/define.js';
|
|
2
2
|
import { html } from '../../core/html.js';
|
|
3
|
-
import { themeCssProperties } from '../../core/styles.js';
|
|
4
3
|
import { radioStyles } from './radio.styles.js';
|
|
5
4
|
export const radioDef = defineComponent({
|
|
6
5
|
tag: 'neu-radio',
|
|
7
6
|
props: {
|
|
8
|
-
value: { type: 'string', default: 'on'
|
|
9
|
-
disabled: { type: 'boolean'
|
|
7
|
+
value: { type: 'string', default: 'on' },
|
|
8
|
+
disabled: { type: 'boolean' },
|
|
10
9
|
},
|
|
11
10
|
styles: radioStyles,
|
|
12
11
|
template: () => html `<span part="base" class="base"><span part="control" class="control"><span part="indicator" class="indicator"></span></span><span part="label" class="label"><slot></slot></span></span>`,
|
|
13
|
-
docs: {
|
|
14
|
-
summary: 'One choice inside a neu-radio-group, which owns the value, the keyboard and the form. On its own it does nothing.',
|
|
15
|
-
events: [],
|
|
16
|
-
slots: [{ name: '', description: 'Label; also the accessible name.' }],
|
|
17
|
-
parts: [
|
|
18
|
-
{ name: 'base', description: 'Wrapper around control and label.' },
|
|
19
|
-
{ name: 'control', description: 'The inset ring.' },
|
|
20
|
-
{ name: 'indicator', description: 'The dot shown when selected.' },
|
|
21
|
-
{ name: 'label', description: 'Wrapper around the default slot.' },
|
|
22
|
-
],
|
|
23
|
-
cssProperties: themeCssProperties,
|
|
24
|
-
},
|
|
25
12
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { themeCssProperties } from '../theme-docs.js';
|
|
2
|
+
export const radioDocs = {
|
|
3
|
+
summary: 'One choice inside a neu-radio-group, which owns the value, the keyboard and the form. On its own it does nothing.',
|
|
4
|
+
descriptions: {
|
|
5
|
+
value: 'The value the group takes when this radio is selected; defaults to "on".',
|
|
6
|
+
disabled: 'Prevents this radio from being selected or focused by arrow keys.',
|
|
7
|
+
},
|
|
8
|
+
events: [],
|
|
9
|
+
slots: [{ name: '', description: 'Label; also the accessible name.' }],
|
|
10
|
+
parts: [
|
|
11
|
+
{ name: 'base', description: 'Wrapper around control and label.' },
|
|
12
|
+
{ name: 'control', description: 'The inset ring.' },
|
|
13
|
+
{ name: 'indicator', description: 'The dot shown when selected.' },
|
|
14
|
+
{ name: 'label', description: 'Wrapper around the default slot.' },
|
|
15
|
+
],
|
|
16
|
+
cssProperties: themeCssProperties,
|
|
17
|
+
keyboard: [],
|
|
18
|
+
};
|
|
@@ -7,24 +7,20 @@ export declare class NeuRadioGroup extends FormControlElement {
|
|
|
7
7
|
};
|
|
8
8
|
readonly name: {
|
|
9
9
|
readonly type: "string";
|
|
10
|
-
readonly reflect: true;
|
|
11
10
|
};
|
|
12
11
|
readonly value: {
|
|
13
12
|
readonly type: "string";
|
|
14
13
|
};
|
|
15
14
|
readonly required: {
|
|
16
15
|
readonly type: "boolean";
|
|
17
|
-
readonly reflect: true;
|
|
18
16
|
};
|
|
19
17
|
readonly disabled: {
|
|
20
18
|
readonly type: "boolean";
|
|
21
|
-
readonly reflect: true;
|
|
22
19
|
};
|
|
23
20
|
readonly orientation: {
|
|
24
21
|
readonly type: "string";
|
|
25
22
|
readonly default: "vertical";
|
|
26
23
|
readonly values: readonly ["vertical", "horizontal"];
|
|
27
|
-
readonly reflect: true;
|
|
28
24
|
};
|
|
29
25
|
}>;
|
|
30
26
|
static extraProperties: string[];
|
|
@@ -64,6 +60,9 @@ export declare class NeuRadioGroup extends FormControlElement {
|
|
|
64
60
|
* Radios that are not upgraded yet are skipped; they ask for a resync when they connect.
|
|
65
61
|
*/
|
|
66
62
|
private sync;
|
|
63
|
+
/** The group's name: the slotted label's text when there is one, else the label attribute. */
|
|
64
|
+
private nameGroup;
|
|
65
|
+
protected rendered(): void;
|
|
67
66
|
protected willUpdate(changed: ReadonlySet<string>): void;
|
|
68
67
|
protected update(changed: ReadonlySet<string>): void;
|
|
69
68
|
protected connected(): void;
|