@butternutbox/pawprint-native 0.10.11 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +10 -0
- package/dist/index.cjs +279 -164
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -1
- package/dist/index.d.ts +45 -1
- package/dist/index.js +280 -165
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__mocks__/react-native-reanimated.tsx +35 -1
- package/src/__mocks__/react-native.tsx +9 -0
- package/src/components/molecules/Checkbox/Checkbox.tsx +102 -105
- package/src/components/molecules/StackedNotifications/StackedNotifications.stories.tsx +220 -0
- package/src/components/molecules/StackedNotifications/StackedNotifications.test.tsx +202 -0
- package/src/components/molecules/StackedNotifications/StackedNotifications.tsx +247 -0
- package/src/components/molecules/StackedNotifications/index.ts +6 -0
- package/src/components/molecules/index.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -18,7 +18,6 @@ var SwitchPrimitive = require('@rn-primitives/switch');
|
|
|
18
18
|
var Animated10 = require('react-native-reanimated');
|
|
19
19
|
var slot = require('@rn-primitives/slot');
|
|
20
20
|
var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
21
|
-
var CheckboxPrimitive = require('@rn-primitives/checkbox');
|
|
22
21
|
var ProgressPrimitive = require('@rn-primitives/progress');
|
|
23
22
|
var SelectPrimitive3 = require('@rn-primitives/select');
|
|
24
23
|
var SliderPrimitive = require('@rn-primitives/slider');
|
|
@@ -60,7 +59,6 @@ var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive)
|
|
|
60
59
|
var Svg__default = /*#__PURE__*/_interopDefault(Svg);
|
|
61
60
|
var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
|
|
62
61
|
var Animated10__default = /*#__PURE__*/_interopDefault(Animated10);
|
|
63
|
-
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
64
62
|
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
65
63
|
var SelectPrimitive3__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive3);
|
|
66
64
|
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
@@ -9872,90 +9870,85 @@ var Checkbox = React65__default.default.forwardRef(
|
|
|
9872
9870
|
const isControlled = controlledChecked !== void 0;
|
|
9873
9871
|
const [internalChecked, setInternalChecked] = React65__default.default.useState(defaultChecked);
|
|
9874
9872
|
const isChecked = isControlled ? controlledChecked : internalChecked;
|
|
9875
|
-
const
|
|
9873
|
+
const handlePress = () => {
|
|
9874
|
+
if (disabled) return;
|
|
9875
|
+
const next = !isChecked;
|
|
9876
9876
|
if (!isControlled) {
|
|
9877
|
-
setInternalChecked(
|
|
9877
|
+
setInternalChecked(next);
|
|
9878
9878
|
}
|
|
9879
|
-
onCheckedChange == null ? void 0 : onCheckedChange(
|
|
9879
|
+
onCheckedChange == null ? void 0 : onCheckedChange(next);
|
|
9880
9880
|
};
|
|
9881
9881
|
const isTile = variant === "tile";
|
|
9882
9882
|
const controlSize = parseTokenValue30(checkbox.size.control.default);
|
|
9883
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
9884
|
-
|
|
9885
|
-
{
|
|
9886
|
-
|
|
9887
|
-
|
|
9883
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9884
|
+
StyledRootPressable,
|
|
9885
|
+
__spreadProps(__spreadValues({
|
|
9886
|
+
ref,
|
|
9887
|
+
onPress: handlePress,
|
|
9888
9888
|
disabled,
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
|
|
9893
|
-
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
label
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
subText
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9889
|
+
accessibilityRole: "checkbox",
|
|
9890
|
+
accessibilityState: { checked: isChecked, disabled },
|
|
9891
|
+
rootFlexAlign: isTile ? "center" : "flex-start",
|
|
9892
|
+
rootGap: parseTokenValue30(
|
|
9893
|
+
isTile ? checkbox.checkboxTile.spacing.gap : checkbox.spacing.gap
|
|
9894
|
+
),
|
|
9895
|
+
rootOpacity: disabled ? parseFloat(theme2.tokens.primitives.opacity["40"]) : 1,
|
|
9896
|
+
rootPaddingVertical: isTile ? parseTokenValue30(checkbox.checkboxTile.spacing.verticalPadding) : void 0,
|
|
9897
|
+
rootPaddingHorizontal: isTile ? parseTokenValue30(checkbox.checkboxTile.spacing.horizontalPadding) : void 0,
|
|
9898
|
+
rootMaxWidth: isTile ? parseTokenValue30(checkbox.checkboxTile.size.maxWidth) : void 0,
|
|
9899
|
+
rootBgColor: isTile ? isChecked ? checkbox.checkboxTile.colour.background.selected : checkbox.checkboxTile.colour.background.default : void 0,
|
|
9900
|
+
rootBorderWidth: isTile ? parseTokenValue30(checkbox.checkboxTile.borderWidth.default) : void 0,
|
|
9901
|
+
rootBorderColor: isTile ? isChecked ? checkbox.checkboxTile.colour.border.selected : checkbox.checkboxTile.colour.border.default : void 0,
|
|
9902
|
+
rootBorderRadius: isTile ? parseTokenValue30(checkbox.checkboxTile.borderRadius.default) : void 0,
|
|
9903
|
+
style: typeof style === "function" ? void 0 : style
|
|
9904
|
+
}, rest), {
|
|
9905
|
+
children: [
|
|
9906
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9907
|
+
StyledControl,
|
|
9908
|
+
{
|
|
9909
|
+
controlSize,
|
|
9910
|
+
controlBorderWidth: parseTokenValue30(checkbox.control.border.default),
|
|
9911
|
+
controlBorderColor: isChecked ? checkbox.colour.background.selected : checkbox.colour.border.default,
|
|
9912
|
+
controlBorderRadius: parseTokenValue30(dimensions3.borderRadius.xs),
|
|
9913
|
+
controlBgColor: isChecked ? checkbox.colour.background.selected : "transparent",
|
|
9914
|
+
children: isChecked && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: Check_default, size: "xs", colour: "alt" })
|
|
9915
|
+
}
|
|
9916
|
+
),
|
|
9917
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9918
|
+
StyledContent2,
|
|
9919
|
+
{
|
|
9920
|
+
contentGap: parseTokenValue30(checkbox.spacing.content.gap),
|
|
9921
|
+
children: [
|
|
9922
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9923
|
+
Typography,
|
|
9924
|
+
{
|
|
9925
|
+
token: checkbox.typography.label,
|
|
9926
|
+
color: checkbox.colour.text.title,
|
|
9927
|
+
children: label
|
|
9928
|
+
}
|
|
9929
|
+
),
|
|
9930
|
+
subText && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9931
|
+
Typography,
|
|
9932
|
+
{
|
|
9933
|
+
token: checkbox.typography.subText,
|
|
9934
|
+
color: checkbox.colour.text.subtext,
|
|
9935
|
+
children: subText
|
|
9936
|
+
}
|
|
9937
|
+
)
|
|
9938
|
+
]
|
|
9939
|
+
}
|
|
9940
|
+
),
|
|
9941
|
+
isTile && illustration && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9942
|
+
StyledIllustration,
|
|
9943
|
+
{
|
|
9944
|
+
illustrationSize: parseTokenValue30(
|
|
9945
|
+
checkbox.checkboxTile.size.illustration.default
|
|
9945
9946
|
),
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
),
|
|
9952
|
-
children: illustration
|
|
9953
|
-
}
|
|
9954
|
-
)
|
|
9955
|
-
]
|
|
9956
|
-
})
|
|
9957
|
-
)
|
|
9958
|
-
}
|
|
9947
|
+
children: illustration
|
|
9948
|
+
}
|
|
9949
|
+
)
|
|
9950
|
+
]
|
|
9951
|
+
})
|
|
9959
9952
|
);
|
|
9960
9953
|
}
|
|
9961
9954
|
);
|
|
@@ -13238,6 +13231,127 @@ var Notification = React65__default.default.forwardRef(
|
|
|
13238
13231
|
);
|
|
13239
13232
|
Notification.displayName = "Notification";
|
|
13240
13233
|
var parseTokenValue50 = (value) => parseFloat(value);
|
|
13234
|
+
var SCALE_STEP = 0.06;
|
|
13235
|
+
var SPRING_CONFIG = { damping: 20, stiffness: 260, mass: 0.5 };
|
|
13236
|
+
var CARD_ENTERING = Animated10.FadeInDown.duration(200).easing(Animated10.Easing.inOut(Animated10.Easing.quad));
|
|
13237
|
+
var CARD_EXITING = Animated10.FadeOutDown.duration(200);
|
|
13238
|
+
var CARD_BASE_STYLE = {
|
|
13239
|
+
position: "absolute",
|
|
13240
|
+
bottom: 0,
|
|
13241
|
+
left: 0,
|
|
13242
|
+
right: 0,
|
|
13243
|
+
transformOrigin: "50% 100%"
|
|
13244
|
+
};
|
|
13245
|
+
var StyledRoot15 = styled50__default.default(reactNative.View)(({ rootBottom, rootPaddingH }) => ({
|
|
13246
|
+
position: "absolute",
|
|
13247
|
+
left: 0,
|
|
13248
|
+
right: 0,
|
|
13249
|
+
bottom: rootBottom,
|
|
13250
|
+
paddingHorizontal: rootPaddingH,
|
|
13251
|
+
alignItems: "stretch"
|
|
13252
|
+
}));
|
|
13253
|
+
var StyledStack = styled50__default.default(reactNative.View)({
|
|
13254
|
+
position: "relative",
|
|
13255
|
+
width: "100%"
|
|
13256
|
+
});
|
|
13257
|
+
var StackedCard = ({
|
|
13258
|
+
item,
|
|
13259
|
+
depth,
|
|
13260
|
+
revealStep,
|
|
13261
|
+
onDismiss
|
|
13262
|
+
}) => {
|
|
13263
|
+
const depthSV = Animated10.useSharedValue(depth);
|
|
13264
|
+
React65__default.default.useEffect(() => {
|
|
13265
|
+
depthSV.value = Animated10.withSpring(depth, SPRING_CONFIG);
|
|
13266
|
+
}, [depth, depthSV]);
|
|
13267
|
+
const animatedStyle = Animated10.useAnimatedStyle(() => ({
|
|
13268
|
+
transform: [
|
|
13269
|
+
{ translateY: depthSV.value * revealStep },
|
|
13270
|
+
{ scale: 1 - depthSV.value * SCALE_STEP }
|
|
13271
|
+
]
|
|
13272
|
+
}));
|
|
13273
|
+
const isFront = depth === 0;
|
|
13274
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13275
|
+
Animated10__default.default.View,
|
|
13276
|
+
{
|
|
13277
|
+
entering: CARD_ENTERING,
|
|
13278
|
+
exiting: CARD_EXITING,
|
|
13279
|
+
pointerEvents: isFront ? "auto" : "none",
|
|
13280
|
+
accessibilityElementsHidden: !isFront,
|
|
13281
|
+
importantForAccessibility: isFront ? "auto" : "no-hide-descendants",
|
|
13282
|
+
style: [CARD_BASE_STYLE, { zIndex: -depth }, animatedStyle],
|
|
13283
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13284
|
+
Notification,
|
|
13285
|
+
{
|
|
13286
|
+
variant: "toast",
|
|
13287
|
+
type: item.type,
|
|
13288
|
+
onClose: isFront ? () => onDismiss == null ? void 0 : onDismiss(item.id) : void 0,
|
|
13289
|
+
children: item.message
|
|
13290
|
+
}
|
|
13291
|
+
)
|
|
13292
|
+
}
|
|
13293
|
+
);
|
|
13294
|
+
};
|
|
13295
|
+
var StackedNotifications = React65__default.default.forwardRef((_a, ref) => {
|
|
13296
|
+
var _b = _a, { items, onDismiss, bottomOffset } = _b, rest = __objRest(_b, ["items", "onDismiss", "bottomOffset"]);
|
|
13297
|
+
const theme2 = react.useTheme();
|
|
13298
|
+
const { spacing } = theme2.tokens.semantics.dimensions;
|
|
13299
|
+
const [dismissed, setDismissed] = React65__default.default.useState(/* @__PURE__ */ new Set());
|
|
13300
|
+
const idsKey = items.map((item) => item.id).join("|");
|
|
13301
|
+
React65__default.default.useEffect(() => {
|
|
13302
|
+
setDismissed((prev) => {
|
|
13303
|
+
if (prev.size === 0) return prev;
|
|
13304
|
+
const present = new Set(items.map((item) => item.id));
|
|
13305
|
+
let changed = false;
|
|
13306
|
+
const next = /* @__PURE__ */ new Set();
|
|
13307
|
+
prev.forEach((id) => {
|
|
13308
|
+
if (present.has(id)) next.add(id);
|
|
13309
|
+
else changed = true;
|
|
13310
|
+
});
|
|
13311
|
+
return changed ? next : prev;
|
|
13312
|
+
});
|
|
13313
|
+
}, [idsKey]);
|
|
13314
|
+
const activeItems = React65__default.default.useMemo(
|
|
13315
|
+
() => items.filter((item) => !dismissed.has(item.id)),
|
|
13316
|
+
[items, dismissed]
|
|
13317
|
+
);
|
|
13318
|
+
const layers = React65__default.default.useMemo(
|
|
13319
|
+
() => activeItems.slice(-3).reverse(),
|
|
13320
|
+
[activeItems]
|
|
13321
|
+
);
|
|
13322
|
+
const handleDismiss = (id) => {
|
|
13323
|
+
setDismissed((prev) => {
|
|
13324
|
+
const next = new Set(prev);
|
|
13325
|
+
next.add(id);
|
|
13326
|
+
return next;
|
|
13327
|
+
});
|
|
13328
|
+
onDismiss == null ? void 0 : onDismiss(id);
|
|
13329
|
+
};
|
|
13330
|
+
const rootBottom = bottomOffset != null ? bottomOffset : parseTokenValue50(spacing.lg);
|
|
13331
|
+
const peekStep = parseTokenValue50(spacing.xs);
|
|
13332
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13333
|
+
StyledRoot15,
|
|
13334
|
+
__spreadProps(__spreadValues({
|
|
13335
|
+
ref,
|
|
13336
|
+
pointerEvents: "box-none",
|
|
13337
|
+
rootBottom,
|
|
13338
|
+
rootPaddingH: parseTokenValue50(spacing.md)
|
|
13339
|
+
}, rest), {
|
|
13340
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(StyledStack, { children: layers.map((item, depth) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13341
|
+
StackedCard,
|
|
13342
|
+
{
|
|
13343
|
+
item,
|
|
13344
|
+
depth,
|
|
13345
|
+
revealStep: peekStep,
|
|
13346
|
+
onDismiss: handleDismiss
|
|
13347
|
+
},
|
|
13348
|
+
item.id
|
|
13349
|
+
)) })
|
|
13350
|
+
})
|
|
13351
|
+
);
|
|
13352
|
+
});
|
|
13353
|
+
StackedNotifications.displayName = "StackedNotifications";
|
|
13354
|
+
var parseTokenValue51 = (value) => parseFloat(value);
|
|
13241
13355
|
var NIB_OFFSET = {
|
|
13242
13356
|
left: 24,
|
|
13243
13357
|
middle: 146,
|
|
@@ -13359,9 +13473,9 @@ var Tooltip = React65__default.default.forwardRef(
|
|
|
13359
13473
|
width
|
|
13360
13474
|
} = theme2.tokens.components.tooltip;
|
|
13361
13475
|
const [open, setOpen] = React65.useState(false);
|
|
13362
|
-
const tooltipWidth =
|
|
13363
|
-
const nibWidth =
|
|
13364
|
-
const nibHeight =
|
|
13476
|
+
const tooltipWidth = parseTokenValue51(width);
|
|
13477
|
+
const nibWidth = parseTokenValue51(nibToken.width);
|
|
13478
|
+
const nibHeight = parseTokenValue51(nibToken.height);
|
|
13365
13479
|
const nibHalfWidth = nibWidth / 2;
|
|
13366
13480
|
const nibOuterHeight = nibHeight + 1;
|
|
13367
13481
|
const nibX = NIB_OFFSET[alignment];
|
|
@@ -13370,11 +13484,11 @@ var Tooltip = React65__default.default.forwardRef(
|
|
|
13370
13484
|
const side = position === "bottom" ? "top" : "bottom";
|
|
13371
13485
|
const bgColor = colour.background.default;
|
|
13372
13486
|
const borderColor = colour.border.default;
|
|
13373
|
-
const borderW =
|
|
13374
|
-
const borderR =
|
|
13375
|
-
const topPad =
|
|
13376
|
-
const bottomPad =
|
|
13377
|
-
const horizontalPad =
|
|
13487
|
+
const borderW = parseTokenValue51(borderWidth.default);
|
|
13488
|
+
const borderR = parseTokenValue51(borderRadius.default);
|
|
13489
|
+
const topPad = parseTokenValue51(spacing.topPadding);
|
|
13490
|
+
const bottomPad = parseTokenValue51(spacing.bottomPadding);
|
|
13491
|
+
const horizontalPad = parseTokenValue51(spacing.horizontalPading);
|
|
13378
13492
|
const nibRow = /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { height: nibOuterHeight, position: "relative", zIndex: 2 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13379
13493
|
NibTriangle,
|
|
13380
13494
|
{
|
|
@@ -13475,7 +13589,7 @@ var Tooltip = React65__default.default.forwardRef(
|
|
|
13475
13589
|
}
|
|
13476
13590
|
);
|
|
13477
13591
|
Tooltip.displayName = "Tooltip";
|
|
13478
|
-
var
|
|
13592
|
+
var parseTokenValue52 = (value) => parseFloat(value);
|
|
13479
13593
|
var StyledInsightRoot = styled50__default.default(reactNative.View)(
|
|
13480
13594
|
({
|
|
13481
13595
|
rootGap,
|
|
@@ -13520,26 +13634,26 @@ var MessageCardInsight = React65__default.default.forwardRef(
|
|
|
13520
13634
|
const isSupporting = variant === "supporting";
|
|
13521
13635
|
const supporting = insightCard.spacing.supporting;
|
|
13522
13636
|
const standalone = insightCard.spacing.standalone;
|
|
13523
|
-
const radiusStandalone =
|
|
13637
|
+
const radiusStandalone = parseTokenValue52(
|
|
13524
13638
|
insightCard.borderRadius.standalone.default
|
|
13525
13639
|
);
|
|
13526
|
-
const radiusSupporting =
|
|
13640
|
+
const radiusSupporting = parseTokenValue52(
|
|
13527
13641
|
insightCard.borderRadius.supporting.bottom
|
|
13528
13642
|
);
|
|
13529
13643
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13530
13644
|
StyledInsightRoot,
|
|
13531
13645
|
__spreadProps(__spreadValues({
|
|
13532
13646
|
ref,
|
|
13533
|
-
rootGap:
|
|
13647
|
+
rootGap: parseTokenValue52(
|
|
13534
13648
|
isSupporting ? supporting.gap : standalone.gap
|
|
13535
13649
|
),
|
|
13536
|
-
rootPaddingH:
|
|
13650
|
+
rootPaddingH: parseTokenValue52(
|
|
13537
13651
|
isSupporting ? semanticSpacing.md : standalone.horizontalPadding
|
|
13538
13652
|
),
|
|
13539
|
-
rootPaddingTop:
|
|
13653
|
+
rootPaddingTop: parseTokenValue52(
|
|
13540
13654
|
isSupporting ? supporting.topPadding : standalone.verticalPadding
|
|
13541
13655
|
),
|
|
13542
|
-
rootPaddingBottom:
|
|
13656
|
+
rootPaddingBottom: parseTokenValue52(
|
|
13543
13657
|
isSupporting ? supporting.bottomPadding : standalone.verticalPadding
|
|
13544
13658
|
),
|
|
13545
13659
|
rootBorderTopLeftRadius: isSupporting ? 0 : radiusStandalone,
|
|
@@ -13547,7 +13661,7 @@ var MessageCardInsight = React65__default.default.forwardRef(
|
|
|
13547
13661
|
rootBorderBottomLeftRadius: isSupporting ? radiusSupporting : radiusStandalone,
|
|
13548
13662
|
rootBorderBottomRightRadius: isSupporting ? radiusSupporting : radiusStandalone,
|
|
13549
13663
|
rootBgColor: insightCard.colour.background.default,
|
|
13550
|
-
rootMinWidth:
|
|
13664
|
+
rootMinWidth: parseTokenValue52(insightCard.size.minWidth),
|
|
13551
13665
|
accessible: true,
|
|
13552
13666
|
accessibilityRole: "summary"
|
|
13553
13667
|
}, rest), {
|
|
@@ -13556,7 +13670,7 @@ var MessageCardInsight = React65__default.default.forwardRef(
|
|
|
13556
13670
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13557
13671
|
StyledInsightContent,
|
|
13558
13672
|
{
|
|
13559
|
-
contentGap:
|
|
13673
|
+
contentGap: parseTokenValue52(standalone.content.gap),
|
|
13560
13674
|
children: [
|
|
13561
13675
|
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13562
13676
|
Typography,
|
|
@@ -13648,9 +13762,9 @@ var MessageCardBanner = React65__default.default.forwardRef(
|
|
|
13648
13762
|
StyledBannerRoot,
|
|
13649
13763
|
__spreadProps(__spreadValues({
|
|
13650
13764
|
ref,
|
|
13651
|
-
rootGap:
|
|
13652
|
-
rootPadding:
|
|
13653
|
-
rootBorderRadius:
|
|
13765
|
+
rootGap: parseTokenValue52(dimensions3.spacing.md),
|
|
13766
|
+
rootPadding: parseTokenValue52(dimensions3.spacing.md),
|
|
13767
|
+
rootBorderRadius: parseTokenValue52(dimensions3.borderRadius.md),
|
|
13654
13768
|
rootBgColor: bgColor,
|
|
13655
13769
|
accessible: true,
|
|
13656
13770
|
accessibilityRole: "summary"
|
|
@@ -13662,7 +13776,7 @@ var MessageCardBanner = React65__default.default.forwardRef(
|
|
|
13662
13776
|
}) }) : (media == null ? void 0 : media.type) === "image" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
13663
13777
|
StyledBannerImage,
|
|
13664
13778
|
{
|
|
13665
|
-
imageRadius:
|
|
13779
|
+
imageRadius: parseTokenValue52(dimensions3.borderRadius.sm),
|
|
13666
13780
|
imageBgColor: colour.background.surface.secondary,
|
|
13667
13781
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13668
13782
|
reactNative.Image,
|
|
@@ -13678,12 +13792,12 @@ var MessageCardBanner = React65__default.default.forwardRef(
|
|
|
13678
13792
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13679
13793
|
StyledBannerContents,
|
|
13680
13794
|
{
|
|
13681
|
-
contentsGap:
|
|
13795
|
+
contentsGap: parseTokenValue52(dimensions3.spacing.xs),
|
|
13682
13796
|
children: [
|
|
13683
13797
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13684
13798
|
StyledBannerCopy,
|
|
13685
13799
|
{
|
|
13686
|
-
copyGap:
|
|
13800
|
+
copyGap: parseTokenValue52(dimensions3.spacing["3xs"]),
|
|
13687
13801
|
children: [
|
|
13688
13802
|
title && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "heading", size: "xs", color: "primary", children: title }),
|
|
13689
13803
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "md", color: "secondary", children })
|
|
@@ -13714,7 +13828,7 @@ var MessageCard = {
|
|
|
13714
13828
|
Insight: MessageCardInsight,
|
|
13715
13829
|
Banner: MessageCardBanner
|
|
13716
13830
|
};
|
|
13717
|
-
var
|
|
13831
|
+
var parseTokenValue53 = (value) => parseFloat(value);
|
|
13718
13832
|
var slideEaseOut = Animated10.Easing.out(Animated10.Easing.quad);
|
|
13719
13833
|
var MONTH_SLIDE_ENTERING = {
|
|
13720
13834
|
forward: Animated10.FadeInRight.duration(250).easing(slideEaseOut),
|
|
@@ -13875,17 +13989,17 @@ var DatePicker = React65__default.default.forwardRef(
|
|
|
13875
13989
|
} = React65.useMemo(
|
|
13876
13990
|
() => ({
|
|
13877
13991
|
// Gap between the week-day header and the month header.
|
|
13878
|
-
weekGap:
|
|
13992
|
+
weekGap: parseTokenValue53(datePicker.spacing.gap),
|
|
13879
13993
|
// Gap between the month header and the dates grid.
|
|
13880
|
-
datesGap:
|
|
13881
|
-
containerMaxWidth:
|
|
13882
|
-
headerGap:
|
|
13883
|
-
cellHeight:
|
|
13884
|
-
indicatorSize:
|
|
13885
|
-
indicatorBorderRadius:
|
|
13886
|
-
selectedBorderWidth:
|
|
13887
|
-
disabledOpacity:
|
|
13888
|
-
rowGap:
|
|
13994
|
+
datesGap: parseTokenValue53(theme2.tokens.semantics.dimensions.spacing.md),
|
|
13995
|
+
containerMaxWidth: parseTokenValue53(dt.size.width) * 7,
|
|
13996
|
+
headerGap: parseTokenValue53(datePicker.month.spacing.gap),
|
|
13997
|
+
cellHeight: parseTokenValue53(dt.size.height),
|
|
13998
|
+
indicatorSize: parseTokenValue53(dt.size.indicator),
|
|
13999
|
+
indicatorBorderRadius: parseTokenValue53(dt.borderRadius.indicator),
|
|
14000
|
+
selectedBorderWidth: parseTokenValue53(dt.borderWidth.indicator.selected),
|
|
14001
|
+
disabledOpacity: parseTokenValue53(dt.opacity.disabled),
|
|
14002
|
+
rowGap: parseTokenValue53(datePicker.dates.spacing.gap)
|
|
13889
14003
|
}),
|
|
13890
14004
|
[datePicker, dt, theme2]
|
|
13891
14005
|
);
|
|
@@ -14163,8 +14277,8 @@ var buildPointerPath = (r) => {
|
|
|
14163
14277
|
"Z"
|
|
14164
14278
|
].join(" ");
|
|
14165
14279
|
};
|
|
14166
|
-
var
|
|
14167
|
-
var
|
|
14280
|
+
var parseTokenValue54 = (value) => parseFloat(value);
|
|
14281
|
+
var StyledRoot16 = styled50__default.default(reactNative.View)(({ rootGap }) => ({
|
|
14168
14282
|
flexDirection: "column",
|
|
14169
14283
|
gap: rootGap,
|
|
14170
14284
|
width: "100%"
|
|
@@ -14253,24 +14367,24 @@ var PictureSelector = React65__default.default.forwardRef(
|
|
|
14253
14367
|
if (!isControlled) setInternalValue(nextValue);
|
|
14254
14368
|
onValueChange == null ? void 0 : onValueChange(nextValue);
|
|
14255
14369
|
};
|
|
14256
|
-
const rootGap =
|
|
14257
|
-
const rowGap =
|
|
14258
|
-
const stackGap =
|
|
14259
|
-
const buttonPadding =
|
|
14260
|
-
const buttonBorderRadius =
|
|
14370
|
+
const rootGap = parseTokenValue54(pictureSelector.spacing.container.gap);
|
|
14371
|
+
const rowGap = parseTokenValue54(pictureSelector.spacing.buttons.gap);
|
|
14372
|
+
const stackGap = parseTokenValue54(pictureButton.spacing.container.gap);
|
|
14373
|
+
const buttonPadding = parseTokenValue54(pictureButton.spacing.padding);
|
|
14374
|
+
const buttonBorderRadius = parseTokenValue54(
|
|
14261
14375
|
pictureButton.borderRadius.default
|
|
14262
14376
|
);
|
|
14263
|
-
const borderWidthDefault =
|
|
14377
|
+
const borderWidthDefault = parseTokenValue54(
|
|
14264
14378
|
pictureButton.borderWidth.default
|
|
14265
14379
|
);
|
|
14266
|
-
const borderWidthActive =
|
|
14380
|
+
const borderWidthActive = parseTokenValue54(pictureButton.borderWidth.active);
|
|
14267
14381
|
const pointerPath = buildPointerPath(
|
|
14268
|
-
|
|
14382
|
+
parseTokenValue54(pictureButton.pointer.borderRadius.default)
|
|
14269
14383
|
);
|
|
14270
|
-
const resolvedMinWidth = itemMinWidth != null ? itemMinWidth :
|
|
14384
|
+
const resolvedMinWidth = itemMinWidth != null ? itemMinWidth : parseTokenValue54(pictureButton.size.minWidth);
|
|
14271
14385
|
const resolvedMinHeight = itemMinHeight != null ? itemMinHeight : resolvedMinWidth;
|
|
14272
14386
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14273
|
-
|
|
14387
|
+
StyledRoot16,
|
|
14274
14388
|
__spreadProps(__spreadValues({
|
|
14275
14389
|
ref,
|
|
14276
14390
|
rootGap,
|
|
@@ -14360,7 +14474,7 @@ var DEFAULT_UNIT_LABELS = {
|
|
|
14360
14474
|
seconds: { singular: "sec", plural: "secs" }
|
|
14361
14475
|
};
|
|
14362
14476
|
var resolveLabel = (label, value) => typeof label === "string" ? label : value === 1 ? label.singular : label.plural;
|
|
14363
|
-
var
|
|
14477
|
+
var parseTokenValue55 = (value) => parseFloat(value);
|
|
14364
14478
|
var pad = (value) => String(Math.max(0, Math.floor(value))).padStart(2, "0");
|
|
14365
14479
|
var StackedRoot = styled50__default.default(reactNative.View)(({ rootGap }) => ({
|
|
14366
14480
|
flexDirection: "row",
|
|
@@ -14490,28 +14604,28 @@ var Countdown = React65__default.default.forwardRef(
|
|
|
14490
14604
|
InlineRoot,
|
|
14491
14605
|
__spreadProps(__spreadValues({
|
|
14492
14606
|
ref,
|
|
14493
|
-
rootGap:
|
|
14494
|
-
rootVerticalPadding:
|
|
14607
|
+
rootGap: parseTokenValue55(countdown.spacing.gap),
|
|
14608
|
+
rootVerticalPadding: parseTokenValue55(
|
|
14495
14609
|
countdown.spacing.verticalPadding
|
|
14496
14610
|
),
|
|
14497
|
-
rootHorizontalPadding:
|
|
14611
|
+
rootHorizontalPadding: parseTokenValue55(
|
|
14498
14612
|
countdown.spacing.horizontalPadding
|
|
14499
14613
|
),
|
|
14500
14614
|
rootBgColor: countdown.colour.background.default,
|
|
14501
|
-
rootBorderRadius:
|
|
14615
|
+
rootBorderRadius: parseTokenValue55(countdown.borderRadius.default)
|
|
14502
14616
|
}, rest), {
|
|
14503
14617
|
children: [
|
|
14504
14618
|
label != null && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "bold", size: "md", color: "primary", children: label }),
|
|
14505
14619
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14506
14620
|
InlineGroup,
|
|
14507
14621
|
{
|
|
14508
|
-
groupGap:
|
|
14622
|
+
groupGap: parseTokenValue55(countdown.countdownGroup.spacing.gap),
|
|
14509
14623
|
children: units.map((unit, index) => /* @__PURE__ */ jsxRuntime.jsxs(React65__default.default.Fragment, { children: [
|
|
14510
14624
|
index > 0 && colon(`colon-${unit.key}`),
|
|
14511
14625
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14512
14626
|
InlineCount,
|
|
14513
14627
|
{
|
|
14514
|
-
countGap:
|
|
14628
|
+
countGap: parseTokenValue55(countdown.count.spacing.gap),
|
|
14515
14629
|
children: [
|
|
14516
14630
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14517
14631
|
Typography,
|
|
@@ -14547,33 +14661,33 @@ var Countdown = React65__default.default.forwardRef(
|
|
|
14547
14661
|
StackedRoot,
|
|
14548
14662
|
__spreadProps(__spreadValues({
|
|
14549
14663
|
ref,
|
|
14550
|
-
rootGap:
|
|
14664
|
+
rootGap: parseTokenValue55(countdown.spacing.gap)
|
|
14551
14665
|
}, rest), {
|
|
14552
14666
|
children: units.map((unit, index) => /* @__PURE__ */ jsxRuntime.jsxs(React65__default.default.Fragment, { children: [
|
|
14553
14667
|
index > 0 && colon(`colon-${unit.key}`),
|
|
14554
14668
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14555
14669
|
StackedItem,
|
|
14556
14670
|
{
|
|
14557
|
-
itemGap:
|
|
14558
|
-
itemVerticalPadding:
|
|
14671
|
+
itemGap: parseTokenValue55(countdownItem.spacing.gap),
|
|
14672
|
+
itemVerticalPadding: parseTokenValue55(
|
|
14559
14673
|
countdownItem.spacing.verticalPadding
|
|
14560
14674
|
),
|
|
14561
|
-
itemHorizontalPadding:
|
|
14675
|
+
itemHorizontalPadding: parseTokenValue55(
|
|
14562
14676
|
countdownItem.spacing.horizontalPadding
|
|
14563
14677
|
),
|
|
14564
14678
|
itemBgColor: countdownItem.colour.background.default,
|
|
14565
|
-
itemBorderRadius:
|
|
14679
|
+
itemBorderRadius: parseTokenValue55(
|
|
14566
14680
|
countdownItem.borderRadius.default
|
|
14567
14681
|
),
|
|
14568
14682
|
children: [
|
|
14569
14683
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14570
14684
|
StackedCountBox,
|
|
14571
14685
|
{
|
|
14572
|
-
countPaddingTop:
|
|
14686
|
+
countPaddingTop: parseTokenValue55(
|
|
14573
14687
|
countdownItem.count.spacing.paddingTop
|
|
14574
14688
|
),
|
|
14575
14689
|
countBgColor: countdownItem.count.colour.background.default,
|
|
14576
|
-
countBorderRadius:
|
|
14690
|
+
countBorderRadius: parseTokenValue55(
|
|
14577
14691
|
countdownItem.count.borderRadius.default
|
|
14578
14692
|
),
|
|
14579
14693
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14603,7 +14717,7 @@ var Countdown = React65__default.default.forwardRef(
|
|
|
14603
14717
|
}
|
|
14604
14718
|
);
|
|
14605
14719
|
Countdown.displayName = "Countdown";
|
|
14606
|
-
var
|
|
14720
|
+
var parseTokenValue56 = (value) => {
|
|
14607
14721
|
if (typeof value === "number") return value;
|
|
14608
14722
|
return parseFloat(value);
|
|
14609
14723
|
};
|
|
@@ -14614,14 +14728,14 @@ var BadgeContainer = styled50__default.default(reactNative.View)(({ theme: theme
|
|
|
14614
14728
|
return {
|
|
14615
14729
|
display: "flex",
|
|
14616
14730
|
flexDirection: "row",
|
|
14617
|
-
gap:
|
|
14731
|
+
gap: parseTokenValue56(spacing["2xs"]),
|
|
14618
14732
|
alignItems: "center",
|
|
14619
14733
|
justifyContent: "center",
|
|
14620
|
-
height:
|
|
14621
|
-
paddingRight:
|
|
14734
|
+
height: parseTokenValue56(sizing["2xl"]),
|
|
14735
|
+
paddingRight: parseTokenValue56(spacing.xs),
|
|
14622
14736
|
backgroundColor: colour.background.container.brand,
|
|
14623
|
-
borderTopRightRadius:
|
|
14624
|
-
borderBottomRightRadius:
|
|
14737
|
+
borderTopRightRadius: parseTokenValue56(borderRadius.xs),
|
|
14738
|
+
borderBottomRightRadius: parseTokenValue56(borderRadius.xs)
|
|
14625
14739
|
};
|
|
14626
14740
|
});
|
|
14627
14741
|
var BadgeIcon = styled50__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
@@ -14631,9 +14745,9 @@ var BadgeIcon = styled50__default.default(reactNative.View)(({ theme: theme2 })
|
|
|
14631
14745
|
display: "flex",
|
|
14632
14746
|
alignItems: "center",
|
|
14633
14747
|
justifyContent: "center",
|
|
14634
|
-
width:
|
|
14635
|
-
height:
|
|
14636
|
-
marginLeft:
|
|
14748
|
+
width: parseTokenValue56(sizing.md),
|
|
14749
|
+
height: parseTokenValue56(sizing.md),
|
|
14750
|
+
marginLeft: parseTokenValue56(spacing.xs),
|
|
14637
14751
|
flexShrink: 0
|
|
14638
14752
|
};
|
|
14639
14753
|
});
|
|
@@ -14682,16 +14796,16 @@ var Grid = React65__default.default.forwardRef(
|
|
|
14682
14796
|
}
|
|
14683
14797
|
);
|
|
14684
14798
|
Grid.displayName = "ProductListingCard.Grid";
|
|
14685
|
-
var
|
|
14799
|
+
var parseTokenValue57 = (value) => {
|
|
14686
14800
|
if (typeof value === "number") return value;
|
|
14687
14801
|
return parseFloat(value);
|
|
14688
14802
|
};
|
|
14689
|
-
var
|
|
14803
|
+
var StyledRoot17 = styled50__default.default(reactNative.Pressable)(({ theme: theme2 }) => {
|
|
14690
14804
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14691
14805
|
return {
|
|
14692
14806
|
display: "flex",
|
|
14693
14807
|
flexDirection: "column",
|
|
14694
|
-
gap:
|
|
14808
|
+
gap: parseTokenValue57(spacing.md),
|
|
14695
14809
|
alignItems: "flex-start",
|
|
14696
14810
|
width: "100%"
|
|
14697
14811
|
};
|
|
@@ -14701,7 +14815,7 @@ var ImageContainer = styled50__default.default(reactNative.View)(({ theme: theme
|
|
|
14701
14815
|
width: "100%",
|
|
14702
14816
|
aspectRatio: 1,
|
|
14703
14817
|
overflow: "hidden",
|
|
14704
|
-
borderRadius:
|
|
14818
|
+
borderRadius: parseTokenValue57(
|
|
14705
14819
|
theme2.tokens.semantics.dimensions.borderRadius.md
|
|
14706
14820
|
)
|
|
14707
14821
|
}));
|
|
@@ -14712,7 +14826,7 @@ var StyledImage2 = styled50__default.default(reactNative.Image)({
|
|
|
14712
14826
|
});
|
|
14713
14827
|
var BadgeContainer2 = styled50__default.default(reactNative.View)(({ theme: theme2 }) => ({
|
|
14714
14828
|
position: "absolute",
|
|
14715
|
-
top:
|
|
14829
|
+
top: parseTokenValue57(theme2.tokens.semantics.dimensions.spacing.md),
|
|
14716
14830
|
left: 0
|
|
14717
14831
|
}));
|
|
14718
14832
|
var ContentContainer = styled50__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
@@ -14720,7 +14834,7 @@ var ContentContainer = styled50__default.default(reactNative.View)(({ theme: the
|
|
|
14720
14834
|
return {
|
|
14721
14835
|
display: "flex",
|
|
14722
14836
|
flexDirection: "column",
|
|
14723
|
-
gap:
|
|
14837
|
+
gap: parseTokenValue57(spacing.md),
|
|
14724
14838
|
alignItems: "flex-start",
|
|
14725
14839
|
width: "100%"
|
|
14726
14840
|
};
|
|
@@ -14734,7 +14848,7 @@ var DetailsContainer = styled50__default.default(reactNative.View)({
|
|
|
14734
14848
|
var CategoryWrapper = styled50__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
14735
14849
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14736
14850
|
return {
|
|
14737
|
-
marginBottom:
|
|
14851
|
+
marginBottom: parseTokenValue57(spacing["3xs"])
|
|
14738
14852
|
};
|
|
14739
14853
|
});
|
|
14740
14854
|
var TitleContainer = styled50__default.default(reactNative.View)({
|
|
@@ -14787,7 +14901,7 @@ var _ProductListingCard = React65__default.default.forwardRef(
|
|
|
14787
14901
|
"showPrice",
|
|
14788
14902
|
"onPress"
|
|
14789
14903
|
]);
|
|
14790
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14904
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(StyledRoot17, __spreadProps(__spreadValues({ ref, onPress }, rest), { children: [
|
|
14791
14905
|
/* @__PURE__ */ jsxRuntime.jsxs(ImageContainer, { children: [
|
|
14792
14906
|
image && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { flex: 1, width: "100%", height: "100%" }, children: typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
14793
14907
|
StyledImage2,
|
|
@@ -15082,7 +15196,7 @@ var useTabNavigationContext = () => {
|
|
|
15082
15196
|
}
|
|
15083
15197
|
return context;
|
|
15084
15198
|
};
|
|
15085
|
-
var
|
|
15199
|
+
var parseTokenValue58 = (value) => parseFloat(value);
|
|
15086
15200
|
var StyledFixedList = styled50__default.default(reactNative.View)({
|
|
15087
15201
|
flexDirection: "row",
|
|
15088
15202
|
alignItems: "stretch",
|
|
@@ -15148,13 +15262,13 @@ var TabNavigationTab = React65__default.default.forwardRef(
|
|
|
15148
15262
|
StyledTab,
|
|
15149
15263
|
__spreadProps(__spreadValues({
|
|
15150
15264
|
ref,
|
|
15151
|
-
tabHeight:
|
|
15152
|
-
tabMinWidth:
|
|
15153
|
-
tabPaddingTop:
|
|
15154
|
-
tabPaddingBottom:
|
|
15155
|
-
tabPaddingHorizontal:
|
|
15156
|
-
tabGap:
|
|
15157
|
-
tabBorderWidth:
|
|
15265
|
+
tabHeight: parseTokenValue58(tabitem.size.height),
|
|
15266
|
+
tabMinWidth: parseTokenValue58(tabitem.size.minWidth),
|
|
15267
|
+
tabPaddingTop: parseTokenValue58(spacing.topPadding),
|
|
15268
|
+
tabPaddingBottom: parseTokenValue58(spacing.bottomPadding),
|
|
15269
|
+
tabPaddingHorizontal: parseTokenValue58(spacing.horizontalPadding),
|
|
15270
|
+
tabGap: parseTokenValue58(spacing.gap),
|
|
15271
|
+
tabBorderWidth: parseTokenValue58(borderWidth.default),
|
|
15158
15272
|
tabBorderColor: borderColour,
|
|
15159
15273
|
tabFlex: layout === "fixed" ? 1 : void 0
|
|
15160
15274
|
}, rest), {
|
|
@@ -15302,6 +15416,7 @@ exports.SelectFieldTrigger = SelectFieldTrigger;
|
|
|
15302
15416
|
exports.SelectFieldValue = SelectFieldValue;
|
|
15303
15417
|
exports.Slider = Slider;
|
|
15304
15418
|
exports.Spinner = Spinner;
|
|
15419
|
+
exports.StackedNotifications = StackedNotifications;
|
|
15305
15420
|
exports.Switch = Switch;
|
|
15306
15421
|
exports.TabNavigation = TabNavigation;
|
|
15307
15422
|
exports.Tag = Tag;
|