@butternutbox/pawprint-native 0.14.0 → 0.15.1
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 +14 -0
- package/dist/index.cjs +223 -90
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +95 -1
- package/dist/index.d.ts +95 -1
- package/dist/index.js +222 -91
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Typography/Typography.tsx +10 -1
- package/src/components/molecules/Menu/Menu.stories.tsx +132 -0
- package/src/components/molecules/Menu/Menu.test.tsx +60 -0
- package/src/components/molecules/Menu/Menu.tsx +143 -0
- package/src/components/molecules/Menu/MenuItem.tsx +103 -0
- package/src/components/molecules/Menu/index.ts +4 -0
- package/src/components/molecules/NativeSelectPicker/NativeSelectPicker.styled.ts +35 -10
- package/src/components/molecules/index.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
[34mCJS[39m Build start
|
|
8
8
|
[34mESM[39m Build start
|
|
9
9
|
[34mDTS[39m Build start
|
|
10
|
-
[32mCJS[39m [1mdist/index.cjs [22m[
|
|
11
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.
|
|
12
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
14
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m1.
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
10
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m532.54 KB[39m
|
|
11
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.02 MB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 7676ms
|
|
13
|
+
[32mESM[39m [1mdist/index.js [22m[32m502.90 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m1.02 MB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 7677ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 21916ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m98.50 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m98.50 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @butternutbox/pawprint-native
|
|
2
2
|
|
|
3
|
+
## 0.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 55734f4: Fix Android text rendering in the design system:
|
|
8
|
+
- `Typography`: disable `includeFontPadding` and centre text vertically. Android reserves extra ascent/descent padding and top-aligns glyphs, which — with the tall Ida Narrow metrics — squeezed or clipped copy (headings, button labels) that renders fine on one line on iOS. Both props are Android-only, so iOS is unaffected.
|
|
9
|
+
- `NativeSelectPicker`: render the selected value, placeholder, dialog title and option labels in the brand font. They set `fontWeight` but no resolvable `fontFamily`, so they fell back to the system font — now resolved via `resolveFont` (same fix as `TextArea`).
|
|
10
|
+
|
|
11
|
+
## 0.15.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 80ab1d3: Add `Menu` molecule — a dropdown menu that expands beneath an anchor (e.g. a header/bar) and dismisses on outside tap, leaving the page behind undarkened. Consumers own open/close state and supply `Menu.Item` rows (`action` / `destructive` variants, opt-out `divider`); `anchorOffset` positions the card just below the anchoring bar.
|
|
16
|
+
|
|
3
17
|
## 0.14.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -226,7 +226,10 @@ var VARIANT_DEFAULTS = {
|
|
|
226
226
|
heading: { size: "md" },
|
|
227
227
|
display: { size: "lg" }
|
|
228
228
|
};
|
|
229
|
-
var StyledText = styled51__default.default(reactNative.Text)({
|
|
229
|
+
var StyledText = styled51__default.default(reactNative.Text)({
|
|
230
|
+
includeFontPadding: false,
|
|
231
|
+
textAlignVertical: "center"
|
|
232
|
+
});
|
|
230
233
|
var Typography = React66__default.default.forwardRef(
|
|
231
234
|
(props, ref) => {
|
|
232
235
|
const theme2 = react.useTheme();
|
|
@@ -8911,6 +8914,16 @@ var { dimensions } = semantics;
|
|
|
8911
8914
|
var parseSize = (value) => {
|
|
8912
8915
|
return parseInt(value.replace("px", ""), 10);
|
|
8913
8916
|
};
|
|
8917
|
+
var resolveTypography = (typography) => {
|
|
8918
|
+
var _a, _b;
|
|
8919
|
+
const { fontFamily } = resolveFont(
|
|
8920
|
+
typography.fontFamily,
|
|
8921
|
+
typography.fontWeight
|
|
8922
|
+
);
|
|
8923
|
+
const fontSize = parseSize(typography.fontSize);
|
|
8924
|
+
const letterSpacing = ((_a = typography.letterSpacing) == null ? void 0 : _a.endsWith("%")) ? parseFloat(typography.letterSpacing) / 100 * fontSize : parseFloat((_b = typography.letterSpacing) != null ? _b : "0");
|
|
8925
|
+
return { fontFamily, fontSize, letterSpacing };
|
|
8926
|
+
};
|
|
8914
8927
|
var Wrapper = styled51__default.default(reactNative.View)({
|
|
8915
8928
|
borderWidth: parseSize(inputTokens.borderWidth.field.selected),
|
|
8916
8929
|
borderColor: inputTokens.colour.field.border.selected,
|
|
@@ -8928,18 +8941,16 @@ var SelectIcon = styled51__default.default(Animated10__default.default.View)({
|
|
|
8928
8941
|
right: 0,
|
|
8929
8942
|
marginRight: 0
|
|
8930
8943
|
});
|
|
8931
|
-
var InputText2 = styled51__default.default(reactNative.Text)({
|
|
8932
|
-
color: inputTokens.colour.field.text.default
|
|
8933
|
-
|
|
8934
|
-
fontWeight: inputTokens.field.placeholder.default.fontWeight,
|
|
8944
|
+
var InputText2 = styled51__default.default(reactNative.Text)(__spreadProps(__spreadValues({
|
|
8945
|
+
color: inputTokens.colour.field.text.default
|
|
8946
|
+
}, resolveTypography(inputTokens.field.placeholder.default)), {
|
|
8935
8947
|
flex: 1
|
|
8936
|
-
});
|
|
8937
|
-
var PlaceholderText = styled51__default.default(reactNative.Text)({
|
|
8938
|
-
color: inputTokens.colour.field.text.placeholder
|
|
8939
|
-
|
|
8940
|
-
fontWeight: inputTokens.field.placeholder.default.fontWeight,
|
|
8948
|
+
}));
|
|
8949
|
+
var PlaceholderText = styled51__default.default(reactNative.Text)(__spreadProps(__spreadValues({
|
|
8950
|
+
color: inputTokens.colour.field.text.placeholder
|
|
8951
|
+
}, resolveTypography(inputTokens.field.placeholder.default)), {
|
|
8941
8952
|
flex: 1
|
|
8942
|
-
});
|
|
8953
|
+
}));
|
|
8943
8954
|
var ModalOverlay = styled51__default.default(reactNative.View)({
|
|
8944
8955
|
flex: 1,
|
|
8945
8956
|
backgroundColor: "rgba(0, 0, 0, 0.32)",
|
|
@@ -8955,13 +8966,11 @@ var AndroidDialog = styled51__default.default(reactNative.View)({
|
|
|
8955
8966
|
paddingBottom: parseSize(dimensions.spacing.xl),
|
|
8956
8967
|
paddingHorizontal: parseSize(dimensions.spacing.md)
|
|
8957
8968
|
});
|
|
8958
|
-
var DialogTitle = styled51__default.default(reactNative.Text)({
|
|
8959
|
-
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
8960
|
-
fontWeight: inputTokens.text.label.fontWeight,
|
|
8969
|
+
var DialogTitle = styled51__default.default(reactNative.Text)(__spreadProps(__spreadValues({}, resolveTypography(inputTokens.text.label)), {
|
|
8961
8970
|
color: inputTokens.colour.field.text.default,
|
|
8962
8971
|
marginBottom: parseSize(dimensions.spacing.md),
|
|
8963
8972
|
marginLeft: parseSize(dimensions.spacing.xs)
|
|
8964
|
-
});
|
|
8973
|
+
}));
|
|
8965
8974
|
var AndroidOptionRow = styled51__default.default(reactNative.View)({
|
|
8966
8975
|
flexDirection: "row",
|
|
8967
8976
|
alignItems: "center",
|
|
@@ -8987,9 +8996,9 @@ var RadioInner = styled51__default.default(reactNative.View)({
|
|
|
8987
8996
|
backgroundColor: inputTokens.colour.field.border.selected
|
|
8988
8997
|
});
|
|
8989
8998
|
var AndroidOptionText = styled51__default.default(reactNative.Text)(
|
|
8990
|
-
({ isSelected }) => ({
|
|
8991
|
-
|
|
8992
|
-
|
|
8999
|
+
({ isSelected }) => __spreadProps(__spreadValues({}, resolveTypography(
|
|
9000
|
+
isSelected ? inputTokens.text.label : inputTokens.field.placeholder.default
|
|
9001
|
+
)), {
|
|
8993
9002
|
color: inputTokens.colour.field.text.default,
|
|
8994
9003
|
flex: 1
|
|
8995
9004
|
})
|
|
@@ -10186,6 +10195,128 @@ var Tooltip = React66__default.default.forwardRef(
|
|
|
10186
10195
|
);
|
|
10187
10196
|
Tooltip.displayName = "Tooltip";
|
|
10188
10197
|
var parseTokenValue53 = (value) => parseFloat(value);
|
|
10198
|
+
var Row = styled51__default.default(reactNative.Pressable)(({ theme: theme2, divider }) => {
|
|
10199
|
+
const { spacing } = theme2.tokens.semantics.dimensions;
|
|
10200
|
+
const { colour } = theme2.tokens.semantics;
|
|
10201
|
+
return {
|
|
10202
|
+
width: "100%",
|
|
10203
|
+
alignItems: "center",
|
|
10204
|
+
justifyContent: "center",
|
|
10205
|
+
paddingVertical: parseTokenValue53(spacing.md),
|
|
10206
|
+
paddingHorizontal: parseTokenValue53(spacing.md),
|
|
10207
|
+
borderBottomWidth: divider ? 1 : 0,
|
|
10208
|
+
borderBottomColor: colour.border.divider
|
|
10209
|
+
};
|
|
10210
|
+
});
|
|
10211
|
+
var MenuItem = React66__default.default.forwardRef((_a, ref) => {
|
|
10212
|
+
var _b = _a, { variant = "action", onPress, children, divider = true } = _b, rest = __objRest(_b, ["variant", "onPress", "children", "divider"]);
|
|
10213
|
+
const theme2 = react.useTheme();
|
|
10214
|
+
const { colour, typography } = theme2.tokens.semantics;
|
|
10215
|
+
const labelColour = variant === "destructive" ? colour.text.error : colour.text.action.default;
|
|
10216
|
+
const label = typeof children === "string" || typeof children === "number" ? String(children) : void 0;
|
|
10217
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10218
|
+
Row,
|
|
10219
|
+
__spreadProps(__spreadValues({
|
|
10220
|
+
ref,
|
|
10221
|
+
divider,
|
|
10222
|
+
onPress,
|
|
10223
|
+
accessible: true,
|
|
10224
|
+
accessibilityRole: "menuitem",
|
|
10225
|
+
accessibilityLabel: label
|
|
10226
|
+
}, rest), {
|
|
10227
|
+
children: label !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10228
|
+
Typography,
|
|
10229
|
+
{
|
|
10230
|
+
token: typography.body.medium.md,
|
|
10231
|
+
align: "center",
|
|
10232
|
+
color: labelColour,
|
|
10233
|
+
children: label
|
|
10234
|
+
}
|
|
10235
|
+
) : children
|
|
10236
|
+
})
|
|
10237
|
+
);
|
|
10238
|
+
});
|
|
10239
|
+
MenuItem.displayName = "Menu.Item";
|
|
10240
|
+
var parseTokenValue54 = (value) => parseFloat(value);
|
|
10241
|
+
var DismissLayer = styled51__default.default(reactNative.Pressable)({
|
|
10242
|
+
position: "absolute",
|
|
10243
|
+
top: 0,
|
|
10244
|
+
left: 0,
|
|
10245
|
+
right: 0,
|
|
10246
|
+
bottom: 0
|
|
10247
|
+
});
|
|
10248
|
+
var Anchor = styled51__default.default(reactNative.View)(({ theme: theme2, align }) => {
|
|
10249
|
+
const inset = parseTokenValue54(theme2.tokens.semantics.dimensions.spacing.md);
|
|
10250
|
+
return __spreadValues({
|
|
10251
|
+
position: "absolute"
|
|
10252
|
+
}, align === "right" ? { right: inset } : { left: inset });
|
|
10253
|
+
});
|
|
10254
|
+
var Card = styled51__default.default(reactNative.Pressable)(({ theme: theme2, width }) => {
|
|
10255
|
+
const { borderRadius } = theme2.tokens.semantics.dimensions;
|
|
10256
|
+
const { shadow, background } = theme2.tokens.semantics.colour;
|
|
10257
|
+
return {
|
|
10258
|
+
width,
|
|
10259
|
+
maxWidth: "90%",
|
|
10260
|
+
borderRadius: parseTokenValue54(borderRadius.md),
|
|
10261
|
+
overflow: "hidden",
|
|
10262
|
+
backgroundColor: background.surface.default,
|
|
10263
|
+
// Shadow token colour carries its own alpha, so opacity stays at 1.
|
|
10264
|
+
shadowColor: shadow.md.color,
|
|
10265
|
+
shadowOffset: {
|
|
10266
|
+
width: parseTokenValue54(shadow.md.offsetX),
|
|
10267
|
+
height: parseTokenValue54(shadow.md.offsetY)
|
|
10268
|
+
},
|
|
10269
|
+
shadowOpacity: 1,
|
|
10270
|
+
shadowRadius: parseTokenValue54(shadow.md.blur),
|
|
10271
|
+
elevation: 8
|
|
10272
|
+
};
|
|
10273
|
+
});
|
|
10274
|
+
var MenuRoot = ({
|
|
10275
|
+
open,
|
|
10276
|
+
onClose,
|
|
10277
|
+
anchorOffset = 0,
|
|
10278
|
+
align = "right",
|
|
10279
|
+
width = 360,
|
|
10280
|
+
closeAccessibilityLabel = "Close menu",
|
|
10281
|
+
children
|
|
10282
|
+
}) => {
|
|
10283
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10284
|
+
reactNative.Modal,
|
|
10285
|
+
{
|
|
10286
|
+
visible: open,
|
|
10287
|
+
transparent: true,
|
|
10288
|
+
statusBarTranslucent: true,
|
|
10289
|
+
animationType: "fade",
|
|
10290
|
+
onRequestClose: onClose,
|
|
10291
|
+
children: [
|
|
10292
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10293
|
+
DismissLayer,
|
|
10294
|
+
{
|
|
10295
|
+
onPress: onClose,
|
|
10296
|
+
accessible: false,
|
|
10297
|
+
accessibilityLabel: closeAccessibilityLabel
|
|
10298
|
+
}
|
|
10299
|
+
),
|
|
10300
|
+
/* @__PURE__ */ jsxRuntime.jsx(Anchor, { align, style: { top: anchorOffset }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10301
|
+
Card,
|
|
10302
|
+
{
|
|
10303
|
+
width,
|
|
10304
|
+
onPress: () => {
|
|
10305
|
+
},
|
|
10306
|
+
accessible: false,
|
|
10307
|
+
accessibilityRole: "menu",
|
|
10308
|
+
children
|
|
10309
|
+
}
|
|
10310
|
+
) })
|
|
10311
|
+
]
|
|
10312
|
+
}
|
|
10313
|
+
);
|
|
10314
|
+
};
|
|
10315
|
+
MenuRoot.displayName = "Menu";
|
|
10316
|
+
var Menu2 = Object.assign(MenuRoot, {
|
|
10317
|
+
Item: MenuItem
|
|
10318
|
+
});
|
|
10319
|
+
var parseTokenValue55 = (value) => parseFloat(value);
|
|
10189
10320
|
var StyledInsightRoot = styled51__default.default(reactNative.View)(
|
|
10190
10321
|
({
|
|
10191
10322
|
rootGap,
|
|
@@ -10230,26 +10361,26 @@ var MessageCardInsight = React66__default.default.forwardRef(
|
|
|
10230
10361
|
const isSupporting = variant === "supporting";
|
|
10231
10362
|
const supporting = insightCard.spacing.supporting;
|
|
10232
10363
|
const standalone = insightCard.spacing.standalone;
|
|
10233
|
-
const radiusStandalone =
|
|
10364
|
+
const radiusStandalone = parseTokenValue55(
|
|
10234
10365
|
insightCard.borderRadius.standalone.default
|
|
10235
10366
|
);
|
|
10236
|
-
const radiusSupporting =
|
|
10367
|
+
const radiusSupporting = parseTokenValue55(
|
|
10237
10368
|
insightCard.borderRadius.supporting.bottom
|
|
10238
10369
|
);
|
|
10239
10370
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10240
10371
|
StyledInsightRoot,
|
|
10241
10372
|
__spreadProps(__spreadValues({
|
|
10242
10373
|
ref,
|
|
10243
|
-
rootGap:
|
|
10374
|
+
rootGap: parseTokenValue55(
|
|
10244
10375
|
isSupporting ? supporting.gap : standalone.gap
|
|
10245
10376
|
),
|
|
10246
|
-
rootPaddingH:
|
|
10377
|
+
rootPaddingH: parseTokenValue55(
|
|
10247
10378
|
isSupporting ? semanticSpacing.md : standalone.horizontalPadding
|
|
10248
10379
|
),
|
|
10249
|
-
rootPaddingTop:
|
|
10380
|
+
rootPaddingTop: parseTokenValue55(
|
|
10250
10381
|
isSupporting ? supporting.topPadding : standalone.verticalPadding
|
|
10251
10382
|
),
|
|
10252
|
-
rootPaddingBottom:
|
|
10383
|
+
rootPaddingBottom: parseTokenValue55(
|
|
10253
10384
|
isSupporting ? supporting.bottomPadding : standalone.verticalPadding
|
|
10254
10385
|
),
|
|
10255
10386
|
rootBorderTopLeftRadius: isSupporting ? 0 : radiusStandalone,
|
|
@@ -10257,7 +10388,7 @@ var MessageCardInsight = React66__default.default.forwardRef(
|
|
|
10257
10388
|
rootBorderBottomLeftRadius: isSupporting ? radiusSupporting : radiusStandalone,
|
|
10258
10389
|
rootBorderBottomRightRadius: isSupporting ? radiusSupporting : radiusStandalone,
|
|
10259
10390
|
rootBgColor: insightCard.colour.background.default,
|
|
10260
|
-
rootMinWidth:
|
|
10391
|
+
rootMinWidth: parseTokenValue55(insightCard.size.minWidth),
|
|
10261
10392
|
accessible: true,
|
|
10262
10393
|
accessibilityRole: "summary"
|
|
10263
10394
|
}, rest), {
|
|
@@ -10266,7 +10397,7 @@ var MessageCardInsight = React66__default.default.forwardRef(
|
|
|
10266
10397
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10267
10398
|
StyledInsightContent,
|
|
10268
10399
|
{
|
|
10269
|
-
contentGap:
|
|
10400
|
+
contentGap: parseTokenValue55(standalone.content.gap),
|
|
10270
10401
|
children: [
|
|
10271
10402
|
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10272
10403
|
Typography,
|
|
@@ -10358,9 +10489,9 @@ var MessageCardBanner = React66__default.default.forwardRef(
|
|
|
10358
10489
|
StyledBannerRoot,
|
|
10359
10490
|
__spreadProps(__spreadValues({
|
|
10360
10491
|
ref,
|
|
10361
|
-
rootGap:
|
|
10362
|
-
rootPadding:
|
|
10363
|
-
rootBorderRadius:
|
|
10492
|
+
rootGap: parseTokenValue55(dimensions3.spacing.md),
|
|
10493
|
+
rootPadding: parseTokenValue55(dimensions3.spacing.md),
|
|
10494
|
+
rootBorderRadius: parseTokenValue55(dimensions3.borderRadius.md),
|
|
10364
10495
|
rootBgColor: bgColor,
|
|
10365
10496
|
accessible: true,
|
|
10366
10497
|
accessibilityRole: "summary"
|
|
@@ -10372,7 +10503,7 @@ var MessageCardBanner = React66__default.default.forwardRef(
|
|
|
10372
10503
|
}) }) : (media == null ? void 0 : media.type) === "image" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10373
10504
|
StyledBannerImage,
|
|
10374
10505
|
{
|
|
10375
|
-
imageRadius:
|
|
10506
|
+
imageRadius: parseTokenValue55(dimensions3.borderRadius.sm),
|
|
10376
10507
|
imageBgColor: colour.background.surface.secondary,
|
|
10377
10508
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10378
10509
|
reactNative.Image,
|
|
@@ -10388,12 +10519,12 @@ var MessageCardBanner = React66__default.default.forwardRef(
|
|
|
10388
10519
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10389
10520
|
StyledBannerContents,
|
|
10390
10521
|
{
|
|
10391
|
-
contentsGap:
|
|
10522
|
+
contentsGap: parseTokenValue55(dimensions3.spacing.xs),
|
|
10392
10523
|
children: [
|
|
10393
10524
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10394
10525
|
StyledBannerCopy,
|
|
10395
10526
|
{
|
|
10396
|
-
copyGap:
|
|
10527
|
+
copyGap: parseTokenValue55(dimensions3.spacing["3xs"]),
|
|
10397
10528
|
children: [
|
|
10398
10529
|
title && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "heading", size: "xs", color: "primary", children: title }),
|
|
10399
10530
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "md", color: "secondary", children })
|
|
@@ -10424,7 +10555,7 @@ var MessageCard = {
|
|
|
10424
10555
|
Insight: MessageCardInsight,
|
|
10425
10556
|
Banner: MessageCardBanner
|
|
10426
10557
|
};
|
|
10427
|
-
var
|
|
10558
|
+
var parseTokenValue56 = (value) => parseFloat(value);
|
|
10428
10559
|
var slideEaseOut = Animated10.Easing.out(Animated10.Easing.quad);
|
|
10429
10560
|
var MONTH_SLIDE_ENTERING = {
|
|
10430
10561
|
forward: Animated10.FadeInRight.duration(250).easing(slideEaseOut),
|
|
@@ -10585,17 +10716,17 @@ var DatePicker = React66__default.default.forwardRef(
|
|
|
10585
10716
|
} = React66.useMemo(
|
|
10586
10717
|
() => ({
|
|
10587
10718
|
// Gap between the week-day header and the month header.
|
|
10588
|
-
weekGap:
|
|
10719
|
+
weekGap: parseTokenValue56(datePicker.spacing.gap),
|
|
10589
10720
|
// Gap between the month header and the dates grid.
|
|
10590
|
-
datesGap:
|
|
10591
|
-
containerMaxWidth:
|
|
10592
|
-
headerGap:
|
|
10593
|
-
cellHeight:
|
|
10594
|
-
indicatorSize:
|
|
10595
|
-
indicatorBorderRadius:
|
|
10596
|
-
selectedBorderWidth:
|
|
10597
|
-
disabledOpacity:
|
|
10598
|
-
rowGap:
|
|
10721
|
+
datesGap: parseTokenValue56(theme2.tokens.semantics.dimensions.spacing.md),
|
|
10722
|
+
containerMaxWidth: parseTokenValue56(dt.size.width) * 7,
|
|
10723
|
+
headerGap: parseTokenValue56(datePicker.month.spacing.gap),
|
|
10724
|
+
cellHeight: parseTokenValue56(dt.size.height),
|
|
10725
|
+
indicatorSize: parseTokenValue56(dt.size.indicator),
|
|
10726
|
+
indicatorBorderRadius: parseTokenValue56(dt.borderRadius.indicator),
|
|
10727
|
+
selectedBorderWidth: parseTokenValue56(dt.borderWidth.indicator.selected),
|
|
10728
|
+
disabledOpacity: parseTokenValue56(dt.opacity.disabled),
|
|
10729
|
+
rowGap: parseTokenValue56(datePicker.dates.spacing.gap)
|
|
10599
10730
|
}),
|
|
10600
10731
|
[datePicker, dt, theme2]
|
|
10601
10732
|
);
|
|
@@ -10873,7 +11004,7 @@ var buildPointerPath = (r) => {
|
|
|
10873
11004
|
"Z"
|
|
10874
11005
|
].join(" ");
|
|
10875
11006
|
};
|
|
10876
|
-
var
|
|
11007
|
+
var parseTokenValue57 = (value) => parseFloat(value);
|
|
10877
11008
|
var StyledRoot16 = styled51__default.default(reactNative.View)(({ rootGap }) => ({
|
|
10878
11009
|
flexDirection: "column",
|
|
10879
11010
|
gap: rootGap,
|
|
@@ -10963,21 +11094,21 @@ var PictureSelector = React66__default.default.forwardRef(
|
|
|
10963
11094
|
if (!isControlled) setInternalValue(nextValue);
|
|
10964
11095
|
onValueChange == null ? void 0 : onValueChange(nextValue);
|
|
10965
11096
|
};
|
|
10966
|
-
const rootGap =
|
|
10967
|
-
const rowGap =
|
|
10968
|
-
const stackGap =
|
|
10969
|
-
const buttonPadding =
|
|
10970
|
-
const buttonBorderRadius =
|
|
11097
|
+
const rootGap = parseTokenValue57(pictureSelector.spacing.container.gap);
|
|
11098
|
+
const rowGap = parseTokenValue57(pictureSelector.spacing.buttons.gap);
|
|
11099
|
+
const stackGap = parseTokenValue57(pictureButton.spacing.container.gap);
|
|
11100
|
+
const buttonPadding = parseTokenValue57(pictureButton.spacing.padding);
|
|
11101
|
+
const buttonBorderRadius = parseTokenValue57(
|
|
10971
11102
|
pictureButton.borderRadius.default
|
|
10972
11103
|
);
|
|
10973
|
-
const borderWidthDefault =
|
|
11104
|
+
const borderWidthDefault = parseTokenValue57(
|
|
10974
11105
|
pictureButton.borderWidth.default
|
|
10975
11106
|
);
|
|
10976
|
-
const borderWidthActive =
|
|
11107
|
+
const borderWidthActive = parseTokenValue57(pictureButton.borderWidth.active);
|
|
10977
11108
|
const pointerPath = buildPointerPath(
|
|
10978
|
-
|
|
11109
|
+
parseTokenValue57(pictureButton.pointer.borderRadius.default)
|
|
10979
11110
|
);
|
|
10980
|
-
const resolvedMinWidth = itemMinWidth != null ? itemMinWidth :
|
|
11111
|
+
const resolvedMinWidth = itemMinWidth != null ? itemMinWidth : parseTokenValue57(pictureButton.size.minWidth);
|
|
10981
11112
|
const resolvedMinHeight = itemMinHeight != null ? itemMinHeight : resolvedMinWidth;
|
|
10982
11113
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10983
11114
|
StyledRoot16,
|
|
@@ -11070,7 +11201,7 @@ var DEFAULT_UNIT_LABELS = {
|
|
|
11070
11201
|
seconds: { singular: "sec", plural: "secs" }
|
|
11071
11202
|
};
|
|
11072
11203
|
var resolveLabel = (label, value) => typeof label === "string" ? label : value === 1 ? label.singular : label.plural;
|
|
11073
|
-
var
|
|
11204
|
+
var parseTokenValue58 = (value) => parseFloat(value);
|
|
11074
11205
|
var pad = (value) => String(Math.max(0, Math.floor(value))).padStart(2, "0");
|
|
11075
11206
|
var StackedRoot = styled51__default.default(reactNative.View)(({ rootGap }) => ({
|
|
11076
11207
|
flexDirection: "row",
|
|
@@ -11200,28 +11331,28 @@ var Countdown = React66__default.default.forwardRef(
|
|
|
11200
11331
|
InlineRoot,
|
|
11201
11332
|
__spreadProps(__spreadValues({
|
|
11202
11333
|
ref,
|
|
11203
|
-
rootGap:
|
|
11204
|
-
rootVerticalPadding:
|
|
11334
|
+
rootGap: parseTokenValue58(countdown.spacing.gap),
|
|
11335
|
+
rootVerticalPadding: parseTokenValue58(
|
|
11205
11336
|
countdown.spacing.verticalPadding
|
|
11206
11337
|
),
|
|
11207
|
-
rootHorizontalPadding:
|
|
11338
|
+
rootHorizontalPadding: parseTokenValue58(
|
|
11208
11339
|
countdown.spacing.horizontalPadding
|
|
11209
11340
|
),
|
|
11210
11341
|
rootBgColor: countdown.colour.background.default,
|
|
11211
|
-
rootBorderRadius:
|
|
11342
|
+
rootBorderRadius: parseTokenValue58(countdown.borderRadius.default)
|
|
11212
11343
|
}, rest), {
|
|
11213
11344
|
children: [
|
|
11214
11345
|
label != null && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "bold", size: "md", color: "primary", children: label }),
|
|
11215
11346
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11216
11347
|
InlineGroup,
|
|
11217
11348
|
{
|
|
11218
|
-
groupGap:
|
|
11349
|
+
groupGap: parseTokenValue58(countdown.countdownGroup.spacing.gap),
|
|
11219
11350
|
children: units.map((unit, index) => /* @__PURE__ */ jsxRuntime.jsxs(React66__default.default.Fragment, { children: [
|
|
11220
11351
|
index > 0 && colon(`colon-${unit.key}`),
|
|
11221
11352
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11222
11353
|
InlineCount,
|
|
11223
11354
|
{
|
|
11224
|
-
countGap:
|
|
11355
|
+
countGap: parseTokenValue58(countdown.count.spacing.gap),
|
|
11225
11356
|
children: [
|
|
11226
11357
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11227
11358
|
Typography,
|
|
@@ -11257,33 +11388,33 @@ var Countdown = React66__default.default.forwardRef(
|
|
|
11257
11388
|
StackedRoot,
|
|
11258
11389
|
__spreadProps(__spreadValues({
|
|
11259
11390
|
ref,
|
|
11260
|
-
rootGap:
|
|
11391
|
+
rootGap: parseTokenValue58(countdown.spacing.gap)
|
|
11261
11392
|
}, rest), {
|
|
11262
11393
|
children: units.map((unit, index) => /* @__PURE__ */ jsxRuntime.jsxs(React66__default.default.Fragment, { children: [
|
|
11263
11394
|
index > 0 && colon(`colon-${unit.key}`),
|
|
11264
11395
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11265
11396
|
StackedItem,
|
|
11266
11397
|
{
|
|
11267
|
-
itemGap:
|
|
11268
|
-
itemVerticalPadding:
|
|
11398
|
+
itemGap: parseTokenValue58(countdownItem.spacing.gap),
|
|
11399
|
+
itemVerticalPadding: parseTokenValue58(
|
|
11269
11400
|
countdownItem.spacing.verticalPadding
|
|
11270
11401
|
),
|
|
11271
|
-
itemHorizontalPadding:
|
|
11402
|
+
itemHorizontalPadding: parseTokenValue58(
|
|
11272
11403
|
countdownItem.spacing.horizontalPadding
|
|
11273
11404
|
),
|
|
11274
11405
|
itemBgColor: countdownItem.colour.background.default,
|
|
11275
|
-
itemBorderRadius:
|
|
11406
|
+
itemBorderRadius: parseTokenValue58(
|
|
11276
11407
|
countdownItem.borderRadius.default
|
|
11277
11408
|
),
|
|
11278
11409
|
children: [
|
|
11279
11410
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11280
11411
|
StackedCountBox,
|
|
11281
11412
|
{
|
|
11282
|
-
countPaddingTop:
|
|
11413
|
+
countPaddingTop: parseTokenValue58(
|
|
11283
11414
|
countdownItem.count.spacing.paddingTop
|
|
11284
11415
|
),
|
|
11285
11416
|
countBgColor: countdownItem.count.colour.background.default,
|
|
11286
|
-
countBorderRadius:
|
|
11417
|
+
countBorderRadius: parseTokenValue58(
|
|
11287
11418
|
countdownItem.count.borderRadius.default
|
|
11288
11419
|
),
|
|
11289
11420
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11313,7 +11444,7 @@ var Countdown = React66__default.default.forwardRef(
|
|
|
11313
11444
|
}
|
|
11314
11445
|
);
|
|
11315
11446
|
Countdown.displayName = "Countdown";
|
|
11316
|
-
var
|
|
11447
|
+
var parseTokenValue59 = (value) => {
|
|
11317
11448
|
if (typeof value === "number") return value;
|
|
11318
11449
|
return parseFloat(value);
|
|
11319
11450
|
};
|
|
@@ -11324,14 +11455,14 @@ var BadgeContainer = styled51__default.default(reactNative.View)(({ theme: theme
|
|
|
11324
11455
|
return {
|
|
11325
11456
|
display: "flex",
|
|
11326
11457
|
flexDirection: "row",
|
|
11327
|
-
gap:
|
|
11458
|
+
gap: parseTokenValue59(spacing["2xs"]),
|
|
11328
11459
|
alignItems: "center",
|
|
11329
11460
|
justifyContent: "center",
|
|
11330
|
-
height:
|
|
11331
|
-
paddingRight:
|
|
11461
|
+
height: parseTokenValue59(sizing["2xl"]),
|
|
11462
|
+
paddingRight: parseTokenValue59(spacing.xs),
|
|
11332
11463
|
backgroundColor: colour.background.container.brand,
|
|
11333
|
-
borderTopRightRadius:
|
|
11334
|
-
borderBottomRightRadius:
|
|
11464
|
+
borderTopRightRadius: parseTokenValue59(borderRadius.xs),
|
|
11465
|
+
borderBottomRightRadius: parseTokenValue59(borderRadius.xs)
|
|
11335
11466
|
};
|
|
11336
11467
|
});
|
|
11337
11468
|
var BadgeIcon = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
@@ -11341,9 +11472,9 @@ var BadgeIcon = styled51__default.default(reactNative.View)(({ theme: theme2 })
|
|
|
11341
11472
|
display: "flex",
|
|
11342
11473
|
alignItems: "center",
|
|
11343
11474
|
justifyContent: "center",
|
|
11344
|
-
width:
|
|
11345
|
-
height:
|
|
11346
|
-
marginLeft:
|
|
11475
|
+
width: parseTokenValue59(sizing.md),
|
|
11476
|
+
height: parseTokenValue59(sizing.md),
|
|
11477
|
+
marginLeft: parseTokenValue59(spacing.xs),
|
|
11347
11478
|
flexShrink: 0
|
|
11348
11479
|
};
|
|
11349
11480
|
});
|
|
@@ -11392,7 +11523,7 @@ var Grid = React66__default.default.forwardRef(
|
|
|
11392
11523
|
}
|
|
11393
11524
|
);
|
|
11394
11525
|
Grid.displayName = "ProductListingCard.Grid";
|
|
11395
|
-
var
|
|
11526
|
+
var parseTokenValue60 = (value) => {
|
|
11396
11527
|
if (typeof value === "number") return value;
|
|
11397
11528
|
return parseFloat(value);
|
|
11398
11529
|
};
|
|
@@ -11401,7 +11532,7 @@ var StyledRoot17 = styled51__default.default(reactNative.Pressable)(({ theme: th
|
|
|
11401
11532
|
return {
|
|
11402
11533
|
display: "flex",
|
|
11403
11534
|
flexDirection: "column",
|
|
11404
|
-
gap:
|
|
11535
|
+
gap: parseTokenValue60(spacing.md),
|
|
11405
11536
|
alignItems: "flex-start",
|
|
11406
11537
|
width: "100%"
|
|
11407
11538
|
};
|
|
@@ -11411,7 +11542,7 @@ var ImageContainer = styled51__default.default(reactNative.View)(({ theme: theme
|
|
|
11411
11542
|
width: "100%",
|
|
11412
11543
|
aspectRatio: 1,
|
|
11413
11544
|
overflow: "hidden",
|
|
11414
|
-
borderRadius:
|
|
11545
|
+
borderRadius: parseTokenValue60(
|
|
11415
11546
|
theme2.tokens.semantics.dimensions.borderRadius.md
|
|
11416
11547
|
)
|
|
11417
11548
|
}));
|
|
@@ -11422,7 +11553,7 @@ var StyledImage2 = styled51__default.default(reactNative.Image)({
|
|
|
11422
11553
|
});
|
|
11423
11554
|
var BadgeContainer2 = styled51__default.default(reactNative.View)(({ theme: theme2 }) => ({
|
|
11424
11555
|
position: "absolute",
|
|
11425
|
-
top:
|
|
11556
|
+
top: parseTokenValue60(theme2.tokens.semantics.dimensions.spacing.md),
|
|
11426
11557
|
left: 0
|
|
11427
11558
|
}));
|
|
11428
11559
|
var ContentContainer = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
@@ -11430,7 +11561,7 @@ var ContentContainer = styled51__default.default(reactNative.View)(({ theme: the
|
|
|
11430
11561
|
return {
|
|
11431
11562
|
display: "flex",
|
|
11432
11563
|
flexDirection: "column",
|
|
11433
|
-
gap:
|
|
11564
|
+
gap: parseTokenValue60(spacing.md),
|
|
11434
11565
|
alignItems: "flex-start",
|
|
11435
11566
|
width: "100%"
|
|
11436
11567
|
};
|
|
@@ -11444,7 +11575,7 @@ var DetailsContainer = styled51__default.default(reactNative.View)({
|
|
|
11444
11575
|
var CategoryWrapper = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
11445
11576
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
11446
11577
|
return {
|
|
11447
|
-
marginBottom:
|
|
11578
|
+
marginBottom: parseTokenValue60(spacing["3xs"])
|
|
11448
11579
|
};
|
|
11449
11580
|
});
|
|
11450
11581
|
var TitleContainer = styled51__default.default(reactNative.View)({
|
|
@@ -11792,7 +11923,7 @@ var useTabNavigationContext = () => {
|
|
|
11792
11923
|
}
|
|
11793
11924
|
return context;
|
|
11794
11925
|
};
|
|
11795
|
-
var
|
|
11926
|
+
var parseTokenValue61 = (value) => parseFloat(value);
|
|
11796
11927
|
var StyledFixedList = styled51__default.default(reactNative.View)({
|
|
11797
11928
|
flexDirection: "row",
|
|
11798
11929
|
alignItems: "stretch",
|
|
@@ -11858,13 +11989,13 @@ var TabNavigationTab = React66__default.default.forwardRef(
|
|
|
11858
11989
|
StyledTab,
|
|
11859
11990
|
__spreadProps(__spreadValues({
|
|
11860
11991
|
ref,
|
|
11861
|
-
tabHeight:
|
|
11862
|
-
tabMinWidth:
|
|
11863
|
-
tabPaddingTop:
|
|
11864
|
-
tabPaddingBottom:
|
|
11865
|
-
tabPaddingHorizontal:
|
|
11866
|
-
tabGap:
|
|
11867
|
-
tabBorderWidth:
|
|
11992
|
+
tabHeight: parseTokenValue61(tabitem.size.height),
|
|
11993
|
+
tabMinWidth: parseTokenValue61(tabitem.size.minWidth),
|
|
11994
|
+
tabPaddingTop: parseTokenValue61(spacing.topPadding),
|
|
11995
|
+
tabPaddingBottom: parseTokenValue61(spacing.bottomPadding),
|
|
11996
|
+
tabPaddingHorizontal: parseTokenValue61(spacing.horizontalPadding),
|
|
11997
|
+
tabGap: parseTokenValue61(spacing.gap),
|
|
11998
|
+
tabBorderWidth: parseTokenValue61(borderWidth.default),
|
|
11868
11999
|
tabBorderColor: borderColour,
|
|
11869
12000
|
tabFlex: layout === "fixed" ? 1 : void 0
|
|
11870
12001
|
}, rest), {
|
|
@@ -11984,6 +12115,8 @@ exports.InputLabel = InputLabel;
|
|
|
11984
12115
|
exports.InputText = InputText;
|
|
11985
12116
|
exports.Link = Link;
|
|
11986
12117
|
exports.Logo = Logo;
|
|
12118
|
+
exports.Menu = Menu2;
|
|
12119
|
+
exports.MenuItem = MenuItem;
|
|
11987
12120
|
exports.MessageCard = MessageCard;
|
|
11988
12121
|
exports.MessageCardBanner = MessageCardBanner;
|
|
11989
12122
|
exports.MessageCardInsight = MessageCardInsight;
|