@hanzogui/checkbox-headless 2.0.0

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.
Files changed (58) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/BubbleInput.cjs +82 -0
  3. package/dist/cjs/BubbleInput.native.js +86 -0
  4. package/dist/cjs/BubbleInput.native.js.map +1 -0
  5. package/dist/cjs/index.cjs +19 -0
  6. package/dist/cjs/index.native.js +22 -0
  7. package/dist/cjs/index.native.js.map +1 -0
  8. package/dist/cjs/useCheckbox.cjs +96 -0
  9. package/dist/cjs/useCheckbox.native.js +106 -0
  10. package/dist/cjs/useCheckbox.native.js.map +1 -0
  11. package/dist/cjs/utils.cjs +32 -0
  12. package/dist/cjs/utils.native.js +35 -0
  13. package/dist/cjs/utils.native.js.map +1 -0
  14. package/dist/esm/BubbleInput.mjs +48 -0
  15. package/dist/esm/BubbleInput.mjs.map +1 -0
  16. package/dist/esm/BubbleInput.native.js +49 -0
  17. package/dist/esm/BubbleInput.native.js.map +1 -0
  18. package/dist/esm/index.js +3 -0
  19. package/dist/esm/index.js.map +1 -0
  20. package/dist/esm/index.mjs +3 -0
  21. package/dist/esm/index.mjs.map +1 -0
  22. package/dist/esm/index.native.js +3 -0
  23. package/dist/esm/index.native.js.map +1 -0
  24. package/dist/esm/useCheckbox.mjs +62 -0
  25. package/dist/esm/useCheckbox.mjs.map +1 -0
  26. package/dist/esm/useCheckbox.native.js +69 -0
  27. package/dist/esm/useCheckbox.native.js.map +1 -0
  28. package/dist/esm/utils.mjs +8 -0
  29. package/dist/esm/utils.mjs.map +1 -0
  30. package/dist/esm/utils.native.js +8 -0
  31. package/dist/esm/utils.native.js.map +1 -0
  32. package/dist/jsx/BubbleInput.mjs +48 -0
  33. package/dist/jsx/BubbleInput.mjs.map +1 -0
  34. package/dist/jsx/BubbleInput.native.js +86 -0
  35. package/dist/jsx/BubbleInput.native.js.map +1 -0
  36. package/dist/jsx/index.js +3 -0
  37. package/dist/jsx/index.js.map +1 -0
  38. package/dist/jsx/index.mjs +3 -0
  39. package/dist/jsx/index.mjs.map +1 -0
  40. package/dist/jsx/index.native.js +22 -0
  41. package/dist/jsx/index.native.js.map +1 -0
  42. package/dist/jsx/useCheckbox.mjs +62 -0
  43. package/dist/jsx/useCheckbox.mjs.map +1 -0
  44. package/dist/jsx/useCheckbox.native.js +106 -0
  45. package/dist/jsx/useCheckbox.native.js.map +1 -0
  46. package/dist/jsx/utils.mjs +8 -0
  47. package/dist/jsx/utils.mjs.map +1 -0
  48. package/dist/jsx/utils.native.js +35 -0
  49. package/dist/jsx/utils.native.js.map +1 -0
  50. package/package.json +60 -0
  51. package/src/BubbleInput.tsx +64 -0
  52. package/src/index.ts +2 -0
  53. package/src/useCheckbox.tsx +119 -0
  54. package/src/utils.tsx +9 -0
  55. package/types/BubbleInput.d.ts +10 -0
  56. package/types/index.d.ts +3 -0
  57. package/types/useCheckbox.d.ts +43 -0
  58. package/types/utils.d.ts +4 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Radix
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,82 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf,
6
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: !0
28
+ }) : target, mod)),
29
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
+ value: !0
31
+ }), mod);
32
+ var BubbleInput_exports = {};
33
+ __export(BubbleInput_exports, {
34
+ BubbleInput: () => BubbleInput
35
+ });
36
+ module.exports = __toCommonJS(BubbleInput_exports);
37
+ var import_gui_use_previous = require("@hanzo/gui-use-previous"),
38
+ React = __toESM(require("react"), 1),
39
+ import_utils = require("./utils.cjs"),
40
+ import_jsx_runtime = require("react/jsx-runtime");
41
+ const BubbleInput = props => {
42
+ const {
43
+ checked,
44
+ bubbles = !0,
45
+ control,
46
+ isHidden,
47
+ ...inputProps
48
+ } = props,
49
+ ref = React.useRef(null),
50
+ prevChecked = (0, import_gui_use_previous.usePrevious)(checked);
51
+ return React.useEffect(() => {
52
+ const input = ref.current,
53
+ inputProto = window.HTMLInputElement.prototype,
54
+ setChecked = Object.getOwnPropertyDescriptor(inputProto, "checked").set;
55
+ if (prevChecked !== checked && setChecked) {
56
+ const event = new Event("click", {
57
+ bubbles
58
+ });
59
+ input.indeterminate = (0, import_utils.isIndeterminate)(checked), setChecked.call(input, (0, import_utils.isIndeterminate)(checked) ? !1 : checked), input.dispatchEvent(event);
60
+ }
61
+ }, [prevChecked, checked, bubbles]), /* @__PURE__ */(0, import_jsx_runtime.jsx)("input", {
62
+ type: "checkbox",
63
+ defaultChecked: (0, import_utils.isIndeterminate)(checked) ? !1 : checked,
64
+ ...inputProps,
65
+ tabIndex: -1,
66
+ ref,
67
+ "aria-hidden": isHidden,
68
+ style: {
69
+ ...(isHidden ? {
70
+ // ...controlSize,
71
+ position: "absolute",
72
+ pointerEvents: "none",
73
+ opacity: 0,
74
+ margin: 0
75
+ } : {
76
+ appearance: "auto",
77
+ accentColor: "var(--color6)"
78
+ }),
79
+ ...props.style
80
+ }
81
+ });
82
+ };
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: !0
13
+ });
14
+ },
15
+ __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: !0
30
+ }) : target, mod)),
31
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: !0
33
+ }), mod);
34
+ var BubbleInput_exports = {};
35
+ __export(BubbleInput_exports, {
36
+ BubbleInput: () => BubbleInput
37
+ });
38
+ module.exports = __toCommonJS(BubbleInput_exports);
39
+ var import_jsx_runtime = require("react/jsx-runtime"),
40
+ import_gui_use_previous = require("@hanzo/gui-use-previous"),
41
+ React = __toESM(require("react"), 1),
42
+ import_utils = require("./utils.native.js"),
43
+ BubbleInput = function (props) {
44
+ var {
45
+ checked,
46
+ bubbles = !0,
47
+ control,
48
+ isHidden,
49
+ ...inputProps
50
+ } = props,
51
+ ref = React.useRef(null),
52
+ prevChecked = (0, import_gui_use_previous.usePrevious)(checked);
53
+ return React.useEffect(function () {
54
+ var input = ref.current,
55
+ inputProto = window.HTMLInputElement.prototype,
56
+ descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked"),
57
+ setChecked = descriptor.set;
58
+ if (prevChecked !== checked && setChecked) {
59
+ var event = new Event("click", {
60
+ bubbles
61
+ });
62
+ input.indeterminate = (0, import_utils.isIndeterminate)(checked), setChecked.call(input, (0, import_utils.isIndeterminate)(checked) ? !1 : checked), input.dispatchEvent(event);
63
+ }
64
+ }, [prevChecked, checked, bubbles]), /* @__PURE__ */(0, import_jsx_runtime.jsx)("input", {
65
+ type: "checkbox",
66
+ defaultChecked: (0, import_utils.isIndeterminate)(checked) ? !1 : checked,
67
+ ...inputProps,
68
+ tabIndex: -1,
69
+ ref,
70
+ "aria-hidden": isHidden,
71
+ style: {
72
+ ...(isHidden ? {
73
+ // ...controlSize,
74
+ position: "absolute",
75
+ pointerEvents: "none",
76
+ opacity: 0,
77
+ margin: 0
78
+ } : {
79
+ appearance: "auto",
80
+ accentColor: "var(--color6)"
81
+ }),
82
+ ...props.style
83
+ }
84
+ });
85
+ };
86
+ //# sourceMappingURL=BubbleInput.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","BubbleInput_exports","__export","BubbleInput","module","exports","import_jsx_runtime","require","import_gui_use_previous","React","__toESM","import_utils","props","checked","bubbles","control","isHidden","inputProps","ref","useRef","prevChecked","usePrevious","useEffect","input","current","inputProto","window","HTMLInputElement","prototype","descriptor","Object","getOwnPropertyDescriptor","setChecked","set","event","Event","indeterminate","isIndeterminate","call","dispatchEvent","jsx","type","defaultChecked","tabIndex","style","position","pointerEvents","opacity","margin","appearance","accentColor"],"sources":["../../src/BubbleInput.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAA,CAA4BK,mBAAA;AAcrB,IAAAK,kBAAqB,GAAAC,OAA4B;EAAAC,uBAAA,GAAAD,OAAA;EAAAE,KAAA,GAAAC,OAAA,CAAAH,OAAA;EAAAI,YAAA,GAAAJ,OAAA;EAAAJ,WAAA,YAAAA,CAAAS,KAAA;IACtD;QAAMC,OAAE;QAAAC,OAAS,KAAU;QAAAC,OAAM;QAAAC,QAAS;QAAA,GAA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
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
7
+ get: () => from[key],
8
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
+ });
10
+ return to;
11
+ },
12
+ __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
+ value: !0
15
+ }), mod);
16
+ var index_exports = {};
17
+ module.exports = __toCommonJS(index_exports);
18
+ __reExport(index_exports, require("./useCheckbox.cjs"), module.exports);
19
+ __reExport(index_exports, require("./utils.cjs"), module.exports);
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
+ get: () => from[key],
10
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
+ });
12
+ return to;
13
+ },
14
+ __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
+ value: !0
17
+ }), mod);
18
+ var index_exports = {};
19
+ module.exports = __toCommonJS(index_exports);
20
+ __reExport(index_exports, require("./useCheckbox.native.js"), module.exports);
21
+ __reExport(index_exports, require("./utils.native.js"), module.exports);
22
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,0BADd,GAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
@@ -0,0 +1,96 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf,
6
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: !0
28
+ }) : target, mod)),
29
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
+ value: !0
31
+ }), mod);
32
+ var useCheckbox_exports = {};
33
+ __export(useCheckbox_exports, {
34
+ useCheckbox: () => useCheckbox
35
+ });
36
+ module.exports = __toCommonJS(useCheckbox_exports);
37
+ var import_gui_compose_refs = require("@hanzo/gui-compose-refs"),
38
+ import_gui_constants = require("@hanzo/gui-constants"),
39
+ import_gui_helpers = require("@hanzo/gui-helpers"),
40
+ import_gui_label = require("@hanzo/gui-label"),
41
+ import_react = __toESM(require("react"), 1),
42
+ import_BubbleInput = require("./BubbleInput.cjs"),
43
+ import_utils = require("./utils.cjs"),
44
+ import_jsx_runtime = require("react/jsx-runtime");
45
+ function useCheckbox(props, [checked, setChecked], ref) {
46
+ const {
47
+ labelledBy: ariaLabelledby,
48
+ name,
49
+ required,
50
+ disabled,
51
+ value = "on",
52
+ onCheckedChange,
53
+ ...checkboxProps
54
+ } = props,
55
+ [button, setButton] = import_react.default.useState(null),
56
+ composedRefs = (0, import_gui_compose_refs.useComposedRefs)(ref, setButton),
57
+ hasConsumerStoppedPropagationRef = import_react.default.useRef(!1),
58
+ isFormControl = import_gui_constants.isWeb ? button ? !!button.closest("form") : !0 : !1,
59
+ labelId = (0, import_gui_label.useLabelContext)(button),
60
+ labelledBy = ariaLabelledby || labelId,
61
+ parentKeyDown = props.onKeyDown,
62
+ handleKeyDown = (0, import_react.useMemo)(() => (0, import_gui_helpers.composeEventHandlers)(parentKeyDown, event => {
63
+ event.key === "Enter" && event.preventDefault();
64
+ }), [parentKeyDown]),
65
+ handlePress = (0, import_react.useMemo)(() => (0, import_gui_helpers.composeEventHandlers)(props.onPress, event => {
66
+ setChecked(prevChecked => (0, import_utils.isIndeterminate)(prevChecked) ? !0 : !prevChecked), isFormControl && "isPropagationStopped" in event && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
67
+ }), [isFormControl]);
68
+ return {
69
+ bubbleInput: import_gui_constants.isWeb && isFormControl ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_BubbleInput.BubbleInput, {
70
+ isHidden: !0,
71
+ control: button,
72
+ bubbles: !hasConsumerStoppedPropagationRef.current,
73
+ name,
74
+ value,
75
+ checked,
76
+ required,
77
+ disabled
78
+ }) : null,
79
+ checkboxRef: composedRefs,
80
+ checkboxProps: {
81
+ role: "checkbox",
82
+ "aria-labelledby": labelledBy,
83
+ "aria-checked": (0, import_utils.isIndeterminate)(checked) ? "mixed" : checked,
84
+ ...checkboxProps,
85
+ ...(import_gui_constants.isWeb && {
86
+ type: "button",
87
+ value,
88
+ "data-state": (0, import_utils.getState)(checked),
89
+ "data-disabled": disabled ? "" : void 0,
90
+ disabled,
91
+ onKeyDown: disabled ? void 0 : handleKeyDown
92
+ }),
93
+ onPress: disabled ? void 0 : handlePress
94
+ }
95
+ };
96
+ }
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: !0
13
+ });
14
+ },
15
+ __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: !0
30
+ }) : target, mod)),
31
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: !0
33
+ }), mod);
34
+ var useCheckbox_exports = {};
35
+ __export(useCheckbox_exports, {
36
+ useCheckbox: () => useCheckbox
37
+ });
38
+ module.exports = __toCommonJS(useCheckbox_exports);
39
+ var import_jsx_runtime = require("react/jsx-runtime"),
40
+ import_gui_compose_refs = require("@hanzo/gui-compose-refs"),
41
+ import_gui_constants = require("@hanzo/gui-constants"),
42
+ import_gui_helpers = require("@hanzo/gui-helpers"),
43
+ import_gui_label = require("@hanzo/gui-label"),
44
+ import_react = __toESM(require("react"), 1),
45
+ import_BubbleInput = require("./BubbleInput.native.js"),
46
+ import_utils = require("./utils.native.js");
47
+ function useCheckbox(props, param, ref) {
48
+ var [checked, setChecked] = param,
49
+ {
50
+ labelledBy: ariaLabelledby,
51
+ name,
52
+ required,
53
+ disabled,
54
+ value = "on",
55
+ onCheckedChange,
56
+ ...checkboxProps
57
+ } = props,
58
+ [button, setButton] = import_react.default.useState(null),
59
+ composedRefs = (0, import_gui_compose_refs.useComposedRefs)(ref, setButton),
60
+ hasConsumerStoppedPropagationRef = import_react.default.useRef(!1),
61
+ isFormControl = import_gui_constants.isWeb ? button ? !!button.closest("form") : !0 : !1,
62
+ labelId = (0, import_gui_label.useLabelContext)(button),
63
+ labelledBy = ariaLabelledby || labelId,
64
+ parentKeyDown = props.onKeyDown,
65
+ handleKeyDown = (0, import_react.useMemo)(function () {
66
+ return (0, import_gui_helpers.composeEventHandlers)(parentKeyDown, function (event) {
67
+ event.key === "Enter" && event.preventDefault();
68
+ });
69
+ }, [parentKeyDown]),
70
+ handlePress = (0, import_react.useMemo)(function () {
71
+ return (0, import_gui_helpers.composeEventHandlers)(props.onPress, function (event) {
72
+ setChecked(function (prevChecked) {
73
+ return (0, import_utils.isIndeterminate)(prevChecked) ? !0 : !prevChecked;
74
+ }), isFormControl && "isPropagationStopped" in event && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
75
+ });
76
+ }, [isFormControl]);
77
+ return {
78
+ bubbleInput: import_gui_constants.isWeb && isFormControl ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_BubbleInput.BubbleInput, {
79
+ isHidden: !0,
80
+ control: button,
81
+ bubbles: !hasConsumerStoppedPropagationRef.current,
82
+ name,
83
+ value,
84
+ checked,
85
+ required,
86
+ disabled
87
+ }) : null,
88
+ checkboxRef: composedRefs,
89
+ checkboxProps: {
90
+ role: "checkbox",
91
+ "aria-labelledby": labelledBy,
92
+ "aria-checked": (0, import_utils.isIndeterminate)(checked) ? "mixed" : checked,
93
+ ...checkboxProps,
94
+ ...(import_gui_constants.isWeb && {
95
+ type: "button",
96
+ value,
97
+ "data-state": (0, import_utils.getState)(checked),
98
+ "data-disabled": disabled ? "" : void 0,
99
+ disabled,
100
+ onKeyDown: disabled ? void 0 : handleKeyDown
101
+ }),
102
+ onPress: disabled ? void 0 : handlePress
103
+ }
104
+ };
105
+ }
106
+ //# sourceMappingURL=useCheckbox.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useCheckbox_exports","__export","useCheckbox","module","exports","import_jsx_runtime","require","import_gui_compose_refs","import_gui_constants","import_gui_helpers","import_gui_label","import_react","__toESM","import_BubbleInput","import_utils","props","param","ref","checked","setChecked","labelledBy","ariaLabelledby","name","required","disabled","onCheckedChange","checkboxProps","button","setButton","default","useState","composedRefs","useComposedRefs","hasConsumerStoppedPropagationRef","useRef","isFormControl","isWeb","closest","labelId","useLabelContext","parentKeyDown","onKeyDown","handleKeyDown","useMemo","composeEventHandlers","event","key","preventDefault","handlePress","onPress","prevChecked","isIndeterminate","current","isPropagationStopped","stopPropagation","bubbleInput","jsx","BubbleInput","isHidden","control","bubbles","checkboxRef","role","type","getState"],"sources":["../../src/useCheckb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,EAAAzB,QAAA,YAAAwB;IAAA;EAC8B;AACG","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var utils_exports = {};
22
+ __export(utils_exports, {
23
+ getState: () => getState,
24
+ isIndeterminate: () => isIndeterminate
25
+ });
26
+ module.exports = __toCommonJS(utils_exports);
27
+ function isIndeterminate(checked) {
28
+ return checked === "indeterminate";
29
+ }
30
+ function getState(checked) {
31
+ return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
32
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
+ value: !0
22
+ }), mod);
23
+ var utils_exports = {};
24
+ __export(utils_exports, {
25
+ getState: () => getState,
26
+ isIndeterminate: () => isIndeterminate
27
+ });
28
+ module.exports = __toCommonJS(utils_exports);
29
+ function isIndeterminate(checked) {
30
+ return checked === "indeterminate";
31
+ }
32
+ function getState(checked) {
33
+ return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
34
+ }
35
+ //# sourceMappingURL=utils.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","utils_exports","__export","getState","isIndeterminate","module","exports","checked"],"sources":["../../src/utils.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA;AAAA;AAEOC,MAAA,CAAAC,OAAS,GAAAV,YAAgB,CAAAK,aAAoD;AAClF,SAAOG,eAAYA,CAAAG,OAAA;EACrB,OAAAA,OAAA;AAEO;AACL,SAAOJ,SAAAI,OAAgB;EACzB,OAAAH,eAAA,CAAAG,OAAA,sBAAAA,OAAA","ignoreList":[]}
@@ -0,0 +1,48 @@
1
+ import { usePrevious } from "@hanzo/gui-use-previous";
2
+ import * as React from "react";
3
+ import { isIndeterminate } from "./utils.mjs";
4
+ import { jsx } from "react/jsx-runtime";
5
+ const BubbleInput = props => {
6
+ const {
7
+ checked,
8
+ bubbles = !0,
9
+ control,
10
+ isHidden,
11
+ ...inputProps
12
+ } = props,
13
+ ref = React.useRef(null),
14
+ prevChecked = usePrevious(checked);
15
+ return React.useEffect(() => {
16
+ const input = ref.current,
17
+ inputProto = window.HTMLInputElement.prototype,
18
+ setChecked = Object.getOwnPropertyDescriptor(inputProto, "checked").set;
19
+ if (prevChecked !== checked && setChecked) {
20
+ const event = new Event("click", {
21
+ bubbles
22
+ });
23
+ input.indeterminate = isIndeterminate(checked), setChecked.call(input, isIndeterminate(checked) ? !1 : checked), input.dispatchEvent(event);
24
+ }
25
+ }, [prevChecked, checked, bubbles]), /* @__PURE__ */jsx("input", {
26
+ type: "checkbox",
27
+ defaultChecked: isIndeterminate(checked) ? !1 : checked,
28
+ ...inputProps,
29
+ tabIndex: -1,
30
+ ref,
31
+ "aria-hidden": isHidden,
32
+ style: {
33
+ ...(isHidden ? {
34
+ // ...controlSize,
35
+ position: "absolute",
36
+ pointerEvents: "none",
37
+ opacity: 0,
38
+ margin: 0
39
+ } : {
40
+ appearance: "auto",
41
+ accentColor: "var(--color6)"
42
+ }),
43
+ ...props.style
44
+ }
45
+ });
46
+ };
47
+ export { BubbleInput };
48
+ //# sourceMappingURL=BubbleInput.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["usePrevious","React","isIndeterminate","jsx","BubbleInput","props","checked","bubbles","control","isHidden","inputProps","ref","useRef","prevChecked","useEffect","input","current","inputProto","window","HTMLInputElement","prototype","setChecked","Object","getOwnPropertyDescriptor","set","event","Event","indeterminate","call","dispatchEvent","type","defaultChecked","tabIndex","style","position","pointerEvents","opacity","margin","appearance","accentColor"],"sources":["../../src/BubbleInput.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,QAAmB;AAC5B,YAAYC,KAAA,MAAW;AAGvB,SAASC,eAAA,QAAuB;AAkC5B,SAAAC,GAAA;AAxBG,MAAMC,WAAA,GAAeC,KAAA,IAA4B;EACtD,MAAM;MAAEC,OAAA;MAASC,OAAA,GAAU;MAAMC,OAAA;MAASC,QAAA;MAAU,GAAGC;IAAW,IAAIL,KAAA;IAChEM,GAAA,GAAMV,KAAA,CAAMW,MAAA,CAAyB,IAAI;IACzCC,WAAA,GAAcb,WAAA,CAAYM,OAAO;EAGvC,OAAAL,KAAA,CAAMa,SAAA,CAAU,MAAM;IACpB,MAAMC,KAAA,GAAQJ,GAAA,CAAIK,OAAA;MACZC,UAAA,GAAaC,MAAA,CAAOC,gBAAA,CAAiBC,SAAA;MAKrCC,UAAA,GAJaC,MAAA,CAAOC,wBAAA,CACxBN,UAAA,EACA,SACF,EAC8BO,GAAA;IAE9B,IAAIX,WAAA,KAAgBP,OAAA,IAAWe,UAAA,EAAY;MACzC,MAAMI,KAAA,GAAQ,IAAIC,KAAA,CAAM,SAAS;QAAEnB;MAAQ,CAAC;MAC5CQ,KAAA,CAAMY,aAAA,GAAgBzB,eAAA,CAAgBI,OAAO,GAC7Ce,UAAA,CAAWO,IAAA,CAAKb,KAAA,EAAOb,eAAA,CAAgBI,OAAO,IAAI,KAAQA,OAAO,GACjES,KAAA,CAAMc,aAAA,CAAcJ,KAAK;IAC3B;EACF,GAAG,CAACZ,WAAA,EAAaP,OAAA,EAASC,OAAO,CAAC,GAGhC,eAAAJ,GAAA,CAAC;IACC2B,IAAA,EAAK;IACLC,cAAA,EAAgB7B,eAAA,CAAgBI,OAAO,IAAI,KAAQA,OAAA;IAClD,GAAGI,UAAA;IACJsB,QAAA,EAAU;IACVrB,GAAA;IACA,eAAaF,QAAA;IACbwB,KAAA,EAAO;MACL,IAAIxB,QAAA,GACA;QAAA;QAEEyB,QAAA,EAAU;QACVC,aAAA,EAAe;QACfC,OAAA,EAAS;QACTC,MAAA,EAAQ;MACV,IACA;QACEC,UAAA,EAAY;QACZC,WAAA,EAAa;MACf;MAEJ,GAAGlC,KAAA,CAAM4B;IACX;EAAA,CACF;AAEJ","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { usePrevious } from "@hanzo/gui-use-previous";
3
+ import * as React from "react";
4
+ import { isIndeterminate } from "./utils.native.js";
5
+ var BubbleInput = function (props) {
6
+ var {
7
+ checked,
8
+ bubbles = !0,
9
+ control,
10
+ isHidden,
11
+ ...inputProps
12
+ } = props,
13
+ ref = React.useRef(null),
14
+ prevChecked = usePrevious(checked);
15
+ return React.useEffect(function () {
16
+ var input = ref.current,
17
+ inputProto = window.HTMLInputElement.prototype,
18
+ descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked"),
19
+ setChecked = descriptor.set;
20
+ if (prevChecked !== checked && setChecked) {
21
+ var event = new Event("click", {
22
+ bubbles
23
+ });
24
+ input.indeterminate = isIndeterminate(checked), setChecked.call(input, isIndeterminate(checked) ? !1 : checked), input.dispatchEvent(event);
25
+ }
26
+ }, [prevChecked, checked, bubbles]), /* @__PURE__ */_jsx("input", {
27
+ type: "checkbox",
28
+ defaultChecked: isIndeterminate(checked) ? !1 : checked,
29
+ ...inputProps,
30
+ tabIndex: -1,
31
+ ref,
32
+ "aria-hidden": isHidden,
33
+ style: {
34
+ ...(isHidden ? {
35
+ // ...controlSize,
36
+ position: "absolute",
37
+ pointerEvents: "none",
38
+ opacity: 0,
39
+ margin: 0
40
+ } : {
41
+ appearance: "auto",
42
+ accentColor: "var(--color6)"
43
+ }),
44
+ ...props.style
45
+ }
46
+ });
47
+ };
48
+ export { BubbleInput };
49
+ //# sourceMappingURL=BubbleInput.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jsx","_jsx","usePrevious","React","isIndeterminate","BubbleInput","props","checked","bubbles","control","isHidden","inputProps","ref","useRef","prevChecked","useEffect","input","current","inputProto","window","HTMLInputElement","prototype","descriptor","Object","getOwnPropertyDescriptor","setChecked","set","event","Event","indeterminate","call","dispatchEvent","type","defaultChecked","tabIndex","style","position","pointerEvents","opacity","margin","appearance","accentColor"],"sources":["../../src/BubbleInput.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAA,IAAAC,IAAA,QAAmB;AAC5B,SAAAC,WAAY,QAAW;AAGvB,YAASC,KAAA;AAkCL,SAAAC,eAAA;AAxBG,IAAAC,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
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export * from "./useCheckbox.mjs";
2
+ export * from "./utils.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc","ignoreList":[]}