@butternutbox/pawprint-native 0.11.1 → 0.13.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 +9 -9
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +922 -881
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -4
- package/dist/index.d.ts +39 -4
- package/dist/index.js +760 -720
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Divider/Divider.stories.tsx +71 -0
- package/src/components/atoms/Divider/Divider.test.tsx +25 -0
- package/src/components/atoms/Divider/Divider.tsx +61 -0
- package/src/components/atoms/Divider/index.ts +2 -0
- package/src/components/atoms/index.ts +1 -0
- package/src/components/molecules/Checkbox/Checkbox.tsx +19 -3
- package/src/components/molecules/Checkbox/CheckboxGroup.tsx +31 -7
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 styled51 from '@emotion/native';
|
|
5
5
|
export { default as styled } from '@emotion/native';
|
|
6
6
|
import idaNarrow500 from './ida-narrow-500-normal.ttf';
|
|
7
7
|
import idaNarrow700 from './ida-narrow-700-normal.ttf';
|
|
@@ -9,7 +9,7 @@ import ibmPlexSansCondensed400 from './ibm-plex-sans-condensed-400-normal.ttf';
|
|
|
9
9
|
import ibmPlexSansCondensed500 from './ibm-plex-sans-condensed-500-normal.ttf';
|
|
10
10
|
import ibmPlexSansCondensed600 from './ibm-plex-sans-condensed-600-normal.ttf';
|
|
11
11
|
import ibmPlexSansCondensed700 from './ibm-plex-sans-condensed-700-normal.ttf';
|
|
12
|
-
import
|
|
12
|
+
import React66, { createContext, forwardRef, useRef, useEffect, useState, useCallback, useMemo, useContext } from 'react';
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
14
|
import * as AvatarPrimitive from '@rn-primitives/avatar';
|
|
15
15
|
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';
|
|
@@ -188,8 +188,8 @@ var VARIANT_DEFAULTS = {
|
|
|
188
188
|
heading: { size: "md" },
|
|
189
189
|
display: { size: "lg" }
|
|
190
190
|
};
|
|
191
|
-
var StyledText =
|
|
192
|
-
var Typography =
|
|
191
|
+
var StyledText = styled51(Text)({});
|
|
192
|
+
var Typography = React66.forwardRef(
|
|
193
193
|
(props, ref) => {
|
|
194
194
|
const theme2 = useTheme();
|
|
195
195
|
const { typography, colour } = theme2.tokens.semantics;
|
|
@@ -272,14 +272,14 @@ var Typography = React65.forwardRef(
|
|
|
272
272
|
);
|
|
273
273
|
Typography.displayName = "Typography";
|
|
274
274
|
var parseTokenValue2 = (value) => parseFloat(value);
|
|
275
|
-
var StyledIconRoot =
|
|
275
|
+
var StyledIconRoot = styled51(View)(({ iconDimension }) => ({
|
|
276
276
|
alignItems: "center",
|
|
277
277
|
justifyContent: "center",
|
|
278
278
|
flexShrink: 0,
|
|
279
279
|
width: iconDimension,
|
|
280
280
|
height: iconDimension
|
|
281
281
|
}));
|
|
282
|
-
var Icon =
|
|
282
|
+
var Icon = React66.forwardRef(
|
|
283
283
|
(_a, ref) => {
|
|
284
284
|
var _b = _a, {
|
|
285
285
|
icon: IconComponent,
|
|
@@ -580,7 +580,7 @@ var SIZE_MAP = {
|
|
|
580
580
|
lg: "large"
|
|
581
581
|
};
|
|
582
582
|
var parseTokenValue3 = (value) => parseFloat(value);
|
|
583
|
-
var StyledRoot =
|
|
583
|
+
var StyledRoot = styled51(AvatarPrimitive.Root)(({ theme: theme2, size, border }) => {
|
|
584
584
|
const { avatar } = theme2.tokens.components;
|
|
585
585
|
const { borderRadius } = theme2.tokens.semantics.dimensions;
|
|
586
586
|
const tokenSize = SIZE_MAP[size];
|
|
@@ -601,12 +601,12 @@ var StyledRoot = styled50(AvatarPrimitive.Root)(({ theme: theme2, size, border }
|
|
|
601
601
|
borderStyle: "solid"
|
|
602
602
|
});
|
|
603
603
|
});
|
|
604
|
-
var StyledImage =
|
|
604
|
+
var StyledImage = styled51(AvatarPrimitive.Image)({
|
|
605
605
|
width: "100%",
|
|
606
606
|
height: "100%",
|
|
607
607
|
resizeMode: "cover"
|
|
608
608
|
});
|
|
609
|
-
var StyledFallback =
|
|
609
|
+
var StyledFallback = styled51(AvatarPrimitive.Fallback)(({ theme: theme2 }) => {
|
|
610
610
|
const { background, text } = theme2.tokens.semantics.colour;
|
|
611
611
|
return {
|
|
612
612
|
display: "flex",
|
|
@@ -618,7 +618,7 @@ var StyledFallback = styled50(AvatarPrimitive.Fallback)(({ theme: theme2 }) => {
|
|
|
618
618
|
color: text.primary
|
|
619
619
|
};
|
|
620
620
|
});
|
|
621
|
-
var StyledIcon =
|
|
621
|
+
var StyledIcon = styled51(Icon)(({
|
|
622
622
|
theme: theme2,
|
|
623
623
|
avatarSize
|
|
624
624
|
}) => {
|
|
@@ -645,7 +645,7 @@ var AVATAR_SIZE_TO_ICON_SIZE = {
|
|
|
645
645
|
md: "md",
|
|
646
646
|
lg: "xl"
|
|
647
647
|
};
|
|
648
|
-
var AvatarRoot =
|
|
648
|
+
var AvatarRoot = React66.forwardRef(
|
|
649
649
|
(_a, ref) => {
|
|
650
650
|
var _b = _a, {
|
|
651
651
|
src,
|
|
@@ -682,7 +682,7 @@ var AvatarRoot = React65.forwardRef(
|
|
|
682
682
|
AvatarRoot.displayName = "Avatar";
|
|
683
683
|
var Avatar = AvatarRoot;
|
|
684
684
|
var parseTokenValue4 = (value) => parseFloat(value);
|
|
685
|
-
var Container =
|
|
685
|
+
var Container = styled51(View)(({ theme: theme2, showBg }) => {
|
|
686
686
|
const { colour, sizing, borderRadius } = theme2.tokens.components.carouselControls.carouselControl;
|
|
687
687
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
688
688
|
return {
|
|
@@ -704,7 +704,7 @@ function getVisibleDots(count, activeIndex) {
|
|
|
704
704
|
const windowStart = Math.min(Math.max(activeIndex - 2, 0), count - 5);
|
|
705
705
|
return Array.from({ length: 5 }, (_, i) => windowStart + i);
|
|
706
706
|
}
|
|
707
|
-
var CarouselControls =
|
|
707
|
+
var CarouselControls = React66.forwardRef(
|
|
708
708
|
(_a, ref) => {
|
|
709
709
|
var _b = _a, { count, activeIndex, showBackground = true } = _b, props = __objRest(_b, ["count", "activeIndex", "showBackground"]);
|
|
710
710
|
const theme2 = useTheme();
|
|
@@ -751,7 +751,7 @@ var CarouselControls = React65.forwardRef(
|
|
|
751
751
|
);
|
|
752
752
|
CarouselControls.displayName = "CarouselControls";
|
|
753
753
|
var parseTokenValue5 = (value) => parseFloat(value);
|
|
754
|
-
var StyledBadge =
|
|
754
|
+
var StyledBadge = styled51(View)(({ theme: theme2, badgeVariant, badgeSize, pinned, top, bottom }) => {
|
|
755
755
|
const { sizing, spacing, colour, primary, pinnedBadge } = theme2.tokens.components.badges.badge;
|
|
756
756
|
const backgroundColorMap = {
|
|
757
757
|
primary: colour.background.default,
|
|
@@ -791,7 +791,7 @@ var StyledBadge = styled50(View)(({ theme: theme2, badgeVariant, badgeSize, pinn
|
|
|
791
791
|
backgroundColor: backgroundColorMap[badgeVariant]
|
|
792
792
|
}, borderRadiusStyles), positionStyles);
|
|
793
793
|
});
|
|
794
|
-
var Badge =
|
|
794
|
+
var Badge = React66.forwardRef(
|
|
795
795
|
(_a, ref) => {
|
|
796
796
|
var _b = _a, {
|
|
797
797
|
variant = "primary",
|
|
@@ -865,8 +865,8 @@ var Badge = React65.forwardRef(
|
|
|
865
865
|
);
|
|
866
866
|
Badge.displayName = "Badge";
|
|
867
867
|
var parseTokenValue6 = (value) => parseFloat(value);
|
|
868
|
-
var StyledSpinner =
|
|
869
|
-
var Spinner =
|
|
868
|
+
var StyledSpinner = styled51(View)({});
|
|
869
|
+
var Spinner = React66.forwardRef(
|
|
870
870
|
(_a, ref) => {
|
|
871
871
|
var _b = _a, { size = "md", variant = "dark", style } = _b, rest = __objRest(_b, ["size", "variant", "style"]);
|
|
872
872
|
const theme2 = useTheme();
|
|
@@ -931,12 +931,12 @@ var sizeToTypographyKey = {
|
|
|
931
931
|
md: "medium",
|
|
932
932
|
sm: "small"
|
|
933
933
|
};
|
|
934
|
-
var IconWrapper =
|
|
934
|
+
var IconWrapper = styled51(View)({
|
|
935
935
|
alignItems: "center",
|
|
936
936
|
justifyContent: "center",
|
|
937
937
|
flexShrink: 0
|
|
938
938
|
});
|
|
939
|
-
var StyledButton =
|
|
939
|
+
var StyledButton = styled51(Pressable)(
|
|
940
940
|
({
|
|
941
941
|
buttonHeight,
|
|
942
942
|
buttonMinWidth,
|
|
@@ -964,16 +964,16 @@ var StyledButton = styled50(Pressable)(
|
|
|
964
964
|
opacity: buttonOpacity
|
|
965
965
|
}, buttonBorderWidth ? { borderWidth: buttonBorderWidth, borderColor: buttonBorderColor } : {}), buttonFullWidth ? { width: "100%" } : {})
|
|
966
966
|
);
|
|
967
|
-
var StyledTextWrapper =
|
|
967
|
+
var StyledTextWrapper = styled51(View)(({ textOpacity }) => ({
|
|
968
968
|
opacity: textOpacity,
|
|
969
969
|
flexShrink: 0
|
|
970
970
|
}));
|
|
971
|
-
var StyledSpinnerWrapper =
|
|
971
|
+
var StyledSpinnerWrapper = styled51(View)({
|
|
972
972
|
position: "absolute",
|
|
973
973
|
alignItems: "center",
|
|
974
974
|
justifyContent: "center"
|
|
975
975
|
});
|
|
976
|
-
var Button =
|
|
976
|
+
var Button = React66.forwardRef(
|
|
977
977
|
(_a, ref) => {
|
|
978
978
|
var _b = _a, {
|
|
979
979
|
variant = "filled",
|
|
@@ -1005,7 +1005,7 @@ var Button = React65.forwardRef(
|
|
|
1005
1005
|
const typographyKey = sizeToTypographyKey[size];
|
|
1006
1006
|
const typography = buttons.text[typographyKey];
|
|
1007
1007
|
resolveFont(typography.fontFamily, typography.fontWeight);
|
|
1008
|
-
const [pressed, setPressed] =
|
|
1008
|
+
const [pressed, setPressed] = React66.useState(false);
|
|
1009
1009
|
const getVariantStyles = (isPressed) => {
|
|
1010
1010
|
if (variant === "filled") {
|
|
1011
1011
|
const bgTokens = buttons.filledButton.colour.background[colour];
|
|
@@ -1089,10 +1089,33 @@ var Button = React65.forwardRef(
|
|
|
1089
1089
|
}
|
|
1090
1090
|
);
|
|
1091
1091
|
Button.displayName = "Button";
|
|
1092
|
+
var parseTokenValue8 = (value) => parseFloat(value);
|
|
1093
|
+
var StyledDivider = styled51(View)(({ theme: theme2, dividerSize, dividerColour }) => {
|
|
1094
|
+
const { colour, sizing } = theme2.tokens.components.dividers;
|
|
1095
|
+
return {
|
|
1096
|
+
width: "100%",
|
|
1097
|
+
height: parseTokenValue8(sizing[dividerSize].height),
|
|
1098
|
+
backgroundColor: colour[dividerColour]
|
|
1099
|
+
};
|
|
1100
|
+
});
|
|
1101
|
+
var Divider = React66.forwardRef(
|
|
1102
|
+
(_a, ref) => {
|
|
1103
|
+
var _b = _a, { size = "small", colour = "light" } = _b, rest = __objRest(_b, ["size", "colour"]);
|
|
1104
|
+
return /* @__PURE__ */ jsx(
|
|
1105
|
+
StyledDivider,
|
|
1106
|
+
__spreadValues({
|
|
1107
|
+
ref,
|
|
1108
|
+
dividerSize: size,
|
|
1109
|
+
dividerColour: colour
|
|
1110
|
+
}, rest)
|
|
1111
|
+
);
|
|
1112
|
+
}
|
|
1113
|
+
);
|
|
1114
|
+
Divider.displayName = "Divider";
|
|
1092
1115
|
|
|
1093
1116
|
// src/utils/token.ts
|
|
1094
|
-
var
|
|
1095
|
-
var StyledHint =
|
|
1117
|
+
var parseTokenValue9 = (value) => parseFloat(value);
|
|
1118
|
+
var StyledHint = styled51(View)(({
|
|
1096
1119
|
theme: theme2,
|
|
1097
1120
|
hintVariant
|
|
1098
1121
|
}) => {
|
|
@@ -1108,7 +1131,7 @@ var StyledHint = styled50(View)(({
|
|
|
1108
1131
|
warning: background.warning,
|
|
1109
1132
|
error: background.error
|
|
1110
1133
|
};
|
|
1111
|
-
const size =
|
|
1134
|
+
const size = parseTokenValue9(badge.hint.sizing.default);
|
|
1112
1135
|
return {
|
|
1113
1136
|
width: size,
|
|
1114
1137
|
height: size,
|
|
@@ -1116,20 +1139,20 @@ var StyledHint = styled50(View)(({
|
|
|
1116
1139
|
backgroundColor: hintVariantMap[hintVariant]
|
|
1117
1140
|
};
|
|
1118
1141
|
});
|
|
1119
|
-
var Hint =
|
|
1142
|
+
var Hint = React66.forwardRef(
|
|
1120
1143
|
(_a, ref) => {
|
|
1121
1144
|
var _b = _a, { variant = "default" } = _b, rest = __objRest(_b, ["variant"]);
|
|
1122
1145
|
return /* @__PURE__ */ jsx(StyledHint, __spreadValues({ ref, hintVariant: variant }, rest));
|
|
1123
1146
|
}
|
|
1124
1147
|
);
|
|
1125
1148
|
Hint.displayName = "Hint";
|
|
1126
|
-
var
|
|
1149
|
+
var parseTokenValue10 = (value) => parseFloat(value);
|
|
1127
1150
|
var sizeToIconSizeToken = {
|
|
1128
1151
|
lg: "xl",
|
|
1129
1152
|
md: "lg",
|
|
1130
1153
|
sm: "md"
|
|
1131
1154
|
};
|
|
1132
|
-
var StyledIconButton =
|
|
1155
|
+
var StyledIconButton = styled51(Pressable)(
|
|
1133
1156
|
({
|
|
1134
1157
|
buttonDimension,
|
|
1135
1158
|
buttonBorderRadius,
|
|
@@ -1148,17 +1171,17 @@ var StyledIconButton = styled50(Pressable)(
|
|
|
1148
1171
|
opacity: buttonOpacity
|
|
1149
1172
|
}, buttonBorderWidth ? { borderWidth: buttonBorderWidth, borderColor: buttonBorderColor } : {})
|
|
1150
1173
|
);
|
|
1151
|
-
var StyledIconWrapper =
|
|
1174
|
+
var StyledIconWrapper = styled51(View)(({ iconDimension, iconOpacity }) => ({
|
|
1152
1175
|
width: iconDimension,
|
|
1153
1176
|
height: iconDimension,
|
|
1154
1177
|
opacity: iconOpacity
|
|
1155
1178
|
}));
|
|
1156
|
-
var StyledSpinnerWrapper2 =
|
|
1179
|
+
var StyledSpinnerWrapper2 = styled51(View)({
|
|
1157
1180
|
position: "absolute",
|
|
1158
1181
|
alignItems: "center",
|
|
1159
1182
|
justifyContent: "center"
|
|
1160
1183
|
});
|
|
1161
|
-
var IconButton =
|
|
1184
|
+
var IconButton = React66.forwardRef(
|
|
1162
1185
|
(_a, ref) => {
|
|
1163
1186
|
var _b = _a, {
|
|
1164
1187
|
icon: IconComponent,
|
|
@@ -1181,10 +1204,10 @@ var IconButton = React65.forwardRef(
|
|
|
1181
1204
|
const isDisabled = disabled || loading;
|
|
1182
1205
|
const buttons = theme2.tokens.components.buttons;
|
|
1183
1206
|
const sizeTokens = buttons.size[size];
|
|
1184
|
-
const dimension =
|
|
1207
|
+
const dimension = parseTokenValue10(sizeTokens.height);
|
|
1185
1208
|
const iconSizing = theme2.tokens.components.icons.sizing.icons.core;
|
|
1186
|
-
const iconDimension =
|
|
1187
|
-
const [pressed, setPressed] =
|
|
1209
|
+
const iconDimension = parseTokenValue10(iconSizing[sizeToIconSizeToken[size]]);
|
|
1210
|
+
const [pressed, setPressed] = React66.useState(false);
|
|
1188
1211
|
const getVariantStyles = (isPressed) => {
|
|
1189
1212
|
if (variant === "filled") {
|
|
1190
1213
|
const filled = buttons.iconButton.filledButton;
|
|
@@ -1200,7 +1223,7 @@ var IconButton = React65.forwardRef(
|
|
|
1200
1223
|
const outline = buttons.iconButton.outlineButton;
|
|
1201
1224
|
return {
|
|
1202
1225
|
backgroundColor: loading || isPressed ? outline.colour.background.selected : "transparent",
|
|
1203
|
-
borderWidth:
|
|
1226
|
+
borderWidth: parseTokenValue10(outline.border.default),
|
|
1204
1227
|
borderColor: outline.colour.border.default,
|
|
1205
1228
|
iconColor: loading || isPressed ? outline.colour.icon.selected : outline.colour.icon.default
|
|
1206
1229
|
};
|
|
@@ -1222,7 +1245,7 @@ var IconButton = React65.forwardRef(
|
|
|
1222
1245
|
onPressIn: () => setPressed(true),
|
|
1223
1246
|
onPressOut: () => setPressed(false),
|
|
1224
1247
|
buttonDimension: dimension,
|
|
1225
|
-
buttonBorderRadius:
|
|
1248
|
+
buttonBorderRadius: parseTokenValue10(buttons.borderRadius.default),
|
|
1226
1249
|
buttonBgColor: variantStyles.backgroundColor,
|
|
1227
1250
|
buttonOpacity: isDisabled && !loading ? parseFloat(buttons.opacity.disabled) : 1,
|
|
1228
1251
|
buttonBorderWidth: variantStyles.borderWidth,
|
|
@@ -1260,14 +1283,14 @@ var IconButton = React65.forwardRef(
|
|
|
1260
1283
|
}
|
|
1261
1284
|
);
|
|
1262
1285
|
IconButton.displayName = "IconButton";
|
|
1263
|
-
var
|
|
1264
|
-
var StyledRoot2 =
|
|
1286
|
+
var parseTokenValue11 = (value) => parseFloat(value);
|
|
1287
|
+
var StyledRoot2 = styled51(View)(({ illustrationHeight }) => ({
|
|
1265
1288
|
alignItems: "center",
|
|
1266
1289
|
justifyContent: "center",
|
|
1267
1290
|
flexShrink: 0,
|
|
1268
1291
|
height: illustrationHeight
|
|
1269
1292
|
}));
|
|
1270
|
-
var Illustration =
|
|
1293
|
+
var Illustration = React66.forwardRef(
|
|
1271
1294
|
(_a, ref) => {
|
|
1272
1295
|
var _b = _a, {
|
|
1273
1296
|
illustration: IllustrationComponent,
|
|
@@ -1279,7 +1302,7 @@ var Illustration = React65.forwardRef(
|
|
|
1279
1302
|
"aria-label"
|
|
1280
1303
|
]);
|
|
1281
1304
|
const theme2 = useTheme();
|
|
1282
|
-
const dimension =
|
|
1305
|
+
const dimension = parseTokenValue11(
|
|
1283
1306
|
theme2.tokens.components.illustrations.sizing.illustrations[size]
|
|
1284
1307
|
);
|
|
1285
1308
|
return /* @__PURE__ */ jsx(
|
|
@@ -1297,13 +1320,13 @@ var Illustration = React65.forwardRef(
|
|
|
1297
1320
|
}
|
|
1298
1321
|
);
|
|
1299
1322
|
Illustration.displayName = "Illustration";
|
|
1300
|
-
var
|
|
1301
|
-
var StyledLabelRow =
|
|
1323
|
+
var parseTokenValue12 = (value) => parseFloat(value);
|
|
1324
|
+
var StyledLabelRow = styled51(View)(({ labelGap }) => ({
|
|
1302
1325
|
flexDirection: "row",
|
|
1303
1326
|
alignItems: "center",
|
|
1304
1327
|
gap: labelGap
|
|
1305
1328
|
}));
|
|
1306
|
-
var InputLabel =
|
|
1329
|
+
var InputLabel = React66.forwardRef(
|
|
1307
1330
|
(_a, ref) => {
|
|
1308
1331
|
var _b = _a, { optionalText, state = "default", children } = _b, rest = __objRest(_b, ["optionalText", "state", "children"]);
|
|
1309
1332
|
const theme2 = useTheme();
|
|
@@ -1312,7 +1335,7 @@ var InputLabel = React65.forwardRef(
|
|
|
1312
1335
|
StyledLabelRow,
|
|
1313
1336
|
__spreadProps(__spreadValues({
|
|
1314
1337
|
ref,
|
|
1315
|
-
labelGap:
|
|
1338
|
+
labelGap: parseTokenValue12(spacing.label.gap)
|
|
1316
1339
|
}, rest), {
|
|
1317
1340
|
children: [
|
|
1318
1341
|
/* @__PURE__ */ jsx(
|
|
@@ -1330,22 +1353,22 @@ var InputLabel = React65.forwardRef(
|
|
|
1330
1353
|
}
|
|
1331
1354
|
);
|
|
1332
1355
|
InputLabel.displayName = "Input.Label";
|
|
1333
|
-
var
|
|
1334
|
-
var StyledInputWrapper =
|
|
1356
|
+
var parseTokenValue13 = (value) => parseFloat(value);
|
|
1357
|
+
var StyledInputWrapper = styled51(Animated.View)(({ theme: theme2, isDisabled, containerWidth, containerHeight }) => {
|
|
1335
1358
|
const { spacing, colour, borderRadius, size } = theme2.tokens.components.inputs;
|
|
1336
1359
|
return {
|
|
1337
1360
|
flexDirection: "row",
|
|
1338
1361
|
alignItems: "center",
|
|
1339
|
-
gap:
|
|
1340
|
-
minWidth: containerWidth !== void 0 ? void 0 :
|
|
1362
|
+
gap: parseTokenValue13(spacing.field.gap),
|
|
1363
|
+
minWidth: containerWidth !== void 0 ? void 0 : parseTokenValue13(size.field.minWidth),
|
|
1341
1364
|
width: containerWidth !== void 0 ? containerWidth : "100%",
|
|
1342
|
-
height: containerHeight !== void 0 ? containerHeight :
|
|
1365
|
+
height: containerHeight !== void 0 ? containerHeight : parseTokenValue13(size.field.height),
|
|
1343
1366
|
backgroundColor: isDisabled ? colour.field.background.inactive : colour.field.background.default,
|
|
1344
|
-
borderRadius:
|
|
1367
|
+
borderRadius: parseTokenValue13(borderRadius.field.default),
|
|
1345
1368
|
flexShrink: containerWidth !== void 0 ? 0 : void 0
|
|
1346
1369
|
};
|
|
1347
1370
|
});
|
|
1348
|
-
var StyledInput =
|
|
1371
|
+
var StyledInput = styled51(TextInput)(({
|
|
1349
1372
|
theme: theme2,
|
|
1350
1373
|
hasInlineHelp
|
|
1351
1374
|
}) => {
|
|
@@ -1356,7 +1379,7 @@ var StyledInput = styled50(TextInput)(({
|
|
|
1356
1379
|
typography.fontFamily,
|
|
1357
1380
|
typography.fontWeight
|
|
1358
1381
|
);
|
|
1359
|
-
const fontSize =
|
|
1382
|
+
const fontSize = parseTokenValue13(typography.fontSize);
|
|
1360
1383
|
const letterSpacing = ((_a = typography.letterSpacing) == null ? void 0 : _a.endsWith("%")) ? parseFloat(typography.letterSpacing) / 100 * fontSize : parseFloat((_b = typography.letterSpacing) != null ? _b : "0");
|
|
1361
1384
|
return __spreadValues(__spreadValues({
|
|
1362
1385
|
flex: 1,
|
|
@@ -1373,16 +1396,16 @@ var StyledInput = styled50(TextInput)(({
|
|
|
1373
1396
|
outlineColor: "transparent"
|
|
1374
1397
|
});
|
|
1375
1398
|
});
|
|
1376
|
-
var StyledFocusRing =
|
|
1399
|
+
var StyledFocusRing = styled51(View)({
|
|
1377
1400
|
position: "absolute",
|
|
1378
1401
|
pointerEvents: "none"
|
|
1379
1402
|
});
|
|
1380
|
-
var StyledIconSlot =
|
|
1403
|
+
var StyledIconSlot = styled51(View)({
|
|
1381
1404
|
alignItems: "center",
|
|
1382
1405
|
justifyContent: "center",
|
|
1383
1406
|
flexShrink: 0
|
|
1384
1407
|
});
|
|
1385
|
-
var InputField =
|
|
1408
|
+
var InputField = React66.forwardRef(
|
|
1386
1409
|
(_a, ref) => {
|
|
1387
1410
|
var _b = _a, {
|
|
1388
1411
|
leadingIcon,
|
|
@@ -1429,12 +1452,12 @@ var InputField = React65.forwardRef(
|
|
|
1429
1452
|
);
|
|
1430
1453
|
const isDisabled = editable === false;
|
|
1431
1454
|
const hasState = state === "error" || state === "success";
|
|
1432
|
-
const baseBorderWidth =
|
|
1433
|
-
const selectedBorderWidth =
|
|
1434
|
-
const focusBorderWidth =
|
|
1435
|
-
const fieldBorderRadius =
|
|
1436
|
-
const baseVerticalPadding =
|
|
1437
|
-
const baseHorizontalPadding =
|
|
1455
|
+
const baseBorderWidth = parseTokenValue13(borderWidth.field.default);
|
|
1456
|
+
const selectedBorderWidth = parseTokenValue13(borderWidth.field.selected);
|
|
1457
|
+
const focusBorderWidth = parseTokenValue13(borderWidth.field.focus);
|
|
1458
|
+
const fieldBorderRadius = parseTokenValue13(borderRadius.field.default);
|
|
1459
|
+
const baseVerticalPadding = parseTokenValue13(spacing.field.verticalPadding);
|
|
1460
|
+
const baseHorizontalPadding = parseTokenValue13(
|
|
1438
1461
|
spacing.field.horizontalPadding
|
|
1439
1462
|
);
|
|
1440
1463
|
const borderDelta = selectedBorderWidth - baseBorderWidth;
|
|
@@ -1541,7 +1564,7 @@ var InputField = React65.forwardRef(
|
|
|
1541
1564
|
}
|
|
1542
1565
|
);
|
|
1543
1566
|
InputField.displayName = "Input.Field";
|
|
1544
|
-
var InputText =
|
|
1567
|
+
var InputText = React66.forwardRef(
|
|
1545
1568
|
(_a, ref) => {
|
|
1546
1569
|
var _b = _a, { placeholderTextColor } = _b, rest = __objRest(_b, ["placeholderTextColor"]);
|
|
1547
1570
|
const theme2 = useTheme();
|
|
@@ -1556,11 +1579,11 @@ var InputText = React65.forwardRef(
|
|
|
1556
1579
|
}
|
|
1557
1580
|
);
|
|
1558
1581
|
InputText.displayName = "Input.Text";
|
|
1559
|
-
var StyledDescriptionRow =
|
|
1582
|
+
var StyledDescriptionRow = styled51(View)({
|
|
1560
1583
|
flexDirection: "row",
|
|
1561
1584
|
alignItems: "center"
|
|
1562
1585
|
});
|
|
1563
|
-
var InputDescription =
|
|
1586
|
+
var InputDescription = React66.forwardRef(
|
|
1564
1587
|
(_a, ref) => {
|
|
1565
1588
|
var _b = _a, { state = "default", children } = _b, rest = __objRest(_b, ["state", "children"]);
|
|
1566
1589
|
const theme2 = useTheme();
|
|
@@ -1576,11 +1599,11 @@ var InputDescription = React65.forwardRef(
|
|
|
1576
1599
|
}
|
|
1577
1600
|
);
|
|
1578
1601
|
InputDescription.displayName = "Input.Description";
|
|
1579
|
-
var StyledErrorRow =
|
|
1602
|
+
var StyledErrorRow = styled51(View)({
|
|
1580
1603
|
flexDirection: "row",
|
|
1581
1604
|
alignItems: "center"
|
|
1582
1605
|
});
|
|
1583
|
-
var InputError =
|
|
1606
|
+
var InputError = React66.forwardRef(
|
|
1584
1607
|
(_a, ref) => {
|
|
1585
1608
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
1586
1609
|
const theme2 = useTheme();
|
|
@@ -1596,14 +1619,14 @@ var InputError = React65.forwardRef(
|
|
|
1596
1619
|
}
|
|
1597
1620
|
);
|
|
1598
1621
|
InputError.displayName = "Input.Error";
|
|
1599
|
-
var
|
|
1600
|
-
var StyledRoot3 =
|
|
1622
|
+
var parseTokenValue14 = (value) => parseFloat(value);
|
|
1623
|
+
var StyledRoot3 = styled51(View)(({ theme: theme2 }) => {
|
|
1601
1624
|
const { spacing } = theme2.tokens.components.inputs;
|
|
1602
1625
|
return {
|
|
1603
|
-
gap:
|
|
1626
|
+
gap: parseTokenValue14(spacing.gap)
|
|
1604
1627
|
};
|
|
1605
1628
|
});
|
|
1606
|
-
var InputRoot =
|
|
1629
|
+
var InputRoot = React66.forwardRef(
|
|
1607
1630
|
(_a, ref) => {
|
|
1608
1631
|
var _b = _a, {
|
|
1609
1632
|
label,
|
|
@@ -1647,7 +1670,7 @@ var Input = Object.assign(InputRoot, {
|
|
|
1647
1670
|
Description: InputDescription,
|
|
1648
1671
|
Error: InputError
|
|
1649
1672
|
});
|
|
1650
|
-
var Link =
|
|
1673
|
+
var Link = React66.forwardRef(
|
|
1651
1674
|
(_a, ref) => {
|
|
1652
1675
|
var _b = _a, {
|
|
1653
1676
|
size = "md",
|
|
@@ -4240,12 +4263,12 @@ function registerLogo(brand, variant, component) {
|
|
|
4240
4263
|
}
|
|
4241
4264
|
LOGOS[brand][variant] = component;
|
|
4242
4265
|
}
|
|
4243
|
-
var StyledRoot4 =
|
|
4266
|
+
var StyledRoot4 = styled51(View)({
|
|
4244
4267
|
alignItems: "center",
|
|
4245
4268
|
justifyContent: "center",
|
|
4246
4269
|
flexShrink: 0
|
|
4247
4270
|
});
|
|
4248
|
-
var Logo =
|
|
4271
|
+
var Logo = React66.forwardRef(
|
|
4249
4272
|
(_a, ref) => {
|
|
4250
4273
|
var _b = _a, { brand, variant = "primary", "aria-label": ariaLabel } = _b, rest = __objRest(_b, ["brand", "variant", "aria-label"]);
|
|
4251
4274
|
const effectiveVariant = brand === "bcorp" ? "primary" : variant;
|
|
@@ -4267,28 +4290,28 @@ var Logo = React65.forwardRef(
|
|
|
4267
4290
|
}
|
|
4268
4291
|
);
|
|
4269
4292
|
Logo.displayName = "Logo";
|
|
4270
|
-
var
|
|
4271
|
-
var StyledFieldGroup =
|
|
4293
|
+
var parseTokenValue15 = (value) => parseFloat(value);
|
|
4294
|
+
var StyledFieldGroup = styled51(View)(({ theme: theme2 }) => {
|
|
4272
4295
|
const { spacing } = theme2.tokens.components.inputs;
|
|
4273
4296
|
return {
|
|
4274
4297
|
flexDirection: "row",
|
|
4275
4298
|
alignItems: "center",
|
|
4276
|
-
gap:
|
|
4299
|
+
gap: parseTokenValue15(spacing.field.gap)
|
|
4277
4300
|
};
|
|
4278
4301
|
});
|
|
4279
|
-
var StyledFieldTextWrapper =
|
|
4302
|
+
var StyledFieldTextWrapper = styled51(View)({
|
|
4280
4303
|
flexShrink: 0,
|
|
4281
4304
|
justifyContent: "center"
|
|
4282
4305
|
});
|
|
4283
|
-
var StyledInputContainer =
|
|
4306
|
+
var StyledInputContainer = styled51(View)(({ hasInlineHelp }) => ({
|
|
4284
4307
|
flexDirection: "column",
|
|
4285
4308
|
gap: hasInlineHelp ? 2 : 0
|
|
4286
4309
|
}));
|
|
4287
|
-
var NumberInputField =
|
|
4310
|
+
var NumberInputField = React66.forwardRef((_a, ref) => {
|
|
4288
4311
|
var _b = _a, { fieldText, inlineHelpText } = _b, props = __objRest(_b, ["fieldText", "inlineHelpText"]);
|
|
4289
4312
|
const theme2 = useTheme();
|
|
4290
4313
|
const { colour, description } = theme2.tokens.components.inputs;
|
|
4291
|
-
const fieldSize =
|
|
4314
|
+
const fieldSize = parseTokenValue15(
|
|
4292
4315
|
theme2.tokens.components.numberField.size.large.height
|
|
4293
4316
|
);
|
|
4294
4317
|
const inputElement = /* @__PURE__ */ jsx(
|
|
@@ -4374,14 +4397,14 @@ var NumberInputField = React65.forwardRef((_a, ref) => {
|
|
|
4374
4397
|
return fieldContent;
|
|
4375
4398
|
});
|
|
4376
4399
|
NumberInputField.displayName = "NumberInput.Field";
|
|
4377
|
-
var
|
|
4378
|
-
var StyledRoot5 =
|
|
4400
|
+
var parseTokenValue16 = (value) => parseFloat(value);
|
|
4401
|
+
var StyledRoot5 = styled51(View)(({ theme: theme2 }) => {
|
|
4379
4402
|
const { spacing } = theme2.tokens.components.inputs;
|
|
4380
4403
|
return {
|
|
4381
|
-
gap:
|
|
4404
|
+
gap: parseTokenValue16(spacing.gap)
|
|
4382
4405
|
};
|
|
4383
4406
|
});
|
|
4384
|
-
var NumberInputRoot =
|
|
4407
|
+
var NumberInputRoot = React66.forwardRef(
|
|
4385
4408
|
(_a, ref) => {
|
|
4386
4409
|
var _b = _a, {
|
|
4387
4410
|
label,
|
|
@@ -4431,14 +4454,14 @@ var NumberInput = Object.assign(NumberInputRoot, {
|
|
|
4431
4454
|
Description: InputDescription,
|
|
4432
4455
|
Error: InputError
|
|
4433
4456
|
});
|
|
4434
|
-
var
|
|
4435
|
-
var StyledContainer =
|
|
4457
|
+
var parseTokenValue17 = (value) => parseFloat(value);
|
|
4458
|
+
var StyledContainer = styled51(View)(({ switchGap, switchOpacity }) => ({
|
|
4436
4459
|
flexDirection: "row",
|
|
4437
4460
|
alignItems: "flex-start",
|
|
4438
4461
|
gap: switchGap,
|
|
4439
4462
|
opacity: switchOpacity
|
|
4440
4463
|
}));
|
|
4441
|
-
var StyledControlTrack =
|
|
4464
|
+
var StyledControlTrack = styled51(View)(
|
|
4442
4465
|
({
|
|
4443
4466
|
switchChecked,
|
|
4444
4467
|
controlWidth,
|
|
@@ -4464,19 +4487,19 @@ var StyledControlTrack = styled50(View)(
|
|
|
4464
4487
|
justifyContent: "center"
|
|
4465
4488
|
})
|
|
4466
4489
|
);
|
|
4467
|
-
var StyledThumb =
|
|
4490
|
+
var StyledThumb = styled51(Animated.View)(({ thumbSize, thumbBgColor }) => ({
|
|
4468
4491
|
width: thumbSize,
|
|
4469
4492
|
height: thumbSize,
|
|
4470
4493
|
borderRadius: thumbSize / 2,
|
|
4471
4494
|
backgroundColor: thumbBgColor,
|
|
4472
4495
|
position: "absolute"
|
|
4473
4496
|
}));
|
|
4474
|
-
var StyledContent =
|
|
4497
|
+
var StyledContent = styled51(View)(({ contentGap }) => ({
|
|
4475
4498
|
gap: contentGap,
|
|
4476
4499
|
flex: 1,
|
|
4477
4500
|
minWidth: 0
|
|
4478
4501
|
}));
|
|
4479
|
-
var Switch =
|
|
4502
|
+
var Switch = React66.forwardRef(
|
|
4480
4503
|
(_a, ref) => {
|
|
4481
4504
|
var _b = _a, {
|
|
4482
4505
|
label,
|
|
@@ -4496,12 +4519,12 @@ var Switch = React65.forwardRef(
|
|
|
4496
4519
|
const theme2 = useTheme();
|
|
4497
4520
|
const { size, colour, opacity, borderWidth, spacing, typography } = theme2.tokens.components.switch;
|
|
4498
4521
|
const isControlled = controlledChecked !== void 0;
|
|
4499
|
-
const [internalChecked, setInternalChecked] =
|
|
4522
|
+
const [internalChecked, setInternalChecked] = React66.useState(defaultChecked);
|
|
4500
4523
|
const isChecked = isControlled ? controlledChecked : internalChecked;
|
|
4501
|
-
const controlWidth =
|
|
4502
|
-
const controlHeight =
|
|
4503
|
-
const thumbSize =
|
|
4504
|
-
const borderWidthValue =
|
|
4524
|
+
const controlWidth = parseTokenValue17(size.control.width);
|
|
4525
|
+
const controlHeight = parseTokenValue17(size.control.height);
|
|
4526
|
+
const thumbSize = parseTokenValue17(size.thumb.default);
|
|
4527
|
+
const borderWidthValue = parseTokenValue17(borderWidth.control.default);
|
|
4505
4528
|
const inset = 2;
|
|
4506
4529
|
const offTranslateX = inset;
|
|
4507
4530
|
const onTranslateX = controlWidth - borderWidthValue * 2 - thumbSize - inset;
|
|
@@ -4527,7 +4550,7 @@ var Switch = React65.forwardRef(
|
|
|
4527
4550
|
StyledContainer,
|
|
4528
4551
|
__spreadProps(__spreadValues({
|
|
4529
4552
|
ref,
|
|
4530
|
-
switchGap:
|
|
4553
|
+
switchGap: parseTokenValue17(spacing.gap),
|
|
4531
4554
|
switchOpacity: disabled ? parseFloat(opacity.disabled) : 1
|
|
4532
4555
|
}, rest), {
|
|
4533
4556
|
children: [
|
|
@@ -4561,7 +4584,7 @@ var Switch = React65.forwardRef(
|
|
|
4561
4584
|
)
|
|
4562
4585
|
}
|
|
4563
4586
|
),
|
|
4564
|
-
(label || subText) && /* @__PURE__ */ jsxs(StyledContent, { contentGap:
|
|
4587
|
+
(label || subText) && /* @__PURE__ */ jsxs(StyledContent, { contentGap: parseTokenValue17(spacing.content.gap), children: [
|
|
4565
4588
|
label && /* @__PURE__ */ jsx(Typography, { token: typography.label, color: colour.text.title, children: label }),
|
|
4566
4589
|
subText && /* @__PURE__ */ jsx(
|
|
4567
4590
|
Typography,
|
|
@@ -4578,8 +4601,8 @@ var Switch = React65.forwardRef(
|
|
|
4578
4601
|
}
|
|
4579
4602
|
);
|
|
4580
4603
|
Switch.displayName = "Switch";
|
|
4581
|
-
var
|
|
4582
|
-
var StyledTag =
|
|
4604
|
+
var parseTokenValue18 = (value) => parseFloat(value);
|
|
4605
|
+
var StyledTag = styled51(View)(({ theme: theme2, tagVariant, tagSize }) => {
|
|
4583
4606
|
const { sizing, spacing, colour, badge } = theme2.tokens.components.tags;
|
|
4584
4607
|
const backgroundColorMap = {
|
|
4585
4608
|
primary: colour.primary.background,
|
|
@@ -4594,15 +4617,15 @@ var StyledTag = styled50(View)(({ theme: theme2, tagVariant, tagSize }) => {
|
|
|
4594
4617
|
flexDirection: "row",
|
|
4595
4618
|
alignItems: "center",
|
|
4596
4619
|
justifyContent: "center",
|
|
4597
|
-
height:
|
|
4598
|
-
minWidth:
|
|
4599
|
-
paddingHorizontal:
|
|
4600
|
-
gap:
|
|
4601
|
-
borderRadius:
|
|
4620
|
+
height: parseTokenValue18(sizing[tagSize].height),
|
|
4621
|
+
minWidth: parseTokenValue18(sizing[tagSize].minWidth),
|
|
4622
|
+
paddingHorizontal: parseTokenValue18(spacing.horizontalPadding),
|
|
4623
|
+
gap: parseTokenValue18(spacing[tagSize].gap),
|
|
4624
|
+
borderRadius: parseTokenValue18(badge.borderRadius.default),
|
|
4602
4625
|
backgroundColor: backgroundColorMap[tagVariant]
|
|
4603
4626
|
};
|
|
4604
4627
|
});
|
|
4605
|
-
var Tag =
|
|
4628
|
+
var Tag = React66.forwardRef(
|
|
4606
4629
|
(_a, ref) => {
|
|
4607
4630
|
var _b = _a, { variant = "primary", size = "medium", icon, children } = _b, rest = __objRest(_b, ["variant", "size", "icon", "children"]);
|
|
4608
4631
|
const theme2 = useTheme();
|
|
@@ -4651,22 +4674,22 @@ var Tag = React65.forwardRef(
|
|
|
4651
4674
|
}
|
|
4652
4675
|
);
|
|
4653
4676
|
Tag.displayName = "Tag";
|
|
4654
|
-
var
|
|
4655
|
-
var StyledTextAreaWrapper =
|
|
4677
|
+
var parseTokenValue19 = (value) => parseFloat(value);
|
|
4678
|
+
var StyledTextAreaWrapper = styled51(Animated.View)(({ theme: theme2, isDisabled }) => {
|
|
4656
4679
|
const { spacing, colour, borderRadius, size } = theme2.tokens.components.inputs;
|
|
4657
4680
|
const { dimensions: dimensions3 } = theme2.tokens.semantics;
|
|
4658
4681
|
return {
|
|
4659
4682
|
flexDirection: "column",
|
|
4660
|
-
gap:
|
|
4683
|
+
gap: parseTokenValue19(spacing.field.gap),
|
|
4661
4684
|
width: "100%",
|
|
4662
|
-
minWidth:
|
|
4663
|
-
minHeight:
|
|
4685
|
+
minWidth: parseTokenValue19(size.field.minWidth),
|
|
4686
|
+
minHeight: parseTokenValue19(dimensions3.sizing["3xl"]),
|
|
4664
4687
|
backgroundColor: isDisabled ? colour.field.background.inactive : colour.field.background.default,
|
|
4665
|
-
borderRadius:
|
|
4688
|
+
borderRadius: parseTokenValue19(borderRadius.field.default),
|
|
4666
4689
|
position: "relative"
|
|
4667
4690
|
};
|
|
4668
4691
|
});
|
|
4669
|
-
var StyledTextArea =
|
|
4692
|
+
var StyledTextArea = styled51(TextInput)(({ theme: theme2 }) => {
|
|
4670
4693
|
const { colour } = theme2.tokens.components.inputs;
|
|
4671
4694
|
return __spreadValues({
|
|
4672
4695
|
flex: 1,
|
|
@@ -4681,17 +4704,17 @@ var StyledTextArea = styled50(TextInput)(({ theme: theme2 }) => {
|
|
|
4681
4704
|
outlineColor: "transparent"
|
|
4682
4705
|
});
|
|
4683
4706
|
});
|
|
4684
|
-
var StyledFocusRing2 =
|
|
4707
|
+
var StyledFocusRing2 = styled51(View)({
|
|
4685
4708
|
position: "absolute",
|
|
4686
4709
|
pointerEvents: "none"
|
|
4687
4710
|
});
|
|
4688
|
-
var TextAreaContainer =
|
|
4711
|
+
var TextAreaContainer = styled51(View)({
|
|
4689
4712
|
position: "relative",
|
|
4690
4713
|
width: "100%",
|
|
4691
4714
|
flex: 1,
|
|
4692
4715
|
flexDirection: "column"
|
|
4693
4716
|
});
|
|
4694
|
-
var IconWrapper2 =
|
|
4717
|
+
var IconWrapper2 = styled51(View)(({ side }) => {
|
|
4695
4718
|
return {
|
|
4696
4719
|
position: "absolute",
|
|
4697
4720
|
top: 0,
|
|
@@ -4702,7 +4725,7 @@ var IconWrapper2 = styled50(View)(({ side }) => {
|
|
|
4702
4725
|
zIndex: 1
|
|
4703
4726
|
};
|
|
4704
4727
|
});
|
|
4705
|
-
var TextAreaField =
|
|
4728
|
+
var TextAreaField = React66.forwardRef(
|
|
4706
4729
|
(_a, ref) => {
|
|
4707
4730
|
var _b = _a, {
|
|
4708
4731
|
leadingIcon,
|
|
@@ -4744,12 +4767,12 @@ var TextAreaField = React65.forwardRef(
|
|
|
4744
4767
|
);
|
|
4745
4768
|
const isDisabled = editable === false;
|
|
4746
4769
|
const hasState = state === "error" || state === "success";
|
|
4747
|
-
const baseBorderWidth =
|
|
4748
|
-
const selectedBorderWidth =
|
|
4749
|
-
const focusBorderWidth =
|
|
4750
|
-
const fieldBorderRadius =
|
|
4751
|
-
const baseVerticalPadding =
|
|
4752
|
-
const baseHorizontalPadding =
|
|
4770
|
+
const baseBorderWidth = parseTokenValue19(borderWidth.field.default);
|
|
4771
|
+
const selectedBorderWidth = parseTokenValue19(borderWidth.field.selected);
|
|
4772
|
+
const focusBorderWidth = parseTokenValue19(borderWidth.field.focus);
|
|
4773
|
+
const fieldBorderRadius = parseTokenValue19(borderRadius.field.default);
|
|
4774
|
+
const baseVerticalPadding = parseTokenValue19(spacing.field.verticalPadding);
|
|
4775
|
+
const baseHorizontalPadding = parseTokenValue19(
|
|
4753
4776
|
spacing.field.horizontalPadding
|
|
4754
4777
|
);
|
|
4755
4778
|
const borderDelta = selectedBorderWidth - baseBorderWidth;
|
|
@@ -4805,11 +4828,11 @@ var TextAreaField = React65.forwardRef(
|
|
|
4805
4828
|
var _a2;
|
|
4806
4829
|
(_a2 = internalInputRef.current) == null ? void 0 : _a2.focus();
|
|
4807
4830
|
};
|
|
4808
|
-
const fieldHeight =
|
|
4831
|
+
const fieldHeight = parseTokenValue19(size.field.height);
|
|
4809
4832
|
const textAreaMinHeight = fieldHeight;
|
|
4810
|
-
const iconGap =
|
|
4811
|
-
const leadingIconSize =
|
|
4812
|
-
const trailingIconSize =
|
|
4833
|
+
const iconGap = parseTokenValue19(spacing.field.gap);
|
|
4834
|
+
const leadingIconSize = parseTokenValue19(dimensions3.sizing.xl);
|
|
4835
|
+
const trailingIconSize = parseTokenValue19(dimensions3.sizing.md);
|
|
4813
4836
|
const leadingIconPadding = leadingIconSize + iconGap;
|
|
4814
4837
|
const trailingIconPadding = trailingIconSize + iconGap;
|
|
4815
4838
|
return /* @__PURE__ */ jsx(Pressable, { onPress: handleWrapperPress, children: /* @__PURE__ */ jsxs(
|
|
@@ -4877,25 +4900,25 @@ var TextAreaField = React65.forwardRef(
|
|
|
4877
4900
|
}
|
|
4878
4901
|
);
|
|
4879
4902
|
TextAreaField.displayName = "TextArea.Field";
|
|
4880
|
-
var
|
|
4881
|
-
var StyledLabelWrapper =
|
|
4903
|
+
var parseTokenValue20 = (value) => parseFloat(value);
|
|
4904
|
+
var StyledLabelWrapper = styled51(View)({
|
|
4882
4905
|
flexDirection: "row",
|
|
4883
4906
|
alignItems: "center",
|
|
4884
4907
|
justifyContent: "space-between",
|
|
4885
4908
|
width: "100%"
|
|
4886
4909
|
});
|
|
4887
|
-
var StyledLabel =
|
|
4910
|
+
var StyledLabel = styled51(View)(({ labelGap }) => ({
|
|
4888
4911
|
flexDirection: "row",
|
|
4889
4912
|
alignItems: "center",
|
|
4890
4913
|
gap: labelGap
|
|
4891
4914
|
}));
|
|
4892
|
-
var StyledCharCountWrapper =
|
|
4915
|
+
var StyledCharCountWrapper = styled51(View)(({ charCountGap, charCountPadding }) => ({
|
|
4893
4916
|
flexDirection: "row",
|
|
4894
4917
|
alignItems: "center",
|
|
4895
4918
|
gap: charCountGap,
|
|
4896
4919
|
paddingLeft: charCountPadding
|
|
4897
4920
|
}));
|
|
4898
|
-
var TextAreaLabel =
|
|
4921
|
+
var TextAreaLabel = React66.forwardRef(
|
|
4899
4922
|
(_a, ref) => {
|
|
4900
4923
|
var _b = _a, {
|
|
4901
4924
|
optionalText,
|
|
@@ -4915,7 +4938,7 @@ var TextAreaLabel = React65.forwardRef(
|
|
|
4915
4938
|
const showCharacterCount = maxLength !== void 0 && currentLength !== void 0;
|
|
4916
4939
|
const isOverLimit = currentLength !== void 0 && maxLength !== void 0 && currentLength > maxLength;
|
|
4917
4940
|
return /* @__PURE__ */ jsxs(StyledLabelWrapper, __spreadProps(__spreadValues({ ref }, rest), { children: [
|
|
4918
|
-
/* @__PURE__ */ jsxs(StyledLabel, { labelGap:
|
|
4941
|
+
/* @__PURE__ */ jsxs(StyledLabel, { labelGap: parseTokenValue20(spacing.label.gap), children: [
|
|
4919
4942
|
/* @__PURE__ */ jsx(
|
|
4920
4943
|
Typography,
|
|
4921
4944
|
{
|
|
@@ -4929,8 +4952,8 @@ var TextAreaLabel = React65.forwardRef(
|
|
|
4929
4952
|
showCharacterCount && /* @__PURE__ */ jsxs(
|
|
4930
4953
|
StyledCharCountWrapper,
|
|
4931
4954
|
{
|
|
4932
|
-
charCountGap:
|
|
4933
|
-
charCountPadding:
|
|
4955
|
+
charCountGap: parseTokenValue20(spacing.field.gap),
|
|
4956
|
+
charCountPadding: parseTokenValue20(spacing.description.leftPadding),
|
|
4934
4957
|
children: [
|
|
4935
4958
|
isOverLimit && /* @__PURE__ */ jsx(Icon, { icon: Error_default, size: "sm", colour: "error" }),
|
|
4936
4959
|
/* @__PURE__ */ jsxs(
|
|
@@ -4952,14 +4975,14 @@ var TextAreaLabel = React65.forwardRef(
|
|
|
4952
4975
|
}
|
|
4953
4976
|
);
|
|
4954
4977
|
TextAreaLabel.displayName = "TextArea.Label";
|
|
4955
|
-
var
|
|
4956
|
-
var StyledRoot6 =
|
|
4978
|
+
var parseTokenValue21 = (value) => parseFloat(value);
|
|
4979
|
+
var StyledRoot6 = styled51(View)(({ theme: theme2 }) => {
|
|
4957
4980
|
const { spacing } = theme2.tokens.components.inputs;
|
|
4958
4981
|
return {
|
|
4959
|
-
gap:
|
|
4982
|
+
gap: parseTokenValue21(spacing.gap)
|
|
4960
4983
|
};
|
|
4961
4984
|
});
|
|
4962
|
-
var TextAreaRoot =
|
|
4985
|
+
var TextAreaRoot = React66.forwardRef(
|
|
4963
4986
|
(_a, ref) => {
|
|
4964
4987
|
var _b = _a, {
|
|
4965
4988
|
label,
|
|
@@ -4986,8 +5009,8 @@ var TextAreaRoot = React65.forwardRef(
|
|
|
4986
5009
|
"defaultValue",
|
|
4987
5010
|
"onChangeText"
|
|
4988
5011
|
]);
|
|
4989
|
-
const [charCount, setCharCount] =
|
|
4990
|
-
|
|
5012
|
+
const [charCount, setCharCount] = React66.useState(0);
|
|
5013
|
+
React66.useEffect(() => {
|
|
4991
5014
|
if (value !== void 0) {
|
|
4992
5015
|
setCharCount(String(value).length);
|
|
4993
5016
|
} else if (defaultValue !== void 0) {
|
|
@@ -5040,38 +5063,38 @@ var TextArea = Object.assign(TextAreaRoot, {
|
|
|
5040
5063
|
Description: InputDescription,
|
|
5041
5064
|
Error: InputError
|
|
5042
5065
|
});
|
|
5043
|
-
var AccordionContext =
|
|
5066
|
+
var AccordionContext = React66.createContext({
|
|
5044
5067
|
openValues: [],
|
|
5045
5068
|
toggle: () => {
|
|
5046
5069
|
},
|
|
5047
5070
|
disabled: false,
|
|
5048
5071
|
size: "small"
|
|
5049
5072
|
});
|
|
5050
|
-
var
|
|
5051
|
-
var StyledRoot7 =
|
|
5073
|
+
var parseTokenValue22 = (value) => parseFloat(value);
|
|
5074
|
+
var StyledRoot7 = styled51(View)(({ rootGap }) => ({
|
|
5052
5075
|
width: "100%",
|
|
5053
5076
|
flexDirection: "column",
|
|
5054
5077
|
gap: rootGap
|
|
5055
5078
|
}));
|
|
5056
|
-
var StyledItem =
|
|
5079
|
+
var StyledItem = styled51(View)({
|
|
5057
5080
|
flexDirection: "column"
|
|
5058
5081
|
});
|
|
5059
|
-
var StyledTrigger =
|
|
5082
|
+
var StyledTrigger = styled51(Pressable)(({ triggerOpacity }) => ({
|
|
5060
5083
|
flexDirection: "row",
|
|
5061
5084
|
alignItems: "center",
|
|
5062
5085
|
justifyContent: "space-between",
|
|
5063
5086
|
width: "100%",
|
|
5064
5087
|
opacity: triggerOpacity
|
|
5065
5088
|
}));
|
|
5066
|
-
var StyledPanel =
|
|
5089
|
+
var StyledPanel = styled51(View)(({ panelGap }) => ({
|
|
5067
5090
|
marginTop: panelGap
|
|
5068
5091
|
}));
|
|
5069
|
-
var
|
|
5092
|
+
var StyledDivider2 = styled51(View)(({ dividerColor, dividerMarginTop }) => ({
|
|
5070
5093
|
height: 1,
|
|
5071
5094
|
backgroundColor: dividerColor,
|
|
5072
5095
|
marginTop: dividerMarginTop
|
|
5073
5096
|
}));
|
|
5074
|
-
var AccordionItem =
|
|
5097
|
+
var AccordionItem = React66.forwardRef(
|
|
5075
5098
|
(_a, ref) => {
|
|
5076
5099
|
var _b = _a, { title, children, value, disabled: itemDisabled } = _b, rest = __objRest(_b, ["title", "children", "value", "disabled"]);
|
|
5077
5100
|
const theme2 = useTheme();
|
|
@@ -5081,7 +5104,7 @@ var AccordionItem = React65.forwardRef(
|
|
|
5081
5104
|
toggle,
|
|
5082
5105
|
disabled: rootDisabled,
|
|
5083
5106
|
size
|
|
5084
|
-
} =
|
|
5107
|
+
} = React66.useContext(AccordionContext);
|
|
5085
5108
|
const itemValue = value != null ? value : title;
|
|
5086
5109
|
const isOpen = openValues.includes(itemValue);
|
|
5087
5110
|
const isDisabled = itemDisabled || rootDisabled;
|
|
@@ -5120,7 +5143,7 @@ var AccordionItem = React65.forwardRef(
|
|
|
5120
5143
|
isOpen && /* @__PURE__ */ jsx(
|
|
5121
5144
|
StyledPanel,
|
|
5122
5145
|
{
|
|
5123
|
-
panelGap:
|
|
5146
|
+
panelGap: parseTokenValue22(accordion.spacing.content.gap),
|
|
5124
5147
|
children: /* @__PURE__ */ jsx(
|
|
5125
5148
|
Typography,
|
|
5126
5149
|
{
|
|
@@ -5132,17 +5155,17 @@ var AccordionItem = React65.forwardRef(
|
|
|
5132
5155
|
}
|
|
5133
5156
|
),
|
|
5134
5157
|
/* @__PURE__ */ jsx(
|
|
5135
|
-
|
|
5158
|
+
StyledDivider2,
|
|
5136
5159
|
{
|
|
5137
5160
|
dividerColor: theme2.tokens.semantics.colour.border.default,
|
|
5138
|
-
dividerMarginTop:
|
|
5161
|
+
dividerMarginTop: parseTokenValue22(accordion.spacing.gap)
|
|
5139
5162
|
}
|
|
5140
5163
|
)
|
|
5141
5164
|
] }));
|
|
5142
5165
|
}
|
|
5143
5166
|
);
|
|
5144
5167
|
AccordionItem.displayName = "Accordion.Item";
|
|
5145
|
-
var AccordionRoot =
|
|
5168
|
+
var AccordionRoot = React66.forwardRef(
|
|
5146
5169
|
(_a, ref) => {
|
|
5147
5170
|
var _b = _a, {
|
|
5148
5171
|
children,
|
|
@@ -5164,11 +5187,11 @@ var AccordionRoot = React65.forwardRef(
|
|
|
5164
5187
|
const theme2 = useTheme();
|
|
5165
5188
|
const { accordion } = theme2.tokens.components;
|
|
5166
5189
|
const isControlled = controlledValue !== void 0;
|
|
5167
|
-
const [internalValue, setInternalValue] =
|
|
5190
|
+
const [internalValue, setInternalValue] = React66.useState(
|
|
5168
5191
|
defaultValue != null ? defaultValue : []
|
|
5169
5192
|
);
|
|
5170
5193
|
const openValues = isControlled ? controlledValue : internalValue;
|
|
5171
|
-
const toggle =
|
|
5194
|
+
const toggle = React66.useCallback(
|
|
5172
5195
|
(itemValue) => {
|
|
5173
5196
|
const isOpen = openValues.includes(itemValue);
|
|
5174
5197
|
let next;
|
|
@@ -5186,7 +5209,7 @@ var AccordionRoot = React65.forwardRef(
|
|
|
5186
5209
|
},
|
|
5187
5210
|
[openValues, multiple, isControlled, onValueChange]
|
|
5188
5211
|
);
|
|
5189
|
-
const ctx =
|
|
5212
|
+
const ctx = React66.useMemo(
|
|
5190
5213
|
() => ({ openValues, toggle, disabled, size }),
|
|
5191
5214
|
[openValues, toggle, disabled, size]
|
|
5192
5215
|
);
|
|
@@ -5194,7 +5217,7 @@ var AccordionRoot = React65.forwardRef(
|
|
|
5194
5217
|
StyledRoot7,
|
|
5195
5218
|
__spreadProps(__spreadValues({
|
|
5196
5219
|
ref,
|
|
5197
|
-
rootGap:
|
|
5220
|
+
rootGap: parseTokenValue22(accordion.spacing.gap)
|
|
5198
5221
|
}, rest), {
|
|
5199
5222
|
children
|
|
5200
5223
|
})
|
|
@@ -5316,7 +5339,7 @@ function buildDelayedEntering(variant, delayMs) {
|
|
|
5316
5339
|
b.delay(delayMs);
|
|
5317
5340
|
return b;
|
|
5318
5341
|
}
|
|
5319
|
-
var Animated5 =
|
|
5342
|
+
var Animated5 = React66.forwardRef(
|
|
5320
5343
|
(_a, ref) => {
|
|
5321
5344
|
var _b = _a, { variant = "fade", delay, exit = true, children } = _b, props = __objRest(_b, ["variant", "delay", "exit", "children"]);
|
|
5322
5345
|
const delayMs = delay !== void 0 && delay > 0 ? Math.round(delay * 1e3) : 0;
|
|
@@ -5334,7 +5357,7 @@ var Animated5 = React65.forwardRef(
|
|
|
5334
5357
|
}
|
|
5335
5358
|
);
|
|
5336
5359
|
Animated5.displayName = "Animated";
|
|
5337
|
-
var DrawerContext =
|
|
5360
|
+
var DrawerContext = React66.createContext({
|
|
5338
5361
|
isOpen: false,
|
|
5339
5362
|
modalVisible: false,
|
|
5340
5363
|
openDrawer: () => {
|
|
@@ -5344,9 +5367,9 @@ var DrawerContext = React65.createContext({
|
|
|
5344
5367
|
onExitComplete: () => {
|
|
5345
5368
|
}
|
|
5346
5369
|
});
|
|
5347
|
-
var useDrawerContext = () =>
|
|
5370
|
+
var useDrawerContext = () => React66.useContext(DrawerContext);
|
|
5348
5371
|
var FADE_DURATION = 220;
|
|
5349
|
-
var DrawerOverlay =
|
|
5372
|
+
var DrawerOverlay = React66.forwardRef(({ accessible = false }, _ref) => {
|
|
5350
5373
|
const theme2 = useTheme();
|
|
5351
5374
|
const { isOpen, closeDrawer } = useDrawerContext();
|
|
5352
5375
|
const opacity = useRef(new Animated.Value(0)).current;
|
|
@@ -5380,19 +5403,19 @@ var DrawerOverlay = React65.forwardRef(({ accessible = false }, _ref) => {
|
|
|
5380
5403
|
);
|
|
5381
5404
|
});
|
|
5382
5405
|
DrawerOverlay.displayName = "Drawer.Overlay";
|
|
5383
|
-
var DrawerDragContext =
|
|
5384
|
-
var useDrawerDragContext = () =>
|
|
5406
|
+
var DrawerDragContext = React66.createContext(null);
|
|
5407
|
+
var useDrawerDragContext = () => React66.useContext(DrawerDragContext);
|
|
5385
5408
|
var DrawerMeasureContext = createContext(null);
|
|
5386
5409
|
var useDrawerMeasureContext = () => useContext(DrawerMeasureContext);
|
|
5387
|
-
var DrawerFooterContext =
|
|
5388
|
-
var useDrawerFooterContext = () =>
|
|
5389
|
-
var DrawerHeaderContext =
|
|
5390
|
-
var useDrawerHeaderContext = () =>
|
|
5410
|
+
var DrawerFooterContext = React66.createContext(false);
|
|
5411
|
+
var useDrawerFooterContext = () => React66.useContext(DrawerFooterContext);
|
|
5412
|
+
var DrawerHeaderContext = React66.createContext(null);
|
|
5413
|
+
var useDrawerHeaderContext = () => React66.useContext(DrawerHeaderContext);
|
|
5391
5414
|
var OPEN_DURATION = 320;
|
|
5392
5415
|
var CLOSE_DURATION = 220;
|
|
5393
5416
|
var DISMISS_THRESHOLD = 80;
|
|
5394
|
-
var
|
|
5395
|
-
var StyledPanel2 =
|
|
5417
|
+
var parseTokenValue23 = (value) => parseFloat(value);
|
|
5418
|
+
var StyledPanel2 = styled51(View)(
|
|
5396
5419
|
({
|
|
5397
5420
|
panelBorderRadius,
|
|
5398
5421
|
panelBgColor,
|
|
@@ -5423,7 +5446,7 @@ var StyledPanel2 = styled50(View)(
|
|
|
5423
5446
|
overflow: "hidden"
|
|
5424
5447
|
})
|
|
5425
5448
|
);
|
|
5426
|
-
var DrawerContent =
|
|
5449
|
+
var DrawerContent = React66.forwardRef(
|
|
5427
5450
|
(_a, ref) => {
|
|
5428
5451
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
5429
5452
|
var _a2;
|
|
@@ -5618,11 +5641,11 @@ var DrawerContent = React65.forwardRef(
|
|
|
5618
5641
|
() => ({ panHandlers: panResponder.panHandlers }),
|
|
5619
5642
|
[panResponder.panHandlers]
|
|
5620
5643
|
);
|
|
5621
|
-
const hasFooter =
|
|
5622
|
-
(child) =>
|
|
5644
|
+
const hasFooter = React66.Children.toArray(children).some(
|
|
5645
|
+
(child) => React66.isValidElement(child) && child.type.displayName === "Drawer.Footer"
|
|
5623
5646
|
);
|
|
5624
|
-
const headerChild =
|
|
5625
|
-
(child) =>
|
|
5647
|
+
const headerChild = React66.Children.toArray(children).find(
|
|
5648
|
+
(child) => React66.isValidElement(child) && child.type.displayName === "Drawer.Header"
|
|
5626
5649
|
);
|
|
5627
5650
|
const headerContextValue = headerChild != null ? {
|
|
5628
5651
|
variant: (_a2 = headerChild.props.variant) != null ? _a2 : "titleAndText"
|
|
@@ -5640,15 +5663,15 @@ var DrawerContent = React65.forwardRef(
|
|
|
5640
5663
|
__spreadProps(__spreadValues({
|
|
5641
5664
|
ref,
|
|
5642
5665
|
onLayout,
|
|
5643
|
-
panelBorderRadius:
|
|
5666
|
+
panelBorderRadius: parseTokenValue23(drawer.borderRadius.top),
|
|
5644
5667
|
panelBgColor: colour.background.container.default,
|
|
5645
|
-
panelMaxWidth:
|
|
5668
|
+
panelMaxWidth: parseTokenValue23(drawer.size.maxWidth),
|
|
5646
5669
|
panelFlex: panelHeight > 0 ? 1 : void 0,
|
|
5647
|
-
panelBorderWidth:
|
|
5670
|
+
panelBorderWidth: parseTokenValue23(dimensions3.borderWidth.sm),
|
|
5648
5671
|
panelBorderColor: colour.border.default,
|
|
5649
5672
|
panelShadowColor: modal.shadow.color,
|
|
5650
|
-
panelShadowOffsetY:
|
|
5651
|
-
panelShadowBlur:
|
|
5673
|
+
panelShadowOffsetY: parseTokenValue23(modal.shadow.offsetY),
|
|
5674
|
+
panelShadowBlur: parseTokenValue23(modal.shadow.blur),
|
|
5652
5675
|
accessible: true,
|
|
5653
5676
|
accessibilityRole: "none",
|
|
5654
5677
|
accessibilityViewIsModal: true
|
|
@@ -5669,8 +5692,8 @@ var styles = StyleSheet.create({
|
|
|
5669
5692
|
right: 0
|
|
5670
5693
|
}
|
|
5671
5694
|
});
|
|
5672
|
-
var
|
|
5673
|
-
var StyledWrapper =
|
|
5695
|
+
var parseTokenValue24 = (value) => parseFloat(value);
|
|
5696
|
+
var StyledWrapper = styled51(View)(
|
|
5674
5697
|
({ grabberPaddingTop }) => ({
|
|
5675
5698
|
alignItems: "center",
|
|
5676
5699
|
justifyContent: "center",
|
|
@@ -5679,13 +5702,13 @@ var StyledWrapper = styled50(View)(
|
|
|
5679
5702
|
paddingBottom: grabberPaddingTop
|
|
5680
5703
|
})
|
|
5681
5704
|
);
|
|
5682
|
-
var StyledBar =
|
|
5705
|
+
var StyledBar = styled51(View)(({ barWidth, barHeight, barBorderRadius, barColor }) => ({
|
|
5683
5706
|
width: barWidth,
|
|
5684
5707
|
height: barHeight,
|
|
5685
5708
|
borderRadius: barBorderRadius,
|
|
5686
5709
|
backgroundColor: barColor
|
|
5687
5710
|
}));
|
|
5688
|
-
var DrawerGrabber =
|
|
5711
|
+
var DrawerGrabber = React66.forwardRef(
|
|
5689
5712
|
(props, ref) => {
|
|
5690
5713
|
var _a;
|
|
5691
5714
|
const theme2 = useTheme();
|
|
@@ -5696,14 +5719,14 @@ var DrawerGrabber = React65.forwardRef(
|
|
|
5696
5719
|
StyledWrapper,
|
|
5697
5720
|
__spreadProps(__spreadValues(__spreadValues({
|
|
5698
5721
|
ref,
|
|
5699
|
-
grabberPaddingTop:
|
|
5722
|
+
grabberPaddingTop: parseTokenValue24(drawer.spacing.grabber.paddingTop)
|
|
5700
5723
|
}, (_a = dragContext == null ? void 0 : dragContext.panHandlers) != null ? _a : {}), props), {
|
|
5701
5724
|
children: /* @__PURE__ */ jsx(
|
|
5702
5725
|
StyledBar,
|
|
5703
5726
|
{
|
|
5704
|
-
barWidth:
|
|
5705
|
-
barHeight:
|
|
5706
|
-
barBorderRadius:
|
|
5727
|
+
barWidth: parseTokenValue24(grabber.size.bar.width),
|
|
5728
|
+
barHeight: parseTokenValue24(grabber.size.bar.height),
|
|
5729
|
+
barBorderRadius: parseTokenValue24(borderRadius.round),
|
|
5707
5730
|
barColor: grabber.colour.background.default
|
|
5708
5731
|
}
|
|
5709
5732
|
)
|
|
@@ -5712,8 +5735,8 @@ var DrawerGrabber = React65.forwardRef(
|
|
|
5712
5735
|
}
|
|
5713
5736
|
);
|
|
5714
5737
|
DrawerGrabber.displayName = "Drawer.Grabber";
|
|
5715
|
-
var
|
|
5716
|
-
var DrawerClose =
|
|
5738
|
+
var parseTokenValue25 = (value) => parseFloat(value);
|
|
5739
|
+
var DrawerClose = React66.forwardRef(
|
|
5717
5740
|
(_a, ref) => {
|
|
5718
5741
|
var _b = _a, { "aria-label": ariaLabel = "Close" } = _b, props = __objRest(_b, ["aria-label"]);
|
|
5719
5742
|
const theme2 = useTheme();
|
|
@@ -5740,8 +5763,8 @@ var DrawerClose = React65.forwardRef(
|
|
|
5740
5763
|
style: [
|
|
5741
5764
|
styles2.floating,
|
|
5742
5765
|
{
|
|
5743
|
-
top:
|
|
5744
|
-
right:
|
|
5766
|
+
top: parseTokenValue25(spacing.close.top.md),
|
|
5767
|
+
right: parseTokenValue25(spacing.close.right.md)
|
|
5745
5768
|
}
|
|
5746
5769
|
]
|
|
5747
5770
|
}, props), {
|
|
@@ -5759,8 +5782,8 @@ var styles2 = StyleSheet.create({
|
|
|
5759
5782
|
zIndex: 1
|
|
5760
5783
|
}
|
|
5761
5784
|
});
|
|
5762
|
-
var
|
|
5763
|
-
var StyledGrabberWrapper =
|
|
5785
|
+
var parseTokenValue26 = (value) => parseFloat(value);
|
|
5786
|
+
var StyledGrabberWrapper = styled51(View)(
|
|
5764
5787
|
({ grabberPaddingTop }) => ({
|
|
5765
5788
|
alignItems: "center",
|
|
5766
5789
|
justifyContent: "center",
|
|
@@ -5768,13 +5791,13 @@ var StyledGrabberWrapper = styled50(View)(
|
|
|
5768
5791
|
paddingTop: grabberPaddingTop
|
|
5769
5792
|
})
|
|
5770
5793
|
);
|
|
5771
|
-
var StyledGrabberBar =
|
|
5794
|
+
var StyledGrabberBar = styled51(View)(({ barWidth, barHeight, barBorderRadius, barColor }) => ({
|
|
5772
5795
|
width: barWidth,
|
|
5773
5796
|
height: barHeight,
|
|
5774
5797
|
borderRadius: barBorderRadius,
|
|
5775
5798
|
backgroundColor: barColor
|
|
5776
5799
|
}));
|
|
5777
|
-
var StyledHeader =
|
|
5800
|
+
var StyledHeader = styled51(View)(
|
|
5778
5801
|
({
|
|
5779
5802
|
headerPaddingHorizontal,
|
|
5780
5803
|
headerPaddingBottom,
|
|
@@ -5794,7 +5817,7 @@ var StyledHeader = styled50(View)(
|
|
|
5794
5817
|
borderBottomColor: headerBorderColor
|
|
5795
5818
|
} : {}), headerBgColor ? { backgroundColor: headerBgColor } : {})
|
|
5796
5819
|
);
|
|
5797
|
-
var StyledImageContainer =
|
|
5820
|
+
var StyledImageContainer = styled51(View)(({ imageHeight, imageBorderRadius }) => ({
|
|
5798
5821
|
position: "relative",
|
|
5799
5822
|
width: "100%",
|
|
5800
5823
|
height: imageHeight,
|
|
@@ -5802,20 +5825,20 @@ var StyledImageContainer = styled50(View)(({ imageHeight, imageBorderRadius }) =
|
|
|
5802
5825
|
overflow: "hidden",
|
|
5803
5826
|
flexShrink: 0
|
|
5804
5827
|
}));
|
|
5805
|
-
var StyledImageCloseWrapper =
|
|
5828
|
+
var StyledImageCloseWrapper = styled51(View)(({ closeTop, closeRight }) => ({
|
|
5806
5829
|
position: "absolute",
|
|
5807
5830
|
top: closeTop,
|
|
5808
5831
|
right: closeRight,
|
|
5809
5832
|
zIndex: 1
|
|
5810
5833
|
}));
|
|
5811
|
-
var StyledTitleRow =
|
|
5834
|
+
var StyledTitleRow = styled51(View)(({ rowGap }) => ({
|
|
5812
5835
|
flexDirection: "row",
|
|
5813
5836
|
gap: rowGap,
|
|
5814
5837
|
alignItems: "flex-start",
|
|
5815
5838
|
width: "100%",
|
|
5816
5839
|
flexShrink: 0
|
|
5817
5840
|
}));
|
|
5818
|
-
var StyledTitleContent =
|
|
5841
|
+
var StyledTitleContent = styled51(View)(
|
|
5819
5842
|
({ contentGap }) => ({
|
|
5820
5843
|
flexDirection: "column",
|
|
5821
5844
|
gap: contentGap,
|
|
@@ -5826,8 +5849,8 @@ var StyledTitleContent = styled50(View)(
|
|
|
5826
5849
|
function splitChildren(children) {
|
|
5827
5850
|
let closeChild = null;
|
|
5828
5851
|
const otherChildren = [];
|
|
5829
|
-
|
|
5830
|
-
if (
|
|
5852
|
+
React66.Children.forEach(children, (child) => {
|
|
5853
|
+
if (React66.isValidElement(child) && child.type === DrawerClose) {
|
|
5831
5854
|
closeChild = child;
|
|
5832
5855
|
} else {
|
|
5833
5856
|
otherChildren.push(child);
|
|
@@ -5835,7 +5858,7 @@ function splitChildren(children) {
|
|
|
5835
5858
|
});
|
|
5836
5859
|
return { closeChild, otherChildren };
|
|
5837
5860
|
}
|
|
5838
|
-
var DrawerHeader =
|
|
5861
|
+
var DrawerHeader = React66.forwardRef(
|
|
5839
5862
|
(_a, ref) => {
|
|
5840
5863
|
var _b = _a, { variant = "titleAndText", imageSource, children } = _b, props = __objRest(_b, ["variant", "imageSource", "children"]);
|
|
5841
5864
|
var _a2, _b2, _c, _d, _e, _f;
|
|
@@ -5851,8 +5874,8 @@ var DrawerHeader = React65.forwardRef(
|
|
|
5851
5874
|
content = /* @__PURE__ */ jsxs(
|
|
5852
5875
|
StyledImageContainer,
|
|
5853
5876
|
{
|
|
5854
|
-
imageHeight:
|
|
5855
|
-
imageBorderRadius:
|
|
5877
|
+
imageHeight: parseTokenValue26(drawer.size.imageHeader.image.maxHeight),
|
|
5878
|
+
imageBorderRadius: parseTokenValue26(
|
|
5856
5879
|
drawer.drawerHeader.borderRadius.image.default
|
|
5857
5880
|
),
|
|
5858
5881
|
children: [
|
|
@@ -5867,8 +5890,8 @@ var DrawerHeader = React65.forwardRef(
|
|
|
5867
5890
|
closeChild && /* @__PURE__ */ jsx(
|
|
5868
5891
|
StyledImageCloseWrapper,
|
|
5869
5892
|
{
|
|
5870
|
-
closeTop:
|
|
5871
|
-
closeRight:
|
|
5893
|
+
closeTop: parseTokenValue26(drawer.spacing.close.top.md),
|
|
5894
|
+
closeRight: parseTokenValue26(drawer.spacing.close.right.md),
|
|
5872
5895
|
children: closeChild
|
|
5873
5896
|
}
|
|
5874
5897
|
)
|
|
@@ -5878,8 +5901,8 @@ var DrawerHeader = React65.forwardRef(
|
|
|
5878
5901
|
} else {
|
|
5879
5902
|
const containerGap = (_b2 = (_a2 = headerSpacing.container) == null ? void 0 : _a2.gap) != null ? _b2 : "0";
|
|
5880
5903
|
const contentGap = (_e = (_d = (_c = headerSpacing.container) == null ? void 0 : _c.content) == null ? void 0 : _d.gap) != null ? _e : "0";
|
|
5881
|
-
content = /* @__PURE__ */ jsxs(StyledTitleRow, { rowGap:
|
|
5882
|
-
/* @__PURE__ */ jsx(StyledTitleContent, { contentGap:
|
|
5904
|
+
content = /* @__PURE__ */ jsxs(StyledTitleRow, { rowGap: parseTokenValue26(containerGap), children: [
|
|
5905
|
+
/* @__PURE__ */ jsx(StyledTitleContent, { contentGap: parseTokenValue26(contentGap), children: otherChildren }),
|
|
5883
5906
|
closeChild
|
|
5884
5907
|
] });
|
|
5885
5908
|
}
|
|
@@ -5887,12 +5910,12 @@ var DrawerHeader = React65.forwardRef(
|
|
|
5887
5910
|
StyledHeader,
|
|
5888
5911
|
__spreadProps(__spreadValues({
|
|
5889
5912
|
ref,
|
|
5890
|
-
headerPaddingHorizontal:
|
|
5913
|
+
headerPaddingHorizontal: parseTokenValue26(
|
|
5891
5914
|
headerSpacing.horizontalPadding
|
|
5892
5915
|
),
|
|
5893
|
-
headerPaddingBottom:
|
|
5894
|
-
headerGap:
|
|
5895
|
-
headerBorderBottomWidth: variant === "titleAndText" ?
|
|
5916
|
+
headerPaddingBottom: parseTokenValue26(headerSpacing.bottomPadding),
|
|
5917
|
+
headerGap: parseTokenValue26(headerSpacing.gap),
|
|
5918
|
+
headerBorderBottomWidth: variant === "titleAndText" ? parseTokenValue26(dimensions3.borderWidth.sm) : void 0,
|
|
5896
5919
|
headerBorderColor: variant === "titleAndText" ? colour.border.default : void 0,
|
|
5897
5920
|
headerBgColor: variant === "fullBleed" ? drawer.drawerHeader.colour.background.fullBleed : void 0
|
|
5898
5921
|
}, props), {
|
|
@@ -5900,16 +5923,16 @@ var DrawerHeader = React65.forwardRef(
|
|
|
5900
5923
|
/* @__PURE__ */ jsx(
|
|
5901
5924
|
StyledGrabberWrapper,
|
|
5902
5925
|
__spreadProps(__spreadValues({
|
|
5903
|
-
grabberPaddingTop:
|
|
5926
|
+
grabberPaddingTop: parseTokenValue26(
|
|
5904
5927
|
drawer.spacing.grabber.paddingTop
|
|
5905
5928
|
)
|
|
5906
5929
|
}, (_f = dragContext == null ? void 0 : dragContext.panHandlers) != null ? _f : {}), {
|
|
5907
5930
|
children: /* @__PURE__ */ jsx(
|
|
5908
5931
|
StyledGrabberBar,
|
|
5909
5932
|
{
|
|
5910
|
-
barWidth:
|
|
5911
|
-
barHeight:
|
|
5912
|
-
barBorderRadius:
|
|
5933
|
+
barWidth: parseTokenValue26(grabber.size.bar.width),
|
|
5934
|
+
barHeight: parseTokenValue26(grabber.size.bar.height),
|
|
5935
|
+
barBorderRadius: parseTokenValue26(dimensions3.borderRadius.round),
|
|
5913
5936
|
barColor: grabber.colour.background.default
|
|
5914
5937
|
}
|
|
5915
5938
|
)
|
|
@@ -5922,7 +5945,7 @@ var DrawerHeader = React65.forwardRef(
|
|
|
5922
5945
|
}
|
|
5923
5946
|
);
|
|
5924
5947
|
DrawerHeader.displayName = "Drawer.Header";
|
|
5925
|
-
var DrawerTitle =
|
|
5948
|
+
var DrawerTitle = React66.forwardRef(
|
|
5926
5949
|
(_a, ref) => {
|
|
5927
5950
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
5928
5951
|
const theme2 = useTheme();
|
|
@@ -5938,7 +5961,7 @@ var DrawerTitle = React65.forwardRef(
|
|
|
5938
5961
|
}
|
|
5939
5962
|
);
|
|
5940
5963
|
DrawerTitle.displayName = "Drawer.Title";
|
|
5941
|
-
var DrawerDescription =
|
|
5964
|
+
var DrawerDescription = React66.forwardRef(
|
|
5942
5965
|
(_a, ref) => {
|
|
5943
5966
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
5944
5967
|
const theme2 = useTheme();
|
|
@@ -5954,8 +5977,8 @@ var DrawerDescription = React65.forwardRef(
|
|
|
5954
5977
|
}
|
|
5955
5978
|
);
|
|
5956
5979
|
DrawerDescription.displayName = "Drawer.Description";
|
|
5957
|
-
var
|
|
5958
|
-
var StyledScrollView =
|
|
5980
|
+
var parseTokenValue27 = (value) => parseFloat(value);
|
|
5981
|
+
var StyledScrollView = styled51(ScrollView)(
|
|
5959
5982
|
({
|
|
5960
5983
|
bodyPaddingHorizontal,
|
|
5961
5984
|
bodyPaddingRight,
|
|
@@ -5971,7 +5994,7 @@ var StyledScrollView = styled50(ScrollView)(
|
|
|
5971
5994
|
paddingBottom: bodyPaddingBottom
|
|
5972
5995
|
})
|
|
5973
5996
|
);
|
|
5974
|
-
var DrawerBody =
|
|
5997
|
+
var DrawerBody = React66.forwardRef(
|
|
5975
5998
|
(_a, ref) => {
|
|
5976
5999
|
var _b = _a, { children, contentContainerStyle, onContentSizeChange } = _b, props = __objRest(_b, ["children", "contentContainerStyle", "onContentSizeChange"]);
|
|
5977
6000
|
const theme2 = useTheme();
|
|
@@ -5989,12 +6012,12 @@ var DrawerBody = React65.forwardRef(
|
|
|
5989
6012
|
},
|
|
5990
6013
|
[measureContext, onContentSizeChange]
|
|
5991
6014
|
);
|
|
5992
|
-
const gap =
|
|
5993
|
-
const horizontalPadding =
|
|
5994
|
-
const topPadding =
|
|
6015
|
+
const gap = parseTokenValue27(content.slot.gap);
|
|
6016
|
+
const horizontalPadding = parseTokenValue27(content.slot.horizontalPadding);
|
|
6017
|
+
const topPadding = parseTokenValue27(content.slot.verticalPadding);
|
|
5995
6018
|
const bodyMaxHeight = windowHeight - 300;
|
|
5996
|
-
const paddingRight = headerContext === null ?
|
|
5997
|
-
const bodyPaddingBottom = !footerContext ?
|
|
6019
|
+
const paddingRight = headerContext === null ? parseTokenValue27(spacing.close.right.md) + parseTokenValue27(buttons.size.sm.height) : horizontalPadding;
|
|
6020
|
+
const bodyPaddingBottom = !footerContext ? parseTokenValue27(theme2.tokens.semantics.dimensions.spacing["2xl"]) : 0;
|
|
5998
6021
|
return /* @__PURE__ */ jsx(
|
|
5999
6022
|
StyledScrollView,
|
|
6000
6023
|
__spreadProps(__spreadValues({
|
|
@@ -6020,14 +6043,14 @@ var DrawerBody = React65.forwardRef(
|
|
|
6020
6043
|
}
|
|
6021
6044
|
);
|
|
6022
6045
|
DrawerBody.displayName = "Drawer.Body";
|
|
6023
|
-
var
|
|
6024
|
-
var StyledFooter =
|
|
6046
|
+
var parseTokenValue28 = (value) => parseFloat(value);
|
|
6047
|
+
var StyledFooter = styled51(View)(({ footerPaddingTop, footerPaddingHorizontal, footerPaddingBottom }) => ({
|
|
6025
6048
|
flexShrink: 0,
|
|
6026
6049
|
paddingTop: footerPaddingTop,
|
|
6027
6050
|
paddingHorizontal: footerPaddingHorizontal,
|
|
6028
6051
|
paddingBottom: footerPaddingBottom
|
|
6029
6052
|
}));
|
|
6030
|
-
var DrawerFooter =
|
|
6053
|
+
var DrawerFooter = React66.forwardRef(
|
|
6031
6054
|
(_a, ref) => {
|
|
6032
6055
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
6033
6056
|
const theme2 = useTheme();
|
|
@@ -6037,11 +6060,11 @@ var DrawerFooter = React65.forwardRef(
|
|
|
6037
6060
|
StyledFooter,
|
|
6038
6061
|
__spreadProps(__spreadValues({
|
|
6039
6062
|
ref,
|
|
6040
|
-
footerPaddingTop:
|
|
6041
|
-
footerPaddingHorizontal:
|
|
6063
|
+
footerPaddingTop: parseTokenValue28(spacing.footer.topPaddding),
|
|
6064
|
+
footerPaddingHorizontal: parseTokenValue28(
|
|
6042
6065
|
spacing.footer.horizontalPadding
|
|
6043
6066
|
),
|
|
6044
|
-
footerPaddingBottom:
|
|
6067
|
+
footerPaddingBottom: parseTokenValue28(spacing.bottomPadding) + insets.bottom
|
|
6045
6068
|
}, props), {
|
|
6046
6069
|
children
|
|
6047
6070
|
})
|
|
@@ -6049,7 +6072,7 @@ var DrawerFooter = React65.forwardRef(
|
|
|
6049
6072
|
}
|
|
6050
6073
|
);
|
|
6051
6074
|
DrawerFooter.displayName = "Drawer.Footer";
|
|
6052
|
-
var DrawerRoot =
|
|
6075
|
+
var DrawerRoot = React66.forwardRef(
|
|
6053
6076
|
(_a, ref) => {
|
|
6054
6077
|
var _b = _a, {
|
|
6055
6078
|
open: controlledOpen,
|
|
@@ -6090,15 +6113,15 @@ var DrawerRoot = React65.forwardRef(
|
|
|
6090
6113
|
}
|
|
6091
6114
|
);
|
|
6092
6115
|
DrawerRoot.displayName = "Drawer";
|
|
6093
|
-
var DrawerTrigger =
|
|
6116
|
+
var DrawerTrigger = React66.forwardRef(
|
|
6094
6117
|
({ children }, ref) => {
|
|
6095
|
-
const { openDrawer } =
|
|
6118
|
+
const { openDrawer } = React66.useContext(DrawerContext);
|
|
6096
6119
|
return /* @__PURE__ */ jsx(Slot, { ref, onPress: openDrawer, children });
|
|
6097
6120
|
}
|
|
6098
6121
|
);
|
|
6099
6122
|
DrawerTrigger.displayName = "Drawer.Trigger";
|
|
6100
6123
|
var DrawerPortal = ({ children, topContent }) => {
|
|
6101
|
-
const { modalVisible, closeDrawer } =
|
|
6124
|
+
const { modalVisible, closeDrawer } = React66.useContext(DrawerContext);
|
|
6102
6125
|
if (!modalVisible) return null;
|
|
6103
6126
|
return /* @__PURE__ */ jsx(
|
|
6104
6127
|
Modal,
|
|
@@ -6135,8 +6158,8 @@ var styles3 = StyleSheet.create({
|
|
|
6135
6158
|
flex: 1
|
|
6136
6159
|
}
|
|
6137
6160
|
});
|
|
6138
|
-
var
|
|
6139
|
-
var StyledDockRoot =
|
|
6161
|
+
var parseTokenValue29 = (value) => parseFloat(value);
|
|
6162
|
+
var StyledDockRoot = styled51(View)(
|
|
6140
6163
|
({
|
|
6141
6164
|
dockBgColor,
|
|
6142
6165
|
dockBorderTopWidth,
|
|
@@ -6154,7 +6177,7 @@ var StyledDockRoot = styled50(View)(
|
|
|
6154
6177
|
paddingHorizontal: dockPaddingHorizontal
|
|
6155
6178
|
})
|
|
6156
6179
|
);
|
|
6157
|
-
var StyledStackedInner =
|
|
6180
|
+
var StyledStackedInner = styled51(View)(
|
|
6158
6181
|
({ innerGap }) => ({
|
|
6159
6182
|
alignItems: "center",
|
|
6160
6183
|
gap: innerGap,
|
|
@@ -6162,21 +6185,21 @@ var StyledStackedInner = styled50(View)(
|
|
|
6162
6185
|
maxWidth: 520
|
|
6163
6186
|
})
|
|
6164
6187
|
);
|
|
6165
|
-
var StyledButtonGroup =
|
|
6188
|
+
var StyledButtonGroup = styled51(View)(({ groupDirection, groupAlign, groupJustify, groupGap }) => __spreadValues({
|
|
6166
6189
|
flexDirection: groupDirection,
|
|
6167
6190
|
alignItems: groupAlign,
|
|
6168
6191
|
justifyContent: groupJustify,
|
|
6169
6192
|
gap: groupGap,
|
|
6170
6193
|
width: "100%"
|
|
6171
6194
|
}, groupDirection === "column" ? { maxWidth: 520 } : {}));
|
|
6172
|
-
var ButtonDock =
|
|
6195
|
+
var ButtonDock = React66.forwardRef(
|
|
6173
6196
|
(_a, ref) => {
|
|
6174
6197
|
var _b = _a, { variant = "stacked", leadingContent, description, children } = _b, rest = __objRest(_b, ["variant", "leadingContent", "description", "children"]);
|
|
6175
6198
|
const theme2 = useTheme();
|
|
6176
6199
|
const { buttonDock, buttonGroup } = theme2.tokens.components;
|
|
6177
6200
|
const { dimensions: dimensions3, typography } = theme2.tokens.semantics;
|
|
6178
6201
|
const isStacked = variant === "stacked";
|
|
6179
|
-
const groupGap =
|
|
6202
|
+
const groupGap = parseTokenValue29(
|
|
6180
6203
|
isStacked ? buttonGroup.spacing.stacked.gap : buttonGroup.spacing.sideBySide.gap
|
|
6181
6204
|
);
|
|
6182
6205
|
return /* @__PURE__ */ jsx(
|
|
@@ -6184,19 +6207,19 @@ var ButtonDock = React65.forwardRef(
|
|
|
6184
6207
|
__spreadProps(__spreadValues({
|
|
6185
6208
|
ref,
|
|
6186
6209
|
dockBgColor: buttonDock.colour.background,
|
|
6187
|
-
dockBorderTopWidth:
|
|
6210
|
+
dockBorderTopWidth: parseTokenValue29(dimensions3.borderWidth.sm),
|
|
6188
6211
|
dockBorderTopColor: buttonDock.colour.border,
|
|
6189
|
-
dockPaddingVertical:
|
|
6212
|
+
dockPaddingVertical: parseTokenValue29(
|
|
6190
6213
|
buttonDock.spacing[variant].mobile.topPadding
|
|
6191
6214
|
),
|
|
6192
|
-
dockPaddingHorizontal:
|
|
6215
|
+
dockPaddingHorizontal: parseTokenValue29(
|
|
6193
6216
|
buttonDock.spacing[variant].mobile.horizontalPadding
|
|
6194
6217
|
)
|
|
6195
6218
|
}, rest), {
|
|
6196
6219
|
children: isStacked ? /* @__PURE__ */ jsxs(
|
|
6197
6220
|
StyledStackedInner,
|
|
6198
6221
|
{
|
|
6199
|
-
innerGap:
|
|
6222
|
+
innerGap: parseTokenValue29(buttonGroup.spacing.gap),
|
|
6200
6223
|
children: [
|
|
6201
6224
|
leadingContent,
|
|
6202
6225
|
/* @__PURE__ */ jsx(
|
|
@@ -6235,21 +6258,21 @@ var ButtonDock = React65.forwardRef(
|
|
|
6235
6258
|
}
|
|
6236
6259
|
);
|
|
6237
6260
|
ButtonDock.displayName = "ButtonDock";
|
|
6238
|
-
var
|
|
6239
|
-
var StyledGroupRoot =
|
|
6261
|
+
var parseTokenValue30 = (value) => parseFloat(value);
|
|
6262
|
+
var StyledGroupRoot = styled51(View)(({ rootGap }) => ({
|
|
6240
6263
|
gap: rootGap,
|
|
6241
6264
|
alignItems: "center",
|
|
6242
6265
|
width: "100%"
|
|
6243
6266
|
}));
|
|
6244
|
-
var StyledButtonRow =
|
|
6267
|
+
var StyledButtonRow = styled51(View)(({ rowDirection, rowAlign, rowGap }) => __spreadValues({
|
|
6245
6268
|
flexDirection: rowDirection,
|
|
6246
6269
|
width: "100%",
|
|
6247
6270
|
gap: rowGap
|
|
6248
6271
|
}, rowAlign ? { alignItems: rowAlign } : {}));
|
|
6249
|
-
var StyledChildSlot =
|
|
6272
|
+
var StyledChildSlot = styled51(View)(
|
|
6250
6273
|
({ slotInline }) => __spreadValues({}, slotInline ? { flex: 1, minWidth: 0 } : { width: "100%", alignSelf: "stretch" })
|
|
6251
6274
|
);
|
|
6252
|
-
var ButtonGroup =
|
|
6275
|
+
var ButtonGroup = React66.forwardRef(
|
|
6253
6276
|
(_a, ref) => {
|
|
6254
6277
|
var _b = _a, { layout = "stacked", description, children } = _b, rest = __objRest(_b, ["layout", "description", "children"]);
|
|
6255
6278
|
const theme2 = useTheme();
|
|
@@ -6260,7 +6283,7 @@ var ButtonGroup = React65.forwardRef(
|
|
|
6260
6283
|
__spreadProps(__spreadValues({
|
|
6261
6284
|
ref,
|
|
6262
6285
|
accessibilityRole: "none",
|
|
6263
|
-
rootGap:
|
|
6286
|
+
rootGap: parseTokenValue30(buttonGroup.spacing.gap)
|
|
6264
6287
|
}, rest), {
|
|
6265
6288
|
children: [
|
|
6266
6289
|
/* @__PURE__ */ jsx(
|
|
@@ -6268,12 +6291,12 @@ var ButtonGroup = React65.forwardRef(
|
|
|
6268
6291
|
{
|
|
6269
6292
|
rowDirection: isInline ? "row" : "column",
|
|
6270
6293
|
rowAlign: isInline ? "center" : void 0,
|
|
6271
|
-
rowGap:
|
|
6294
|
+
rowGap: parseTokenValue30(
|
|
6272
6295
|
isInline ? buttonGroup.spacing.sideBySide.gap : buttonGroup.spacing.stacked.gap
|
|
6273
6296
|
),
|
|
6274
|
-
children:
|
|
6275
|
-
if (!
|
|
6276
|
-
return /* @__PURE__ */ jsx(StyledChildSlot, { slotInline: isInline, children:
|
|
6297
|
+
children: React66.Children.map(children, (child, index) => {
|
|
6298
|
+
if (!React66.isValidElement(child)) return child;
|
|
6299
|
+
return /* @__PURE__ */ jsx(StyledChildSlot, { slotInline: isInline, children: React66.cloneElement(
|
|
6277
6300
|
child,
|
|
6278
6301
|
{
|
|
6279
6302
|
fullWidth: true
|
|
@@ -6297,8 +6320,8 @@ var ButtonGroup = React65.forwardRef(
|
|
|
6297
6320
|
}
|
|
6298
6321
|
);
|
|
6299
6322
|
ButtonGroup.displayName = "ButtonGroup";
|
|
6300
|
-
var
|
|
6301
|
-
var StyledRootPressable =
|
|
6323
|
+
var parseTokenValue31 = (value) => parseFloat(value);
|
|
6324
|
+
var StyledRootPressable = styled51(Pressable)(
|
|
6302
6325
|
({
|
|
6303
6326
|
rootFlexAlign,
|
|
6304
6327
|
rootGap,
|
|
@@ -6306,6 +6329,7 @@ var StyledRootPressable = styled50(Pressable)(
|
|
|
6306
6329
|
rootPaddingVertical,
|
|
6307
6330
|
rootPaddingHorizontal,
|
|
6308
6331
|
rootMaxWidth,
|
|
6332
|
+
rootFitContent,
|
|
6309
6333
|
rootBgColor,
|
|
6310
6334
|
rootBorderWidth,
|
|
6311
6335
|
rootBorderColor,
|
|
@@ -6315,9 +6339,9 @@ var StyledRootPressable = styled50(Pressable)(
|
|
|
6315
6339
|
alignItems: rootFlexAlign,
|
|
6316
6340
|
gap: rootGap,
|
|
6317
6341
|
opacity: rootOpacity
|
|
6318
|
-
}, 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 } : {})
|
|
6342
|
+
}, rootPaddingVertical !== void 0 ? { paddingVertical: rootPaddingVertical } : {}), rootPaddingHorizontal !== void 0 ? { paddingHorizontal: rootPaddingHorizontal } : {}), rootMaxWidth !== void 0 ? rootFitContent ? { maxWidth: rootMaxWidth, alignSelf: "flex-start" } : { maxWidth: rootMaxWidth, width: "100%" } : {}), rootBgColor ? { backgroundColor: rootBgColor } : {}), rootBorderWidth !== void 0 ? { borderWidth: rootBorderWidth, borderColor: rootBorderColor } : {}), rootBorderRadius !== void 0 ? { borderRadius: rootBorderRadius } : {})
|
|
6319
6343
|
);
|
|
6320
|
-
var StyledControl =
|
|
6344
|
+
var StyledControl = styled51(View)(
|
|
6321
6345
|
({
|
|
6322
6346
|
controlSize,
|
|
6323
6347
|
controlBorderWidth,
|
|
@@ -6336,19 +6360,19 @@ var StyledControl = styled50(View)(
|
|
|
6336
6360
|
justifyContent: "center"
|
|
6337
6361
|
})
|
|
6338
6362
|
);
|
|
6339
|
-
var StyledContent2 =
|
|
6363
|
+
var StyledContent2 = styled51(View)(({ contentGap, contentFlex }) => ({
|
|
6340
6364
|
flexDirection: "column",
|
|
6341
6365
|
gap: contentGap,
|
|
6342
|
-
flex:
|
|
6366
|
+
flex: contentFlex,
|
|
6343
6367
|
minWidth: 0
|
|
6344
6368
|
}));
|
|
6345
|
-
var StyledIllustration =
|
|
6369
|
+
var StyledIllustration = styled51(View)(({ illustrationSize }) => ({
|
|
6346
6370
|
flexShrink: 0,
|
|
6347
6371
|
width: illustrationSize,
|
|
6348
6372
|
height: illustrationSize,
|
|
6349
6373
|
overflow: "hidden"
|
|
6350
6374
|
}));
|
|
6351
|
-
var Checkbox =
|
|
6375
|
+
var Checkbox = React66.forwardRef(
|
|
6352
6376
|
(_a, ref) => {
|
|
6353
6377
|
var _b = _a, {
|
|
6354
6378
|
variant = "standalone",
|
|
@@ -6359,6 +6383,7 @@ var Checkbox = React65.forwardRef(
|
|
|
6359
6383
|
defaultChecked = false,
|
|
6360
6384
|
onCheckedChange,
|
|
6361
6385
|
disabled = false,
|
|
6386
|
+
fitContent = false,
|
|
6362
6387
|
style
|
|
6363
6388
|
} = _b, rest = __objRest(_b, [
|
|
6364
6389
|
"variant",
|
|
@@ -6369,13 +6394,14 @@ var Checkbox = React65.forwardRef(
|
|
|
6369
6394
|
"defaultChecked",
|
|
6370
6395
|
"onCheckedChange",
|
|
6371
6396
|
"disabled",
|
|
6397
|
+
"fitContent",
|
|
6372
6398
|
"style"
|
|
6373
6399
|
]);
|
|
6374
6400
|
const theme2 = useTheme();
|
|
6375
6401
|
const { checkbox } = theme2.tokens.components;
|
|
6376
6402
|
const { dimensions: dimensions3 } = theme2.tokens.semantics;
|
|
6377
6403
|
const isControlled = controlledChecked !== void 0;
|
|
6378
|
-
const [internalChecked, setInternalChecked] =
|
|
6404
|
+
const [internalChecked, setInternalChecked] = React66.useState(defaultChecked);
|
|
6379
6405
|
const isChecked = isControlled ? controlledChecked : internalChecked;
|
|
6380
6406
|
const handlePress = () => {
|
|
6381
6407
|
if (disabled) return;
|
|
@@ -6386,7 +6412,7 @@ var Checkbox = React65.forwardRef(
|
|
|
6386
6412
|
onCheckedChange == null ? void 0 : onCheckedChange(next);
|
|
6387
6413
|
};
|
|
6388
6414
|
const isTile = variant === "tile";
|
|
6389
|
-
const controlSize =
|
|
6415
|
+
const controlSize = parseTokenValue31(checkbox.size.control.default);
|
|
6390
6416
|
return /* @__PURE__ */ jsxs(
|
|
6391
6417
|
StyledRootPressable,
|
|
6392
6418
|
__spreadProps(__spreadValues({
|
|
@@ -6396,17 +6422,18 @@ var Checkbox = React65.forwardRef(
|
|
|
6396
6422
|
accessibilityRole: "checkbox",
|
|
6397
6423
|
accessibilityState: { checked: isChecked, disabled },
|
|
6398
6424
|
rootFlexAlign: isTile ? "center" : "flex-start",
|
|
6399
|
-
rootGap:
|
|
6425
|
+
rootGap: parseTokenValue31(
|
|
6400
6426
|
isTile ? checkbox.checkboxTile.spacing.gap : checkbox.spacing.gap
|
|
6401
6427
|
),
|
|
6402
6428
|
rootOpacity: disabled ? parseFloat(theme2.tokens.primitives.opacity["40"]) : 1,
|
|
6403
|
-
rootPaddingVertical: isTile ?
|
|
6404
|
-
rootPaddingHorizontal: isTile ?
|
|
6405
|
-
rootMaxWidth: isTile ?
|
|
6429
|
+
rootPaddingVertical: isTile ? parseTokenValue31(checkbox.checkboxTile.spacing.verticalPadding) : void 0,
|
|
6430
|
+
rootPaddingHorizontal: isTile ? parseTokenValue31(checkbox.checkboxTile.spacing.horizontalPadding) : void 0,
|
|
6431
|
+
rootMaxWidth: isTile ? parseTokenValue31(checkbox.checkboxTile.size.maxWidth) : void 0,
|
|
6432
|
+
rootFitContent: isTile && fitContent,
|
|
6406
6433
|
rootBgColor: isTile ? isChecked ? checkbox.checkboxTile.colour.background.selected : checkbox.checkboxTile.colour.background.default : void 0,
|
|
6407
|
-
rootBorderWidth: isTile ?
|
|
6434
|
+
rootBorderWidth: isTile ? parseTokenValue31(checkbox.checkboxTile.borderWidth.default) : void 0,
|
|
6408
6435
|
rootBorderColor: isTile ? isChecked ? checkbox.checkboxTile.colour.border.selected : checkbox.checkboxTile.colour.border.default : void 0,
|
|
6409
|
-
rootBorderRadius: isTile ?
|
|
6436
|
+
rootBorderRadius: isTile ? parseTokenValue31(checkbox.checkboxTile.borderRadius.default) : void 0,
|
|
6410
6437
|
style: typeof style === "function" ? void 0 : style
|
|
6411
6438
|
}, rest), {
|
|
6412
6439
|
children: [
|
|
@@ -6414,9 +6441,9 @@ var Checkbox = React65.forwardRef(
|
|
|
6414
6441
|
StyledControl,
|
|
6415
6442
|
{
|
|
6416
6443
|
controlSize,
|
|
6417
|
-
controlBorderWidth:
|
|
6444
|
+
controlBorderWidth: parseTokenValue31(checkbox.control.border.default),
|
|
6418
6445
|
controlBorderColor: isChecked ? checkbox.colour.background.selected : checkbox.colour.border.default,
|
|
6419
|
-
controlBorderRadius:
|
|
6446
|
+
controlBorderRadius: parseTokenValue31(dimensions3.borderRadius.xs),
|
|
6420
6447
|
controlBgColor: isChecked ? checkbox.colour.background.selected : "transparent",
|
|
6421
6448
|
children: isChecked && /* @__PURE__ */ jsx(Icon, { icon: Check_default, size: "xs", colour: "alt" })
|
|
6422
6449
|
}
|
|
@@ -6424,7 +6451,8 @@ var Checkbox = React65.forwardRef(
|
|
|
6424
6451
|
/* @__PURE__ */ jsxs(
|
|
6425
6452
|
StyledContent2,
|
|
6426
6453
|
{
|
|
6427
|
-
contentGap:
|
|
6454
|
+
contentGap: parseTokenValue31(checkbox.spacing.content.gap),
|
|
6455
|
+
contentFlex: isTile && fitContent ? 0 : 1,
|
|
6428
6456
|
children: [
|
|
6429
6457
|
label && /* @__PURE__ */ jsx(
|
|
6430
6458
|
Typography,
|
|
@@ -6448,7 +6476,7 @@ var Checkbox = React65.forwardRef(
|
|
|
6448
6476
|
isTile && illustration && /* @__PURE__ */ jsx(
|
|
6449
6477
|
StyledIllustration,
|
|
6450
6478
|
{
|
|
6451
|
-
illustrationSize:
|
|
6479
|
+
illustrationSize: parseTokenValue31(
|
|
6452
6480
|
checkbox.checkboxTile.size.illustration.default
|
|
6453
6481
|
),
|
|
6454
6482
|
children: illustration
|
|
@@ -6460,30 +6488,42 @@ var Checkbox = React65.forwardRef(
|
|
|
6460
6488
|
}
|
|
6461
6489
|
);
|
|
6462
6490
|
Checkbox.displayName = "Checkbox";
|
|
6463
|
-
var
|
|
6464
|
-
var StyledGroup =
|
|
6491
|
+
var parseTokenValue32 = (value) => parseFloat(value);
|
|
6492
|
+
var StyledGroup = styled51(View)(({ groupDirection, groupGap, groupWrap }) => ({
|
|
6465
6493
|
flexDirection: groupDirection,
|
|
6466
|
-
gap: groupGap
|
|
6494
|
+
gap: groupGap,
|
|
6495
|
+
flexWrap: groupWrap ? "wrap" : "nowrap"
|
|
6467
6496
|
}));
|
|
6468
|
-
var CheckboxGroup =
|
|
6497
|
+
var CheckboxGroup = React66.forwardRef(
|
|
6469
6498
|
(_a, ref) => {
|
|
6470
6499
|
var _b = _a, { orientation = "vertical", children } = _b, rest = __objRest(_b, ["orientation", "children"]);
|
|
6471
6500
|
const theme2 = useTheme();
|
|
6472
6501
|
const { checkbox } = theme2.tokens.components;
|
|
6502
|
+
const isHorizontal = orientation === "horizontal";
|
|
6503
|
+
const renderChildren = () => isHorizontal ? React66.Children.map(children, (child) => {
|
|
6504
|
+
var _a2;
|
|
6505
|
+
if (!React66.isValidElement(child)) return child;
|
|
6506
|
+
const childProps = child.props;
|
|
6507
|
+
return React66.cloneElement(
|
|
6508
|
+
child,
|
|
6509
|
+
{ fitContent: (_a2 = childProps.fitContent) != null ? _a2 : true }
|
|
6510
|
+
);
|
|
6511
|
+
}) : children;
|
|
6473
6512
|
return /* @__PURE__ */ jsx(
|
|
6474
6513
|
StyledGroup,
|
|
6475
6514
|
__spreadProps(__spreadValues({
|
|
6476
6515
|
ref,
|
|
6477
|
-
groupDirection:
|
|
6478
|
-
groupGap:
|
|
6516
|
+
groupDirection: isHorizontal ? "row" : "column",
|
|
6517
|
+
groupGap: parseTokenValue32(checkbox.spacing.gap),
|
|
6518
|
+
groupWrap: isHorizontal
|
|
6479
6519
|
}, rest), {
|
|
6480
|
-
children
|
|
6520
|
+
children: renderChildren()
|
|
6481
6521
|
})
|
|
6482
6522
|
);
|
|
6483
6523
|
}
|
|
6484
6524
|
);
|
|
6485
6525
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
6486
|
-
var CopyFieldInput =
|
|
6526
|
+
var CopyFieldInput = React66.forwardRef(
|
|
6487
6527
|
(_a, ref) => {
|
|
6488
6528
|
var _b = _a, {
|
|
6489
6529
|
onCopy,
|
|
@@ -6502,19 +6542,19 @@ var CopyFieldInput = React65.forwardRef(
|
|
|
6502
6542
|
"editable",
|
|
6503
6543
|
"defaultValue"
|
|
6504
6544
|
]);
|
|
6505
|
-
const [internalValue, setInternalValue] =
|
|
6545
|
+
const [internalValue, setInternalValue] = React66.useState(
|
|
6506
6546
|
typeof defaultValue === "string" ? defaultValue : ""
|
|
6507
6547
|
);
|
|
6508
|
-
const [copied, setCopied] =
|
|
6509
|
-
const timeoutRef =
|
|
6548
|
+
const [copied, setCopied] = React66.useState(false);
|
|
6549
|
+
const timeoutRef = React66.useRef(
|
|
6510
6550
|
void 0
|
|
6511
6551
|
);
|
|
6512
|
-
|
|
6552
|
+
React66.useEffect(() => {
|
|
6513
6553
|
if (defaultValue !== void 0 && value === void 0) {
|
|
6514
6554
|
setInternalValue(typeof defaultValue === "string" ? defaultValue : "");
|
|
6515
6555
|
}
|
|
6516
6556
|
}, [defaultValue, value]);
|
|
6517
|
-
|
|
6557
|
+
React66.useEffect(() => {
|
|
6518
6558
|
return () => {
|
|
6519
6559
|
if (timeoutRef.current) {
|
|
6520
6560
|
clearTimeout(timeoutRef.current);
|
|
@@ -6574,14 +6614,14 @@ var CopyFieldInput = React65.forwardRef(
|
|
|
6574
6614
|
}
|
|
6575
6615
|
);
|
|
6576
6616
|
CopyFieldInput.displayName = "CopyField.Field";
|
|
6577
|
-
var
|
|
6578
|
-
var StyledRoot8 =
|
|
6617
|
+
var parseTokenValue33 = (value) => parseFloat(value);
|
|
6618
|
+
var StyledRoot8 = styled51(View)(({ theme: theme2 }) => {
|
|
6579
6619
|
const { spacing } = theme2.tokens.components.inputs;
|
|
6580
6620
|
return {
|
|
6581
|
-
gap:
|
|
6621
|
+
gap: parseTokenValue33(spacing.gap)
|
|
6582
6622
|
};
|
|
6583
6623
|
});
|
|
6584
|
-
var CopyFieldRoot =
|
|
6624
|
+
var CopyFieldRoot = React66.forwardRef(
|
|
6585
6625
|
(_a, ref) => {
|
|
6586
6626
|
var _b = _a, {
|
|
6587
6627
|
label,
|
|
@@ -6649,20 +6689,20 @@ var useCopyField = (options = {}) => {
|
|
|
6649
6689
|
onCopy: handleCopy
|
|
6650
6690
|
};
|
|
6651
6691
|
};
|
|
6652
|
-
var FilterTabContext =
|
|
6692
|
+
var FilterTabContext = React66.createContext({
|
|
6653
6693
|
size: "sm",
|
|
6654
6694
|
selectedValues: [],
|
|
6655
6695
|
toggle: () => {
|
|
6656
6696
|
}
|
|
6657
6697
|
});
|
|
6658
|
-
var
|
|
6659
|
-
var StyledRoot9 =
|
|
6698
|
+
var parseTokenValue34 = (value) => parseFloat(value);
|
|
6699
|
+
var StyledRoot9 = styled51(View)(({ rootGap }) => ({
|
|
6660
6700
|
flexDirection: "row",
|
|
6661
6701
|
alignItems: "center",
|
|
6662
6702
|
gap: rootGap,
|
|
6663
6703
|
flexWrap: "nowrap"
|
|
6664
6704
|
}));
|
|
6665
|
-
var StyledItem2 =
|
|
6705
|
+
var StyledItem2 = styled51(Pressable)(
|
|
6666
6706
|
({
|
|
6667
6707
|
itemHeight,
|
|
6668
6708
|
itemMinWidth,
|
|
@@ -6688,7 +6728,7 @@ var StyledItem2 = styled50(Pressable)(
|
|
|
6688
6728
|
flexShrink: 0
|
|
6689
6729
|
})
|
|
6690
6730
|
);
|
|
6691
|
-
var FilterTabItem =
|
|
6731
|
+
var FilterTabItem = React66.forwardRef(
|
|
6692
6732
|
(_a, ref) => {
|
|
6693
6733
|
var _b = _a, {
|
|
6694
6734
|
value,
|
|
@@ -6708,16 +6748,16 @@ var FilterTabItem = React65.forwardRef(
|
|
|
6708
6748
|
"accessibilityLabel"
|
|
6709
6749
|
]);
|
|
6710
6750
|
const theme2 = useTheme();
|
|
6711
|
-
const { size, selectedValues, toggle } =
|
|
6751
|
+
const { size, selectedValues, toggle } = React66.useContext(FilterTabContext);
|
|
6712
6752
|
const isSelected = selectedValues.includes(value);
|
|
6713
6753
|
const isIconOnly = !!IconOnlyIcon && !label;
|
|
6714
6754
|
const isActive = isSelected && !disabled;
|
|
6715
6755
|
const { tabItem } = theme2.tokens.components.filterTabs;
|
|
6716
6756
|
const { dimensions: dimensions3 } = theme2.tokens.semantics;
|
|
6717
|
-
const height =
|
|
6757
|
+
const height = parseTokenValue34(
|
|
6718
6758
|
size === "lg" ? tabItem.size.large.height : tabItem.size.small.height
|
|
6719
6759
|
);
|
|
6720
|
-
const minWidth =
|
|
6760
|
+
const minWidth = parseTokenValue34(tabItem.size.small.minWidth);
|
|
6721
6761
|
const iconColour = isActive ? tabItem.colour.icon.selected : tabItem.colour.icon.unselected;
|
|
6722
6762
|
return /* @__PURE__ */ jsxs(
|
|
6723
6763
|
StyledItem2,
|
|
@@ -6733,12 +6773,12 @@ var FilterTabItem = React65.forwardRef(
|
|
|
6733
6773
|
},
|
|
6734
6774
|
itemHeight: height,
|
|
6735
6775
|
itemMinWidth: minWidth,
|
|
6736
|
-
itemPaddingH:
|
|
6737
|
-
itemBorderRadius:
|
|
6776
|
+
itemPaddingH: parseTokenValue34(tabItem.spacing.horizontalPadding),
|
|
6777
|
+
itemBorderRadius: parseTokenValue34(tabItem.borderRadius.default),
|
|
6738
6778
|
itemBgColor: isActive ? tabItem.colour.background.selected : tabItem.colour.background.default,
|
|
6739
6779
|
itemOpacity: disabled ? parseFloat(tabItem.opacity.disabled.default) : 1,
|
|
6740
6780
|
isIconOnly,
|
|
6741
|
-
style: { gap:
|
|
6781
|
+
style: { gap: parseTokenValue34(dimensions3.spacing["2xs"]) }
|
|
6742
6782
|
}, rest), {
|
|
6743
6783
|
children: [
|
|
6744
6784
|
isIconOnly && IconOnlyIcon && /* @__PURE__ */ jsx(
|
|
@@ -6782,7 +6822,7 @@ var FilterTabItem = React65.forwardRef(
|
|
|
6782
6822
|
}
|
|
6783
6823
|
);
|
|
6784
6824
|
FilterTabItem.displayName = "FilterTab.Item";
|
|
6785
|
-
var FilterTabRoot =
|
|
6825
|
+
var FilterTabRoot = React66.forwardRef(
|
|
6786
6826
|
(_a, ref) => {
|
|
6787
6827
|
var _b = _a, {
|
|
6788
6828
|
size = "sm",
|
|
@@ -6802,9 +6842,9 @@ var FilterTabRoot = React65.forwardRef(
|
|
|
6802
6842
|
const theme2 = useTheme();
|
|
6803
6843
|
const { filterTabs } = theme2.tokens.components;
|
|
6804
6844
|
const isControlled = controlledValue !== void 0;
|
|
6805
|
-
const [internalValue, setInternalValue] =
|
|
6845
|
+
const [internalValue, setInternalValue] = React66.useState(defaultValue);
|
|
6806
6846
|
const selectedValues = isControlled ? controlledValue : internalValue;
|
|
6807
|
-
const toggle =
|
|
6847
|
+
const toggle = React66.useCallback(
|
|
6808
6848
|
(itemValue) => {
|
|
6809
6849
|
let next;
|
|
6810
6850
|
if (multiple) {
|
|
@@ -6817,7 +6857,7 @@ var FilterTabRoot = React65.forwardRef(
|
|
|
6817
6857
|
},
|
|
6818
6858
|
[selectedValues, isControlled, onValueChange, multiple]
|
|
6819
6859
|
);
|
|
6820
|
-
const contextValue =
|
|
6860
|
+
const contextValue = React66.useMemo(
|
|
6821
6861
|
() => ({ size, selectedValues, toggle }),
|
|
6822
6862
|
[size, selectedValues, toggle]
|
|
6823
6863
|
);
|
|
@@ -6825,7 +6865,7 @@ var FilterTabRoot = React65.forwardRef(
|
|
|
6825
6865
|
StyledRoot9,
|
|
6826
6866
|
__spreadProps(__spreadValues({
|
|
6827
6867
|
ref,
|
|
6828
|
-
rootGap:
|
|
6868
|
+
rootGap: parseTokenValue34(filterTabs.filterTab.spacing.gap)
|
|
6829
6869
|
}, rest), {
|
|
6830
6870
|
children
|
|
6831
6871
|
})
|
|
@@ -6836,8 +6876,8 @@ FilterTabRoot.displayName = "FilterTab";
|
|
|
6836
6876
|
var FilterTab = Object.assign(FilterTabRoot, {
|
|
6837
6877
|
Item: FilterTabItem
|
|
6838
6878
|
});
|
|
6839
|
-
var
|
|
6840
|
-
var StyledFieldWrapper =
|
|
6879
|
+
var parseTokenValue35 = (value) => parseFloat(value);
|
|
6880
|
+
var StyledFieldWrapper = styled51(View)(
|
|
6841
6881
|
({
|
|
6842
6882
|
fieldBgColor,
|
|
6843
6883
|
fieldBorderColor,
|
|
@@ -6861,7 +6901,7 @@ var StyledFieldWrapper = styled50(View)(
|
|
|
6861
6901
|
overflow: "hidden"
|
|
6862
6902
|
}, fullWidth && { flex: 1 })
|
|
6863
6903
|
);
|
|
6864
|
-
var StyledTextInput =
|
|
6904
|
+
var StyledTextInput = styled51(TextInput)(
|
|
6865
6905
|
({
|
|
6866
6906
|
inputColor,
|
|
6867
6907
|
inputFontFamily,
|
|
@@ -6882,12 +6922,12 @@ var StyledTextInput = styled50(TextInput)(
|
|
|
6882
6922
|
fontSize: inputFontSize
|
|
6883
6923
|
}), hasInlineHelp ? { position: "relative", top: -8 } : {})
|
|
6884
6924
|
);
|
|
6885
|
-
var StyledRow =
|
|
6925
|
+
var StyledRow = styled51(View)(({ rowGap }) => ({
|
|
6886
6926
|
flexDirection: "row",
|
|
6887
6927
|
alignItems: "center",
|
|
6888
6928
|
gap: rowGap
|
|
6889
6929
|
}));
|
|
6890
|
-
var NumberFieldInput =
|
|
6930
|
+
var NumberFieldInput = React66.forwardRef(
|
|
6891
6931
|
(_a, ref) => {
|
|
6892
6932
|
var _b = _a, {
|
|
6893
6933
|
fieldSize = "lg",
|
|
@@ -6934,16 +6974,16 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
6934
6974
|
const theme2 = useTheme();
|
|
6935
6975
|
const tokens3 = theme2.tokens.components.numberField;
|
|
6936
6976
|
const inputTokens3 = theme2.tokens.components.inputs;
|
|
6937
|
-
const [isFocused, setIsFocused] =
|
|
6938
|
-
const [isEdited, setIsEdited] =
|
|
6939
|
-
const initialValueRef =
|
|
6977
|
+
const [isFocused, setIsFocused] = React66.useState(false);
|
|
6978
|
+
const [isEdited, setIsEdited] = React66.useState(false);
|
|
6979
|
+
const initialValueRef = React66.useRef((_a2 = value != null ? value : defaultValue) != null ? _a2 : "");
|
|
6940
6980
|
const isLarge = fieldSize === "lg";
|
|
6941
6981
|
const sizeTokens = isLarge ? tokens3.spacing.large : tokens3.spacing.small;
|
|
6942
6982
|
const buttonSize = isLarge ? "lg" : "sm";
|
|
6943
6983
|
const fieldSizeTokens = isLarge ? tokens3.size.large : tokens3.size.small;
|
|
6944
|
-
const fieldMinWidth =
|
|
6945
|
-
const fieldHeight =
|
|
6946
|
-
const fieldPaddingHorizontal =
|
|
6984
|
+
const fieldMinWidth = parseTokenValue35(fieldSizeTokens.minWidth);
|
|
6985
|
+
const fieldHeight = parseTokenValue35(fieldSizeTokens.height);
|
|
6986
|
+
const fieldPaddingHorizontal = parseTokenValue35(
|
|
6947
6987
|
inputTokens3.spacing.field.horizontalPadding
|
|
6948
6988
|
);
|
|
6949
6989
|
const getBorderColor = () => {
|
|
@@ -6953,14 +6993,14 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
6953
6993
|
if (isEdited) return tokens3.colour.field.border.edited;
|
|
6954
6994
|
return tokens3.colour.field.border.default;
|
|
6955
6995
|
};
|
|
6956
|
-
const handleFocus =
|
|
6996
|
+
const handleFocus = React66.useCallback(
|
|
6957
6997
|
(e) => {
|
|
6958
6998
|
setIsFocused(true);
|
|
6959
6999
|
onFocus == null ? void 0 : onFocus(e);
|
|
6960
7000
|
},
|
|
6961
7001
|
[onFocus]
|
|
6962
7002
|
);
|
|
6963
|
-
const handleBlur =
|
|
7003
|
+
const handleBlur = React66.useCallback(
|
|
6964
7004
|
(e) => {
|
|
6965
7005
|
setIsFocused(false);
|
|
6966
7006
|
if (value != null && onChangeText) {
|
|
@@ -6979,7 +7019,7 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
6979
7019
|
const numericValue = value != null ? Number(value) : Number(defaultValue != null ? defaultValue : 0);
|
|
6980
7020
|
const isAtMin = min != null && numericValue <= min;
|
|
6981
7021
|
const isAtMax = max != null && numericValue >= max;
|
|
6982
|
-
const handleChangeText =
|
|
7022
|
+
const handleChangeText = React66.useCallback(
|
|
6983
7023
|
(text) => {
|
|
6984
7024
|
setIsEdited(text !== initialValueRef.current);
|
|
6985
7025
|
onChangeText == null ? void 0 : onChangeText(text);
|
|
@@ -6988,7 +7028,7 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
6988
7028
|
);
|
|
6989
7029
|
const typographyToken = fieldSize === "lg" ? tokens3.typography.field.large : tokens3.typography.field.small;
|
|
6990
7030
|
const resolvedInputFontFamily = typographyToken.fontFamily && typographyToken.fontWeight ? resolveFont(typographyToken.fontFamily, typographyToken.fontWeight).fontFamily : typographyToken.fontFamily;
|
|
6991
|
-
return /* @__PURE__ */ jsxs(StyledRow, { rowGap:
|
|
7031
|
+
return /* @__PURE__ */ jsxs(StyledRow, { rowGap: parseTokenValue35(sizeTokens.group.gap), children: [
|
|
6992
7032
|
showDecrementButton && /* @__PURE__ */ jsx(
|
|
6993
7033
|
IconButton,
|
|
6994
7034
|
{
|
|
@@ -7006,7 +7046,7 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
7006
7046
|
{
|
|
7007
7047
|
fieldBgColor: tokens3.colour.field.background.default,
|
|
7008
7048
|
fieldBorderColor: getBorderColor(),
|
|
7009
|
-
fieldBorderRadius:
|
|
7049
|
+
fieldBorderRadius: parseTokenValue35(tokens3.borderRadius.field.default),
|
|
7010
7050
|
fieldMinWidth,
|
|
7011
7051
|
fieldHeight,
|
|
7012
7052
|
fieldPaddingHorizontal,
|
|
@@ -7019,7 +7059,7 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
7019
7059
|
inputColor: tokens3.colour.field.text.default,
|
|
7020
7060
|
inputFontFamily: resolvedInputFontFamily,
|
|
7021
7061
|
inputFontWeight: resolvedInputFontFamily === typographyToken.fontFamily ? typographyToken.fontWeight : void 0,
|
|
7022
|
-
inputFontSize:
|
|
7062
|
+
inputFontSize: parseTokenValue35(typographyToken.fontSize),
|
|
7023
7063
|
hasInlineHelp: !!inlineHelpText,
|
|
7024
7064
|
keyboardType: "numeric",
|
|
7025
7065
|
editable: !disabled,
|
|
@@ -7071,14 +7111,14 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
7071
7111
|
}
|
|
7072
7112
|
);
|
|
7073
7113
|
NumberFieldInput.displayName = "NumberField.Input";
|
|
7074
|
-
var
|
|
7075
|
-
var StyledRoot10 =
|
|
7114
|
+
var parseTokenValue36 = (value) => parseFloat(value);
|
|
7115
|
+
var StyledRoot10 = styled51(View)(({ rootGap, fullWidth }) => __spreadValues({
|
|
7076
7116
|
gap: rootGap
|
|
7077
7117
|
}, fullWidth ? { width: "100%" } : { alignItems: "center" }));
|
|
7078
|
-
var StyledLabelGroup =
|
|
7118
|
+
var StyledLabelGroup = styled51(View)(({ labelGap }) => ({
|
|
7079
7119
|
gap: labelGap
|
|
7080
7120
|
}));
|
|
7081
|
-
var NumberField =
|
|
7121
|
+
var NumberField = React66.forwardRef(
|
|
7082
7122
|
(_a, ref) => {
|
|
7083
7123
|
var _b = _a, {
|
|
7084
7124
|
label,
|
|
@@ -7123,13 +7163,13 @@ var NumberField = React65.forwardRef(
|
|
|
7123
7163
|
StyledRoot10,
|
|
7124
7164
|
{
|
|
7125
7165
|
ref,
|
|
7126
|
-
rootGap:
|
|
7166
|
+
rootGap: parseTokenValue36(sizeTokens.gap),
|
|
7127
7167
|
fullWidth,
|
|
7128
7168
|
children: [
|
|
7129
7169
|
(label || smallLabel) && /* @__PURE__ */ jsxs(
|
|
7130
7170
|
StyledLabelGroup,
|
|
7131
7171
|
{
|
|
7132
|
-
labelGap:
|
|
7172
|
+
labelGap: parseTokenValue36(
|
|
7133
7173
|
theme2.tokens.components.inputs.spacing.label.gap
|
|
7134
7174
|
),
|
|
7135
7175
|
children: [
|
|
@@ -7197,9 +7237,9 @@ var NumberField = React65.forwardRef(
|
|
|
7197
7237
|
);
|
|
7198
7238
|
NumberField.displayName = "NumberField";
|
|
7199
7239
|
var HIT_SLOP = 12;
|
|
7200
|
-
var PasswordFieldInput =
|
|
7240
|
+
var PasswordFieldInput = React66.forwardRef((_a, ref) => {
|
|
7201
7241
|
var _b = _a, { onValueChange, value, state, editable } = _b, inputFieldProps = __objRest(_b, ["onValueChange", "value", "state", "editable"]);
|
|
7202
|
-
const [showPassword, setShowPassword] =
|
|
7242
|
+
const [showPassword, setShowPassword] = React66.useState(false);
|
|
7203
7243
|
const handleValueChange = (newValue) => {
|
|
7204
7244
|
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
7205
7245
|
};
|
|
@@ -7238,13 +7278,13 @@ var PasswordFieldInput = React65.forwardRef((_a, ref) => {
|
|
|
7238
7278
|
);
|
|
7239
7279
|
});
|
|
7240
7280
|
PasswordFieldInput.displayName = "PasswordField.Field";
|
|
7241
|
-
var
|
|
7242
|
-
var StyledErrorRow2 =
|
|
7281
|
+
var parseTokenValue37 = (value) => parseFloat(value);
|
|
7282
|
+
var StyledErrorRow2 = styled51(View)(({ gap }) => ({
|
|
7243
7283
|
flexDirection: "row",
|
|
7244
7284
|
alignItems: "center",
|
|
7245
7285
|
gap
|
|
7246
7286
|
}));
|
|
7247
|
-
var PasswordFieldError =
|
|
7287
|
+
var PasswordFieldError = React66.forwardRef((_a, ref) => {
|
|
7248
7288
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
7249
7289
|
const theme2 = useTheme();
|
|
7250
7290
|
const { listItem } = theme2.tokens.components.validationList;
|
|
@@ -7253,7 +7293,7 @@ var PasswordFieldError = React65.forwardRef((_a, ref) => {
|
|
|
7253
7293
|
StyledErrorRow2,
|
|
7254
7294
|
__spreadProps(__spreadValues({
|
|
7255
7295
|
ref,
|
|
7256
|
-
gap:
|
|
7296
|
+
gap: parseTokenValue37(listItem.spacing.gap)
|
|
7257
7297
|
}, rest), {
|
|
7258
7298
|
children: [
|
|
7259
7299
|
/* @__PURE__ */ jsx(Icon, { icon: Cancel_default, size: "xs", customColour: listItem.colour.icon.error }),
|
|
@@ -7270,20 +7310,20 @@ var PasswordFieldError = React65.forwardRef((_a, ref) => {
|
|
|
7270
7310
|
);
|
|
7271
7311
|
});
|
|
7272
7312
|
PasswordFieldError.displayName = "PasswordField.Error";
|
|
7273
|
-
var
|
|
7274
|
-
var StyledRequirementsList =
|
|
7313
|
+
var parseTokenValue38 = (value) => parseFloat(value);
|
|
7314
|
+
var StyledRequirementsList = styled51(View)(
|
|
7275
7315
|
({ listGap }) => ({
|
|
7276
7316
|
gap: listGap
|
|
7277
7317
|
})
|
|
7278
7318
|
);
|
|
7279
|
-
var StyledRequirementItem =
|
|
7319
|
+
var StyledRequirementItem = styled51(View)(
|
|
7280
7320
|
({ itemGap }) => ({
|
|
7281
7321
|
flexDirection: "row",
|
|
7282
7322
|
alignItems: "center",
|
|
7283
7323
|
gap: itemGap
|
|
7284
7324
|
})
|
|
7285
7325
|
);
|
|
7286
|
-
var PasswordFieldRequirements =
|
|
7326
|
+
var PasswordFieldRequirements = React66.forwardRef((_a, ref) => {
|
|
7287
7327
|
var _b = _a, { requirements } = _b, rest = __objRest(_b, ["requirements"]);
|
|
7288
7328
|
const theme2 = useTheme();
|
|
7289
7329
|
const { listItem, list } = theme2.tokens.components.validationList;
|
|
@@ -7298,14 +7338,14 @@ var PasswordFieldRequirements = React65.forwardRef((_a, ref) => {
|
|
|
7298
7338
|
StyledRequirementsList,
|
|
7299
7339
|
__spreadProps(__spreadValues({
|
|
7300
7340
|
ref,
|
|
7301
|
-
listGap:
|
|
7341
|
+
listGap: parseTokenValue38(list.spacing.gap)
|
|
7302
7342
|
}, rest), {
|
|
7303
7343
|
children: normalizedRequirements.map((requirement, index) => {
|
|
7304
7344
|
const iconColour = requirement.satisfied ? listItem.colour.icon.success : listItem.colour.icon.error;
|
|
7305
7345
|
return /* @__PURE__ */ jsxs(
|
|
7306
7346
|
StyledRequirementItem,
|
|
7307
7347
|
{
|
|
7308
|
-
itemGap:
|
|
7348
|
+
itemGap: parseTokenValue38(listItem.spacing.gap),
|
|
7309
7349
|
children: [
|
|
7310
7350
|
/* @__PURE__ */ jsx(
|
|
7311
7351
|
Icon,
|
|
@@ -7332,14 +7372,14 @@ var PasswordFieldRequirements = React65.forwardRef((_a, ref) => {
|
|
|
7332
7372
|
);
|
|
7333
7373
|
});
|
|
7334
7374
|
PasswordFieldRequirements.displayName = "PasswordField.Requirements";
|
|
7335
|
-
var
|
|
7336
|
-
var StyledRoot11 =
|
|
7375
|
+
var parseTokenValue39 = (value) => parseFloat(value);
|
|
7376
|
+
var StyledRoot11 = styled51(View)(({ theme: theme2 }) => {
|
|
7337
7377
|
const { spacing } = theme2.tokens.components.inputs;
|
|
7338
7378
|
return {
|
|
7339
|
-
gap:
|
|
7379
|
+
gap: parseTokenValue39(spacing.gap)
|
|
7340
7380
|
};
|
|
7341
7381
|
});
|
|
7342
|
-
var PasswordFieldRoot =
|
|
7382
|
+
var PasswordFieldRoot = React66.forwardRef(
|
|
7343
7383
|
(_a, ref) => {
|
|
7344
7384
|
var _b = _a, {
|
|
7345
7385
|
label,
|
|
@@ -7446,20 +7486,20 @@ function usePasswordField({
|
|
|
7446
7486
|
showRequirements
|
|
7447
7487
|
});
|
|
7448
7488
|
}
|
|
7449
|
-
var
|
|
7450
|
-
var StyledRoot12 =
|
|
7489
|
+
var parseTokenValue40 = (value) => parseFloat(value);
|
|
7490
|
+
var StyledRoot12 = styled51(View)(({ rootGap }) => ({
|
|
7451
7491
|
flexDirection: "column",
|
|
7452
7492
|
alignItems: "stretch",
|
|
7453
7493
|
gap: rootGap,
|
|
7454
7494
|
width: "100%"
|
|
7455
7495
|
}));
|
|
7456
|
-
var StyledHeader2 =
|
|
7496
|
+
var StyledHeader2 = styled51(View)({
|
|
7457
7497
|
flexDirection: "row",
|
|
7458
7498
|
alignItems: "center",
|
|
7459
7499
|
justifyContent: "space-between",
|
|
7460
7500
|
width: "100%"
|
|
7461
7501
|
});
|
|
7462
|
-
var StyledTrack =
|
|
7502
|
+
var StyledTrack = styled51(View)(({ trackHeight, trackMinWidth, trackBorderRadius, trackBgColor }) => ({
|
|
7463
7503
|
position: "relative",
|
|
7464
7504
|
width: "100%",
|
|
7465
7505
|
minWidth: trackMinWidth,
|
|
@@ -7468,13 +7508,13 @@ var StyledTrack = styled50(View)(({ trackHeight, trackMinWidth, trackBorderRadiu
|
|
|
7468
7508
|
backgroundColor: trackBgColor,
|
|
7469
7509
|
overflow: "hidden"
|
|
7470
7510
|
}));
|
|
7471
|
-
var StyledIndicator =
|
|
7511
|
+
var StyledIndicator = styled51(View)(({ indicatorBorderRadius, indicatorBgColor }) => ({
|
|
7472
7512
|
height: "100%",
|
|
7473
7513
|
borderRadius: indicatorBorderRadius,
|
|
7474
7514
|
backgroundColor: indicatorBgColor
|
|
7475
7515
|
}));
|
|
7476
7516
|
var clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
7477
|
-
var Progress =
|
|
7517
|
+
var Progress = React66.forwardRef(
|
|
7478
7518
|
(_a, ref) => {
|
|
7479
7519
|
var _b = _a, {
|
|
7480
7520
|
value = 0,
|
|
@@ -7508,14 +7548,14 @@ var Progress = React65.forwardRef(
|
|
|
7508
7548
|
const showHeader = Boolean(label) || Boolean(description);
|
|
7509
7549
|
const typographyForSize = size === "lg" ? typography.large : typography.small;
|
|
7510
7550
|
const trackSize = { lg: track.size.large, sm: track.size.small }[size];
|
|
7511
|
-
const trackHeight =
|
|
7512
|
-
const trackMinWidth =
|
|
7513
|
-
const trackBorderRadius =
|
|
7514
|
-
const indicatorBorderRadius =
|
|
7551
|
+
const trackHeight = parseTokenValue40(trackSize.height);
|
|
7552
|
+
const trackMinWidth = parseTokenValue40(trackSize.mindWidth);
|
|
7553
|
+
const trackBorderRadius = parseTokenValue40(borderRadius.track.default);
|
|
7554
|
+
const indicatorBorderRadius = parseTokenValue40(
|
|
7515
7555
|
borderRadius.indicator.default
|
|
7516
7556
|
);
|
|
7517
7557
|
const indicatorBgColor = colour === "secondary" ? indicator.colour.background.secondary : indicator.colour.background.primary;
|
|
7518
|
-
return /* @__PURE__ */ jsxs(StyledRoot12, __spreadProps(__spreadValues({ ref, rootGap:
|
|
7558
|
+
return /* @__PURE__ */ jsxs(StyledRoot12, __spreadProps(__spreadValues({ ref, rootGap: parseTokenValue40(spacing.gap) }, rest), { children: [
|
|
7519
7559
|
showHeader && /* @__PURE__ */ jsxs(StyledHeader2, { children: [
|
|
7520
7560
|
label ? /* @__PURE__ */ jsx(
|
|
7521
7561
|
Typography,
|
|
@@ -7564,8 +7604,8 @@ var Progress = React65.forwardRef(
|
|
|
7564
7604
|
}
|
|
7565
7605
|
);
|
|
7566
7606
|
Progress.displayName = "Progress";
|
|
7567
|
-
var
|
|
7568
|
-
var StyledRadioRoot =
|
|
7607
|
+
var parseTokenValue41 = (value) => parseFloat(value);
|
|
7608
|
+
var StyledRadioRoot = styled51(Pressable)(
|
|
7569
7609
|
({
|
|
7570
7610
|
radioGap,
|
|
7571
7611
|
radioOpacity,
|
|
@@ -7584,7 +7624,7 @@ var StyledRadioRoot = styled50(Pressable)(
|
|
|
7584
7624
|
opacity: radioOpacity
|
|
7585
7625
|
}, 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 } : {})
|
|
7586
7626
|
);
|
|
7587
|
-
var StyledRadioControl =
|
|
7627
|
+
var StyledRadioControl = styled51(View)(({ controlSize, controlBorderWidth, controlBorderColor }) => ({
|
|
7588
7628
|
width: controlSize,
|
|
7589
7629
|
height: controlSize,
|
|
7590
7630
|
minWidth: controlSize,
|
|
@@ -7595,29 +7635,29 @@ var StyledRadioControl = styled50(View)(({ controlSize, controlBorderWidth, cont
|
|
|
7595
7635
|
alignItems: "center",
|
|
7596
7636
|
justifyContent: "center"
|
|
7597
7637
|
}));
|
|
7598
|
-
var StyledIndicator2 =
|
|
7638
|
+
var StyledIndicator2 = styled51(View)(({ indicatorSize, indicatorBgColor }) => ({
|
|
7599
7639
|
width: indicatorSize,
|
|
7600
7640
|
height: indicatorSize,
|
|
7601
7641
|
borderRadius: indicatorSize / 2,
|
|
7602
7642
|
backgroundColor: indicatorBgColor
|
|
7603
7643
|
}));
|
|
7604
|
-
var StyledTextContent =
|
|
7644
|
+
var StyledTextContent = styled51(View)(({ textContentGap }) => ({
|
|
7605
7645
|
// Take the row's remaining width so long label/subText wraps within the tile
|
|
7606
7646
|
// instead of pushing the trailing asset past the tile's edge.
|
|
7607
7647
|
flex: 1,
|
|
7608
7648
|
flexDirection: "column",
|
|
7609
7649
|
gap: textContentGap
|
|
7610
7650
|
}));
|
|
7611
|
-
var StyledAssetWrapper =
|
|
7651
|
+
var StyledAssetWrapper = styled51(View)({
|
|
7612
7652
|
alignSelf: "center"
|
|
7613
7653
|
});
|
|
7614
|
-
var StyledTagWrapper =
|
|
7654
|
+
var StyledTagWrapper = styled51(View)(
|
|
7615
7655
|
({ tagTopPadding }) => ({
|
|
7616
7656
|
alignItems: "flex-start",
|
|
7617
7657
|
paddingTop: tagTopPadding
|
|
7618
7658
|
})
|
|
7619
7659
|
);
|
|
7620
|
-
var Radio =
|
|
7660
|
+
var Radio = React66.forwardRef(
|
|
7621
7661
|
(_a, ref) => {
|
|
7622
7662
|
var _b = _a, {
|
|
7623
7663
|
variant = "standalone",
|
|
@@ -7649,9 +7689,9 @@ var Radio = React65.forwardRef(
|
|
|
7649
7689
|
if (disabled) return;
|
|
7650
7690
|
onSelect == null ? void 0 : onSelect(value);
|
|
7651
7691
|
};
|
|
7652
|
-
const controlSize =
|
|
7653
|
-
const indicatorSize =
|
|
7654
|
-
const borderWidthVal =
|
|
7692
|
+
const controlSize = parseTokenValue41(radio.size.control.default);
|
|
7693
|
+
const indicatorSize = parseTokenValue41(radio.size.indicator.default);
|
|
7694
|
+
const borderWidthVal = parseTokenValue41(radio.borderWidth.default);
|
|
7655
7695
|
const isTile = variant === "tile";
|
|
7656
7696
|
return /* @__PURE__ */ jsxs(
|
|
7657
7697
|
StyledRadioRoot,
|
|
@@ -7661,17 +7701,17 @@ var Radio = React65.forwardRef(
|
|
|
7661
7701
|
disabled,
|
|
7662
7702
|
accessibilityRole: "radio",
|
|
7663
7703
|
accessibilityState: { selected, disabled },
|
|
7664
|
-
radioGap:
|
|
7704
|
+
radioGap: parseTokenValue41(
|
|
7665
7705
|
isTile ? radio.radioTile.spacing.gap : spacing.gap
|
|
7666
7706
|
),
|
|
7667
7707
|
radioOpacity: disabled ? parseFloat(radio.opacity.disabled) : 1,
|
|
7668
|
-
radioPaddingVertical: isTile ?
|
|
7669
|
-
radioPaddingHorizontal: isTile ?
|
|
7670
|
-
radioMaxWidth: isTile ?
|
|
7708
|
+
radioPaddingVertical: isTile ? parseTokenValue41(radio.radioTile.spacing.verticalPadding) : void 0,
|
|
7709
|
+
radioPaddingHorizontal: isTile ? parseTokenValue41(radio.radioTile.spacing.horizontalPadding) : void 0,
|
|
7710
|
+
radioMaxWidth: isTile ? parseTokenValue41(radio.radioTile.size.maxWidth) : void 0,
|
|
7671
7711
|
radioBgColor: isTile ? selected ? radio.radioTile.colour.background.selected : radio.radioTile.colour.background.default : void 0,
|
|
7672
|
-
radioBorderWidth: isTile ?
|
|
7712
|
+
radioBorderWidth: isTile ? parseTokenValue41(radio.radioTile.borderWidth.default) : void 0,
|
|
7673
7713
|
radioBorderColor: isTile ? selected ? radio.radioTile.colour.border.selected : radio.radioTile.colour.border.default : void 0,
|
|
7674
|
-
radioBorderRadius: isTile ?
|
|
7714
|
+
radioBorderRadius: isTile ? parseTokenValue41(radio.radioTile.borderRadius.default) : void 0,
|
|
7675
7715
|
style: typeof style === "function" ? void 0 : style
|
|
7676
7716
|
}, rest), {
|
|
7677
7717
|
children: [
|
|
@@ -7693,7 +7733,7 @@ var Radio = React65.forwardRef(
|
|
|
7693
7733
|
(label || subText || tag) && /* @__PURE__ */ jsxs(
|
|
7694
7734
|
StyledTextContent,
|
|
7695
7735
|
{
|
|
7696
|
-
textContentGap:
|
|
7736
|
+
textContentGap: parseTokenValue41(spacing.content.gap),
|
|
7697
7737
|
children: [
|
|
7698
7738
|
label && /* @__PURE__ */ jsx(Typography, { token: typography.label, color: colour.text.title, children: label }),
|
|
7699
7739
|
subText && /* @__PURE__ */ jsx(
|
|
@@ -7707,7 +7747,7 @@ var Radio = React65.forwardRef(
|
|
|
7707
7747
|
tag && /* @__PURE__ */ jsx(
|
|
7708
7748
|
StyledTagWrapper,
|
|
7709
7749
|
{
|
|
7710
|
-
tagTopPadding:
|
|
7750
|
+
tagTopPadding: parseTokenValue41(spacing.content.tag.topPadding),
|
|
7711
7751
|
children: /* @__PURE__ */ jsx(Tag, __spreadValues({}, tag))
|
|
7712
7752
|
}
|
|
7713
7753
|
)
|
|
@@ -7721,16 +7761,16 @@ var Radio = React65.forwardRef(
|
|
|
7721
7761
|
}
|
|
7722
7762
|
);
|
|
7723
7763
|
Radio.displayName = "Radio";
|
|
7724
|
-
var RadioTile =
|
|
7764
|
+
var RadioTile = React66.forwardRef(
|
|
7725
7765
|
(props, ref) => /* @__PURE__ */ jsx(Radio, __spreadProps(__spreadValues({ ref }, props), { variant: "tile" }))
|
|
7726
7766
|
);
|
|
7727
7767
|
RadioTile.displayName = "RadioTile";
|
|
7728
|
-
var
|
|
7729
|
-
var StyledRadioGroup =
|
|
7768
|
+
var parseTokenValue42 = (value) => parseFloat(value);
|
|
7769
|
+
var StyledRadioGroup = styled51(View)(({ groupDirection, groupGap }) => ({
|
|
7730
7770
|
flexDirection: groupDirection,
|
|
7731
7771
|
gap: groupGap
|
|
7732
7772
|
}));
|
|
7733
|
-
var RadioGroupRoot =
|
|
7773
|
+
var RadioGroupRoot = React66.forwardRef(
|
|
7734
7774
|
(_a, ref) => {
|
|
7735
7775
|
var _b = _a, {
|
|
7736
7776
|
name: _name,
|
|
@@ -7757,11 +7797,11 @@ var RadioGroupRoot = React65.forwardRef(
|
|
|
7757
7797
|
const optionsFirstValue = (_a2 = options == null ? void 0 : options[0]) == null ? void 0 : _a2.value;
|
|
7758
7798
|
const derivedDefaultValue = defaultValue != null ? defaultValue : optionsFirstValue;
|
|
7759
7799
|
const isControlled = value !== void 0;
|
|
7760
|
-
const [internalValue, setInternalValue] =
|
|
7800
|
+
const [internalValue, setInternalValue] = React66.useState(
|
|
7761
7801
|
derivedDefaultValue != null ? derivedDefaultValue : ""
|
|
7762
7802
|
);
|
|
7763
7803
|
const currentValue = isControlled ? value : internalValue;
|
|
7764
|
-
const handleSelect =
|
|
7804
|
+
const handleSelect = React66.useCallback(
|
|
7765
7805
|
(newValue) => {
|
|
7766
7806
|
if (!isControlled) {
|
|
7767
7807
|
setInternalValue(newValue);
|
|
@@ -7782,9 +7822,9 @@ var RadioGroupRoot = React65.forwardRef(
|
|
|
7782
7822
|
option.value
|
|
7783
7823
|
));
|
|
7784
7824
|
}
|
|
7785
|
-
return
|
|
7786
|
-
if (!
|
|
7787
|
-
return
|
|
7825
|
+
return React66.Children.map(children, (child) => {
|
|
7826
|
+
if (!React66.isValidElement(child)) return child;
|
|
7827
|
+
return React66.cloneElement(child, {
|
|
7788
7828
|
selected: currentValue === child.props.value,
|
|
7789
7829
|
onSelect: handleSelect,
|
|
7790
7830
|
disabled: disabled || child.props.disabled
|
|
@@ -7797,7 +7837,7 @@ var RadioGroupRoot = React65.forwardRef(
|
|
|
7797
7837
|
ref,
|
|
7798
7838
|
accessibilityRole: "radiogroup",
|
|
7799
7839
|
groupDirection: orientation === "horizontal" ? "row" : "column",
|
|
7800
|
-
groupGap:
|
|
7840
|
+
groupGap: parseTokenValue42(radio.spacing.gap)
|
|
7801
7841
|
}, rest), {
|
|
7802
7842
|
children: renderChildren()
|
|
7803
7843
|
})
|
|
@@ -7809,11 +7849,11 @@ var RadioGroup = Object.assign(RadioGroupRoot, {
|
|
|
7809
7849
|
Radio,
|
|
7810
7850
|
Tile: RadioTile
|
|
7811
7851
|
});
|
|
7812
|
-
var SearchFieldInput =
|
|
7852
|
+
var SearchFieldInput = React66.forwardRef((_a, ref) => {
|
|
7813
7853
|
var _b = _a, { onClear, onValueChange, value, state } = _b, inputFieldProps = __objRest(_b, ["onClear", "onValueChange", "value", "state"]);
|
|
7814
|
-
const [internalValue, setInternalValue] =
|
|
7815
|
-
const inputRef =
|
|
7816
|
-
|
|
7854
|
+
const [internalValue, setInternalValue] = React66.useState("");
|
|
7855
|
+
const inputRef = React66.useRef(null);
|
|
7856
|
+
React66.useImperativeHandle(ref, () => inputRef.current);
|
|
7817
7857
|
const handleValueChange = (newValue) => {
|
|
7818
7858
|
setInternalValue(newValue);
|
|
7819
7859
|
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
@@ -7852,14 +7892,14 @@ var SearchFieldInput = React65.forwardRef((_a, ref) => {
|
|
|
7852
7892
|
);
|
|
7853
7893
|
});
|
|
7854
7894
|
SearchFieldInput.displayName = "SearchField.Field";
|
|
7855
|
-
var
|
|
7856
|
-
var StyledRoot13 =
|
|
7895
|
+
var parseTokenValue43 = (value) => parseFloat(value);
|
|
7896
|
+
var StyledRoot13 = styled51(View)(({ theme: theme2 }) => {
|
|
7857
7897
|
const { spacing } = theme2.tokens.components.inputs;
|
|
7858
7898
|
return {
|
|
7859
|
-
gap:
|
|
7899
|
+
gap: parseTokenValue43(spacing.gap)
|
|
7860
7900
|
};
|
|
7861
7901
|
});
|
|
7862
|
-
var SearchFieldRoot =
|
|
7902
|
+
var SearchFieldRoot = React66.forwardRef(
|
|
7863
7903
|
(_a, ref) => {
|
|
7864
7904
|
var _b = _a, {
|
|
7865
7905
|
label,
|
|
@@ -7929,8 +7969,8 @@ function useSearchField({
|
|
|
7929
7969
|
onClear: handleClear
|
|
7930
7970
|
};
|
|
7931
7971
|
}
|
|
7932
|
-
var
|
|
7933
|
-
var StyledSegmentItem =
|
|
7972
|
+
var parseTokenValue44 = (value) => parseFloat(value);
|
|
7973
|
+
var StyledSegmentItem = styled51(Pressable)(
|
|
7934
7974
|
({
|
|
7935
7975
|
itemHeight,
|
|
7936
7976
|
itemMinWidth,
|
|
@@ -7950,14 +7990,14 @@ var StyledSegmentItem = styled50(Pressable)(
|
|
|
7950
7990
|
opacity: itemOpacity
|
|
7951
7991
|
}, itemFlex !== void 0 ? { flex: itemFlex } : { flexShrink: 0 })
|
|
7952
7992
|
);
|
|
7953
|
-
var StyledIntrinsicClip =
|
|
7993
|
+
var StyledIntrinsicClip = styled51(View)(({ clipBorderRadius, clipBgColor, clipWidth }) => __spreadValues({
|
|
7954
7994
|
overflow: "hidden",
|
|
7955
7995
|
borderRadius: clipBorderRadius,
|
|
7956
7996
|
backgroundColor: clipBgColor,
|
|
7957
7997
|
alignSelf: "flex-start",
|
|
7958
7998
|
maxWidth: "100%"
|
|
7959
7999
|
}, clipWidth !== void 0 ? { width: clipWidth } : {}));
|
|
7960
|
-
var StyledScrollIndicator =
|
|
8000
|
+
var StyledScrollIndicator = styled51(Pressable)(
|
|
7961
8001
|
({
|
|
7962
8002
|
indicatorSide,
|
|
7963
8003
|
indicatorBorderRadius,
|
|
@@ -7989,7 +8029,7 @@ var ScrollIndicatorGradient = ({
|
|
|
7989
8029
|
side,
|
|
7990
8030
|
color
|
|
7991
8031
|
}) => {
|
|
7992
|
-
const uid =
|
|
8032
|
+
const uid = React66.useId();
|
|
7993
8033
|
const gradientId = `sc-scroll-indicator-${side}-${uid}`;
|
|
7994
8034
|
const isTrailing = side === "trailing";
|
|
7995
8035
|
return /* @__PURE__ */ jsx(View, { style: StyleSheet.absoluteFill, pointerEvents: "none", children: /* @__PURE__ */ jsxs(Svg, { width: "100%", height: "100%", preserveAspectRatio: "none", children: [
|
|
@@ -8013,7 +8053,7 @@ var ScrollIndicatorGradient = ({
|
|
|
8013
8053
|
/* @__PURE__ */ jsx(Rect, { width: "100%", height: "100%", fill: `url(#${gradientId})` })
|
|
8014
8054
|
] }) });
|
|
8015
8055
|
};
|
|
8016
|
-
var StyledContainer2 =
|
|
8056
|
+
var StyledContainer2 = styled51(View)(
|
|
8017
8057
|
({
|
|
8018
8058
|
containerGap,
|
|
8019
8059
|
containerPaddingVertical,
|
|
@@ -8061,10 +8101,10 @@ var SegmentedControlItemBase = ({
|
|
|
8061
8101
|
disabled,
|
|
8062
8102
|
accessibilityRole: "button",
|
|
8063
8103
|
accessibilityState: { selected, disabled },
|
|
8064
|
-
itemHeight:
|
|
8065
|
-
itemMinWidth:
|
|
8066
|
-
itemPaddingHorizontal:
|
|
8067
|
-
itemBorderRadius:
|
|
8104
|
+
itemHeight: parseTokenValue44(size.small.height),
|
|
8105
|
+
itemMinWidth: parseTokenValue44(size.small.minWidth),
|
|
8106
|
+
itemPaddingHorizontal: parseTokenValue44(spacing.horizontalPadding),
|
|
8107
|
+
itemBorderRadius: parseTokenValue44(borderRadius.default),
|
|
8068
8108
|
itemBgColor: selected ? colour.background.selected : "transparent",
|
|
8069
8109
|
itemOpacity: disabled ? parseFloat(opacity.disabled.default) : 1,
|
|
8070
8110
|
itemFlex: layout === "fixed" ? 1 : void 0,
|
|
@@ -8072,7 +8112,7 @@ var SegmentedControlItemBase = ({
|
|
|
8072
8112
|
}
|
|
8073
8113
|
);
|
|
8074
8114
|
};
|
|
8075
|
-
var SegmentedControlItem =
|
|
8115
|
+
var SegmentedControlItem = React66.forwardRef(
|
|
8076
8116
|
(_props, _ref) => {
|
|
8077
8117
|
return null;
|
|
8078
8118
|
}
|
|
@@ -8088,10 +8128,10 @@ var IntrinsicTrack = (_a) => {
|
|
|
8088
8128
|
"renderItems",
|
|
8089
8129
|
"forwardedRef"
|
|
8090
8130
|
]);
|
|
8091
|
-
const scrollRef =
|
|
8092
|
-
const [containerWidth, setContainerWidth] =
|
|
8093
|
-
const [contentWidth, setContentWidth] =
|
|
8094
|
-
const [scrollX, setScrollX] =
|
|
8131
|
+
const scrollRef = React66.useRef(null);
|
|
8132
|
+
const [containerWidth, setContainerWidth] = React66.useState(0);
|
|
8133
|
+
const [contentWidth, setContentWidth] = React66.useState(0);
|
|
8134
|
+
const [scrollX, setScrollX] = React66.useState(0);
|
|
8095
8135
|
const epsilon = 2;
|
|
8096
8136
|
const maxScroll = Math.max(0, contentWidth - containerWidth);
|
|
8097
8137
|
const canScrollLeft = scrollX > epsilon;
|
|
@@ -8187,7 +8227,7 @@ var IntrinsicTrack = (_a) => {
|
|
|
8187
8227
|
})
|
|
8188
8228
|
);
|
|
8189
8229
|
};
|
|
8190
|
-
var SegmentedControlRoot =
|
|
8230
|
+
var SegmentedControlRoot = React66.forwardRef(
|
|
8191
8231
|
(_a, ref) => {
|
|
8192
8232
|
var _b = _a, {
|
|
8193
8233
|
options,
|
|
@@ -8211,18 +8251,18 @@ var SegmentedControlRoot = React65.forwardRef(
|
|
|
8211
8251
|
const { spacing, borderRadius, colour } = theme2.tokens.components.segmentedControl;
|
|
8212
8252
|
const { dimensions: dimensions3 } = theme2.tokens.semantics;
|
|
8213
8253
|
const optionsFirstValue = (_a2 = options == null ? void 0 : options[0]) == null ? void 0 : _a2.value;
|
|
8214
|
-
const childrenArray =
|
|
8254
|
+
const childrenArray = React66.Children.toArray(children);
|
|
8215
8255
|
const firstChildValue = childrenArray.map((child) => {
|
|
8216
|
-
if (!
|
|
8256
|
+
if (!React66.isValidElement(child)) return void 0;
|
|
8217
8257
|
return child.props.value;
|
|
8218
8258
|
}).find((v) => typeof v === "string");
|
|
8219
8259
|
const derivedDefaultValue = (_b2 = defaultValue != null ? defaultValue : optionsFirstValue) != null ? _b2 : firstChildValue;
|
|
8220
8260
|
const isControlled = typeof value === "string";
|
|
8221
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
8261
|
+
const [uncontrolledValue, setUncontrolledValue] = React66.useState(
|
|
8222
8262
|
() => derivedDefaultValue != null ? derivedDefaultValue : ""
|
|
8223
8263
|
);
|
|
8224
8264
|
const currentValue = isControlled ? value : uncontrolledValue;
|
|
8225
|
-
const handleSelect =
|
|
8265
|
+
const handleSelect = React66.useCallback(
|
|
8226
8266
|
(newValue) => {
|
|
8227
8267
|
if (!isControlled) {
|
|
8228
8268
|
setUncontrolledValue(newValue);
|
|
@@ -8248,7 +8288,7 @@ var SegmentedControlRoot = React65.forwardRef(
|
|
|
8248
8288
|
));
|
|
8249
8289
|
}
|
|
8250
8290
|
return childrenArray.map((child) => {
|
|
8251
|
-
if (!
|
|
8291
|
+
if (!React66.isValidElement(child)) return child;
|
|
8252
8292
|
const childProps = child.props;
|
|
8253
8293
|
return /* @__PURE__ */ jsx(
|
|
8254
8294
|
SegmentedControlItemBase,
|
|
@@ -8266,14 +8306,14 @@ var SegmentedControlRoot = React65.forwardRef(
|
|
|
8266
8306
|
});
|
|
8267
8307
|
};
|
|
8268
8308
|
const containerProps = {
|
|
8269
|
-
containerGap:
|
|
8270
|
-
containerPaddingVertical:
|
|
8271
|
-
containerPaddingHorizontal:
|
|
8272
|
-
containerBorderRadius:
|
|
8309
|
+
containerGap: parseTokenValue44(spacing.gap),
|
|
8310
|
+
containerPaddingVertical: parseTokenValue44(spacing.verticalPadding),
|
|
8311
|
+
containerPaddingHorizontal: parseTokenValue44(spacing.horizontalPadding),
|
|
8312
|
+
containerBorderRadius: parseTokenValue44(borderRadius.default),
|
|
8273
8313
|
containerBgColor: colour.background.default,
|
|
8274
8314
|
containerFullWidth: layout === "fixed",
|
|
8275
|
-
scrollIndicatorPaddingOuter:
|
|
8276
|
-
scrollIndicatorPaddingInner:
|
|
8315
|
+
scrollIndicatorPaddingOuter: parseTokenValue44(dimensions3.spacing["2xl"]),
|
|
8316
|
+
scrollIndicatorPaddingInner: parseTokenValue44(dimensions3.spacing.sm)
|
|
8277
8317
|
};
|
|
8278
8318
|
if (layout === "intrinsic") {
|
|
8279
8319
|
return /* @__PURE__ */ jsx(
|
|
@@ -8292,8 +8332,8 @@ SegmentedControlRoot.displayName = "SegmentedControl";
|
|
|
8292
8332
|
var SegmentedControl = Object.assign(SegmentedControlRoot, {
|
|
8293
8333
|
Item: SegmentedControlItem
|
|
8294
8334
|
});
|
|
8295
|
-
var
|
|
8296
|
-
var StyledTriggerWrapper =
|
|
8335
|
+
var parseTokenValue45 = (value) => parseFloat(value);
|
|
8336
|
+
var StyledTriggerWrapper = styled51(Animated.View)(({
|
|
8297
8337
|
theme: theme2,
|
|
8298
8338
|
state: _state
|
|
8299
8339
|
}) => {
|
|
@@ -8301,25 +8341,25 @@ var StyledTriggerWrapper = styled50(Animated.View)(({
|
|
|
8301
8341
|
return {
|
|
8302
8342
|
flexDirection: "row",
|
|
8303
8343
|
alignItems: "center",
|
|
8304
|
-
gap:
|
|
8305
|
-
minWidth:
|
|
8344
|
+
gap: parseTokenValue45(spacing.field.gap),
|
|
8345
|
+
minWidth: parseTokenValue45(size.field.minWidth),
|
|
8306
8346
|
width: "100%",
|
|
8307
|
-
height:
|
|
8347
|
+
height: parseTokenValue45(size.field.height),
|
|
8308
8348
|
backgroundColor: colour.field.background.default,
|
|
8309
|
-
borderRadius:
|
|
8349
|
+
borderRadius: parseTokenValue45(borderRadius.field.default)
|
|
8310
8350
|
};
|
|
8311
8351
|
});
|
|
8312
|
-
var StyledIconWrapper2 =
|
|
8352
|
+
var StyledIconWrapper2 = styled51(View)({
|
|
8313
8353
|
flexShrink: 0,
|
|
8314
8354
|
alignItems: "center",
|
|
8315
8355
|
justifyContent: "center"
|
|
8316
8356
|
});
|
|
8317
|
-
var StyledArrowIcon =
|
|
8357
|
+
var StyledArrowIcon = styled51(Animated.View)({
|
|
8318
8358
|
flexShrink: 0,
|
|
8319
8359
|
alignItems: "center",
|
|
8320
8360
|
justifyContent: "center"
|
|
8321
8361
|
});
|
|
8322
|
-
var SelectFieldTrigger =
|
|
8362
|
+
var SelectFieldTrigger = React66.forwardRef(
|
|
8323
8363
|
(_a, ref) => {
|
|
8324
8364
|
var _b = _a, {
|
|
8325
8365
|
state = "default",
|
|
@@ -8339,10 +8379,10 @@ var SelectFieldTrigger = React65.forwardRef(
|
|
|
8339
8379
|
const theme2 = useTheme();
|
|
8340
8380
|
const { colour, borderWidth, spacing } = theme2.tokens.components.inputs;
|
|
8341
8381
|
const hasState = state === "error" || state === "success";
|
|
8342
|
-
const baseBorderWidth =
|
|
8343
|
-
const selectedBorderWidth =
|
|
8344
|
-
const baseVerticalPadding =
|
|
8345
|
-
const baseHorizontalPadding =
|
|
8382
|
+
const baseBorderWidth = parseTokenValue45(borderWidth.field.default);
|
|
8383
|
+
const selectedBorderWidth = parseTokenValue45(borderWidth.field.selected);
|
|
8384
|
+
const baseVerticalPadding = parseTokenValue45(spacing.field.verticalPadding);
|
|
8385
|
+
const baseHorizontalPadding = parseTokenValue45(
|
|
8346
8386
|
spacing.field.horizontalPadding
|
|
8347
8387
|
);
|
|
8348
8388
|
const borderDelta = selectedBorderWidth - baseBorderWidth;
|
|
@@ -8418,7 +8458,7 @@ var SelectFieldTrigger = React65.forwardRef(
|
|
|
8418
8458
|
}
|
|
8419
8459
|
);
|
|
8420
8460
|
SelectFieldTrigger.displayName = "SelectField.Trigger";
|
|
8421
|
-
var SelectFieldValue =
|
|
8461
|
+
var SelectFieldValue = React66.forwardRef(
|
|
8422
8462
|
(_a, ref) => {
|
|
8423
8463
|
var _b = _a, { placeholder } = _b, rest = __objRest(_b, ["placeholder"]);
|
|
8424
8464
|
const theme2 = useTheme();
|
|
@@ -8435,34 +8475,34 @@ var SelectFieldValue = React65.forwardRef(
|
|
|
8435
8475
|
}
|
|
8436
8476
|
);
|
|
8437
8477
|
SelectFieldValue.displayName = "SelectField.Value";
|
|
8438
|
-
var
|
|
8439
|
-
var StyledContentShadow =
|
|
8478
|
+
var parseTokenValue46 = (value) => parseFloat(value);
|
|
8479
|
+
var StyledContentShadow = styled51(View)(({ theme: theme2 }) => {
|
|
8440
8480
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
8441
8481
|
const shadow = dropdown.list.dropshadow.default;
|
|
8442
8482
|
return {
|
|
8443
|
-
borderRadius:
|
|
8483
|
+
borderRadius: parseTokenValue46(dropdown.list.borderRadius.default),
|
|
8444
8484
|
shadowColor: shadow.color,
|
|
8445
8485
|
shadowOffset: {
|
|
8446
|
-
width:
|
|
8447
|
-
height:
|
|
8486
|
+
width: parseTokenValue46(shadow.offsetX),
|
|
8487
|
+
height: parseTokenValue46(shadow.offsetY)
|
|
8448
8488
|
},
|
|
8449
8489
|
shadowOpacity: 1,
|
|
8450
|
-
shadowRadius:
|
|
8490
|
+
shadowRadius: parseTokenValue46(shadow.blur),
|
|
8451
8491
|
elevation: 8
|
|
8452
8492
|
};
|
|
8453
8493
|
});
|
|
8454
|
-
var StyledContentInner =
|
|
8494
|
+
var StyledContentInner = styled51(View)(({ theme: theme2 }) => {
|
|
8455
8495
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
8456
8496
|
const { colour } = theme2.tokens.components.inputs;
|
|
8457
8497
|
return {
|
|
8458
8498
|
backgroundColor: colour.field.background.default,
|
|
8459
|
-
borderRadius:
|
|
8460
|
-
minWidth:
|
|
8461
|
-
maxHeight:
|
|
8499
|
+
borderRadius: parseTokenValue46(dropdown.list.borderRadius.default),
|
|
8500
|
+
minWidth: parseTokenValue46(dropdown.list.size.minWidth),
|
|
8501
|
+
maxHeight: parseTokenValue46(dropdown.list.size.maxHeight),
|
|
8462
8502
|
overflow: "hidden"
|
|
8463
8503
|
};
|
|
8464
8504
|
});
|
|
8465
|
-
var SelectFieldContent =
|
|
8505
|
+
var SelectFieldContent = React66.forwardRef((_a, ref) => {
|
|
8466
8506
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
8467
8507
|
const theme2 = useTheme();
|
|
8468
8508
|
const { spacing } = theme2.tokens.components.inputs;
|
|
@@ -8473,7 +8513,7 @@ var SelectFieldContent = React65.forwardRef((_a, ref) => {
|
|
|
8473
8513
|
{
|
|
8474
8514
|
side: "bottom",
|
|
8475
8515
|
align: "start",
|
|
8476
|
-
sideOffset:
|
|
8516
|
+
sideOffset: parseTokenValue46(spacing.gap),
|
|
8477
8517
|
alignOffset: 0,
|
|
8478
8518
|
asChild: true,
|
|
8479
8519
|
children: /* @__PURE__ */ jsx(Slot, { ref, children: /* @__PURE__ */ jsx(StyledContentShadow, __spreadProps(__spreadValues({}, rest), { children: /* @__PURE__ */ jsx(StyledContentInner, { children: /* @__PURE__ */ jsx(SelectPrimitive3.Viewport, { children: /* @__PURE__ */ jsx(
|
|
@@ -8490,54 +8530,54 @@ var SelectFieldContent = React65.forwardRef((_a, ref) => {
|
|
|
8490
8530
|
] });
|
|
8491
8531
|
});
|
|
8492
8532
|
SelectFieldContent.displayName = "SelectField.Content";
|
|
8493
|
-
var
|
|
8494
|
-
var StyledItem3 =
|
|
8533
|
+
var parseTokenValue47 = (value) => parseFloat(value);
|
|
8534
|
+
var StyledItem3 = styled51(Pressable)(({ theme: theme2 }) => {
|
|
8495
8535
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
8496
8536
|
return {
|
|
8497
8537
|
flexDirection: "row",
|
|
8498
8538
|
alignItems: "center",
|
|
8499
|
-
gap:
|
|
8500
|
-
height:
|
|
8501
|
-
paddingVertical:
|
|
8502
|
-
paddingHorizontal:
|
|
8539
|
+
gap: parseTokenValue47(dropdown.listItem.content.gap),
|
|
8540
|
+
height: parseTokenValue47(dropdown.listItem.size.height),
|
|
8541
|
+
paddingVertical: parseTokenValue47(dropdown.listItem.spacing.verticalPadding),
|
|
8542
|
+
paddingHorizontal: parseTokenValue47(
|
|
8503
8543
|
dropdown.listItem.spacing.horiztonalPadding
|
|
8504
8544
|
),
|
|
8505
8545
|
backgroundColor: dropdown.listItem.colour.background.default
|
|
8506
8546
|
};
|
|
8507
8547
|
});
|
|
8508
|
-
var StyledIconWrapper3 =
|
|
8548
|
+
var StyledIconWrapper3 = styled51(View)({
|
|
8509
8549
|
flexShrink: 0,
|
|
8510
8550
|
alignItems: "center",
|
|
8511
8551
|
justifyContent: "center"
|
|
8512
8552
|
});
|
|
8513
|
-
var StyledContentWrapper =
|
|
8553
|
+
var StyledContentWrapper = styled51(View)(({ theme: theme2 }) => {
|
|
8514
8554
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
8515
8555
|
return {
|
|
8516
8556
|
flexDirection: "row",
|
|
8517
8557
|
alignItems: "center",
|
|
8518
|
-
gap:
|
|
8558
|
+
gap: parseTokenValue47(dropdown.listItem.content.gap),
|
|
8519
8559
|
flex: 1,
|
|
8520
8560
|
minWidth: 0
|
|
8521
8561
|
};
|
|
8522
8562
|
});
|
|
8523
|
-
var StyledTextWrapper2 =
|
|
8563
|
+
var StyledTextWrapper2 = styled51(View)({
|
|
8524
8564
|
flex: 1,
|
|
8525
8565
|
minWidth: 0
|
|
8526
8566
|
});
|
|
8527
|
-
var StyledItemText =
|
|
8567
|
+
var StyledItemText = styled51(Text)(({ theme: theme2 }) => {
|
|
8528
8568
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
8529
8569
|
return {
|
|
8530
8570
|
color: dropdown.listItem.colour.text.placeholder.default
|
|
8531
8571
|
};
|
|
8532
8572
|
});
|
|
8533
|
-
var StyledHintText =
|
|
8573
|
+
var StyledHintText = styled51(Text)(({ theme: theme2 }) => {
|
|
8534
8574
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
8535
8575
|
return {
|
|
8536
8576
|
color: dropdown.listItem.colour.text.hint.default,
|
|
8537
8577
|
flexShrink: 0
|
|
8538
8578
|
};
|
|
8539
8579
|
});
|
|
8540
|
-
var SelectFieldItem =
|
|
8580
|
+
var SelectFieldItem = React66.forwardRef(
|
|
8541
8581
|
(_a, ref) => {
|
|
8542
8582
|
var _b = _a, { value, leadingIcon, hintText, children, disabled, isSelected } = _b, rest = __objRest(_b, ["value", "leadingIcon", "hintText", "children", "disabled", "isSelected"]);
|
|
8543
8583
|
const theme2 = useTheme();
|
|
@@ -8572,24 +8612,24 @@ var SelectFieldItem = React65.forwardRef(
|
|
|
8572
8612
|
}
|
|
8573
8613
|
);
|
|
8574
8614
|
SelectFieldItem.displayName = "SelectField.Item";
|
|
8575
|
-
var
|
|
8576
|
-
var StyledNoResults =
|
|
8615
|
+
var parseTokenValue48 = (value) => parseFloat(value);
|
|
8616
|
+
var StyledNoResults = styled51(View)(({ theme: theme2 }) => {
|
|
8577
8617
|
const { dropdown } = theme2.tokens.components.dropdownList;
|
|
8578
8618
|
return {
|
|
8579
|
-
paddingVertical:
|
|
8580
|
-
paddingHorizontal:
|
|
8619
|
+
paddingVertical: parseTokenValue48(dropdown.listItem.spacing.verticalPadding),
|
|
8620
|
+
paddingHorizontal: parseTokenValue48(
|
|
8581
8621
|
dropdown.listItem.spacing.horiztonalPadding
|
|
8582
8622
|
),
|
|
8583
8623
|
alignItems: "center"
|
|
8584
8624
|
};
|
|
8585
8625
|
});
|
|
8586
|
-
var StyledRoot14 =
|
|
8626
|
+
var StyledRoot14 = styled51(View)(({ theme: theme2 }) => {
|
|
8587
8627
|
const { spacing } = theme2.tokens.components.inputs;
|
|
8588
8628
|
return {
|
|
8589
|
-
gap:
|
|
8629
|
+
gap: parseTokenValue48(spacing.gap)
|
|
8590
8630
|
};
|
|
8591
8631
|
});
|
|
8592
|
-
var SelectFieldRoot =
|
|
8632
|
+
var SelectFieldRoot = React66.forwardRef(
|
|
8593
8633
|
(_a, ref) => {
|
|
8594
8634
|
var _b = _a, {
|
|
8595
8635
|
label,
|
|
@@ -8624,15 +8664,15 @@ var SelectFieldRoot = React65.forwardRef(
|
|
|
8624
8664
|
"searchPlaceholder",
|
|
8625
8665
|
"noResultsText"
|
|
8626
8666
|
]);
|
|
8627
|
-
const [isOpen, setIsOpen] =
|
|
8628
|
-
const [showContent, setShowContent] =
|
|
8629
|
-
const [internalValue, setInternalValue] =
|
|
8667
|
+
const [isOpen, setIsOpen] = React66.useState(false);
|
|
8668
|
+
const [showContent, setShowContent] = React66.useState(false);
|
|
8669
|
+
const [internalValue, setInternalValue] = React66.useState(
|
|
8630
8670
|
defaultValue != null ? defaultValue : null
|
|
8631
8671
|
);
|
|
8632
|
-
const [searchQuery, setSearchQuery] =
|
|
8633
|
-
const [clearKey, setClearKey] =
|
|
8634
|
-
const searchInputRef =
|
|
8635
|
-
|
|
8672
|
+
const [searchQuery, setSearchQuery] = React66.useState("");
|
|
8673
|
+
const [clearKey, setClearKey] = React66.useState(0);
|
|
8674
|
+
const searchInputRef = React66.useRef(null);
|
|
8675
|
+
React66.useEffect(() => {
|
|
8636
8676
|
if (!isOpen) {
|
|
8637
8677
|
setShowContent(false);
|
|
8638
8678
|
return;
|
|
@@ -8665,8 +8705,8 @@ var SelectFieldRoot = React65.forwardRef(
|
|
|
8665
8705
|
keyboardSub.remove();
|
|
8666
8706
|
};
|
|
8667
8707
|
}, [isOpen, searchable]);
|
|
8668
|
-
const isCompound =
|
|
8669
|
-
(child) =>
|
|
8708
|
+
const isCompound = React66.Children.toArray(children).some(
|
|
8709
|
+
(child) => React66.isValidElement(child) && child.type === SelectFieldContent
|
|
8670
8710
|
);
|
|
8671
8711
|
if (isCompound) {
|
|
8672
8712
|
return /* @__PURE__ */ jsx(StyledRoot14, __spreadProps(__spreadValues({ ref }, rest), { children }));
|
|
@@ -8681,11 +8721,11 @@ var SelectFieldRoot = React65.forwardRef(
|
|
|
8681
8721
|
if (!open) setSearchQuery("");
|
|
8682
8722
|
};
|
|
8683
8723
|
const currentValue = value !== void 0 ? value : internalValue;
|
|
8684
|
-
const allItems =
|
|
8724
|
+
const allItems = React66.Children.toArray(children);
|
|
8685
8725
|
const filteredItems = searchable ? allItems.filter((child) => {
|
|
8686
8726
|
var _a2;
|
|
8687
8727
|
if (!searchQuery) return true;
|
|
8688
|
-
if (
|
|
8728
|
+
if (React66.isValidElement(child) && child.type === SelectFieldItem) {
|
|
8689
8729
|
const label2 = String(
|
|
8690
8730
|
(_a2 = child.props.children) != null ? _a2 : ""
|
|
8691
8731
|
);
|
|
@@ -8754,10 +8794,10 @@ var SelectFieldRoot = React65.forwardRef(
|
|
|
8754
8794
|
] })),
|
|
8755
8795
|
showContent && /* @__PURE__ */ jsxs(SelectFieldContent, { children: [
|
|
8756
8796
|
filteredItems.map((child) => {
|
|
8757
|
-
if (
|
|
8797
|
+
if (React66.isValidElement(child) && child.type === SelectFieldItem) {
|
|
8758
8798
|
const selectedValue = currentValue && typeof currentValue === "object" && "value" in currentValue ? currentValue.value : currentValue;
|
|
8759
8799
|
const childProps = child.props;
|
|
8760
|
-
return
|
|
8800
|
+
return React66.cloneElement(
|
|
8761
8801
|
child,
|
|
8762
8802
|
{
|
|
8763
8803
|
isSelected: childProps.value === selectedValue
|
|
@@ -8822,7 +8862,7 @@ var { dimensions } = semantics;
|
|
|
8822
8862
|
var parseSize = (value) => {
|
|
8823
8863
|
return parseInt(value.replace("px", ""), 10);
|
|
8824
8864
|
};
|
|
8825
|
-
var Wrapper =
|
|
8865
|
+
var Wrapper = styled51(View)({
|
|
8826
8866
|
borderWidth: parseSize(inputTokens.borderWidth.field.selected),
|
|
8827
8867
|
borderColor: inputTokens.colour.field.border.selected,
|
|
8828
8868
|
borderRadius: parseSize(inputTokens.borderRadius.field.default),
|
|
@@ -8834,29 +8874,29 @@ var Wrapper = styled50(View)({
|
|
|
8834
8874
|
alignItems: "center",
|
|
8835
8875
|
justifyContent: "space-between"
|
|
8836
8876
|
});
|
|
8837
|
-
var SelectIcon =
|
|
8877
|
+
var SelectIcon = styled51(Animated10.View)({
|
|
8838
8878
|
position: "absolute",
|
|
8839
8879
|
right: 0,
|
|
8840
8880
|
marginRight: 0
|
|
8841
8881
|
});
|
|
8842
|
-
var InputText2 =
|
|
8882
|
+
var InputText2 = styled51(Text)({
|
|
8843
8883
|
color: inputTokens.colour.field.text.default,
|
|
8844
8884
|
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
8845
8885
|
fontWeight: inputTokens.field.placeholder.default.fontWeight,
|
|
8846
8886
|
flex: 1
|
|
8847
8887
|
});
|
|
8848
|
-
var PlaceholderText =
|
|
8888
|
+
var PlaceholderText = styled51(Text)({
|
|
8849
8889
|
color: inputTokens.colour.field.text.placeholder,
|
|
8850
8890
|
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
8851
8891
|
fontWeight: inputTokens.field.placeholder.default.fontWeight,
|
|
8852
8892
|
flex: 1
|
|
8853
8893
|
});
|
|
8854
|
-
var ModalOverlay =
|
|
8894
|
+
var ModalOverlay = styled51(View)({
|
|
8855
8895
|
flex: 1,
|
|
8856
8896
|
backgroundColor: "rgba(0, 0, 0, 0.32)",
|
|
8857
8897
|
justifyContent: "flex-end"
|
|
8858
8898
|
});
|
|
8859
|
-
var AndroidDialog =
|
|
8899
|
+
var AndroidDialog = styled51(View)({
|
|
8860
8900
|
backgroundColor: inputTokens.colour.field.background.default,
|
|
8861
8901
|
borderTopLeftRadius: parseSize(dimensions.borderRadius.lg),
|
|
8862
8902
|
borderTopRightRadius: parseSize(dimensions.borderRadius.lg),
|
|
@@ -8866,14 +8906,14 @@ var AndroidDialog = styled50(View)({
|
|
|
8866
8906
|
paddingBottom: parseSize(dimensions.spacing.xl),
|
|
8867
8907
|
paddingHorizontal: parseSize(dimensions.spacing.md)
|
|
8868
8908
|
});
|
|
8869
|
-
var DialogTitle =
|
|
8909
|
+
var DialogTitle = styled51(Text)({
|
|
8870
8910
|
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
8871
8911
|
fontWeight: inputTokens.text.label.fontWeight,
|
|
8872
8912
|
color: inputTokens.colour.field.text.default,
|
|
8873
8913
|
marginBottom: parseSize(dimensions.spacing.md),
|
|
8874
8914
|
marginLeft: parseSize(dimensions.spacing.xs)
|
|
8875
8915
|
});
|
|
8876
|
-
var AndroidOptionRow =
|
|
8916
|
+
var AndroidOptionRow = styled51(View)({
|
|
8877
8917
|
flexDirection: "row",
|
|
8878
8918
|
alignItems: "center",
|
|
8879
8919
|
paddingVertical: parseSize(dimensions.spacing.md),
|
|
@@ -8881,7 +8921,7 @@ var AndroidOptionRow = styled50(View)({
|
|
|
8881
8921
|
borderBottomWidth: parseSize(dimensions.borderWidth.sm),
|
|
8882
8922
|
borderBottomColor: themeTokens.primitives.colour.brand.brown[2]
|
|
8883
8923
|
});
|
|
8884
|
-
var RadioOuter =
|
|
8924
|
+
var RadioOuter = styled51(View)({
|
|
8885
8925
|
width: parseSize(dimensions.spacing.lg),
|
|
8886
8926
|
height: parseSize(dimensions.spacing.lg),
|
|
8887
8927
|
borderRadius: parseSize(dimensions.spacing.lg) / 2,
|
|
@@ -8891,13 +8931,13 @@ var RadioOuter = styled50(View)({
|
|
|
8891
8931
|
justifyContent: "center",
|
|
8892
8932
|
marginRight: parseSize(dimensions.spacing.sm)
|
|
8893
8933
|
});
|
|
8894
|
-
var RadioInner =
|
|
8934
|
+
var RadioInner = styled51(View)({
|
|
8895
8935
|
width: parseSize(dimensions.spacing.md) / 2,
|
|
8896
8936
|
height: parseSize(dimensions.spacing.md) / 2,
|
|
8897
8937
|
borderRadius: parseSize(dimensions.spacing.md) / 4,
|
|
8898
8938
|
backgroundColor: inputTokens.colour.field.border.selected
|
|
8899
8939
|
});
|
|
8900
|
-
var AndroidOptionText =
|
|
8940
|
+
var AndroidOptionText = styled51(Text)(
|
|
8901
8941
|
({ isSelected }) => ({
|
|
8902
8942
|
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
8903
8943
|
fontWeight: isSelected ? inputTokens.text.label.fontWeight : inputTokens.field.placeholder.default.fontWeight,
|
|
@@ -8924,7 +8964,7 @@ var useIconAnimation = () => {
|
|
|
8924
8964
|
iconAnimationStyles
|
|
8925
8965
|
};
|
|
8926
8966
|
};
|
|
8927
|
-
var NativeSelectPicker =
|
|
8967
|
+
var NativeSelectPicker = React66.forwardRef(
|
|
8928
8968
|
(_a, ref) => {
|
|
8929
8969
|
var _b = _a, {
|
|
8930
8970
|
items,
|
|
@@ -9071,19 +9111,19 @@ var NativeSelectPicker = React65.forwardRef(
|
|
|
9071
9111
|
}
|
|
9072
9112
|
);
|
|
9073
9113
|
NativeSelectPicker.displayName = "NativeSelectPicker";
|
|
9074
|
-
var
|
|
9075
|
-
var StyledLabelRow2 =
|
|
9114
|
+
var parseTokenValue49 = (value) => parseFloat(value);
|
|
9115
|
+
var StyledLabelRow2 = styled51(View)(({ labelRowGap }) => ({
|
|
9076
9116
|
flexDirection: "row",
|
|
9077
9117
|
alignItems: "center",
|
|
9078
9118
|
gap: labelRowGap
|
|
9079
9119
|
}));
|
|
9080
|
-
var StyledLabelSlot =
|
|
9120
|
+
var StyledLabelSlot = styled51(View)(({ labelSlotGap }) => ({
|
|
9081
9121
|
flexDirection: "row",
|
|
9082
9122
|
alignItems: "center",
|
|
9083
9123
|
gap: labelSlotGap,
|
|
9084
9124
|
flexShrink: 0
|
|
9085
9125
|
}));
|
|
9086
|
-
var Slider =
|
|
9126
|
+
var Slider = React66.forwardRef(
|
|
9087
9127
|
(_a, ref) => {
|
|
9088
9128
|
var _b = _a, {
|
|
9089
9129
|
value: controlledValue,
|
|
@@ -9118,10 +9158,10 @@ var Slider = React65.forwardRef(
|
|
|
9118
9158
|
const { slider, buttons } = theme2.tokens.components;
|
|
9119
9159
|
const { dimensions: dimensions3 } = theme2.tokens.semantics;
|
|
9120
9160
|
const isControlled = controlledValue !== void 0;
|
|
9121
|
-
const [internalValue, setInternalValue] =
|
|
9161
|
+
const [internalValue, setInternalValue] = React66.useState(defaultValue);
|
|
9122
9162
|
const currentValue = isControlled ? controlledValue : internalValue;
|
|
9123
|
-
const thumbSize =
|
|
9124
|
-
const trackHeight =
|
|
9163
|
+
const thumbSize = parseTokenValue49(buttons.size.md.height);
|
|
9164
|
+
const trackHeight = parseTokenValue49(slider.sizing.track.height);
|
|
9125
9165
|
const isWeb = Platform.OS === "web";
|
|
9126
9166
|
const [trackLayoutWidth, setTrackLayoutWidth] = useState(0);
|
|
9127
9167
|
const webFraction = max > min ? (currentValue - min) / (max - min) : 0;
|
|
@@ -9216,8 +9256,8 @@ var Slider = React65.forwardRef(
|
|
|
9216
9256
|
};
|
|
9217
9257
|
const hasLeading = leadingIcon !== void 0 || leadingLabel !== void 0;
|
|
9218
9258
|
const hasTrailing = trailingIcon !== void 0 || trailingLabel !== void 0;
|
|
9219
|
-
const labelGap =
|
|
9220
|
-
const roundBorderRadius =
|
|
9259
|
+
const labelGap = parseTokenValue49(slider.sliderField.spacing.label.gap);
|
|
9260
|
+
const roundBorderRadius = parseTokenValue49(dimensions3.borderRadius.round);
|
|
9221
9261
|
const thumbIconColor = buttons.iconButton.filledButton.colour.icon.primary.default;
|
|
9222
9262
|
const thumbContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9223
9263
|
/* @__PURE__ */ jsx(
|
|
@@ -9242,15 +9282,15 @@ var Slider = React65.forwardRef(
|
|
|
9242
9282
|
const thumbStyle = {
|
|
9243
9283
|
width: thumbSize,
|
|
9244
9284
|
height: thumbSize,
|
|
9245
|
-
borderRadius:
|
|
9285
|
+
borderRadius: parseTokenValue49(buttons.borderRadius.default),
|
|
9246
9286
|
backgroundColor: buttons.iconButton.filledButton.colour.background.primary.default,
|
|
9247
9287
|
flexDirection: "row",
|
|
9248
9288
|
alignItems: "center",
|
|
9249
9289
|
justifyContent: "center"
|
|
9250
9290
|
};
|
|
9251
9291
|
const outerStyle = {
|
|
9252
|
-
gap:
|
|
9253
|
-
minWidth:
|
|
9292
|
+
gap: parseTokenValue49(slider.sliderField.spacing.gap),
|
|
9293
|
+
minWidth: parseTokenValue49(slider.sizing.minWidth),
|
|
9254
9294
|
opacity: disabled ? parseFloat(buttons.opacity.disabled) : 1
|
|
9255
9295
|
};
|
|
9256
9296
|
const leadingSlot = hasLeading && /* @__PURE__ */ jsxs(StyledLabelSlot, { labelSlotGap: labelGap, children: [
|
|
@@ -9288,7 +9328,7 @@ var Slider = React65.forwardRef(
|
|
|
9288
9328
|
height: trackHeight,
|
|
9289
9329
|
borderRadius: roundBorderRadius,
|
|
9290
9330
|
backgroundColor: slider.colour.track.background.default,
|
|
9291
|
-
borderWidth:
|
|
9331
|
+
borderWidth: parseTokenValue49(dimensions3.borderWidth.sm),
|
|
9292
9332
|
borderColor: slider.colour.track.border.default
|
|
9293
9333
|
};
|
|
9294
9334
|
const indicatorBaseStyle = {
|
|
@@ -9412,8 +9452,8 @@ var ICON_MAP = {
|
|
|
9412
9452
|
warning: Error_default,
|
|
9413
9453
|
info: Info_default
|
|
9414
9454
|
};
|
|
9415
|
-
var
|
|
9416
|
-
var StyledInlineRoot =
|
|
9455
|
+
var parseTokenValue50 = (value) => parseFloat(value);
|
|
9456
|
+
var StyledInlineRoot = styled51(View)(
|
|
9417
9457
|
({ rootPaddingH, rootPaddingV, rootGap, rootBorderRadius, rootBgColor }) => ({
|
|
9418
9458
|
flexDirection: "row",
|
|
9419
9459
|
alignItems: "flex-start",
|
|
@@ -9424,7 +9464,7 @@ var StyledInlineRoot = styled50(View)(
|
|
|
9424
9464
|
backgroundColor: rootBgColor
|
|
9425
9465
|
})
|
|
9426
9466
|
);
|
|
9427
|
-
var StyledToastRoot =
|
|
9467
|
+
var StyledToastRoot = styled51(View)(
|
|
9428
9468
|
({
|
|
9429
9469
|
rootPaddingH,
|
|
9430
9470
|
rootPaddingV,
|
|
@@ -9451,7 +9491,7 @@ var StyledToastRoot = styled50(View)(
|
|
|
9451
9491
|
elevation: 4
|
|
9452
9492
|
})
|
|
9453
9493
|
);
|
|
9454
|
-
var StyledSystemRoot =
|
|
9494
|
+
var StyledSystemRoot = styled51(View)(
|
|
9455
9495
|
({
|
|
9456
9496
|
rootPaddingH,
|
|
9457
9497
|
rootPaddingTop,
|
|
@@ -9471,37 +9511,37 @@ var StyledSystemRoot = styled50(View)(
|
|
|
9471
9511
|
width: "100%"
|
|
9472
9512
|
})
|
|
9473
9513
|
);
|
|
9474
|
-
var StyledContents =
|
|
9514
|
+
var StyledContents = styled51(View)(({ contentsGap }) => ({
|
|
9475
9515
|
flexDirection: "column",
|
|
9476
9516
|
alignItems: "flex-start",
|
|
9477
9517
|
flex: 1,
|
|
9478
9518
|
minWidth: 0,
|
|
9479
9519
|
gap: contentsGap
|
|
9480
9520
|
}));
|
|
9481
|
-
var StyledCopyRow =
|
|
9521
|
+
var StyledCopyRow = styled51(View)(({ copyGap }) => ({
|
|
9482
9522
|
flexDirection: "row",
|
|
9483
9523
|
alignItems: "flex-start",
|
|
9484
9524
|
gap: copyGap,
|
|
9485
9525
|
width: "100%"
|
|
9486
9526
|
}));
|
|
9487
|
-
var StyledInlineCopy =
|
|
9527
|
+
var StyledInlineCopy = styled51(View)(({ copyGap }) => ({
|
|
9488
9528
|
flexDirection: "column",
|
|
9489
9529
|
alignItems: "flex-start",
|
|
9490
9530
|
gap: copyGap,
|
|
9491
9531
|
flex: 1,
|
|
9492
9532
|
minWidth: 0
|
|
9493
9533
|
}));
|
|
9494
|
-
var StyledLinkWrapper =
|
|
9534
|
+
var StyledLinkWrapper = styled51(View)(({ linkPaddingLeft }) => ({
|
|
9495
9535
|
paddingLeft: linkPaddingLeft,
|
|
9496
9536
|
width: "100%"
|
|
9497
9537
|
}));
|
|
9498
|
-
var StyledCloseButton =
|
|
9538
|
+
var StyledCloseButton = styled51(Pressable)({
|
|
9499
9539
|
alignItems: "center",
|
|
9500
9540
|
justifyContent: "center",
|
|
9501
9541
|
flexShrink: 0,
|
|
9502
9542
|
padding: 0
|
|
9503
9543
|
});
|
|
9504
|
-
var Notification =
|
|
9544
|
+
var Notification = React66.forwardRef(
|
|
9505
9545
|
(props, ref) => {
|
|
9506
9546
|
const _a = props, {
|
|
9507
9547
|
variant = "inline",
|
|
@@ -9537,10 +9577,10 @@ var Notification = React65.forwardRef(
|
|
|
9537
9577
|
ref,
|
|
9538
9578
|
accessible: true,
|
|
9539
9579
|
accessibilityRole: "summary",
|
|
9540
|
-
rootPaddingH:
|
|
9541
|
-
rootPaddingTop:
|
|
9542
|
-
rootPaddingBottom:
|
|
9543
|
-
rootGap:
|
|
9580
|
+
rootPaddingH: parseTokenValue50(sizeTokens.horizontalPadding),
|
|
9581
|
+
rootPaddingTop: parseTokenValue50(sizeTokens.topPadding),
|
|
9582
|
+
rootPaddingBottom: parseTokenValue50(sizeTokens.bottomPadding),
|
|
9583
|
+
rootGap: parseTokenValue50(sizeTokens.content.gap),
|
|
9544
9584
|
rootBgColor: bgMap[type],
|
|
9545
9585
|
rootAlignCenter: isLarge
|
|
9546
9586
|
}, rest), {
|
|
@@ -9565,7 +9605,7 @@ var Notification = React65.forwardRef(
|
|
|
9565
9605
|
link && /* @__PURE__ */ jsx(
|
|
9566
9606
|
StyledLinkWrapper,
|
|
9567
9607
|
{
|
|
9568
|
-
linkPaddingLeft:
|
|
9608
|
+
linkPaddingLeft: parseTokenValue50(sizeTokens.content.gap),
|
|
9569
9609
|
children: /* @__PURE__ */ jsx(
|
|
9570
9610
|
Link,
|
|
9571
9611
|
{
|
|
@@ -9589,12 +9629,12 @@ var Notification = React65.forwardRef(
|
|
|
9589
9629
|
ref,
|
|
9590
9630
|
accessible: true,
|
|
9591
9631
|
accessibilityRole: "alert",
|
|
9592
|
-
rootPaddingH:
|
|
9593
|
-
rootPaddingV:
|
|
9594
|
-
rootGap:
|
|
9595
|
-
rootBorderRadius:
|
|
9632
|
+
rootPaddingH: parseTokenValue50(toast.spacing.horizontalPadding),
|
|
9633
|
+
rootPaddingV: parseTokenValue50(toast.spacing.verticalPadding),
|
|
9634
|
+
rootGap: parseTokenValue50(toast.spacing.gap),
|
|
9635
|
+
rootBorderRadius: parseTokenValue50(toast.borderRadius.default),
|
|
9596
9636
|
rootBgColor: toast.colour.background.default,
|
|
9597
|
-
rootBorderWidth:
|
|
9637
|
+
rootBorderWidth: parseTokenValue50(toast.borderWidth.default),
|
|
9598
9638
|
rootBorderColor: toast.colour.border.default,
|
|
9599
9639
|
rootShadowColor: toast.shaddow.default.color
|
|
9600
9640
|
}, rest), {
|
|
@@ -9602,9 +9642,9 @@ var Notification = React65.forwardRef(
|
|
|
9602
9642
|
/* @__PURE__ */ jsxs(
|
|
9603
9643
|
StyledContents,
|
|
9604
9644
|
{
|
|
9605
|
-
contentsGap:
|
|
9645
|
+
contentsGap: parseTokenValue50(toast.content.spacing.gap),
|
|
9606
9646
|
children: [
|
|
9607
|
-
/* @__PURE__ */ jsxs(StyledCopyRow, { copyGap:
|
|
9647
|
+
/* @__PURE__ */ jsxs(StyledCopyRow, { copyGap: parseTokenValue50(toast.copy.spacing.gap), children: [
|
|
9608
9648
|
showIcon && /* @__PURE__ */ jsx(
|
|
9609
9649
|
Icon,
|
|
9610
9650
|
{
|
|
@@ -9626,7 +9666,7 @@ var Notification = React65.forwardRef(
|
|
|
9626
9666
|
link && /* @__PURE__ */ jsx(
|
|
9627
9667
|
StyledLinkWrapper,
|
|
9628
9668
|
{
|
|
9629
|
-
linkPaddingLeft:
|
|
9669
|
+
linkPaddingLeft: parseTokenValue50(
|
|
9630
9670
|
toast.link.spacing.leftPadding
|
|
9631
9671
|
),
|
|
9632
9672
|
children: /* @__PURE__ */ jsx(
|
|
@@ -9664,14 +9704,14 @@ var Notification = React65.forwardRef(
|
|
|
9664
9704
|
ref,
|
|
9665
9705
|
accessible: true,
|
|
9666
9706
|
accessibilityRole: "alert",
|
|
9667
|
-
rootPaddingH:
|
|
9668
|
-
rootPaddingV:
|
|
9669
|
-
rootGap:
|
|
9670
|
-
rootBorderRadius:
|
|
9707
|
+
rootPaddingH: parseTokenValue50(spacing.horizontalPadding),
|
|
9708
|
+
rootPaddingV: parseTokenValue50(spacing.verticalPadding),
|
|
9709
|
+
rootGap: parseTokenValue50(spacing.gap),
|
|
9710
|
+
rootBorderRadius: parseTokenValue50(borderRadius.default),
|
|
9671
9711
|
rootBgColor: bgMap[type]
|
|
9672
9712
|
}, rest), {
|
|
9673
9713
|
children: [
|
|
9674
|
-
/* @__PURE__ */ jsx(StyledContents, { contentsGap:
|
|
9714
|
+
/* @__PURE__ */ jsx(StyledContents, { contentsGap: parseTokenValue50(content.spacing.gap), children: /* @__PURE__ */ jsxs(StyledCopyRow, { copyGap: parseTokenValue50(content.spacing.gap), children: [
|
|
9675
9715
|
showIcon && /* @__PURE__ */ jsx(
|
|
9676
9716
|
Icon,
|
|
9677
9717
|
{
|
|
@@ -9684,7 +9724,7 @@ var Notification = React65.forwardRef(
|
|
|
9684
9724
|
/* @__PURE__ */ jsxs(
|
|
9685
9725
|
StyledInlineCopy,
|
|
9686
9726
|
{
|
|
9687
|
-
copyGap:
|
|
9727
|
+
copyGap: parseTokenValue50(content.copy.spacing.gap),
|
|
9688
9728
|
children: [
|
|
9689
9729
|
title && /* @__PURE__ */ jsx(
|
|
9690
9730
|
Typography,
|
|
@@ -9705,7 +9745,7 @@ var Notification = React65.forwardRef(
|
|
|
9705
9745
|
link && /* @__PURE__ */ jsx(
|
|
9706
9746
|
StyledLinkWrapper,
|
|
9707
9747
|
{
|
|
9708
|
-
linkPaddingLeft:
|
|
9748
|
+
linkPaddingLeft: parseTokenValue50(content.copy.spacing.gap),
|
|
9709
9749
|
children: /* @__PURE__ */ jsx(
|
|
9710
9750
|
Link,
|
|
9711
9751
|
{
|
|
@@ -9737,7 +9777,7 @@ var Notification = React65.forwardRef(
|
|
|
9737
9777
|
}
|
|
9738
9778
|
);
|
|
9739
9779
|
Notification.displayName = "Notification";
|
|
9740
|
-
var
|
|
9780
|
+
var parseTokenValue51 = (value) => parseFloat(value);
|
|
9741
9781
|
var SCALE_STEP = 0.06;
|
|
9742
9782
|
var SPRING_CONFIG = { damping: 20, stiffness: 260, mass: 0.5 };
|
|
9743
9783
|
var CARD_ENTERING = FadeInDown.duration(200).easing(Easing$1.inOut(Easing$1.quad));
|
|
@@ -9749,7 +9789,7 @@ var CARD_BASE_STYLE = {
|
|
|
9749
9789
|
right: 0,
|
|
9750
9790
|
transformOrigin: "50% 100%"
|
|
9751
9791
|
};
|
|
9752
|
-
var StyledRoot15 =
|
|
9792
|
+
var StyledRoot15 = styled51(View)(({ rootBottom, rootPaddingH }) => ({
|
|
9753
9793
|
position: "absolute",
|
|
9754
9794
|
left: 0,
|
|
9755
9795
|
right: 0,
|
|
@@ -9757,7 +9797,7 @@ var StyledRoot15 = styled50(View)(({ rootBottom, rootPaddingH }) => ({
|
|
|
9757
9797
|
paddingHorizontal: rootPaddingH,
|
|
9758
9798
|
alignItems: "stretch"
|
|
9759
9799
|
}));
|
|
9760
|
-
var StyledStack =
|
|
9800
|
+
var StyledStack = styled51(View)({
|
|
9761
9801
|
position: "relative",
|
|
9762
9802
|
width: "100%"
|
|
9763
9803
|
});
|
|
@@ -9768,7 +9808,7 @@ var StackedCard = ({
|
|
|
9768
9808
|
onDismiss
|
|
9769
9809
|
}) => {
|
|
9770
9810
|
const depthSV = useSharedValue(depth);
|
|
9771
|
-
|
|
9811
|
+
React66.useEffect(() => {
|
|
9772
9812
|
depthSV.value = withSpring(depth, SPRING_CONFIG);
|
|
9773
9813
|
}, [depth, depthSV]);
|
|
9774
9814
|
const animatedStyle = useAnimatedStyle(() => ({
|
|
@@ -9799,13 +9839,13 @@ var StackedCard = ({
|
|
|
9799
9839
|
}
|
|
9800
9840
|
);
|
|
9801
9841
|
};
|
|
9802
|
-
var StackedNotifications =
|
|
9842
|
+
var StackedNotifications = React66.forwardRef((_a, ref) => {
|
|
9803
9843
|
var _b = _a, { items, onDismiss, bottomOffset } = _b, rest = __objRest(_b, ["items", "onDismiss", "bottomOffset"]);
|
|
9804
9844
|
const theme2 = useTheme();
|
|
9805
9845
|
const { spacing } = theme2.tokens.semantics.dimensions;
|
|
9806
|
-
const [dismissed, setDismissed] =
|
|
9846
|
+
const [dismissed, setDismissed] = React66.useState(/* @__PURE__ */ new Set());
|
|
9807
9847
|
const idsKey = items.map((item) => item.id).join("|");
|
|
9808
|
-
|
|
9848
|
+
React66.useEffect(() => {
|
|
9809
9849
|
setDismissed((prev) => {
|
|
9810
9850
|
if (prev.size === 0) return prev;
|
|
9811
9851
|
const present = new Set(items.map((item) => item.id));
|
|
@@ -9818,11 +9858,11 @@ var StackedNotifications = React65.forwardRef((_a, ref) => {
|
|
|
9818
9858
|
return changed ? next : prev;
|
|
9819
9859
|
});
|
|
9820
9860
|
}, [idsKey]);
|
|
9821
|
-
const activeItems =
|
|
9861
|
+
const activeItems = React66.useMemo(
|
|
9822
9862
|
() => items.filter((item) => !dismissed.has(item.id)),
|
|
9823
9863
|
[items, dismissed]
|
|
9824
9864
|
);
|
|
9825
|
-
const layers =
|
|
9865
|
+
const layers = React66.useMemo(
|
|
9826
9866
|
() => activeItems.slice(-3).reverse(),
|
|
9827
9867
|
[activeItems]
|
|
9828
9868
|
);
|
|
@@ -9834,15 +9874,15 @@ var StackedNotifications = React65.forwardRef((_a, ref) => {
|
|
|
9834
9874
|
});
|
|
9835
9875
|
onDismiss == null ? void 0 : onDismiss(id);
|
|
9836
9876
|
};
|
|
9837
|
-
const rootBottom = bottomOffset != null ? bottomOffset :
|
|
9838
|
-
const peekStep =
|
|
9877
|
+
const rootBottom = bottomOffset != null ? bottomOffset : parseTokenValue51(spacing.lg);
|
|
9878
|
+
const peekStep = parseTokenValue51(spacing.xs);
|
|
9839
9879
|
return /* @__PURE__ */ jsx(
|
|
9840
9880
|
StyledRoot15,
|
|
9841
9881
|
__spreadProps(__spreadValues({
|
|
9842
9882
|
ref,
|
|
9843
9883
|
pointerEvents: "box-none",
|
|
9844
9884
|
rootBottom,
|
|
9845
|
-
rootPaddingH:
|
|
9885
|
+
rootPaddingH: parseTokenValue51(spacing.md)
|
|
9846
9886
|
}, rest), {
|
|
9847
9887
|
children: /* @__PURE__ */ jsx(StyledStack, { children: layers.map((item, depth) => /* @__PURE__ */ jsx(
|
|
9848
9888
|
StackedCard,
|
|
@@ -9858,16 +9898,16 @@ var StackedNotifications = React65.forwardRef((_a, ref) => {
|
|
|
9858
9898
|
);
|
|
9859
9899
|
});
|
|
9860
9900
|
StackedNotifications.displayName = "StackedNotifications";
|
|
9861
|
-
var
|
|
9901
|
+
var parseTokenValue52 = (value) => parseFloat(value);
|
|
9862
9902
|
var NIB_OFFSET = {
|
|
9863
9903
|
left: 24,
|
|
9864
9904
|
middle: 146,
|
|
9865
9905
|
right: 268
|
|
9866
9906
|
};
|
|
9867
|
-
var Container2 =
|
|
9907
|
+
var Container2 = styled51(View)(({ $width }) => ({
|
|
9868
9908
|
width: $width
|
|
9869
9909
|
}));
|
|
9870
|
-
var StyledBody =
|
|
9910
|
+
var StyledBody = styled51(View)(
|
|
9871
9911
|
({
|
|
9872
9912
|
bgColor,
|
|
9873
9913
|
borderColor,
|
|
@@ -9966,7 +10006,7 @@ function NibTriangle({
|
|
|
9966
10006
|
}
|
|
9967
10007
|
);
|
|
9968
10008
|
}
|
|
9969
|
-
var Tooltip =
|
|
10009
|
+
var Tooltip = React66.forwardRef(
|
|
9970
10010
|
(_a, ref) => {
|
|
9971
10011
|
var _b = _a, { text, alignment = "middle", position = "bottom", children } = _b, props = __objRest(_b, ["text", "alignment", "position", "children"]);
|
|
9972
10012
|
const theme2 = useTheme();
|
|
@@ -9980,9 +10020,9 @@ var Tooltip = React65.forwardRef(
|
|
|
9980
10020
|
width
|
|
9981
10021
|
} = theme2.tokens.components.tooltip;
|
|
9982
10022
|
const [open, setOpen] = useState(false);
|
|
9983
|
-
const tooltipWidth =
|
|
9984
|
-
const nibWidth =
|
|
9985
|
-
const nibHeight =
|
|
10023
|
+
const tooltipWidth = parseTokenValue52(width);
|
|
10024
|
+
const nibWidth = parseTokenValue52(nibToken.width);
|
|
10025
|
+
const nibHeight = parseTokenValue52(nibToken.height);
|
|
9986
10026
|
const nibHalfWidth = nibWidth / 2;
|
|
9987
10027
|
const nibOuterHeight = nibHeight + 1;
|
|
9988
10028
|
const nibX = NIB_OFFSET[alignment];
|
|
@@ -9991,11 +10031,11 @@ var Tooltip = React65.forwardRef(
|
|
|
9991
10031
|
const side = position === "bottom" ? "top" : "bottom";
|
|
9992
10032
|
const bgColor = colour.background.default;
|
|
9993
10033
|
const borderColor = colour.border.default;
|
|
9994
|
-
const borderW =
|
|
9995
|
-
const borderR =
|
|
9996
|
-
const topPad =
|
|
9997
|
-
const bottomPad =
|
|
9998
|
-
const horizontalPad =
|
|
10034
|
+
const borderW = parseTokenValue52(borderWidth.default);
|
|
10035
|
+
const borderR = parseTokenValue52(borderRadius.default);
|
|
10036
|
+
const topPad = parseTokenValue52(spacing.topPadding);
|
|
10037
|
+
const bottomPad = parseTokenValue52(spacing.bottomPadding);
|
|
10038
|
+
const horizontalPad = parseTokenValue52(spacing.horizontalPading);
|
|
9999
10039
|
const nibRow = /* @__PURE__ */ jsx(View, { style: { height: nibOuterHeight, position: "relative", zIndex: 2 }, children: /* @__PURE__ */ jsx(
|
|
10000
10040
|
NibTriangle,
|
|
10001
10041
|
{
|
|
@@ -10054,8 +10094,8 @@ var Tooltip = React65.forwardRef(
|
|
|
10054
10094
|
return bubble;
|
|
10055
10095
|
}
|
|
10056
10096
|
if (Platform.OS === "web") {
|
|
10057
|
-
const child =
|
|
10058
|
-
const trigger = child ?
|
|
10097
|
+
const child = React66.isValidElement(children) ? children : null;
|
|
10098
|
+
const trigger = child ? React66.cloneElement(child, {
|
|
10059
10099
|
onPress: () => {
|
|
10060
10100
|
var _a2, _b2;
|
|
10061
10101
|
(_b2 = (_a2 = child.props).onPress) == null ? void 0 : _b2.call(_a2);
|
|
@@ -10096,8 +10136,8 @@ var Tooltip = React65.forwardRef(
|
|
|
10096
10136
|
}
|
|
10097
10137
|
);
|
|
10098
10138
|
Tooltip.displayName = "Tooltip";
|
|
10099
|
-
var
|
|
10100
|
-
var StyledInsightRoot =
|
|
10139
|
+
var parseTokenValue53 = (value) => parseFloat(value);
|
|
10140
|
+
var StyledInsightRoot = styled51(View)(
|
|
10101
10141
|
({
|
|
10102
10142
|
rootGap,
|
|
10103
10143
|
rootPaddingH,
|
|
@@ -10124,7 +10164,7 @@ var StyledInsightRoot = styled50(View)(
|
|
|
10124
10164
|
minWidth: rootMinWidth
|
|
10125
10165
|
})
|
|
10126
10166
|
);
|
|
10127
|
-
var StyledInsightContent =
|
|
10167
|
+
var StyledInsightContent = styled51(View)(
|
|
10128
10168
|
({ contentGap }) => ({
|
|
10129
10169
|
flex: 1,
|
|
10130
10170
|
flexDirection: "column",
|
|
@@ -10132,7 +10172,7 @@ var StyledInsightContent = styled50(View)(
|
|
|
10132
10172
|
gap: contentGap
|
|
10133
10173
|
})
|
|
10134
10174
|
);
|
|
10135
|
-
var MessageCardInsight =
|
|
10175
|
+
var MessageCardInsight = React66.forwardRef(
|
|
10136
10176
|
(_a, ref) => {
|
|
10137
10177
|
var _b = _a, { variant = "standalone", icon, illustration, title, children } = _b, rest = __objRest(_b, ["variant", "icon", "illustration", "title", "children"]);
|
|
10138
10178
|
const theme2 = useTheme();
|
|
@@ -10141,26 +10181,26 @@ var MessageCardInsight = React65.forwardRef(
|
|
|
10141
10181
|
const isSupporting = variant === "supporting";
|
|
10142
10182
|
const supporting = insightCard.spacing.supporting;
|
|
10143
10183
|
const standalone = insightCard.spacing.standalone;
|
|
10144
|
-
const radiusStandalone =
|
|
10184
|
+
const radiusStandalone = parseTokenValue53(
|
|
10145
10185
|
insightCard.borderRadius.standalone.default
|
|
10146
10186
|
);
|
|
10147
|
-
const radiusSupporting =
|
|
10187
|
+
const radiusSupporting = parseTokenValue53(
|
|
10148
10188
|
insightCard.borderRadius.supporting.bottom
|
|
10149
10189
|
);
|
|
10150
10190
|
return /* @__PURE__ */ jsxs(
|
|
10151
10191
|
StyledInsightRoot,
|
|
10152
10192
|
__spreadProps(__spreadValues({
|
|
10153
10193
|
ref,
|
|
10154
|
-
rootGap:
|
|
10194
|
+
rootGap: parseTokenValue53(
|
|
10155
10195
|
isSupporting ? supporting.gap : standalone.gap
|
|
10156
10196
|
),
|
|
10157
|
-
rootPaddingH:
|
|
10197
|
+
rootPaddingH: parseTokenValue53(
|
|
10158
10198
|
isSupporting ? semanticSpacing.md : standalone.horizontalPadding
|
|
10159
10199
|
),
|
|
10160
|
-
rootPaddingTop:
|
|
10200
|
+
rootPaddingTop: parseTokenValue53(
|
|
10161
10201
|
isSupporting ? supporting.topPadding : standalone.verticalPadding
|
|
10162
10202
|
),
|
|
10163
|
-
rootPaddingBottom:
|
|
10203
|
+
rootPaddingBottom: parseTokenValue53(
|
|
10164
10204
|
isSupporting ? supporting.bottomPadding : standalone.verticalPadding
|
|
10165
10205
|
),
|
|
10166
10206
|
rootBorderTopLeftRadius: isSupporting ? 0 : radiusStandalone,
|
|
@@ -10168,7 +10208,7 @@ var MessageCardInsight = React65.forwardRef(
|
|
|
10168
10208
|
rootBorderBottomLeftRadius: isSupporting ? radiusSupporting : radiusStandalone,
|
|
10169
10209
|
rootBorderBottomRightRadius: isSupporting ? radiusSupporting : radiusStandalone,
|
|
10170
10210
|
rootBgColor: insightCard.colour.background.default,
|
|
10171
|
-
rootMinWidth:
|
|
10211
|
+
rootMinWidth: parseTokenValue53(insightCard.size.minWidth),
|
|
10172
10212
|
accessible: true,
|
|
10173
10213
|
accessibilityRole: "summary"
|
|
10174
10214
|
}, rest), {
|
|
@@ -10177,7 +10217,7 @@ var MessageCardInsight = React65.forwardRef(
|
|
|
10177
10217
|
/* @__PURE__ */ jsxs(
|
|
10178
10218
|
StyledInsightContent,
|
|
10179
10219
|
{
|
|
10180
|
-
contentGap:
|
|
10220
|
+
contentGap: parseTokenValue53(standalone.content.gap),
|
|
10181
10221
|
children: [
|
|
10182
10222
|
title && /* @__PURE__ */ jsx(
|
|
10183
10223
|
Typography,
|
|
@@ -10204,7 +10244,7 @@ var MessageCardInsight = React65.forwardRef(
|
|
|
10204
10244
|
}
|
|
10205
10245
|
);
|
|
10206
10246
|
MessageCardInsight.displayName = "MessageCard.Insight";
|
|
10207
|
-
var StyledBannerRoot =
|
|
10247
|
+
var StyledBannerRoot = styled51(View)(({ rootGap, rootPadding, rootBorderRadius, rootBgColor }) => ({
|
|
10208
10248
|
flexDirection: "row",
|
|
10209
10249
|
alignItems: "center",
|
|
10210
10250
|
gap: rootGap,
|
|
@@ -10212,7 +10252,7 @@ var StyledBannerRoot = styled50(View)(({ rootGap, rootPadding, rootBorderRadius,
|
|
|
10212
10252
|
borderRadius: rootBorderRadius,
|
|
10213
10253
|
backgroundColor: rootBgColor
|
|
10214
10254
|
}));
|
|
10215
|
-
var StyledBannerImage =
|
|
10255
|
+
var StyledBannerImage = styled51(View)(({ imageRadius, imageBgColor }) => ({
|
|
10216
10256
|
flexShrink: 0,
|
|
10217
10257
|
width: 108,
|
|
10218
10258
|
height: 108,
|
|
@@ -10220,14 +10260,14 @@ var StyledBannerImage = styled50(View)(({ imageRadius, imageBgColor }) => ({
|
|
|
10220
10260
|
overflow: "hidden",
|
|
10221
10261
|
backgroundColor: imageBgColor
|
|
10222
10262
|
}));
|
|
10223
|
-
var StyledBannerIllustrationSlot =
|
|
10263
|
+
var StyledBannerIllustrationSlot = styled51(View)({
|
|
10224
10264
|
flexShrink: 0,
|
|
10225
10265
|
width: 108,
|
|
10226
10266
|
height: 108,
|
|
10227
10267
|
alignItems: "center",
|
|
10228
10268
|
justifyContent: "center"
|
|
10229
10269
|
});
|
|
10230
|
-
var StyledBannerContents =
|
|
10270
|
+
var StyledBannerContents = styled51(View)(
|
|
10231
10271
|
({ contentsGap }) => ({
|
|
10232
10272
|
flex: 1,
|
|
10233
10273
|
flexDirection: "column",
|
|
@@ -10237,13 +10277,13 @@ var StyledBannerContents = styled50(View)(
|
|
|
10237
10277
|
minWidth: 0
|
|
10238
10278
|
})
|
|
10239
10279
|
);
|
|
10240
|
-
var StyledBannerCopy =
|
|
10280
|
+
var StyledBannerCopy = styled51(View)(({ copyGap }) => ({
|
|
10241
10281
|
flexDirection: "column",
|
|
10242
10282
|
alignItems: "flex-start",
|
|
10243
10283
|
gap: copyGap,
|
|
10244
10284
|
width: "100%"
|
|
10245
10285
|
}));
|
|
10246
|
-
var MessageCardBanner =
|
|
10286
|
+
var MessageCardBanner = React66.forwardRef(
|
|
10247
10287
|
(_a, ref) => {
|
|
10248
10288
|
var _b = _a, {
|
|
10249
10289
|
colourScheme = "primary",
|
|
@@ -10269,21 +10309,21 @@ var MessageCardBanner = React65.forwardRef(
|
|
|
10269
10309
|
StyledBannerRoot,
|
|
10270
10310
|
__spreadProps(__spreadValues({
|
|
10271
10311
|
ref,
|
|
10272
|
-
rootGap:
|
|
10273
|
-
rootPadding:
|
|
10274
|
-
rootBorderRadius:
|
|
10312
|
+
rootGap: parseTokenValue53(dimensions3.spacing.md),
|
|
10313
|
+
rootPadding: parseTokenValue53(dimensions3.spacing.md),
|
|
10314
|
+
rootBorderRadius: parseTokenValue53(dimensions3.borderRadius.md),
|
|
10275
10315
|
rootBgColor: bgColor,
|
|
10276
10316
|
accessible: true,
|
|
10277
10317
|
accessibilityRole: "summary"
|
|
10278
10318
|
}, rest), {
|
|
10279
10319
|
children: [
|
|
10280
|
-
(media == null ? void 0 : media.type) === "illustration" ? /* @__PURE__ */ jsx(StyledBannerIllustrationSlot, { children:
|
|
10320
|
+
(media == null ? void 0 : media.type) === "illustration" ? /* @__PURE__ */ jsx(StyledBannerIllustrationSlot, { children: React66.createElement(media.illustration, {
|
|
10281
10321
|
width: 108,
|
|
10282
10322
|
height: 108
|
|
10283
10323
|
}) }) : (media == null ? void 0 : media.type) === "image" ? /* @__PURE__ */ jsx(
|
|
10284
10324
|
StyledBannerImage,
|
|
10285
10325
|
{
|
|
10286
|
-
imageRadius:
|
|
10326
|
+
imageRadius: parseTokenValue53(dimensions3.borderRadius.sm),
|
|
10287
10327
|
imageBgColor: colour.background.surface.secondary,
|
|
10288
10328
|
children: /* @__PURE__ */ jsx(
|
|
10289
10329
|
Image,
|
|
@@ -10299,12 +10339,12 @@ var MessageCardBanner = React65.forwardRef(
|
|
|
10299
10339
|
/* @__PURE__ */ jsxs(
|
|
10300
10340
|
StyledBannerContents,
|
|
10301
10341
|
{
|
|
10302
|
-
contentsGap:
|
|
10342
|
+
contentsGap: parseTokenValue53(dimensions3.spacing.xs),
|
|
10303
10343
|
children: [
|
|
10304
10344
|
/* @__PURE__ */ jsxs(
|
|
10305
10345
|
StyledBannerCopy,
|
|
10306
10346
|
{
|
|
10307
|
-
copyGap:
|
|
10347
|
+
copyGap: parseTokenValue53(dimensions3.spacing["3xs"]),
|
|
10308
10348
|
children: [
|
|
10309
10349
|
title && /* @__PURE__ */ jsx(Typography, { variant: "heading", size: "xs", color: "primary", children: title }),
|
|
10310
10350
|
/* @__PURE__ */ jsx(Typography, { variant: "body", size: "md", color: "secondary", children })
|
|
@@ -10335,7 +10375,7 @@ var MessageCard = {
|
|
|
10335
10375
|
Insight: MessageCardInsight,
|
|
10336
10376
|
Banner: MessageCardBanner
|
|
10337
10377
|
};
|
|
10338
|
-
var
|
|
10378
|
+
var parseTokenValue54 = (value) => parseFloat(value);
|
|
10339
10379
|
var slideEaseOut = Easing$1.out(Easing$1.quad);
|
|
10340
10380
|
var MONTH_SLIDE_ENTERING = {
|
|
10341
10381
|
forward: FadeInRight.duration(250).easing(slideEaseOut),
|
|
@@ -10376,14 +10416,14 @@ function defaultGetDateState(date) {
|
|
|
10376
10416
|
function getDefaultMonthLabel(year, month, locale) {
|
|
10377
10417
|
return format(new Date(year, month, 1), "MMMM yyyy", { locale });
|
|
10378
10418
|
}
|
|
10379
|
-
var StyledContainer3 =
|
|
10419
|
+
var StyledContainer3 = styled51(View)(({ containerMaxWidth }) => ({
|
|
10380
10420
|
flexDirection: "column",
|
|
10381
10421
|
// Fill the parent by default (capped by maxWidth) so consumers don't need a
|
|
10382
10422
|
// wrapper. Overridable via the `style` prop.
|
|
10383
10423
|
width: "100%",
|
|
10384
10424
|
maxWidth: containerMaxWidth
|
|
10385
10425
|
}));
|
|
10386
|
-
var StyledMonthHeader =
|
|
10426
|
+
var StyledMonthHeader = styled51(View)(
|
|
10387
10427
|
({ headerGap, datesGap }) => ({
|
|
10388
10428
|
flexDirection: "row",
|
|
10389
10429
|
alignItems: "center",
|
|
@@ -10392,24 +10432,24 @@ var StyledMonthHeader = styled50(View)(
|
|
|
10392
10432
|
marginBottom: datesGap
|
|
10393
10433
|
})
|
|
10394
10434
|
);
|
|
10395
|
-
var StyledWeekRow =
|
|
10435
|
+
var StyledWeekRow = styled51(View)(({ weekGap }) => ({
|
|
10396
10436
|
flexDirection: "row",
|
|
10397
10437
|
// Gap between the week-day header and the month header.
|
|
10398
10438
|
marginBottom: weekGap
|
|
10399
10439
|
}));
|
|
10400
|
-
var StyledWeekCell =
|
|
10440
|
+
var StyledWeekCell = styled51(View)({
|
|
10401
10441
|
flex: 1,
|
|
10402
10442
|
alignItems: "center",
|
|
10403
10443
|
justifyContent: "center"
|
|
10404
10444
|
});
|
|
10405
|
-
var StyledDatesGrid =
|
|
10445
|
+
var StyledDatesGrid = styled51(View)(({ rowGap }) => ({
|
|
10406
10446
|
flexDirection: "column",
|
|
10407
10447
|
gap: rowGap
|
|
10408
10448
|
}));
|
|
10409
|
-
var StyledDateRow =
|
|
10449
|
+
var StyledDateRow = styled51(View)({
|
|
10410
10450
|
flexDirection: "row"
|
|
10411
10451
|
});
|
|
10412
|
-
var StyledDateCell =
|
|
10452
|
+
var StyledDateCell = styled51(View)(
|
|
10413
10453
|
({ cellHeight }) => ({
|
|
10414
10454
|
flex: 1,
|
|
10415
10455
|
height: cellHeight,
|
|
@@ -10417,7 +10457,7 @@ var StyledDateCell = styled50(View)(
|
|
|
10417
10457
|
justifyContent: "center"
|
|
10418
10458
|
})
|
|
10419
10459
|
);
|
|
10420
|
-
var StyledIndicator3 =
|
|
10460
|
+
var StyledIndicator3 = styled51(View)(
|
|
10421
10461
|
({
|
|
10422
10462
|
indicatorSize,
|
|
10423
10463
|
indicatorBorderRadius,
|
|
@@ -10437,7 +10477,7 @@ var StyledIndicator3 = styled50(View)(
|
|
|
10437
10477
|
justifyContent: "center"
|
|
10438
10478
|
})
|
|
10439
10479
|
);
|
|
10440
|
-
var DatePicker =
|
|
10480
|
+
var DatePicker = React66.forwardRef(
|
|
10441
10481
|
(_a, ref) => {
|
|
10442
10482
|
var _b = _a, {
|
|
10443
10483
|
year,
|
|
@@ -10496,17 +10536,17 @@ var DatePicker = React65.forwardRef(
|
|
|
10496
10536
|
} = useMemo(
|
|
10497
10537
|
() => ({
|
|
10498
10538
|
// Gap between the week-day header and the month header.
|
|
10499
|
-
weekGap:
|
|
10539
|
+
weekGap: parseTokenValue54(datePicker.spacing.gap),
|
|
10500
10540
|
// Gap between the month header and the dates grid.
|
|
10501
|
-
datesGap:
|
|
10502
|
-
containerMaxWidth:
|
|
10503
|
-
headerGap:
|
|
10504
|
-
cellHeight:
|
|
10505
|
-
indicatorSize:
|
|
10506
|
-
indicatorBorderRadius:
|
|
10507
|
-
selectedBorderWidth:
|
|
10508
|
-
disabledOpacity:
|
|
10509
|
-
rowGap:
|
|
10541
|
+
datesGap: parseTokenValue54(theme2.tokens.semantics.dimensions.spacing.md),
|
|
10542
|
+
containerMaxWidth: parseTokenValue54(dt.size.width) * 7,
|
|
10543
|
+
headerGap: parseTokenValue54(datePicker.month.spacing.gap),
|
|
10544
|
+
cellHeight: parseTokenValue54(dt.size.height),
|
|
10545
|
+
indicatorSize: parseTokenValue54(dt.size.indicator),
|
|
10546
|
+
indicatorBorderRadius: parseTokenValue54(dt.borderRadius.indicator),
|
|
10547
|
+
selectedBorderWidth: parseTokenValue54(dt.borderWidth.indicator.selected),
|
|
10548
|
+
disabledOpacity: parseTokenValue54(dt.opacity.disabled),
|
|
10549
|
+
rowGap: parseTokenValue54(datePicker.dates.spacing.gap)
|
|
10510
10550
|
}),
|
|
10511
10551
|
[datePicker, dt, theme2]
|
|
10512
10552
|
);
|
|
@@ -10784,26 +10824,26 @@ var buildPointerPath = (r) => {
|
|
|
10784
10824
|
"Z"
|
|
10785
10825
|
].join(" ");
|
|
10786
10826
|
};
|
|
10787
|
-
var
|
|
10788
|
-
var StyledRoot16 =
|
|
10827
|
+
var parseTokenValue55 = (value) => parseFloat(value);
|
|
10828
|
+
var StyledRoot16 = styled51(View)(({ rootGap }) => ({
|
|
10789
10829
|
flexDirection: "column",
|
|
10790
10830
|
gap: rootGap,
|
|
10791
10831
|
width: "100%"
|
|
10792
10832
|
}));
|
|
10793
|
-
var StyledRow2 =
|
|
10833
|
+
var StyledRow2 = styled51(View)(({ rowGap }) => ({
|
|
10794
10834
|
flexDirection: "row",
|
|
10795
10835
|
alignItems: "flex-start",
|
|
10796
10836
|
gap: rowGap,
|
|
10797
10837
|
width: "100%"
|
|
10798
10838
|
}));
|
|
10799
|
-
var StyledItemStack =
|
|
10839
|
+
var StyledItemStack = styled51(View)(({ stackGap }) => ({
|
|
10800
10840
|
flexDirection: "column",
|
|
10801
10841
|
alignItems: "center",
|
|
10802
10842
|
gap: stackGap,
|
|
10803
10843
|
flex: 1,
|
|
10804
10844
|
minWidth: 0
|
|
10805
10845
|
}));
|
|
10806
|
-
var StyledPictureButton =
|
|
10846
|
+
var StyledPictureButton = styled51(Pressable)(
|
|
10807
10847
|
({
|
|
10808
10848
|
buttonBorderRadius,
|
|
10809
10849
|
buttonBorderWidth,
|
|
@@ -10830,14 +10870,14 @@ var StyledPictureButton = styled50(Pressable)(
|
|
|
10830
10870
|
overflow: "hidden"
|
|
10831
10871
|
})
|
|
10832
10872
|
);
|
|
10833
|
-
var StyledPointer =
|
|
10873
|
+
var StyledPointer = styled51(Svg)(
|
|
10834
10874
|
({ pointerVisible }) => ({
|
|
10835
10875
|
width: POINTER_WIDTH,
|
|
10836
10876
|
height: POINTER_HEIGHT,
|
|
10837
10877
|
opacity: pointerVisible ? 1 : 0
|
|
10838
10878
|
})
|
|
10839
10879
|
);
|
|
10840
|
-
var PictureSelector =
|
|
10880
|
+
var PictureSelector = React66.forwardRef(
|
|
10841
10881
|
(_a, ref) => {
|
|
10842
10882
|
var _b = _a, {
|
|
10843
10883
|
label,
|
|
@@ -10864,7 +10904,7 @@ var PictureSelector = React65.forwardRef(
|
|
|
10864
10904
|
const { pictureSelector } = theme2.tokens.components;
|
|
10865
10905
|
const { pictureButton } = pictureSelector;
|
|
10866
10906
|
const isControlled = value !== void 0;
|
|
10867
|
-
const [internalValue, setInternalValue] =
|
|
10907
|
+
const [internalValue, setInternalValue] = React66.useState(defaultValue);
|
|
10868
10908
|
const selectedValue = isControlled ? value : internalValue;
|
|
10869
10909
|
const selectedItem = items.find((item) => item.value === selectedValue);
|
|
10870
10910
|
const hasInsight = Boolean(
|
|
@@ -10874,21 +10914,21 @@ var PictureSelector = React65.forwardRef(
|
|
|
10874
10914
|
if (!isControlled) setInternalValue(nextValue);
|
|
10875
10915
|
onValueChange == null ? void 0 : onValueChange(nextValue);
|
|
10876
10916
|
};
|
|
10877
|
-
const rootGap =
|
|
10878
|
-
const rowGap =
|
|
10879
|
-
const stackGap =
|
|
10880
|
-
const buttonPadding =
|
|
10881
|
-
const buttonBorderRadius =
|
|
10917
|
+
const rootGap = parseTokenValue55(pictureSelector.spacing.container.gap);
|
|
10918
|
+
const rowGap = parseTokenValue55(pictureSelector.spacing.buttons.gap);
|
|
10919
|
+
const stackGap = parseTokenValue55(pictureButton.spacing.container.gap);
|
|
10920
|
+
const buttonPadding = parseTokenValue55(pictureButton.spacing.padding);
|
|
10921
|
+
const buttonBorderRadius = parseTokenValue55(
|
|
10882
10922
|
pictureButton.borderRadius.default
|
|
10883
10923
|
);
|
|
10884
|
-
const borderWidthDefault =
|
|
10924
|
+
const borderWidthDefault = parseTokenValue55(
|
|
10885
10925
|
pictureButton.borderWidth.default
|
|
10886
10926
|
);
|
|
10887
|
-
const borderWidthActive =
|
|
10927
|
+
const borderWidthActive = parseTokenValue55(pictureButton.borderWidth.active);
|
|
10888
10928
|
const pointerPath = buildPointerPath(
|
|
10889
|
-
|
|
10929
|
+
parseTokenValue55(pictureButton.pointer.borderRadius.default)
|
|
10890
10930
|
);
|
|
10891
|
-
const resolvedMinWidth = itemMinWidth != null ? itemMinWidth :
|
|
10931
|
+
const resolvedMinWidth = itemMinWidth != null ? itemMinWidth : parseTokenValue55(pictureButton.size.minWidth);
|
|
10892
10932
|
const resolvedMinHeight = itemMinHeight != null ? itemMinHeight : resolvedMinWidth;
|
|
10893
10933
|
return /* @__PURE__ */ jsxs(
|
|
10894
10934
|
StyledRoot16,
|
|
@@ -10981,15 +11021,15 @@ var DEFAULT_UNIT_LABELS = {
|
|
|
10981
11021
|
seconds: { singular: "sec", plural: "secs" }
|
|
10982
11022
|
};
|
|
10983
11023
|
var resolveLabel = (label, value) => typeof label === "string" ? label : value === 1 ? label.singular : label.plural;
|
|
10984
|
-
var
|
|
11024
|
+
var parseTokenValue56 = (value) => parseFloat(value);
|
|
10985
11025
|
var pad = (value) => String(Math.max(0, Math.floor(value))).padStart(2, "0");
|
|
10986
|
-
var StackedRoot =
|
|
11026
|
+
var StackedRoot = styled51(View)(({ rootGap }) => ({
|
|
10987
11027
|
flexDirection: "row",
|
|
10988
11028
|
alignItems: "center",
|
|
10989
11029
|
alignSelf: "flex-start",
|
|
10990
11030
|
gap: rootGap
|
|
10991
11031
|
}));
|
|
10992
|
-
var StackedItem =
|
|
11032
|
+
var StackedItem = styled51(View)(
|
|
10993
11033
|
({
|
|
10994
11034
|
itemGap,
|
|
10995
11035
|
itemVerticalPadding,
|
|
@@ -11007,7 +11047,7 @@ var StackedItem = styled50(View)(
|
|
|
11007
11047
|
borderRadius: itemBorderRadius
|
|
11008
11048
|
})
|
|
11009
11049
|
);
|
|
11010
|
-
var StackedCountBox =
|
|
11050
|
+
var StackedCountBox = styled51(View)(({ countPaddingTop, countBgColor, countBorderRadius }) => ({
|
|
11011
11051
|
alignItems: "center",
|
|
11012
11052
|
justifyContent: "center",
|
|
11013
11053
|
// TODO: Add token — fixed count box dimensions are not yet tokenised.
|
|
@@ -11017,7 +11057,7 @@ var StackedCountBox = styled50(View)(({ countPaddingTop, countBgColor, countBord
|
|
|
11017
11057
|
backgroundColor: countBgColor,
|
|
11018
11058
|
borderRadius: countBorderRadius
|
|
11019
11059
|
}));
|
|
11020
|
-
var InlineRoot =
|
|
11060
|
+
var InlineRoot = styled51(View)(
|
|
11021
11061
|
({
|
|
11022
11062
|
rootGap,
|
|
11023
11063
|
rootVerticalPadding,
|
|
@@ -11037,18 +11077,18 @@ var InlineRoot = styled50(View)(
|
|
|
11037
11077
|
overflow: "hidden"
|
|
11038
11078
|
})
|
|
11039
11079
|
);
|
|
11040
|
-
var InlineGroup =
|
|
11080
|
+
var InlineGroup = styled51(View)(({ groupGap }) => ({
|
|
11041
11081
|
flexDirection: "row",
|
|
11042
11082
|
alignItems: "center",
|
|
11043
11083
|
justifyContent: "flex-end",
|
|
11044
11084
|
gap: groupGap
|
|
11045
11085
|
}));
|
|
11046
|
-
var InlineCount =
|
|
11086
|
+
var InlineCount = styled51(View)(({ countGap }) => ({
|
|
11047
11087
|
flexDirection: "row",
|
|
11048
11088
|
alignItems: "center",
|
|
11049
11089
|
gap: countGap
|
|
11050
11090
|
}));
|
|
11051
|
-
var Countdown =
|
|
11091
|
+
var Countdown = React66.forwardRef(
|
|
11052
11092
|
(_a, ref) => {
|
|
11053
11093
|
var _b = _a, {
|
|
11054
11094
|
layout = "stacked",
|
|
@@ -11111,28 +11151,28 @@ var Countdown = React65.forwardRef(
|
|
|
11111
11151
|
InlineRoot,
|
|
11112
11152
|
__spreadProps(__spreadValues({
|
|
11113
11153
|
ref,
|
|
11114
|
-
rootGap:
|
|
11115
|
-
rootVerticalPadding:
|
|
11154
|
+
rootGap: parseTokenValue56(countdown.spacing.gap),
|
|
11155
|
+
rootVerticalPadding: parseTokenValue56(
|
|
11116
11156
|
countdown.spacing.verticalPadding
|
|
11117
11157
|
),
|
|
11118
|
-
rootHorizontalPadding:
|
|
11158
|
+
rootHorizontalPadding: parseTokenValue56(
|
|
11119
11159
|
countdown.spacing.horizontalPadding
|
|
11120
11160
|
),
|
|
11121
11161
|
rootBgColor: countdown.colour.background.default,
|
|
11122
|
-
rootBorderRadius:
|
|
11162
|
+
rootBorderRadius: parseTokenValue56(countdown.borderRadius.default)
|
|
11123
11163
|
}, rest), {
|
|
11124
11164
|
children: [
|
|
11125
11165
|
label != null && /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", size: "md", color: "primary", children: label }),
|
|
11126
11166
|
/* @__PURE__ */ jsx(
|
|
11127
11167
|
InlineGroup,
|
|
11128
11168
|
{
|
|
11129
|
-
groupGap:
|
|
11130
|
-
children: units.map((unit, index) => /* @__PURE__ */ jsxs(
|
|
11169
|
+
groupGap: parseTokenValue56(countdown.countdownGroup.spacing.gap),
|
|
11170
|
+
children: units.map((unit, index) => /* @__PURE__ */ jsxs(React66.Fragment, { children: [
|
|
11131
11171
|
index > 0 && colon(`colon-${unit.key}`),
|
|
11132
11172
|
/* @__PURE__ */ jsxs(
|
|
11133
11173
|
InlineCount,
|
|
11134
11174
|
{
|
|
11135
|
-
countGap:
|
|
11175
|
+
countGap: parseTokenValue56(countdown.count.spacing.gap),
|
|
11136
11176
|
children: [
|
|
11137
11177
|
/* @__PURE__ */ jsx(
|
|
11138
11178
|
Typography,
|
|
@@ -11168,33 +11208,33 @@ var Countdown = React65.forwardRef(
|
|
|
11168
11208
|
StackedRoot,
|
|
11169
11209
|
__spreadProps(__spreadValues({
|
|
11170
11210
|
ref,
|
|
11171
|
-
rootGap:
|
|
11211
|
+
rootGap: parseTokenValue56(countdown.spacing.gap)
|
|
11172
11212
|
}, rest), {
|
|
11173
|
-
children: units.map((unit, index) => /* @__PURE__ */ jsxs(
|
|
11213
|
+
children: units.map((unit, index) => /* @__PURE__ */ jsxs(React66.Fragment, { children: [
|
|
11174
11214
|
index > 0 && colon(`colon-${unit.key}`),
|
|
11175
11215
|
/* @__PURE__ */ jsxs(
|
|
11176
11216
|
StackedItem,
|
|
11177
11217
|
{
|
|
11178
|
-
itemGap:
|
|
11179
|
-
itemVerticalPadding:
|
|
11218
|
+
itemGap: parseTokenValue56(countdownItem.spacing.gap),
|
|
11219
|
+
itemVerticalPadding: parseTokenValue56(
|
|
11180
11220
|
countdownItem.spacing.verticalPadding
|
|
11181
11221
|
),
|
|
11182
|
-
itemHorizontalPadding:
|
|
11222
|
+
itemHorizontalPadding: parseTokenValue56(
|
|
11183
11223
|
countdownItem.spacing.horizontalPadding
|
|
11184
11224
|
),
|
|
11185
11225
|
itemBgColor: countdownItem.colour.background.default,
|
|
11186
|
-
itemBorderRadius:
|
|
11226
|
+
itemBorderRadius: parseTokenValue56(
|
|
11187
11227
|
countdownItem.borderRadius.default
|
|
11188
11228
|
),
|
|
11189
11229
|
children: [
|
|
11190
11230
|
/* @__PURE__ */ jsx(
|
|
11191
11231
|
StackedCountBox,
|
|
11192
11232
|
{
|
|
11193
|
-
countPaddingTop:
|
|
11233
|
+
countPaddingTop: parseTokenValue56(
|
|
11194
11234
|
countdownItem.count.spacing.paddingTop
|
|
11195
11235
|
),
|
|
11196
11236
|
countBgColor: countdownItem.count.colour.background.default,
|
|
11197
|
-
countBorderRadius:
|
|
11237
|
+
countBorderRadius: parseTokenValue56(
|
|
11198
11238
|
countdownItem.count.borderRadius.default
|
|
11199
11239
|
),
|
|
11200
11240
|
children: /* @__PURE__ */ jsx(
|
|
@@ -11224,41 +11264,41 @@ var Countdown = React65.forwardRef(
|
|
|
11224
11264
|
}
|
|
11225
11265
|
);
|
|
11226
11266
|
Countdown.displayName = "Countdown";
|
|
11227
|
-
var
|
|
11267
|
+
var parseTokenValue57 = (value) => {
|
|
11228
11268
|
if (typeof value === "number") return value;
|
|
11229
11269
|
return parseFloat(value);
|
|
11230
11270
|
};
|
|
11231
|
-
var BadgeContainer =
|
|
11271
|
+
var BadgeContainer = styled51(View)(({ theme: theme2 }) => {
|
|
11232
11272
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
11233
11273
|
const { sizing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
11234
11274
|
const { colour } = theme2.tokens.semantics;
|
|
11235
11275
|
return {
|
|
11236
11276
|
display: "flex",
|
|
11237
11277
|
flexDirection: "row",
|
|
11238
|
-
gap:
|
|
11278
|
+
gap: parseTokenValue57(spacing["2xs"]),
|
|
11239
11279
|
alignItems: "center",
|
|
11240
11280
|
justifyContent: "center",
|
|
11241
|
-
height:
|
|
11242
|
-
paddingRight:
|
|
11281
|
+
height: parseTokenValue57(sizing["2xl"]),
|
|
11282
|
+
paddingRight: parseTokenValue57(spacing.xs),
|
|
11243
11283
|
backgroundColor: colour.background.container.brand,
|
|
11244
|
-
borderTopRightRadius:
|
|
11245
|
-
borderBottomRightRadius:
|
|
11284
|
+
borderTopRightRadius: parseTokenValue57(borderRadius.xs),
|
|
11285
|
+
borderBottomRightRadius: parseTokenValue57(borderRadius.xs)
|
|
11246
11286
|
};
|
|
11247
11287
|
});
|
|
11248
|
-
var BadgeIcon =
|
|
11288
|
+
var BadgeIcon = styled51(View)(({ theme: theme2 }) => {
|
|
11249
11289
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
11250
11290
|
const sizing = theme2.tokens.semantics.dimensions.sizing;
|
|
11251
11291
|
return {
|
|
11252
11292
|
display: "flex",
|
|
11253
11293
|
alignItems: "center",
|
|
11254
11294
|
justifyContent: "center",
|
|
11255
|
-
width:
|
|
11256
|
-
height:
|
|
11257
|
-
marginLeft:
|
|
11295
|
+
width: parseTokenValue57(sizing.md),
|
|
11296
|
+
height: parseTokenValue57(sizing.md),
|
|
11297
|
+
marginLeft: parseTokenValue57(spacing.xs),
|
|
11258
11298
|
flexShrink: 0
|
|
11259
11299
|
};
|
|
11260
11300
|
});
|
|
11261
|
-
var Badge2 =
|
|
11301
|
+
var Badge2 = React66.forwardRef(
|
|
11262
11302
|
(_a, ref) => {
|
|
11263
11303
|
var _b = _a, { icon, text } = _b, rest = __objRest(_b, ["icon", "text"]);
|
|
11264
11304
|
return /* @__PURE__ */ jsxs(BadgeContainer, __spreadProps(__spreadValues({ ref }, rest), { children: [
|
|
@@ -11268,7 +11308,7 @@ var Badge2 = React65.forwardRef(
|
|
|
11268
11308
|
}
|
|
11269
11309
|
);
|
|
11270
11310
|
Badge2.displayName = "ProductListingCard.Badge";
|
|
11271
|
-
var StyledGrid =
|
|
11311
|
+
var StyledGrid = styled51(View)(({ theme: theme2 }) => {
|
|
11272
11312
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
11273
11313
|
return {
|
|
11274
11314
|
display: "grid",
|
|
@@ -11276,7 +11316,7 @@ var StyledGrid = styled50(View)(({ theme: theme2 }) => {
|
|
|
11276
11316
|
"grid-row-gap": spacing.xl
|
|
11277
11317
|
};
|
|
11278
11318
|
});
|
|
11279
|
-
var Grid =
|
|
11319
|
+
var Grid = React66.forwardRef(
|
|
11280
11320
|
(_a, ref) => {
|
|
11281
11321
|
var _b = _a, { children, xs = 1, md = 2, lg = 3 } = _b, rest = __objRest(_b, ["children", "xs", "md", "lg"]);
|
|
11282
11322
|
const { width } = useWindowDimensions();
|
|
@@ -11303,69 +11343,69 @@ var Grid = React65.forwardRef(
|
|
|
11303
11343
|
}
|
|
11304
11344
|
);
|
|
11305
11345
|
Grid.displayName = "ProductListingCard.Grid";
|
|
11306
|
-
var
|
|
11346
|
+
var parseTokenValue58 = (value) => {
|
|
11307
11347
|
if (typeof value === "number") return value;
|
|
11308
11348
|
return parseFloat(value);
|
|
11309
11349
|
};
|
|
11310
|
-
var StyledRoot17 =
|
|
11350
|
+
var StyledRoot17 = styled51(Pressable)(({ theme: theme2 }) => {
|
|
11311
11351
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
11312
11352
|
return {
|
|
11313
11353
|
display: "flex",
|
|
11314
11354
|
flexDirection: "column",
|
|
11315
|
-
gap:
|
|
11355
|
+
gap: parseTokenValue58(spacing.md),
|
|
11316
11356
|
alignItems: "flex-start",
|
|
11317
11357
|
width: "100%"
|
|
11318
11358
|
};
|
|
11319
11359
|
});
|
|
11320
|
-
var ImageContainer =
|
|
11360
|
+
var ImageContainer = styled51(View)(({ theme: theme2 }) => ({
|
|
11321
11361
|
position: "relative",
|
|
11322
11362
|
width: "100%",
|
|
11323
11363
|
aspectRatio: 1,
|
|
11324
11364
|
overflow: "hidden",
|
|
11325
|
-
borderRadius:
|
|
11365
|
+
borderRadius: parseTokenValue58(
|
|
11326
11366
|
theme2.tokens.semantics.dimensions.borderRadius.md
|
|
11327
11367
|
)
|
|
11328
11368
|
}));
|
|
11329
|
-
var StyledImage2 =
|
|
11369
|
+
var StyledImage2 = styled51(Image)({
|
|
11330
11370
|
width: "100%",
|
|
11331
11371
|
height: "100%",
|
|
11332
11372
|
resizeMode: "cover"
|
|
11333
11373
|
});
|
|
11334
|
-
var BadgeContainer2 =
|
|
11374
|
+
var BadgeContainer2 = styled51(View)(({ theme: theme2 }) => ({
|
|
11335
11375
|
position: "absolute",
|
|
11336
|
-
top:
|
|
11376
|
+
top: parseTokenValue58(theme2.tokens.semantics.dimensions.spacing.md),
|
|
11337
11377
|
left: 0
|
|
11338
11378
|
}));
|
|
11339
|
-
var ContentContainer =
|
|
11379
|
+
var ContentContainer = styled51(View)(({ theme: theme2 }) => {
|
|
11340
11380
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
11341
11381
|
return {
|
|
11342
11382
|
display: "flex",
|
|
11343
11383
|
flexDirection: "column",
|
|
11344
|
-
gap:
|
|
11384
|
+
gap: parseTokenValue58(spacing.md),
|
|
11345
11385
|
alignItems: "flex-start",
|
|
11346
11386
|
width: "100%"
|
|
11347
11387
|
};
|
|
11348
11388
|
});
|
|
11349
|
-
var DetailsContainer =
|
|
11389
|
+
var DetailsContainer = styled51(View)({
|
|
11350
11390
|
display: "flex",
|
|
11351
11391
|
flexDirection: "column",
|
|
11352
11392
|
alignItems: "flex-start",
|
|
11353
11393
|
width: "100%"
|
|
11354
11394
|
});
|
|
11355
|
-
var CategoryWrapper =
|
|
11395
|
+
var CategoryWrapper = styled51(View)(({ theme: theme2 }) => {
|
|
11356
11396
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
11357
11397
|
return {
|
|
11358
|
-
marginBottom:
|
|
11398
|
+
marginBottom: parseTokenValue58(spacing["3xs"])
|
|
11359
11399
|
};
|
|
11360
11400
|
});
|
|
11361
|
-
var TitleContainer =
|
|
11401
|
+
var TitleContainer = styled51(View)({
|
|
11362
11402
|
display: "flex",
|
|
11363
11403
|
flexDirection: "row",
|
|
11364
11404
|
width: "100%",
|
|
11365
11405
|
// 6px below the title to match Figma (4px title bottom padding + 2px gap).
|
|
11366
11406
|
marginBottom: 6
|
|
11367
11407
|
});
|
|
11368
|
-
var PricingContainer =
|
|
11408
|
+
var PricingContainer = styled51(View)(({ theme: theme2 }) => {
|
|
11369
11409
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
11370
11410
|
return {
|
|
11371
11411
|
display: "flex",
|
|
@@ -11375,7 +11415,7 @@ var PricingContainer = styled50(View)(({ theme: theme2 }) => {
|
|
|
11375
11415
|
width: "100%"
|
|
11376
11416
|
};
|
|
11377
11417
|
});
|
|
11378
|
-
var _ProductListingCard =
|
|
11418
|
+
var _ProductListingCard = React66.forwardRef(
|
|
11379
11419
|
(_a, ref) => {
|
|
11380
11420
|
var _b = _a, {
|
|
11381
11421
|
image,
|
|
@@ -11417,7 +11457,7 @@ var _ProductListingCard = React65.forwardRef(
|
|
|
11417
11457
|
accessibilityLabel: imageAlt,
|
|
11418
11458
|
accessible: true
|
|
11419
11459
|
}
|
|
11420
|
-
) :
|
|
11460
|
+
) : React66.isValidElement(image) ? image : /* @__PURE__ */ jsx(
|
|
11421
11461
|
StyledImage2,
|
|
11422
11462
|
{
|
|
11423
11463
|
source: image,
|
|
@@ -11455,14 +11495,14 @@ var ProductListingCardWithBadgeAndGrid = Object.assign(_ProductListingCard, {
|
|
|
11455
11495
|
Badge: Badge2,
|
|
11456
11496
|
Grid
|
|
11457
11497
|
});
|
|
11458
|
-
var StyledCardContainer =
|
|
11498
|
+
var StyledCardContainer = styled51(View, {
|
|
11459
11499
|
shouldForwardProp: (prop) => prop !== "showBanner"
|
|
11460
11500
|
})(({ theme: theme2 }) => {
|
|
11461
11501
|
const { spacing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
11462
11502
|
const { colour } = theme2.tokens.semantics;
|
|
11463
|
-
const spacingMd =
|
|
11464
|
-
const spacingXl =
|
|
11465
|
-
const radiusMd =
|
|
11503
|
+
const spacingMd = parseTokenValue9(spacing.md);
|
|
11504
|
+
const spacingXl = parseTokenValue9(spacing.xl);
|
|
11505
|
+
const radiusMd = parseTokenValue9(borderRadius.md);
|
|
11466
11506
|
return {
|
|
11467
11507
|
flexDirection: "row",
|
|
11468
11508
|
width: "100%",
|
|
@@ -11486,7 +11526,7 @@ var StyledCardContainer = styled50(View, {
|
|
|
11486
11526
|
flex: 1
|
|
11487
11527
|
};
|
|
11488
11528
|
});
|
|
11489
|
-
var StyledImage3 =
|
|
11529
|
+
var StyledImage3 = styled51(View)(({ theme: theme2, imageBackgroundColor, thumbnailWidth = 148 }) => ({
|
|
11490
11530
|
flexShrink: 0,
|
|
11491
11531
|
backgroundColor: imageBackgroundColor || theme2.tokens.semantics.colour.background.container.secondary,
|
|
11492
11532
|
overflow: "hidden",
|
|
@@ -11496,24 +11536,24 @@ var StyledImage3 = styled50(View)(({ theme: theme2, imageBackgroundColor, thumbn
|
|
|
11496
11536
|
minHeight: thumbnailWidth,
|
|
11497
11537
|
position: "relative"
|
|
11498
11538
|
}));
|
|
11499
|
-
var StyledContentArea =
|
|
11539
|
+
var StyledContentArea = styled51(View)(({ theme: theme2 }) => {
|
|
11500
11540
|
const { spacing } = theme2.tokens.semantics.dimensions;
|
|
11501
|
-
const paddingValue =
|
|
11541
|
+
const paddingValue = parseTokenValue9(spacing.md);
|
|
11502
11542
|
return {
|
|
11503
11543
|
flex: 1,
|
|
11504
11544
|
paddingHorizontal: paddingValue,
|
|
11505
11545
|
paddingVertical: paddingValue,
|
|
11506
|
-
gap:
|
|
11546
|
+
gap: parseTokenValue9(spacing.xs),
|
|
11507
11547
|
justifyContent: "space-between"
|
|
11508
11548
|
};
|
|
11509
11549
|
});
|
|
11510
|
-
var StyledTextContainer =
|
|
11550
|
+
var StyledTextContainer = styled51(View)(() => ({
|
|
11511
11551
|
gap: 2
|
|
11512
11552
|
}));
|
|
11513
|
-
var StyledBannerWrapper =
|
|
11553
|
+
var StyledBannerWrapper = styled51(View)(({ theme: theme2 }) => {
|
|
11514
11554
|
const { spacing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
11515
|
-
const radiusMd =
|
|
11516
|
-
const spacingMd =
|
|
11555
|
+
const radiusMd = parseTokenValue9(borderRadius.md);
|
|
11556
|
+
const spacingMd = parseTokenValue9(spacing.md);
|
|
11517
11557
|
return {
|
|
11518
11558
|
width: "100%",
|
|
11519
11559
|
// Tuck the banner up to overlap with card bottom; the 27px notification padding
|
|
@@ -11524,16 +11564,16 @@ var StyledBannerWrapper = styled50(View)(({ theme: theme2 }) => {
|
|
|
11524
11564
|
paddingBottom: spacingMd
|
|
11525
11565
|
};
|
|
11526
11566
|
});
|
|
11527
|
-
var StyledRootWrapper =
|
|
11567
|
+
var StyledRootWrapper = styled51(View)(() => {
|
|
11528
11568
|
return {
|
|
11529
11569
|
flexDirection: "column",
|
|
11530
11570
|
width: "100%"
|
|
11531
11571
|
};
|
|
11532
11572
|
});
|
|
11533
|
-
var StyledNotification =
|
|
11573
|
+
var StyledNotification = styled51(Notification)(({ theme: theme2 }) => {
|
|
11534
11574
|
const { spacing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
11535
|
-
const spacingMd =
|
|
11536
|
-
const radiusMd =
|
|
11575
|
+
const spacingMd = parseTokenValue9(spacing.md);
|
|
11576
|
+
const radiusMd = parseTokenValue9(borderRadius.md);
|
|
11537
11577
|
return {
|
|
11538
11578
|
paddingHorizontal: spacingMd,
|
|
11539
11579
|
// 27px top padding (Figma) leaves a small cream reveal above the text once
|
|
@@ -11547,11 +11587,11 @@ var StyledNotification = styled50(Notification)(({ theme: theme2 }) => {
|
|
|
11547
11587
|
borderBottomRightRadius: radiusMd
|
|
11548
11588
|
};
|
|
11549
11589
|
});
|
|
11550
|
-
var StyledNoneBanner =
|
|
11590
|
+
var StyledNoneBanner = styled51(View)(({ theme: theme2 }) => {
|
|
11551
11591
|
const { spacing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
11552
11592
|
const { colour } = theme2.tokens.semantics;
|
|
11553
|
-
const spacingMd =
|
|
11554
|
-
const radiusMd =
|
|
11593
|
+
const spacingMd = parseTokenValue9(spacing.md);
|
|
11594
|
+
const radiusMd = parseTokenValue9(borderRadius.md);
|
|
11555
11595
|
return {
|
|
11556
11596
|
paddingHorizontal: spacingMd,
|
|
11557
11597
|
paddingTop: 27,
|
|
@@ -11563,7 +11603,7 @@ var StyledNoneBanner = styled50(View)(({ theme: theme2 }) => {
|
|
|
11563
11603
|
borderBottomRightRadius: radiusMd
|
|
11564
11604
|
};
|
|
11565
11605
|
});
|
|
11566
|
-
var ProductDisplayCard =
|
|
11606
|
+
var ProductDisplayCard = React66.forwardRef(
|
|
11567
11607
|
(_a, ref) => {
|
|
11568
11608
|
var _b = _a, {
|
|
11569
11609
|
title,
|
|
@@ -11693,9 +11733,9 @@ var ProductDisplayCard = React65.forwardRef(
|
|
|
11693
11733
|
}
|
|
11694
11734
|
);
|
|
11695
11735
|
ProductDisplayCard.displayName = "ProductDisplayCard";
|
|
11696
|
-
var TabNavigationContext =
|
|
11736
|
+
var TabNavigationContext = React66.createContext(void 0);
|
|
11697
11737
|
var useTabNavigationContext = () => {
|
|
11698
|
-
const context =
|
|
11738
|
+
const context = React66.useContext(TabNavigationContext);
|
|
11699
11739
|
if (!context) {
|
|
11700
11740
|
throw new Error(
|
|
11701
11741
|
"TabNavigation.List, TabNavigation.Tab and TabNavigation.Panel must be used within a TabNavigation component."
|
|
@@ -11703,13 +11743,13 @@ var useTabNavigationContext = () => {
|
|
|
11703
11743
|
}
|
|
11704
11744
|
return context;
|
|
11705
11745
|
};
|
|
11706
|
-
var
|
|
11707
|
-
var StyledFixedList =
|
|
11746
|
+
var parseTokenValue59 = (value) => parseFloat(value);
|
|
11747
|
+
var StyledFixedList = styled51(View)({
|
|
11708
11748
|
flexDirection: "row",
|
|
11709
11749
|
alignItems: "stretch",
|
|
11710
11750
|
width: "100%"
|
|
11711
11751
|
});
|
|
11712
|
-
var StyledTab =
|
|
11752
|
+
var StyledTab = styled51(Pressable)(
|
|
11713
11753
|
({
|
|
11714
11754
|
tabHeight,
|
|
11715
11755
|
tabMinWidth,
|
|
@@ -11734,7 +11774,7 @@ var StyledTab = styled50(Pressable)(
|
|
|
11734
11774
|
borderBottomColor: tabBorderColor
|
|
11735
11775
|
}, tabFlex !== void 0 ? { flex: tabFlex } : { flexShrink: 0 })
|
|
11736
11776
|
);
|
|
11737
|
-
var TabNavigationList =
|
|
11777
|
+
var TabNavigationList = React66.forwardRef(
|
|
11738
11778
|
(_a, ref) => {
|
|
11739
11779
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
11740
11780
|
const { layout } = useTabNavigationContext();
|
|
@@ -11753,7 +11793,7 @@ var TabNavigationList = React65.forwardRef(
|
|
|
11753
11793
|
}
|
|
11754
11794
|
);
|
|
11755
11795
|
TabNavigationList.displayName = "TabNavigation.List";
|
|
11756
|
-
var TabNavigationTab =
|
|
11796
|
+
var TabNavigationTab = React66.forwardRef(
|
|
11757
11797
|
(_a, ref) => {
|
|
11758
11798
|
var _b = _a, { value, disabled = false, icon, avatar, children } = _b, rest = __objRest(_b, ["value", "disabled", "icon", "avatar", "children"]);
|
|
11759
11799
|
const { layout } = useTabNavigationContext();
|
|
@@ -11769,13 +11809,13 @@ var TabNavigationTab = React65.forwardRef(
|
|
|
11769
11809
|
StyledTab,
|
|
11770
11810
|
__spreadProps(__spreadValues({
|
|
11771
11811
|
ref,
|
|
11772
|
-
tabHeight:
|
|
11773
|
-
tabMinWidth:
|
|
11774
|
-
tabPaddingTop:
|
|
11775
|
-
tabPaddingBottom:
|
|
11776
|
-
tabPaddingHorizontal:
|
|
11777
|
-
tabGap:
|
|
11778
|
-
tabBorderWidth:
|
|
11812
|
+
tabHeight: parseTokenValue59(tabitem.size.height),
|
|
11813
|
+
tabMinWidth: parseTokenValue59(tabitem.size.minWidth),
|
|
11814
|
+
tabPaddingTop: parseTokenValue59(spacing.topPadding),
|
|
11815
|
+
tabPaddingBottom: parseTokenValue59(spacing.bottomPadding),
|
|
11816
|
+
tabPaddingHorizontal: parseTokenValue59(spacing.horizontalPadding),
|
|
11817
|
+
tabGap: parseTokenValue59(spacing.gap),
|
|
11818
|
+
tabBorderWidth: parseTokenValue59(borderWidth.default),
|
|
11779
11819
|
tabBorderColor: borderColour,
|
|
11780
11820
|
tabFlex: layout === "fixed" ? 1 : void 0
|
|
11781
11821
|
}, rest), {
|
|
@@ -11789,7 +11829,7 @@ var TabNavigationTab = React65.forwardRef(
|
|
|
11789
11829
|
}
|
|
11790
11830
|
);
|
|
11791
11831
|
TabNavigationTab.displayName = "TabNavigation.Tab";
|
|
11792
|
-
var TabNavigationPanel =
|
|
11832
|
+
var TabNavigationPanel = React66.forwardRef(
|
|
11793
11833
|
(_a, ref) => {
|
|
11794
11834
|
var _b = _a, { value, children } = _b, rest = __objRest(_b, ["value", "children"]);
|
|
11795
11835
|
const { animation } = useTabNavigationContext();
|
|
@@ -11797,7 +11837,7 @@ var TabNavigationPanel = React65.forwardRef(
|
|
|
11797
11837
|
}
|
|
11798
11838
|
);
|
|
11799
11839
|
TabNavigationPanel.displayName = "TabNavigation.Panel";
|
|
11800
|
-
var TabNavigationRoot =
|
|
11840
|
+
var TabNavigationRoot = React66.forwardRef(
|
|
11801
11841
|
(_a, ref) => {
|
|
11802
11842
|
var _b = _a, {
|
|
11803
11843
|
value,
|
|
@@ -11815,11 +11855,11 @@ var TabNavigationRoot = React65.forwardRef(
|
|
|
11815
11855
|
"children"
|
|
11816
11856
|
]);
|
|
11817
11857
|
const isControlled = typeof value === "string";
|
|
11818
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
11858
|
+
const [uncontrolledValue, setUncontrolledValue] = React66.useState(
|
|
11819
11859
|
() => defaultValue != null ? defaultValue : ""
|
|
11820
11860
|
);
|
|
11821
11861
|
const currentValue = isControlled ? value : uncontrolledValue;
|
|
11822
|
-
const handleValueChange =
|
|
11862
|
+
const handleValueChange = React66.useCallback(
|
|
11823
11863
|
(newValue) => {
|
|
11824
11864
|
if (!isControlled) {
|
|
11825
11865
|
setUncontrolledValue(newValue);
|
|
@@ -11828,7 +11868,7 @@ var TabNavigationRoot = React65.forwardRef(
|
|
|
11828
11868
|
},
|
|
11829
11869
|
[isControlled, onValueChange]
|
|
11830
11870
|
);
|
|
11831
|
-
const contextValue =
|
|
11871
|
+
const contextValue = React66.useMemo(
|
|
11832
11872
|
() => ({ layout, animation }),
|
|
11833
11873
|
[layout, animation]
|
|
11834
11874
|
);
|
|
@@ -11857,6 +11897,6 @@ var TabNavigation = Object.assign(TabNavigationRoot, {
|
|
|
11857
11897
|
Panel: TabNavigationPanel
|
|
11858
11898
|
});
|
|
11859
11899
|
|
|
11860
|
-
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, RadioTile, SearchField, SearchFieldInput, SegmentedControl, SelectField, SelectFieldContent, SelectFieldItem, SelectFieldTrigger, SelectFieldValue, Slider, Spinner, StackedNotifications, 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 };
|
|
11900
|
+
export { Accordion, Animated5 as Animated, Avatar, BRAND_FONTS, Badge, Button, ButtonDock, ButtonGroup, CarouselControls, Checkbox, CheckboxGroup, CopyField, CopyFieldInput, Countdown, DatePicker, Divider, 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, RadioTile, SearchField, SearchFieldInput, SegmentedControl, SelectField, SelectFieldContent, SelectFieldItem, SelectFieldTrigger, SelectFieldValue, Slider, Spinner, StackedNotifications, 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 };
|
|
11861
11901
|
//# sourceMappingURL=index.js.map
|
|
11862
11902
|
//# sourceMappingURL=index.js.map
|