menhir 0.1.11 → 0.1.13
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 +1 -1
- package/dist/checkbox/root/CheckboxRoot.js +10 -61
- package/dist/core/hiddenInput.js +94 -0
- package/dist/core/rovingFocus.js +1 -1
- package/dist/number-field/decrement/NumberFieldDecrement.js +11 -0
- package/dist/number-field/increment/NumberFieldIncrement.js +11 -0
- package/dist/number-field/index.js +2 -0
- package/dist/number-field/index.parts.js +5 -0
- package/dist/number-field/input/NumberFieldInput.js +87 -0
- package/dist/number-field/parse.js +28 -0
- package/dist/number-field/root/NumberFieldRoot.js +169 -0
- package/dist/number-field/root/NumberFieldRootContext.js +10 -0
- package/dist/number-field/stepButton.js +60 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/index.parts.js +4 -0
- package/dist/radio/indicator/RadioIndicator.js +20 -0
- package/dist/radio/item/RadioItem.js +94 -0
- package/dist/radio/item/RadioItemContext.js +10 -0
- package/dist/radio/root/RadioRoot.js +96 -0
- package/dist/radio/root/RadioRootContext.js +10 -0
- package/dist/source/checkbox/root/CheckboxRoot.jsx +5 -57
- package/dist/source/core/hiddenInput.d.ts +46 -0
- package/dist/source/core/hiddenInput.jsx +93 -0
- package/dist/source/core/rovingFocus.d.ts +1 -1
- package/dist/source/core/rovingFocus.js +1 -1
- package/dist/source/number-field/decrement/NumberFieldDecrement.d.ts +8 -0
- package/dist/source/number-field/decrement/NumberFieldDecrement.jsx +9 -0
- package/dist/source/number-field/increment/NumberFieldIncrement.d.ts +8 -0
- package/dist/source/number-field/increment/NumberFieldIncrement.jsx +9 -0
- package/dist/source/number-field/index.d.ts +1 -0
- package/dist/source/number-field/index.js +1 -0
- package/dist/source/number-field/index.parts.d.ts +4 -0
- package/dist/source/number-field/index.parts.js +4 -0
- package/dist/source/number-field/input/NumberFieldInput.d.ts +14 -0
- package/dist/source/number-field/input/NumberFieldInput.jsx +103 -0
- package/dist/source/number-field/parse.d.ts +11 -0
- package/dist/source/number-field/parse.js +46 -0
- package/dist/source/number-field/root/NumberFieldRoot.d.ts +49 -0
- package/dist/source/number-field/root/NumberFieldRoot.jsx +175 -0
- package/dist/source/number-field/root/NumberFieldRootContext.d.ts +35 -0
- package/dist/source/number-field/root/NumberFieldRootContext.js +13 -0
- package/dist/source/number-field/stepButton.d.ts +12 -0
- package/dist/source/number-field/stepButton.jsx +69 -0
- package/dist/source/radio/index.d.ts +1 -0
- package/dist/source/radio/index.js +1 -0
- package/dist/source/radio/index.parts.d.ts +3 -0
- package/dist/source/radio/index.parts.js +3 -0
- package/dist/source/radio/indicator/RadioIndicator.d.ts +10 -0
- package/dist/source/radio/indicator/RadioIndicator.jsx +12 -0
- package/dist/source/radio/item/RadioItem.d.ts +14 -0
- package/dist/source/radio/item/RadioItem.jsx +96 -0
- package/dist/source/radio/item/RadioItemContext.d.ts +12 -0
- package/dist/source/radio/item/RadioItemContext.js +12 -0
- package/dist/source/radio/root/RadioRoot.d.ts +28 -0
- package/dist/source/radio/root/RadioRoot.jsx +112 -0
- package/dist/source/radio/root/RadioRootContext.d.ts +40 -0
- package/dist/source/radio/root/RadioRootContext.js +13 -0
- package/dist/source/switch/root/SwitchRoot.jsx +5 -57
- package/dist/switch/root/SwitchRoot.js +10 -61
- package/package.json +11 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { createUniqueId, omit, onFlush, untrack } from "solid-js";
|
|
2
|
+
import { createControllableSignal } from "../../core/createControllableSignal.js";
|
|
3
|
+
import { mergeElementProps } from "../../core/mergeElementProps.js";
|
|
4
|
+
import { createRovingFocus } from "../../core/rovingFocus.js";
|
|
5
|
+
import { renderElement } from "../../core/renderElement.jsx";
|
|
6
|
+
import { RadioRootContext } from "./RadioRootContext.js";
|
|
7
|
+
/**
|
|
8
|
+
* The group: a `<fieldset role="radiogroup">` around `Radio.Item`s, named
|
|
9
|
+
* by a `<legend>`, that holds the checked radio's value.
|
|
10
|
+
*/
|
|
11
|
+
export function RadioRoot(props) {
|
|
12
|
+
const [value, setValue] = createControllableSignal({
|
|
13
|
+
get value() {
|
|
14
|
+
return props.value;
|
|
15
|
+
},
|
|
16
|
+
get defaultValue() {
|
|
17
|
+
return props.defaultValue ?? null;
|
|
18
|
+
},
|
|
19
|
+
onChange: (value) => props.onValueChange?.(value),
|
|
20
|
+
});
|
|
21
|
+
// The pattern moves on every arrow key, whatever the layout. Roving focus
|
|
22
|
+
// reads one axis, so `navigate` sets it from each key: Up and Down as a
|
|
23
|
+
// vertical group's, Left and Right as a horizontal one's, which roving
|
|
24
|
+
// focus mirrors right to left.
|
|
25
|
+
let vertical = false;
|
|
26
|
+
// Whether focus is moving by an arrow key, so the Item it reaches checks.
|
|
27
|
+
let moving = false;
|
|
28
|
+
// Whether an Item has claimed the tab stop of the server HTML.
|
|
29
|
+
let claimed = false;
|
|
30
|
+
const items = new Set();
|
|
31
|
+
const roving = createRovingFocus({
|
|
32
|
+
get vertical() {
|
|
33
|
+
return vertical;
|
|
34
|
+
},
|
|
35
|
+
focusable: (item) => !item.disabled(),
|
|
36
|
+
preferred: (item) => item.checked(),
|
|
37
|
+
});
|
|
38
|
+
// After a declined change. The browser checked the clicked radio's input
|
|
39
|
+
// and unchecked the checked one's, which no binding changed: this checks
|
|
40
|
+
// it again, once the value has settled. The clicked one unchecks itself.
|
|
41
|
+
const restore = () => {
|
|
42
|
+
for (const item of items)
|
|
43
|
+
if (untrack(item.checked))
|
|
44
|
+
item.input.checked = true;
|
|
45
|
+
};
|
|
46
|
+
// The hidden inputs' name, which the server render and hydration agree
|
|
47
|
+
// on. Browsers find a radio missing only with a name, so a group with no
|
|
48
|
+
// `name` of its own gives them this one while none is checked, when they
|
|
49
|
+
// submit nothing; once one is checked, they have none again.
|
|
50
|
+
const validityName = createUniqueId();
|
|
51
|
+
const empty = () => value() === null;
|
|
52
|
+
const context = {
|
|
53
|
+
value,
|
|
54
|
+
select: (next) => {
|
|
55
|
+
setValue(next);
|
|
56
|
+
onFlush(restore);
|
|
57
|
+
},
|
|
58
|
+
// Each Item's hidden input asks on a form reset. A set equal to the one
|
|
59
|
+
// before it in the turn does nothing, so a controlled group asks once.
|
|
60
|
+
reset: () => setValue(props.defaultValue ?? null),
|
|
61
|
+
name: () => props.name ?? (empty() ? validityName : undefined),
|
|
62
|
+
form: () => props.form,
|
|
63
|
+
disabled: () => props.disabled,
|
|
64
|
+
// Only while none is checked: once one is, the group is not missing,
|
|
65
|
+
// and an unnamed, unchecked, required radio would be missing on its own
|
|
66
|
+
// by the HTML standard. It follows the value, not the inputs'
|
|
67
|
+
// checkedness, which a form reset changes behind the bindings' back.
|
|
68
|
+
required: () => props.required && empty(),
|
|
69
|
+
register: (item) => {
|
|
70
|
+
items.add(item);
|
|
71
|
+
const unregister = roving.register(item);
|
|
72
|
+
return () => {
|
|
73
|
+
items.delete(item);
|
|
74
|
+
unregister();
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
isTabStop: roving.isTabStop,
|
|
78
|
+
// Before any Item has registered, as on the server, the checked Item
|
|
79
|
+
// has the tab stop, or the first enabled one while none is checked.
|
|
80
|
+
claimTabStop: (checked, disabled) => !disabled &&
|
|
81
|
+
(checked || (untrack(value) === null && !claimed && (claimed = true))),
|
|
82
|
+
navigate: (event, from) => {
|
|
83
|
+
// The pattern names no Home or End, and native radios have none.
|
|
84
|
+
if (!event.key.startsWith("Arrow"))
|
|
85
|
+
return;
|
|
86
|
+
vertical = event.key === "ArrowUp" || event.key === "ArrowDown";
|
|
87
|
+
moving = true;
|
|
88
|
+
roving.navigate(event, from);
|
|
89
|
+
moving = false;
|
|
90
|
+
},
|
|
91
|
+
moving: () => moving,
|
|
92
|
+
};
|
|
93
|
+
const ownProps = {
|
|
94
|
+
role: "radiogroup",
|
|
95
|
+
get disabled() {
|
|
96
|
+
return props.disabled;
|
|
97
|
+
},
|
|
98
|
+
get "aria-required"() {
|
|
99
|
+
return props.required ? "true" : undefined;
|
|
100
|
+
},
|
|
101
|
+
get "data-disabled"() {
|
|
102
|
+
return props.disabled ? "" : undefined;
|
|
103
|
+
},
|
|
104
|
+
get "data-required"() {
|
|
105
|
+
return props.required ? "" : undefined;
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
const elementProps = mergeElementProps(ownProps, omit(props, "render", "value", "defaultValue", "onValueChange", "name", "disabled", "required", "form"));
|
|
109
|
+
return (<RadioRootContext value={context}>
|
|
110
|
+
{renderElement(props, elementProps, (p) => (<fieldset {...p}/>))}
|
|
111
|
+
</RadioRootContext>);
|
|
112
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { RovingItem } from "../../core/rovingFocus.ts";
|
|
2
|
+
/** A mounted Item, as the group knows it. */
|
|
3
|
+
export interface RadioItemEntry extends RovingItem {
|
|
4
|
+
/** The Item's hidden input, which the group checks again after a declined change. */
|
|
5
|
+
readonly input: HTMLInputElement;
|
|
6
|
+
disabled(): boolean;
|
|
7
|
+
checked(): boolean;
|
|
8
|
+
}
|
|
9
|
+
/** What the group shares with its Items. */
|
|
10
|
+
export interface RadioRootContextValue {
|
|
11
|
+
/** The checked Item's value, `null` while none is checked. */
|
|
12
|
+
value(): string | null;
|
|
13
|
+
/** Asks to check the Item with this value. */
|
|
14
|
+
select(value: string): void;
|
|
15
|
+
/** Asks for `defaultValue`, on a form reset. Asked once however many Items ask. */
|
|
16
|
+
reset(): void;
|
|
17
|
+
/** The `name` each Item's hidden input takes. */
|
|
18
|
+
name(): string | undefined;
|
|
19
|
+
/** The `id` of the form the Items belong to, when they are not inside it. */
|
|
20
|
+
form(): string | undefined;
|
|
21
|
+
/** Whether the whole group is disabled. */
|
|
22
|
+
disabled(): boolean | undefined;
|
|
23
|
+
/** Whether each Item's hidden input is `required`: while none is checked in a required group. */
|
|
24
|
+
required(): boolean | undefined;
|
|
25
|
+
/** Adds a mounted Item; returns what removes it. */
|
|
26
|
+
register(item: RadioItemEntry): () => void;
|
|
27
|
+
/** Whether this Item has the tab stop; `fallback` until Items register. */
|
|
28
|
+
isTabStop(element: HTMLElement | undefined, fallback: boolean): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether an Item, created checked or not and enabled or not, has the tab
|
|
31
|
+
* stop of the server HTML and of the first render.
|
|
32
|
+
*/
|
|
33
|
+
claimTabStop(checked: boolean, disabled: boolean): boolean;
|
|
34
|
+
/** Moves focus, and checks, for an arrow key pressed on an Item. */
|
|
35
|
+
navigate(event: KeyboardEvent, from: HTMLElement): void;
|
|
36
|
+
/** Whether focus is moving by an arrow key, so the Item it reaches checks. */
|
|
37
|
+
moving(): boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare const RadioRootContext: import("solid-js").Context<RadioRootContextValue | null>;
|
|
40
|
+
export declare function useRadioRootContext(): RadioRootContextValue;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createContext, useContext } from "solid-js";
|
|
2
|
+
import { isDev } from "@solidjs/web";
|
|
3
|
+
// `null` outside a Root, so that the part can name what is missing. Solid's
|
|
4
|
+
// own error for a context with no provider and no default does not.
|
|
5
|
+
export const RadioRootContext = createContext(null);
|
|
6
|
+
export function useRadioRootContext() {
|
|
7
|
+
const context = useContext(RadioRootContext);
|
|
8
|
+
// Production builds drop the check, and its message, with `isDev`.
|
|
9
|
+
if (isDev && !context) {
|
|
10
|
+
throw new Error("[menhir] Radio.Item must be placed within <Radio.Root>.");
|
|
11
|
+
}
|
|
12
|
+
return context;
|
|
13
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { isDev } from "@solidjs/web";
|
|
2
|
-
import { merge, omit
|
|
2
|
+
import { merge, omit } from "solid-js";
|
|
3
3
|
import { warnUnlessButton } from "../../core/button.js";
|
|
4
4
|
import { createControllableSignal } from "../../core/createControllableSignal.js";
|
|
5
|
+
import { createHiddenInput } from "../../core/hiddenInput.jsx";
|
|
5
6
|
import { mergeElementProps } from "../../core/mergeElementProps.js";
|
|
6
7
|
import { renderElement } from "../../core/renderElement.jsx";
|
|
7
8
|
import { SwitchRootContext } from "./SwitchRootContext.js";
|
|
@@ -53,7 +54,7 @@ export function SwitchRoot(props) {
|
|
|
53
54
|
},
|
|
54
55
|
// The change goes through the hidden input, so that the form sees the
|
|
55
56
|
// native `input` and `change` events a checkbox fires.
|
|
56
|
-
onClick: () => input
|
|
57
|
+
onClick: () => input.click(),
|
|
57
58
|
ref: (element) => {
|
|
58
59
|
button = element;
|
|
59
60
|
// Production builds drop the check with `isDev`.
|
|
@@ -62,63 +63,10 @@ export function SwitchRoot(props) {
|
|
|
62
63
|
},
|
|
63
64
|
};
|
|
64
65
|
let button;
|
|
65
|
-
|
|
66
|
-
// Puts the input back to the switch's value, once that has settled. The
|
|
67
|
-
// `checked` binding writes the DOM only when the value changes, so it
|
|
68
|
-
// does not undo a change of the input that the switch did not take.
|
|
69
|
-
const syncInput = () => {
|
|
70
|
-
if (input)
|
|
71
|
-
input.checked = untrack(checked);
|
|
72
|
-
};
|
|
73
|
-
const onInputChange = () => {
|
|
74
|
-
if (!input)
|
|
75
|
-
return;
|
|
76
|
-
setChecked(input.checked);
|
|
77
|
-
// The browser has already changed the input, so the form's own
|
|
78
|
-
// listeners, which run after this one, see the new value. The two
|
|
79
|
-
// differ afterwards only when a controlled switch's consumer declined
|
|
80
|
-
// the change.
|
|
81
|
-
onFlush(syncInput);
|
|
82
|
-
};
|
|
83
|
-
const onInputClick = (event) => {
|
|
84
|
-
// The click the button sends the input is an implementation detail:
|
|
85
|
-
// ancestors already received the user's click.
|
|
86
|
-
event.stopPropagation();
|
|
87
|
-
// Canceling the click keeps the checkbox as it was and fires no
|
|
88
|
-
// `input` or `change` event, whoever clicked it.
|
|
89
|
-
if (props.readOnly)
|
|
90
|
-
event.preventDefault();
|
|
91
|
-
};
|
|
92
|
-
// A form reset puts a checkbox back to its default, and so it does the
|
|
93
|
-
// switch: through the setter, so that a controlled switch asks.
|
|
94
|
-
onSettled(() => {
|
|
95
|
-
const form = input?.form;
|
|
96
|
-
if (!form)
|
|
97
|
-
return;
|
|
98
|
-
const onReset = () => {
|
|
99
|
-
setChecked(props.defaultChecked ?? false);
|
|
100
|
-
// The browser resets the input after this event, to its `checked`
|
|
101
|
-
// attribute, which the binding does not set. `onFlush` runs after
|
|
102
|
-
// that, as the event has finished by then.
|
|
103
|
-
onFlush(syncInput);
|
|
104
|
-
};
|
|
105
|
-
form.addEventListener("reset", onReset);
|
|
106
|
-
return () => form.removeEventListener("reset", onReset);
|
|
107
|
-
});
|
|
66
|
+
const input = createHiddenInput("checkbox", props, checked, setChecked, () => button, () => setChecked(props.defaultChecked ?? false));
|
|
108
67
|
const elementProps = mergeElementProps(merge(stateAttributes, buttonProps), omit(props, "render", "checked", "defaultChecked", "onCheckedChange", "name", "value", "disabled", "readOnly", "required", "form"));
|
|
109
68
|
return (<SwitchRootContext value={stateAttributes}>
|
|
110
69
|
{renderElement(props, elementProps, (p) => (<button {...p}/>))}
|
|
111
|
-
|
|
112
|
-
// The browser focuses an invalid input when it blocks a submission.
|
|
113
|
-
// The user knows the switch, not the hidden input.
|
|
114
|
-
onFocus={() => button?.focus()} ref={(element) => {
|
|
115
|
-
input = element;
|
|
116
|
-
// Solid delegates click handlers to the document, so this one is
|
|
117
|
-
// a native listener, to act before the click bubbles.
|
|
118
|
-
element.addEventListener("click", onInputClick);
|
|
119
|
-
}}/>
|
|
70
|
+
{input}
|
|
120
71
|
</SwitchRootContext>);
|
|
121
72
|
}
|
|
122
|
-
// Hidden from sight but not from the form. Not `display: none`, so the
|
|
123
|
-
// browser can still anchor a validation message to it.
|
|
124
|
-
const visuallyHidden = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;pointer-events:none";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { warnUnlessButton } from "../../core/button.js";
|
|
2
2
|
import { createControllableSignal } from "../../core/createControllableSignal.js";
|
|
3
|
+
import { createHiddenInput } from "../../core/hiddenInput.js";
|
|
3
4
|
import { mergeElementProps } from "../../core/mergeElementProps.js";
|
|
4
5
|
import { renderElement } from "../../core/renderElement.js";
|
|
5
6
|
import { SwitchRootContext } from "./SwitchRootContext.js";
|
|
6
|
-
import { createComponent,
|
|
7
|
-
import { merge, omit
|
|
7
|
+
import { createComponent, isDev, memo, spread, template } from "@solidjs/web";
|
|
8
|
+
import { merge, omit } from "solid-js";
|
|
8
9
|
// src/switch/root/SwitchRoot.tsx
|
|
9
|
-
var _tmpl$ = /* @__PURE__ */ template(`<
|
|
10
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<button>`);
|
|
10
|
+
var _tmpl$ = /* @__PURE__ */ template(`<button>`);
|
|
11
11
|
/**
|
|
12
12
|
* The switch itself: a `<button role="switch">`.
|
|
13
13
|
*/
|
|
@@ -53,76 +53,25 @@ function SwitchRoot(props) {
|
|
|
53
53
|
get "aria-required"() {
|
|
54
54
|
return props.required ? "true" : void 0;
|
|
55
55
|
},
|
|
56
|
-
onClick: () => input
|
|
56
|
+
onClick: () => input.click(),
|
|
57
57
|
ref: (element) => {
|
|
58
58
|
button = element;
|
|
59
59
|
if (isDev) warnUnlessButton(element, "Switch.Root");
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
let button;
|
|
63
|
-
|
|
64
|
-
const syncInput = () => {
|
|
65
|
-
if (input) input.checked = untrack(checked);
|
|
66
|
-
};
|
|
67
|
-
const onInputChange = () => {
|
|
68
|
-
if (!input) return;
|
|
69
|
-
setChecked(input.checked);
|
|
70
|
-
onFlush(syncInput);
|
|
71
|
-
};
|
|
72
|
-
const onInputClick = (event) => {
|
|
73
|
-
event.stopPropagation();
|
|
74
|
-
if (props.readOnly) event.preventDefault();
|
|
75
|
-
};
|
|
76
|
-
onSettled(() => {
|
|
77
|
-
const form = input?.form;
|
|
78
|
-
if (!form) return;
|
|
79
|
-
const onReset = () => {
|
|
80
|
-
setChecked(props.defaultChecked ?? false);
|
|
81
|
-
onFlush(syncInput);
|
|
82
|
-
};
|
|
83
|
-
form.addEventListener("reset", onReset);
|
|
84
|
-
return () => form.removeEventListener("reset", onReset);
|
|
85
|
-
});
|
|
63
|
+
const input = createHiddenInput("checkbox", props, checked, setChecked, () => button, () => setChecked(props.defaultChecked ?? false));
|
|
86
64
|
const elementProps = mergeElementProps(merge(stateAttributes, buttonProps), omit(props, "render", "checked", "defaultChecked", "onCheckedChange", "name", "value", "disabled", "readOnly", "required", "form"));
|
|
87
65
|
return createComponent(SwitchRootContext, {
|
|
88
66
|
value: stateAttributes,
|
|
89
67
|
get children() {
|
|
90
68
|
return [memo(() => {
|
|
91
69
|
return renderElement(props, elementProps, (p) => (() => {
|
|
92
|
-
var _el$
|
|
93
|
-
spread(_el
|
|
94
|
-
return _el
|
|
70
|
+
var _el$ = _tmpl$();
|
|
71
|
+
spread(_el$, p, false);
|
|
72
|
+
return _el$;
|
|
95
73
|
})());
|
|
96
|
-
}),
|
|
97
|
-
var _el$ = _tmpl$();
|
|
98
|
-
_el$.addEventListener("focus", () => button?.focus());
|
|
99
|
-
_el$.addEventListener("change", onInputChange);
|
|
100
|
-
ref(() => {
|
|
101
|
-
return (element) => {
|
|
102
|
-
input = element;
|
|
103
|
-
element.addEventListener("click", onInputClick);
|
|
104
|
-
};
|
|
105
|
-
}, _el$);
|
|
106
|
-
effect(() => {
|
|
107
|
-
return {
|
|
108
|
-
e: props.name,
|
|
109
|
-
t: props.value,
|
|
110
|
-
a: props.disabled,
|
|
111
|
-
o: props.required,
|
|
112
|
-
i: props.form,
|
|
113
|
-
n: checked(),
|
|
114
|
-
s: heldRead()
|
|
115
|
-
};
|
|
116
|
-
}, ({ e, t, a, o, i, n, s }, _p$) => {
|
|
117
|
-
e !== _p$?.e && setAttribute(_el$, "name", e);
|
|
118
|
-
(t !== _p$?.t || !s) && setProperty(_el$, "value", t);
|
|
119
|
-
a !== _p$?.a && setAttribute(_el$, "disabled", a);
|
|
120
|
-
o !== _p$?.o && setAttribute(_el$, "required", o);
|
|
121
|
-
i !== _p$?.i && setAttribute(_el$, "form", i);
|
|
122
|
-
(n !== _p$?.n || !s) && (_el$.checked = n);
|
|
123
|
-
});
|
|
124
|
-
return _el$;
|
|
125
|
-
})()];
|
|
74
|
+
}), input];
|
|
126
75
|
}
|
|
127
76
|
});
|
|
128
77
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "menhir",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Unstyled, accessible UI primitives for SolidJS 2.0, with small and measurable bundles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"solid",
|
|
@@ -119,6 +119,11 @@
|
|
|
119
119
|
"solid": "./dist/source/navigation-menu/index.js",
|
|
120
120
|
"import": "./dist/navigation-menu/index.js"
|
|
121
121
|
},
|
|
122
|
+
"./number-field": {
|
|
123
|
+
"types": "./dist/source/number-field/index.d.ts",
|
|
124
|
+
"solid": "./dist/source/number-field/index.js",
|
|
125
|
+
"import": "./dist/number-field/index.js"
|
|
126
|
+
},
|
|
122
127
|
"./popover": {
|
|
123
128
|
"types": "./dist/source/popover/index.d.ts",
|
|
124
129
|
"solid": "./dist/source/popover/index.js",
|
|
@@ -129,6 +134,11 @@
|
|
|
129
134
|
"solid": "./dist/source/progress/index.js",
|
|
130
135
|
"import": "./dist/progress/index.js"
|
|
131
136
|
},
|
|
137
|
+
"./radio": {
|
|
138
|
+
"types": "./dist/source/radio/index.d.ts",
|
|
139
|
+
"solid": "./dist/source/radio/index.js",
|
|
140
|
+
"import": "./dist/radio/index.js"
|
|
141
|
+
},
|
|
132
142
|
"./select": {
|
|
133
143
|
"types": "./dist/source/select/index.d.ts",
|
|
134
144
|
"solid": "./dist/source/select/index.js",
|