tamagui 1.74.19 → 1.74.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.native.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.native.js +1 -1
- package/dist/jsx/index.js +1 -1
- package/dist/jsx/index.native.js +1 -1
- package/dist/native.js +114 -125
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +114 -125
- package/dist/test.native.js.map +2 -2
- package/linear-gradient/index.d.ts +1 -1
- package/package.json +52 -52
- package/src/index.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/views/Anchor.d.ts +31 -60
- package/types/views/Anchor.d.ts.map +1 -1
- package/types/views/EnsureFlexed.d.ts +103 -15
- package/types/views/EnsureFlexed.d.ts.map +1 -1
- package/types/views/Fieldset.d.ts +187 -23
- package/types/views/Fieldset.d.ts.map +1 -1
- package/types/views/Input.d.ts +59 -64
- package/types/views/Input.d.ts.map +1 -1
- package/types/views/Layouts.d.ts +1225 -105
- package/types/views/Layouts.d.ts.map +1 -1
- package/types/views/Text.d.ts +86 -6
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/TextArea.d.ts +38 -67
- package/types/views/TextArea.d.ts.map +1 -1
- package/types/views/VisuallyHidden.d.ts +146 -6
- package/types/views/VisuallyHidden.d.ts.map +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -74,7 +74,7 @@ __export(src_exports, {
|
|
|
74
74
|
withStaticProperties: () => import_core.withStaticProperties
|
|
75
75
|
});
|
|
76
76
|
module.exports = __toCommonJS(src_exports);
|
|
77
|
-
var import_setup = require("./setup
|
|
77
|
+
var import_setup = require("./setup");
|
|
78
78
|
__reExport(src_exports, require("@tamagui/accordion"), module.exports);
|
|
79
79
|
__reExport(src_exports, require("@tamagui/adapt"), module.exports);
|
|
80
80
|
__reExport(src_exports, require("@tamagui/alert-dialog"), module.exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -75,7 +75,7 @@ __export(src_exports, {
|
|
|
75
75
|
withStaticProperties: () => import_core.withStaticProperties
|
|
76
76
|
});
|
|
77
77
|
module.exports = __toCommonJS(src_exports);
|
|
78
|
-
var import_setup = require("./setup
|
|
78
|
+
var import_setup = require("./setup");
|
|
79
79
|
__reExport(src_exports, require("@tamagui/accordion"), module.exports);
|
|
80
80
|
__reExport(src_exports, require("@tamagui/adapt"), module.exports);
|
|
81
81
|
__reExport(src_exports, require("@tamagui/alert-dialog"), module.exports);
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.native.js
CHANGED
package/dist/jsx/index.js
CHANGED
package/dist/jsx/index.native.js
CHANGED
package/dist/native.js
CHANGED
|
@@ -1702,7 +1702,7 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
1702
1702
|
if (isTheme || isGroup) {
|
|
1703
1703
|
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), mediaName = groupInfo == null ? void 0 : groupInfo.name;
|
|
1704
1704
|
groupMediaKey = groupInfo == null ? void 0 : groupInfo.media, isGroup && (containerName = mediaName);
|
|
1705
|
-
let name = (isGroup ? "group_" : "") + mediaName, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = conf.themeClassNameOnRoot ? "" : " ", pseudoSelectorName = groupInfo.pseudo ? groupPseudoToPseudoCSSMap[groupInfo.pseudo] || groupInfo.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${name}${pseudoSelector}`, nextSelector = `${presedencePrefix}${mediaSelector} ${selector.replace(
|
|
1705
|
+
let name = (isGroup ? "group_" : "") + mediaName, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = conf.themeClassNameOnRoot && isTheme ? "" : " ", pseudoSelectorName = groupInfo.pseudo ? groupPseudoToPseudoCSSMap[groupInfo.pseudo] || groupInfo.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${name}${pseudoSelector}`, nextSelector = `${presedencePrefix}${mediaSelector} ${selector.replace(
|
|
1706
1706
|
":root",
|
|
1707
1707
|
""
|
|
1708
1708
|
)}`;
|
|
@@ -12504,110 +12504,108 @@ var require_Checkbox_native = __commonJS({
|
|
|
12504
12504
|
defaultVariants: {
|
|
12505
12505
|
unstyled: !1
|
|
12506
12506
|
}
|
|
12507
|
-
}), [createCheckboxContext, createCheckboxScope] = (0, import_create_context.createContextScope)(CHECKBOX_NAME), [CheckboxProvider, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME), CheckboxComponent = CheckboxFrame.
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12507
|
+
}), [createCheckboxContext, createCheckboxScope] = (0, import_create_context.createContextScope)(CHECKBOX_NAME), [CheckboxProvider, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME), CheckboxComponent = CheckboxFrame.styleable(function(props, forwardedRef) {
|
|
12508
|
+
let {
|
|
12509
|
+
__scopeCheckbox,
|
|
12510
|
+
labelledBy: ariaLabelledby,
|
|
12511
|
+
name,
|
|
12512
|
+
checked: checkedProp,
|
|
12513
|
+
defaultChecked,
|
|
12514
|
+
required,
|
|
12515
|
+
scaleSize = 0.45,
|
|
12516
|
+
sizeAdjust = 0,
|
|
12517
|
+
disabled,
|
|
12518
|
+
value = "on",
|
|
12519
|
+
onCheckedChange,
|
|
12520
|
+
native,
|
|
12521
|
+
scaleIcon,
|
|
12522
|
+
...checkboxProps
|
|
12523
|
+
} = props, [button, setButton] = React2.useState(null), composedRefs = (0, import_core13.useComposedRefs)(forwardedRef, (node) => setButton(node)), hasConsumerStoppedPropagationRef = React2.useRef(!1), propsActive = (0, import_core13.useProps)(props), isFormControl = import_core13.isWeb ? button ? !!button.closest("form") : !0 : !1, [checked = !1, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
12524
|
+
prop: checkedProp,
|
|
12525
|
+
defaultProp: defaultChecked,
|
|
12526
|
+
onChange: onCheckedChange
|
|
12527
|
+
}), styledContext = React2.useContext(CheckboxStyledContext), adjustedSize = (0, import_core13.getVariableValue)(
|
|
12528
|
+
(0, import_get_token2.getSize)(propsActive.size ?? (styledContext == null ? void 0 : styledContext.size) ?? "$true", {
|
|
12529
|
+
shift: sizeAdjust
|
|
12530
|
+
})
|
|
12531
|
+
), size2 = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
|
|
12532
|
+
return React2.useEffect(() => {
|
|
12533
|
+
if (props.id && !disabled)
|
|
12534
|
+
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
12535
|
+
focusAndSelect: () => {
|
|
12536
|
+
setChecked((x) => !x);
|
|
12537
|
+
},
|
|
12538
|
+
focus: () => {
|
|
12539
|
+
}
|
|
12540
|
+
});
|
|
12541
|
+
}, [props.id, setChecked, disabled]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CheckboxProvider, { scope: __scopeCheckbox, state: checked, disabled, children: import_core13.isWeb && native ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
12542
|
+
BubbleInput,
|
|
12543
|
+
{
|
|
12544
|
+
control: button,
|
|
12545
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
12512
12546
|
name,
|
|
12513
|
-
|
|
12514
|
-
|
|
12547
|
+
value,
|
|
12548
|
+
checked,
|
|
12515
12549
|
required,
|
|
12516
|
-
scaleSize = 0.45,
|
|
12517
|
-
sizeAdjust = 0,
|
|
12518
12550
|
disabled,
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12551
|
+
id: props.id
|
|
12552
|
+
}
|
|
12553
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
12554
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
12555
|
+
CheckboxFrame,
|
|
12556
|
+
{
|
|
12557
|
+
width: size2,
|
|
12558
|
+
height: size2,
|
|
12559
|
+
tag: "button",
|
|
12560
|
+
role: "checkbox",
|
|
12561
|
+
"aria-labelledby": labelledBy,
|
|
12562
|
+
"aria-checked": isIndeterminate(checked) ? "mixed" : checked,
|
|
12563
|
+
"aria-required": required,
|
|
12564
|
+
"data-state": getState(checked),
|
|
12565
|
+
"data-disabled": disabled ? "" : void 0,
|
|
12566
|
+
disabled,
|
|
12567
|
+
...checkboxProps,
|
|
12568
|
+
ref: composedRefs,
|
|
12569
|
+
...import_core13.isWeb && {
|
|
12570
|
+
type: "button",
|
|
12571
|
+
value,
|
|
12572
|
+
onKeyDown: (0, import_core13.composeEventHandlers)(
|
|
12573
|
+
props.onKeyDown,
|
|
12574
|
+
(event) => {
|
|
12575
|
+
event.key === "Enter" && event.preventDefault();
|
|
12576
|
+
}
|
|
12577
|
+
)
|
|
12578
|
+
},
|
|
12579
|
+
onPress: (0, import_core13.composeEventHandlers)(props.onPress, (event) => {
|
|
12580
|
+
setChecked(
|
|
12581
|
+
(prevChecked) => isIndeterminate(prevChecked) ? !0 : !prevChecked
|
|
12582
|
+
), isFormControl && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
|
|
12583
|
+
}),
|
|
12584
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
12585
|
+
CheckboxStyledContext.Provider,
|
|
12586
|
+
{
|
|
12587
|
+
size: propsActive.size ?? (styledContext == null ? void 0 : styledContext.size) ?? "$true",
|
|
12588
|
+
scaleIcon: scaleIcon ?? (styledContext == null ? void 0 : styledContext.scaleIcon) ?? 1,
|
|
12589
|
+
children: propsActive.children
|
|
12540
12590
|
}
|
|
12541
|
-
|
|
12542
|
-
|
|
12591
|
+
)
|
|
12592
|
+
}
|
|
12593
|
+
),
|
|
12594
|
+
import_core13.isWeb && isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
12543
12595
|
BubbleInput,
|
|
12544
12596
|
{
|
|
12597
|
+
isHidden: !0,
|
|
12545
12598
|
control: button,
|
|
12546
12599
|
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
12547
12600
|
name,
|
|
12548
12601
|
value,
|
|
12549
12602
|
checked,
|
|
12550
12603
|
required,
|
|
12551
|
-
disabled
|
|
12552
|
-
id: props.id
|
|
12604
|
+
disabled
|
|
12553
12605
|
}
|
|
12554
|
-
) :
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
{
|
|
12558
|
-
width: size2,
|
|
12559
|
-
height: size2,
|
|
12560
|
-
tag: "button",
|
|
12561
|
-
role: "checkbox",
|
|
12562
|
-
"aria-labelledby": labelledBy,
|
|
12563
|
-
"aria-checked": isIndeterminate(checked) ? "mixed" : checked,
|
|
12564
|
-
"aria-required": required,
|
|
12565
|
-
"data-state": getState(checked),
|
|
12566
|
-
"data-disabled": disabled ? "" : void 0,
|
|
12567
|
-
disabled,
|
|
12568
|
-
...checkboxProps,
|
|
12569
|
-
ref: composedRefs,
|
|
12570
|
-
...import_core13.isWeb && {
|
|
12571
|
-
type: "button",
|
|
12572
|
-
value,
|
|
12573
|
-
onKeyDown: (0, import_core13.composeEventHandlers)(
|
|
12574
|
-
props.onKeyDown,
|
|
12575
|
-
(event) => {
|
|
12576
|
-
event.key === "Enter" && event.preventDefault();
|
|
12577
|
-
}
|
|
12578
|
-
)
|
|
12579
|
-
},
|
|
12580
|
-
onPress: (0, import_core13.composeEventHandlers)(props.onPress, (event) => {
|
|
12581
|
-
setChecked(
|
|
12582
|
-
(prevChecked) => isIndeterminate(prevChecked) ? !0 : !prevChecked
|
|
12583
|
-
), isFormControl && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
|
|
12584
|
-
}),
|
|
12585
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
12586
|
-
CheckboxStyledContext.Provider,
|
|
12587
|
-
{
|
|
12588
|
-
size: propsActive.size ?? (styledContext == null ? void 0 : styledContext.size) ?? "$true",
|
|
12589
|
-
scaleIcon: scaleIcon ?? (styledContext == null ? void 0 : styledContext.scaleIcon) ?? 1,
|
|
12590
|
-
children: propsActive.children
|
|
12591
|
-
}
|
|
12592
|
-
)
|
|
12593
|
-
}
|
|
12594
|
-
),
|
|
12595
|
-
import_core13.isWeb && isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
12596
|
-
BubbleInput,
|
|
12597
|
-
{
|
|
12598
|
-
isHidden: !0,
|
|
12599
|
-
control: button,
|
|
12600
|
-
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
12601
|
-
name,
|
|
12602
|
-
value,
|
|
12603
|
-
checked,
|
|
12604
|
-
required,
|
|
12605
|
-
disabled
|
|
12606
|
-
}
|
|
12607
|
-
) : null
|
|
12608
|
-
] }) });
|
|
12609
|
-
})
|
|
12610
|
-
), Checkbox2 = (0, import_core13.withStaticProperties)(CheckboxComponent, {
|
|
12606
|
+
) : null
|
|
12607
|
+
] }) });
|
|
12608
|
+
}), Checkbox2 = (0, import_core13.withStaticProperties)(CheckboxComponent, {
|
|
12611
12609
|
Indicator: CheckboxIndicator,
|
|
12612
12610
|
Props: CheckboxStyledContext.Provider
|
|
12613
12611
|
});
|
|
@@ -16913,21 +16911,17 @@ var require_SliderImpl_native = __commonJS({
|
|
|
16913
16911
|
mod
|
|
16914
16912
|
)), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), SliderImpl_exports = {};
|
|
16915
16913
|
__export2(SliderImpl_exports, {
|
|
16916
|
-
DirectionalYStack: () => DirectionalYStack2,
|
|
16917
16914
|
SliderFrame: () => SliderFrame2,
|
|
16918
16915
|
SliderImpl: () => SliderImpl
|
|
16919
16916
|
});
|
|
16920
16917
|
module2.exports = __toCommonJS2(SliderImpl_exports);
|
|
16921
|
-
var import_core13 = require_index_native15(), import_get_token2 = require_index_native17(), import_stacks3 = require_index_native19(), React2 = __toESM2(require("react")), import_constants = require_constants_native5(), import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
16918
|
+
var import_core13 = require_index_native15(), import_get_token2 = require_index_native17(), import_stacks3 = require_index_native19(), React2 = __toESM2(require("react")), import_constants = require_constants_native5(), import_jsx_runtime6 = require("react/jsx-runtime"), SliderFrame2 = (0, import_core13.styled)(import_stacks3.YStack, {
|
|
16919
|
+
position: "relative",
|
|
16922
16920
|
variants: {
|
|
16923
16921
|
orientation: {
|
|
16924
16922
|
horizontal: {},
|
|
16925
16923
|
vertical: {}
|
|
16926
|
-
}
|
|
16927
|
-
}
|
|
16928
|
-
}), SliderFrame2 = (0, import_core13.styled)(DirectionalYStack2, {
|
|
16929
|
-
position: "relative",
|
|
16930
|
-
variants: {
|
|
16924
|
+
},
|
|
16931
16925
|
size: (val, extras) => {
|
|
16932
16926
|
if (!val)
|
|
16933
16927
|
return;
|
|
@@ -17428,7 +17422,6 @@ var require_index_native60 = __commonJS({
|
|
|
17428
17422
|
return to;
|
|
17429
17423
|
}, __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), src_exports2 = {};
|
|
17430
17424
|
__export2(src_exports2, {
|
|
17431
|
-
DirectionalYStack: () => import_SliderImpl.DirectionalYStack,
|
|
17432
17425
|
SliderFrame: () => import_SliderImpl.SliderFrame
|
|
17433
17426
|
});
|
|
17434
17427
|
module2.exports = __toCommonJS2(src_exports2);
|
|
@@ -18026,31 +18019,27 @@ var require_Tabs_native = __commonJS({
|
|
|
18026
18019
|
TabsTrigger.displayName = TRIGGER_NAME;
|
|
18027
18020
|
var CONTENT_NAME = "TabsContent", TabsContentFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
18028
18021
|
name: CONTENT_NAME
|
|
18029
|
-
}), TabsContent = TabsContentFrame.
|
|
18030
|
-
|
|
18031
|
-
|
|
18032
|
-
|
|
18033
|
-
|
|
18034
|
-
|
|
18035
|
-
|
|
18036
|
-
|
|
18037
|
-
|
|
18038
|
-
|
|
18039
|
-
|
|
18040
|
-
|
|
18041
|
-
|
|
18042
|
-
|
|
18043
|
-
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
|
|
18047
|
-
|
|
18048
|
-
|
|
18049
|
-
|
|
18050
|
-
)
|
|
18051
|
-
);
|
|
18052
|
-
TabsContent.displayName = CONTENT_NAME;
|
|
18053
|
-
var TABS_NAME = "Tabs", { Provider: TabsProvider, useStyledContext: useTabsContext } = (0, import_web.createStyledContext)(), TabsFrame = (0, import_web.styled)(import_stacks3.SizableStack, {
|
|
18022
|
+
}), TabsContent = TabsContentFrame.styleable(
|
|
18023
|
+
function(props, forwardedRef) {
|
|
18024
|
+
let { __scopeTabs, value, forceMount, children, ...contentProps } = props, context = useTabsContext(__scopeTabs), isSelected = value === context.value, show = forceMount || isSelected, triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value);
|
|
18025
|
+
return show ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
18026
|
+
TabsContentFrame,
|
|
18027
|
+
{
|
|
18028
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
18029
|
+
"data-orientation": context.orientation,
|
|
18030
|
+
role: "tabpanel",
|
|
18031
|
+
"aria-labelledby": triggerId,
|
|
18032
|
+
hidden: !show,
|
|
18033
|
+
id: contentId,
|
|
18034
|
+
tabIndex: 0,
|
|
18035
|
+
...contentProps,
|
|
18036
|
+
ref: forwardedRef,
|
|
18037
|
+
children
|
|
18038
|
+
},
|
|
18039
|
+
value
|
|
18040
|
+
) : null;
|
|
18041
|
+
}
|
|
18042
|
+
), TABS_NAME = "Tabs", { Provider: TabsProvider, useStyledContext: useTabsContext } = (0, import_web.createStyledContext)(), TabsFrame = (0, import_web.styled)(import_stacks3.SizableStack, {
|
|
18054
18043
|
name: TABS_NAME
|
|
18055
18044
|
}), Tabs = (0, import_web.withStaticProperties)(
|
|
18056
18045
|
TabsFrame.extractable(
|