tamagui 1.126.17 → 1.126.18
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/native.js +14 -15
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +14 -15
- package/dist/test.native.js.map +2 -2
- package/package.json +55 -55
package/dist/native.js
CHANGED
|
@@ -15638,7 +15638,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15638
15638
|
}
|
|
15639
15639
|
});
|
|
15640
15640
|
module2.exports = __toCommonJS2(Accordion_exports);
|
|
15641
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_collapsible = require_index_native15(), import_collection = require_index_native19(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_stacks3 = require_index_native22(), import_text2 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_use_direction = require_index_native25(),
|
|
15641
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_collapsible = require_index_native15(), import_collection = require_index_native19(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native18(), import_helpers = require_index_native7(), import_stacks3 = require_index_native22(), import_text2 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_use_direction = require_index_native25(), React4 = __toESM2(require("react")), ACCORDION_NAME = "Accordion", ACCORDION_KEYS = [
|
|
15642
15642
|
"Home",
|
|
15643
15643
|
"End",
|
|
15644
15644
|
"ArrowDown",
|
|
@@ -15668,7 +15668,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15668
15668
|
].includes(props.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : props.type === "multiple" && typeof value == "string" ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.") : props.type === "single" && Array.isArray(value) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.") : null;
|
|
15669
15669
|
}
|
|
15670
15670
|
};
|
|
15671
|
-
var { Provider: AccordionValueProvider, useStyledContext: useAccordionValueContext } = (0,
|
|
15671
|
+
var { Provider: AccordionValueProvider, useStyledContext: useAccordionValueContext } = (0, import_core12.createStyledContext)(), { Provider: AccordionCollapsibleProvider, useStyledContext: useAccordionCollapsibleContext } = (0, import_core12.createStyledContext)(), AccordionImplSingle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15672
15672
|
var { value: valueProp, defaultValue, control, onValueChange = function() {
|
|
15673
15673
|
}, collapsible = !1, ...accordionSingleProps } = props, [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
15674
15674
|
prop: valueProp,
|
|
@@ -15736,7 +15736,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15736
15736
|
})
|
|
15737
15737
|
})
|
|
15738
15738
|
});
|
|
15739
|
-
}), { Provider: AccordionImplProvider, useStyledContext: useAccordionContext } = (0,
|
|
15739
|
+
}), { Provider: AccordionImplProvider, useStyledContext: useAccordionContext } = (0, import_core12.createStyledContext)(), AccordionImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15740
15740
|
var { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props, accordionRef = React4.useRef(null), composedRef = (0, import_compose_refs.useComposedRefs)(accordionRef, forwardedRef), getItems = useCollection(__scopeAccordion || ACCORDION_CONTEXT), direction = (0, import_use_direction.useDirection)(dir), isDirectionLTR = direction === "ltr", handleKeyDown = (0, import_helpers.composeEventHandlers)(props.onKeyDown, function(event) {
|
|
15741
15741
|
var _triggerCollection_clampedIndex_ref_current;
|
|
15742
15742
|
if (ACCORDION_KEYS.includes(event.key)) {
|
|
@@ -15795,7 +15795,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15795
15795
|
})
|
|
15796
15796
|
})
|
|
15797
15797
|
});
|
|
15798
|
-
}), ITEM_NAME = "AccordionItem", { Provider: AccordionItemProvider, useStyledContext: useAccordionItemContext } = (0,
|
|
15798
|
+
}), ITEM_NAME = "AccordionItem", { Provider: AccordionItemProvider, useStyledContext: useAccordionItemContext } = (0, import_core12.createStyledContext)(), AccordionItem = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15799
15799
|
var { __scopeAccordion, value, ...accordionItemProps } = props, accordionContext = useAccordionContext(__scopeAccordion), valueContext = useAccordionValueContext(__scopeAccordion), triggerId = React4.useId(), open = value && valueContext.value.includes(value) || !1, disabled = accordionContext.disabled || props.disabled;
|
|
15800
15800
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionItemProvider, {
|
|
15801
15801
|
scope: __scopeAccordion,
|
|
@@ -15828,7 +15828,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15828
15828
|
});
|
|
15829
15829
|
});
|
|
15830
15830
|
AccordionHeader.displayName = HEADER_NAME;
|
|
15831
|
-
var AccordionTriggerFrame = (0,
|
|
15831
|
+
var AccordionTriggerFrame = (0, import_core12.styled)(import_collapsible.Collapsible.Trigger, {
|
|
15832
15832
|
variants: {
|
|
15833
15833
|
unstyled: {
|
|
15834
15834
|
false: {
|
|
@@ -15866,7 +15866,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15866
15866
|
ref: forwardedRef
|
|
15867
15867
|
})
|
|
15868
15868
|
});
|
|
15869
|
-
}), AccordionContentFrame = (0,
|
|
15869
|
+
}), AccordionContentFrame = (0, import_core12.styled)(import_collapsible.Collapsible.Content, {
|
|
15870
15870
|
variants: {
|
|
15871
15871
|
unstyled: {
|
|
15872
15872
|
false: {
|
|
@@ -15889,20 +15889,19 @@ var require_Accordion_native = __commonJS({
|
|
|
15889
15889
|
...contentProps,
|
|
15890
15890
|
ref: forwardedRef
|
|
15891
15891
|
});
|
|
15892
|
-
}), HeightAnimator =
|
|
15893
|
-
var itemContext = useAccordionItemContext(), { children, ...rest } = props, [height, setHeight] = React4.useState(0)
|
|
15894
|
-
|
|
15895
|
-
nativeEvent.layout.height && setHeight(nativeEvent.layout.height);
|
|
15896
|
-
});
|
|
15897
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.View, {
|
|
15892
|
+
}), HeightAnimator = import_core12.View.styleable(function(props, ref) {
|
|
15893
|
+
var itemContext = useAccordionItemContext(), { children, ...rest } = props, [height, setHeight] = React4.useState(0);
|
|
15894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
15898
15895
|
ref,
|
|
15899
15896
|
height: itemContext.open ? height : 0,
|
|
15900
15897
|
...rest,
|
|
15901
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
15898
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
15902
15899
|
position: "absolute",
|
|
15903
15900
|
width: "100%",
|
|
15904
|
-
|
|
15905
|
-
|
|
15901
|
+
onLayout: function(param) {
|
|
15902
|
+
var { nativeEvent } = param;
|
|
15903
|
+
nativeEvent.layout.height && setHeight(nativeEvent.layout.height);
|
|
15904
|
+
},
|
|
15906
15905
|
children
|
|
15907
15906
|
})
|
|
15908
15907
|
});
|