@butternutbox/pawprint-native 0.8.0 → 0.10.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.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +32 -0
- package/dist/index.cjs +1194 -1061
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -13
- package/dist/index.d.ts +18 -13
- package/dist/index.js +693 -561
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__mocks__/react-native.tsx +7 -0
- package/src/__mocks__/rn-primitives/select.tsx +58 -21
- package/src/components/atoms/Input/InputField.tsx +37 -6
- package/src/components/atoms/Input/index.ts +1 -1
- package/src/components/molecules/ProductDisplayCard/ProductDisplayCard.stories.tsx +31 -75
- package/src/components/molecules/ProductDisplayCard/ProductDisplayCard.test.tsx +1 -7
- package/src/components/molecules/ProductDisplayCard/ProductDisplayCard.tsx +93 -121
- package/src/components/molecules/ProductListingCard/Badge.tsx +2 -2
- package/src/components/molecules/ProductListingCard/ProductListingCard.stories.tsx +65 -1
- package/src/components/molecules/ProductListingCard/ProductListingCard.tsx +38 -52
- package/src/components/molecules/SelectField/SelectField.stories.tsx +110 -5
- package/src/components/molecules/SelectField/SelectField.test.tsx +174 -2
- package/src/components/molecules/SelectField/SelectField.tsx +186 -30
- package/src/components/molecules/SelectField/SelectFieldContent.tsx +8 -12
- package/src/components/molecules/SelectField/SelectFieldTrigger.tsx +43 -25
- package/src/components/molecules/SelectField/SelectFieldValue.tsx +17 -18
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useTheme, ThemeProvider as ThemeProvider$1 } from '@emotion/react';
|
|
2
2
|
import { Brand, Theme, DEFAULT_THEME_OPTIONS, THEME_OPTIONS_MAP, tokens } from '@butternutbox/pawprint-tokens';
|
|
3
3
|
export { tokens } from '@butternutbox/pawprint-tokens';
|
|
4
|
-
import
|
|
4
|
+
import styled50 from '@emotion/native';
|
|
5
5
|
export { default as styled } from '@emotion/native';
|
|
6
|
-
import
|
|
6
|
+
import React65, { createContext, forwardRef, useRef, useEffect, useState, useCallback, useMemo, useContext } from 'react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import * as AvatarPrimitive from '@rn-primitives/avatar';
|
|
9
|
-
import { Text, View, Animated, Pressable, TextInput, Easing, StyleSheet, useWindowDimensions, PanResponder, Image, ScrollView, ActionSheetIOS, TouchableOpacity, Platform, Modal, TouchableWithoutFeedback, FlatList, Linking, Clipboard, Alert } from 'react-native';
|
|
9
|
+
import { Text, View, Animated, Pressable, TextInput, Easing, StyleSheet, useWindowDimensions, PanResponder, Image, ScrollView, Keyboard, ActionSheetIOS, TouchableOpacity, Platform, Modal, TouchableWithoutFeedback, FlatList, Linking, Clipboard, Alert } from 'react-native';
|
|
10
10
|
import Svg, { Path, Defs, LinearGradient, Stop, Rect, G, ClipPath } from 'react-native-svg';
|
|
11
11
|
import * as SwitchPrimitive from '@rn-primitives/switch';
|
|
12
12
|
import Animated10, { Keyframe, Easing as Easing$1, FadeInLeft, FadeInRight, FadeInUp, FadeInDown, FadeIn, FadeOutLeft, FadeOutRight, FadeOutUp, FadeOutDown, FadeOut, useSharedValue, useAnimatedStyle, ComplexAnimationBuilder } from 'react-native-reanimated';
|
|
@@ -203,8 +203,8 @@ var VARIANT_DEFAULTS = {
|
|
|
203
203
|
heading: { size: "md" },
|
|
204
204
|
display: { size: "lg" }
|
|
205
205
|
};
|
|
206
|
-
var StyledText =
|
|
207
|
-
var Typography =
|
|
206
|
+
var StyledText = styled50(Text)({});
|
|
207
|
+
var Typography = React65.forwardRef(
|
|
208
208
|
(props, ref) => {
|
|
209
209
|
const theme2 = useTheme();
|
|
210
210
|
const { typography, colour } = theme2.tokens.semantics;
|
|
@@ -287,14 +287,14 @@ var Typography = React60.forwardRef(
|
|
|
287
287
|
);
|
|
288
288
|
Typography.displayName = "Typography";
|
|
289
289
|
var parseTokenValue2 = (value) => parseFloat(value);
|
|
290
|
-
var StyledIconRoot =
|
|
290
|
+
var StyledIconRoot = styled50(View)(({ iconDimension }) => ({
|
|
291
291
|
alignItems: "center",
|
|
292
292
|
justifyContent: "center",
|
|
293
293
|
flexShrink: 0,
|
|
294
294
|
width: iconDimension,
|
|
295
295
|
height: iconDimension
|
|
296
296
|
}));
|
|
297
|
-
var Icon =
|
|
297
|
+
var Icon = React65.forwardRef(
|
|
298
298
|
(_a, ref) => {
|
|
299
299
|
var _b = _a, {
|
|
300
300
|
icon: IconComponent,
|
|
@@ -3829,7 +3829,7 @@ var SIZE_MAP = {
|
|
|
3829
3829
|
lg: "large"
|
|
3830
3830
|
};
|
|
3831
3831
|
var parseTokenValue3 = (value) => parseFloat(value);
|
|
3832
|
-
var StyledRoot =
|
|
3832
|
+
var StyledRoot = styled50(AvatarPrimitive.Root)(({ theme: theme2, size, border }) => {
|
|
3833
3833
|
const { avatar } = theme2.tokens.components;
|
|
3834
3834
|
const { borderRadius } = theme2.tokens.semantics.dimensions;
|
|
3835
3835
|
const tokenSize = SIZE_MAP[size];
|
|
@@ -3850,12 +3850,12 @@ var StyledRoot = styled51(AvatarPrimitive.Root)(({ theme: theme2, size, border }
|
|
|
3850
3850
|
borderStyle: "solid"
|
|
3851
3851
|
});
|
|
3852
3852
|
});
|
|
3853
|
-
var StyledImage =
|
|
3853
|
+
var StyledImage = styled50(AvatarPrimitive.Image)({
|
|
3854
3854
|
width: "100%",
|
|
3855
3855
|
height: "100%",
|
|
3856
3856
|
resizeMode: "cover"
|
|
3857
3857
|
});
|
|
3858
|
-
var StyledFallback =
|
|
3858
|
+
var StyledFallback = styled50(AvatarPrimitive.Fallback)(({ theme: theme2 }) => {
|
|
3859
3859
|
const { background, text } = theme2.tokens.semantics.colour;
|
|
3860
3860
|
return {
|
|
3861
3861
|
display: "flex",
|
|
@@ -3867,7 +3867,7 @@ var StyledFallback = styled51(AvatarPrimitive.Fallback)(({ theme: theme2 }) => {
|
|
|
3867
3867
|
color: text.primary
|
|
3868
3868
|
};
|
|
3869
3869
|
});
|
|
3870
|
-
var StyledIcon =
|
|
3870
|
+
var StyledIcon = styled50(Icon)(({
|
|
3871
3871
|
theme: theme2,
|
|
3872
3872
|
avatarSize
|
|
3873
3873
|
}) => {
|
|
@@ -3894,7 +3894,7 @@ var AVATAR_SIZE_TO_ICON_SIZE = {
|
|
|
3894
3894
|
md: "md",
|
|
3895
3895
|
lg: "xl"
|
|
3896
3896
|
};
|
|
3897
|
-
var AvatarRoot =
|
|
3897
|
+
var AvatarRoot = React65.forwardRef(
|
|
3898
3898
|
(_a, ref) => {
|
|
3899
3899
|
var _b = _a, {
|
|
3900
3900
|
src,
|
|
@@ -3931,7 +3931,7 @@ var AvatarRoot = React60.forwardRef(
|
|
|
3931
3931
|
AvatarRoot.displayName = "Avatar";
|
|
3932
3932
|
var Avatar = AvatarRoot;
|
|
3933
3933
|
var parseTokenValue4 = (value) => parseFloat(value);
|
|
3934
|
-
var Container =
|
|
3934
|
+
var Container = styled50(View)(({ theme: theme2, showBg }) => {
|
|
3935
3935
|
const { colour, sizing, borderRadius } = theme2.tokens.components.carouselControls.carouselControl;
|
|
3936
3936
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
3937
3937
|
return {
|
|
@@ -3953,7 +3953,7 @@ function getVisibleDots(count, activeIndex) {
|
|
|
3953
3953
|
const windowStart = Math.min(Math.max(activeIndex - 2, 0), count - 5);
|
|
3954
3954
|
return Array.from({ length: 5 }, (_, i) => windowStart + i);
|
|
3955
3955
|
}
|
|
3956
|
-
var CarouselControls =
|
|
3956
|
+
var CarouselControls = React65.forwardRef(
|
|
3957
3957
|
(_a, ref) => {
|
|
3958
3958
|
var _b = _a, { count, activeIndex, showBackground = true } = _b, props = __objRest(_b, ["count", "activeIndex", "showBackground"]);
|
|
3959
3959
|
const theme2 = useTheme();
|
|
@@ -4000,7 +4000,7 @@ var CarouselControls = React60.forwardRef(
|
|
|
4000
4000
|
);
|
|
4001
4001
|
CarouselControls.displayName = "CarouselControls";
|
|
4002
4002
|
var parseTokenValue5 = (value) => parseFloat(value);
|
|
4003
|
-
var StyledBadge =
|
|
4003
|
+
var StyledBadge = styled50(View)(({ theme: theme2, badgeVariant, badgeSize, pinned, top, bottom }) => {
|
|
4004
4004
|
const { sizing, spacing, colour, primary, pinnedBadge } = theme2.tokens.components.badges.badge;
|
|
4005
4005
|
const backgroundColorMap = {
|
|
4006
4006
|
primary: colour.background.default,
|
|
@@ -4040,7 +4040,7 @@ var StyledBadge = styled51(View)(({ theme: theme2, badgeVariant, badgeSize, pinn
|
|
|
4040
4040
|
backgroundColor: backgroundColorMap[badgeVariant]
|
|
4041
4041
|
}, borderRadiusStyles), positionStyles);
|
|
4042
4042
|
});
|
|
4043
|
-
var Badge =
|
|
4043
|
+
var Badge = React65.forwardRef(
|
|
4044
4044
|
(_a, ref) => {
|
|
4045
4045
|
var _b = _a, {
|
|
4046
4046
|
variant = "primary",
|
|
@@ -4114,8 +4114,8 @@ var Badge = React60.forwardRef(
|
|
|
4114
4114
|
);
|
|
4115
4115
|
Badge.displayName = "Badge";
|
|
4116
4116
|
var parseTokenValue6 = (value) => parseFloat(value);
|
|
4117
|
-
var StyledSpinner =
|
|
4118
|
-
var Spinner =
|
|
4117
|
+
var StyledSpinner = styled50(View)({});
|
|
4118
|
+
var Spinner = React65.forwardRef(
|
|
4119
4119
|
(_a, ref) => {
|
|
4120
4120
|
var _b = _a, { size = "md", variant = "dark", style } = _b, rest = __objRest(_b, ["size", "variant", "style"]);
|
|
4121
4121
|
const theme2 = useTheme();
|
|
@@ -4180,12 +4180,12 @@ var sizeToTypographyKey = {
|
|
|
4180
4180
|
md: "medium",
|
|
4181
4181
|
sm: "small"
|
|
4182
4182
|
};
|
|
4183
|
-
var IconWrapper =
|
|
4183
|
+
var IconWrapper = styled50(View)({
|
|
4184
4184
|
alignItems: "center",
|
|
4185
4185
|
justifyContent: "center",
|
|
4186
4186
|
flexShrink: 0
|
|
4187
4187
|
});
|
|
4188
|
-
var StyledButton =
|
|
4188
|
+
var StyledButton = styled50(Pressable)(
|
|
4189
4189
|
({
|
|
4190
4190
|
buttonHeight,
|
|
4191
4191
|
buttonMinWidth,
|
|
@@ -4213,16 +4213,16 @@ var StyledButton = styled51(Pressable)(
|
|
|
4213
4213
|
opacity: buttonOpacity
|
|
4214
4214
|
}, buttonBorderWidth ? { borderWidth: buttonBorderWidth, borderColor: buttonBorderColor } : {}), buttonFullWidth ? { width: "100%" } : {})
|
|
4215
4215
|
);
|
|
4216
|
-
var StyledTextWrapper =
|
|
4216
|
+
var StyledTextWrapper = styled50(View)(({ textOpacity }) => ({
|
|
4217
4217
|
opacity: textOpacity,
|
|
4218
4218
|
flexShrink: 0
|
|
4219
4219
|
}));
|
|
4220
|
-
var StyledSpinnerWrapper =
|
|
4220
|
+
var StyledSpinnerWrapper = styled50(View)({
|
|
4221
4221
|
position: "absolute",
|
|
4222
4222
|
alignItems: "center",
|
|
4223
4223
|
justifyContent: "center"
|
|
4224
4224
|
});
|
|
4225
|
-
var Button =
|
|
4225
|
+
var Button = React65.forwardRef(
|
|
4226
4226
|
(_a, ref) => {
|
|
4227
4227
|
var _b = _a, {
|
|
4228
4228
|
variant = "filled",
|
|
@@ -4254,7 +4254,7 @@ var Button = React60.forwardRef(
|
|
|
4254
4254
|
const typographyKey = sizeToTypographyKey[size];
|
|
4255
4255
|
const typography = buttons.text[typographyKey];
|
|
4256
4256
|
resolveFont(typography.fontFamily, typography.fontWeight);
|
|
4257
|
-
const [pressed, setPressed] =
|
|
4257
|
+
const [pressed, setPressed] = React65.useState(false);
|
|
4258
4258
|
const getVariantStyles = (isPressed) => {
|
|
4259
4259
|
if (variant === "filled") {
|
|
4260
4260
|
const bgTokens = buttons.filledButton.colour.background[colour];
|
|
@@ -4341,7 +4341,7 @@ Button.displayName = "Button";
|
|
|
4341
4341
|
|
|
4342
4342
|
// src/utils/token.ts
|
|
4343
4343
|
var parseTokenValue8 = (value) => parseFloat(value);
|
|
4344
|
-
var StyledHint =
|
|
4344
|
+
var StyledHint = styled50(View)(({
|
|
4345
4345
|
theme: theme2,
|
|
4346
4346
|
hintVariant
|
|
4347
4347
|
}) => {
|
|
@@ -4365,7 +4365,7 @@ var StyledHint = styled51(View)(({
|
|
|
4365
4365
|
backgroundColor: hintVariantMap[hintVariant]
|
|
4366
4366
|
};
|
|
4367
4367
|
});
|
|
4368
|
-
var Hint =
|
|
4368
|
+
var Hint = React65.forwardRef(
|
|
4369
4369
|
(_a, ref) => {
|
|
4370
4370
|
var _b = _a, { variant = "default" } = _b, rest = __objRest(_b, ["variant"]);
|
|
4371
4371
|
return /* @__PURE__ */ jsx(StyledHint, __spreadValues({ ref, hintVariant: variant }, rest));
|
|
@@ -4378,7 +4378,7 @@ var sizeToIconSizeToken = {
|
|
|
4378
4378
|
md: "lg",
|
|
4379
4379
|
sm: "md"
|
|
4380
4380
|
};
|
|
4381
|
-
var StyledIconButton =
|
|
4381
|
+
var StyledIconButton = styled50(Pressable)(
|
|
4382
4382
|
({
|
|
4383
4383
|
buttonDimension,
|
|
4384
4384
|
buttonBorderRadius,
|
|
@@ -4397,17 +4397,17 @@ var StyledIconButton = styled51(Pressable)(
|
|
|
4397
4397
|
opacity: buttonOpacity
|
|
4398
4398
|
}, buttonBorderWidth ? { borderWidth: buttonBorderWidth, borderColor: buttonBorderColor } : {})
|
|
4399
4399
|
);
|
|
4400
|
-
var StyledIconWrapper =
|
|
4400
|
+
var StyledIconWrapper = styled50(View)(({ iconDimension, iconOpacity }) => ({
|
|
4401
4401
|
width: iconDimension,
|
|
4402
4402
|
height: iconDimension,
|
|
4403
4403
|
opacity: iconOpacity
|
|
4404
4404
|
}));
|
|
4405
|
-
var StyledSpinnerWrapper2 =
|
|
4405
|
+
var StyledSpinnerWrapper2 = styled50(View)({
|
|
4406
4406
|
position: "absolute",
|
|
4407
4407
|
alignItems: "center",
|
|
4408
4408
|
justifyContent: "center"
|
|
4409
4409
|
});
|
|
4410
|
-
var IconButton =
|
|
4410
|
+
var IconButton = React65.forwardRef(
|
|
4411
4411
|
(_a, ref) => {
|
|
4412
4412
|
var _b = _a, {
|
|
4413
4413
|
icon: IconComponent,
|
|
@@ -4433,7 +4433,7 @@ var IconButton = React60.forwardRef(
|
|
|
4433
4433
|
const dimension = parseTokenValue9(sizeTokens.height);
|
|
4434
4434
|
const iconSizing = theme2.tokens.components.icons.sizing.icons.core;
|
|
4435
4435
|
const iconDimension = parseTokenValue9(iconSizing[sizeToIconSizeToken[size]]);
|
|
4436
|
-
const [pressed, setPressed] =
|
|
4436
|
+
const [pressed, setPressed] = React65.useState(false);
|
|
4437
4437
|
const getVariantStyles = (isPressed) => {
|
|
4438
4438
|
if (variant === "filled") {
|
|
4439
4439
|
const filled = buttons.iconButton.filledButton;
|
|
@@ -4510,13 +4510,13 @@ var IconButton = React60.forwardRef(
|
|
|
4510
4510
|
);
|
|
4511
4511
|
IconButton.displayName = "IconButton";
|
|
4512
4512
|
var parseTokenValue10 = (value) => parseFloat(value);
|
|
4513
|
-
var StyledRoot2 =
|
|
4513
|
+
var StyledRoot2 = styled50(View)(({ illustrationHeight }) => ({
|
|
4514
4514
|
alignItems: "center",
|
|
4515
4515
|
justifyContent: "center",
|
|
4516
4516
|
flexShrink: 0,
|
|
4517
4517
|
height: illustrationHeight
|
|
4518
4518
|
}));
|
|
4519
|
-
var Illustration =
|
|
4519
|
+
var Illustration = React65.forwardRef(
|
|
4520
4520
|
(_a, ref) => {
|
|
4521
4521
|
var _b = _a, {
|
|
4522
4522
|
illustration: IllustrationComponent,
|
|
@@ -4547,12 +4547,12 @@ var Illustration = React60.forwardRef(
|
|
|
4547
4547
|
);
|
|
4548
4548
|
Illustration.displayName = "Illustration";
|
|
4549
4549
|
var parseTokenValue11 = (value) => parseFloat(value);
|
|
4550
|
-
var StyledLabelRow =
|
|
4550
|
+
var StyledLabelRow = styled50(View)(({ labelGap }) => ({
|
|
4551
4551
|
flexDirection: "row",
|
|
4552
4552
|
alignItems: "center",
|
|
4553
4553
|
gap: labelGap
|
|
4554
4554
|
}));
|
|
4555
|
-
var InputLabel =
|
|
4555
|
+
var InputLabel = React65.forwardRef(
|
|
4556
4556
|
(_a, ref) => {
|
|
4557
4557
|
var _b = _a, { optionalText, state = "default", children } = _b, rest = __objRest(_b, ["optionalText", "state", "children"]);
|
|
4558
4558
|
const theme2 = useTheme();
|
|
@@ -4795,7 +4795,7 @@ var VolumeUp = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadV
|
|
|
4795
4795
|
var ForwardRef612 = forwardRef(VolumeUp);
|
|
4796
4796
|
ForwardRef612.category = "core";
|
|
4797
4797
|
var parseTokenValue12 = (value) => parseFloat(value);
|
|
4798
|
-
var StyledInputWrapper =
|
|
4798
|
+
var StyledInputWrapper = styled50(Animated.View)(({ theme: theme2, isDisabled, containerWidth, containerHeight }) => {
|
|
4799
4799
|
const { spacing, colour, borderRadius, size } = theme2.tokens.components.inputs;
|
|
4800
4800
|
return {
|
|
4801
4801
|
flexDirection: "row",
|
|
@@ -4809,36 +4809,41 @@ var StyledInputWrapper = styled51(Animated.View)(({ theme: theme2, isDisabled, c
|
|
|
4809
4809
|
flexShrink: containerWidth !== void 0 ? 0 : void 0
|
|
4810
4810
|
};
|
|
4811
4811
|
});
|
|
4812
|
-
var StyledInput =
|
|
4812
|
+
var StyledInput = styled50(TextInput)(({ theme: theme2 }) => {
|
|
4813
|
+
var _a, _b;
|
|
4813
4814
|
const { colour, field } = theme2.tokens.components.inputs;
|
|
4814
|
-
const
|
|
4815
|
+
const typography = field.placeholder.default;
|
|
4816
|
+
const { fontFamily } = resolveFont(
|
|
4817
|
+
typography.fontFamily,
|
|
4818
|
+
typography.fontWeight
|
|
4819
|
+
);
|
|
4820
|
+
const fontSize = parseTokenValue12(typography.fontSize);
|
|
4821
|
+
const letterSpacing = ((_a = typography.letterSpacing) == null ? void 0 : _a.endsWith("%")) ? parseFloat(typography.letterSpacing) / 100 * fontSize : parseFloat((_b = typography.letterSpacing) != null ? _b : "0");
|
|
4815
4822
|
return __spreadValues({
|
|
4816
4823
|
flex: 1,
|
|
4817
4824
|
minWidth: 0,
|
|
4818
4825
|
minHeight: 0,
|
|
4819
4826
|
padding: 0,
|
|
4820
4827
|
color: colour.field.text.default,
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
lineHeight: parseTokenValue12(placeholderTypography.lineHeight),
|
|
4825
|
-
letterSpacing: parseTokenValue12(placeholderTypography.letterSpacing)
|
|
4828
|
+
fontFamily,
|
|
4829
|
+
fontSize,
|
|
4830
|
+
letterSpacing
|
|
4826
4831
|
}, {
|
|
4827
4832
|
outlineStyle: "none",
|
|
4828
4833
|
outlineWidth: 0,
|
|
4829
4834
|
outlineColor: "transparent"
|
|
4830
4835
|
});
|
|
4831
4836
|
});
|
|
4832
|
-
var StyledFocusRing =
|
|
4837
|
+
var StyledFocusRing = styled50(View)({
|
|
4833
4838
|
position: "absolute",
|
|
4834
4839
|
pointerEvents: "none"
|
|
4835
4840
|
});
|
|
4836
|
-
var StyledIconSlot =
|
|
4841
|
+
var StyledIconSlot = styled50(View)({
|
|
4837
4842
|
alignItems: "center",
|
|
4838
4843
|
justifyContent: "center",
|
|
4839
4844
|
flexShrink: 0
|
|
4840
4845
|
});
|
|
4841
|
-
var InputField =
|
|
4846
|
+
var InputField = React65.forwardRef(
|
|
4842
4847
|
(_a, ref) => {
|
|
4843
4848
|
var _b = _a, {
|
|
4844
4849
|
leadingIcon,
|
|
@@ -4994,11 +4999,26 @@ var InputField = React60.forwardRef(
|
|
|
4994
4999
|
}
|
|
4995
5000
|
);
|
|
4996
5001
|
InputField.displayName = "Input.Field";
|
|
4997
|
-
var
|
|
5002
|
+
var InputText = React65.forwardRef(
|
|
5003
|
+
(_a, ref) => {
|
|
5004
|
+
var _b = _a, { placeholderTextColor } = _b, rest = __objRest(_b, ["placeholderTextColor"]);
|
|
5005
|
+
const theme2 = useTheme();
|
|
5006
|
+
const { colour } = theme2.tokens.components.inputs;
|
|
5007
|
+
return /* @__PURE__ */ jsx(
|
|
5008
|
+
StyledInput,
|
|
5009
|
+
__spreadValues({
|
|
5010
|
+
ref,
|
|
5011
|
+
placeholderTextColor: placeholderTextColor != null ? placeholderTextColor : colour.field.text.placeholder
|
|
5012
|
+
}, rest)
|
|
5013
|
+
);
|
|
5014
|
+
}
|
|
5015
|
+
);
|
|
5016
|
+
InputText.displayName = "Input.Text";
|
|
5017
|
+
var StyledDescriptionRow = styled50(View)({
|
|
4998
5018
|
flexDirection: "row",
|
|
4999
5019
|
alignItems: "center"
|
|
5000
5020
|
});
|
|
5001
|
-
var InputDescription =
|
|
5021
|
+
var InputDescription = React65.forwardRef(
|
|
5002
5022
|
(_a, ref) => {
|
|
5003
5023
|
var _b = _a, { state = "default", children } = _b, rest = __objRest(_b, ["state", "children"]);
|
|
5004
5024
|
const theme2 = useTheme();
|
|
@@ -5014,11 +5034,11 @@ var InputDescription = React60.forwardRef(
|
|
|
5014
5034
|
}
|
|
5015
5035
|
);
|
|
5016
5036
|
InputDescription.displayName = "Input.Description";
|
|
5017
|
-
var StyledErrorRow =
|
|
5037
|
+
var StyledErrorRow = styled50(View)({
|
|
5018
5038
|
flexDirection: "row",
|
|
5019
5039
|
alignItems: "center"
|
|
5020
5040
|
});
|
|
5021
|
-
var InputError =
|
|
5041
|
+
var InputError = React65.forwardRef(
|
|
5022
5042
|
(_a, ref) => {
|
|
5023
5043
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
5024
5044
|
const theme2 = useTheme();
|
|
@@ -5035,13 +5055,13 @@ var InputError = React60.forwardRef(
|
|
|
5035
5055
|
);
|
|
5036
5056
|
InputError.displayName = "Input.Error";
|
|
5037
5057
|
var parseTokenValue13 = (value) => parseFloat(value);
|
|
5038
|
-
var StyledRoot3 =
|
|
5058
|
+
var StyledRoot3 = styled50(View)(({ theme: theme2 }) => {
|
|
5039
5059
|
const { spacing } = theme2.tokens.components.inputs;
|
|
5040
5060
|
return {
|
|
5041
5061
|
gap: parseTokenValue13(spacing.gap)
|
|
5042
5062
|
};
|
|
5043
5063
|
});
|
|
5044
|
-
var InputRoot =
|
|
5064
|
+
var InputRoot = React65.forwardRef(
|
|
5045
5065
|
(_a, ref) => {
|
|
5046
5066
|
var _b = _a, {
|
|
5047
5067
|
label,
|
|
@@ -5085,7 +5105,7 @@ var Input = Object.assign(InputRoot, {
|
|
|
5085
5105
|
Description: InputDescription,
|
|
5086
5106
|
Error: InputError
|
|
5087
5107
|
});
|
|
5088
|
-
var Link =
|
|
5108
|
+
var Link = React65.forwardRef(
|
|
5089
5109
|
(_a, ref) => {
|
|
5090
5110
|
var _b = _a, {
|
|
5091
5111
|
size = "md",
|
|
@@ -7678,12 +7698,12 @@ function registerLogo(brand, variant, component) {
|
|
|
7678
7698
|
}
|
|
7679
7699
|
LOGOS[brand][variant] = component;
|
|
7680
7700
|
}
|
|
7681
|
-
var StyledRoot4 =
|
|
7701
|
+
var StyledRoot4 = styled50(View)({
|
|
7682
7702
|
alignItems: "center",
|
|
7683
7703
|
justifyContent: "center",
|
|
7684
7704
|
flexShrink: 0
|
|
7685
7705
|
});
|
|
7686
|
-
var Logo =
|
|
7706
|
+
var Logo = React65.forwardRef(
|
|
7687
7707
|
(_a, ref) => {
|
|
7688
7708
|
var _b = _a, { brand, variant = "primary", "aria-label": ariaLabel } = _b, rest = __objRest(_b, ["brand", "variant", "aria-label"]);
|
|
7689
7709
|
const effectiveVariant = brand === "bcorp" ? "primary" : variant;
|
|
@@ -7706,7 +7726,7 @@ var Logo = React60.forwardRef(
|
|
|
7706
7726
|
);
|
|
7707
7727
|
Logo.displayName = "Logo";
|
|
7708
7728
|
var parseTokenValue14 = (value) => parseFloat(value);
|
|
7709
|
-
var StyledFieldGroup =
|
|
7729
|
+
var StyledFieldGroup = styled50(View)(({ theme: theme2 }) => {
|
|
7710
7730
|
const { spacing } = theme2.tokens.components.inputs;
|
|
7711
7731
|
return {
|
|
7712
7732
|
flexDirection: "row",
|
|
@@ -7714,11 +7734,11 @@ var StyledFieldGroup = styled51(View)(({ theme: theme2 }) => {
|
|
|
7714
7734
|
gap: parseTokenValue14(spacing.field.gap)
|
|
7715
7735
|
};
|
|
7716
7736
|
});
|
|
7717
|
-
var StyledFieldTextWrapper =
|
|
7737
|
+
var StyledFieldTextWrapper = styled50(View)({
|
|
7718
7738
|
flexShrink: 0,
|
|
7719
7739
|
justifyContent: "center"
|
|
7720
7740
|
});
|
|
7721
|
-
var NumberInputField =
|
|
7741
|
+
var NumberInputField = React65.forwardRef((_a, ref) => {
|
|
7722
7742
|
var _b = _a, { fieldText } = _b, props = __objRest(_b, ["fieldText"]);
|
|
7723
7743
|
const theme2 = useTheme();
|
|
7724
7744
|
const { colour, description } = theme2.tokens.components.inputs;
|
|
@@ -7753,13 +7773,13 @@ var NumberInputField = React60.forwardRef((_a, ref) => {
|
|
|
7753
7773
|
});
|
|
7754
7774
|
NumberInputField.displayName = "NumberInput.Field";
|
|
7755
7775
|
var parseTokenValue15 = (value) => parseFloat(value);
|
|
7756
|
-
var StyledRoot5 =
|
|
7776
|
+
var StyledRoot5 = styled50(View)(({ theme: theme2 }) => {
|
|
7757
7777
|
const { spacing } = theme2.tokens.components.inputs;
|
|
7758
7778
|
return {
|
|
7759
7779
|
gap: parseTokenValue15(spacing.gap)
|
|
7760
7780
|
};
|
|
7761
7781
|
});
|
|
7762
|
-
var NumberInputRoot =
|
|
7782
|
+
var NumberInputRoot = React65.forwardRef(
|
|
7763
7783
|
(_a, ref) => {
|
|
7764
7784
|
var _b = _a, {
|
|
7765
7785
|
label,
|
|
@@ -7807,13 +7827,13 @@ var NumberInput = Object.assign(NumberInputRoot, {
|
|
|
7807
7827
|
Error: InputError
|
|
7808
7828
|
});
|
|
7809
7829
|
var parseTokenValue16 = (value) => parseFloat(value);
|
|
7810
|
-
var StyledContainer =
|
|
7830
|
+
var StyledContainer = styled50(View)(({ switchGap, switchOpacity }) => ({
|
|
7811
7831
|
flexDirection: "row",
|
|
7812
7832
|
alignItems: "flex-start",
|
|
7813
7833
|
gap: switchGap,
|
|
7814
7834
|
opacity: switchOpacity
|
|
7815
7835
|
}));
|
|
7816
|
-
var StyledControlTrack =
|
|
7836
|
+
var StyledControlTrack = styled50(View)(
|
|
7817
7837
|
({
|
|
7818
7838
|
switchChecked,
|
|
7819
7839
|
controlWidth,
|
|
@@ -7839,19 +7859,19 @@ var StyledControlTrack = styled51(View)(
|
|
|
7839
7859
|
justifyContent: "center"
|
|
7840
7860
|
})
|
|
7841
7861
|
);
|
|
7842
|
-
var StyledThumb =
|
|
7862
|
+
var StyledThumb = styled50(Animated.View)(({ thumbSize, thumbBgColor }) => ({
|
|
7843
7863
|
width: thumbSize,
|
|
7844
7864
|
height: thumbSize,
|
|
7845
7865
|
borderRadius: thumbSize / 2,
|
|
7846
7866
|
backgroundColor: thumbBgColor,
|
|
7847
7867
|
position: "absolute"
|
|
7848
7868
|
}));
|
|
7849
|
-
var StyledContent =
|
|
7869
|
+
var StyledContent = styled50(View)(({ contentGap }) => ({
|
|
7850
7870
|
gap: contentGap,
|
|
7851
7871
|
flex: 1,
|
|
7852
7872
|
minWidth: 0
|
|
7853
7873
|
}));
|
|
7854
|
-
var Switch =
|
|
7874
|
+
var Switch = React65.forwardRef(
|
|
7855
7875
|
(_a, ref) => {
|
|
7856
7876
|
var _b = _a, {
|
|
7857
7877
|
label,
|
|
@@ -7871,7 +7891,7 @@ var Switch = React60.forwardRef(
|
|
|
7871
7891
|
const theme2 = useTheme();
|
|
7872
7892
|
const { size, colour, opacity, borderWidth, spacing, typography } = theme2.tokens.components.switch;
|
|
7873
7893
|
const isControlled = controlledChecked !== void 0;
|
|
7874
|
-
const [internalChecked, setInternalChecked] =
|
|
7894
|
+
const [internalChecked, setInternalChecked] = React65.useState(defaultChecked);
|
|
7875
7895
|
const isChecked = isControlled ? controlledChecked : internalChecked;
|
|
7876
7896
|
const controlWidth = parseTokenValue16(size.control.width);
|
|
7877
7897
|
const controlHeight = parseTokenValue16(size.control.height);
|
|
@@ -7954,7 +7974,7 @@ var Switch = React60.forwardRef(
|
|
|
7954
7974
|
);
|
|
7955
7975
|
Switch.displayName = "Switch";
|
|
7956
7976
|
var parseTokenValue17 = (value) => parseFloat(value);
|
|
7957
|
-
var StyledTag =
|
|
7977
|
+
var StyledTag = styled50(View)(({ theme: theme2, tagVariant, tagSize }) => {
|
|
7958
7978
|
const { sizing, spacing, colour, badge } = theme2.tokens.components.tags;
|
|
7959
7979
|
const backgroundColorMap = {
|
|
7960
7980
|
primary: colour.primary.background,
|
|
@@ -7977,7 +7997,7 @@ var StyledTag = styled51(View)(({ theme: theme2, tagVariant, tagSize }) => {
|
|
|
7977
7997
|
backgroundColor: backgroundColorMap[tagVariant]
|
|
7978
7998
|
};
|
|
7979
7999
|
});
|
|
7980
|
-
var Tag =
|
|
8000
|
+
var Tag = React65.forwardRef(
|
|
7981
8001
|
(_a, ref) => {
|
|
7982
8002
|
var _b = _a, { variant = "primary", size = "medium", icon, children } = _b, rest = __objRest(_b, ["variant", "size", "icon", "children"]);
|
|
7983
8003
|
const theme2 = useTheme();
|
|
@@ -8027,7 +8047,7 @@ var Tag = React60.forwardRef(
|
|
|
8027
8047
|
);
|
|
8028
8048
|
Tag.displayName = "Tag";
|
|
8029
8049
|
var parseTokenValue18 = (value) => parseFloat(value);
|
|
8030
|
-
var StyledTextAreaWrapper =
|
|
8050
|
+
var StyledTextAreaWrapper = styled50(Animated.View)(({ theme: theme2, isDisabled }) => {
|
|
8031
8051
|
const { spacing, colour, borderRadius, size } = theme2.tokens.components.inputs;
|
|
8032
8052
|
const { dimensions: dimensions3 } = theme2.tokens.semantics;
|
|
8033
8053
|
return {
|
|
@@ -8041,7 +8061,7 @@ var StyledTextAreaWrapper = styled51(Animated.View)(({ theme: theme2, isDisabled
|
|
|
8041
8061
|
position: "relative"
|
|
8042
8062
|
};
|
|
8043
8063
|
});
|
|
8044
|
-
var StyledTextArea =
|
|
8064
|
+
var StyledTextArea = styled50(TextInput)(({ theme: theme2 }) => {
|
|
8045
8065
|
const { colour } = theme2.tokens.components.inputs;
|
|
8046
8066
|
return __spreadValues({
|
|
8047
8067
|
flex: 1,
|
|
@@ -8056,17 +8076,17 @@ var StyledTextArea = styled51(TextInput)(({ theme: theme2 }) => {
|
|
|
8056
8076
|
outlineColor: "transparent"
|
|
8057
8077
|
});
|
|
8058
8078
|
});
|
|
8059
|
-
var StyledFocusRing2 =
|
|
8079
|
+
var StyledFocusRing2 = styled50(View)({
|
|
8060
8080
|
position: "absolute",
|
|
8061
8081
|
pointerEvents: "none"
|
|
8062
8082
|
});
|
|
8063
|
-
var TextAreaContainer =
|
|
8083
|
+
var TextAreaContainer = styled50(View)({
|
|
8064
8084
|
position: "relative",
|
|
8065
8085
|
width: "100%",
|
|
8066
8086
|
flex: 1,
|
|
8067
8087
|
flexDirection: "column"
|
|
8068
8088
|
});
|
|
8069
|
-
var IconWrapper2 =
|
|
8089
|
+
var IconWrapper2 = styled50(View)(({ side }) => {
|
|
8070
8090
|
return {
|
|
8071
8091
|
position: "absolute",
|
|
8072
8092
|
top: 0,
|
|
@@ -8077,7 +8097,7 @@ var IconWrapper2 = styled51(View)(({ side }) => {
|
|
|
8077
8097
|
zIndex: 1
|
|
8078
8098
|
};
|
|
8079
8099
|
});
|
|
8080
|
-
var TextAreaField =
|
|
8100
|
+
var TextAreaField = React65.forwardRef(
|
|
8081
8101
|
(_a, ref) => {
|
|
8082
8102
|
var _b = _a, {
|
|
8083
8103
|
leadingIcon,
|
|
@@ -8253,24 +8273,24 @@ var TextAreaField = React60.forwardRef(
|
|
|
8253
8273
|
);
|
|
8254
8274
|
TextAreaField.displayName = "TextArea.Field";
|
|
8255
8275
|
var parseTokenValue19 = (value) => parseFloat(value);
|
|
8256
|
-
var StyledLabelWrapper =
|
|
8276
|
+
var StyledLabelWrapper = styled50(View)({
|
|
8257
8277
|
flexDirection: "row",
|
|
8258
8278
|
alignItems: "center",
|
|
8259
8279
|
justifyContent: "space-between",
|
|
8260
8280
|
width: "100%"
|
|
8261
8281
|
});
|
|
8262
|
-
var StyledLabel =
|
|
8282
|
+
var StyledLabel = styled50(View)(({ labelGap }) => ({
|
|
8263
8283
|
flexDirection: "row",
|
|
8264
8284
|
alignItems: "center",
|
|
8265
8285
|
gap: labelGap
|
|
8266
8286
|
}));
|
|
8267
|
-
var StyledCharCountWrapper =
|
|
8287
|
+
var StyledCharCountWrapper = styled50(View)(({ charCountGap, charCountPadding }) => ({
|
|
8268
8288
|
flexDirection: "row",
|
|
8269
8289
|
alignItems: "center",
|
|
8270
8290
|
gap: charCountGap,
|
|
8271
8291
|
paddingLeft: charCountPadding
|
|
8272
8292
|
}));
|
|
8273
|
-
var TextAreaLabel =
|
|
8293
|
+
var TextAreaLabel = React65.forwardRef(
|
|
8274
8294
|
(_a, ref) => {
|
|
8275
8295
|
var _b = _a, {
|
|
8276
8296
|
optionalText,
|
|
@@ -8328,13 +8348,13 @@ var TextAreaLabel = React60.forwardRef(
|
|
|
8328
8348
|
);
|
|
8329
8349
|
TextAreaLabel.displayName = "TextArea.Label";
|
|
8330
8350
|
var parseTokenValue20 = (value) => parseFloat(value);
|
|
8331
|
-
var StyledRoot6 =
|
|
8351
|
+
var StyledRoot6 = styled50(View)(({ theme: theme2 }) => {
|
|
8332
8352
|
const { spacing } = theme2.tokens.components.inputs;
|
|
8333
8353
|
return {
|
|
8334
8354
|
gap: parseTokenValue20(spacing.gap)
|
|
8335
8355
|
};
|
|
8336
8356
|
});
|
|
8337
|
-
var TextAreaRoot =
|
|
8357
|
+
var TextAreaRoot = React65.forwardRef(
|
|
8338
8358
|
(_a, ref) => {
|
|
8339
8359
|
var _b = _a, {
|
|
8340
8360
|
label,
|
|
@@ -8361,8 +8381,8 @@ var TextAreaRoot = React60.forwardRef(
|
|
|
8361
8381
|
"defaultValue",
|
|
8362
8382
|
"onChangeText"
|
|
8363
8383
|
]);
|
|
8364
|
-
const [charCount, setCharCount] =
|
|
8365
|
-
|
|
8384
|
+
const [charCount, setCharCount] = React65.useState(0);
|
|
8385
|
+
React65.useEffect(() => {
|
|
8366
8386
|
if (value !== void 0) {
|
|
8367
8387
|
setCharCount(String(value).length);
|
|
8368
8388
|
} else if (defaultValue !== void 0) {
|
|
@@ -8415,7 +8435,7 @@ var TextArea = Object.assign(TextAreaRoot, {
|
|
|
8415
8435
|
Description: InputDescription,
|
|
8416
8436
|
Error: InputError
|
|
8417
8437
|
});
|
|
8418
|
-
var AccordionContext =
|
|
8438
|
+
var AccordionContext = React65.createContext({
|
|
8419
8439
|
openValues: [],
|
|
8420
8440
|
toggle: () => {
|
|
8421
8441
|
},
|
|
@@ -8423,30 +8443,30 @@ var AccordionContext = React60.createContext({
|
|
|
8423
8443
|
size: "small"
|
|
8424
8444
|
});
|
|
8425
8445
|
var parseTokenValue21 = (value) => parseFloat(value);
|
|
8426
|
-
var StyledRoot7 =
|
|
8446
|
+
var StyledRoot7 = styled50(View)(({ rootGap }) => ({
|
|
8427
8447
|
width: "100%",
|
|
8428
8448
|
flexDirection: "column",
|
|
8429
8449
|
gap: rootGap
|
|
8430
8450
|
}));
|
|
8431
|
-
var StyledItem =
|
|
8451
|
+
var StyledItem = styled50(View)({
|
|
8432
8452
|
flexDirection: "column"
|
|
8433
8453
|
});
|
|
8434
|
-
var StyledTrigger =
|
|
8454
|
+
var StyledTrigger = styled50(Pressable)(({ triggerOpacity }) => ({
|
|
8435
8455
|
flexDirection: "row",
|
|
8436
8456
|
alignItems: "center",
|
|
8437
8457
|
justifyContent: "space-between",
|
|
8438
8458
|
width: "100%",
|
|
8439
8459
|
opacity: triggerOpacity
|
|
8440
8460
|
}));
|
|
8441
|
-
var StyledPanel =
|
|
8461
|
+
var StyledPanel = styled50(View)(({ panelGap }) => ({
|
|
8442
8462
|
marginTop: panelGap
|
|
8443
8463
|
}));
|
|
8444
|
-
var StyledDivider =
|
|
8464
|
+
var StyledDivider = styled50(View)(({ dividerColor, dividerMarginTop }) => ({
|
|
8445
8465
|
height: 1,
|
|
8446
8466
|
backgroundColor: dividerColor,
|
|
8447
8467
|
marginTop: dividerMarginTop
|
|
8448
8468
|
}));
|
|
8449
|
-
var AccordionItem =
|
|
8469
|
+
var AccordionItem = React65.forwardRef(
|
|
8450
8470
|
(_a, ref) => {
|
|
8451
8471
|
var _b = _a, { title, children, value, disabled: itemDisabled } = _b, rest = __objRest(_b, ["title", "children", "value", "disabled"]);
|
|
8452
8472
|
const theme2 = useTheme();
|
|
@@ -8456,7 +8476,7 @@ var AccordionItem = React60.forwardRef(
|
|
|
8456
8476
|
toggle,
|
|
8457
8477
|
disabled: rootDisabled,
|
|
8458
8478
|
size
|
|
8459
|
-
} =
|
|
8479
|
+
} = React65.useContext(AccordionContext);
|
|
8460
8480
|
const itemValue = value != null ? value : title;
|
|
8461
8481
|
const isOpen = openValues.includes(itemValue);
|
|
8462
8482
|
const isDisabled = itemDisabled || rootDisabled;
|
|
@@ -8517,7 +8537,7 @@ var AccordionItem = React60.forwardRef(
|
|
|
8517
8537
|
}
|
|
8518
8538
|
);
|
|
8519
8539
|
AccordionItem.displayName = "Accordion.Item";
|
|
8520
|
-
var AccordionRoot =
|
|
8540
|
+
var AccordionRoot = React65.forwardRef(
|
|
8521
8541
|
(_a, ref) => {
|
|
8522
8542
|
var _b = _a, {
|
|
8523
8543
|
children,
|
|
@@ -8539,11 +8559,11 @@ var AccordionRoot = React60.forwardRef(
|
|
|
8539
8559
|
const theme2 = useTheme();
|
|
8540
8560
|
const { accordion } = theme2.tokens.components;
|
|
8541
8561
|
const isControlled = controlledValue !== void 0;
|
|
8542
|
-
const [internalValue, setInternalValue] =
|
|
8562
|
+
const [internalValue, setInternalValue] = React65.useState(
|
|
8543
8563
|
defaultValue != null ? defaultValue : []
|
|
8544
8564
|
);
|
|
8545
8565
|
const openValues = isControlled ? controlledValue : internalValue;
|
|
8546
|
-
const toggle =
|
|
8566
|
+
const toggle = React65.useCallback(
|
|
8547
8567
|
(itemValue) => {
|
|
8548
8568
|
const isOpen = openValues.includes(itemValue);
|
|
8549
8569
|
let next;
|
|
@@ -8561,7 +8581,7 @@ var AccordionRoot = React60.forwardRef(
|
|
|
8561
8581
|
},
|
|
8562
8582
|
[openValues, multiple, isControlled, onValueChange]
|
|
8563
8583
|
);
|
|
8564
|
-
const ctx =
|
|
8584
|
+
const ctx = React65.useMemo(
|
|
8565
8585
|
() => ({ openValues, toggle, disabled, size }),
|
|
8566
8586
|
[openValues, toggle, disabled, size]
|
|
8567
8587
|
);
|
|
@@ -8691,7 +8711,7 @@ function buildDelayedEntering(variant, delayMs) {
|
|
|
8691
8711
|
b.delay(delayMs);
|
|
8692
8712
|
return b;
|
|
8693
8713
|
}
|
|
8694
|
-
var Animated5 =
|
|
8714
|
+
var Animated5 = React65.forwardRef(
|
|
8695
8715
|
(_a, ref) => {
|
|
8696
8716
|
var _b = _a, { variant = "fade", delay, exit = true, children } = _b, props = __objRest(_b, ["variant", "delay", "exit", "children"]);
|
|
8697
8717
|
const delayMs = delay !== void 0 && delay > 0 ? Math.round(delay * 1e3) : 0;
|
|
@@ -8709,7 +8729,7 @@ var Animated5 = React60.forwardRef(
|
|
|
8709
8729
|
}
|
|
8710
8730
|
);
|
|
8711
8731
|
Animated5.displayName = "Animated";
|
|
8712
|
-
var DrawerContext =
|
|
8732
|
+
var DrawerContext = React65.createContext({
|
|
8713
8733
|
isOpen: false,
|
|
8714
8734
|
modalVisible: false,
|
|
8715
8735
|
openDrawer: () => {
|
|
@@ -8719,9 +8739,9 @@ var DrawerContext = React60.createContext({
|
|
|
8719
8739
|
onExitComplete: () => {
|
|
8720
8740
|
}
|
|
8721
8741
|
});
|
|
8722
|
-
var useDrawerContext = () =>
|
|
8742
|
+
var useDrawerContext = () => React65.useContext(DrawerContext);
|
|
8723
8743
|
var FADE_DURATION = 220;
|
|
8724
|
-
var DrawerOverlay =
|
|
8744
|
+
var DrawerOverlay = React65.forwardRef(({ accessible = false }, _ref) => {
|
|
8725
8745
|
const theme2 = useTheme();
|
|
8726
8746
|
const { isOpen, closeDrawer } = useDrawerContext();
|
|
8727
8747
|
const opacity = useRef(new Animated.Value(0)).current;
|
|
@@ -8755,17 +8775,17 @@ var DrawerOverlay = React60.forwardRef(({ accessible = false }, _ref) => {
|
|
|
8755
8775
|
);
|
|
8756
8776
|
});
|
|
8757
8777
|
DrawerOverlay.displayName = "Drawer.Overlay";
|
|
8758
|
-
var DrawerDragContext =
|
|
8759
|
-
var useDrawerDragContext = () =>
|
|
8760
|
-
var DrawerFooterContext =
|
|
8761
|
-
var useDrawerFooterContext = () =>
|
|
8762
|
-
var DrawerHeaderContext =
|
|
8763
|
-
var useDrawerHeaderContext = () =>
|
|
8778
|
+
var DrawerDragContext = React65.createContext(null);
|
|
8779
|
+
var useDrawerDragContext = () => React65.useContext(DrawerDragContext);
|
|
8780
|
+
var DrawerFooterContext = React65.createContext(false);
|
|
8781
|
+
var useDrawerFooterContext = () => React65.useContext(DrawerFooterContext);
|
|
8782
|
+
var DrawerHeaderContext = React65.createContext(null);
|
|
8783
|
+
var useDrawerHeaderContext = () => React65.useContext(DrawerHeaderContext);
|
|
8764
8784
|
var OPEN_DURATION = 320;
|
|
8765
8785
|
var CLOSE_DURATION = 220;
|
|
8766
8786
|
var DISMISS_THRESHOLD = 80;
|
|
8767
8787
|
var parseTokenValue22 = (value) => parseFloat(value);
|
|
8768
|
-
var StyledPanel2 =
|
|
8788
|
+
var StyledPanel2 = styled50(View)(
|
|
8769
8789
|
({
|
|
8770
8790
|
panelBorderRadius,
|
|
8771
8791
|
panelBgColor,
|
|
@@ -8796,7 +8816,7 @@ var StyledPanel2 = styled51(View)(
|
|
|
8796
8816
|
overflow: "hidden"
|
|
8797
8817
|
})
|
|
8798
8818
|
);
|
|
8799
|
-
var DrawerContent =
|
|
8819
|
+
var DrawerContent = React65.forwardRef(
|
|
8800
8820
|
(_a, ref) => {
|
|
8801
8821
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
8802
8822
|
var _a2;
|
|
@@ -8948,11 +8968,11 @@ var DrawerContent = React60.forwardRef(
|
|
|
8948
8968
|
() => ({ panHandlers: panResponder.panHandlers }),
|
|
8949
8969
|
[panResponder.panHandlers]
|
|
8950
8970
|
);
|
|
8951
|
-
const hasFooter =
|
|
8952
|
-
(child) =>
|
|
8971
|
+
const hasFooter = React65.Children.toArray(children).some(
|
|
8972
|
+
(child) => React65.isValidElement(child) && child.type.displayName === "Drawer.Footer"
|
|
8953
8973
|
);
|
|
8954
|
-
const headerChild =
|
|
8955
|
-
(child) =>
|
|
8974
|
+
const headerChild = React65.Children.toArray(children).find(
|
|
8975
|
+
(child) => React65.isValidElement(child) && child.type.displayName === "Drawer.Header"
|
|
8956
8976
|
);
|
|
8957
8977
|
const headerContextValue = headerChild != null ? {
|
|
8958
8978
|
variant: (_a2 = headerChild.props.variant) != null ? _a2 : "titleAndText"
|
|
@@ -9000,7 +9020,7 @@ var styles = StyleSheet.create({
|
|
|
9000
9020
|
}
|
|
9001
9021
|
});
|
|
9002
9022
|
var parseTokenValue23 = (value) => parseFloat(value);
|
|
9003
|
-
var StyledWrapper =
|
|
9023
|
+
var StyledWrapper = styled50(View)(
|
|
9004
9024
|
({ grabberPaddingTop }) => ({
|
|
9005
9025
|
alignItems: "center",
|
|
9006
9026
|
justifyContent: "center",
|
|
@@ -9009,13 +9029,13 @@ var StyledWrapper = styled51(View)(
|
|
|
9009
9029
|
paddingBottom: grabberPaddingTop
|
|
9010
9030
|
})
|
|
9011
9031
|
);
|
|
9012
|
-
var StyledBar =
|
|
9032
|
+
var StyledBar = styled50(View)(({ barWidth, barHeight, barBorderRadius, barColor }) => ({
|
|
9013
9033
|
width: barWidth,
|
|
9014
9034
|
height: barHeight,
|
|
9015
9035
|
borderRadius: barBorderRadius,
|
|
9016
9036
|
backgroundColor: barColor
|
|
9017
9037
|
}));
|
|
9018
|
-
var DrawerGrabber =
|
|
9038
|
+
var DrawerGrabber = React65.forwardRef(
|
|
9019
9039
|
(props, ref) => {
|
|
9020
9040
|
var _a;
|
|
9021
9041
|
const theme2 = useTheme();
|
|
@@ -9043,7 +9063,7 @@ var DrawerGrabber = React60.forwardRef(
|
|
|
9043
9063
|
);
|
|
9044
9064
|
DrawerGrabber.displayName = "Drawer.Grabber";
|
|
9045
9065
|
var parseTokenValue24 = (value) => parseFloat(value);
|
|
9046
|
-
var DrawerClose =
|
|
9066
|
+
var DrawerClose = React65.forwardRef(
|
|
9047
9067
|
(_a, ref) => {
|
|
9048
9068
|
var _b = _a, { "aria-label": ariaLabel = "Close" } = _b, props = __objRest(_b, ["aria-label"]);
|
|
9049
9069
|
const theme2 = useTheme();
|
|
@@ -9090,7 +9110,7 @@ var styles2 = StyleSheet.create({
|
|
|
9090
9110
|
}
|
|
9091
9111
|
});
|
|
9092
9112
|
var parseTokenValue25 = (value) => parseFloat(value);
|
|
9093
|
-
var StyledGrabberWrapper =
|
|
9113
|
+
var StyledGrabberWrapper = styled50(View)(
|
|
9094
9114
|
({ grabberPaddingTop }) => ({
|
|
9095
9115
|
alignItems: "center",
|
|
9096
9116
|
justifyContent: "center",
|
|
@@ -9098,13 +9118,13 @@ var StyledGrabberWrapper = styled51(View)(
|
|
|
9098
9118
|
paddingTop: grabberPaddingTop
|
|
9099
9119
|
})
|
|
9100
9120
|
);
|
|
9101
|
-
var StyledGrabberBar =
|
|
9121
|
+
var StyledGrabberBar = styled50(View)(({ barWidth, barHeight, barBorderRadius, barColor }) => ({
|
|
9102
9122
|
width: barWidth,
|
|
9103
9123
|
height: barHeight,
|
|
9104
9124
|
borderRadius: barBorderRadius,
|
|
9105
9125
|
backgroundColor: barColor
|
|
9106
9126
|
}));
|
|
9107
|
-
var StyledHeader =
|
|
9127
|
+
var StyledHeader = styled50(View)(
|
|
9108
9128
|
({
|
|
9109
9129
|
headerPaddingHorizontal,
|
|
9110
9130
|
headerPaddingBottom,
|
|
@@ -9124,7 +9144,7 @@ var StyledHeader = styled51(View)(
|
|
|
9124
9144
|
borderBottomColor: headerBorderColor
|
|
9125
9145
|
} : {}), headerBgColor ? { backgroundColor: headerBgColor } : {})
|
|
9126
9146
|
);
|
|
9127
|
-
var StyledImageContainer =
|
|
9147
|
+
var StyledImageContainer = styled50(View)(({ imageHeight, imageBorderRadius }) => ({
|
|
9128
9148
|
position: "relative",
|
|
9129
9149
|
width: "100%",
|
|
9130
9150
|
height: imageHeight,
|
|
@@ -9132,20 +9152,20 @@ var StyledImageContainer = styled51(View)(({ imageHeight, imageBorderRadius }) =
|
|
|
9132
9152
|
overflow: "hidden",
|
|
9133
9153
|
flexShrink: 0
|
|
9134
9154
|
}));
|
|
9135
|
-
var StyledImageCloseWrapper =
|
|
9155
|
+
var StyledImageCloseWrapper = styled50(View)(({ closeTop, closeRight }) => ({
|
|
9136
9156
|
position: "absolute",
|
|
9137
9157
|
top: closeTop,
|
|
9138
9158
|
right: closeRight,
|
|
9139
9159
|
zIndex: 1
|
|
9140
9160
|
}));
|
|
9141
|
-
var StyledTitleRow =
|
|
9161
|
+
var StyledTitleRow = styled50(View)(({ rowGap }) => ({
|
|
9142
9162
|
flexDirection: "row",
|
|
9143
9163
|
gap: rowGap,
|
|
9144
9164
|
alignItems: "flex-start",
|
|
9145
9165
|
width: "100%",
|
|
9146
9166
|
flexShrink: 0
|
|
9147
9167
|
}));
|
|
9148
|
-
var StyledTitleContent =
|
|
9168
|
+
var StyledTitleContent = styled50(View)(
|
|
9149
9169
|
({ contentGap }) => ({
|
|
9150
9170
|
flexDirection: "column",
|
|
9151
9171
|
gap: contentGap,
|
|
@@ -9156,8 +9176,8 @@ var StyledTitleContent = styled51(View)(
|
|
|
9156
9176
|
function splitChildren(children) {
|
|
9157
9177
|
let closeChild = null;
|
|
9158
9178
|
const otherChildren = [];
|
|
9159
|
-
|
|
9160
|
-
if (
|
|
9179
|
+
React65.Children.forEach(children, (child) => {
|
|
9180
|
+
if (React65.isValidElement(child) && child.type === DrawerClose) {
|
|
9161
9181
|
closeChild = child;
|
|
9162
9182
|
} else {
|
|
9163
9183
|
otherChildren.push(child);
|
|
@@ -9165,7 +9185,7 @@ function splitChildren(children) {
|
|
|
9165
9185
|
});
|
|
9166
9186
|
return { closeChild, otherChildren };
|
|
9167
9187
|
}
|
|
9168
|
-
var DrawerHeader =
|
|
9188
|
+
var DrawerHeader = React65.forwardRef(
|
|
9169
9189
|
(_a, ref) => {
|
|
9170
9190
|
var _b = _a, { variant = "titleAndText", imageSource, children } = _b, props = __objRest(_b, ["variant", "imageSource", "children"]);
|
|
9171
9191
|
var _a2, _b2, _c, _d, _e, _f;
|
|
@@ -9252,7 +9272,7 @@ var DrawerHeader = React60.forwardRef(
|
|
|
9252
9272
|
}
|
|
9253
9273
|
);
|
|
9254
9274
|
DrawerHeader.displayName = "Drawer.Header";
|
|
9255
|
-
var DrawerTitle =
|
|
9275
|
+
var DrawerTitle = React65.forwardRef(
|
|
9256
9276
|
(_a, ref) => {
|
|
9257
9277
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9258
9278
|
const theme2 = useTheme();
|
|
@@ -9268,7 +9288,7 @@ var DrawerTitle = React60.forwardRef(
|
|
|
9268
9288
|
}
|
|
9269
9289
|
);
|
|
9270
9290
|
DrawerTitle.displayName = "Drawer.Title";
|
|
9271
|
-
var DrawerDescription =
|
|
9291
|
+
var DrawerDescription = React65.forwardRef(
|
|
9272
9292
|
(_a, ref) => {
|
|
9273
9293
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9274
9294
|
const theme2 = useTheme();
|
|
@@ -9285,7 +9305,7 @@ var DrawerDescription = React60.forwardRef(
|
|
|
9285
9305
|
);
|
|
9286
9306
|
DrawerDescription.displayName = "Drawer.Description";
|
|
9287
9307
|
var parseTokenValue26 = (value) => parseFloat(value);
|
|
9288
|
-
var StyledScrollView =
|
|
9308
|
+
var StyledScrollView = styled50(ScrollView)(
|
|
9289
9309
|
({
|
|
9290
9310
|
bodyPaddingHorizontal,
|
|
9291
9311
|
bodyPaddingRight,
|
|
@@ -9301,7 +9321,7 @@ var StyledScrollView = styled51(ScrollView)(
|
|
|
9301
9321
|
paddingBottom: bodyPaddingBottom
|
|
9302
9322
|
})
|
|
9303
9323
|
);
|
|
9304
|
-
var DrawerBody =
|
|
9324
|
+
var DrawerBody = React65.forwardRef(
|
|
9305
9325
|
(_a, ref) => {
|
|
9306
9326
|
var _b = _a, { children, contentContainerStyle } = _b, props = __objRest(_b, ["children", "contentContainerStyle"]);
|
|
9307
9327
|
const theme2 = useTheme();
|
|
@@ -9342,13 +9362,13 @@ var DrawerBody = React60.forwardRef(
|
|
|
9342
9362
|
);
|
|
9343
9363
|
DrawerBody.displayName = "Drawer.Body";
|
|
9344
9364
|
var parseTokenValue27 = (value) => parseFloat(value);
|
|
9345
|
-
var StyledFooter =
|
|
9365
|
+
var StyledFooter = styled50(View)(({ footerPaddingTop, footerPaddingHorizontal, footerPaddingBottom }) => ({
|
|
9346
9366
|
flexShrink: 0,
|
|
9347
9367
|
paddingTop: footerPaddingTop,
|
|
9348
9368
|
paddingHorizontal: footerPaddingHorizontal,
|
|
9349
9369
|
paddingBottom: footerPaddingBottom
|
|
9350
9370
|
}));
|
|
9351
|
-
var DrawerFooter =
|
|
9371
|
+
var DrawerFooter = React65.forwardRef(
|
|
9352
9372
|
(_a, ref) => {
|
|
9353
9373
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9354
9374
|
const theme2 = useTheme();
|
|
@@ -9370,7 +9390,7 @@ var DrawerFooter = React60.forwardRef(
|
|
|
9370
9390
|
}
|
|
9371
9391
|
);
|
|
9372
9392
|
DrawerFooter.displayName = "Drawer.Footer";
|
|
9373
|
-
var DrawerRoot =
|
|
9393
|
+
var DrawerRoot = React65.forwardRef(
|
|
9374
9394
|
(_a, ref) => {
|
|
9375
9395
|
var _b = _a, {
|
|
9376
9396
|
open: controlledOpen,
|
|
@@ -9411,15 +9431,15 @@ var DrawerRoot = React60.forwardRef(
|
|
|
9411
9431
|
}
|
|
9412
9432
|
);
|
|
9413
9433
|
DrawerRoot.displayName = "Drawer";
|
|
9414
|
-
var DrawerTrigger =
|
|
9434
|
+
var DrawerTrigger = React65.forwardRef(
|
|
9415
9435
|
({ children }, ref) => {
|
|
9416
|
-
const { openDrawer } =
|
|
9436
|
+
const { openDrawer } = React65.useContext(DrawerContext);
|
|
9417
9437
|
return /* @__PURE__ */ jsx(Slot, { ref, onPress: openDrawer, children });
|
|
9418
9438
|
}
|
|
9419
9439
|
);
|
|
9420
9440
|
DrawerTrigger.displayName = "Drawer.Trigger";
|
|
9421
9441
|
var DrawerPortal = ({ children }) => {
|
|
9422
|
-
const { modalVisible, closeDrawer } =
|
|
9442
|
+
const { modalVisible, closeDrawer } = React65.useContext(DrawerContext);
|
|
9423
9443
|
if (!modalVisible) return null;
|
|
9424
9444
|
return /* @__PURE__ */ jsx(
|
|
9425
9445
|
Modal,
|
|
@@ -9454,7 +9474,7 @@ var styles3 = StyleSheet.create({
|
|
|
9454
9474
|
}
|
|
9455
9475
|
});
|
|
9456
9476
|
var parseTokenValue28 = (value) => parseFloat(value);
|
|
9457
|
-
var StyledDockRoot =
|
|
9477
|
+
var StyledDockRoot = styled50(View)(
|
|
9458
9478
|
({
|
|
9459
9479
|
dockBgColor,
|
|
9460
9480
|
dockBorderTopWidth,
|
|
@@ -9472,7 +9492,7 @@ var StyledDockRoot = styled51(View)(
|
|
|
9472
9492
|
paddingHorizontal: dockPaddingHorizontal
|
|
9473
9493
|
})
|
|
9474
9494
|
);
|
|
9475
|
-
var StyledStackedInner =
|
|
9495
|
+
var StyledStackedInner = styled50(View)(
|
|
9476
9496
|
({ innerGap }) => ({
|
|
9477
9497
|
alignItems: "center",
|
|
9478
9498
|
gap: innerGap,
|
|
@@ -9480,14 +9500,14 @@ var StyledStackedInner = styled51(View)(
|
|
|
9480
9500
|
maxWidth: 520
|
|
9481
9501
|
})
|
|
9482
9502
|
);
|
|
9483
|
-
var StyledButtonGroup =
|
|
9503
|
+
var StyledButtonGroup = styled50(View)(({ groupDirection, groupAlign, groupJustify, groupGap }) => __spreadValues({
|
|
9484
9504
|
flexDirection: groupDirection,
|
|
9485
9505
|
alignItems: groupAlign,
|
|
9486
9506
|
justifyContent: groupJustify,
|
|
9487
9507
|
gap: groupGap,
|
|
9488
9508
|
width: "100%"
|
|
9489
9509
|
}, groupDirection === "column" ? { maxWidth: 520 } : {}));
|
|
9490
|
-
var ButtonDock =
|
|
9510
|
+
var ButtonDock = React65.forwardRef(
|
|
9491
9511
|
(_a, ref) => {
|
|
9492
9512
|
var _b = _a, { variant = "stacked", leadingContent, description, children } = _b, rest = __objRest(_b, ["variant", "leadingContent", "description", "children"]);
|
|
9493
9513
|
const theme2 = useTheme();
|
|
@@ -9554,20 +9574,20 @@ var ButtonDock = React60.forwardRef(
|
|
|
9554
9574
|
);
|
|
9555
9575
|
ButtonDock.displayName = "ButtonDock";
|
|
9556
9576
|
var parseTokenValue29 = (value) => parseFloat(value);
|
|
9557
|
-
var StyledGroupRoot =
|
|
9577
|
+
var StyledGroupRoot = styled50(View)(({ rootGap }) => ({
|
|
9558
9578
|
gap: rootGap,
|
|
9559
9579
|
alignItems: "center",
|
|
9560
9580
|
width: "100%"
|
|
9561
9581
|
}));
|
|
9562
|
-
var StyledButtonRow =
|
|
9582
|
+
var StyledButtonRow = styled50(View)(({ rowDirection, rowAlign, rowGap }) => __spreadValues({
|
|
9563
9583
|
flexDirection: rowDirection,
|
|
9564
9584
|
width: "100%",
|
|
9565
9585
|
gap: rowGap
|
|
9566
9586
|
}, rowAlign ? { alignItems: rowAlign } : {}));
|
|
9567
|
-
var StyledChildSlot =
|
|
9587
|
+
var StyledChildSlot = styled50(View)(
|
|
9568
9588
|
({ slotInline }) => __spreadValues({}, slotInline ? { flex: 1, minWidth: 0 } : { width: "100%", alignSelf: "stretch" })
|
|
9569
9589
|
);
|
|
9570
|
-
var ButtonGroup =
|
|
9590
|
+
var ButtonGroup = React65.forwardRef(
|
|
9571
9591
|
(_a, ref) => {
|
|
9572
9592
|
var _b = _a, { layout = "stacked", description, children } = _b, rest = __objRest(_b, ["layout", "description", "children"]);
|
|
9573
9593
|
const theme2 = useTheme();
|
|
@@ -9589,9 +9609,9 @@ var ButtonGroup = React60.forwardRef(
|
|
|
9589
9609
|
rowGap: parseTokenValue29(
|
|
9590
9610
|
isInline ? buttonGroup.spacing.sideBySide.gap : buttonGroup.spacing.stacked.gap
|
|
9591
9611
|
),
|
|
9592
|
-
children:
|
|
9593
|
-
if (!
|
|
9594
|
-
return /* @__PURE__ */ jsx(StyledChildSlot, { slotInline: isInline, children:
|
|
9612
|
+
children: React65.Children.map(children, (child, index) => {
|
|
9613
|
+
if (!React65.isValidElement(child)) return child;
|
|
9614
|
+
return /* @__PURE__ */ jsx(StyledChildSlot, { slotInline: isInline, children: React65.cloneElement(
|
|
9595
9615
|
child,
|
|
9596
9616
|
{
|
|
9597
9617
|
fullWidth: true
|
|
@@ -9616,7 +9636,7 @@ var ButtonGroup = React60.forwardRef(
|
|
|
9616
9636
|
);
|
|
9617
9637
|
ButtonGroup.displayName = "ButtonGroup";
|
|
9618
9638
|
var parseTokenValue30 = (value) => parseFloat(value);
|
|
9619
|
-
var StyledRootPressable =
|
|
9639
|
+
var StyledRootPressable = styled50(Pressable)(
|
|
9620
9640
|
({
|
|
9621
9641
|
rootFlexAlign,
|
|
9622
9642
|
rootGap,
|
|
@@ -9635,7 +9655,7 @@ var StyledRootPressable = styled51(Pressable)(
|
|
|
9635
9655
|
opacity: rootOpacity
|
|
9636
9656
|
}, rootPaddingVertical !== void 0 ? { paddingVertical: rootPaddingVertical } : {}), rootPaddingHorizontal !== void 0 ? { paddingHorizontal: rootPaddingHorizontal } : {}), rootMaxWidth !== void 0 ? { maxWidth: rootMaxWidth, width: "100%" } : {}), rootBgColor ? { backgroundColor: rootBgColor } : {}), rootBorderWidth !== void 0 ? { borderWidth: rootBorderWidth, borderColor: rootBorderColor } : {}), rootBorderRadius !== void 0 ? { borderRadius: rootBorderRadius } : {})
|
|
9637
9657
|
);
|
|
9638
|
-
var StyledControl =
|
|
9658
|
+
var StyledControl = styled50(View)(
|
|
9639
9659
|
({
|
|
9640
9660
|
controlSize,
|
|
9641
9661
|
controlBorderWidth,
|
|
@@ -9654,19 +9674,19 @@ var StyledControl = styled51(View)(
|
|
|
9654
9674
|
justifyContent: "center"
|
|
9655
9675
|
})
|
|
9656
9676
|
);
|
|
9657
|
-
var StyledContent2 =
|
|
9677
|
+
var StyledContent2 = styled50(View)(({ contentGap }) => ({
|
|
9658
9678
|
flexDirection: "column",
|
|
9659
9679
|
gap: contentGap,
|
|
9660
9680
|
flex: 1,
|
|
9661
9681
|
minWidth: 0
|
|
9662
9682
|
}));
|
|
9663
|
-
var StyledIllustration =
|
|
9683
|
+
var StyledIllustration = styled50(View)(({ illustrationSize }) => ({
|
|
9664
9684
|
flexShrink: 0,
|
|
9665
9685
|
width: illustrationSize,
|
|
9666
9686
|
height: illustrationSize,
|
|
9667
9687
|
overflow: "hidden"
|
|
9668
9688
|
}));
|
|
9669
|
-
var Checkbox =
|
|
9689
|
+
var Checkbox = React65.forwardRef(
|
|
9670
9690
|
(_a, ref) => {
|
|
9671
9691
|
var _b = _a, {
|
|
9672
9692
|
variant = "standalone",
|
|
@@ -9693,7 +9713,7 @@ var Checkbox = React60.forwardRef(
|
|
|
9693
9713
|
const { checkbox } = theme2.tokens.components;
|
|
9694
9714
|
const { dimensions: dimensions3 } = theme2.tokens.semantics;
|
|
9695
9715
|
const isControlled = controlledChecked !== void 0;
|
|
9696
|
-
const [internalChecked, setInternalChecked] =
|
|
9716
|
+
const [internalChecked, setInternalChecked] = React65.useState(defaultChecked);
|
|
9697
9717
|
const isChecked = isControlled ? controlledChecked : internalChecked;
|
|
9698
9718
|
const handleCheckedChange = (checked) => {
|
|
9699
9719
|
if (!isControlled) {
|
|
@@ -9784,11 +9804,11 @@ var Checkbox = React60.forwardRef(
|
|
|
9784
9804
|
);
|
|
9785
9805
|
Checkbox.displayName = "Checkbox";
|
|
9786
9806
|
var parseTokenValue31 = (value) => parseFloat(value);
|
|
9787
|
-
var StyledGroup =
|
|
9807
|
+
var StyledGroup = styled50(View)(({ groupDirection, groupGap }) => ({
|
|
9788
9808
|
flexDirection: groupDirection,
|
|
9789
9809
|
gap: groupGap
|
|
9790
9810
|
}));
|
|
9791
|
-
var CheckboxGroup =
|
|
9811
|
+
var CheckboxGroup = React65.forwardRef(
|
|
9792
9812
|
(_a, ref) => {
|
|
9793
9813
|
var _b = _a, { orientation = "vertical", children } = _b, rest = __objRest(_b, ["orientation", "children"]);
|
|
9794
9814
|
const theme2 = useTheme();
|
|
@@ -9806,7 +9826,7 @@ var CheckboxGroup = React60.forwardRef(
|
|
|
9806
9826
|
}
|
|
9807
9827
|
);
|
|
9808
9828
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
9809
|
-
var CopyFieldInput =
|
|
9829
|
+
var CopyFieldInput = React65.forwardRef(
|
|
9810
9830
|
(_a, ref) => {
|
|
9811
9831
|
var _b = _a, {
|
|
9812
9832
|
onCopy,
|
|
@@ -9825,19 +9845,19 @@ var CopyFieldInput = React60.forwardRef(
|
|
|
9825
9845
|
"editable",
|
|
9826
9846
|
"defaultValue"
|
|
9827
9847
|
]);
|
|
9828
|
-
const [internalValue, setInternalValue] =
|
|
9848
|
+
const [internalValue, setInternalValue] = React65.useState(
|
|
9829
9849
|
typeof defaultValue === "string" ? defaultValue : ""
|
|
9830
9850
|
);
|
|
9831
|
-
const [copied, setCopied] =
|
|
9832
|
-
const timeoutRef =
|
|
9851
|
+
const [copied, setCopied] = React65.useState(false);
|
|
9852
|
+
const timeoutRef = React65.useRef(
|
|
9833
9853
|
void 0
|
|
9834
9854
|
);
|
|
9835
|
-
|
|
9855
|
+
React65.useEffect(() => {
|
|
9836
9856
|
if (defaultValue !== void 0 && value === void 0) {
|
|
9837
9857
|
setInternalValue(typeof defaultValue === "string" ? defaultValue : "");
|
|
9838
9858
|
}
|
|
9839
9859
|
}, [defaultValue, value]);
|
|
9840
|
-
|
|
9860
|
+
React65.useEffect(() => {
|
|
9841
9861
|
return () => {
|
|
9842
9862
|
if (timeoutRef.current) {
|
|
9843
9863
|
clearTimeout(timeoutRef.current);
|
|
@@ -9898,13 +9918,13 @@ var CopyFieldInput = React60.forwardRef(
|
|
|
9898
9918
|
);
|
|
9899
9919
|
CopyFieldInput.displayName = "CopyField.Field";
|
|
9900
9920
|
var parseTokenValue32 = (value) => parseFloat(value);
|
|
9901
|
-
var StyledRoot8 =
|
|
9921
|
+
var StyledRoot8 = styled50(View)(({ theme: theme2 }) => {
|
|
9902
9922
|
const { spacing } = theme2.tokens.components.inputs;
|
|
9903
9923
|
return {
|
|
9904
9924
|
gap: parseTokenValue32(spacing.gap)
|
|
9905
9925
|
};
|
|
9906
9926
|
});
|
|
9907
|
-
var CopyFieldRoot =
|
|
9927
|
+
var CopyFieldRoot = React65.forwardRef(
|
|
9908
9928
|
(_a, ref) => {
|
|
9909
9929
|
var _b = _a, {
|
|
9910
9930
|
label,
|
|
@@ -9972,20 +9992,20 @@ var useCopyField = (options = {}) => {
|
|
|
9972
9992
|
onCopy: handleCopy
|
|
9973
9993
|
};
|
|
9974
9994
|
};
|
|
9975
|
-
var FilterTabContext =
|
|
9995
|
+
var FilterTabContext = React65.createContext({
|
|
9976
9996
|
size: "sm",
|
|
9977
9997
|
selectedValues: [],
|
|
9978
9998
|
toggle: () => {
|
|
9979
9999
|
}
|
|
9980
10000
|
});
|
|
9981
10001
|
var parseTokenValue33 = (value) => parseFloat(value);
|
|
9982
|
-
var StyledRoot9 =
|
|
10002
|
+
var StyledRoot9 = styled50(View)(({ rootGap }) => ({
|
|
9983
10003
|
flexDirection: "row",
|
|
9984
10004
|
alignItems: "center",
|
|
9985
10005
|
gap: rootGap,
|
|
9986
10006
|
flexWrap: "nowrap"
|
|
9987
10007
|
}));
|
|
9988
|
-
var StyledItem2 =
|
|
10008
|
+
var StyledItem2 = styled50(Pressable)(
|
|
9989
10009
|
({
|
|
9990
10010
|
itemHeight,
|
|
9991
10011
|
itemMinWidth,
|
|
@@ -10011,7 +10031,7 @@ var StyledItem2 = styled51(Pressable)(
|
|
|
10011
10031
|
flexShrink: 0
|
|
10012
10032
|
})
|
|
10013
10033
|
);
|
|
10014
|
-
var FilterTabItem =
|
|
10034
|
+
var FilterTabItem = React65.forwardRef(
|
|
10015
10035
|
(_a, ref) => {
|
|
10016
10036
|
var _b = _a, {
|
|
10017
10037
|
value,
|
|
@@ -10031,7 +10051,7 @@ var FilterTabItem = React60.forwardRef(
|
|
|
10031
10051
|
"accessibilityLabel"
|
|
10032
10052
|
]);
|
|
10033
10053
|
const theme2 = useTheme();
|
|
10034
|
-
const { size, selectedValues, toggle } =
|
|
10054
|
+
const { size, selectedValues, toggle } = React65.useContext(FilterTabContext);
|
|
10035
10055
|
const isSelected = selectedValues.includes(value);
|
|
10036
10056
|
const isIconOnly = !!IconOnlyIcon && !label;
|
|
10037
10057
|
const isActive = isSelected && !disabled;
|
|
@@ -10105,7 +10125,7 @@ var FilterTabItem = React60.forwardRef(
|
|
|
10105
10125
|
}
|
|
10106
10126
|
);
|
|
10107
10127
|
FilterTabItem.displayName = "FilterTab.Item";
|
|
10108
|
-
var FilterTabRoot =
|
|
10128
|
+
var FilterTabRoot = React65.forwardRef(
|
|
10109
10129
|
(_a, ref) => {
|
|
10110
10130
|
var _b = _a, {
|
|
10111
10131
|
size = "sm",
|
|
@@ -10125,9 +10145,9 @@ var FilterTabRoot = React60.forwardRef(
|
|
|
10125
10145
|
const theme2 = useTheme();
|
|
10126
10146
|
const { filterTabs } = theme2.tokens.components;
|
|
10127
10147
|
const isControlled = controlledValue !== void 0;
|
|
10128
|
-
const [internalValue, setInternalValue] =
|
|
10148
|
+
const [internalValue, setInternalValue] = React65.useState(defaultValue);
|
|
10129
10149
|
const selectedValues = isControlled ? controlledValue : internalValue;
|
|
10130
|
-
const toggle =
|
|
10150
|
+
const toggle = React65.useCallback(
|
|
10131
10151
|
(itemValue) => {
|
|
10132
10152
|
let next;
|
|
10133
10153
|
if (multiple) {
|
|
@@ -10140,7 +10160,7 @@ var FilterTabRoot = React60.forwardRef(
|
|
|
10140
10160
|
},
|
|
10141
10161
|
[selectedValues, isControlled, onValueChange, multiple]
|
|
10142
10162
|
);
|
|
10143
|
-
const contextValue =
|
|
10163
|
+
const contextValue = React65.useMemo(
|
|
10144
10164
|
() => ({ size, selectedValues, toggle }),
|
|
10145
10165
|
[size, selectedValues, toggle]
|
|
10146
10166
|
);
|
|
@@ -10160,7 +10180,7 @@ var FilterTab = Object.assign(FilterTabRoot, {
|
|
|
10160
10180
|
Item: FilterTabItem
|
|
10161
10181
|
});
|
|
10162
10182
|
var parseTokenValue34 = (value) => parseFloat(value);
|
|
10163
|
-
var StyledFieldWrapper =
|
|
10183
|
+
var StyledFieldWrapper = styled50(View)(
|
|
10164
10184
|
({
|
|
10165
10185
|
fieldBgColor,
|
|
10166
10186
|
fieldBorderColor,
|
|
@@ -10181,7 +10201,7 @@ var StyledFieldWrapper = styled51(View)(
|
|
|
10181
10201
|
overflow: "hidden"
|
|
10182
10202
|
})
|
|
10183
10203
|
);
|
|
10184
|
-
var StyledTextInput =
|
|
10204
|
+
var StyledTextInput = styled50(TextInput)(({ inputColor, inputFontFamily, inputFontWeight, inputFontSize }) => __spreadProps(__spreadValues({
|
|
10185
10205
|
textAlign: "center",
|
|
10186
10206
|
outlineStyle: "none",
|
|
10187
10207
|
padding: 0,
|
|
@@ -10195,13 +10215,13 @@ var StyledTextInput = styled51(TextInput)(({ inputColor, inputFontFamily, inputF
|
|
|
10195
10215
|
fontSize: inputFontSize,
|
|
10196
10216
|
lineHeight: 0
|
|
10197
10217
|
}));
|
|
10198
|
-
var StyledRow =
|
|
10218
|
+
var StyledRow = styled50(View)(({ rowGap }) => ({
|
|
10199
10219
|
flexDirection: "row",
|
|
10200
10220
|
alignItems: "center",
|
|
10201
10221
|
alignSelf: "center",
|
|
10202
10222
|
gap: rowGap
|
|
10203
10223
|
}));
|
|
10204
|
-
var NumberFieldInput =
|
|
10224
|
+
var NumberFieldInput = React65.forwardRef(
|
|
10205
10225
|
(_a, ref) => {
|
|
10206
10226
|
var _b = _a, {
|
|
10207
10227
|
fieldSize = "lg",
|
|
@@ -10244,9 +10264,9 @@ var NumberFieldInput = React60.forwardRef(
|
|
|
10244
10264
|
const theme2 = useTheme();
|
|
10245
10265
|
const tokens3 = theme2.tokens.components.numberField;
|
|
10246
10266
|
const inputTokens3 = theme2.tokens.components.inputs;
|
|
10247
|
-
const [isFocused, setIsFocused] =
|
|
10248
|
-
const [isEdited, setIsEdited] =
|
|
10249
|
-
const initialValueRef =
|
|
10267
|
+
const [isFocused, setIsFocused] = React65.useState(false);
|
|
10268
|
+
const [isEdited, setIsEdited] = React65.useState(false);
|
|
10269
|
+
const initialValueRef = React65.useRef((_a2 = value != null ? value : defaultValue) != null ? _a2 : "");
|
|
10250
10270
|
const isLarge = fieldSize === "lg";
|
|
10251
10271
|
const sizeTokens = isLarge ? tokens3.spacing.large : tokens3.spacing.small;
|
|
10252
10272
|
const buttonSize = isLarge ? "lg" : "sm";
|
|
@@ -10263,14 +10283,14 @@ var NumberFieldInput = React60.forwardRef(
|
|
|
10263
10283
|
if (isEdited) return tokens3.colour.field.border.edited;
|
|
10264
10284
|
return tokens3.colour.field.border.default;
|
|
10265
10285
|
};
|
|
10266
|
-
const handleFocus =
|
|
10286
|
+
const handleFocus = React65.useCallback(
|
|
10267
10287
|
(e) => {
|
|
10268
10288
|
setIsFocused(true);
|
|
10269
10289
|
onFocus == null ? void 0 : onFocus(e);
|
|
10270
10290
|
},
|
|
10271
10291
|
[onFocus]
|
|
10272
10292
|
);
|
|
10273
|
-
const handleBlur =
|
|
10293
|
+
const handleBlur = React65.useCallback(
|
|
10274
10294
|
(e) => {
|
|
10275
10295
|
setIsFocused(false);
|
|
10276
10296
|
if (value != null && onChangeText) {
|
|
@@ -10289,7 +10309,7 @@ var NumberFieldInput = React60.forwardRef(
|
|
|
10289
10309
|
const numericValue = value != null ? Number(value) : Number(defaultValue != null ? defaultValue : 0);
|
|
10290
10310
|
const isAtMin = min != null && numericValue <= min;
|
|
10291
10311
|
const isAtMax = max != null && numericValue >= max;
|
|
10292
|
-
const handleChangeText =
|
|
10312
|
+
const handleChangeText = React65.useCallback(
|
|
10293
10313
|
(text) => {
|
|
10294
10314
|
setIsEdited(text !== initialValueRef.current);
|
|
10295
10315
|
onChangeText == null ? void 0 : onChangeText(text);
|
|
@@ -10357,14 +10377,14 @@ var NumberFieldInput = React60.forwardRef(
|
|
|
10357
10377
|
);
|
|
10358
10378
|
NumberFieldInput.displayName = "NumberField.Input";
|
|
10359
10379
|
var parseTokenValue35 = (value) => parseFloat(value);
|
|
10360
|
-
var StyledRoot10 =
|
|
10380
|
+
var StyledRoot10 = styled50(View)(({ rootGap }) => ({
|
|
10361
10381
|
alignItems: "center",
|
|
10362
10382
|
gap: rootGap
|
|
10363
10383
|
}));
|
|
10364
|
-
var StyledLabelGroup =
|
|
10384
|
+
var StyledLabelGroup = styled50(View)(({ labelGap }) => ({
|
|
10365
10385
|
gap: labelGap
|
|
10366
10386
|
}));
|
|
10367
|
-
var NumberField =
|
|
10387
|
+
var NumberField = React65.forwardRef(
|
|
10368
10388
|
(_a, ref) => {
|
|
10369
10389
|
var _b = _a, {
|
|
10370
10390
|
label,
|
|
@@ -10468,9 +10488,9 @@ var NumberField = React60.forwardRef(
|
|
|
10468
10488
|
);
|
|
10469
10489
|
NumberField.displayName = "NumberField";
|
|
10470
10490
|
var HIT_SLOP = 12;
|
|
10471
|
-
var PasswordFieldInput =
|
|
10491
|
+
var PasswordFieldInput = React65.forwardRef((_a, ref) => {
|
|
10472
10492
|
var _b = _a, { onValueChange, value, state, editable } = _b, inputFieldProps = __objRest(_b, ["onValueChange", "value", "state", "editable"]);
|
|
10473
|
-
const [showPassword, setShowPassword] =
|
|
10493
|
+
const [showPassword, setShowPassword] = React65.useState(false);
|
|
10474
10494
|
const handleValueChange = (newValue) => {
|
|
10475
10495
|
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
10476
10496
|
};
|
|
@@ -10510,12 +10530,12 @@ var PasswordFieldInput = React60.forwardRef((_a, ref) => {
|
|
|
10510
10530
|
});
|
|
10511
10531
|
PasswordFieldInput.displayName = "PasswordField.Field";
|
|
10512
10532
|
var parseTokenValue36 = (value) => parseFloat(value);
|
|
10513
|
-
var StyledErrorRow2 =
|
|
10533
|
+
var StyledErrorRow2 = styled50(View)(({ gap }) => ({
|
|
10514
10534
|
flexDirection: "row",
|
|
10515
10535
|
alignItems: "center",
|
|
10516
10536
|
gap
|
|
10517
10537
|
}));
|
|
10518
|
-
var PasswordFieldError =
|
|
10538
|
+
var PasswordFieldError = React65.forwardRef((_a, ref) => {
|
|
10519
10539
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
10520
10540
|
const theme2 = useTheme();
|
|
10521
10541
|
const { listItem } = theme2.tokens.components.validationList;
|
|
@@ -10542,19 +10562,19 @@ var PasswordFieldError = React60.forwardRef((_a, ref) => {
|
|
|
10542
10562
|
});
|
|
10543
10563
|
PasswordFieldError.displayName = "PasswordField.Error";
|
|
10544
10564
|
var parseTokenValue37 = (value) => parseFloat(value);
|
|
10545
|
-
var StyledRequirementsList =
|
|
10565
|
+
var StyledRequirementsList = styled50(View)(
|
|
10546
10566
|
({ listGap }) => ({
|
|
10547
10567
|
gap: listGap
|
|
10548
10568
|
})
|
|
10549
10569
|
);
|
|
10550
|
-
var StyledRequirementItem =
|
|
10570
|
+
var StyledRequirementItem = styled50(View)(
|
|
10551
10571
|
({ itemGap }) => ({
|
|
10552
10572
|
flexDirection: "row",
|
|
10553
10573
|
alignItems: "center",
|
|
10554
10574
|
gap: itemGap
|
|
10555
10575
|
})
|
|
10556
10576
|
);
|
|
10557
|
-
var PasswordFieldRequirements =
|
|
10577
|
+
var PasswordFieldRequirements = React65.forwardRef((_a, ref) => {
|
|
10558
10578
|
var _b = _a, { requirements } = _b, rest = __objRest(_b, ["requirements"]);
|
|
10559
10579
|
const theme2 = useTheme();
|
|
10560
10580
|
const { listItem, list } = theme2.tokens.components.validationList;
|
|
@@ -10604,13 +10624,13 @@ var PasswordFieldRequirements = React60.forwardRef((_a, ref) => {
|
|
|
10604
10624
|
});
|
|
10605
10625
|
PasswordFieldRequirements.displayName = "PasswordField.Requirements";
|
|
10606
10626
|
var parseTokenValue38 = (value) => parseFloat(value);
|
|
10607
|
-
var StyledRoot11 =
|
|
10627
|
+
var StyledRoot11 = styled50(View)(({ theme: theme2 }) => {
|
|
10608
10628
|
const { spacing } = theme2.tokens.components.inputs;
|
|
10609
10629
|
return {
|
|
10610
10630
|
gap: parseTokenValue38(spacing.gap)
|
|
10611
10631
|
};
|
|
10612
10632
|
});
|
|
10613
|
-
var PasswordFieldRoot =
|
|
10633
|
+
var PasswordFieldRoot = React65.forwardRef(
|
|
10614
10634
|
(_a, ref) => {
|
|
10615
10635
|
var _b = _a, {
|
|
10616
10636
|
label,
|
|
@@ -10718,19 +10738,19 @@ function usePasswordField({
|
|
|
10718
10738
|
});
|
|
10719
10739
|
}
|
|
10720
10740
|
var parseTokenValue39 = (value) => parseFloat(value);
|
|
10721
|
-
var StyledRoot12 =
|
|
10741
|
+
var StyledRoot12 = styled50(View)(({ rootGap }) => ({
|
|
10722
10742
|
flexDirection: "column",
|
|
10723
10743
|
alignItems: "stretch",
|
|
10724
10744
|
gap: rootGap,
|
|
10725
10745
|
width: "100%"
|
|
10726
10746
|
}));
|
|
10727
|
-
var StyledHeader2 =
|
|
10747
|
+
var StyledHeader2 = styled50(View)({
|
|
10728
10748
|
flexDirection: "row",
|
|
10729
10749
|
alignItems: "center",
|
|
10730
10750
|
justifyContent: "space-between",
|
|
10731
10751
|
width: "100%"
|
|
10732
10752
|
});
|
|
10733
|
-
var StyledTrack =
|
|
10753
|
+
var StyledTrack = styled50(View)(({ trackHeight, trackMinWidth, trackBorderRadius, trackBgColor }) => ({
|
|
10734
10754
|
position: "relative",
|
|
10735
10755
|
width: "100%",
|
|
10736
10756
|
minWidth: trackMinWidth,
|
|
@@ -10739,13 +10759,13 @@ var StyledTrack = styled51(View)(({ trackHeight, trackMinWidth, trackBorderRadiu
|
|
|
10739
10759
|
backgroundColor: trackBgColor,
|
|
10740
10760
|
overflow: "hidden"
|
|
10741
10761
|
}));
|
|
10742
|
-
var StyledIndicator =
|
|
10762
|
+
var StyledIndicator = styled50(View)(({ indicatorBorderRadius, indicatorBgColor }) => ({
|
|
10743
10763
|
height: "100%",
|
|
10744
10764
|
borderRadius: indicatorBorderRadius,
|
|
10745
10765
|
backgroundColor: indicatorBgColor
|
|
10746
10766
|
}));
|
|
10747
10767
|
var clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
10748
|
-
var Progress =
|
|
10768
|
+
var Progress = React65.forwardRef(
|
|
10749
10769
|
(_a, ref) => {
|
|
10750
10770
|
var _b = _a, {
|
|
10751
10771
|
value = 0,
|
|
@@ -10836,7 +10856,7 @@ var Progress = React60.forwardRef(
|
|
|
10836
10856
|
);
|
|
10837
10857
|
Progress.displayName = "Progress";
|
|
10838
10858
|
var parseTokenValue40 = (value) => parseFloat(value);
|
|
10839
|
-
var StyledRadioRoot =
|
|
10859
|
+
var StyledRadioRoot = styled50(Pressable)(
|
|
10840
10860
|
({
|
|
10841
10861
|
radioGap,
|
|
10842
10862
|
radioOpacity,
|
|
@@ -10855,7 +10875,7 @@ var StyledRadioRoot = styled51(Pressable)(
|
|
|
10855
10875
|
opacity: radioOpacity
|
|
10856
10876
|
}, radioPaddingVertical !== void 0 ? { paddingVertical: radioPaddingVertical } : {}), radioPaddingHorizontal !== void 0 ? { paddingHorizontal: radioPaddingHorizontal } : {}), radioMaxWidth !== void 0 ? { maxWidth: radioMaxWidth } : {}), radioBgColor ? { backgroundColor: radioBgColor } : {}), radioBorderWidth !== void 0 ? { borderWidth: radioBorderWidth, borderColor: radioBorderColor } : {}), radioBorderRadius !== void 0 ? { borderRadius: radioBorderRadius } : {})
|
|
10857
10877
|
);
|
|
10858
|
-
var StyledRadioControl =
|
|
10878
|
+
var StyledRadioControl = styled50(View)(({ controlSize, controlBorderWidth, controlBorderColor }) => ({
|
|
10859
10879
|
width: controlSize,
|
|
10860
10880
|
height: controlSize,
|
|
10861
10881
|
minWidth: controlSize,
|
|
@@ -10866,26 +10886,26 @@ var StyledRadioControl = styled51(View)(({ controlSize, controlBorderWidth, cont
|
|
|
10866
10886
|
alignItems: "center",
|
|
10867
10887
|
justifyContent: "center"
|
|
10868
10888
|
}));
|
|
10869
|
-
var StyledIndicator2 =
|
|
10889
|
+
var StyledIndicator2 = styled50(View)(({ indicatorSize, indicatorBgColor }) => ({
|
|
10870
10890
|
width: indicatorSize,
|
|
10871
10891
|
height: indicatorSize,
|
|
10872
10892
|
borderRadius: indicatorSize / 2,
|
|
10873
10893
|
backgroundColor: indicatorBgColor
|
|
10874
10894
|
}));
|
|
10875
|
-
var StyledTextContent =
|
|
10895
|
+
var StyledTextContent = styled50(View)(({ textContentGap }) => ({
|
|
10876
10896
|
flexDirection: "column",
|
|
10877
10897
|
gap: textContentGap
|
|
10878
10898
|
}));
|
|
10879
|
-
var StyledAssetWrapper =
|
|
10899
|
+
var StyledAssetWrapper = styled50(View)({
|
|
10880
10900
|
alignSelf: "center"
|
|
10881
10901
|
});
|
|
10882
|
-
var StyledTagWrapper =
|
|
10902
|
+
var StyledTagWrapper = styled50(View)(
|
|
10883
10903
|
({ tagTopPadding }) => ({
|
|
10884
10904
|
alignItems: "flex-start",
|
|
10885
10905
|
paddingTop: tagTopPadding
|
|
10886
10906
|
})
|
|
10887
10907
|
);
|
|
10888
|
-
var Radio =
|
|
10908
|
+
var Radio = React65.forwardRef(
|
|
10889
10909
|
(_a, ref) => {
|
|
10890
10910
|
var _b = _a, {
|
|
10891
10911
|
variant = "standalone",
|
|
@@ -10990,11 +11010,11 @@ var Radio = React60.forwardRef(
|
|
|
10990
11010
|
);
|
|
10991
11011
|
Radio.displayName = "Radio";
|
|
10992
11012
|
var parseTokenValue41 = (value) => parseFloat(value);
|
|
10993
|
-
var StyledRadioGroup =
|
|
11013
|
+
var StyledRadioGroup = styled50(View)(({ groupDirection, groupGap }) => ({
|
|
10994
11014
|
flexDirection: groupDirection,
|
|
10995
11015
|
gap: groupGap
|
|
10996
11016
|
}));
|
|
10997
|
-
var RadioGroupRoot =
|
|
11017
|
+
var RadioGroupRoot = React65.forwardRef(
|
|
10998
11018
|
(_a, ref) => {
|
|
10999
11019
|
var _b = _a, {
|
|
11000
11020
|
name: _name,
|
|
@@ -11021,11 +11041,11 @@ var RadioGroupRoot = React60.forwardRef(
|
|
|
11021
11041
|
const optionsFirstValue = (_a2 = options == null ? void 0 : options[0]) == null ? void 0 : _a2.value;
|
|
11022
11042
|
const derivedDefaultValue = defaultValue != null ? defaultValue : optionsFirstValue;
|
|
11023
11043
|
const isControlled = value !== void 0;
|
|
11024
|
-
const [internalValue, setInternalValue] =
|
|
11044
|
+
const [internalValue, setInternalValue] = React65.useState(
|
|
11025
11045
|
derivedDefaultValue != null ? derivedDefaultValue : ""
|
|
11026
11046
|
);
|
|
11027
11047
|
const currentValue = isControlled ? value : internalValue;
|
|
11028
|
-
const handleSelect =
|
|
11048
|
+
const handleSelect = React65.useCallback(
|
|
11029
11049
|
(newValue) => {
|
|
11030
11050
|
if (!isControlled) {
|
|
11031
11051
|
setInternalValue(newValue);
|
|
@@ -11046,9 +11066,9 @@ var RadioGroupRoot = React60.forwardRef(
|
|
|
11046
11066
|
option.value
|
|
11047
11067
|
));
|
|
11048
11068
|
}
|
|
11049
|
-
return
|
|
11050
|
-
if (!
|
|
11051
|
-
return
|
|
11069
|
+
return React65.Children.map(children, (child) => {
|
|
11070
|
+
if (!React65.isValidElement(child)) return child;
|
|
11071
|
+
return React65.cloneElement(child, {
|
|
11052
11072
|
selected: currentValue === child.props.value,
|
|
11053
11073
|
onSelect: handleSelect,
|
|
11054
11074
|
disabled: disabled || child.props.disabled
|
|
@@ -11072,11 +11092,11 @@ RadioGroupRoot.displayName = "RadioGroup";
|
|
|
11072
11092
|
var RadioGroup = Object.assign(RadioGroupRoot, {
|
|
11073
11093
|
Radio
|
|
11074
11094
|
});
|
|
11075
|
-
var SearchFieldInput =
|
|
11095
|
+
var SearchFieldInput = React65.forwardRef((_a, ref) => {
|
|
11076
11096
|
var _b = _a, { onClear, onValueChange, value, state } = _b, inputFieldProps = __objRest(_b, ["onClear", "onValueChange", "value", "state"]);
|
|
11077
|
-
const [internalValue, setInternalValue] =
|
|
11078
|
-
const inputRef =
|
|
11079
|
-
|
|
11097
|
+
const [internalValue, setInternalValue] = React65.useState("");
|
|
11098
|
+
const inputRef = React65.useRef(null);
|
|
11099
|
+
React65.useImperativeHandle(ref, () => inputRef.current);
|
|
11080
11100
|
const handleValueChange = (newValue) => {
|
|
11081
11101
|
setInternalValue(newValue);
|
|
11082
11102
|
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
@@ -11116,13 +11136,13 @@ var SearchFieldInput = React60.forwardRef((_a, ref) => {
|
|
|
11116
11136
|
});
|
|
11117
11137
|
SearchFieldInput.displayName = "SearchField.Field";
|
|
11118
11138
|
var parseTokenValue42 = (value) => parseFloat(value);
|
|
11119
|
-
var StyledRoot13 =
|
|
11139
|
+
var StyledRoot13 = styled50(View)(({ theme: theme2 }) => {
|
|
11120
11140
|
const { spacing } = theme2.tokens.components.inputs;
|
|
11121
11141
|
return {
|
|
11122
11142
|
gap: parseTokenValue42(spacing.gap)
|
|
11123
11143
|
};
|
|
11124
11144
|
});
|
|
11125
|
-
var SearchFieldRoot =
|
|
11145
|
+
var SearchFieldRoot = React65.forwardRef(
|
|
11126
11146
|
(_a, ref) => {
|
|
11127
11147
|
var _b = _a, {
|
|
11128
11148
|
label,
|
|
@@ -11193,7 +11213,7 @@ function useSearchField({
|
|
|
11193
11213
|
};
|
|
11194
11214
|
}
|
|
11195
11215
|
var parseTokenValue43 = (value) => parseFloat(value);
|
|
11196
|
-
var StyledSegmentItem =
|
|
11216
|
+
var StyledSegmentItem = styled50(Pressable)(
|
|
11197
11217
|
({
|
|
11198
11218
|
itemHeight,
|
|
11199
11219
|
itemMinWidth,
|
|
@@ -11213,14 +11233,14 @@ var StyledSegmentItem = styled51(Pressable)(
|
|
|
11213
11233
|
opacity: itemOpacity
|
|
11214
11234
|
}, itemFlex !== void 0 ? { flex: itemFlex } : { flexShrink: 0 })
|
|
11215
11235
|
);
|
|
11216
|
-
var StyledIntrinsicClip =
|
|
11236
|
+
var StyledIntrinsicClip = styled50(View)(({ clipBorderRadius, clipBgColor, clipWidth }) => __spreadValues({
|
|
11217
11237
|
overflow: "hidden",
|
|
11218
11238
|
borderRadius: clipBorderRadius,
|
|
11219
11239
|
backgroundColor: clipBgColor,
|
|
11220
11240
|
alignSelf: "flex-start",
|
|
11221
11241
|
maxWidth: "100%"
|
|
11222
11242
|
}, clipWidth !== void 0 ? { width: clipWidth } : {}));
|
|
11223
|
-
var StyledScrollIndicator =
|
|
11243
|
+
var StyledScrollIndicator = styled50(Pressable)(
|
|
11224
11244
|
({
|
|
11225
11245
|
indicatorSide,
|
|
11226
11246
|
indicatorBorderRadius,
|
|
@@ -11252,7 +11272,7 @@ var ScrollIndicatorGradient = ({
|
|
|
11252
11272
|
side,
|
|
11253
11273
|
color
|
|
11254
11274
|
}) => {
|
|
11255
|
-
const uid =
|
|
11275
|
+
const uid = React65.useId();
|
|
11256
11276
|
const gradientId = `sc-scroll-indicator-${side}-${uid}`;
|
|
11257
11277
|
const isTrailing = side === "trailing";
|
|
11258
11278
|
return /* @__PURE__ */ jsx(View, { style: StyleSheet.absoluteFill, pointerEvents: "none", children: /* @__PURE__ */ jsxs(Svg, { width: "100%", height: "100%", preserveAspectRatio: "none", children: [
|
|
@@ -11276,7 +11296,7 @@ var ScrollIndicatorGradient = ({
|
|
|
11276
11296
|
/* @__PURE__ */ jsx(Rect, { width: "100%", height: "100%", fill: `url(#${gradientId})` })
|
|
11277
11297
|
] }) });
|
|
11278
11298
|
};
|
|
11279
|
-
var StyledContainer2 =
|
|
11299
|
+
var StyledContainer2 = styled50(View)(
|
|
11280
11300
|
({
|
|
11281
11301
|
containerGap,
|
|
11282
11302
|
containerPaddingVertical,
|
|
@@ -11335,7 +11355,7 @@ var SegmentedControlItemBase = ({
|
|
|
11335
11355
|
}
|
|
11336
11356
|
);
|
|
11337
11357
|
};
|
|
11338
|
-
var SegmentedControlItem =
|
|
11358
|
+
var SegmentedControlItem = React65.forwardRef(
|
|
11339
11359
|
(_props, _ref) => {
|
|
11340
11360
|
return null;
|
|
11341
11361
|
}
|
|
@@ -11351,10 +11371,10 @@ var IntrinsicTrack = (_a) => {
|
|
|
11351
11371
|
"renderItems",
|
|
11352
11372
|
"forwardedRef"
|
|
11353
11373
|
]);
|
|
11354
|
-
const scrollRef =
|
|
11355
|
-
const [containerWidth, setContainerWidth] =
|
|
11356
|
-
const [contentWidth, setContentWidth] =
|
|
11357
|
-
const [scrollX, setScrollX] =
|
|
11374
|
+
const scrollRef = React65.useRef(null);
|
|
11375
|
+
const [containerWidth, setContainerWidth] = React65.useState(0);
|
|
11376
|
+
const [contentWidth, setContentWidth] = React65.useState(0);
|
|
11377
|
+
const [scrollX, setScrollX] = React65.useState(0);
|
|
11358
11378
|
const epsilon = 2;
|
|
11359
11379
|
const maxScroll = Math.max(0, contentWidth - containerWidth);
|
|
11360
11380
|
const canScrollLeft = scrollX > epsilon;
|
|
@@ -11450,7 +11470,7 @@ var IntrinsicTrack = (_a) => {
|
|
|
11450
11470
|
})
|
|
11451
11471
|
);
|
|
11452
11472
|
};
|
|
11453
|
-
var SegmentedControlRoot =
|
|
11473
|
+
var SegmentedControlRoot = React65.forwardRef(
|
|
11454
11474
|
(_a, ref) => {
|
|
11455
11475
|
var _b = _a, {
|
|
11456
11476
|
options,
|
|
@@ -11474,18 +11494,18 @@ var SegmentedControlRoot = React60.forwardRef(
|
|
|
11474
11494
|
const { spacing, borderRadius, colour } = theme2.tokens.components.segmentedControl;
|
|
11475
11495
|
const { dimensions: dimensions3 } = theme2.tokens.semantics;
|
|
11476
11496
|
const optionsFirstValue = (_a2 = options == null ? void 0 : options[0]) == null ? void 0 : _a2.value;
|
|
11477
|
-
const childrenArray =
|
|
11497
|
+
const childrenArray = React65.Children.toArray(children);
|
|
11478
11498
|
const firstChildValue = childrenArray.map((child) => {
|
|
11479
|
-
if (!
|
|
11499
|
+
if (!React65.isValidElement(child)) return void 0;
|
|
11480
11500
|
return child.props.value;
|
|
11481
11501
|
}).find((v) => typeof v === "string");
|
|
11482
11502
|
const derivedDefaultValue = (_b2 = defaultValue != null ? defaultValue : optionsFirstValue) != null ? _b2 : firstChildValue;
|
|
11483
11503
|
const isControlled = typeof value === "string";
|
|
11484
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
11504
|
+
const [uncontrolledValue, setUncontrolledValue] = React65.useState(
|
|
11485
11505
|
() => derivedDefaultValue != null ? derivedDefaultValue : ""
|
|
11486
11506
|
);
|
|
11487
11507
|
const currentValue = isControlled ? value : uncontrolledValue;
|
|
11488
|
-
const handleSelect =
|
|
11508
|
+
const handleSelect = React65.useCallback(
|
|
11489
11509
|
(newValue) => {
|
|
11490
11510
|
if (!isControlled) {
|
|
11491
11511
|
setUncontrolledValue(newValue);
|
|
@@ -11511,7 +11531,7 @@ var SegmentedControlRoot = React60.forwardRef(
|
|
|
11511
11531
|
));
|
|
11512
11532
|
}
|
|
11513
11533
|
return childrenArray.map((child) => {
|
|
11514
|
-
if (!
|
|
11534
|
+
if (!React65.isValidElement(child)) return child;
|
|
11515
11535
|
const childProps = child.props;
|
|
11516
11536
|
return /* @__PURE__ */ jsx(
|
|
11517
11537
|
SegmentedControlItemBase,
|
|
@@ -11556,7 +11576,7 @@ var SegmentedControl = Object.assign(SegmentedControlRoot, {
|
|
|
11556
11576
|
Item: SegmentedControlItem
|
|
11557
11577
|
});
|
|
11558
11578
|
var parseTokenValue44 = (value) => parseFloat(value);
|
|
11559
|
-
var StyledTriggerWrapper =
|
|
11579
|
+
var StyledTriggerWrapper = styled50(Animated.View)(({
|
|
11560
11580
|
theme: theme2,
|
|
11561
11581
|
state: _state
|
|
11562
11582
|
}) => {
|
|
@@ -11572,19 +11592,33 @@ var StyledTriggerWrapper = styled51(Animated.View)(({
|
|
|
11572
11592
|
borderRadius: parseTokenValue44(borderRadius.field.default)
|
|
11573
11593
|
};
|
|
11574
11594
|
});
|
|
11575
|
-
var StyledIconWrapper2 =
|
|
11595
|
+
var StyledIconWrapper2 = styled50(View)({
|
|
11576
11596
|
flexShrink: 0,
|
|
11577
11597
|
alignItems: "center",
|
|
11578
11598
|
justifyContent: "center"
|
|
11579
11599
|
});
|
|
11580
|
-
var StyledArrowIcon =
|
|
11600
|
+
var StyledArrowIcon = styled50(Animated.View)({
|
|
11581
11601
|
flexShrink: 0,
|
|
11582
11602
|
alignItems: "center",
|
|
11583
11603
|
justifyContent: "center"
|
|
11584
11604
|
});
|
|
11585
|
-
var SelectFieldTrigger =
|
|
11605
|
+
var SelectFieldTrigger = React65.forwardRef(
|
|
11586
11606
|
(_a, ref) => {
|
|
11587
|
-
var _b = _a, {
|
|
11607
|
+
var _b = _a, {
|
|
11608
|
+
state = "default",
|
|
11609
|
+
leadingIcon,
|
|
11610
|
+
children,
|
|
11611
|
+
isOpen = false,
|
|
11612
|
+
isSearching = false,
|
|
11613
|
+
actionIcon
|
|
11614
|
+
} = _b, rest = __objRest(_b, [
|
|
11615
|
+
"state",
|
|
11616
|
+
"leadingIcon",
|
|
11617
|
+
"children",
|
|
11618
|
+
"isOpen",
|
|
11619
|
+
"isSearching",
|
|
11620
|
+
"actionIcon"
|
|
11621
|
+
]);
|
|
11588
11622
|
const theme2 = useTheme();
|
|
11589
11623
|
const { colour, borderWidth, spacing } = theme2.tokens.components.inputs;
|
|
11590
11624
|
const hasState = state === "error" || state === "success";
|
|
@@ -11634,7 +11668,7 @@ var SelectFieldTrigger = React60.forwardRef(
|
|
|
11634
11668
|
outputRange: ["0deg", "180deg"]
|
|
11635
11669
|
});
|
|
11636
11670
|
const stateIcon = state === "error" ? /* @__PURE__ */ jsx(Icon, { icon: Error_default, size: "md", colour: "error" }) : state === "success" ? /* @__PURE__ */ jsx(Icon, { icon: CheckCircle_default, size: "md", colour: "success" }) : null;
|
|
11637
|
-
|
|
11671
|
+
const triggerContent = /* @__PURE__ */ jsxs(
|
|
11638
11672
|
StyledTriggerWrapper,
|
|
11639
11673
|
{
|
|
11640
11674
|
state,
|
|
@@ -11650,7 +11684,7 @@ var SelectFieldTrigger = React60.forwardRef(
|
|
|
11650
11684
|
leadingIcon && /* @__PURE__ */ jsx(StyledIconWrapper2, { children: leadingIcon }),
|
|
11651
11685
|
children,
|
|
11652
11686
|
stateIcon && /* @__PURE__ */ jsx(StyledIconWrapper2, { children: stateIcon }),
|
|
11653
|
-
/* @__PURE__ */ jsx(
|
|
11687
|
+
actionIcon ? /* @__PURE__ */ jsx(StyledIconWrapper2, { children: actionIcon }) : /* @__PURE__ */ jsx(
|
|
11654
11688
|
StyledArrowIcon,
|
|
11655
11689
|
{
|
|
11656
11690
|
style: { transform: [{ rotate: animatedRotation }] },
|
|
@@ -11659,30 +11693,33 @@ var SelectFieldTrigger = React60.forwardRef(
|
|
|
11659
11693
|
)
|
|
11660
11694
|
]
|
|
11661
11695
|
}
|
|
11662
|
-
)
|
|
11696
|
+
);
|
|
11697
|
+
if (isSearching) {
|
|
11698
|
+
return /* @__PURE__ */ jsx(View, { ref, children: triggerContent });
|
|
11699
|
+
}
|
|
11700
|
+
return /* @__PURE__ */ jsx(SelectPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Slot, { ref, children: /* @__PURE__ */ jsx(Pressable, __spreadProps(__spreadValues({}, rest), { children: triggerContent })) }) });
|
|
11663
11701
|
}
|
|
11664
11702
|
);
|
|
11665
11703
|
SelectFieldTrigger.displayName = "SelectField.Trigger";
|
|
11666
|
-
var
|
|
11667
|
-
const { colour } = theme2.tokens.components.inputs;
|
|
11668
|
-
return {
|
|
11669
|
-
flex: 1,
|
|
11670
|
-
minWidth: 0,
|
|
11671
|
-
textAlign: "left",
|
|
11672
|
-
color: colour.field.text.default
|
|
11673
|
-
};
|
|
11674
|
-
});
|
|
11675
|
-
var SelectFieldValue = React60.forwardRef(
|
|
11704
|
+
var SelectFieldValue = React65.forwardRef(
|
|
11676
11705
|
(_a, ref) => {
|
|
11677
11706
|
var _b = _a, { placeholder } = _b, rest = __objRest(_b, ["placeholder"]);
|
|
11678
|
-
|
|
11707
|
+
const theme2 = useTheme();
|
|
11708
|
+
const { colour, field } = theme2.tokens.components.inputs;
|
|
11709
|
+
return /* @__PURE__ */ jsx(View, __spreadProps(__spreadValues({ ref, style: { flex: 1, minWidth: 0 } }, rest), { children: /* @__PURE__ */ jsx(
|
|
11710
|
+
Typography,
|
|
11711
|
+
{
|
|
11712
|
+
token: field.placeholder.default,
|
|
11713
|
+
color: colour.field.text.default,
|
|
11714
|
+
align: "left",
|
|
11715
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive3.Value, { placeholder: placeholder != null ? placeholder : "" })
|
|
11716
|
+
}
|
|
11717
|
+
) }));
|
|
11679
11718
|
}
|
|
11680
11719
|
);
|
|
11681
11720
|
SelectFieldValue.displayName = "SelectField.Value";
|
|
11682
11721
|
var parseTokenValue45 = (value) => parseFloat(value);
|
|
11683
|
-
var
|
|
11684
|
-
var DROPDOWN_OFFSET_Y = -94;
|
|
11685
|
-
var StyledContentShadow = styled51(View)(({ theme: theme2 }) => {
|
|
11722
|
+
var StyledContentShadow = styled50(View)(({ theme: theme2 }) => {
|
|
11686
11723
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
11687
11724
|
const shadow = dropdown.list.dropshadow.default;
|
|
11688
11725
|
return {
|
|
@@ -11694,14 +11731,10 @@ var StyledContentShadow = styled51(View)(({ theme: theme2 }) => {
|
|
|
11694
11731
|
},
|
|
11695
11732
|
shadowOpacity: 1,
|
|
11696
11733
|
shadowRadius: parseTokenValue45(shadow.blur),
|
|
11697
|
-
elevation: 8
|
|
11698
|
-
transform: [
|
|
11699
|
-
{ translateX: DROPDOWN_OFFSET_X },
|
|
11700
|
-
{ translateY: DROPDOWN_OFFSET_Y }
|
|
11701
|
-
]
|
|
11734
|
+
elevation: 8
|
|
11702
11735
|
};
|
|
11703
11736
|
});
|
|
11704
|
-
var StyledContentInner =
|
|
11737
|
+
var StyledContentInner = styled50(View)(({ theme: theme2 }) => {
|
|
11705
11738
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
11706
11739
|
const { colour } = theme2.tokens.components.inputs;
|
|
11707
11740
|
return {
|
|
@@ -11712,25 +11745,36 @@ var StyledContentInner = styled51(View)(({ theme: theme2 }) => {
|
|
|
11712
11745
|
overflow: "hidden"
|
|
11713
11746
|
};
|
|
11714
11747
|
});
|
|
11715
|
-
var SelectFieldContent =
|
|
11748
|
+
var SelectFieldContent = React65.forwardRef((_a, ref) => {
|
|
11716
11749
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
11717
11750
|
const theme2 = useTheme();
|
|
11718
11751
|
const { spacing } = theme2.tokens.components.inputs;
|
|
11719
|
-
return /* @__PURE__ */
|
|
11720
|
-
SelectPrimitive3.
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11752
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive3.Portal, { children: [
|
|
11753
|
+
/* @__PURE__ */ jsx(SelectPrimitive3.Overlay, { style: StyleSheet.absoluteFill }),
|
|
11754
|
+
/* @__PURE__ */ jsx(
|
|
11755
|
+
SelectPrimitive3.Content,
|
|
11756
|
+
{
|
|
11757
|
+
side: "bottom",
|
|
11758
|
+
align: "start",
|
|
11759
|
+
sideOffset: parseTokenValue45(spacing.gap),
|
|
11760
|
+
alignOffset: 0,
|
|
11761
|
+
asChild: true,
|
|
11762
|
+
children: /* @__PURE__ */ jsx(Slot, { ref, children: /* @__PURE__ */ jsx(StyledContentShadow, __spreadProps(__spreadValues({}, rest), { children: /* @__PURE__ */ jsx(StyledContentInner, { children: /* @__PURE__ */ jsx(SelectPrimitive3.Viewport, { children: /* @__PURE__ */ jsx(
|
|
11763
|
+
ScrollView,
|
|
11764
|
+
{
|
|
11765
|
+
showsVerticalScrollIndicator: true,
|
|
11766
|
+
nestedScrollEnabled: true,
|
|
11767
|
+
keyboardShouldPersistTaps: "handled",
|
|
11768
|
+
children
|
|
11769
|
+
}
|
|
11770
|
+
) }) }) })) })
|
|
11771
|
+
}
|
|
11772
|
+
)
|
|
11773
|
+
] });
|
|
11730
11774
|
});
|
|
11731
11775
|
SelectFieldContent.displayName = "SelectField.Content";
|
|
11732
11776
|
var parseTokenValue46 = (value) => parseFloat(value);
|
|
11733
|
-
var StyledItem3 =
|
|
11777
|
+
var StyledItem3 = styled50(Pressable)(({ theme: theme2 }) => {
|
|
11734
11778
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
11735
11779
|
return {
|
|
11736
11780
|
flexDirection: "row",
|
|
@@ -11744,12 +11788,12 @@ var StyledItem3 = styled51(Pressable)(({ theme: theme2 }) => {
|
|
|
11744
11788
|
backgroundColor: dropdown.listItem.colour.background.default
|
|
11745
11789
|
};
|
|
11746
11790
|
});
|
|
11747
|
-
var StyledIconWrapper3 =
|
|
11791
|
+
var StyledIconWrapper3 = styled50(View)({
|
|
11748
11792
|
flexShrink: 0,
|
|
11749
11793
|
alignItems: "center",
|
|
11750
11794
|
justifyContent: "center"
|
|
11751
11795
|
});
|
|
11752
|
-
var StyledContentWrapper =
|
|
11796
|
+
var StyledContentWrapper = styled50(View)(({ theme: theme2 }) => {
|
|
11753
11797
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
11754
11798
|
return {
|
|
11755
11799
|
flexDirection: "row",
|
|
@@ -11759,24 +11803,24 @@ var StyledContentWrapper = styled51(View)(({ theme: theme2 }) => {
|
|
|
11759
11803
|
minWidth: 0
|
|
11760
11804
|
};
|
|
11761
11805
|
});
|
|
11762
|
-
var StyledTextWrapper2 =
|
|
11806
|
+
var StyledTextWrapper2 = styled50(View)({
|
|
11763
11807
|
flex: 1,
|
|
11764
11808
|
minWidth: 0
|
|
11765
11809
|
});
|
|
11766
|
-
var StyledItemText =
|
|
11810
|
+
var StyledItemText = styled50(Text)(({ theme: theme2 }) => {
|
|
11767
11811
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
11768
11812
|
return {
|
|
11769
11813
|
color: dropdown.listItem.colour.text.placeholder.default
|
|
11770
11814
|
};
|
|
11771
11815
|
});
|
|
11772
|
-
var StyledHintText =
|
|
11816
|
+
var StyledHintText = styled50(Text)(({ theme: theme2 }) => {
|
|
11773
11817
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
11774
11818
|
return {
|
|
11775
11819
|
color: dropdown.listItem.colour.text.hint.default,
|
|
11776
11820
|
flexShrink: 0
|
|
11777
11821
|
};
|
|
11778
11822
|
});
|
|
11779
|
-
var SelectFieldItem =
|
|
11823
|
+
var SelectFieldItem = React65.forwardRef(
|
|
11780
11824
|
(_a, ref) => {
|
|
11781
11825
|
var _b = _a, { value, leadingIcon, hintText, children, disabled, isSelected } = _b, rest = __objRest(_b, ["value", "leadingIcon", "hintText", "children", "disabled", "isSelected"]);
|
|
11782
11826
|
const theme2 = useTheme();
|
|
@@ -11812,13 +11856,23 @@ var SelectFieldItem = React60.forwardRef(
|
|
|
11812
11856
|
);
|
|
11813
11857
|
SelectFieldItem.displayName = "SelectField.Item";
|
|
11814
11858
|
var parseTokenValue47 = (value) => parseFloat(value);
|
|
11815
|
-
var
|
|
11859
|
+
var StyledNoResults = styled50(View)(({ theme: theme2 }) => {
|
|
11860
|
+
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
11861
|
+
return {
|
|
11862
|
+
paddingVertical: parseTokenValue47(dropdown.listItem.spacing.verticalPadding),
|
|
11863
|
+
paddingHorizontal: parseTokenValue47(
|
|
11864
|
+
dropdown.listItem.spacing.horiztonalPadding
|
|
11865
|
+
),
|
|
11866
|
+
alignItems: "center"
|
|
11867
|
+
};
|
|
11868
|
+
});
|
|
11869
|
+
var StyledRoot14 = styled50(View)(({ theme: theme2 }) => {
|
|
11816
11870
|
const { spacing } = theme2.tokens.components.inputs;
|
|
11817
11871
|
return {
|
|
11818
11872
|
gap: parseTokenValue47(spacing.gap)
|
|
11819
11873
|
};
|
|
11820
11874
|
});
|
|
11821
|
-
var SelectFieldRoot =
|
|
11875
|
+
var SelectFieldRoot = React65.forwardRef(
|
|
11822
11876
|
(_a, ref) => {
|
|
11823
11877
|
var _b = _a, {
|
|
11824
11878
|
label,
|
|
@@ -11832,7 +11886,10 @@ var SelectFieldRoot = React60.forwardRef(
|
|
|
11832
11886
|
value,
|
|
11833
11887
|
defaultValue,
|
|
11834
11888
|
onValueChange,
|
|
11835
|
-
disabled
|
|
11889
|
+
disabled,
|
|
11890
|
+
searchable = false,
|
|
11891
|
+
searchPlaceholder,
|
|
11892
|
+
noResultsText = "No results found"
|
|
11836
11893
|
} = _b, rest = __objRest(_b, [
|
|
11837
11894
|
"label",
|
|
11838
11895
|
"placeholder",
|
|
@@ -11845,14 +11902,54 @@ var SelectFieldRoot = React60.forwardRef(
|
|
|
11845
11902
|
"value",
|
|
11846
11903
|
"defaultValue",
|
|
11847
11904
|
"onValueChange",
|
|
11848
|
-
"disabled"
|
|
11905
|
+
"disabled",
|
|
11906
|
+
"searchable",
|
|
11907
|
+
"searchPlaceholder",
|
|
11908
|
+
"noResultsText"
|
|
11849
11909
|
]);
|
|
11850
|
-
const [isOpen, setIsOpen] =
|
|
11851
|
-
const [
|
|
11910
|
+
const [isOpen, setIsOpen] = React65.useState(false);
|
|
11911
|
+
const [showContent, setShowContent] = React65.useState(false);
|
|
11912
|
+
const [internalValue, setInternalValue] = React65.useState(
|
|
11852
11913
|
defaultValue != null ? defaultValue : null
|
|
11853
11914
|
);
|
|
11854
|
-
const
|
|
11855
|
-
|
|
11915
|
+
const [searchQuery, setSearchQuery] = React65.useState("");
|
|
11916
|
+
const [clearKey, setClearKey] = React65.useState(0);
|
|
11917
|
+
const searchInputRef = React65.useRef(null);
|
|
11918
|
+
React65.useEffect(() => {
|
|
11919
|
+
if (!isOpen) {
|
|
11920
|
+
setShowContent(false);
|
|
11921
|
+
return;
|
|
11922
|
+
}
|
|
11923
|
+
if (!searchable) {
|
|
11924
|
+
setShowContent(true);
|
|
11925
|
+
return;
|
|
11926
|
+
}
|
|
11927
|
+
const openTimer = setTimeout(() => {
|
|
11928
|
+
var _a2;
|
|
11929
|
+
setShowContent(true);
|
|
11930
|
+
(_a2 = searchInputRef.current) == null ? void 0 : _a2.focus();
|
|
11931
|
+
}, 0);
|
|
11932
|
+
const keyboardSub = Keyboard.addListener("keyboardDidShow", () => {
|
|
11933
|
+
setTimeout(() => {
|
|
11934
|
+
var _a2;
|
|
11935
|
+
return (_a2 = searchInputRef.current) == null ? void 0 : _a2.focus();
|
|
11936
|
+
}, 0);
|
|
11937
|
+
});
|
|
11938
|
+
const hardwareKeyboardTimer = setTimeout(
|
|
11939
|
+
() => {
|
|
11940
|
+
var _a2;
|
|
11941
|
+
return (_a2 = searchInputRef.current) == null ? void 0 : _a2.focus();
|
|
11942
|
+
},
|
|
11943
|
+
100
|
|
11944
|
+
);
|
|
11945
|
+
return () => {
|
|
11946
|
+
clearTimeout(openTimer);
|
|
11947
|
+
clearTimeout(hardwareKeyboardTimer);
|
|
11948
|
+
keyboardSub.remove();
|
|
11949
|
+
};
|
|
11950
|
+
}, [isOpen, searchable]);
|
|
11951
|
+
const isCompound = React65.Children.toArray(children).some(
|
|
11952
|
+
(child) => React65.isValidElement(child) && child.type === SelectFieldContent
|
|
11856
11953
|
);
|
|
11857
11954
|
if (isCompound) {
|
|
11858
11955
|
return /* @__PURE__ */ jsx(StyledRoot14, __spreadProps(__spreadValues({ ref }, rest), { children }));
|
|
@@ -11862,15 +11959,54 @@ var SelectFieldRoot = React60.forwardRef(
|
|
|
11862
11959
|
setInternalValue(valueToSet);
|
|
11863
11960
|
onValueChange == null ? void 0 : onValueChange(valueToSet);
|
|
11864
11961
|
};
|
|
11962
|
+
const handleOpenChange = (open) => {
|
|
11963
|
+
setIsOpen(open);
|
|
11964
|
+
if (!open) setSearchQuery("");
|
|
11965
|
+
};
|
|
11865
11966
|
const currentValue = value !== void 0 ? value : internalValue;
|
|
11967
|
+
const allItems = React65.Children.toArray(children);
|
|
11968
|
+
const filteredItems = searchable ? allItems.filter((child) => {
|
|
11969
|
+
var _a2;
|
|
11970
|
+
if (!searchQuery) return true;
|
|
11971
|
+
if (React65.isValidElement(child) && child.type === SelectFieldItem) {
|
|
11972
|
+
const label2 = String(
|
|
11973
|
+
(_a2 = child.props.children) != null ? _a2 : ""
|
|
11974
|
+
);
|
|
11975
|
+
return label2.toLowerCase().includes(searchQuery.toLowerCase());
|
|
11976
|
+
}
|
|
11977
|
+
return true;
|
|
11978
|
+
}) : allItems;
|
|
11979
|
+
const hasNoResults = searchable && searchQuery.length > 0 && filteredItems.length === 0;
|
|
11980
|
+
const searchActionIcon = (() => {
|
|
11981
|
+
if (!searchable) return void 0;
|
|
11982
|
+
const showClear = isOpen && searchQuery.length > 0 || !isOpen && Boolean(currentValue);
|
|
11983
|
+
if (!showClear) return /* @__PURE__ */ jsx(Icon, { icon: Search_default, size: "md" });
|
|
11984
|
+
return /* @__PURE__ */ jsx(
|
|
11985
|
+
Pressable,
|
|
11986
|
+
{
|
|
11987
|
+
onPress: isOpen ? () => {
|
|
11988
|
+
var _a2;
|
|
11989
|
+
setSearchQuery("");
|
|
11990
|
+
(_a2 = searchInputRef.current) == null ? void 0 : _a2.focus();
|
|
11991
|
+
} : () => {
|
|
11992
|
+
setInternalValue(null);
|
|
11993
|
+
onValueChange == null ? void 0 : onValueChange(null);
|
|
11994
|
+
setClearKey((k) => k + 1);
|
|
11995
|
+
},
|
|
11996
|
+
accessibilityLabel: isOpen ? "Clear search" : "Clear selection",
|
|
11997
|
+
accessibilityRole: "button",
|
|
11998
|
+
hitSlop: 8,
|
|
11999
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: Cancel_default, size: "md" })
|
|
12000
|
+
}
|
|
12001
|
+
);
|
|
12002
|
+
})();
|
|
11866
12003
|
return /* @__PURE__ */ jsxs(
|
|
11867
12004
|
SelectPrimitive3.Root,
|
|
11868
12005
|
{
|
|
11869
|
-
value:
|
|
11870
|
-
defaultValue: defaultValue != null ? defaultValue : void 0,
|
|
12006
|
+
value: currentValue != null ? currentValue : void 0,
|
|
11871
12007
|
onValueChange: handleValueChange,
|
|
11872
12008
|
disabled,
|
|
11873
|
-
onOpenChange:
|
|
12009
|
+
onOpenChange: handleOpenChange,
|
|
11874
12010
|
children: [
|
|
11875
12011
|
/* @__PURE__ */ jsxs(StyledRoot14, __spreadProps(__spreadValues({ ref }, rest), { children: [
|
|
11876
12012
|
label && /* @__PURE__ */ jsx(InputLabel, { optionalText, state, children: label }),
|
|
@@ -11880,27 +12016,44 @@ var SelectFieldRoot = React60.forwardRef(
|
|
|
11880
12016
|
state,
|
|
11881
12017
|
leadingIcon,
|
|
11882
12018
|
isOpen,
|
|
11883
|
-
|
|
12019
|
+
isSearching: searchable && isOpen,
|
|
12020
|
+
actionIcon: searchActionIcon,
|
|
12021
|
+
children: searchable && isOpen ? /* @__PURE__ */ jsx(
|
|
12022
|
+
InputText,
|
|
12023
|
+
{
|
|
12024
|
+
ref: searchInputRef,
|
|
12025
|
+
value: searchQuery,
|
|
12026
|
+
onChangeText: setSearchQuery,
|
|
12027
|
+
placeholder: searchPlaceholder != null ? searchPlaceholder : "Search...",
|
|
12028
|
+
returnKeyType: "search",
|
|
12029
|
+
clearButtonMode: "never",
|
|
12030
|
+
accessibilityLabel: "Search options"
|
|
12031
|
+
}
|
|
12032
|
+
) : /* @__PURE__ */ jsx(SelectFieldValue, { placeholder })
|
|
11884
12033
|
}
|
|
11885
12034
|
),
|
|
11886
12035
|
description && /* @__PURE__ */ jsx(InputDescription, { state, children: description }),
|
|
11887
12036
|
error && state === "error" && /* @__PURE__ */ jsx(InputError, { children: error })
|
|
11888
12037
|
] })),
|
|
11889
|
-
/* @__PURE__ */
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11896
|
-
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
|
|
12038
|
+
showContent && /* @__PURE__ */ jsxs(SelectFieldContent, { children: [
|
|
12039
|
+
filteredItems.map((child) => {
|
|
12040
|
+
if (React65.isValidElement(child) && child.type === SelectFieldItem) {
|
|
12041
|
+
const selectedValue = currentValue && typeof currentValue === "object" && "value" in currentValue ? currentValue.value : currentValue;
|
|
12042
|
+
const childProps = child.props;
|
|
12043
|
+
return React65.cloneElement(
|
|
12044
|
+
child,
|
|
12045
|
+
{
|
|
12046
|
+
isSelected: childProps.value === selectedValue
|
|
12047
|
+
}
|
|
12048
|
+
);
|
|
12049
|
+
}
|
|
12050
|
+
return child;
|
|
12051
|
+
}),
|
|
12052
|
+
hasNoResults && /* @__PURE__ */ jsx(StyledNoResults, { children: /* @__PURE__ */ jsx(Typography, { size: "sm", children: noResultsText }) })
|
|
12053
|
+
] })
|
|
11902
12054
|
]
|
|
11903
|
-
}
|
|
12055
|
+
},
|
|
12056
|
+
clearKey
|
|
11904
12057
|
);
|
|
11905
12058
|
}
|
|
11906
12059
|
);
|
|
@@ -11952,7 +12105,7 @@ var { dimensions } = semantics;
|
|
|
11952
12105
|
var parseSize = (value) => {
|
|
11953
12106
|
return parseInt(value.replace("px", ""), 10);
|
|
11954
12107
|
};
|
|
11955
|
-
var Wrapper =
|
|
12108
|
+
var Wrapper = styled50(View)({
|
|
11956
12109
|
borderWidth: parseSize(inputTokens.borderWidth.field.selected),
|
|
11957
12110
|
borderColor: inputTokens.colour.field.border.selected,
|
|
11958
12111
|
borderRadius: parseSize(inputTokens.borderRadius.field.default),
|
|
@@ -11964,29 +12117,29 @@ var Wrapper = styled51(View)({
|
|
|
11964
12117
|
alignItems: "center",
|
|
11965
12118
|
justifyContent: "space-between"
|
|
11966
12119
|
});
|
|
11967
|
-
var SelectIcon =
|
|
12120
|
+
var SelectIcon = styled50(Animated10.View)({
|
|
11968
12121
|
position: "absolute",
|
|
11969
12122
|
right: 0,
|
|
11970
12123
|
marginRight: 0
|
|
11971
12124
|
});
|
|
11972
|
-
var
|
|
12125
|
+
var InputText2 = styled50(Text)({
|
|
11973
12126
|
color: inputTokens.colour.field.text.default,
|
|
11974
12127
|
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
11975
12128
|
fontWeight: inputTokens.field.placeholder.default.fontWeight,
|
|
11976
12129
|
flex: 1
|
|
11977
12130
|
});
|
|
11978
|
-
var PlaceholderText =
|
|
12131
|
+
var PlaceholderText = styled50(Text)({
|
|
11979
12132
|
color: inputTokens.colour.field.text.placeholder,
|
|
11980
12133
|
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
11981
12134
|
fontWeight: inputTokens.field.placeholder.default.fontWeight,
|
|
11982
12135
|
flex: 1
|
|
11983
12136
|
});
|
|
11984
|
-
var ModalOverlay =
|
|
12137
|
+
var ModalOverlay = styled50(View)({
|
|
11985
12138
|
flex: 1,
|
|
11986
12139
|
backgroundColor: "rgba(0, 0, 0, 0.32)",
|
|
11987
12140
|
justifyContent: "flex-end"
|
|
11988
12141
|
});
|
|
11989
|
-
var AndroidDialog =
|
|
12142
|
+
var AndroidDialog = styled50(View)({
|
|
11990
12143
|
backgroundColor: inputTokens.colour.field.background.default,
|
|
11991
12144
|
borderTopLeftRadius: parseSize(dimensions.borderRadius.lg),
|
|
11992
12145
|
borderTopRightRadius: parseSize(dimensions.borderRadius.lg),
|
|
@@ -11996,14 +12149,14 @@ var AndroidDialog = styled51(View)({
|
|
|
11996
12149
|
paddingBottom: parseSize(dimensions.spacing.xl),
|
|
11997
12150
|
paddingHorizontal: parseSize(dimensions.spacing.md)
|
|
11998
12151
|
});
|
|
11999
|
-
var DialogTitle =
|
|
12152
|
+
var DialogTitle = styled50(Text)({
|
|
12000
12153
|
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
12001
12154
|
fontWeight: inputTokens.text.label.fontWeight,
|
|
12002
12155
|
color: inputTokens.colour.field.text.default,
|
|
12003
12156
|
marginBottom: parseSize(dimensions.spacing.md),
|
|
12004
12157
|
marginLeft: parseSize(dimensions.spacing.xs)
|
|
12005
12158
|
});
|
|
12006
|
-
var AndroidOptionRow =
|
|
12159
|
+
var AndroidOptionRow = styled50(View)({
|
|
12007
12160
|
flexDirection: "row",
|
|
12008
12161
|
alignItems: "center",
|
|
12009
12162
|
paddingVertical: parseSize(dimensions.spacing.md),
|
|
@@ -12011,7 +12164,7 @@ var AndroidOptionRow = styled51(View)({
|
|
|
12011
12164
|
borderBottomWidth: parseSize(dimensions.borderWidth.sm),
|
|
12012
12165
|
borderBottomColor: themeTokens.primitives.colour.brand.brown[2]
|
|
12013
12166
|
});
|
|
12014
|
-
var RadioOuter =
|
|
12167
|
+
var RadioOuter = styled50(View)({
|
|
12015
12168
|
width: parseSize(dimensions.spacing.lg),
|
|
12016
12169
|
height: parseSize(dimensions.spacing.lg),
|
|
12017
12170
|
borderRadius: parseSize(dimensions.spacing.lg) / 2,
|
|
@@ -12021,13 +12174,13 @@ var RadioOuter = styled51(View)({
|
|
|
12021
12174
|
justifyContent: "center",
|
|
12022
12175
|
marginRight: parseSize(dimensions.spacing.sm)
|
|
12023
12176
|
});
|
|
12024
|
-
var RadioInner =
|
|
12177
|
+
var RadioInner = styled50(View)({
|
|
12025
12178
|
width: parseSize(dimensions.spacing.md) / 2,
|
|
12026
12179
|
height: parseSize(dimensions.spacing.md) / 2,
|
|
12027
12180
|
borderRadius: parseSize(dimensions.spacing.md) / 4,
|
|
12028
12181
|
backgroundColor: inputTokens.colour.field.border.selected
|
|
12029
12182
|
});
|
|
12030
|
-
var AndroidOptionText =
|
|
12183
|
+
var AndroidOptionText = styled50(Text)(
|
|
12031
12184
|
({ isSelected }) => ({
|
|
12032
12185
|
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
12033
12186
|
fontWeight: isSelected ? inputTokens.text.label.fontWeight : inputTokens.field.placeholder.default.fontWeight,
|
|
@@ -12054,7 +12207,7 @@ var useIconAnimation = () => {
|
|
|
12054
12207
|
iconAnimationStyles
|
|
12055
12208
|
};
|
|
12056
12209
|
};
|
|
12057
|
-
var NativeSelectPicker =
|
|
12210
|
+
var NativeSelectPicker = React65.forwardRef(
|
|
12058
12211
|
(_a, ref) => {
|
|
12059
12212
|
var _b = _a, {
|
|
12060
12213
|
items,
|
|
@@ -12138,7 +12291,7 @@ var NativeSelectPicker = React60.forwardRef(
|
|
|
12138
12291
|
accessibilityRole: "button",
|
|
12139
12292
|
style: { flexDirection: "row", alignItems: "center" },
|
|
12140
12293
|
children: [
|
|
12141
|
-
/* @__PURE__ */ jsx(
|
|
12294
|
+
/* @__PURE__ */ jsx(InputText2, { numberOfLines: 1, children: displayLabel || /* @__PURE__ */ jsx(PlaceholderText, { children: (placeholder == null ? void 0 : placeholder.label) || "Select" }) }),
|
|
12142
12295
|
!hideIcon && /* @__PURE__ */ jsx(SelectIcon, { style: [iconAnimationStyles], children: /* @__PURE__ */ jsx(
|
|
12143
12296
|
KeyboardArrowDown_default,
|
|
12144
12297
|
{
|
|
@@ -12202,18 +12355,18 @@ var NativeSelectPicker = React60.forwardRef(
|
|
|
12202
12355
|
);
|
|
12203
12356
|
NativeSelectPicker.displayName = "NativeSelectPicker";
|
|
12204
12357
|
var parseTokenValue48 = (value) => parseFloat(value);
|
|
12205
|
-
var StyledLabelRow2 =
|
|
12358
|
+
var StyledLabelRow2 = styled50(View)(({ labelRowGap }) => ({
|
|
12206
12359
|
flexDirection: "row",
|
|
12207
12360
|
alignItems: "center",
|
|
12208
12361
|
gap: labelRowGap
|
|
12209
12362
|
}));
|
|
12210
|
-
var StyledLabelSlot =
|
|
12363
|
+
var StyledLabelSlot = styled50(View)(({ labelSlotGap }) => ({
|
|
12211
12364
|
flexDirection: "row",
|
|
12212
12365
|
alignItems: "center",
|
|
12213
12366
|
gap: labelSlotGap,
|
|
12214
12367
|
flexShrink: 0
|
|
12215
12368
|
}));
|
|
12216
|
-
var Slider =
|
|
12369
|
+
var Slider = React65.forwardRef(
|
|
12217
12370
|
(_a, ref) => {
|
|
12218
12371
|
var _b = _a, {
|
|
12219
12372
|
value: controlledValue,
|
|
@@ -12248,7 +12401,7 @@ var Slider = React60.forwardRef(
|
|
|
12248
12401
|
const { slider, buttons } = theme2.tokens.components;
|
|
12249
12402
|
const { dimensions: dimensions3 } = theme2.tokens.semantics;
|
|
12250
12403
|
const isControlled = controlledValue !== void 0;
|
|
12251
|
-
const [internalValue, setInternalValue] =
|
|
12404
|
+
const [internalValue, setInternalValue] = React65.useState(defaultValue);
|
|
12252
12405
|
const currentValue = isControlled ? controlledValue : internalValue;
|
|
12253
12406
|
const thumbSize = parseTokenValue48(buttons.size.md.height);
|
|
12254
12407
|
const trackHeight = parseTokenValue48(slider.sizing.track.height);
|
|
@@ -12543,7 +12696,7 @@ var ICON_MAP = {
|
|
|
12543
12696
|
info: Info_default
|
|
12544
12697
|
};
|
|
12545
12698
|
var parseTokenValue49 = (value) => parseFloat(value);
|
|
12546
|
-
var StyledInlineRoot =
|
|
12699
|
+
var StyledInlineRoot = styled50(View)(
|
|
12547
12700
|
({ rootPaddingH, rootPaddingV, rootGap, rootBorderRadius, rootBgColor }) => ({
|
|
12548
12701
|
flexDirection: "row",
|
|
12549
12702
|
alignItems: "flex-start",
|
|
@@ -12554,7 +12707,7 @@ var StyledInlineRoot = styled51(View)(
|
|
|
12554
12707
|
backgroundColor: rootBgColor
|
|
12555
12708
|
})
|
|
12556
12709
|
);
|
|
12557
|
-
var StyledToastRoot =
|
|
12710
|
+
var StyledToastRoot = styled50(View)(
|
|
12558
12711
|
({
|
|
12559
12712
|
rootPaddingH,
|
|
12560
12713
|
rootPaddingV,
|
|
@@ -12581,7 +12734,7 @@ var StyledToastRoot = styled51(View)(
|
|
|
12581
12734
|
elevation: 4
|
|
12582
12735
|
})
|
|
12583
12736
|
);
|
|
12584
|
-
var StyledSystemRoot =
|
|
12737
|
+
var StyledSystemRoot = styled50(View)(
|
|
12585
12738
|
({
|
|
12586
12739
|
rootPaddingH,
|
|
12587
12740
|
rootPaddingTop,
|
|
@@ -12601,37 +12754,37 @@ var StyledSystemRoot = styled51(View)(
|
|
|
12601
12754
|
width: "100%"
|
|
12602
12755
|
})
|
|
12603
12756
|
);
|
|
12604
|
-
var StyledContents =
|
|
12757
|
+
var StyledContents = styled50(View)(({ contentsGap }) => ({
|
|
12605
12758
|
flexDirection: "column",
|
|
12606
12759
|
alignItems: "flex-start",
|
|
12607
12760
|
flex: 1,
|
|
12608
12761
|
minWidth: 0,
|
|
12609
12762
|
gap: contentsGap
|
|
12610
12763
|
}));
|
|
12611
|
-
var StyledCopyRow =
|
|
12764
|
+
var StyledCopyRow = styled50(View)(({ copyGap }) => ({
|
|
12612
12765
|
flexDirection: "row",
|
|
12613
12766
|
alignItems: "flex-start",
|
|
12614
12767
|
gap: copyGap,
|
|
12615
12768
|
width: "100%"
|
|
12616
12769
|
}));
|
|
12617
|
-
var StyledInlineCopy =
|
|
12770
|
+
var StyledInlineCopy = styled50(View)(({ copyGap }) => ({
|
|
12618
12771
|
flexDirection: "column",
|
|
12619
12772
|
alignItems: "flex-start",
|
|
12620
12773
|
gap: copyGap,
|
|
12621
12774
|
flex: 1,
|
|
12622
12775
|
minWidth: 0
|
|
12623
12776
|
}));
|
|
12624
|
-
var StyledLinkWrapper =
|
|
12777
|
+
var StyledLinkWrapper = styled50(View)(({ linkPaddingLeft }) => ({
|
|
12625
12778
|
paddingLeft: linkPaddingLeft,
|
|
12626
12779
|
width: "100%"
|
|
12627
12780
|
}));
|
|
12628
|
-
var StyledCloseButton =
|
|
12781
|
+
var StyledCloseButton = styled50(Pressable)({
|
|
12629
12782
|
alignItems: "center",
|
|
12630
12783
|
justifyContent: "center",
|
|
12631
12784
|
flexShrink: 0,
|
|
12632
12785
|
padding: 0
|
|
12633
12786
|
});
|
|
12634
|
-
var Notification =
|
|
12787
|
+
var Notification = React65.forwardRef(
|
|
12635
12788
|
(props, ref) => {
|
|
12636
12789
|
const _a = props, {
|
|
12637
12790
|
variant = "inline",
|
|
@@ -12873,10 +13026,10 @@ var NIB_OFFSET = {
|
|
|
12873
13026
|
middle: 146,
|
|
12874
13027
|
right: 268
|
|
12875
13028
|
};
|
|
12876
|
-
var Container2 =
|
|
13029
|
+
var Container2 = styled50(View)(({ $width }) => ({
|
|
12877
13030
|
width: $width
|
|
12878
13031
|
}));
|
|
12879
|
-
var StyledBody =
|
|
13032
|
+
var StyledBody = styled50(View)(
|
|
12880
13033
|
({
|
|
12881
13034
|
bgColor,
|
|
12882
13035
|
borderColor,
|
|
@@ -12975,7 +13128,7 @@ function NibTriangle({
|
|
|
12975
13128
|
}
|
|
12976
13129
|
);
|
|
12977
13130
|
}
|
|
12978
|
-
var Tooltip =
|
|
13131
|
+
var Tooltip = React65.forwardRef(
|
|
12979
13132
|
(_a, ref) => {
|
|
12980
13133
|
var _b = _a, { text, alignment = "middle", position = "bottom", children } = _b, props = __objRest(_b, ["text", "alignment", "position", "children"]);
|
|
12981
13134
|
const theme2 = useTheme();
|
|
@@ -13063,8 +13216,8 @@ var Tooltip = React60.forwardRef(
|
|
|
13063
13216
|
return bubble;
|
|
13064
13217
|
}
|
|
13065
13218
|
if (Platform.OS === "web") {
|
|
13066
|
-
const child =
|
|
13067
|
-
const trigger = child ?
|
|
13219
|
+
const child = React65.isValidElement(children) ? children : null;
|
|
13220
|
+
const trigger = child ? React65.cloneElement(child, {
|
|
13068
13221
|
onPress: () => {
|
|
13069
13222
|
var _a2, _b2;
|
|
13070
13223
|
(_b2 = (_a2 = child.props).onPress) == null ? void 0 : _b2.call(_a2);
|
|
@@ -13106,7 +13259,7 @@ var Tooltip = React60.forwardRef(
|
|
|
13106
13259
|
);
|
|
13107
13260
|
Tooltip.displayName = "Tooltip";
|
|
13108
13261
|
var parseTokenValue51 = (value) => parseFloat(value);
|
|
13109
|
-
var StyledInsightRoot =
|
|
13262
|
+
var StyledInsightRoot = styled50(View)(
|
|
13110
13263
|
({
|
|
13111
13264
|
rootGap,
|
|
13112
13265
|
rootPaddingH,
|
|
@@ -13133,7 +13286,7 @@ var StyledInsightRoot = styled51(View)(
|
|
|
13133
13286
|
minWidth: rootMinWidth
|
|
13134
13287
|
})
|
|
13135
13288
|
);
|
|
13136
|
-
var StyledInsightContent =
|
|
13289
|
+
var StyledInsightContent = styled50(View)(
|
|
13137
13290
|
({ contentGap }) => ({
|
|
13138
13291
|
flex: 1,
|
|
13139
13292
|
flexDirection: "column",
|
|
@@ -13141,7 +13294,7 @@ var StyledInsightContent = styled51(View)(
|
|
|
13141
13294
|
gap: contentGap
|
|
13142
13295
|
})
|
|
13143
13296
|
);
|
|
13144
|
-
var MessageCardInsight =
|
|
13297
|
+
var MessageCardInsight = React65.forwardRef(
|
|
13145
13298
|
(_a, ref) => {
|
|
13146
13299
|
var _b = _a, { variant = "standalone", icon, illustration, title, children } = _b, rest = __objRest(_b, ["variant", "icon", "illustration", "title", "children"]);
|
|
13147
13300
|
const theme2 = useTheme();
|
|
@@ -13213,7 +13366,7 @@ var MessageCardInsight = React60.forwardRef(
|
|
|
13213
13366
|
}
|
|
13214
13367
|
);
|
|
13215
13368
|
MessageCardInsight.displayName = "MessageCard.Insight";
|
|
13216
|
-
var StyledBannerRoot =
|
|
13369
|
+
var StyledBannerRoot = styled50(View)(({ rootGap, rootPadding, rootBorderRadius, rootBgColor }) => ({
|
|
13217
13370
|
flexDirection: "row",
|
|
13218
13371
|
alignItems: "center",
|
|
13219
13372
|
gap: rootGap,
|
|
@@ -13221,7 +13374,7 @@ var StyledBannerRoot = styled51(View)(({ rootGap, rootPadding, rootBorderRadius,
|
|
|
13221
13374
|
borderRadius: rootBorderRadius,
|
|
13222
13375
|
backgroundColor: rootBgColor
|
|
13223
13376
|
}));
|
|
13224
|
-
var StyledBannerImage =
|
|
13377
|
+
var StyledBannerImage = styled50(View)(({ imageRadius, imageBgColor }) => ({
|
|
13225
13378
|
flexShrink: 0,
|
|
13226
13379
|
width: 108,
|
|
13227
13380
|
height: 108,
|
|
@@ -13229,14 +13382,14 @@ var StyledBannerImage = styled51(View)(({ imageRadius, imageBgColor }) => ({
|
|
|
13229
13382
|
overflow: "hidden",
|
|
13230
13383
|
backgroundColor: imageBgColor
|
|
13231
13384
|
}));
|
|
13232
|
-
var StyledBannerIllustrationSlot =
|
|
13385
|
+
var StyledBannerIllustrationSlot = styled50(View)({
|
|
13233
13386
|
flexShrink: 0,
|
|
13234
13387
|
width: 108,
|
|
13235
13388
|
height: 108,
|
|
13236
13389
|
alignItems: "center",
|
|
13237
13390
|
justifyContent: "center"
|
|
13238
13391
|
});
|
|
13239
|
-
var StyledBannerContents =
|
|
13392
|
+
var StyledBannerContents = styled50(View)(
|
|
13240
13393
|
({ contentsGap }) => ({
|
|
13241
13394
|
flex: 1,
|
|
13242
13395
|
flexDirection: "column",
|
|
@@ -13246,13 +13399,13 @@ var StyledBannerContents = styled51(View)(
|
|
|
13246
13399
|
minWidth: 0
|
|
13247
13400
|
})
|
|
13248
13401
|
);
|
|
13249
|
-
var StyledBannerCopy =
|
|
13402
|
+
var StyledBannerCopy = styled50(View)(({ copyGap }) => ({
|
|
13250
13403
|
flexDirection: "column",
|
|
13251
13404
|
alignItems: "flex-start",
|
|
13252
13405
|
gap: copyGap,
|
|
13253
13406
|
width: "100%"
|
|
13254
13407
|
}));
|
|
13255
|
-
var MessageCardBanner =
|
|
13408
|
+
var MessageCardBanner = React65.forwardRef(
|
|
13256
13409
|
(_a, ref) => {
|
|
13257
13410
|
var _b = _a, {
|
|
13258
13411
|
colourScheme = "primary",
|
|
@@ -13286,7 +13439,7 @@ var MessageCardBanner = React60.forwardRef(
|
|
|
13286
13439
|
accessibilityRole: "summary"
|
|
13287
13440
|
}, rest), {
|
|
13288
13441
|
children: [
|
|
13289
|
-
(media == null ? void 0 : media.type) === "illustration" ? /* @__PURE__ */ jsx(StyledBannerIllustrationSlot, { children:
|
|
13442
|
+
(media == null ? void 0 : media.type) === "illustration" ? /* @__PURE__ */ jsx(StyledBannerIllustrationSlot, { children: React65.createElement(media.illustration, {
|
|
13290
13443
|
width: 108,
|
|
13291
13444
|
height: 108
|
|
13292
13445
|
}) }) : (media == null ? void 0 : media.type) === "image" ? /* @__PURE__ */ jsx(
|
|
@@ -13385,22 +13538,22 @@ function defaultGetDateState(date) {
|
|
|
13385
13538
|
function getDefaultMonthLabel(year, month, locale) {
|
|
13386
13539
|
return format(new Date(year, month, 1), "MMMM yyyy", { locale });
|
|
13387
13540
|
}
|
|
13388
|
-
var StyledContainer3 =
|
|
13541
|
+
var StyledContainer3 = styled50(View)(({ containerGap, containerMaxWidth }) => ({
|
|
13389
13542
|
flexDirection: "column",
|
|
13390
13543
|
gap: containerGap,
|
|
13391
13544
|
maxWidth: containerMaxWidth
|
|
13392
13545
|
}));
|
|
13393
|
-
var StyledMonthHeader =
|
|
13546
|
+
var StyledMonthHeader = styled50(View)(
|
|
13394
13547
|
({ headerGap }) => ({
|
|
13395
13548
|
flexDirection: "row",
|
|
13396
13549
|
alignItems: "center",
|
|
13397
13550
|
gap: headerGap
|
|
13398
13551
|
})
|
|
13399
13552
|
);
|
|
13400
|
-
var StyledWeekRow =
|
|
13553
|
+
var StyledWeekRow = styled50(View)({
|
|
13401
13554
|
flexDirection: "row"
|
|
13402
13555
|
});
|
|
13403
|
-
var StyledWeekCell =
|
|
13556
|
+
var StyledWeekCell = styled50(View)(
|
|
13404
13557
|
({ cellHeight }) => ({
|
|
13405
13558
|
flex: 1,
|
|
13406
13559
|
alignItems: "center",
|
|
@@ -13408,14 +13561,14 @@ var StyledWeekCell = styled51(View)(
|
|
|
13408
13561
|
height: cellHeight
|
|
13409
13562
|
})
|
|
13410
13563
|
);
|
|
13411
|
-
var StyledDatesGrid =
|
|
13564
|
+
var StyledDatesGrid = styled50(View)(({ rowGap }) => ({
|
|
13412
13565
|
flexDirection: "column",
|
|
13413
13566
|
gap: rowGap
|
|
13414
13567
|
}));
|
|
13415
|
-
var StyledDateRow =
|
|
13568
|
+
var StyledDateRow = styled50(View)({
|
|
13416
13569
|
flexDirection: "row"
|
|
13417
13570
|
});
|
|
13418
|
-
var StyledDateCell =
|
|
13571
|
+
var StyledDateCell = styled50(View)(
|
|
13419
13572
|
({ cellHeight }) => ({
|
|
13420
13573
|
flex: 1,
|
|
13421
13574
|
height: cellHeight,
|
|
@@ -13423,7 +13576,7 @@ var StyledDateCell = styled51(View)(
|
|
|
13423
13576
|
justifyContent: "center"
|
|
13424
13577
|
})
|
|
13425
13578
|
);
|
|
13426
|
-
var StyledIndicator3 =
|
|
13579
|
+
var StyledIndicator3 = styled50(View)(
|
|
13427
13580
|
({
|
|
13428
13581
|
indicatorSize,
|
|
13429
13582
|
indicatorBorderRadius,
|
|
@@ -13443,7 +13596,7 @@ var StyledIndicator3 = styled51(View)(
|
|
|
13443
13596
|
justifyContent: "center"
|
|
13444
13597
|
})
|
|
13445
13598
|
);
|
|
13446
|
-
var DatePicker =
|
|
13599
|
+
var DatePicker = React65.forwardRef(
|
|
13447
13600
|
(_a, ref) => {
|
|
13448
13601
|
var _b = _a, {
|
|
13449
13602
|
year,
|
|
@@ -13788,25 +13941,25 @@ var buildPointerPath = (r) => {
|
|
|
13788
13941
|
].join(" ");
|
|
13789
13942
|
};
|
|
13790
13943
|
var parseTokenValue53 = (value) => parseFloat(value);
|
|
13791
|
-
var StyledRoot15 =
|
|
13944
|
+
var StyledRoot15 = styled50(View)(({ rootGap }) => ({
|
|
13792
13945
|
flexDirection: "column",
|
|
13793
13946
|
gap: rootGap,
|
|
13794
13947
|
width: "100%"
|
|
13795
13948
|
}));
|
|
13796
|
-
var StyledRow2 =
|
|
13949
|
+
var StyledRow2 = styled50(View)(({ rowGap }) => ({
|
|
13797
13950
|
flexDirection: "row",
|
|
13798
13951
|
alignItems: "flex-start",
|
|
13799
13952
|
gap: rowGap,
|
|
13800
13953
|
width: "100%"
|
|
13801
13954
|
}));
|
|
13802
|
-
var StyledItemStack =
|
|
13955
|
+
var StyledItemStack = styled50(View)(({ stackGap }) => ({
|
|
13803
13956
|
flexDirection: "column",
|
|
13804
13957
|
alignItems: "center",
|
|
13805
13958
|
gap: stackGap,
|
|
13806
13959
|
flex: 1,
|
|
13807
13960
|
minWidth: 0
|
|
13808
13961
|
}));
|
|
13809
|
-
var StyledPictureButton =
|
|
13962
|
+
var StyledPictureButton = styled50(Pressable)(
|
|
13810
13963
|
({
|
|
13811
13964
|
buttonBorderRadius,
|
|
13812
13965
|
buttonBorderWidth,
|
|
@@ -13833,14 +13986,14 @@ var StyledPictureButton = styled51(Pressable)(
|
|
|
13833
13986
|
overflow: "hidden"
|
|
13834
13987
|
})
|
|
13835
13988
|
);
|
|
13836
|
-
var StyledPointer =
|
|
13989
|
+
var StyledPointer = styled50(Svg)(
|
|
13837
13990
|
({ pointerVisible }) => ({
|
|
13838
13991
|
width: POINTER_WIDTH,
|
|
13839
13992
|
height: POINTER_HEIGHT,
|
|
13840
13993
|
opacity: pointerVisible ? 1 : 0
|
|
13841
13994
|
})
|
|
13842
13995
|
);
|
|
13843
|
-
var PictureSelector =
|
|
13996
|
+
var PictureSelector = React65.forwardRef(
|
|
13844
13997
|
(_a, ref) => {
|
|
13845
13998
|
var _b = _a, {
|
|
13846
13999
|
label,
|
|
@@ -13867,7 +14020,7 @@ var PictureSelector = React60.forwardRef(
|
|
|
13867
14020
|
const { pictureSelector } = theme2.tokens.components;
|
|
13868
14021
|
const { pictureButton } = pictureSelector;
|
|
13869
14022
|
const isControlled = value !== void 0;
|
|
13870
|
-
const [internalValue, setInternalValue] =
|
|
14023
|
+
const [internalValue, setInternalValue] = React65.useState(defaultValue);
|
|
13871
14024
|
const selectedValue = isControlled ? value : internalValue;
|
|
13872
14025
|
const selectedItem = items.find((item) => item.value === selectedValue);
|
|
13873
14026
|
const hasInsight = Boolean(
|
|
@@ -13986,13 +14139,13 @@ var DEFAULT_UNIT_LABELS = {
|
|
|
13986
14139
|
var resolveLabel = (label, value) => typeof label === "string" ? label : value === 1 ? label.singular : label.plural;
|
|
13987
14140
|
var parseTokenValue54 = (value) => parseFloat(value);
|
|
13988
14141
|
var pad = (value) => String(Math.max(0, Math.floor(value))).padStart(2, "0");
|
|
13989
|
-
var StackedRoot =
|
|
14142
|
+
var StackedRoot = styled50(View)(({ rootGap }) => ({
|
|
13990
14143
|
flexDirection: "row",
|
|
13991
14144
|
alignItems: "center",
|
|
13992
14145
|
alignSelf: "flex-start",
|
|
13993
14146
|
gap: rootGap
|
|
13994
14147
|
}));
|
|
13995
|
-
var StackedItem =
|
|
14148
|
+
var StackedItem = styled50(View)(
|
|
13996
14149
|
({
|
|
13997
14150
|
itemGap,
|
|
13998
14151
|
itemVerticalPadding,
|
|
@@ -14010,7 +14163,7 @@ var StackedItem = styled51(View)(
|
|
|
14010
14163
|
borderRadius: itemBorderRadius
|
|
14011
14164
|
})
|
|
14012
14165
|
);
|
|
14013
|
-
var StackedCountBox =
|
|
14166
|
+
var StackedCountBox = styled50(View)(({ countPaddingTop, countBgColor, countBorderRadius }) => ({
|
|
14014
14167
|
alignItems: "center",
|
|
14015
14168
|
justifyContent: "center",
|
|
14016
14169
|
// TODO: Add token — fixed count box dimensions are not yet tokenised.
|
|
@@ -14020,7 +14173,7 @@ var StackedCountBox = styled51(View)(({ countPaddingTop, countBgColor, countBord
|
|
|
14020
14173
|
backgroundColor: countBgColor,
|
|
14021
14174
|
borderRadius: countBorderRadius
|
|
14022
14175
|
}));
|
|
14023
|
-
var InlineRoot =
|
|
14176
|
+
var InlineRoot = styled50(View)(
|
|
14024
14177
|
({
|
|
14025
14178
|
rootGap,
|
|
14026
14179
|
rootVerticalPadding,
|
|
@@ -14040,18 +14193,18 @@ var InlineRoot = styled51(View)(
|
|
|
14040
14193
|
overflow: "hidden"
|
|
14041
14194
|
})
|
|
14042
14195
|
);
|
|
14043
|
-
var InlineGroup =
|
|
14196
|
+
var InlineGroup = styled50(View)(({ groupGap }) => ({
|
|
14044
14197
|
flexDirection: "row",
|
|
14045
14198
|
alignItems: "center",
|
|
14046
14199
|
justifyContent: "flex-end",
|
|
14047
14200
|
gap: groupGap
|
|
14048
14201
|
}));
|
|
14049
|
-
var InlineCount =
|
|
14202
|
+
var InlineCount = styled50(View)(({ countGap }) => ({
|
|
14050
14203
|
flexDirection: "row",
|
|
14051
14204
|
alignItems: "center",
|
|
14052
14205
|
gap: countGap
|
|
14053
14206
|
}));
|
|
14054
|
-
var Countdown =
|
|
14207
|
+
var Countdown = React65.forwardRef(
|
|
14055
14208
|
(_a, ref) => {
|
|
14056
14209
|
var _b = _a, {
|
|
14057
14210
|
layout = "stacked",
|
|
@@ -14130,7 +14283,7 @@ var Countdown = React60.forwardRef(
|
|
|
14130
14283
|
InlineGroup,
|
|
14131
14284
|
{
|
|
14132
14285
|
groupGap: parseTokenValue54(countdown.countdownGroup.spacing.gap),
|
|
14133
|
-
children: units.map((unit, index) => /* @__PURE__ */ jsxs(
|
|
14286
|
+
children: units.map((unit, index) => /* @__PURE__ */ jsxs(React65.Fragment, { children: [
|
|
14134
14287
|
index > 0 && colon(`colon-${unit.key}`),
|
|
14135
14288
|
/* @__PURE__ */ jsxs(
|
|
14136
14289
|
InlineCount,
|
|
@@ -14173,7 +14326,7 @@ var Countdown = React60.forwardRef(
|
|
|
14173
14326
|
ref,
|
|
14174
14327
|
rootGap: parseTokenValue54(countdown.spacing.gap)
|
|
14175
14328
|
}, rest), {
|
|
14176
|
-
children: units.map((unit, index) => /* @__PURE__ */ jsxs(
|
|
14329
|
+
children: units.map((unit, index) => /* @__PURE__ */ jsxs(React65.Fragment, { children: [
|
|
14177
14330
|
index > 0 && colon(`colon-${unit.key}`),
|
|
14178
14331
|
/* @__PURE__ */ jsxs(
|
|
14179
14332
|
StackedItem,
|
|
@@ -14231,7 +14384,7 @@ var parseTokenValue55 = (value) => {
|
|
|
14231
14384
|
if (typeof value === "number") return value;
|
|
14232
14385
|
return parseFloat(value);
|
|
14233
14386
|
};
|
|
14234
|
-
var BadgeContainer =
|
|
14387
|
+
var BadgeContainer = styled50(View)(({ theme: theme2 }) => {
|
|
14235
14388
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14236
14389
|
const { sizing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
14237
14390
|
const { colour } = theme2.tokens.semantics;
|
|
@@ -14242,13 +14395,13 @@ var BadgeContainer = styled51(View)(({ theme: theme2 }) => {
|
|
|
14242
14395
|
alignItems: "center",
|
|
14243
14396
|
justifyContent: "center",
|
|
14244
14397
|
height: parseTokenValue55(sizing["2xl"]),
|
|
14245
|
-
paddingRight: parseTokenValue55(spacing.
|
|
14246
|
-
backgroundColor: colour.background.container.
|
|
14398
|
+
paddingRight: parseTokenValue55(spacing.xs),
|
|
14399
|
+
backgroundColor: colour.background.container.brand,
|
|
14247
14400
|
borderTopRightRadius: parseTokenValue55(borderRadius.xs),
|
|
14248
14401
|
borderBottomRightRadius: parseTokenValue55(borderRadius.xs)
|
|
14249
14402
|
};
|
|
14250
14403
|
});
|
|
14251
|
-
var BadgeIcon =
|
|
14404
|
+
var BadgeIcon = styled50(View)(({ theme: theme2 }) => {
|
|
14252
14405
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14253
14406
|
const sizing = theme2.tokens.semantics.dimensions.sizing;
|
|
14254
14407
|
return {
|
|
@@ -14261,7 +14414,7 @@ var BadgeIcon = styled51(View)(({ theme: theme2 }) => {
|
|
|
14261
14414
|
flexShrink: 0
|
|
14262
14415
|
};
|
|
14263
14416
|
});
|
|
14264
|
-
var Badge2 =
|
|
14417
|
+
var Badge2 = React65.forwardRef(
|
|
14265
14418
|
(_a, ref) => {
|
|
14266
14419
|
var _b = _a, { icon, text } = _b, rest = __objRest(_b, ["icon", "text"]);
|
|
14267
14420
|
return /* @__PURE__ */ jsxs(BadgeContainer, __spreadProps(__spreadValues({ ref }, rest), { children: [
|
|
@@ -14271,7 +14424,7 @@ var Badge2 = React60.forwardRef(
|
|
|
14271
14424
|
}
|
|
14272
14425
|
);
|
|
14273
14426
|
Badge2.displayName = "ProductListingCard.Badge";
|
|
14274
|
-
var StyledGrid =
|
|
14427
|
+
var StyledGrid = styled50(View)(({ theme: theme2 }) => {
|
|
14275
14428
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14276
14429
|
return {
|
|
14277
14430
|
display: "grid",
|
|
@@ -14279,7 +14432,7 @@ var StyledGrid = styled51(View)(({ theme: theme2 }) => {
|
|
|
14279
14432
|
"grid-row-gap": spacing.xl
|
|
14280
14433
|
};
|
|
14281
14434
|
});
|
|
14282
|
-
var Grid =
|
|
14435
|
+
var Grid = React65.forwardRef(
|
|
14283
14436
|
(_a, ref) => {
|
|
14284
14437
|
var _b = _a, { children, xs = 1, md = 2, lg = 3 } = _b, rest = __objRest(_b, ["children", "xs", "md", "lg"]);
|
|
14285
14438
|
const { width } = useWindowDimensions();
|
|
@@ -14310,7 +14463,7 @@ var parseTokenValue56 = (value) => {
|
|
|
14310
14463
|
if (typeof value === "number") return value;
|
|
14311
14464
|
return parseFloat(value);
|
|
14312
14465
|
};
|
|
14313
|
-
var StyledRoot16 =
|
|
14466
|
+
var StyledRoot16 = styled50(Pressable)(({ theme: theme2 }) => {
|
|
14314
14467
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14315
14468
|
return {
|
|
14316
14469
|
display: "flex",
|
|
@@ -14320,38 +14473,26 @@ var StyledRoot16 = styled51(Pressable)(({ theme: theme2 }) => {
|
|
|
14320
14473
|
width: "100%"
|
|
14321
14474
|
};
|
|
14322
14475
|
});
|
|
14323
|
-
var ImageContainer =
|
|
14476
|
+
var ImageContainer = styled50(View)(({ theme: theme2 }) => ({
|
|
14324
14477
|
position: "relative",
|
|
14325
14478
|
width: "100%",
|
|
14326
14479
|
aspectRatio: 1,
|
|
14327
|
-
overflow: "hidden"
|
|
14328
|
-
|
|
14329
|
-
|
|
14480
|
+
overflow: "hidden",
|
|
14481
|
+
borderRadius: parseTokenValue56(
|
|
14482
|
+
theme2.tokens.semantics.dimensions.borderRadius.md
|
|
14483
|
+
)
|
|
14484
|
+
}));
|
|
14485
|
+
var StyledImage2 = styled50(Image)({
|
|
14330
14486
|
width: "100%",
|
|
14331
14487
|
height: "100%",
|
|
14332
14488
|
resizeMode: "cover"
|
|
14333
14489
|
});
|
|
14334
|
-
var BadgeContainer2 =
|
|
14335
|
-
|
|
14336
|
-
|
|
14337
|
-
|
|
14338
|
-
|
|
14339
|
-
|
|
14340
|
-
top: parseTokenValue56(spacing.md),
|
|
14341
|
-
left: 0,
|
|
14342
|
-
display: "flex",
|
|
14343
|
-
flexDirection: "row",
|
|
14344
|
-
gap: parseTokenValue56(spacing["2xs"]),
|
|
14345
|
-
alignItems: "center",
|
|
14346
|
-
justifyContent: "center",
|
|
14347
|
-
height: parseTokenValue56(sizing["2xl"]),
|
|
14348
|
-
paddingRight: parseTokenValue56(spacing.sm),
|
|
14349
|
-
backgroundColor: colour.background.container.alt,
|
|
14350
|
-
borderTopRightRadius: parseTokenValue56(borderRadius.sm),
|
|
14351
|
-
borderBottomRightRadius: parseTokenValue56(borderRadius.sm)
|
|
14352
|
-
};
|
|
14353
|
-
});
|
|
14354
|
-
var ContentContainer = styled51(View)(({ theme: theme2 }) => {
|
|
14490
|
+
var BadgeContainer2 = styled50(View)(({ theme: theme2 }) => ({
|
|
14491
|
+
position: "absolute",
|
|
14492
|
+
top: parseTokenValue56(theme2.tokens.semantics.dimensions.spacing.md),
|
|
14493
|
+
left: 0
|
|
14494
|
+
}));
|
|
14495
|
+
var ContentContainer = styled50(View)(({ theme: theme2 }) => {
|
|
14355
14496
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14356
14497
|
return {
|
|
14357
14498
|
display: "flex",
|
|
@@ -14361,34 +14502,26 @@ var ContentContainer = styled51(View)(({ theme: theme2 }) => {
|
|
|
14361
14502
|
width: "100%"
|
|
14362
14503
|
};
|
|
14363
14504
|
});
|
|
14364
|
-
var DetailsContainer =
|
|
14505
|
+
var DetailsContainer = styled50(View)({
|
|
14365
14506
|
display: "flex",
|
|
14366
14507
|
flexDirection: "column",
|
|
14367
14508
|
alignItems: "flex-start",
|
|
14368
14509
|
width: "100%"
|
|
14369
14510
|
});
|
|
14370
|
-
var CategoryWrapper =
|
|
14511
|
+
var CategoryWrapper = styled50(View)(({ theme: theme2 }) => {
|
|
14371
14512
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14372
14513
|
return {
|
|
14373
14514
|
marginBottom: parseTokenValue56(spacing["3xs"])
|
|
14374
14515
|
};
|
|
14375
14516
|
});
|
|
14376
|
-
var TitleContainer =
|
|
14377
|
-
|
|
14378
|
-
|
|
14379
|
-
|
|
14380
|
-
|
|
14381
|
-
|
|
14382
|
-
marginBottom: parseTokenValue56(spacing.xs)
|
|
14383
|
-
};
|
|
14384
|
-
});
|
|
14385
|
-
var SizeWrapper = styled51(View)(({ theme: theme2 }) => {
|
|
14386
|
-
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14387
|
-
return {
|
|
14388
|
-
marginBottom: parseTokenValue56(spacing.md)
|
|
14389
|
-
};
|
|
14517
|
+
var TitleContainer = styled50(View)({
|
|
14518
|
+
display: "flex",
|
|
14519
|
+
flexDirection: "row",
|
|
14520
|
+
width: "100%",
|
|
14521
|
+
// 6px below the title to match Figma (4px title bottom padding + 2px gap).
|
|
14522
|
+
marginBottom: 6
|
|
14390
14523
|
});
|
|
14391
|
-
var PricingContainer =
|
|
14524
|
+
var PricingContainer = styled50(View)(({ theme: theme2 }) => {
|
|
14392
14525
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14393
14526
|
return {
|
|
14394
14527
|
display: "flex",
|
|
@@ -14398,7 +14531,7 @@ var PricingContainer = styled51(View)(({ theme: theme2 }) => {
|
|
|
14398
14531
|
width: "100%"
|
|
14399
14532
|
};
|
|
14400
14533
|
});
|
|
14401
|
-
var _ProductListingCard =
|
|
14534
|
+
var _ProductListingCard = React65.forwardRef(
|
|
14402
14535
|
(_a, ref) => {
|
|
14403
14536
|
var _b = _a, {
|
|
14404
14537
|
image,
|
|
@@ -14433,7 +14566,14 @@ var _ProductListingCard = React60.forwardRef(
|
|
|
14433
14566
|
]);
|
|
14434
14567
|
return /* @__PURE__ */ jsxs(StyledRoot16, __spreadProps(__spreadValues({ ref, onPress }, rest), { children: [
|
|
14435
14568
|
/* @__PURE__ */ jsxs(ImageContainer, { children: [
|
|
14436
|
-
image && /* @__PURE__ */ jsx(View, { style: { flex: 1, width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx(
|
|
14569
|
+
image && /* @__PURE__ */ jsx(View, { style: { flex: 1, width: "100%", height: "100%" }, children: typeof image === "string" ? /* @__PURE__ */ jsx(
|
|
14570
|
+
StyledImage2,
|
|
14571
|
+
{
|
|
14572
|
+
source: { uri: image },
|
|
14573
|
+
accessibilityLabel: imageAlt,
|
|
14574
|
+
accessible: true
|
|
14575
|
+
}
|
|
14576
|
+
) : React65.isValidElement(image) ? image : /* @__PURE__ */ jsx(
|
|
14437
14577
|
StyledImage2,
|
|
14438
14578
|
{
|
|
14439
14579
|
source: image,
|
|
@@ -14447,7 +14587,7 @@ var _ProductListingCard = React60.forwardRef(
|
|
|
14447
14587
|
/* @__PURE__ */ jsxs(DetailsContainer, { children: [
|
|
14448
14588
|
showCategory && category && /* @__PURE__ */ jsx(CategoryWrapper, { children: /* @__PURE__ */ jsx(Typography, { variant: "body", size: "sm", color: "secondary", children: category }) }),
|
|
14449
14589
|
showTitle && /* @__PURE__ */ jsx(TitleContainer, { children: /* @__PURE__ */ jsx(Typography, { variant: "heading", size: "xs", children: title }) }),
|
|
14450
|
-
showSize && size && /* @__PURE__ */ jsx(
|
|
14590
|
+
showSize && size && /* @__PURE__ */ jsx(Typography, { variant: "body", size: "md", color: "secondary", children: size })
|
|
14451
14591
|
] }),
|
|
14452
14592
|
showPrice && price && /* @__PURE__ */ jsxs(PricingContainer, { children: [
|
|
14453
14593
|
/* @__PURE__ */ jsx(Typography, { variant: "body", size: "md", color: "secondary", children: price }),
|
|
@@ -14471,107 +14611,100 @@ var ProductListingCardWithBadgeAndGrid = Object.assign(_ProductListingCard, {
|
|
|
14471
14611
|
Badge: Badge2,
|
|
14472
14612
|
Grid
|
|
14473
14613
|
});
|
|
14474
|
-
var StyledCardContainer =
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
}) => {
|
|
14614
|
+
var StyledCardContainer = styled50(View, {
|
|
14615
|
+
shouldForwardProp: (prop) => prop !== "showBanner"
|
|
14616
|
+
})(({ theme: theme2 }) => {
|
|
14478
14617
|
const { spacing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
14479
14618
|
const { colour } = theme2.tokens.semantics;
|
|
14480
14619
|
const spacingMd = parseTokenValue8(spacing.md);
|
|
14481
14620
|
const spacingXl = parseTokenValue8(spacing.xl);
|
|
14482
|
-
|
|
14621
|
+
const radiusMd = parseTokenValue8(borderRadius.md);
|
|
14622
|
+
return {
|
|
14483
14623
|
flexDirection: "row",
|
|
14484
14624
|
width: "100%",
|
|
14485
|
-
height
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14625
|
+
// The 148px image sets the baseline height; the card grows if the content
|
|
14626
|
+
// is taller (e.g. a long or translated title wrapping to multiple lines)
|
|
14627
|
+
// so nothing is clipped.
|
|
14628
|
+
minHeight: 148,
|
|
14629
|
+
backgroundColor: colour.background.surface.default,
|
|
14489
14630
|
borderWidth: 1,
|
|
14490
14631
|
borderColor: colour.border.default,
|
|
14491
14632
|
shadowColor: "#522a10",
|
|
14492
14633
|
shadowOffset: { width: 0, height: spacingMd / 4 },
|
|
14493
14634
|
shadowOpacity: 0.05,
|
|
14494
14635
|
shadowRadius: spacingXl - 4,
|
|
14495
|
-
elevation: 5
|
|
14496
|
-
|
|
14497
|
-
borderRadius: parseTokenValue8(borderRadius.md),
|
|
14636
|
+
elevation: 5,
|
|
14637
|
+
borderRadius: radiusMd,
|
|
14498
14638
|
overflow: "hidden",
|
|
14499
|
-
zIndex: 1
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
({
|
|
14504
|
-
theme: theme2,
|
|
14505
|
-
imageBackgroundColor,
|
|
14506
|
-
thumbnailWidth = 100,
|
|
14507
|
-
thumbnailBackgroundColor
|
|
14508
|
-
}) => ({
|
|
14509
|
-
flexShrink: 0,
|
|
14510
|
-
backgroundColor: thumbnailBackgroundColor || imageBackgroundColor || theme2.tokens.semantics.colour.background.container.secondary,
|
|
14511
|
-
overflow: "hidden",
|
|
14512
|
-
aspectRatio: "1 / 1",
|
|
14513
|
-
width: thumbnailWidth,
|
|
14514
|
-
height: thumbnailWidth,
|
|
14515
|
-
position: "relative"
|
|
14516
|
-
})
|
|
14517
|
-
);
|
|
14518
|
-
var StyledQuantityBadge = styled51(View)(({ theme: theme2 }) => {
|
|
14519
|
-
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14520
|
-
const borderRadius = theme2.tokens.semantics.dimensions.borderRadius;
|
|
14521
|
-
const { colour } = theme2.tokens.semantics;
|
|
14522
|
-
return {
|
|
14523
|
-
position: "absolute",
|
|
14524
|
-
top: parseTokenValue8(spacing["2xs"]),
|
|
14525
|
-
right: parseTokenValue8(spacing["2xs"]),
|
|
14526
|
-
backgroundColor: colour.background.container.brand,
|
|
14527
|
-
borderRadius: parseTokenValue8(borderRadius.xs),
|
|
14528
|
-
paddingHorizontal: parseTokenValue8(spacing.sm),
|
|
14529
|
-
height: parseTokenValue8(spacing["2xl"]),
|
|
14530
|
-
minWidth: parseTokenValue8(spacing["2xl"]),
|
|
14531
|
-
alignItems: "center",
|
|
14532
|
-
justifyContent: "center",
|
|
14533
|
-
zIndex: 2
|
|
14639
|
+
zIndex: 1,
|
|
14640
|
+
// Don't apply negative margin when banner is shown; banner wrapper handles positioning
|
|
14641
|
+
marginBottom: 0,
|
|
14642
|
+
flex: 1
|
|
14534
14643
|
};
|
|
14535
14644
|
});
|
|
14536
|
-
var
|
|
14537
|
-
|
|
14538
|
-
|
|
14539
|
-
|
|
14645
|
+
var StyledImage3 = styled50(View)(({ theme: theme2, imageBackgroundColor, thumbnailWidth = 148 }) => ({
|
|
14646
|
+
flexShrink: 0,
|
|
14647
|
+
backgroundColor: imageBackgroundColor || theme2.tokens.semantics.colour.background.container.secondary,
|
|
14648
|
+
overflow: "hidden",
|
|
14649
|
+
width: thumbnailWidth,
|
|
14650
|
+
// Square (148) by default; stretches taller to fill the card when the
|
|
14651
|
+
// content makes it taller than the image.
|
|
14652
|
+
minHeight: thumbnailWidth,
|
|
14653
|
+
position: "relative"
|
|
14654
|
+
}));
|
|
14655
|
+
var StyledContentArea = styled50(View)(({ theme: theme2 }) => {
|
|
14540
14656
|
const { spacing } = theme2.tokens.semantics.dimensions;
|
|
14541
14657
|
const paddingValue = parseTokenValue8(spacing.md);
|
|
14542
14658
|
return {
|
|
14543
14659
|
flex: 1,
|
|
14544
14660
|
paddingHorizontal: paddingValue,
|
|
14545
|
-
paddingVertical:
|
|
14661
|
+
paddingVertical: paddingValue,
|
|
14546
14662
|
gap: parseTokenValue8(spacing.xs),
|
|
14547
14663
|
justifyContent: "space-between"
|
|
14548
14664
|
};
|
|
14549
14665
|
});
|
|
14550
|
-
var StyledTextContainer =
|
|
14666
|
+
var StyledTextContainer = styled50(View)(() => ({
|
|
14551
14667
|
gap: 2
|
|
14552
14668
|
}));
|
|
14553
|
-
var StyledBannerWrapper =
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
|
|
14558
|
-
|
|
14559
|
-
|
|
14669
|
+
var StyledBannerWrapper = styled50(View)(({ theme: theme2 }) => {
|
|
14670
|
+
const { spacing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
14671
|
+
const radiusMd = parseTokenValue8(borderRadius.md);
|
|
14672
|
+
const spacingMd = parseTokenValue8(spacing.md);
|
|
14673
|
+
return {
|
|
14674
|
+
width: "100%",
|
|
14675
|
+
// Tuck the banner up to overlap with card bottom; the 27px notification padding
|
|
14676
|
+
// shows the cream reveal under the card's rounded corners
|
|
14677
|
+
marginTop: -(radiusMd + spacingMd),
|
|
14678
|
+
marginBottom: 0,
|
|
14679
|
+
paddingTop: spacingMd,
|
|
14680
|
+
paddingBottom: spacingMd
|
|
14681
|
+
};
|
|
14682
|
+
});
|
|
14683
|
+
var StyledRootWrapper = styled50(View)(() => {
|
|
14560
14684
|
return {
|
|
14561
14685
|
flexDirection: "column",
|
|
14562
14686
|
width: "100%",
|
|
14563
|
-
|
|
14687
|
+
maxWidth: 358
|
|
14564
14688
|
};
|
|
14565
14689
|
});
|
|
14566
|
-
var StyledNotification =
|
|
14567
|
-
const { spacing } = theme2.tokens.semantics.dimensions;
|
|
14690
|
+
var StyledNotification = styled50(Notification)(({ theme: theme2 }) => {
|
|
14691
|
+
const { spacing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
14692
|
+
const spacingMd = parseTokenValue8(spacing.md);
|
|
14693
|
+
const radiusMd = parseTokenValue8(borderRadius.md);
|
|
14568
14694
|
return {
|
|
14569
|
-
|
|
14570
|
-
|
|
14571
|
-
|
|
14695
|
+
paddingHorizontal: spacingMd,
|
|
14696
|
+
// 27px top padding (Figma) leaves a small cream reveal above the text once
|
|
14697
|
+
// the banner tucks behind the card.
|
|
14698
|
+
paddingTop: 27,
|
|
14699
|
+
paddingBottom: spacingMd,
|
|
14700
|
+
// Square top corners, rounded bottom corners (banner tucks under the card).
|
|
14701
|
+
borderTopLeftRadius: 0,
|
|
14702
|
+
borderTopRightRadius: 0,
|
|
14703
|
+
borderBottomLeftRadius: radiusMd,
|
|
14704
|
+
borderBottomRightRadius: radiusMd
|
|
14572
14705
|
};
|
|
14573
14706
|
});
|
|
14574
|
-
var ProductDisplayCard =
|
|
14707
|
+
var ProductDisplayCard = React65.forwardRef(
|
|
14575
14708
|
(_a, ref) => {
|
|
14576
14709
|
var _b = _a, {
|
|
14577
14710
|
title,
|
|
@@ -14582,16 +14715,13 @@ var ProductDisplayCard = React60.forwardRef(
|
|
|
14582
14715
|
showQuantityPicker = false,
|
|
14583
14716
|
disableQuantityButtons = false,
|
|
14584
14717
|
hideQuantityButtons = false,
|
|
14585
|
-
showIncrementButton,
|
|
14586
|
-
showDecrementButton,
|
|
14587
14718
|
incrementDisabled = false,
|
|
14588
14719
|
decrementDisabled = false,
|
|
14720
|
+
minQuantity = 1,
|
|
14589
14721
|
image,
|
|
14590
14722
|
imageBackgroundColor,
|
|
14591
14723
|
thumbnailWidth,
|
|
14592
|
-
|
|
14593
|
-
showImageQuantityBadge = false,
|
|
14594
|
-
borderless = false,
|
|
14724
|
+
onImagePress,
|
|
14595
14725
|
banner,
|
|
14596
14726
|
showBanner = false,
|
|
14597
14727
|
bannerType = "info",
|
|
@@ -14605,74 +14735,76 @@ var ProductDisplayCard = React60.forwardRef(
|
|
|
14605
14735
|
"showQuantityPicker",
|
|
14606
14736
|
"disableQuantityButtons",
|
|
14607
14737
|
"hideQuantityButtons",
|
|
14608
|
-
"showIncrementButton",
|
|
14609
|
-
"showDecrementButton",
|
|
14610
14738
|
"incrementDisabled",
|
|
14611
14739
|
"decrementDisabled",
|
|
14740
|
+
"minQuantity",
|
|
14612
14741
|
"image",
|
|
14613
14742
|
"imageBackgroundColor",
|
|
14614
14743
|
"thumbnailWidth",
|
|
14615
|
-
"
|
|
14616
|
-
"showImageQuantityBadge",
|
|
14617
|
-
"borderless",
|
|
14744
|
+
"onImagePress",
|
|
14618
14745
|
"banner",
|
|
14619
14746
|
"showBanner",
|
|
14620
14747
|
"bannerType",
|
|
14621
14748
|
"showBannerIcon"
|
|
14622
14749
|
]);
|
|
14623
14750
|
const handleQuantityChange = (newQuantity) => {
|
|
14624
|
-
if (newQuantity >=
|
|
14751
|
+
if (newQuantity >= minQuantity) {
|
|
14625
14752
|
onQuantityChange == null ? void 0 : onQuantityChange(newQuantity);
|
|
14626
14753
|
}
|
|
14627
14754
|
};
|
|
14628
|
-
const cardContent = /* @__PURE__ */ jsxs(
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
|
|
14635
|
-
children:
|
|
14636
|
-
|
|
14637
|
-
|
|
14755
|
+
const cardContent = /* @__PURE__ */ jsxs(
|
|
14756
|
+
StyledCardContainer,
|
|
14757
|
+
__spreadProps(__spreadValues({
|
|
14758
|
+
ref,
|
|
14759
|
+
showBanner: showBanner && !!banner
|
|
14760
|
+
}, rest), {
|
|
14761
|
+
children: [
|
|
14762
|
+
image && /* @__PURE__ */ jsx(Pressable, { disabled: !onImagePress, onPress: onImagePress, children: /* @__PURE__ */ jsx(
|
|
14763
|
+
StyledImage3,
|
|
14764
|
+
{
|
|
14765
|
+
imageBackgroundColor,
|
|
14766
|
+
thumbnailWidth,
|
|
14767
|
+
children: typeof image === "string" ? /* @__PURE__ */ jsx(
|
|
14768
|
+
Image,
|
|
14769
|
+
{
|
|
14770
|
+
source: { uri: image },
|
|
14771
|
+
resizeMode: "cover",
|
|
14772
|
+
style: { flex: 1, width: "100%" }
|
|
14773
|
+
}
|
|
14774
|
+
) : image
|
|
14775
|
+
}
|
|
14776
|
+
) }),
|
|
14777
|
+
/* @__PURE__ */ jsxs(StyledContentArea, { children: [
|
|
14778
|
+
/* @__PURE__ */ jsxs(StyledTextContainer, { children: [
|
|
14779
|
+
/* @__PURE__ */ jsx(Typography, { variant: "heading", size: "2xs", color: "primary", children: title }),
|
|
14780
|
+
showSubtext && subtext && /* @__PURE__ */ jsx(Typography, { variant: "body", size: "sm", color: "secondary", children: subtext })
|
|
14781
|
+
] }),
|
|
14782
|
+
showQuantityPicker && /* @__PURE__ */ jsx(View, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx(
|
|
14783
|
+
NumberField,
|
|
14638
14784
|
{
|
|
14639
|
-
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
|
|
14654
|
-
|
|
14655
|
-
|
|
14656
|
-
value: String(quantity),
|
|
14657
|
-
onChangeText: (text) => {
|
|
14658
|
-
const value = parseInt(text, 10);
|
|
14659
|
-
if (!isNaN(value)) {
|
|
14660
|
-
handleQuantityChange(value);
|
|
14785
|
+
size: "sm",
|
|
14786
|
+
value: String(quantity),
|
|
14787
|
+
onChangeText: (text) => {
|
|
14788
|
+
const value = parseInt(text, 10);
|
|
14789
|
+
if (!isNaN(value)) {
|
|
14790
|
+
handleQuantityChange(value);
|
|
14791
|
+
}
|
|
14792
|
+
},
|
|
14793
|
+
onIncrement: () => handleQuantityChange(quantity + 1),
|
|
14794
|
+
onDecrement: () => handleQuantityChange(quantity - 1),
|
|
14795
|
+
min: minQuantity,
|
|
14796
|
+
accessible: true,
|
|
14797
|
+
accessibilityLabel: `Quantity: ${quantity}`,
|
|
14798
|
+
showIncrementButton: !hideQuantityButtons,
|
|
14799
|
+
showDecrementButton: !hideQuantityButtons,
|
|
14800
|
+
incrementDisabled: incrementDisabled || disableQuantityButtons,
|
|
14801
|
+
decrementDisabled: decrementDisabled || disableQuantityButtons
|
|
14661
14802
|
}
|
|
14662
|
-
}
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
accessibilityLabel: `Quantity: ${quantity}`,
|
|
14668
|
-
showIncrementButton: showIncrementButton !== void 0 ? showIncrementButton : !hideQuantityButtons,
|
|
14669
|
-
showDecrementButton: showDecrementButton !== void 0 ? showDecrementButton : !hideQuantityButtons,
|
|
14670
|
-
incrementDisabled: incrementDisabled || disableQuantityButtons,
|
|
14671
|
-
decrementDisabled: decrementDisabled || disableQuantityButtons
|
|
14672
|
-
}
|
|
14673
|
-
) })
|
|
14674
|
-
] })
|
|
14675
|
-
] }));
|
|
14803
|
+
) })
|
|
14804
|
+
] })
|
|
14805
|
+
]
|
|
14806
|
+
})
|
|
14807
|
+
);
|
|
14676
14808
|
if (showBanner && banner) {
|
|
14677
14809
|
return /* @__PURE__ */ jsxs(StyledRootWrapper, { children: [
|
|
14678
14810
|
cardContent,
|
|
@@ -14691,9 +14823,9 @@ var ProductDisplayCard = React60.forwardRef(
|
|
|
14691
14823
|
}
|
|
14692
14824
|
);
|
|
14693
14825
|
ProductDisplayCard.displayName = "ProductDisplayCard";
|
|
14694
|
-
var TabNavigationContext =
|
|
14826
|
+
var TabNavigationContext = React65.createContext(void 0);
|
|
14695
14827
|
var useTabNavigationContext = () => {
|
|
14696
|
-
const context =
|
|
14828
|
+
const context = React65.useContext(TabNavigationContext);
|
|
14697
14829
|
if (!context) {
|
|
14698
14830
|
throw new Error(
|
|
14699
14831
|
"TabNavigation.List, TabNavigation.Tab and TabNavigation.Panel must be used within a TabNavigation component."
|
|
@@ -14702,12 +14834,12 @@ var useTabNavigationContext = () => {
|
|
|
14702
14834
|
return context;
|
|
14703
14835
|
};
|
|
14704
14836
|
var parseTokenValue57 = (value) => parseFloat(value);
|
|
14705
|
-
var StyledFixedList =
|
|
14837
|
+
var StyledFixedList = styled50(View)({
|
|
14706
14838
|
flexDirection: "row",
|
|
14707
14839
|
alignItems: "stretch",
|
|
14708
14840
|
width: "100%"
|
|
14709
14841
|
});
|
|
14710
|
-
var StyledTab =
|
|
14842
|
+
var StyledTab = styled50(Pressable)(
|
|
14711
14843
|
({
|
|
14712
14844
|
tabHeight,
|
|
14713
14845
|
tabMinWidth,
|
|
@@ -14732,7 +14864,7 @@ var StyledTab = styled51(Pressable)(
|
|
|
14732
14864
|
borderBottomColor: tabBorderColor
|
|
14733
14865
|
}, tabFlex !== void 0 ? { flex: tabFlex } : { flexShrink: 0 })
|
|
14734
14866
|
);
|
|
14735
|
-
var TabNavigationList =
|
|
14867
|
+
var TabNavigationList = React65.forwardRef(
|
|
14736
14868
|
(_a, ref) => {
|
|
14737
14869
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
14738
14870
|
const { layout } = useTabNavigationContext();
|
|
@@ -14751,7 +14883,7 @@ var TabNavigationList = React60.forwardRef(
|
|
|
14751
14883
|
}
|
|
14752
14884
|
);
|
|
14753
14885
|
TabNavigationList.displayName = "TabNavigation.List";
|
|
14754
|
-
var TabNavigationTab =
|
|
14886
|
+
var TabNavigationTab = React65.forwardRef(
|
|
14755
14887
|
(_a, ref) => {
|
|
14756
14888
|
var _b = _a, { value, disabled = false, icon, avatar, children } = _b, rest = __objRest(_b, ["value", "disabled", "icon", "avatar", "children"]);
|
|
14757
14889
|
const { layout } = useTabNavigationContext();
|
|
@@ -14787,7 +14919,7 @@ var TabNavigationTab = React60.forwardRef(
|
|
|
14787
14919
|
}
|
|
14788
14920
|
);
|
|
14789
14921
|
TabNavigationTab.displayName = "TabNavigation.Tab";
|
|
14790
|
-
var TabNavigationPanel =
|
|
14922
|
+
var TabNavigationPanel = React65.forwardRef(
|
|
14791
14923
|
(_a, ref) => {
|
|
14792
14924
|
var _b = _a, { value, children } = _b, rest = __objRest(_b, ["value", "children"]);
|
|
14793
14925
|
const { animation } = useTabNavigationContext();
|
|
@@ -14795,7 +14927,7 @@ var TabNavigationPanel = React60.forwardRef(
|
|
|
14795
14927
|
}
|
|
14796
14928
|
);
|
|
14797
14929
|
TabNavigationPanel.displayName = "TabNavigation.Panel";
|
|
14798
|
-
var TabNavigationRoot =
|
|
14930
|
+
var TabNavigationRoot = React65.forwardRef(
|
|
14799
14931
|
(_a, ref) => {
|
|
14800
14932
|
var _b = _a, {
|
|
14801
14933
|
value,
|
|
@@ -14813,11 +14945,11 @@ var TabNavigationRoot = React60.forwardRef(
|
|
|
14813
14945
|
"children"
|
|
14814
14946
|
]);
|
|
14815
14947
|
const isControlled = typeof value === "string";
|
|
14816
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
14948
|
+
const [uncontrolledValue, setUncontrolledValue] = React65.useState(
|
|
14817
14949
|
() => defaultValue != null ? defaultValue : ""
|
|
14818
14950
|
);
|
|
14819
14951
|
const currentValue = isControlled ? value : uncontrolledValue;
|
|
14820
|
-
const handleValueChange =
|
|
14952
|
+
const handleValueChange = React65.useCallback(
|
|
14821
14953
|
(newValue) => {
|
|
14822
14954
|
if (!isControlled) {
|
|
14823
14955
|
setUncontrolledValue(newValue);
|
|
@@ -14826,7 +14958,7 @@ var TabNavigationRoot = React60.forwardRef(
|
|
|
14826
14958
|
},
|
|
14827
14959
|
[isControlled, onValueChange]
|
|
14828
14960
|
);
|
|
14829
|
-
const contextValue =
|
|
14961
|
+
const contextValue = React65.useMemo(
|
|
14830
14962
|
() => ({ layout, animation }),
|
|
14831
14963
|
[layout, animation]
|
|
14832
14964
|
);
|
|
@@ -14855,6 +14987,6 @@ var TabNavigation = Object.assign(TabNavigationRoot, {
|
|
|
14855
14987
|
Panel: TabNavigationPanel
|
|
14856
14988
|
});
|
|
14857
14989
|
|
|
14858
|
-
export { Accordion, Animated5 as Animated, Avatar, BRAND_FONTS, Badge, Button, ButtonDock, ButtonGroup, CarouselControls, Checkbox, CheckboxGroup, CopyField, CopyFieldInput, Countdown, DatePicker, Drawer, FilterTab, Hint, Icon, IconButton, Illustration, Input, InputDescription, InputError, InputField, InputLabel, Link, Logo, MessageCard, MessageCardBanner, MessageCardInsight, NativeSelectPicker, Notification, NumberField, NumberInput, NumberInputField, PasswordField, PasswordFieldInput, PasswordFieldRequirements, PawprintProvider, PictureSelector, ProductDisplayCard, ProductListingCardWithBadgeAndGrid as ProductListingCard, Progress, Radio, RadioGroup, SearchField, SearchFieldInput, SegmentedControl, SelectField, SelectFieldContent, SelectFieldItem, SelectFieldTrigger, SelectFieldValue, Slider, Spinner, Switch, TabNavigation, Tag, TextArea, TextAreaField, TextAreaLabel, ThemeProvider, Tooltip, Typography, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, usePasswordField, usePawprint, useSearchField, useSelectField };
|
|
14990
|
+
export { Accordion, Animated5 as Animated, Avatar, BRAND_FONTS, Badge, Button, ButtonDock, ButtonGroup, CarouselControls, Checkbox, CheckboxGroup, CopyField, CopyFieldInput, Countdown, DatePicker, Drawer, FilterTab, Hint, Icon, IconButton, Illustration, Input, InputDescription, InputError, InputField, InputLabel, InputText, Link, Logo, MessageCard, MessageCardBanner, MessageCardInsight, NativeSelectPicker, Notification, NumberField, NumberInput, NumberInputField, PasswordField, PasswordFieldInput, PasswordFieldRequirements, PawprintProvider, PictureSelector, ProductDisplayCard, ProductListingCardWithBadgeAndGrid as ProductListingCard, Progress, Radio, RadioGroup, SearchField, SearchFieldInput, SegmentedControl, SelectField, SelectFieldContent, SelectFieldItem, SelectFieldTrigger, SelectFieldValue, Slider, Spinner, Switch, TabNavigation, Tag, TextArea, TextAreaField, TextAreaLabel, ThemeProvider, Tooltip, Typography, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, usePasswordField, usePawprint, useSearchField, useSelectField };
|
|
14859
14991
|
//# sourceMappingURL=index.js.map
|
|
14860
14992
|
//# sourceMappingURL=index.js.map
|