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/test.native.js
CHANGED
|
@@ -15047,7 +15047,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15047
15047
|
}
|
|
15048
15048
|
});
|
|
15049
15049
|
module2.exports = __toCommonJS2(Accordion_exports);
|
|
15050
|
-
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(),
|
|
15050
|
+
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 = [
|
|
15051
15051
|
"Home",
|
|
15052
15052
|
"End",
|
|
15053
15053
|
"ArrowDown",
|
|
@@ -15077,7 +15077,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15077
15077
|
].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;
|
|
15078
15078
|
}
|
|
15079
15079
|
};
|
|
15080
|
-
var { Provider: AccordionValueProvider, useStyledContext: useAccordionValueContext } = (0,
|
|
15080
|
+
var { Provider: AccordionValueProvider, useStyledContext: useAccordionValueContext } = (0, import_core12.createStyledContext)(), { Provider: AccordionCollapsibleProvider, useStyledContext: useAccordionCollapsibleContext } = (0, import_core12.createStyledContext)(), AccordionImplSingle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15081
15081
|
var { value: valueProp, defaultValue, control, onValueChange = function() {
|
|
15082
15082
|
}, collapsible = !1, ...accordionSingleProps } = props, [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
15083
15083
|
prop: valueProp,
|
|
@@ -15145,7 +15145,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15145
15145
|
})
|
|
15146
15146
|
})
|
|
15147
15147
|
});
|
|
15148
|
-
}), { Provider: AccordionImplProvider, useStyledContext: useAccordionContext } = (0,
|
|
15148
|
+
}), { Provider: AccordionImplProvider, useStyledContext: useAccordionContext } = (0, import_core12.createStyledContext)(), AccordionImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15149
15149
|
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) {
|
|
15150
15150
|
var _triggerCollection_clampedIndex_ref_current;
|
|
15151
15151
|
if (ACCORDION_KEYS.includes(event.key)) {
|
|
@@ -15204,7 +15204,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15204
15204
|
})
|
|
15205
15205
|
})
|
|
15206
15206
|
});
|
|
15207
|
-
}), ITEM_NAME = "AccordionItem", { Provider: AccordionItemProvider, useStyledContext: useAccordionItemContext } = (0,
|
|
15207
|
+
}), ITEM_NAME = "AccordionItem", { Provider: AccordionItemProvider, useStyledContext: useAccordionItemContext } = (0, import_core12.createStyledContext)(), AccordionItem = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15208
15208
|
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;
|
|
15209
15209
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionItemProvider, {
|
|
15210
15210
|
scope: __scopeAccordion,
|
|
@@ -15237,7 +15237,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15237
15237
|
});
|
|
15238
15238
|
});
|
|
15239
15239
|
AccordionHeader.displayName = HEADER_NAME;
|
|
15240
|
-
var AccordionTriggerFrame = (0,
|
|
15240
|
+
var AccordionTriggerFrame = (0, import_core12.styled)(import_collapsible.Collapsible.Trigger, {
|
|
15241
15241
|
variants: {
|
|
15242
15242
|
unstyled: {
|
|
15243
15243
|
false: {
|
|
@@ -15275,7 +15275,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15275
15275
|
ref: forwardedRef
|
|
15276
15276
|
})
|
|
15277
15277
|
});
|
|
15278
|
-
}), AccordionContentFrame = (0,
|
|
15278
|
+
}), AccordionContentFrame = (0, import_core12.styled)(import_collapsible.Collapsible.Content, {
|
|
15279
15279
|
variants: {
|
|
15280
15280
|
unstyled: {
|
|
15281
15281
|
false: {
|
|
@@ -15298,20 +15298,19 @@ var require_Accordion_native = __commonJS({
|
|
|
15298
15298
|
...contentProps,
|
|
15299
15299
|
ref: forwardedRef
|
|
15300
15300
|
});
|
|
15301
|
-
}), HeightAnimator =
|
|
15302
|
-
var itemContext = useAccordionItemContext(), { children, ...rest } = props, [height, setHeight] = React4.useState(0)
|
|
15303
|
-
|
|
15304
|
-
nativeEvent.layout.height && setHeight(nativeEvent.layout.height);
|
|
15305
|
-
});
|
|
15306
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.View, {
|
|
15301
|
+
}), HeightAnimator = import_core12.View.styleable(function(props, ref) {
|
|
15302
|
+
var itemContext = useAccordionItemContext(), { children, ...rest } = props, [height, setHeight] = React4.useState(0);
|
|
15303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
15307
15304
|
ref,
|
|
15308
15305
|
height: itemContext.open ? height : 0,
|
|
15309
15306
|
...rest,
|
|
15310
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
15307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
15311
15308
|
position: "absolute",
|
|
15312
15309
|
width: "100%",
|
|
15313
|
-
|
|
15314
|
-
|
|
15310
|
+
onLayout: function(param) {
|
|
15311
|
+
var { nativeEvent } = param;
|
|
15312
|
+
nativeEvent.layout.height && setHeight(nativeEvent.layout.height);
|
|
15313
|
+
},
|
|
15315
15314
|
children
|
|
15316
15315
|
})
|
|
15317
15316
|
});
|