@tamagui/checkbox 2.7.7 → 3.0.0-beta.637.1

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 (67) hide show
  1. package/dist/cjs/Checkbox.cjs +105 -101
  2. package/dist/cjs/Checkbox.native.cjs +137 -0
  3. package/dist/cjs/Checkbox.native.js +120 -100
  4. package/dist/cjs/Checkbox.native.js.map +1 -1
  5. package/dist/cjs/CheckboxStyledContext.cjs +18 -23
  6. package/dist/cjs/CheckboxStyledContext.native.cjs +32 -0
  7. package/dist/cjs/CheckboxStyledContext.native.js +18 -22
  8. package/dist/cjs/CheckboxStyledContext.native.js.map +1 -1
  9. package/dist/cjs/index.cjs +9 -26
  10. package/dist/cjs/index.native.cjs +22 -0
  11. package/dist/cjs/index.native.js +10 -26
  12. package/dist/cjs/index.native.js.map +1 -1
  13. package/dist/esm/Checkbox.mjs +83 -87
  14. package/dist/esm/Checkbox.mjs.map +1 -1
  15. package/dist/esm/Checkbox.native.js +99 -87
  16. package/dist/esm/Checkbox.native.js.map +1 -1
  17. package/dist/esm/CheckboxStyledContext.mjs +5 -5
  18. package/dist/esm/CheckboxStyledContext.mjs.map +1 -1
  19. package/dist/esm/CheckboxStyledContext.native.js +5 -5
  20. package/dist/esm/CheckboxStyledContext.native.js.map +1 -1
  21. package/dist/esm/index.js +3 -11
  22. package/dist/esm/index.mjs +3 -11
  23. package/dist/esm/index.native.js +3 -11
  24. package/dist/jsx/Checkbox.mjs +83 -87
  25. package/dist/jsx/Checkbox.mjs.map +1 -1
  26. package/dist/jsx/Checkbox.native.cjs +137 -0
  27. package/dist/jsx/Checkbox.native.js +120 -100
  28. package/dist/jsx/Checkbox.native.js.map +1 -1
  29. package/dist/jsx/CheckboxStyledContext.mjs +5 -5
  30. package/dist/jsx/CheckboxStyledContext.mjs.map +1 -1
  31. package/dist/jsx/CheckboxStyledContext.native.cjs +32 -0
  32. package/dist/jsx/CheckboxStyledContext.native.js +18 -22
  33. package/dist/jsx/CheckboxStyledContext.native.js.map +1 -1
  34. package/dist/jsx/index.js +3 -11
  35. package/dist/jsx/index.mjs +3 -11
  36. package/dist/jsx/index.native.cjs +22 -0
  37. package/dist/jsx/index.native.js +10 -26
  38. package/dist/jsx/index.native.js.map +1 -1
  39. package/package.json +6 -16
  40. package/src/Checkbox.tsx +189 -81
  41. package/src/CheckboxStyledContext.tsx +2 -6
  42. package/src/index.ts +0 -9
  43. package/types/Checkbox.d.ts +446 -24
  44. package/types/Checkbox.d.ts.map +1 -1
  45. package/types/CheckboxStyledContext.d.ts +2 -4
  46. package/types/CheckboxStyledContext.d.ts.map +1 -1
  47. package/types/index.d.ts +0 -320
  48. package/types/index.d.ts.map +1 -1
  49. package/dist/cjs/createCheckbox.cjs +0 -194
  50. package/dist/cjs/createCheckbox.native.js +0 -213
  51. package/dist/cjs/createCheckbox.native.js.map +0 -1
  52. package/dist/esm/createCheckbox.mjs +0 -150
  53. package/dist/esm/createCheckbox.mjs.map +0 -1
  54. package/dist/esm/createCheckbox.native.js +0 -167
  55. package/dist/esm/createCheckbox.native.js.map +0 -1
  56. package/dist/esm/index.js.map +0 -1
  57. package/dist/esm/index.mjs.map +0 -1
  58. package/dist/esm/index.native.js.map +0 -1
  59. package/dist/jsx/createCheckbox.mjs +0 -150
  60. package/dist/jsx/createCheckbox.mjs.map +0 -1
  61. package/dist/jsx/createCheckbox.native.js +0 -213
  62. package/dist/jsx/createCheckbox.native.js.map +0 -1
  63. package/dist/jsx/index.js.map +0 -1
  64. package/dist/jsx/index.mjs.map +0 -1
  65. package/src/createCheckbox.tsx +0 -280
  66. package/types/createCheckbox.d.ts +0 -196
  67. package/types/createCheckbox.d.ts.map +0 -1
@@ -1,90 +1,102 @@
1
- import { getVariableValue, styled } from "@tamagui/core";
2
- import { getSize } from "@tamagui/get-token";
3
- import { YStack } from "@tamagui/stacks";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { isIndeterminate, useCheckbox } from "@tamagui/checkbox-headless";
3
+ import { View, createStyledHOC, isWeb, shouldRenderNativePlatform, styled, useProps, withStaticProperties } from "@tamagui/core";
4
+ import { registerFocusable } from "@tamagui/focusable";
5
+ import { useControllableState } from "@tamagui/use-controllable-state";
6
+ import React, { useMemo } from "react";
4
7
  import { CheckboxStyledContext } from "./CheckboxStyledContext.native.js";
5
- var INDICATOR_NAME = "CheckboxIndicator";
6
- var CheckboxIndicatorFrame = styled(YStack, {
7
- // use Checkbox for easier themes
8
- name: INDICATOR_NAME,
9
- context: CheckboxStyledContext,
10
- variants: {
11
- unstyled: {
12
- false: {}
13
- }
14
- },
15
- defaultVariants: {
16
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
17
- }
18
- }, {
19
- accept: {
20
- activeStyle: "style"
21
- }
8
+
9
+ var CheckboxIndicatorFrame = styled(View, {
10
+ displayName: "CheckboxIndicator",
11
+ context: CheckboxStyledContext
12
+ }, { accept: { activeStyle: "style" } });
13
+ var CheckboxFrame = styled(View, {
14
+ displayName: "Checkbox",
15
+ render: "button",
16
+ context: CheckboxStyledContext,
17
+ alignItems: "center",
18
+ justifyContent: "center",
19
+ variants: { disabled: { true: {
20
+ pointerEvents: "none",
21
+ userSelect: "none"
22
+ } } }
23
+ }, { accept: { activeStyle: "style" } });
24
+ var CheckboxContext = /* @__PURE__ */ React.createContext({
25
+ checked: false,
26
+ disabled: false
22
27
  });
23
- var CHECKBOX_NAME = "Checkbox";
24
- var CheckboxFrame = styled(YStack, {
25
- name: CHECKBOX_NAME,
26
- render: "button",
27
- context: CheckboxStyledContext,
28
- variants: {
29
- unstyled: {
30
- false: {
31
- size: "$true",
32
- backgroundColor: "$background",
33
- alignItems: "center",
34
- justifyContent: "center",
35
- borderWidth: 1,
36
- borderColor: "$borderColor",
37
- hoverStyle: {
38
- borderColor: "$borderColorHover"
39
- },
40
- pressStyle: {
41
- backgroundColor: "$backgroundPress",
42
- borderColor: "$borderColorPress"
43
- },
44
- focusStyle: {
45
- borderColor: "$borderColorFocus"
46
- },
47
- focusVisibleStyle: {
48
- outlineStyle: "solid",
49
- outlineWidth: 2,
50
- outlineColor: "$outlineColor"
51
- }
52
- }
53
- },
54
- disabled: {
55
- true: {
56
- pointerEvents: "none",
57
- userSelect: "none",
58
- cursor: "not-allowed",
59
- hoverStyle: {
60
- borderColor: "$borderColor",
61
- backgroundColor: "$background"
62
- },
63
- pressStyle: {
64
- borderColor: "$borderColor",
65
- backgroundColor: "$background"
66
- },
67
- focusStyle: {
68
- outlineWidth: 0
69
- }
70
- }
71
- },
72
- size: {
73
- "...size": function (val) {
74
- var radiusToken = getVariableValue(getSize(val)) / 8;
75
- return {
76
- borderRadius: radiusToken
77
- };
78
- }
79
- }
80
- },
81
- defaultVariants: {
82
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
83
- }
84
- }, {
85
- accept: {
86
- activeStyle: "style"
87
- }
88
- });
89
- export { CheckboxFrame, CheckboxIndicatorFrame };
28
+ var Checkbox2 = withStaticProperties(createStyledHOC(CheckboxFrame, function Checkbox(_props, forwardedRef) {
29
+ var { checked: checkedProp, defaultChecked, onCheckedChange, native, activeStyle, activeTheme, ...props } = _props;
30
+ var propsActive = useProps(props);
31
+ var styledContext = React.useContext(CheckboxStyledContext.context);
32
+ var [checked = false, setChecked] = useControllableState({
33
+ prop: checkedProp,
34
+ defaultProp: defaultChecked,
35
+ onChange: onCheckedChange
36
+ });
37
+ var { checkboxProps, checkboxRef, bubbleInput } = useCheckbox(propsActive, [checked, setChecked], forwardedRef);
38
+ React.useEffect(function() {
39
+ if (!props.id) return;
40
+ if (props.disabled) return;
41
+ return registerFocusable(props.id, {
42
+ focusAndSelect: function() {
43
+ setChecked === null || setChecked === void 0 || setChecked(function(value) {
44
+ return !value;
45
+ });
46
+ },
47
+ focus: function() {}
48
+ });
49
+ }, [props.id, props.disabled]);
50
+ if (shouldRenderNativePlatform(native) === "web") return /* @__PURE__ */ jsx("input", {
51
+ type: "checkbox",
52
+ defaultChecked: isIndeterminate(checked) ? false : checked,
53
+ tabIndex: -1,
54
+ ref: checkboxRef,
55
+ disabled: checkboxProps.disabled,
56
+ style: checkboxProps.style
57
+ });
58
+ var memoizedContext = useMemo(function() {
59
+ return {
60
+ checked,
61
+ disabled: checkboxProps.disabled
62
+ };
63
+ }, [checked, checkboxProps.disabled]);
64
+ var isActive = !!checked;
65
+ var disabled = checkboxProps.disabled;
66
+ var _propsActive_size, _ref;
67
+ return /* @__PURE__ */ jsx(CheckboxContext.Provider, {
68
+ value: memoizedContext,
69
+ children: /* @__PURE__ */ jsxs(CheckboxStyledContext.Provider, {
70
+ size: (_ref = (_propsActive_size = propsActive.size) !== null && _propsActive_size !== void 0 ? _propsActive_size : styledContext === null || styledContext === void 0 ? void 0 : styledContext.size) !== null && _ref !== void 0 ? _ref : true,
71
+ active: isActive,
72
+ disabled,
73
+ children: [/* @__PURE__ */ jsx(CheckboxFrame, {
74
+ render: "button",
75
+ ref: checkboxRef,
76
+ theme: activeTheme !== null && activeTheme !== void 0 ? activeTheme : null,
77
+ ...isWeb && { type: "button" },
78
+ checked,
79
+ disabled,
80
+ ...checkboxProps,
81
+ ...props,
82
+ ...isActive && activeStyle ? activeStyle : void 0,
83
+ children: propsActive.children
84
+ }), bubbleInput]
85
+ })
86
+ });
87
+ }), { Indicator: createStyledHOC(CheckboxIndicatorFrame, function(props, forwardedRef) {
88
+ var { children, forceMount, activeStyle, ...indicatorProps } = props;
89
+ var { active } = CheckboxStyledContext.useStyledContext();
90
+ var context = React.useContext(CheckboxContext);
91
+ if (forceMount || isIndeterminate(context.checked) || context.checked === true) return /* @__PURE__ */ jsx(CheckboxIndicatorFrame, {
92
+ pointerEvents: "none",
93
+ ...indicatorProps,
94
+ ...active && activeStyle ? activeStyle : void 0,
95
+ ref: forwardedRef,
96
+ children
97
+ });
98
+ return null;
99
+ }) });
100
+
101
+ export { Checkbox2 as Checkbox, CheckboxContext, CheckboxFrame, CheckboxIndicatorFrame };
90
102
  //# sourceMappingURL=Checkbox.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getVariableValue","styled","getSize","YStack","CheckboxStyledContext","INDICATOR_NAME","CheckboxIndicatorFrame","name","context","variants","unstyled","false","defaultVariants","process","env","TAMAGUI_HEADLESS","accept","activeStyle","CHECKBOX_NAME","CheckboxFrame","render","size","backgroundColor","alignItems","justifyContent","borderWidth","borderColor","hoverStyle","pressStyle","focusStyle","focusVisibleStyle","outlineStyle","outlineWidth","outlineColor","disabled","true","pointerEvents","userSelect","cursor","...size","val","radiusToken","borderRadius"],"sources":["../../src/Checkbox.tsx"],"sourcesContent":[null],"mappings":"AAGA,SAASA,gBAAA,EAAkBC,MAAA,QAAc;AACzC,SAASC,OAAA,QAAe;AACxB,SAASC,MAAA,QAAc;AAEvB,SAASC,qBAAA,QAA6B;AAKtC,IAAAC,cAAM,sBAAiB;AAEhB,IAAAC,sBAAM,GAAAL,MAAyB,CAAAE,MAAA;EACpC;EACAI,IAAA,EAAAF,cAAA;EAAAG,OAAA,EAAAJ,qBAAA;EAAAK,QAEQ;IACNC,QAAA,EAAS;MACTC,KAAA,GAAU;IAAA;EACE;EACAC,eACV;IACFF,QAAA,EAAAG,OAAA,CAAAC,GAAA,CAAAC,gBAAA;EAAA;AACiB;EAC4BC,MAC7C;IACFC,WAAA;EACA;AAAA;AACU,IAAAC,aACN,GAAa;AAAA,IACfC,aAAA,GAAAlB,MAAA,CAAAE,MAAA;EACFI,IAAA,EAAAW,aAAA;EACFE,MAAA;EAMAZ,OAAM,EAAAJ,qBAAgB;EAEfK,QAAM;IACXC,QAAA;MACAC,KAAA;QACEU,IAAM;QACNC,eAAQ;QAERC,UAAS;QACTC,cAAU;QACRC,WAAU;QACRC,WAAO;QAAAC,UACC;UACND,WAAA;QAAiB;QACLE,UACZ;UACAN,eAAa;UACbI,WAAA,EAAa;QAAA;QAEDG,UACV;UACFH,WAAA;QAAA;QAEYI,iBACV;UAAiBC,YACjB,SAAa;UACfC,YAAA;UAEAC,YAAY;QAAA;MACG;IACf;IAEmBC,QACjB;MAAcC,IAAA,EACd;QAAcC,aACd,QAAc;QAAAC,UAChB;QACFC,MAAA;QACFX,UAAA;UAEAD,WAAU;UACRJ,eAAM;QAAA;QACWM,UACf;UACAF,WAAQ;UAERJ,eAAY;QAAA;QACGO,UACb;UACFG,YAAA;QAAA;MAEY;IACG;IACIX,IAAA,EACnB;MAAA,SAEA,WAAAkB,CAAYC,GAAA;QAAA,IACVC,WAAA,GAAczC,gBAAA,CAAAE,OAAA,CAAAsC,GAAA;QAAA,OAChB;UACFE,YAAA,EAAAD;QACF;MAEA;IAAM;EAEF;EACA7B,eAAO;IAAAF,QACL,EAAAG,OAAA,CAAAC,GAAA,CAAcC,gBAAA;EAAA;AAChB;EACFC,MACF;IACFC,WAAA;EAAA;AAEiB;AAC4B,SAE/CE,aAAA,EACAb,sBAAA","ignoreList":[]}
1
+ {"version":3,"file":"Checkbox.native.js","names":[],"sources":["esm/Checkbox.native.js"],"sourcesContent":["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { isIndeterminate, useCheckbox } from \"@tamagui/checkbox-headless\";\nimport { View, createStyledHOC, isWeb, shouldRenderNativePlatform, styled, useProps, withStaticProperties } from \"@tamagui/core\";\nimport { registerFocusable } from \"@tamagui/focusable\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport React, { useMemo } from \"react\";\nimport { CheckboxStyledContext } from \"./CheckboxStyledContext\";\n\nvar CheckboxIndicatorFrame = styled(View, {\n\tdisplayName: \"CheckboxIndicator\",\n\tcontext: CheckboxStyledContext\n}, { accept: { activeStyle: \"style\" } });\nvar CheckboxFrame = styled(View, {\n\tdisplayName: \"Checkbox\",\n\trender: \"button\",\n\tcontext: CheckboxStyledContext,\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tvariants: { disabled: { true: {\n\t\tpointerEvents: \"none\",\n\t\tuserSelect: \"none\"\n\t} } }\n}, { accept: { activeStyle: \"style\" } });\nvar CheckboxContext = /* @__PURE__ */ React.createContext({\n\tchecked: false,\n\tdisabled: false\n});\nvar Checkbox2 = withStaticProperties(createStyledHOC(CheckboxFrame, function Checkbox(_props, forwardedRef) {\n\tvar { checked: checkedProp, defaultChecked, onCheckedChange, native, activeStyle, activeTheme, ...props } = _props;\n\tvar propsActive = useProps(props);\n\tvar styledContext = React.useContext(CheckboxStyledContext.context);\n\tvar [checked = false, setChecked] = useControllableState({\n\t\tprop: checkedProp,\n\t\tdefaultProp: defaultChecked,\n\t\tonChange: onCheckedChange\n\t});\n\tvar { checkboxProps, checkboxRef, bubbleInput } = useCheckbox(propsActive, [checked, setChecked], forwardedRef);\n\tReact.useEffect(function() {\n\t\tif (!props.id) return;\n\t\tif (props.disabled) return;\n\t\treturn registerFocusable(props.id, {\n\t\t\tfocusAndSelect: function() {\n\t\t\t\tsetChecked === null || setChecked === void 0 || setChecked(function(value) {\n\t\t\t\t\treturn !value;\n\t\t\t\t});\n\t\t\t},\n\t\t\tfocus: function() {}\n\t\t});\n\t}, [props.id, props.disabled]);\n\tif (shouldRenderNativePlatform(native) === \"web\") return /* @__PURE__ */ jsx(\"input\", {\n\t\ttype: \"checkbox\",\n\t\tdefaultChecked: isIndeterminate(checked) ? false : checked,\n\t\ttabIndex: -1,\n\t\tref: checkboxRef,\n\t\tdisabled: checkboxProps.disabled,\n\t\tstyle: checkboxProps.style\n\t});\n\tvar memoizedContext = useMemo(function() {\n\t\treturn {\n\t\t\tchecked,\n\t\t\tdisabled: checkboxProps.disabled\n\t\t};\n\t}, [checked, checkboxProps.disabled]);\n\tvar isActive = !!checked;\n\tvar disabled = checkboxProps.disabled;\n\tvar _propsActive_size, _ref;\n\treturn /* @__PURE__ */ jsx(CheckboxContext.Provider, {\n\t\tvalue: memoizedContext,\n\t\tchildren: /* @__PURE__ */ jsxs(CheckboxStyledContext.Provider, {\n\t\t\tsize: (_ref = (_propsActive_size = propsActive.size) !== null && _propsActive_size !== void 0 ? _propsActive_size : styledContext === null || styledContext === void 0 ? void 0 : styledContext.size) !== null && _ref !== void 0 ? _ref : true,\n\t\t\tactive: isActive,\n\t\t\tdisabled,\n\t\t\tchildren: [/* @__PURE__ */ jsx(CheckboxFrame, {\n\t\t\t\trender: \"button\",\n\t\t\t\tref: checkboxRef,\n\t\t\t\ttheme: activeTheme !== null && activeTheme !== void 0 ? activeTheme : null,\n\t\t\t\t...isWeb && { type: \"button\" },\n\t\t\t\tchecked,\n\t\t\t\tdisabled,\n\t\t\t\t...checkboxProps,\n\t\t\t\t...props,\n\t\t\t\t...isActive && activeStyle ? activeStyle : void 0,\n\t\t\t\tchildren: propsActive.children\n\t\t\t}), bubbleInput]\n\t\t})\n\t});\n}), { Indicator: createStyledHOC(CheckboxIndicatorFrame, function(props, forwardedRef) {\n\tvar { children, forceMount, activeStyle, ...indicatorProps } = props;\n\tvar { active } = CheckboxStyledContext.useStyledContext();\n\tvar context = React.useContext(CheckboxContext);\n\tif (forceMount || isIndeterminate(context.checked) || context.checked === true) return /* @__PURE__ */ jsx(CheckboxIndicatorFrame, {\n\t\tpointerEvents: \"none\",\n\t\t...indicatorProps,\n\t\t...active && activeStyle ? activeStyle : void 0,\n\t\tref: forwardedRef,\n\t\tchildren\n\t});\n\treturn null;\n}) });\n\nexport { Checkbox2 as Checkbox, CheckboxContext, CheckboxFrame, CheckboxIndicatorFrame };"],"mappings":";;;;;;;;;AAQA,IAAI,yBAAyB,OAAO,MAAM;CACzC,aAAa;CACb,SAAS;AACV,GAAG,EAAE,QAAQ,EAAE,aAAa,QAAQ,EAAE,CAAC;AACvC,IAAI,gBAAgB,OAAO,MAAM;CAChC,aAAa;CACb,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,UAAU,EAAE,UAAU,EAAE,MAAM;EAC7B,eAAe;EACf,YAAY;CACb,EAAE,EAAE;AACL,GAAG,EAAE,QAAQ,EAAE,aAAa,QAAQ,EAAE,CAAC;AACvC,IAAI,kBAAkC,sBAAM,cAAc;CACzD,SAAS;CACT,UAAU;AACX,CAAC;AACD,IAAI,YAAY,qBAAqB,gBAAgB,eAAe,SAAS,SAAS,QAAQ,cAAc;CAC3G,IAAI,EAAE,SAAS,aAAa,gBAAgB,iBAAiB,QAAQ,aAAa,aAAa,GAAG,UAAU;CAC5G,IAAI,cAAc,SAAS,KAAK;CAChC,IAAI,gBAAgB,MAAM,WAAW,sBAAsB,OAAO;CAClE,IAAI,CAAC,UAAU,OAAO,cAAc,qBAAqB;EACxD,MAAM;EACN,aAAa;EACb,UAAU;CACX,CAAC;CACD,IAAI,EAAE,eAAe,aAAa,gBAAgB,YAAY,aAAa,CAAC,SAAS,UAAU,GAAG,YAAY;CAC9G,MAAM,UAAU,WAAW;EAC1B,IAAI,CAAC,MAAM,IAAI;EACf,IAAI,MAAM,UAAU;EACpB,OAAO,kBAAkB,MAAM,IAAI;GAClC,gBAAgB,WAAW;IAC1B,eAAe,QAAQ,eAAe,KAAK,KAAK,WAAW,SAAS,OAAO;KAC1E,OAAO,CAAC;IACT,CAAC;GACF;GACA,OAAO,WAAW,CAAC;EACpB,CAAC;CACF,GAAG,CAAC,MAAM,IAAI,MAAM,QAAQ,CAAC;CAC7B,IAAI,2BAA2B,MAAM,MAAM,OAAO,OAAuB,oBAAI,SAAS;EACrF,MAAM;EACN,gBAAgB,gBAAgB,OAAO,IAAI,QAAQ;EACnD,UAAU,CAAC;EACX,KAAK;EACL,UAAU,cAAc;EACxB,OAAO,cAAc;CACtB,CAAC;CACD,IAAI,kBAAkB,QAAQ,WAAW;EACxC,OAAO;GACN;GACA,UAAU,cAAc;EACzB;CACD,GAAG,CAAC,SAAS,cAAc,QAAQ,CAAC;CACpC,IAAI,WAAW,CAAC,CAAC;CACjB,IAAI,WAAW,cAAc;CAC7B,IAAI,mBAAmB;CACvB,OAAuB,oBAAI,gBAAgB,UAAU;EACpD,OAAO;EACP,UAA0B,qBAAK,sBAAsB,UAAU;GAC9D,OAAO,QAAQ,oBAAoB,YAAY,UAAU,QAAQ,sBAAsB,KAAK,IAAI,oBAAoB,kBAAkB,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,cAAc,UAAU,QAAQ,SAAS,KAAK,IAAI,OAAO;GAC3O,QAAQ;GACR;GACA,UAAU,CAAiB,oBAAI,eAAe;IAC7C,QAAQ;IACR,KAAK;IACL,OAAO,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,cAAc;IACtE,GAAG,SAAS,EAAE,MAAM,SAAS;IAC7B;IACA;IACA,GAAG;IACH,GAAG;IACH,GAAG,YAAY,cAAc,cAAc,KAAK;IAChD,UAAU,YAAY;GACvB,CAAC,GAAG,WAAW;EAChB,CAAC;CACF,CAAC;AACF,CAAC,GAAG,EAAE,WAAW,gBAAgB,wBAAwB,SAAS,OAAO,cAAc;CACtF,IAAI,EAAE,UAAU,YAAY,aAAa,GAAG,mBAAmB;CAC/D,IAAI,EAAE,WAAW,sBAAsB,iBAAiB;CACxD,IAAI,UAAU,MAAM,WAAW,eAAe;CAC9C,IAAI,cAAc,gBAAgB,QAAQ,OAAO,KAAK,QAAQ,YAAY,MAAM,OAAuB,oBAAI,wBAAwB;EAClI,eAAe;EACf,GAAG;EACH,GAAG,UAAU,cAAc,cAAc,KAAK;EAC9C,KAAK;EACL;CACD,CAAC;CACD,OAAO;AACR,CAAC,EAAE,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { createStyledContext } from "@tamagui/core";
2
+
2
3
  const CheckboxStyledContext = createStyledContext({
3
- size: "$true",
4
- scaleIcon: 1,
5
- unstyled: process.env.TAMAGUI_HEADLESS === "1",
6
- active: false,
7
- disabled: false
4
+ size: true,
5
+ active: false,
6
+ disabled: false
8
7
  });
8
+
9
9
  export { CheckboxStyledContext };
10
10
  //# sourceMappingURL=CheckboxStyledContext.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["createStyledContext","CheckboxStyledContext","size","scaleIcon","unstyled","process","env","TAMAGUI_HEADLESS","active","disabled"],"sources":["../../src/CheckboxStyledContext.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,mBAAA,QAA2B;AAE7B,MAAMC,qBAAA,GAAwBD,mBAAA,CAMlC;EACDE,IAAA,EAAM;EACNC,SAAA,EAAW;EACXC,QAAA,EAAUC,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;EAC3CC,MAAA,EAAQ;EACRC,QAAA,EAAU;AACZ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"CheckboxStyledContext.js","names":[],"sources":["esm/CheckboxStyledContext.js"],"sourcesContent":["import { createStyledContext } from \"@tamagui/core\";\nconst CheckboxStyledContext = createStyledContext({\n size: true,\n active: false,\n disabled: false\n});\nexport {\n CheckboxStyledContext\n};\n//# sourceMappingURL=CheckboxStyledContext.js.map\n"],"mappings":";;;AACA,MAAM,wBAAwB,oBAAoB;CAChD,MAAM;CACN,QAAQ;CACR,UAAU;AACZ,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { createStyledContext } from "@tamagui/core";
2
+
2
3
  var CheckboxStyledContext = createStyledContext({
3
- size: "$true",
4
- scaleIcon: 1,
5
- unstyled: process.env.TAMAGUI_HEADLESS === "1",
6
- active: false,
7
- disabled: false
4
+ size: true,
5
+ active: false,
6
+ disabled: false
8
7
  });
8
+
9
9
  export { CheckboxStyledContext };
10
10
  //# sourceMappingURL=CheckboxStyledContext.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createStyledContext","CheckboxStyledContext","size","scaleIcon","unstyled","process","env","TAMAGUI_HEADLESS","active","disabled"],"sources":["../../src/CheckboxStyledContext.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,mBAAA,QAA2B;AAE7B,IAAAC,qBAAM,GAAAD,mBAAwB;EAOnCE,IAAA,EAAM;EACNC,SAAA,EAAW;EACXC,QAAA,EAAUC,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;EAC3CC,MAAA,EAAQ;EACRC,QAAA,EAAU;AACZ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"CheckboxStyledContext.native.js","names":[],"sources":["esm/CheckboxStyledContext.native.js"],"sourcesContent":["import { createStyledContext } from \"@tamagui/core\";\nvar CheckboxStyledContext = createStyledContext({\n size: true,\n active: false,\n disabled: false\n});\nexport {\n CheckboxStyledContext\n};\n//# sourceMappingURL=CheckboxStyledContext.js.map\n"],"mappings":";;;AACA,IAAI,wBAAwB,oBAAoB;CAC9C,MAAM;CACN,QAAQ;CACR,UAAU;AACZ,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,11 +1,3 @@
1
- import { CheckboxFrame, CheckboxIndicatorFrame } from "./Checkbox.mjs";
2
- import { createCheckbox } from "./createCheckbox.mjs";
3
- export * from "./createCheckbox.mjs";
4
- export * from "./Checkbox.mjs";
5
- export * from "./CheckboxStyledContext.mjs";
6
- const Checkbox = createCheckbox({
7
- Frame: CheckboxFrame,
8
- Indicator: CheckboxIndicatorFrame
9
- });
10
- export { Checkbox };
11
- //# sourceMappingURL=index.js.map
1
+ export * from "./Checkbox.mjs"
2
+
3
+ export * from "./CheckboxStyledContext.mjs"
@@ -1,11 +1,3 @@
1
- import { CheckboxFrame, CheckboxIndicatorFrame } from "./Checkbox.mjs";
2
- import { createCheckbox } from "./createCheckbox.mjs";
3
- export * from "./createCheckbox.mjs";
4
- export * from "./Checkbox.mjs";
5
- export * from "./CheckboxStyledContext.mjs";
6
- const Checkbox = createCheckbox({
7
- Frame: CheckboxFrame,
8
- Indicator: CheckboxIndicatorFrame
9
- });
10
- export { Checkbox };
11
- //# sourceMappingURL=index.mjs.map
1
+ export * from "./Checkbox.mjs"
2
+
3
+ export * from "./CheckboxStyledContext.mjs"
@@ -1,11 +1,3 @@
1
- import { CheckboxFrame, CheckboxIndicatorFrame } from "./Checkbox.native.js";
2
- import { createCheckbox } from "./createCheckbox.native.js";
3
- export * from "./createCheckbox.native.js";
4
- export * from "./Checkbox.native.js";
5
- export * from "./CheckboxStyledContext.native.js";
6
- var Checkbox = createCheckbox({
7
- Frame: CheckboxFrame,
8
- Indicator: CheckboxIndicatorFrame
9
- });
10
- export { Checkbox };
11
- //# sourceMappingURL=index.native.js.map
1
+ export * from "./Checkbox.native.js"
2
+
3
+ export * from "./CheckboxStyledContext.native.js"
@@ -1,90 +1,86 @@
1
- import { getVariableValue, styled } from "@tamagui/core";
2
- import { getSize } from "@tamagui/get-token";
3
- import { YStack } from "@tamagui/stacks";
1
+ import { isIndeterminate, useCheckbox } from "@tamagui/checkbox-headless";
2
+ import { View, createStyledHOC, isWeb, shouldRenderNativePlatform, styled, useProps, withStaticProperties } from "@tamagui/core";
3
+ import { useControllableState } from "@tamagui/use-controllable-state";
4
+ import React, { useMemo } from "react";
4
5
  import { CheckboxStyledContext } from "./CheckboxStyledContext.mjs";
5
- const INDICATOR_NAME = "CheckboxIndicator";
6
- const CheckboxIndicatorFrame = styled(YStack, {
7
- // use Checkbox for easier themes
8
- name: INDICATOR_NAME,
9
- context: CheckboxStyledContext,
10
- variants: {
11
- unstyled: {
12
- false: {}
13
- }
14
- },
15
- defaultVariants: {
16
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
17
- }
18
- }, {
19
- accept: {
20
- activeStyle: "style"
21
- }
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+
8
+ const CheckboxIndicatorFrame = styled(View, {
9
+ displayName: "CheckboxIndicator",
10
+ context: CheckboxStyledContext
11
+ }, { accept: { activeStyle: "style" } });
12
+ const CheckboxFrame = styled(View, {
13
+ displayName: "Checkbox",
14
+ render: "button",
15
+ context: CheckboxStyledContext,
16
+ alignItems: "center",
17
+ justifyContent: "center",
18
+ variants: { disabled: { true: {
19
+ pointerEvents: "none",
20
+ userSelect: "none"
21
+ } } }
22
+ }, { accept: { activeStyle: "style" } });
23
+ const CheckboxContext = React.createContext({
24
+ checked: false,
25
+ disabled: false
22
26
  });
23
- const CHECKBOX_NAME = "Checkbox";
24
- const CheckboxFrame = styled(YStack, {
25
- name: CHECKBOX_NAME,
26
- render: "button",
27
- context: CheckboxStyledContext,
28
- variants: {
29
- unstyled: {
30
- false: {
31
- size: "$true",
32
- backgroundColor: "$background",
33
- alignItems: "center",
34
- justifyContent: "center",
35
- borderWidth: 1,
36
- borderColor: "$borderColor",
37
- hoverStyle: {
38
- borderColor: "$borderColorHover"
39
- },
40
- pressStyle: {
41
- backgroundColor: "$backgroundPress",
42
- borderColor: "$borderColorPress"
43
- },
44
- focusStyle: {
45
- borderColor: "$borderColorFocus"
46
- },
47
- focusVisibleStyle: {
48
- outlineStyle: "solid",
49
- outlineWidth: 2,
50
- outlineColor: "$outlineColor"
51
- }
52
- }
53
- },
54
- disabled: {
55
- true: {
56
- pointerEvents: "none",
57
- userSelect: "none",
58
- cursor: "not-allowed",
59
- hoverStyle: {
60
- borderColor: "$borderColor",
61
- backgroundColor: "$background"
62
- },
63
- pressStyle: {
64
- borderColor: "$borderColor",
65
- backgroundColor: "$background"
66
- },
67
- focusStyle: {
68
- outlineWidth: 0
69
- }
70
- }
71
- },
72
- size: {
73
- "...size": val => {
74
- const radiusToken = getVariableValue(getSize(val)) / 8;
75
- return {
76
- borderRadius: radiusToken
77
- };
78
- }
79
- }
80
- },
81
- defaultVariants: {
82
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
83
- }
84
- }, {
85
- accept: {
86
- activeStyle: "style"
87
- }
88
- });
89
- export { CheckboxFrame, CheckboxIndicatorFrame };
27
+ const Checkbox2 = withStaticProperties(createStyledHOC(CheckboxFrame, function Checkbox(_props, forwardedRef) {
28
+ const { checked: checkedProp, defaultChecked, onCheckedChange, native, activeStyle, activeTheme, ...props } = _props;
29
+ const propsActive = useProps(props);
30
+ const styledContext = React.useContext(CheckboxStyledContext.context);
31
+ const [checked = false, setChecked] = useControllableState({
32
+ prop: checkedProp,
33
+ defaultProp: defaultChecked,
34
+ onChange: onCheckedChange
35
+ });
36
+ const { checkboxProps, checkboxRef, bubbleInput } = useCheckbox(propsActive, [checked, setChecked], forwardedRef);
37
+ if (shouldRenderNativePlatform(native) === "web") return /* @__PURE__ */ jsx("input", {
38
+ type: "checkbox",
39
+ defaultChecked: isIndeterminate(checked) ? false : checked,
40
+ tabIndex: -1,
41
+ ref: checkboxRef,
42
+ disabled: checkboxProps.disabled,
43
+ style: checkboxProps.style
44
+ });
45
+ const memoizedContext = useMemo(() => ({
46
+ checked,
47
+ disabled: checkboxProps.disabled
48
+ }), [checked, checkboxProps.disabled]);
49
+ const isActive = !!checked;
50
+ const disabled = checkboxProps.disabled;
51
+ return /* @__PURE__ */ jsx(CheckboxContext.Provider, {
52
+ value: memoizedContext,
53
+ children: /* @__PURE__ */ jsxs(CheckboxStyledContext.Provider, {
54
+ size: propsActive.size ?? styledContext?.size ?? true,
55
+ active: isActive,
56
+ disabled,
57
+ children: [/* @__PURE__ */ jsx(CheckboxFrame, {
58
+ render: "button",
59
+ ref: checkboxRef,
60
+ theme: activeTheme ?? null,
61
+ ...isWeb && { type: "button" },
62
+ checked,
63
+ disabled,
64
+ ...checkboxProps,
65
+ ...props,
66
+ ...isActive && activeStyle ? activeStyle : void 0,
67
+ children: propsActive.children
68
+ }), bubbleInput]
69
+ })
70
+ });
71
+ }), { Indicator: createStyledHOC(CheckboxIndicatorFrame, (props, forwardedRef) => {
72
+ const { children, forceMount, activeStyle, ...indicatorProps } = props;
73
+ const { active } = CheckboxStyledContext.useStyledContext();
74
+ const context = React.useContext(CheckboxContext);
75
+ if (forceMount || isIndeterminate(context.checked) || context.checked === true) return /* @__PURE__ */ jsx(CheckboxIndicatorFrame, {
76
+ pointerEvents: "none",
77
+ ...indicatorProps,
78
+ ...active && activeStyle ? activeStyle : void 0,
79
+ ref: forwardedRef,
80
+ children
81
+ });
82
+ return null;
83
+ }) });
84
+
85
+ export { Checkbox2 as Checkbox, CheckboxContext, CheckboxFrame, CheckboxIndicatorFrame };
90
86
  //# sourceMappingURL=Checkbox.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["getVariableValue","styled","getSize","YStack","CheckboxStyledContext","INDICATOR_NAME","CheckboxIndicatorFrame","name","context","variants","unstyled","false","defaultVariants","process","env","TAMAGUI_HEADLESS","accept","activeStyle","CHECKBOX_NAME","CheckboxFrame","render","size","backgroundColor","alignItems","justifyContent","borderWidth","borderColor","hoverStyle","pressStyle","focusStyle","focusVisibleStyle","outlineStyle","outlineWidth","outlineColor","disabled","true","pointerEvents","userSelect","cursor","val","radiusToken","borderRadius"],"sources":["../../src/Checkbox.tsx"],"sourcesContent":[null],"mappings":"AAGA,SAASA,gBAAA,EAAkBC,MAAA,QAAc;AACzC,SAASC,OAAA,QAAe;AACxB,SAASC,MAAA,QAAc;AAEvB,SAASC,qBAAA,QAA6B;AAKtC,MAAMC,cAAA,GAAiB;AAEhB,MAAMC,sBAAA,GAAyBL,MAAA,CACpCE,MAAA,EACA;EAAA;EAEEI,IAAA,EAAMF,cAAA;EACNG,OAAA,EAASJ,qBAAA;EACTK,QAAA,EAAU;IACRC,QAAA,EAAU;MACRC,KAAA,EAAO,CAAC;IACV;EACF;EACAC,eAAA,EAAiB;IACfF,QAAA,EAAUG,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;EAC7C;AACF,GACA;EACEC,MAAA,EAAQ;IACNC,WAAA,EAAa;EACf;AACF,CACF;AAMA,MAAMC,aAAA,GAAgB;AAEf,MAAMC,aAAA,GAAgBlB,MAAA,CAC3BE,MAAA,EACA;EACEI,IAAA,EAAMW,aAAA;EACNE,MAAA,EAAQ;EAERZ,OAAA,EAASJ,qBAAA;EACTK,QAAA,EAAU;IACRC,QAAA,EAAU;MACRC,KAAA,EAAO;QACLU,IAAA,EAAM;QACNC,eAAA,EAAiB;QACjBC,UAAA,EAAY;QACZC,cAAA,EAAgB;QAChBC,WAAA,EAAa;QACbC,WAAA,EAAa;QAEbC,UAAA,EAAY;UACVD,WAAA,EAAa;QACf;QAEAE,UAAA,EAAY;UACVN,eAAA,EAAiB;UACjBI,WAAA,EAAa;QACf;QAEAG,UAAA,EAAY;UACVH,WAAA,EAAa;QACf;QAEAI,iBAAA,EAAmB;UACjBC,YAAA,EAAc;UACdC,YAAA,EAAc;UACdC,YAAA,EAAc;QAChB;MACF;IACF;IAEAC,QAAA,EAAU;MACRC,IAAA,EAAM;QACJC,aAAA,EAAe;QACfC,UAAA,EAAY;QACZC,MAAA,EAAQ;QAERX,UAAA,EAAY;UACVD,WAAA,EAAa;UACbJ,eAAA,EAAiB;QACnB;QAEAM,UAAA,EAAY;UACVF,WAAA,EAAa;UACbJ,eAAA,EAAiB;QACnB;QAEAO,UAAA,EAAY;UACVG,YAAA,EAAc;QAChB;MACF;IACF;IAEAX,IAAA,EAAM;MACJ,WAAYkB,GAAA,IAAQ;QAClB,MAAMC,WAAA,GAAcxC,gBAAA,CAAiBE,OAAA,CAAQqC,GAAG,CAAC,IAAI;QACrD,OAAO;UACLE,YAAA,EAAcD;QAChB;MACF;IACF;EACF;EAEA5B,eAAA,EAAiB;IACfF,QAAA,EAAUG,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;EAC7C;AACF,GACA;EACEC,MAAA,EAAQ;IACNC,WAAA,EAAa;EACf;AACF,CACF","ignoreList":[]}
1
+ {"version":3,"file":"Checkbox.js","names":[],"sources":["jsx/Checkbox.js"],"sourcesContent":["import { isIndeterminate, useCheckbox } from \"@tamagui/checkbox-headless\";\nimport { View, createStyledHOC, isWeb, shouldRenderNativePlatform, styled, useProps, withStaticProperties } from \"@tamagui/core\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport React, { useMemo } from \"react\";\nimport { CheckboxStyledContext } from \"./CheckboxStyledContext\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n\nconst CheckboxIndicatorFrame = styled(View, {\n\tdisplayName: \"CheckboxIndicator\",\n\tcontext: CheckboxStyledContext\n}, { accept: { activeStyle: \"style\" } });\nconst CheckboxFrame = styled(View, {\n\tdisplayName: \"Checkbox\",\n\trender: \"button\",\n\tcontext: CheckboxStyledContext,\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tvariants: { disabled: { true: {\n\t\tpointerEvents: \"none\",\n\t\tuserSelect: \"none\"\n\t} } }\n}, { accept: { activeStyle: \"style\" } });\nconst CheckboxContext = React.createContext({\n\tchecked: false,\n\tdisabled: false\n});\nconst Checkbox2 = withStaticProperties(createStyledHOC(CheckboxFrame, function Checkbox(_props, forwardedRef) {\n\tconst { checked: checkedProp, defaultChecked, onCheckedChange, native, activeStyle, activeTheme, ...props } = _props;\n\tconst propsActive = useProps(props);\n\tconst styledContext = React.useContext(CheckboxStyledContext.context);\n\tconst [checked = false, setChecked] = useControllableState({\n\t\tprop: checkedProp,\n\t\tdefaultProp: defaultChecked,\n\t\tonChange: onCheckedChange\n\t});\n\tconst { checkboxProps, checkboxRef, bubbleInput } = useCheckbox(propsActive, [checked, setChecked], forwardedRef);\n\tif (shouldRenderNativePlatform(native) === \"web\") return /* @__PURE__ */ jsx(\"input\", {\n\t\ttype: \"checkbox\",\n\t\tdefaultChecked: isIndeterminate(checked) ? false : checked,\n\t\ttabIndex: -1,\n\t\tref: checkboxRef,\n\t\tdisabled: checkboxProps.disabled,\n\t\tstyle: checkboxProps.style\n\t});\n\tconst memoizedContext = useMemo(() => ({\n\t\tchecked,\n\t\tdisabled: checkboxProps.disabled\n\t}), [checked, checkboxProps.disabled]);\n\tconst isActive = !!checked;\n\tconst disabled = checkboxProps.disabled;\n\treturn /* @__PURE__ */ jsx(CheckboxContext.Provider, {\n\t\tvalue: memoizedContext,\n\t\tchildren: /* @__PURE__ */ jsxs(CheckboxStyledContext.Provider, {\n\t\t\tsize: propsActive.size ?? styledContext?.size ?? true,\n\t\t\tactive: isActive,\n\t\t\tdisabled,\n\t\t\tchildren: [/* @__PURE__ */ jsx(CheckboxFrame, {\n\t\t\t\trender: \"button\",\n\t\t\t\tref: checkboxRef,\n\t\t\t\ttheme: activeTheme ?? null,\n\t\t\t\t...isWeb && { type: \"button\" },\n\t\t\t\tchecked,\n\t\t\t\tdisabled,\n\t\t\t\t...checkboxProps,\n\t\t\t\t...props,\n\t\t\t\t...isActive && activeStyle ? activeStyle : void 0,\n\t\t\t\tchildren: propsActive.children\n\t\t\t}), bubbleInput]\n\t\t})\n\t});\n}), { Indicator: createStyledHOC(CheckboxIndicatorFrame, (props, forwardedRef) => {\n\tconst { children, forceMount, activeStyle, ...indicatorProps } = props;\n\tconst { active } = CheckboxStyledContext.useStyledContext();\n\tconst context = React.useContext(CheckboxContext);\n\tif (forceMount || isIndeterminate(context.checked) || context.checked === true) return /* @__PURE__ */ jsx(CheckboxIndicatorFrame, {\n\t\tpointerEvents: \"none\",\n\t\t...indicatorProps,\n\t\t...active && activeStyle ? activeStyle : void 0,\n\t\tref: forwardedRef,\n\t\tchildren\n\t});\n\treturn null;\n}) });\n\nexport { Checkbox2 as Checkbox, CheckboxContext, CheckboxFrame, CheckboxIndicatorFrame };"],"mappings":";;;;;;;;AAOA,MAAM,yBAAyB,OAAO,MAAM;CAC3C,aAAa;CACb,SAAS;AACV,GAAG,EAAE,QAAQ,EAAE,aAAa,QAAQ,EAAE,CAAC;AACvC,MAAM,gBAAgB,OAAO,MAAM;CAClC,aAAa;CACb,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,UAAU,EAAE,UAAU,EAAE,MAAM;EAC7B,eAAe;EACf,YAAY;CACb,EAAE,EAAE;AACL,GAAG,EAAE,QAAQ,EAAE,aAAa,QAAQ,EAAE,CAAC;AACvC,MAAM,kBAAkB,MAAM,cAAc;CAC3C,SAAS;CACT,UAAU;AACX,CAAC;AACD,MAAM,YAAY,qBAAqB,gBAAgB,eAAe,SAAS,SAAS,QAAQ,cAAc;CAC7G,MAAM,EAAE,SAAS,aAAa,gBAAgB,iBAAiB,QAAQ,aAAa,aAAa,GAAG,UAAU;CAC9G,MAAM,cAAc,SAAS,KAAK;CAClC,MAAM,gBAAgB,MAAM,WAAW,sBAAsB,OAAO;CACpE,MAAM,CAAC,UAAU,OAAO,cAAc,qBAAqB;EAC1D,MAAM;EACN,aAAa;EACb,UAAU;CACX,CAAC;CACD,MAAM,EAAE,eAAe,aAAa,gBAAgB,YAAY,aAAa,CAAC,SAAS,UAAU,GAAG,YAAY;CAChH,IAAI,2BAA2B,MAAM,MAAM,OAAO,OAAuB,oBAAI,SAAS;EACrF,MAAM;EACN,gBAAgB,gBAAgB,OAAO,IAAI,QAAQ;EACnD,UAAU,CAAC;EACX,KAAK;EACL,UAAU,cAAc;EACxB,OAAO,cAAc;CACtB,CAAC;CACD,MAAM,kBAAkB,eAAe;EACtC;EACA,UAAU,cAAc;CACzB,IAAI,CAAC,SAAS,cAAc,QAAQ,CAAC;CACrC,MAAM,WAAW,CAAC,CAAC;CACnB,MAAM,WAAW,cAAc;CAC/B,OAAuB,oBAAI,gBAAgB,UAAU;EACpD,OAAO;EACP,UAA0B,qBAAK,sBAAsB,UAAU;GAC9D,MAAM,YAAY,QAAQ,eAAe,QAAQ;GACjD,QAAQ;GACR;GACA,UAAU,CAAiB,oBAAI,eAAe;IAC7C,QAAQ;IACR,KAAK;IACL,OAAO,eAAe;IACtB,GAAG,SAAS,EAAE,MAAM,SAAS;IAC7B;IACA;IACA,GAAG;IACH,GAAG;IACH,GAAG,YAAY,cAAc,cAAc,KAAK;IAChD,UAAU,YAAY;GACvB,CAAC,GAAG,WAAW;EAChB,CAAC;CACF,CAAC;AACF,CAAC,GAAG,EAAE,WAAW,gBAAgB,yBAAyB,OAAO,iBAAiB;CACjF,MAAM,EAAE,UAAU,YAAY,aAAa,GAAG,mBAAmB;CACjE,MAAM,EAAE,WAAW,sBAAsB,iBAAiB;CAC1D,MAAM,UAAU,MAAM,WAAW,eAAe;CAChD,IAAI,cAAc,gBAAgB,QAAQ,OAAO,KAAK,QAAQ,YAAY,MAAM,OAAuB,oBAAI,wBAAwB;EAClI,eAAe;EACf,GAAG;EACH,GAAG,UAAU,cAAc,cAAc,KAAK;EAC9C,KAAK;EACL;CACD,CAAC;CACD,OAAO;AACR,CAAC,EAAE,CAAC"}