@tamagui/radio-group 1.96.0 → 1.97.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 (69) hide show
  1. package/dist/cjs/RadioGroup.js +23 -248
  2. package/dist/cjs/RadioGroup.js.map +1 -1
  3. package/dist/cjs/RadioGroup.native.js +25 -336
  4. package/dist/cjs/RadioGroup.native.js.map +2 -2
  5. package/dist/cjs/RadioGroupStyledContext.js +25 -0
  6. package/dist/cjs/RadioGroupStyledContext.js.map +6 -0
  7. package/dist/cjs/RadioGroupStyledContext.native.js +29 -0
  8. package/dist/cjs/RadioGroupStyledContext.native.js.map +6 -0
  9. package/dist/cjs/createRadioGroup.js +107 -0
  10. package/dist/cjs/createRadioGroup.js.map +6 -0
  11. package/dist/cjs/createRadioGroup.native.js +171 -0
  12. package/dist/cjs/createRadioGroup.native.js.map +6 -0
  13. package/dist/cjs/index.js +15 -1
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/cjs/index.native.js +19 -2
  16. package/dist/cjs/index.native.js.map +2 -2
  17. package/dist/esm/RadioGroup.js +20 -248
  18. package/dist/esm/RadioGroup.js.map +1 -1
  19. package/dist/esm/RadioGroup.mjs +19 -240
  20. package/dist/esm/RadioGroup.native.js +20 -334
  21. package/dist/esm/RadioGroup.native.js.map +2 -2
  22. package/dist/esm/RadioGroupStyledContext.js +9 -0
  23. package/dist/esm/RadioGroupStyledContext.js.map +6 -0
  24. package/dist/esm/RadioGroupStyledContext.mjs +6 -0
  25. package/dist/esm/RadioGroupStyledContext.native.js +9 -0
  26. package/dist/esm/RadioGroupStyledContext.native.js.map +6 -0
  27. package/dist/esm/createRadioGroup.js +104 -0
  28. package/dist/esm/createRadioGroup.js.map +6 -0
  29. package/dist/esm/createRadioGroup.mjs +131 -0
  30. package/dist/esm/createRadioGroup.native.js +155 -0
  31. package/dist/esm/createRadioGroup.native.js.map +6 -0
  32. package/dist/esm/index.js +16 -0
  33. package/dist/esm/index.js.map +1 -1
  34. package/dist/esm/index.mjs +11 -1
  35. package/dist/esm/index.native.js +12 -0
  36. package/dist/esm/index.native.js.map +2 -2
  37. package/dist/jsx/RadioGroup.js +20 -248
  38. package/dist/jsx/RadioGroup.js.map +1 -1
  39. package/dist/jsx/RadioGroup.mjs +19 -240
  40. package/dist/jsx/RadioGroup.native.js +20 -334
  41. package/dist/jsx/RadioGroup.native.js.map +2 -2
  42. package/dist/jsx/RadioGroupStyledContext.js +9 -0
  43. package/dist/jsx/RadioGroupStyledContext.js.map +6 -0
  44. package/dist/jsx/RadioGroupStyledContext.mjs +6 -0
  45. package/dist/jsx/RadioGroupStyledContext.native.js +9 -0
  46. package/dist/jsx/RadioGroupStyledContext.native.js.map +6 -0
  47. package/dist/jsx/createRadioGroup.js +104 -0
  48. package/dist/jsx/createRadioGroup.js.map +6 -0
  49. package/dist/jsx/createRadioGroup.mjs +131 -0
  50. package/dist/jsx/createRadioGroup.native.js +155 -0
  51. package/dist/jsx/createRadioGroup.native.js.map +6 -0
  52. package/dist/jsx/index.js +16 -0
  53. package/dist/jsx/index.js.map +1 -1
  54. package/dist/jsx/index.mjs +11 -1
  55. package/dist/jsx/index.native.js +12 -0
  56. package/dist/jsx/index.native.js.map +2 -2
  57. package/package.json +14 -14
  58. package/src/RadioGroup.tsx +22 -432
  59. package/src/RadioGroupStyledContext.tsx +7 -0
  60. package/src/createRadioGroup.tsx +201 -0
  61. package/src/index.ts +15 -0
  62. package/types/RadioGroup.d.ts +7 -224
  63. package/types/RadioGroup.d.ts.map +1 -1
  64. package/types/RadioGroupStyledContext.d.ts +6 -0
  65. package/types/RadioGroupStyledContext.d.ts.map +1 -0
  66. package/types/createRadioGroup.d.ts +979 -0
  67. package/types/createRadioGroup.d.ts.map +1 -0
  68. package/types/index.d.ts +949 -0
  69. package/types/index.d.ts.map +1 -1
@@ -1,155 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useComposedRefs } from "@tamagui/compose-refs";
3
- import { isWeb } from "@tamagui/constants";
4
1
  import { getVariableValue, styled } from "@tamagui/core";
5
- import { createContextScope } from "@tamagui/create-context";
6
- import { registerFocusable } from "@tamagui/focusable";
7
2
  import { getSize } from "@tamagui/get-token";
8
- import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
9
- import { useLabelContext } from "@tamagui/label";
10
- import { RovingFocusGroup } from "@tamagui/roving-focus";
11
3
  import { ThemeableStack } from "@tamagui/stacks";
12
- import { useControllableState } from "@tamagui/use-controllable-state";
13
- import { usePrevious } from "@tamagui/use-previous";
14
- import * as React from "react";
15
- function _array_like_to_array(arr, len) {
16
- (len == null || len > arr.length) && (len = arr.length);
17
- for (var i = 0, arr2 = new Array(len); i < len; i++)
18
- arr2[i] = arr[i];
19
- return arr2;
20
- }
21
- function _array_with_holes(arr) {
22
- if (Array.isArray(arr))
23
- return arr;
24
- }
25
- function _define_property(obj, key, value) {
26
- return key in obj ? Object.defineProperty(obj, key, {
27
- value,
28
- enumerable: !0,
29
- configurable: !0,
30
- writable: !0
31
- }) : obj[key] = value, obj;
32
- }
33
- function _iterable_to_array_limit(arr, i) {
34
- var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
35
- if (_i != null) {
36
- var _arr = [], _n = !0, _d = !1, _s, _e;
37
- try {
38
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
39
- ;
40
- } catch (err) {
41
- _d = !0, _e = err;
42
- } finally {
43
- try {
44
- !_n && _i.return != null && _i.return();
45
- } finally {
46
- if (_d)
47
- throw _e;
48
- }
49
- }
50
- return _arr;
51
- }
52
- }
53
- function _non_iterable_rest() {
54
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
55
- }
56
- function _object_spread(target) {
57
- for (var i = 1; i < arguments.length; i++) {
58
- var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
59
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
60
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
61
- }))), ownKeys2.forEach(function(key) {
62
- _define_property(target, key, source[key]);
63
- });
64
- }
65
- return target;
66
- }
67
- function ownKeys(object, enumerableOnly) {
68
- var keys = Object.keys(object);
69
- if (Object.getOwnPropertySymbols) {
70
- var symbols = Object.getOwnPropertySymbols(object);
71
- enumerableOnly && (symbols = symbols.filter(function(sym) {
72
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
73
- })), keys.push.apply(keys, symbols);
74
- }
75
- return keys;
76
- }
77
- function _object_spread_props(target, source) {
78
- return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
79
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
80
- }), target;
81
- }
82
- function _object_without_properties(source, excluded) {
83
- if (source == null)
84
- return {};
85
- var target = _object_without_properties_loose(source, excluded), key, i;
86
- if (Object.getOwnPropertySymbols) {
87
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
88
- for (i = 0; i < sourceSymbolKeys.length; i++)
89
- key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
90
- }
91
- return target;
92
- }
93
- function _object_without_properties_loose(source, excluded) {
94
- if (source == null)
95
- return {};
96
- var target = {}, sourceKeys = Object.keys(source), key, i;
97
- for (i = 0; i < sourceKeys.length; i++)
98
- key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
99
- return target;
100
- }
101
- function _sliced_to_array(arr, i) {
102
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
103
- }
104
- function _unsupported_iterable_to_array(o, minLen) {
105
- if (o) {
106
- if (typeof o == "string")
107
- return _array_like_to_array(o, minLen);
108
- var n = Object.prototype.toString.call(o).slice(8, -1);
109
- if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
110
- return Array.from(n);
111
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
112
- return _array_like_to_array(o, minLen);
113
- }
114
- }
115
- var RADIO_GROUP_NAME = "RadioGroup", ARROW_KEYS = [
116
- "ArrowUp",
117
- "ArrowDown",
118
- "ArrowLeft",
119
- "ArrowRight"
120
- ], _createContextScope = _sliced_to_array(createContextScope(RADIO_GROUP_NAME), 2), createRadioGroupContext = _createContextScope[0], createRadioGroupScope = _createContextScope[1], _createRadioGroupContext = _sliced_to_array(createRadioGroupContext(RADIO_GROUP_NAME), 2), RadioGroupProvider = _createRadioGroupContext[0], useRadioGroupContext = _createRadioGroupContext[1], getState = function(checked) {
121
- return checked ? "checked" : "unchecked";
122
- }, RADIO_GROUP_INDICATOR_NAME = "RadioGroupIndicator", RadioIndicatorFrame = styled(ThemeableStack, {
123
- name: RADIO_GROUP_INDICATOR_NAME,
124
- variants: {
125
- unstyled: {
126
- false: {
127
- width: "33%",
128
- height: "33%",
129
- borderRadius: 1e3,
130
- backgroundColor: "$color",
131
- pressTheme: !0
132
- }
133
- }
134
- },
135
- defaultVariants: {
136
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
137
- }
138
- }), RadioIndicator = RadioIndicatorFrame.extractable(/* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
139
- var __scopeRadioGroupItem = props.__scopeRadioGroupItem, forceMount = props.forceMount, disabled = props.disabled, indicatorProps = _object_without_properties(props, [
140
- "__scopeRadioGroupItem",
141
- "forceMount",
142
- "disabled"
143
- ]), checked = useRadioGroupItemContext(RADIO_GROUP_INDICATOR_NAME, __scopeRadioGroupItem).checked;
144
- return forceMount || checked ? /* @__PURE__ */ _jsx(RadioIndicatorFrame, _object_spread_props(_object_spread({
145
- "data-state": getState(checked),
146
- "data-disabled": disabled ? "" : void 0
147
- }, indicatorProps), {
148
- ref: forwardedRef
149
- })) : null;
150
- }));
151
- RadioIndicator.displayName = RADIO_GROUP_INDICATOR_NAME;
152
- var RADIO_GROUP_ITEM_NAME = "RadioGroupItem", _createRadioGroupContext1 = _sliced_to_array(createRadioGroupContext(RADIO_GROUP_NAME), 2), RadioGroupItemProvider = _createRadioGroupContext1[0], useRadioGroupItemContext = _createRadioGroupContext1[1], RadioGroupItemFrame = styled(ThemeableStack, {
4
+ var RADIO_GROUP_ITEM_NAME = "RadioGroupItem", RadioGroupItemFrame = styled(ThemeableStack, {
153
5
  name: RADIO_GROUP_ITEM_NAME,
154
6
  tag: "button",
155
7
  variants: {
@@ -213,147 +65,23 @@ var RADIO_GROUP_ITEM_NAME = "RadioGroupItem", _createRadioGroupContext1 = _slice
213
65
  defaultVariants: {
214
66
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
215
67
  }
216
- }), RadioGroupItem = RadioGroupItemFrame.extractable(/* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
217
- var __scopeRadioGroup = props.__scopeRadioGroup, value = props.value, ariaLabelledby = props.labelledBy, itemDisabled = props.disabled, itemProps = _object_without_properties(props, [
218
- "__scopeRadioGroup",
219
- "value",
220
- "labelledBy",
221
- "disabled"
222
- ]), _useRadioGroupContext = useRadioGroupContext(RADIO_GROUP_ITEM_NAME, __scopeRadioGroup), groupValue = _useRadioGroupContext.value, disabled = _useRadioGroupContext.disabled, required = _useRadioGroupContext.required, onChange = _useRadioGroupContext.onChange, name = _useRadioGroupContext.name, native = _useRadioGroupContext.native, accentColor = _useRadioGroupContext.accentColor, _React_useState = _sliced_to_array(React.useState(null), 2), button = _React_useState[0], setButton = _React_useState[1], hasConsumerStoppedPropagationRef = React.useRef(!1), ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, function(node) {
223
- return setButton(node);
224
- }, ref), isArrowKeyPressedRef = React.useRef(!1), isFormControl = isWeb ? button ? !!button.closest("form") : !0 : !1, checked = groupValue === value, labelId = useLabelContext(button), labelledBy = ariaLabelledby || labelId;
225
- React.useEffect(function() {
226
- if (isWeb) {
227
- var handleKeyDown = function(event) {
228
- ARROW_KEYS.includes(event.key) && (isArrowKeyPressedRef.current = !0);
229
- }, handleKeyUp = function() {
230
- isArrowKeyPressedRef.current = !1;
231
- };
232
- return document.addEventListener("keydown", handleKeyDown), document.addEventListener("keyup", handleKeyUp), function() {
233
- document.removeEventListener("keydown", handleKeyDown), document.removeEventListener("keyup", handleKeyUp);
234
- };
235
- }
236
- }, []), React.useEffect(function() {
237
- if (props.id && !disabled)
238
- return registerFocusable(props.id, {
239
- focusAndSelect: function() {
240
- onChange == null || onChange(value);
241
- },
242
- focus: function() {
243
- }
244
- });
245
- }, [
246
- props.id,
247
- value,
248
- disabled
249
- ]);
250
- var isDisabled = disabled || itemDisabled;
251
- return /* @__PURE__ */ _jsx(RadioGroupItemProvider, {
252
- checked,
253
- scope: __scopeRadioGroup,
254
- children: isWeb && native ? /* @__PURE__ */ _jsx(BubbleInput, {
255
- control: button,
256
- bubbles: !hasConsumerStoppedPropagationRef.current,
257
- name,
258
- value,
259
- checked,
260
- required,
261
- disabled: isDisabled,
262
- id: props.id,
263
- accentColor
264
- }) : /* @__PURE__ */ _jsxs(_Fragment, {
265
- children: [
266
- /* @__PURE__ */ _jsx(RovingFocusGroup.Item, {
267
- __scopeRovingFocusGroup: RADIO_GROUP_NAME,
268
- asChild: "except-style",
269
- focusable: !isDisabled,
270
- active: checked,
271
- children: /* @__PURE__ */ _jsx(RadioGroupItemFrame, _object_spread(_object_spread_props(_object_spread(
272
- {
273
- // theme={checked ? 'active' : undefined}
274
- "data-state": getState(checked),
275
- "data-disabled": isDisabled ? "" : void 0,
276
- role: "radio",
277
- "aria-labelledby": labelledBy,
278
- "aria-checked": checked,
279
- "aria-required": required,
280
- disabled: isDisabled,
281
- ref: composedRefs
282
- },
283
- isWeb && {
284
- type: "button",
285
- value
286
- },
287
- // allow them to override all but the handlers that already compose:
288
- itemProps
289
- ), {
290
- onPress: composeEventHandlers(props.onPress, function(event) {
291
- checked || onChange == null || onChange(value), isFormControl && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
292
- })
293
- }), isWeb && {
294
- onKeyDown: composeEventHandlers(props.onKeyDown, function(event) {
295
- event.key === "Enter" && event.preventDefault();
296
- }),
297
- onFocus: composeEventHandlers(itemProps.onFocus, function() {
298
- if (isArrowKeyPressedRef.current) {
299
- var _ref_current;
300
- (_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.click();
301
- }
302
- })
303
- }))
304
- }),
305
- isFormControl && /* @__PURE__ */ _jsx(BubbleInput, {
306
- isHidden: !0,
307
- control: button,
308
- bubbles: !hasConsumerStoppedPropagationRef.current,
309
- name,
310
- value,
311
- checked,
312
- required,
313
- disabled: isDisabled
314
- })
315
- ]
316
- })
317
- });
318
- })), BubbleInput = function(props) {
319
- var checked = props.checked, _props_bubbles = props.bubbles, bubbles = _props_bubbles === void 0 ? !0 : _props_bubbles, control = props.control, isHidden = props.isHidden, accentColor = props.accentColor, inputProps = _object_without_properties(props, [
320
- "checked",
321
- "bubbles",
322
- "control",
323
- "isHidden",
324
- "accentColor"
325
- ]), ref = React.useRef(null), prevChecked = usePrevious(checked);
326
- return React.useEffect(function() {
327
- var input = ref.current, inputProto = window.HTMLInputElement.prototype, descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked"), setChecked = descriptor.set;
328
- if (prevChecked !== checked && setChecked) {
329
- var event = new Event("click", {
330
- bubbles
331
- });
332
- setChecked.call(input, checked), input.dispatchEvent(event);
68
+ }), RADIO_GROUP_INDICATOR_NAME = "RadioGroupIndicator", RadioGroupIndicatorFrame = styled(ThemeableStack, {
69
+ name: RADIO_GROUP_INDICATOR_NAME,
70
+ variants: {
71
+ unstyled: {
72
+ false: {
73
+ width: "33%",
74
+ height: "33%",
75
+ borderRadius: 1e3,
76
+ backgroundColor: "$color",
77
+ pressTheme: !0
78
+ }
333
79
  }
334
- }, [
335
- prevChecked,
336
- checked,
337
- bubbles
338
- ]), /* @__PURE__ */ _jsx("input", _object_spread_props(_object_spread({
339
- type: "radio",
340
- defaultChecked: checked
341
- }, inputProps), {
342
- tabIndex: -1,
343
- ref,
344
- "aria-hidden": isHidden,
345
- style: _object_spread({}, isHidden ? {
346
- // ...controlSize,
347
- position: "absolute",
348
- pointerEvents: "none",
349
- opacity: 0,
350
- margin: 0
351
- } : {
352
- appearance: "auto",
353
- accentColor
354
- }, props.style)
355
- }));
356
- }, RadioGroupFrame = styled(ThemeableStack, {
80
+ },
81
+ defaultVariants: {
82
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
83
+ }
84
+ }), RADIO_GROUP_NAME = "RadioGroup", RadioGroupFrame = styled(ThemeableStack, {
357
85
  name: RADIO_GROUP_NAME,
358
86
  variants: {
359
87
  orientation: {
@@ -367,52 +95,10 @@ var RADIO_GROUP_ITEM_NAME = "RadioGroupItem", _createRadioGroupContext1 = _slice
367
95
  }
368
96
  }
369
97
  }
370
- }), RadioGroup = withStaticProperties(RadioGroupFrame.extractable(/* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
371
- var __scopeRadioGroup = props.__scopeRadioGroup, valueProp = props.value, defaultValue = props.defaultValue, onValueChange = props.onValueChange, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? !1 : _props_disabled, _props_required = props.required, required = _props_required === void 0 ? !1 : _props_required, name = props.name, orientation = props.orientation, native = props.native, accentColor = props.accentColor, radioGroupProps = _object_without_properties(props, [
372
- "__scopeRadioGroup",
373
- "value",
374
- "defaultValue",
375
- "onValueChange",
376
- "disabled",
377
- "required",
378
- "name",
379
- "orientation",
380
- "native",
381
- "accentColor"
382
- ]), _useControllableState = _sliced_to_array(useControllableState({
383
- prop: valueProp,
384
- defaultProp: defaultValue,
385
- onChange: onValueChange
386
- }), 2), value = _useControllableState[0], setValue = _useControllableState[1];
387
- return /* @__PURE__ */ _jsx(RadioGroupProvider, {
388
- scope: __scopeRadioGroup,
389
- value,
390
- required,
391
- onChange: setValue,
392
- disabled,
393
- name,
394
- native,
395
- accentColor,
396
- children: /* @__PURE__ */ _jsx(RovingFocusGroup, {
397
- __scopeRovingFocusGroup: RADIO_GROUP_NAME,
398
- orientation,
399
- loop: !0,
400
- children: /* @__PURE__ */ _jsx(RadioGroupFrame, _object_spread({
401
- role: "radiogroup",
402
- "aria-orientation": orientation,
403
- ref: forwardedRef,
404
- orientation,
405
- "data-disabled": disabled ? "" : void 0
406
- }, radioGroupProps))
407
- })
408
- });
409
- })), {
410
- Indicator: RadioIndicator,
411
- Item: RadioGroupItem
412
98
  });
413
- RadioGroup.displayName = RADIO_GROUP_NAME;
414
99
  export {
415
- RadioGroup,
416
- createRadioGroupScope
100
+ RadioGroupFrame,
101
+ RadioGroupIndicatorFrame,
102
+ RadioGroupItemFrame
417
103
  };
418
104
  //# sourceMappingURL=RadioGroup.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/tamagui/packages/radio-group/src/RadioGroup.tsx"],
4
- "mappings": ";AAGA,SAASA,uBAAuB;AAChC,SAASC,aAAa;AAEtB,SAASC,kBAAkBC,cAAc;AAEzC,SAASC,0BAA0B;AACnC,SAASC,yBAAyB;AAClC,SAASC,eAAe;AACxB,SAASC,sBAAsBC,4BAA4B;AAC3D,SAASC,uBAAuB;AAChC,SAASC,wBAAwB;AACjC,SAASC,sBAAsB;AAC/B,SAASC,4BAA4B;AACrC,SAASC,mBAAmB;AAC5B,YAAYC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGvB,IAAMC,mBAAmB,cAEnBC,aAAa;EAAC;EAAW;EAAa;EAA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;QACfC,gBAAgB;MAClB;MACAC,UAAU;QACRF,eAAe;QACfC,gBAAgB;MAClB;IACF;EACF;AACF,CAAA,GAaME,aAAa7J,qBACjBuJ,gBAAgBxH,YACdzB,sBAAM0B,WACJ,SAACC,OAAqCC,cAAAA;AACpC,MACEoC,oBAWErC,MAXFqC,mBACOwF,YAUL7H,MAVFiC,OACA6F,eASE9H,MATF8H,cACAC,gBAQE/H,MARF+H,eAAAA,kBAQE/H,MAPFI,UAAAA,WAAAA,oBAAAA,SAAW,KAAA,iBAAA,kBAOTJ,MANF2C,UAAAA,WAAAA,oBAAAA,SAAW,KAAA,iBACX3D,OAKEgB,MALFhB,MACAuI,cAIEvH,MAJFuH,aACA1E,SAGE7C,MAHF6C,QACAC,cAEE9C,MAFF8C,aACGkF,kBAAAA,2BACDhI,OAAAA;IAXFqC;IACAJ;IACA6F;IACAC;IACA3H;IACAuC;IACA3D;IACAuI;IACA1E;IACAC;MAGwB3E,wBAAAA,iBAAAA,qBAAqB;IAC7C8J,MAAMJ;IACNK,aAAaJ;IACblF,UAAUmF;EACZ,CAAA,GAAA,CAAA,GAJO9F,QAAmB9D,sBAAAA,CAAAA,GAAZgK,WAAYhK,sBAAAA,CAAAA;AAM1B,SACE,qBAACO,oBAAAA;IACC+F,OAAOpC;IACPJ;IACAU;IACAC,UAAUuF;IACV/H;IACApB;IACA6D;IACAC;cAEA,qBAAC7E,kBAAAA;MACC6G,yBAAyBxG;MACzBiJ;MACAa,MAAM;gBAEN,qBAACd,iBAAAA,eAAAA;QACCpC,MAAK;QACLmD,oBAAkBd;QAClB7G,KAAKT;QACLsH;QACA/G,iBAAeJ,WAAW,KAAKK;SAC3BuH,eAAAA,CAAAA;;;AAKd,CAAA,CAAA,GAGJ;EACEM,WAAWzI;EACXgF,MAAMzC;AACR,CAAA;AAGFwF,WAAWjH,cAAcrC;",
5
- "names": ["useComposedRefs", "isWeb", "getVariableValue", "styled", "createContextScope", "registerFocusable", "getSize", "composeEventHandlers", "withStaticProperties", "useLabelContext", "RovingFocusGroup", "ThemeableStack", "useControllableState", "usePrevious", "React", "RADIO_GROUP_NAME", "ARROW_KEYS", "createRadioGroupContext", "createRadioGroupScope", "RadioGroupProvider", "useRadioGroupContext", "getState", "checked", "RADIO_GROUP_INDICATOR_NAME", "RadioIndicatorFrame", "name", "variants", "unstyled", "false", "width", "height", "borderRadius", "backgroundColor", "pressTheme", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "RadioIndicator", "extractable", "forwardRef", "props", "forwardedRef", "__scopeRadioGroupItem", "forceMount", "disabled", "indicatorProps", "useRadioGroupItemContext", "data-state", "data-disabled", "undefined", "ref", "displayName", "RADIO_GROUP_ITEM_NAME", "RadioGroupItemProvider", "RadioGroupItemFrame", "tag", "size", "alignItems", "justifyContent", "borderWidth", "borderColor", "padding", "hoverStyle", "focusStyle", "focusVisibleStyle", "outlineStyle", "outlineWidth", "outlineColor", "pressStyle", "true", "pointerEvents", "userSelect", "cursor", "value", "Math", "floor", "RadioGroupItem", "__scopeRadioGroup", "ariaLabelledby", "labelledBy", "itemDisabled", "itemProps", "groupValue", "required", "onChange", "native", "accentColor", "useState", "button", "setButton", "hasConsumerStoppedPropagationRef", "useRef", "composedRefs", "node", "isArrowKeyPressedRef", "isFormControl", "Boolean", "closest", "labelId", "useEffect", "handleKeyDown", "event", "includes", "key", "current", "handleKeyUp", "document", "addEventListener", "removeEventListener", "id", "focusAndSelect", "focus", "isDisabled", "scope", "BubbleInput", "control", "bubbles", "Item", "__scopeRovingFocusGroup", "asChild", "focusable", "active", "role", "aria-labelledby", "aria-checked", "aria-required", "type", "onPress", "isPropagationStopped", "stopPropagation", "onKeyDown", "preventDefault", "onFocus", "click", "isHidden", "inputProps", "prevChecked", "input", "inputProto", "window", "HTMLInputElement", "prototype", "descriptor", "Object", "getOwnPropertyDescriptor", "setChecked", "set", "Event", "call", "dispatchEvent", "defaultChecked", "tabIndex", "aria-hidden", "style", "position", "opacity", "margin", "appearance", "RadioGroupFrame", "orientation", "horizontal", "flexDirection", "spaceDirection", "vertical", "RadioGroup", "valueProp", "defaultValue", "onValueChange", "radioGroupProps", "prop", "defaultProp", "setValue", "loop", "aria-orientation", "Indicator"]
4
+ "mappings": "AAAA,SAASA,kBAAkBC,cAAc;AACzC,SAASC,eAAe;AACxB,SAASC,sBAAsB;AAE/B,IAAMC,wBAAwB,kBAEjBC,sBAAsBJ,OAAOE,gBAAgB;EACxDG,MAAMF;EACNG,KAAK;EAELC,UAAU;IACRC,UAAU;MACRC,OAAO;QACLC,MAAM;QACNC,cAAc;QACdC,iBAAiB;QACjBC,YAAY;QACZC,gBAAgB;QAChBC,aAAa;QACbC,aAAa;QACbC,SAAS;QAETC,YAAY;UACVF,aAAa;UACbJ,iBAAiB;QACnB;QAEAO,YAAY;UACVH,aAAa;UACbJ,iBAAiB;QACnB;QAEAQ,mBAAmB;UACjBC,cAAc;UACdC,cAAc;UACdC,cAAc;QAChB;QAEAC,YAAY;UACVR,aAAa;UACbJ,iBAAiB;QACnB;MACF;IACF;IAEAa,UAAU;MACRC,MAAM;QACJC,eAAe;QACfC,YAAY;QACZC,QAAQ;QAERX,YAAY;UACVF,aAAa;UACbJ,iBAAiB;QACnB;QAEAY,YAAY;UACVR,aAAa;UACbJ,iBAAiB;QACnB;QAEAQ,mBAAmB;UACjBE,cAAc;QAChB;MACF;IACF;IAEAZ,MAAM;MACJ,WAAW,SAACoB,OAAAA,OAAAA;YAASC,QAAAA,MAAAA,OAEmBA,kBADhCrB,OAAOsB,KAAKC,MAChBlC,iBAAiBE,QAAQ6B,KAAAA,CAAAA,MAAWC,mBAAAA,MAAM,eAAY,QAAlBA,qBAAAA,SAAAA,mBAAsB,IAAE;AAE9D,eAAO;UACLG,OAAOxB;UACPyB,QAAQzB;QACV;MACF;IACF;EACF;EAEA0B,iBAAiB;IACf5B,UAAU6B,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAEMC,6BAA6B,uBAEtBC,2BAA2BzC,OAAOE,gBAAgB;EAC7DG,MAAMmC;EAENjC,UAAU;IACRC,UAAU;MACRC,OAAO;QACLyB,OAAO;QACPC,QAAQ;QACRxB,cAAc;QACdC,iBAAiB;QACjB8B,YAAY;MACd;IACF;EACF;EAEAN,iBAAiB;IACf5B,UAAU6B,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAEMI,mBAAmB,cAEZC,kBAAkB5C,OAAOE,gBAAgB;EACpDG,MAAMsC;EAENpC,UAAU;IACRsC,aAAa;MACXC,YAAY;QACVC,eAAe;QACfC,gBAAgB;MAClB;MACAC,UAAU;QACRF,eAAe;QACfC,gBAAgB;MAClB;IACF;EACF;AACF,CAAA;",
5
+ "names": ["getVariableValue", "styled", "getSize", "ThemeableStack", "RADIO_GROUP_ITEM_NAME", "RadioGroupItemFrame", "name", "tag", "variants", "unstyled", "false", "size", "borderRadius", "backgroundColor", "alignItems", "justifyContent", "borderWidth", "borderColor", "padding", "hoverStyle", "focusStyle", "focusVisibleStyle", "outlineStyle", "outlineWidth", "outlineColor", "pressStyle", "disabled", "true", "pointerEvents", "userSelect", "cursor", "value", "props", "Math", "floor", "width", "height", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "RADIO_GROUP_INDICATOR_NAME", "RadioGroupIndicatorFrame", "pressTheme", "RADIO_GROUP_NAME", "RadioGroupFrame", "orientation", "horizontal", "flexDirection", "spaceDirection", "vertical"]
6
6
  }
@@ -0,0 +1,9 @@
1
+ import { createStyledContext } from "@tamagui/core";
2
+ const RadioGroupStyledContext = createStyledContext({
3
+ size: "$true",
4
+ scaleIcon: 1
5
+ });
6
+ export {
7
+ RadioGroupStyledContext
8
+ };
9
+ //# sourceMappingURL=RadioGroupStyledContext.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/RadioGroupStyledContext.tsx"],
4
+ "mappings": "AACA,SAAS,2BAA2B;AAE7B,MAAM,0BAA0B,oBAAoB;AAAA,EACzD,MAAM;AAAA,EACN,WAAW;AACb,CAAC;",
5
+ "names": []
6
+ }
@@ -0,0 +1,6 @@
1
+ import { createStyledContext } from "@tamagui/core";
2
+ const RadioGroupStyledContext = createStyledContext({
3
+ size: "$true",
4
+ scaleIcon: 1
5
+ });
6
+ export { RadioGroupStyledContext };
@@ -0,0 +1,9 @@
1
+ import { createStyledContext } from "@tamagui/core";
2
+ var RadioGroupStyledContext = createStyledContext({
3
+ size: "$true",
4
+ scaleIcon: 1
5
+ });
6
+ export {
7
+ RadioGroupStyledContext
8
+ };
9
+ //# sourceMappingURL=RadioGroupStyledContext.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Users/n8/tamagui/packages/radio-group/src/RadioGroupStyledContext.tsx"],
4
+ "mappings": "AACA,SAASA,2BAA2B;AAE7B,IAAMC,0BAA0BD,oBAAoB;EACzDE,MAAM;EACNC,WAAW;AACb,CAAA;",
5
+ "names": ["createStyledContext", "RadioGroupStyledContext", "size", "scaleIcon"]
6
+ }
@@ -0,0 +1,104 @@
1
+ import { isWeb, withStaticProperties } from "@tamagui/core";
2
+ import {
3
+ RadioGroupFrame,
4
+ RadioGroupIndicatorFrame,
5
+ RadioGroupItemFrame
6
+ } from "./RadioGroup";
7
+ import {
8
+ useRadioGroup,
9
+ useRadioGroupItem,
10
+ useRadioGroupItemIndicator
11
+ } from "@tamagui/radio-headless";
12
+ import { RovingFocusGroup } from "@tamagui/roving-focus";
13
+ import { createContext } from "react";
14
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ const ensureContext = (x) => {
16
+ x.context || (x.context = RadioGroupContext);
17
+ }, RadioGroupContext = createContext({}), RadioGroupItemContext = createContext({
18
+ checked: !1,
19
+ disabled: !1
20
+ });
21
+ function createRadioGroup(createProps) {
22
+ const {
23
+ disableActiveTheme,
24
+ Frame = RadioGroupFrame,
25
+ Indicator = RadioGroupIndicatorFrame,
26
+ Item = RadioGroupItemFrame
27
+ } = createProps;
28
+ ensureContext(Frame), ensureContext(Indicator), ensureContext(Item);
29
+ const RadioGroupImp = Frame.styleable((props, ref) => {
30
+ const {
31
+ value,
32
+ defaultValue,
33
+ onValueChange,
34
+ required = !1,
35
+ disabled = !1,
36
+ name,
37
+ native,
38
+ accentColor,
39
+ orientation = "vertical",
40
+ ...rest
41
+ } = props, { providerValue, frameAttrs, rovingFocusGroupAttrs } = useRadioGroup({
42
+ orientation,
43
+ name,
44
+ defaultValue,
45
+ value,
46
+ onValueChange,
47
+ required,
48
+ disabled,
49
+ native,
50
+ accentColor
51
+ });
52
+ return /* @__PURE__ */ jsx(RadioGroupContext.Provider, { value: providerValue, children: /* @__PURE__ */ jsx(RovingFocusGroup, { ...rovingFocusGroupAttrs, children: /* @__PURE__ */ jsx(RadioGroupFrame, { ...frameAttrs, ref, ...rest }) }) });
53
+ }), RadioGroupItemImp = Item.styleable((props, ref) => {
54
+ const {
55
+ value,
56
+ labelledBy,
57
+ onPress,
58
+ //@ts-expect-error
59
+ onKeyDown,
60
+ disabled,
61
+ id,
62
+ ...rest
63
+ } = props, {
64
+ providerValue,
65
+ bubbleInput,
66
+ rovingFocusGroupAttrs,
67
+ frameAttrs,
68
+ isFormControl,
69
+ native
70
+ } = useRadioGroupItem({
71
+ radioGroupContext: RadioGroupContext,
72
+ value,
73
+ id,
74
+ labelledBy,
75
+ disabled,
76
+ onPress,
77
+ onKeyDown
78
+ });
79
+ return /* @__PURE__ */ jsx(RadioGroupItemContext.Provider, { value: providerValue, children: isWeb && native ? bubbleInput : /* @__PURE__ */ jsxs(Fragment, { children: [
80
+ /* @__PURE__ */ jsx(RovingFocusGroup.Item, { ...rovingFocusGroupAttrs, children: /* @__PURE__ */ jsx(RadioGroupItemFrame, { ...frameAttrs, ref, ...rest }) }),
81
+ isFormControl && bubbleInput
82
+ ] }) });
83
+ });
84
+ RadioGroupItemImp.displayName = "RadioGroupItem";
85
+ const RadioIndicator = Indicator.styleable(
86
+ (props, forwardedRef) => {
87
+ const { forceMount, disabled, ...indicatorProps } = props, { checked, ...useIndicatorRest } = useRadioGroupItemIndicator({
88
+ radioGroupItemContext: RadioGroupItemContext,
89
+ disabled
90
+ });
91
+ return forceMount || checked ? /* @__PURE__ */ jsx(Indicator, { ...useIndicatorRest, ref: forwardedRef, ...indicatorProps }) : null;
92
+ }
93
+ );
94
+ RadioIndicator.displayName = "RadioIndicator";
95
+ const RadioGroup = withStaticProperties(RadioGroupImp, {
96
+ Item: RadioGroupItemImp,
97
+ Indicator: RadioIndicator
98
+ });
99
+ return RadioGroup.displayName = "RadioGroup", RadioGroup;
100
+ }
101
+ export {
102
+ createRadioGroup
103
+ };
104
+ //# sourceMappingURL=createRadioGroup.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/createRadioGroup.tsx"],
4
+ "mappings": "AAKA,SAAS,OAAO,4BAA4B;AAE5C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AA4FpB,SAwCA,UAxCA,KAwCA,YAxCA;AA7GV,MAAM,gBAAgB,CAAC,MAAW;AAChC,EAAK,EAAE,YACL,EAAE,UAAU;AAEhB,GAcM,oBAAoB,cAAsC,CAAC,CAAC,GAC5D,wBAAwB,cAA0C;AAAA,EACtE,SAAS;AAAA,EACT,UAAU;AACZ,CAAC;AA0BM,SAAS,iBAId,aAAmF;AACnF,QAAM;AAAA,IACJ;AAAA,IACA,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,EACT,IAAI;AAOJ,gBAAc,KAAK,GACnB,cAAc,SAAS,GACvB,cAAc,IAAI;AAalB,QAAM,gBAAgB,MAAM,UAA2B,CAAC,OAAO,QAAQ;AACrE,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;A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